cad-viewer.esm.js 4.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289
  1. var dre=Object.create;var Vk=Object.defineProperty;var pre=Object.getOwnPropertyDescriptor;var fre=Object.getOwnPropertyNames;var mre=Object.getPrototypeOf,gre=Object.prototype.hasOwnProperty;var W=(r,e,t)=>()=>{if(t)throw t[0];try{return r&&(e=r(r=0)),e}catch(n){throw t=[n],n}};var yre=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},bre=(r,e)=>{for(var t in e)Vk(r,t,{get:e[t],enumerable:!0})},vre=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fre(e))!gre.call(r,i)&&i!==t&&Vk(r,i,{get:()=>e[i],enumerable:!(n=pre(e,i))||n.enumerable});return r};var xre=(r,e,t)=>(t=r!=null?dre(mre(r)):{},vre(e||!r||!r.__esModule?Vk(t,"default",{value:r,enumerable:!0}):t,r));var Ki,Kb=W(()=>{(function(r){r[r.Invalid=-9999]="Invalid",r[r.Start=0]="Start",r[r.Text=1]="Text",r[r.AttributeTag=2]="AttributeTag",r[r.BlockName=2]="BlockName",r[r.ShapeName=2]="ShapeName",r[r.SymbolTableName=2]="SymbolTableName",r[r.SymbolTableRecordName=2]="SymbolTableRecordName",r[r.MlineStyleName=2]="MlineStyleName",r[r.AttributePrompt=3]="AttributePrompt",r[r.Description=3]="Description",r[r.DimPostString=3]="DimPostString",r[r.DimStyleName=3]="DimStyleName",r[r.LinetypeProse=3]="LinetypeProse",r[r.TextFontFile=3]="TextFontFile",r[r.CLShapeName=4]="CLShapeName",r[r.DimensionAlternativePrefixSuffix=4]="DimensionAlternativePrefixSuffix",r[r.SymbolTableRecordComments=4]="SymbolTableRecordComments",r[r.TextBigFontFile=4]="TextBigFontFile",r[r.Handle=5]="Handle",r[r.DimensionBlock=5]="DimensionBlock",r[r.LinetypeName=6]="LinetypeName",r[r.DimBlk1=6]="DimBlk1",r[r.TextStyleName=7]="TextStyleName",r[r.DimBlk2=7]="DimBlk2",r[r.LayerName=8]="LayerName",r[r.CLShapeText=9]="CLShapeText",r[r.XCoordinate=10]="XCoordinate",r[r.YCoordinate=20]="YCoordinate",r[r.ZCoordinate=30]="ZCoordinate",r[r.Real=40]="Real",r[r.TxtSize=40]="TxtSize",r[r.ViewportHeight=40]="ViewportHeight",r[r.Angle=50]="Angle",r[r.ViewportSnapAngle=50]="ViewportSnapAngle",r[r.Visibility=60]="Visibility",r[r.Int16=70]="Int16",r[r.Int32=90]="Int32",r[r.Int64=160]="Int64",r[r.Int8=280]="Int8",r[r.Thickness=39]="Thickness",r[r.Elevation=38]="Elevation",r[r.LinetypeScale=48]="LinetypeScale",r[r.DashLength=49]="DashLength",r[r.MlineOffset=49]="MlineOffset",r[r.LinetypeElement=49]="LinetypeElement",r[r.NormalX=210]="NormalX",r[r.NormalY=220]="NormalY",r[r.NormalZ=230]="NormalZ",r[r.UcsOrg=110]="UcsOrg",r[r.UcsOrientationX=111]="UcsOrientationX",r[r.UcsOrientationY=112]="UcsOrientationY",r[r.ViewHeight=45]="ViewHeight",r[r.ViewWidth=41]="ViewWidth",r[r.ViewLensLength=42]="ViewLensLength",r[r.ViewFrontClip=43]="ViewFrontClip",r[r.ViewBackClip=44]="ViewBackClip",r[r.ViewBrightness=141]="ViewBrightness",r[r.ViewContrast=142]="ViewContrast",r[r.ViewMode=71]="ViewMode",r[r.ViewportActive=68]="ViewportActive",r[r.ViewportAspect=41]="ViewportAspect",r[r.ViewportGrid=76]="ViewportGrid",r[r.ViewportIcon=74]="ViewportIcon",r[r.ViewportNumber=69]="ViewportNumber",r[r.ViewportSnap=75]="ViewportSnap",r[r.ViewportSnapPair=78]="ViewportSnapPair",r[r.ViewportSnapStyle=77]="ViewportSnapStyle",r[r.ViewportTwist=51]="ViewportTwist",r[r.ViewportVisibility=67]="ViewportVisibility",r[r.ViewportZoom=73]="ViewportZoom",r[r.Color=62]="Color",r[r.ColorRgb=420]="ColorRgb",r[r.ColorName=430]="ColorName",r[r.LineWeight=370]="LineWeight",r[r.PlotStyleNameType=380]="PlotStyleNameType",r[r.PlotStyleNameId=390]="PlotStyleNameId",r[r.GradientObjType=450]="GradientObjType",r[r.GradientAngle=460]="GradientAngle",r[r.GradientName=470]="GradientName",r[r.GradientColCount=453]="GradientColCount",r[r.GradientPatType=451]="GradientPatType",r[r.GradientTintType=452]="GradientTintType",r[r.GradientShift=461]="GradientShift",r[r.GradientColVal=463]="GradientColVal",r[r.GradientTintVal=462]="GradientTintVal",r[r.SoftPointerId=330]="SoftPointerId",r[r.HardPointerId=340]="HardPointerId",r[r.SoftOwnershipId=350]="SoftOwnershipId",r[r.HardOwnershipId=360]="HardOwnershipId",r[r.ArbitraryHandle=320]="ArbitraryHandle",r[r.ExtendedDataAsciiString=1e3]="ExtendedDataAsciiString",r[r.ExtendedDataRegAppName=1001]="ExtendedDataRegAppName",r[r.ExtendedDataControlString=1002]="ExtendedDataControlString",r[r.ExtendedDataLayerName=1003]="ExtendedDataLayerName",r[r.ExtendedDataBinaryChunk=1004]="ExtendedDataBinaryChunk",r[r.ExtendedDataHandle=1005]="ExtendedDataHandle",r[r.ExtendedDataXCoordinate=1010]="ExtendedDataXCoordinate",r[r.ExtendedDataWorldXCoordinate=1011]="ExtendedDataWorldXCoordinate",r[r.ExtendedDataWorldXDisp=1012]="ExtendedDataWorldXDisp",r[r.ExtendedDataWorldXDir=1013]="ExtendedDataWorldXDir",r[r.ExtendedDataYCoordinate=1020]="ExtendedDataYCoordinate",r[r.ExtendedDataWorldYCoordinate=1021]="ExtendedDataWorldYCoordinate",r[r.ExtendedDataWorldYDisp=1022]="ExtendedDataWorldYDisp",r[r.ExtendedDataWorldYDir=1023]="ExtendedDataWorldYDir",r[r.ExtendedDataZCoordinate=1030]="ExtendedDataZCoordinate",r[r.ExtendedDataWorldZCoordinate=1031]="ExtendedDataWorldZCoordinate",r[r.ExtendedDataWorldZDisp=1032]="ExtendedDataWorldZDisp",r[r.ExtendedDataWorldZDir=1033]="ExtendedDataWorldZDir",r[r.ExtendedDataReal=1040]="ExtendedDataReal",r[r.ExtendedDataDist=1041]="ExtendedDataDist",r[r.ExtendedDataScale=1042]="ExtendedDataScale",r[r.ExtendedDataInteger16=1070]="ExtendedDataInteger16",r[r.ExtendedDataInteger32=1071]="ExtendedDataInteger32",r[r.XTextString=300]="XTextString",r[r.XReal=140]="XReal",r[r.XInt16=170]="XInt16",r[r.XXInt16=270]="XXInt16",r[r.Subclass=100]="Subclass",r[r.ControlString=102]="ControlString",r[r.EmbeddedObjectStart=101]="EmbeddedObjectStart",r[r.End=-1]="End",r[r.FirstEntityId=-2]="FirstEntityId",r[r.HeaderId=-2]="HeaderId",r[r.XDataStart=-3]="XDataStart",r[r.Operator=-4]="Operator",r[r.PReactors=-5]="PReactors",r[r.XDictionary=-6]="XDictionary"})(Ki||(Ki={}))});var Be,aS=W(()=>{(function(r){r[r.ByColor=1]="ByColor",r[r.ByACI=2]="ByACI",r[r.ByLayer=3]="ByLayer",r[r.ByBlock=4]="ByBlock",r[r.None=0]="None"})(Be||(Be={}))});var wre,_re,RU,Gk,qi,Hk=W(()=>{wre=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_re=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},RU={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,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,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,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},Gk=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0],qi=(function(){function r(){}return r.getColorByIndex=function(e){return Gk[e]},r.getIndexByColor=function(e){for(var t=Gk.length-1,n=1;n<t;++n)if(Gk[n]===e)return n},r.getColorByName=function(e){return RU[e.toLowerCase()]},r.getNameByColor=function(e){var t,n;try{for(var i=wre(Object.entries(RU)),o=i.next();!o.done;o=i.next()){var a=_re(o.value,2),s=a[0],l=a[1];if(l===e)return s}}catch(c){t={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},r.getNameByIndex=function(e){var t=this.getColorByIndex(e);return this.getNameByColor(t)},r})()});var Sre,je,BU=W(()=>{aS();Hk();Sre=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},je=(function(){function r(e,t){e===void 0&&(e=Be.ByLayer),this._colorMethod=e,this._colorMethod==Be.ByColor&&t==null?this._value=16777215:this._colorMethod==Be.ByACI?t==null?this._value=8:t===0?this._colorMethod=Be.ByBlock:t===256?this._colorMethod=Be.ByLayer:this._value=Math.max(0,Math.min(t,256)):this._value=t}return Object.defineProperty(r.prototype,"colorMethod",{get:function(){return this._colorMethod},set:function(e){this._colorMethod=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"red",{get:function(){var e=this.RGB;return e!=null?e>>16&255:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"green",{get:function(){var e=this.RGB;return e!=null?e>>8&255:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blue",{get:function(){var e=this.RGB;return e!=null?e&255:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGB",{get:function(){switch(this._colorMethod){case Be.ByColor:case Be.ByBlock:case Be.ByLayer:return this._value;case Be.ByACI:return this._value?qi.getColorByIndex(this._value):this._value;default:return}},enumerable:!1,configurable:!0}),r.prototype.setRGB=function(e,t,n){var i=Math.max(0,Math.min(255,Math.round(e))),o=Math.max(0,Math.min(255,Math.round(t))),a=Math.max(0,Math.min(255,Math.round(n)));return this._value=i<<16|o<<8|a,this._colorMethod=Be.ByColor,this},r.prototype.setRGBValue=function(e){return e==null||!Number.isFinite(e)?(console.warn("Invalid RGB value:",e),this):(this._value=e&16777215,this._colorMethod=Be.ByColor,this)},r.prototype.setRGBFromCss=function(e){if(!e)return this;var t=e.trim().toLowerCase();if(t.startsWith("#")){var n=0,i=0,o=0;if(t.length===7)n=parseInt(t.substr(1,2),16),i=parseInt(t.substr(3,2),16),o=parseInt(t.substr(5,2),16);else if(t.length===4)n=parseInt(t[1]+t[1],16),i=parseInt(t[2]+t[2],16),o=parseInt(t[3]+t[3],16);else return console.warn("Invalid hex color:",e),this;return this.setRGB(n,i,o)}var a=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);if(a){var n=parseInt(a[1],10),i=parseInt(a[2],10),o=parseInt(a[3],10);return this.setRGB(n,i,o)}var s=qi.getColorByName(e);return s!==void 0?this.setRGBValue(s):(console.warn("Unknown CSS color string:",e),this)},r.prototype.setScalar=function(e){return this.setRGB(e,e,e)},Object.defineProperty(r.prototype,"hexColor",{get:function(){var e=this.RGB;if(e!=null){var t=e.toString(16).padStart(6,"0").toUpperCase();return"0x"+t}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cssColor",{get:function(){var e=this.RGB;if(e!=null)return"rgb(".concat(e>>16&255,",").concat(e>>8&255,",").concat(e&255,")")},enumerable:!1,configurable:!0}),r.prototype.cssColorAlpha=function(e){var t=this.RGB;if(t!=null)return"rgba(".concat(t>>16&255,",").concat(t>>8&255,",").concat(t&255,",").concat(e,")")},Object.defineProperty(r.prototype,"colorIndex",{get:function(){return this._colorMethod===Be.ByACI?this._value:this._colorMethod===Be.ByLayer?256:this._colorMethod===Be.ByBlock?0:void 0},set:function(e){if(e!=null){var t=Math.max(0,Math.min(256,Math.round(e)));t===0?(this._colorMethod=Be.ByBlock,this._value=void 0):t===256?(this._colorMethod=Be.ByLayer,this._value=void 0):(this._colorMethod=Be.ByACI,this._value=t)}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isByColor",{get:function(){return this._colorMethod===Be.ByColor},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isByACI",{get:function(){return this._colorMethod===Be.ByACI},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isForeground",{get:function(){return this._colorMethod===Be.ByACI&&this._value===7},enumerable:!1,configurable:!0}),r.prototype.setForeground=function(){return this._colorMethod=Be.ByACI,this._value=7,this},Object.defineProperty(r.prototype,"isByLayer",{get:function(){return this._colorMethod===Be.ByLayer},enumerable:!1,configurable:!0}),r.prototype.setByLayer=function(e){return this._colorMethod=Be.ByLayer,e==null?this._value=256:this._value=e,this},Object.defineProperty(r.prototype,"isByBlock",{get:function(){return this._colorMethod===Be.ByBlock},enumerable:!1,configurable:!0}),r.prototype.setByBlock=function(e){return this._colorMethod=Be.ByBlock,e==null?this._value=0:this._value=e,this},Object.defineProperty(r.prototype,"colorName",{get:function(){switch(this._colorMethod){case Be.ByLayer:return"ByLayer";case Be.ByBlock:return"ByBlock";case Be.ByColor:return this._value?qi.getNameByColor(this._value):"";case Be.ByACI:return this._value?qi.getNameByIndex(this._value):"";default:return}},set:function(e){if(e){var t=qi.getColorByName(e);t!==void 0?(this._value=t,this._colorMethod=Be.ByColor):console.warn("Unknown color name:",e)}},enumerable:!1,configurable:!0}),r.prototype.clone=function(){var e=new r;return e._colorMethod=this._colorMethod,e._value=this._value,e},r.prototype.copy=function(e){return this._colorMethod=e._colorMethod,this._value=e._value,this},r.prototype.equals=function(e){return this._colorMethod===e._colorMethod&&this._value===e._value},r.prototype.toString=function(){switch(this._colorMethod){case Be.None:return"None";case Be.ByLayer:return"ByLayer";case Be.ByBlock:return"ByBlock";case Be.ByACI:return this._value!==void 0?String(this._value):"";case Be.ByColor:return this._value?"RGB:".concat(this.red,",").concat(this.green,",").concat(this.blue):"";default:return""}},r.fromString=function(e){if(e){var t=e.trim();if(/^none$/i.test(t))return new r(Be.None);if(/^bylayer$/i.test(t))return new r(Be.ByLayer);if(/^byblock$/i.test(t))return new r(Be.ByBlock);var n=t.match(/^rgb\s*:\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})$/i);if(n){var i=Number(n[1]),o=Number(n[2]),a=Number(n[3]),s=new r(Be.ByColor);return s.setRGB(i,o,a),s}if(/^\d{1,3},\d{1,3},\d{1,3}$/.test(t)){var l=Sre(t.split(",").map(Number),3),i=l[0],o=l[1],a=l[2],s=new r(Be.ByColor);return s.setRGB(i,o,a),s}if(/^\d+$/.test(t)){var c=parseInt(t,10);return new r(Be.ByACI,c)}if(/^book\$/i.test(t)){var u=t.substring(t.indexOf("$")+1),h=qi.getColorByName(u);if(h!=null)return new r(Be.ByColor,h);console.warn("Unknown color book entry:",e);return}var d=qi.getColorByName(t);if(d!=null)return new r(Be.ByColor,d);console.warn("Unknown color name:",e)}},r})()});var Wk,FU=W(()=>{aS();Wk=(function(){function r(e,t){e===void 0&&(e=Be.ByColor),t===void 0&&(t=0),this._colorMethod=e,this._value=t}return Object.defineProperty(r.prototype,"colorMethd",{get:function(){return this._colorMethod},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"red",{get:function(){return this._value>>16&255},set:function(e){this._colorMethod=Be.ByColor,this._value=this._value&65535|(e&255)<<16},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"green",{get:function(){return this._value>>8&255},set:function(e){this._colorMethod=Be.ByColor,this._value=this._value&16711935|(e&255)<<8},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blue",{get:function(){return this._value&255},set:function(e){this._colorMethod=Be.ByColor,this._value=this._value&16776960|e&255},enumerable:!1,configurable:!0}),r.prototype.setRGB=function(e,t,n){this._colorMethod=Be.ByColor,this._value=(e&255)<<16|(t&255)<<8|n&255},Object.defineProperty(r.prototype,"colorIndex",{get:function(){return this._value},set:function(e){this._colorMethod=Be.ByACI,this._value=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"layerIndex",{get:function(){return this._value},set:function(e){this._colorMethod=Be.ByLayer,this._value=e},enumerable:!1,configurable:!0}),r.prototype.isByColor=function(){return this._colorMethod===Be.ByColor},r.prototype.isByLayer=function(){return this._colorMethod===Be.ByLayer},r.prototype.isByBlock=function(){return this._colorMethod===Be.ByBlock},r.prototype.isByACI=function(){return this._colorMethod===Be.ByACI},r.prototype.isNone=function(){return this._colorMethod===Be.None},Object.defineProperty(r.prototype,"rawValue",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!1,configurable:!0}),r})()});var Qn,NU=W(()=>{Qn={get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")},get ZERO_DIVISION(){return new Error("Zero division")},get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")},get INFINITE_LOOP(){return new Error("Infinite loop")},get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")},get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")},get NOT_IMPLEMENTED(){return new Error("Not implemented yet")}}});var Xk,zU=W(()=>{Xk=(function(){function r(){this._listeners={}}return r.prototype.addEventListener=function(e,t){this._listeners===void 0&&(this._listeners={});var n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)},r.prototype.hasEventListener=function(e,t){if(this._listeners===void 0)return!1;var n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1},r.prototype.removeEventListener=function(e,t){if(this._listeners!==void 0){var n=this._listeners,i=n[e];if(i!==void 0){var o=i.indexOf(t);o!==-1&&i.splice(o,1)}}},r.prototype.dispatchEvent=function(e){if(this._listeners!==void 0){var t=this._listeners,n=t[e.type];if(n!==void 0){e.target=this;for(var i=n.slice(0),o=0,a=i.length;o<a;o++)i[o].call(this,e)}}},r})()});var Are,Mre,Pre,wt,Yk=W(()=>{Are=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mre=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Pre=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},wt=(function(){function r(){this.listeners=[]}return Object.defineProperty(r.prototype,"listenerCount",{get:function(){return this.listeners.length},enumerable:!1,configurable:!0}),r.prototype.addEventListener=function(e){this.listeners.push(e)},r.prototype.removeEventListener=function(e){this.listeners=this.listeners.filter(function(t){return t!==e})},r.prototype.replaceEventListener=function(e){this.removeEventListener(e),this.addEventListener(e)},r.prototype.dispatch=function(e){for(var t,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];try{for(var a=Are(this.listeners),s=a.next();!s.done;s=a.next()){var l=s.value,c=l;c.call.apply(c,Pre([null,e],Mre(i),!1))}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},r})()});function Yc(r){return r===null||typeof r!="object"?r:Array.isArray(r)?Cre([],Ere(r),!1):$k({},r)}function Xc(r){if(r===null||typeof r!="object")return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r.source,r.flags);if(Array.isArray(r))return r.map(Xc);var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=Xc(r[t]));return e}function er(r){for(var e,t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];try{for(var o=UU(n),a=o.next();!a.done;a=o.next()){var s=a.value;if(s)for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&r[l]===void 0&&(r[l]=s[l])}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return r}function qb(r,e){return r!=null&&Object.prototype.hasOwnProperty.call(r,e)}function Zb(r){return r==null?!0:Array.isArray(r)||typeof r=="string"?r.length===0:r instanceof Map||r instanceof Set?r.size===0:typeof r=="object"?Object.keys(r).length===0:!1}function is(r,e){var t,n;if(r===e)return!0;if(r==null||e==null)return r===e;if(typeof r!=typeof e)return!1;if(typeof r!="object")return r===e;if(Array.isArray(r)!==Array.isArray(e))return!1;if(Array.isArray(r)){if(r.length!==e.length)return!1;for(var i=0;i<r.length;i++)if(!is(r[i],e[i]))return!1;return!0}var o=Object.keys(r),a=Object.keys(e);if(o.length!==a.length)return!1;try{for(var s=UU(o),l=s.next();!l.done;l=s.next()){var c=l.value;if(!Object.prototype.hasOwnProperty.call(e,c)||!is(r[c],e[c]))return!1}}catch(u){t={error:u}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return!0}var $k,Ere,Cre,UU,Kk=W(()=>{$k=function(){return $k=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},$k.apply(this,arguments)},Ere=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Cre=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},UU=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});var VU=yre((jU,sS)=>{(function(r,e){"use strict";typeof define=="function"&&define.amd?define(e):typeof sS=="object"&&sS.exports?sS.exports=e():r.log=e()})(jU,function(){"use strict";var r=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function a(f,m){var g=f[m];if(typeof g.bind=="function")return g.bind(f);try{return Function.prototype.bind.call(g,f)}catch{return function(){return Function.prototype.apply.apply(g,[f,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(f){return f==="debug"&&(f="log"),typeof console===e?!1:f==="trace"&&t?s:console[f]!==void 0?a(console,f):console.log!==void 0?a(console,"log"):r}function c(){for(var f=this.getLevel(),m=0;m<n.length;m++){var g=n[m];this[g]=m<f?r:this.methodFactory(g,f,this.name)}if(this.log=this.debug,typeof console===e&&f<this.levels.SILENT)return"No console available for logging"}function u(f){return function(){typeof console!==e&&(c.call(this),this[f].apply(this,arguments))}}function h(f,m,g){return l(f)||u.apply(this,arguments)}function d(f,m){var g=this,y,b,v,x="loglevel";typeof f=="string"?x+=":"+f:typeof f=="symbol"&&(x=void 0);function w(M){var T=(n[M]||"silent").toUpperCase();if(!(typeof window===e||!x)){try{window.localStorage[x]=T;return}catch{}try{window.document.cookie=encodeURIComponent(x)+"="+T+";"}catch{}}}function _(){var M;if(!(typeof window===e||!x)){try{M=window.localStorage[x]}catch{}if(typeof M===e)try{var T=window.document.cookie,L=encodeURIComponent(x),O=T.indexOf(L+"=");O!==-1&&(M=/^([^;]+)/.exec(T.slice(O+L.length+1))[1])}catch{}return g.levels[M]===void 0&&(M=void 0),M}}function A(){if(!(typeof window===e||!x)){try{window.localStorage.removeItem(x)}catch{}try{window.document.cookie=encodeURIComponent(x)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function E(M){var T=M;if(typeof T=="string"&&g.levels[T.toUpperCase()]!==void 0&&(T=g.levels[T.toUpperCase()]),typeof T=="number"&&T>=0&&T<=g.levels.SILENT)return T;throw new TypeError("log.setLevel() called with invalid level: "+M)}g.name=f,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=m||h,g.getLevel=function(){return v??b??y},g.setLevel=function(M,T){return v=E(M),T!==!1&&w(v),c.call(g)},g.setDefaultLevel=function(M){b=E(M),_()||g.setLevel(M,!1)},g.resetLevel=function(){v=null,A(),c.call(g)},g.enableAll=function(M){g.setLevel(g.levels.TRACE,M)},g.disableAll=function(M){g.setLevel(g.levels.SILENT,M)},g.rebuild=function(){if(o!==g&&(y=E(o.getLevel())),c.call(g),o===g)for(var M in i)i[M].rebuild()},y=E(o?o.getLevel():"WARN");var S=_();S!=null&&(v=E(S)),c.call(g)}o=new d,o.getLogger=function(m){if(typeof m!="symbol"&&typeof m!="string"||m==="")throw new TypeError("You must supply a name when creating a logger.");var g=i[m];return g||(g=i[m]=new d(m,o.methodFactory)),g};var p=typeof window!==e?window.log:void 0;return o.noConflict=function(){return typeof window!==e&&window.log===o&&(window.log=p),o},o.getLoggers=function(){return i},o.default=o,o})});var GU,lS,kt,qk,HU=W(()=>{GU=xre(VU(),1),lS=!1,kt=GU.default.getLogger("mlightcad");kt.setDefaultLevel(lS?"debug":"warn");qk=function(r){try{kt.setLevel(r,!1)}catch(e){kt.setLevel("error",!1),kt.error(e)}}});var pm,WU=W(()=>{Yk();Kk();pm=(function(){function r(e,t){this._changing=!1,this._pending=!1;var n=e||{};t&&er(n,t),this.attributes=n}return Object.defineProperty(r.prototype,"events",{get:function(){var e;return(e=this._events)!==null&&e!==void 0?e:this._events={attrChanged:new wt,modelChanged:new wt}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"changed",{get:function(){var e;return(e=this._changed)!==null&&e!==void 0?e:this._changed={}},enumerable:!1,configurable:!0}),r.prototype.get=function(e){return this.attributes[e]},r.prototype.set=function(e,t,n){var i,o,a,s;if(e==null)return this;var l;typeof e=="object"?(l=e,n=t):(l={},l[e]=t),n||(n={});var c=n.unset,u=n.silent,h=this._events;if(!c&&!this._changing&&(h===void 0||h.attrChanged.listenerCount===0&&h.modelChanged.listenerCount===0)){if(typeof e=="object"){var d=e;for(var p in d)this.attributes[p]=d[p]}else this.attributes[e]=t;return this}if(!c){var f=!0;for(var p in l)if(this.attributes[p]!==l[p]){f=!1;break}if(f)return this._changing||(this._previousAttributes=Yc(this.attributes),this._changed={}),this}var m=null,g=this._changing;this._changing=!0,g||(this._previousAttributes=Yc(this.attributes),this._changed={});var y=this.attributes,b=(i=this._changed)!==null&&i!==void 0?i:this._changed={},v=(o=this._previousAttributes)!==null&&o!==void 0?o:{};for(var p in l){if(t=l[p],!c&&y[p]===t){v[p]===t||is(v[p],t)?delete b[p]:b[p]=t;continue}is(y[p],t)||(m||(m=[])).push(p),is(v[p],t)?delete b[p]:b[p]=t,c?delete y[p]:y[p]=t}if(!u&&(m&&(this._pending=n),m))for(var x=0;x<m.length;x++)(a=this._events)===null||a===void 0||a.attrChanged.dispatch({object:this,attrName:m[x],attrValue:y[m[x]],options:n});if(g)return this;if(!u)for(;this._pending;)n=this._pending,this._pending=!1,(s=this._events)===null||s===void 0||s.modelChanged.dispatch({object:this,options:n});return this._pending=!1,this._changing=!1,this},r.prototype.has=function(e){return this.get(e)!=null},r.prototype.hasChanged=function(e){return e==null?!Zb(this._changed):this._changed?qb(this._changed,e):!1},r.prototype.changedAttributes=function(e){var t;if(!e)return this.hasChanged()?Yc((t=this._changed)!==null&&t!==void 0?t:{}):{};var n=this._changing?this._previousAttributes:this.attributes,i={};for(var o in e){var a=e[o];is(n?.[o],a)||(i[o]=a)}return i},r.prototype.previous=function(e){var t;return e==null?null:(t=this._previousAttributes)===null||t===void 0?void 0:t[e]},r.prototype.previousAttributes=function(){var e;return Yc((e=this._previousAttributes)!==null&&e!==void 0?e:{})},r.prototype.clone=function(){var e=Yc(this.attributes);return new r(e)},r})()});var Tre,kre,$c,XU=W(()=>{Tre=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kre=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},$c=(function(){function r(){this.entries=new Map}return r.getInstance=function(){return r.instance||(r.instance=new r),r.instance},r.prototype.collect=function(e){this.entries.set(e.name,e)},r.prototype.printAll=function(){var e,t;try{for(var n=Tre(this.entries),i=n.next();!i.done;i=n.next()){var o=kre(i.value,2),a=o[0],s=o[1];console.log("".concat(a,":")),console.log(s.format())}}catch(l){e={error:l}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},r.prototype.clear=function(){this.entries.clear()},r.prototype.getAll=function(){return Array.from(this.entries.values())},r.prototype.getEntry=function(e){return this.entries.get(e)},r.prototype.remove=function(e){return this.entries.delete(e)},r})()});var Zk,YU=W(()=>{Zk=(function(){function r(){}return r.formatBytes=function(e,t){if(t===void 0&&(t=2),e===0)return"0 B";var n=1024,i=Math.max(0,t),o=["B","KB","MB","GB","TB"],a=Math.floor(Math.log(e)/Math.log(n)),s=e/Math.pow(n,a);return"".concat(parseFloat(s.toFixed(i))," ").concat(o[a])},r})()});var Pr,Jk=W(()=>{(function(r){r[r.ByLayer=0]="ByLayer",r[r.ByBlock=1]="ByBlock",r[r.ByAlpha=2]="ByAlpha",r[r.ErrorValue=3]="ErrorValue"})(Pr||(Pr={}))});var Mn,$U=W(()=>{Jk();Mn=(function(){function r(e){e!==void 0?(this._method=Pr.ByAlpha,this._alpha=r.clampAlpha(e)):(this._method=Pr.ByLayer,this._alpha=255)}return Object.defineProperty(r.prototype,"method",{get:function(){return this._method},set:function(e){this._method=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"alpha",{get:function(){return this._alpha},set:function(e){this._alpha=r.clampAlpha(e),this._method=Pr.ByAlpha},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"percentage",{get:function(){if(this._method===Pr.ByAlpha)return Math.round((1-this._alpha/255)*100)},set:function(e){var t=Math.max(0,Math.min(100,e)),n=Math.round(255*(1-t/100));this.alpha=n},enumerable:!1,configurable:!0}),r.clampAlpha=function(e){return Math.max(0,Math.min(255,Math.floor(e)))},Object.defineProperty(r.prototype,"isByAlpha",{get:function(){return this._method===Pr.ByAlpha},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isByBlock",{get:function(){return this._method===Pr.ByBlock},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isByLayer",{get:function(){return this._method===Pr.ByLayer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isClear",{get:function(){return this.isByAlpha&&this._alpha===0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isSolid",{get:function(){return this.isByAlpha&&this._alpha===255},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isInvalid",{get:function(){return this._method===Pr.ErrorValue},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){var e=this._method;return e<<24|this._alpha},r.prototype.clone=function(){var e=new r;return e._method=this._method,e._alpha=this._alpha,e},r.prototype.equals=function(e){return this._method===e._method&&this._alpha===e._alpha},r.prototype.toString=function(){return this.isByLayer?"ByLayer":this.isByBlock?"ByBlock":this._alpha.toString()},r.fromString=function(e){var t=e.trim(),n=t.toLowerCase();if(n===""||n==="."||n==="use current"||n==="bylayer"){var i=new r;return i._method=Pr.ByLayer,i}if(n==="byblock"){var o=new r;return o._method=Pr.ByBlock,o}var a=Number(t);if(Number.isInteger(a)&&a>=0&&a<=255){var s=new r;return a<=90?s.percentage=a:s.alpha=a,s}var l=new r;return l._method=Pr.ErrorValue,l},r.deserialize=function(e){var t=e>>>24&255,n=e&255,i=t>=Pr.ByLayer&&t<=Pr.ErrorValue?t:Pr.ErrorValue,o=new r;return o._method=i,o._alpha=r.clampAlpha(n),o},r})()});function os(){return new Promise(function(r){typeof globalThis<"u"&&typeof globalThis.requestAnimationFrame=="function"?globalThis.requestAnimationFrame(function(){return r()}):setTimeout(r,0)})}function zl(){return new Promise(function(r){if(typeof globalThis<"u"&&typeof globalThis.requestAnimationFrame=="function"){var e=globalThis.requestAnimationFrame;e(function(){return e(function(){return r()})})}else setTimeout(r,0)})}var Ire,Lre,Kc,$s,Qk=W(()=>{Ire=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},Lre=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Kc=50;$s=(function(){function r(e){e===void 0&&(e=Kc),this._budgetMs=e,this._lastYieldCompletedAt=r.now()}return Object.defineProperty(r.prototype,"budgetMs",{get:function(){return this._budgetMs},enumerable:!1,configurable:!0}),r.prototype.maybeYield=function(){return Ire(this,arguments,void 0,function(e){var t;return e===void 0&&(e=os),Lre(this,function(n){switch(n.label){case 0:return t=r.now(),t-this._lastYieldCompletedAt<this._budgetMs?[2,!1]:[4,e()];case 1:return n.sent(),this._lastYieldCompletedAt=r.now(),[2,!0]}})})},r.prototype.mark=function(){this._lastYieldCompletedAt=r.now()},r.now=function(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()},r})()});var eI,cS,Jb,Qb,KU=W(()=>{Qk();eI=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},cS=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Jb=(function(){function r(e){this.name=e}return r.prototype.run=function(e){throw new Error("run() must be implemented by subclass")},r})(),Qb=(function(){function r(){this.tasks=[],this.onProgress=function(){},this.onComplete=function(){},this.onError=function(){return!1}}return r.prototype.scheduleTask=function(e){return eI(this,void 0,void 0,function(){return cS(this,function(t){switch(t.label){case 0:return[4,os()];case 1:return t.sent(),[2,e()]}})})},r.prototype.addTask=function(e){this.tasks.push(e)},r.prototype.setProgressCallback=function(e){this.onProgress=e},r.prototype.setCompleteCallback=function(e){this.onComplete=e},r.prototype.setErrorCallback=function(e){this.onError=e},r.prototype.run=function(e){return eI(this,void 0,void 0,function(){var t,n,i,o,a,s,l=this;return cS(this,function(c){switch(c.label){case 0:t=this.tasks.length,n=e,i=function(u){var h,d,p;return cS(this,function(f){switch(f.label){case 0:h=o.tasks[u],f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o.scheduleTask(function(){return eI(l,void 0,void 0,function(){var m;return cS(this,function(g){switch(g.label){case 0:return[4,h.run(n)];case 1:return m=g.sent(),this.onProgress((u+1)/t,h),[2,m]}})})})];case 2:return n=f.sent(),[3,4];case 3:return d=f.sent(),p=o.onError({error:d,taskIndex:u,task:h}),p?[2,{value:Promise.reject(d)}]:[3,4];case 4:return[2]}})},o=this,a=0,c.label=1;case 1:return a<t?[5,i(a)]:[3,4];case 2:if(s=c.sent(),typeof s=="object")return[2,s.value];c.label=3;case 3:return a++,[3,1];case 4:return this.onComplete(n),[2]}})})},r})()});var ev,fm,tI=W(()=>{ev=(function(){function r(e,t,n){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n}return r.prototype.itemStart=function(e){this.itemsTotal++,this.isLoading===!1&&this.onStart!==void 0&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0},r.prototype.itemEnd=function(e){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())},r.prototype.itemError=function(e){this.onError!==void 0&&this.onError(e)},r.prototype.resolveURL=function(e){return this.urlModifier?this.urlModifier(e):e},r.prototype.setURLModifier=function(e){return this.urlModifier=e,this},r.prototype.addHandler=function(e,t){return this.handlers.push(e,t),this},r.prototype.removeHandler=function(e){var t=this.handlers.indexOf(e);return t!==-1&&this.handlers.splice(t,2),this},r.prototype.getHandler=function(e){for(var t=0,n=this.handlers.length;t<n;t+=2){var i=this.handlers[t],o=this.handlers[t+1];if(i.global&&(i.lastIndex=0),i.test(e))return o}return null},r})(),fm=new ev});var uS,qU=W(()=>{tI();uS=(function(){function r(e){this.manager=e!==void 0?e:fm,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}return r.prototype.loadAsync=function(e,t){var n=this;return new Promise(function(i,o){n.load(e,i,t,o)})},r.prototype.parse=function(e){},r.prototype.setCrossOrigin=function(e){return this.crossOrigin=e,this},r.prototype.setWithCredentials=function(e){return this.withCredentials=e,this},r.prototype.setPath=function(e){return this.path=e,this},r.prototype.setResourcePath=function(e){return this.resourcePath=e,this},r.prototype.setRequestHeader=function(e){return this.requestHeader=e,this},r})()});var ZU=W(()=>{tI();qU()});var zt=W(()=>{BU();aS();Hk();FU();NU();zU();Yk();Kk();HU();WU();XU();YU();$U();Jk();KU();Qk();ZU()});function tv(){var r=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Zi[r&255]+Zi[r>>8&255]+Zi[r>>16&255]+Zi[r>>24&255]+"-"+Zi[e&255]+Zi[e>>8&255]+"-"+Zi[e>>16&15|64]+Zi[e>>24&255]+"-"+Zi[t&63|128]+Zi[t>>8&255]+"-"+Zi[t>>16&255]+Zi[t>>24&255]+Zi[n&255]+Zi[n>>8&255]+Zi[n>>16&255]+Zi[n>>24&255];return i.toLowerCase()}function ti(r,e,t){return Math.max(e,Math.min(t,r))}function ym(r,e){return(r%e+e)%e}function nv(r,e,t,n,i){return n+(r-e)*(i-n)/(t-e)}function rv(r,e,t){return r!==e?(t-r)/(e-r):0}function bm(r,e,t){return(1-t)*r+t*e}function iv(r,e,t,n){return bm(r,e,1-Math.exp(-t*n))}function ov(r,e){return e===void 0&&(e=1),e-Math.abs(ym(r,e*2)-e)}function av(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function sv(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function lv(r,e){return r+Math.floor(Math.random()*(e-r+1))}function cv(r,e){return r+Math.random()*(e-r)}function uv(r){return r*(.5-Math.random())}function hv(r){r!==void 0&&(JU=r);var e=JU+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function dv(r){return r*mm}function pv(r){return r*gm}function fv(r){return(r&r-1)===0&&r!==0}function mv(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function gv(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function Ul(r){var e=Math.PI*2;return(r%e+e)%e}function yv(r,e,t){return r>e&&r<t||r>t&&r<e}function bv(r,e,t,n){return n===void 0&&(n=!1),r=Ul(r),e=Ul(e),t=Ul(t),n?e>t?r<=e&&r>=t:r<=e||r>=t:e<t?r>=e&&r<=t:r>=e||r<=t}function vv(r,e,t){var n=Ul(t-r),i=Ul(e-r);return i<=n+1e-7}function vm(r){return r=Math.abs(r),r<1?0:Math.ceil(Math.log10(Math.abs(r)+1))}function xv(r,e){e===void 0&&(e=1e-7);var t=vm(r);return Math.max(Math.pow(10,t)*e,e)}var Zi,JU,mm,gm,xe,xm=W(()=>{Zi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],JU=1234567,mm=Math.PI/180,gm=180/Math.PI;xe={DEG2RAD:mm,RAD2DEG:gm,generateUUID:tv,clamp:ti,euclideanModulo:ym,mapLinear:nv,inverseLerp:rv,lerp:bm,damp:iv,pingpong:ov,smoothstep:av,smootherstep:sv,randInt:lv,randFloat:cv,randFloatSpread:uv,seededRandom:hv,degToRad:dv,radToDeg:pv,isPowerOfTwo:fv,ceilPowerOfTwo:mv,floorPowerOfTwo:gv,normalizeAngle:Ul,isBetween:yv,isBetweenAngle:bv,isAngleOnCcwSweep:vv,intPartLength:vm,relativeEps:xv}});var Ore,Ut,wv=W(()=>{zt();xm();Ore=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Ut=(function(){function r(e,t){this.x=0,this.y=0;var n=+(e!==void 0)+ +(t!==void 0);if(n!==0){if(n===1&&e instanceof Array){this.x=e[0],this.y=e[1];return}if(n===1){var i=e,o=i.x,a=i.y;this.x=o,this.y=a;return}if(n===2){this.x=e,this.y=t;return}throw Qn.ILLEGAL_PARAMETERS}}return Object.defineProperty(r.prototype,"width",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!0}),r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.setScalar=function(e){return this.x=e,this.y=e,this},r.prototype.setX=function(e){return this.x=e,this},r.prototype.setY=function(e){return this.y=e,this},r.prototype.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},r.prototype.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.addScalar=function(e){return this.x+=e,this.y+=e,this},r.prototype.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},r.prototype.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.subScalar=function(e){return this.x-=e,this.y-=e,this},r.prototype.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},r.prototype.multiply=function(e){return this.x*=e.x,this.y*=e.y,this},r.prototype.multiplyScalar=function(e){return this.x*=e,this.y*=e,this},r.prototype.divide=function(e){return this.x/=e.x,this.y/=e.y,this},r.prototype.divideScalar=function(e){return this.multiplyScalar(1/e)},r.prototype.applyMatrix2d=function(e){var t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this},r.prototype.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},r.prototype.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},r.prototype.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},r.prototype.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},r.prototype.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},r.prototype.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},r.prototype.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},r.prototype.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},r.prototype.roundToZero=function(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.cross=function(e){return this.x*e.y-this.y*e.x},r.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y},r.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)},r.prototype.normalize=function(){return this.divideScalar(this.length()||1)},r.prototype.angle=function(){var e=Math.atan2(-this.y,-this.x)+Math.PI;return e},r.prototype.angleTo=function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(Math.max(-1,Math.min(1,n)))},r.prototype.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},r.prototype.distanceToSquared=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},r.prototype.setLength=function(e){return this.normalize().multiplyScalar(e)},r.prototype.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},r.prototype.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this},r.prototype.equals=function(e){return e.x===this.x&&e.y===this.y},r.prototype.fromArray=function(e,t){return t===void 0&&(t=0),this.x=e[t],this.y=e[t+1],this},r.prototype.toArray=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=0),e[t]=this.x,e[t+1]=this.y,e},r.prototype.rotateAround=function(e,t){var n=Math.cos(t),i=Math.sin(t),o=this.x-e.x,a=this.y-e.y;return this.x=o*n-a*i+e.x,this.y=o*i+a*n+e.y,this},r.prototype.random=function(){return this.x=Math.random(),this.y=Math.random(),this},r.prototype.relativeEps=function(e){return e===void 0&&(e=1e-7),Math.min(xe.relativeEps(this.x,e),xe.relativeEps(this.y,e))},r.prototype[Symbol.iterator]=function(){return Ore(this,function(e){switch(e.label){case 0:return[4,this.x];case 1:return e.sent(),[4,this.y];case 2:return e.sent(),[2]}})},r.EMPTY=Object.freeze(new r(0,0)),r})()});var Ks,nI,rI=W(()=>{wv();Ks=(function(){function r(e,t,n,i,o,a,s,l,c){this.elements=[1,0,0,0,1,0,0,0,1],e!=null&&t!=null&&n!=null&&i!=null&&o!=null&&a!=null&&s!=null&&l!=null&&c!=null&&this.set(e,t,n,i,o,a,s,l,c)}return r.prototype.set=function(e,t,n,i,o,a,s,l,c){var u=this.elements;return u[0]=e,u[1]=i,u[2]=s,u[3]=t,u[4]=o,u[5]=l,u[6]=n,u[7]=a,u[8]=c,this},r.prototype.identity=function(){return this.set(1,0,0,0,1,0,0,0,1),this},r.prototype.copy=function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},r.prototype.extractBasis=function(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this},r.prototype.setFromMatrix4=function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},r.prototype.multiply=function(e){return this.multiplyMatrices(this,e)},r.prototype.premultiply=function(e){return this.multiplyMatrices(e,this)},r.prototype.multiplyMatrices=function(e,t){var n=e.elements,i=t.elements,o=this.elements,a=n[0],s=n[3],l=n[6],c=n[1],u=n[4],h=n[7],d=n[2],p=n[5],f=n[8],m=i[0],g=i[3],y=i[6],b=i[1],v=i[4],x=i[7],w=i[2],_=i[5],A=i[8];return o[0]=a*m+s*b+l*w,o[3]=a*g+s*v+l*_,o[6]=a*y+s*x+l*A,o[1]=c*m+u*b+h*w,o[4]=c*g+u*v+h*_,o[7]=c*y+u*x+h*A,o[2]=d*m+p*b+f*w,o[5]=d*g+p*v+f*_,o[8]=d*y+p*x+f*A,this},r.prototype.multiplyScalar=function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},r.prototype.determinant=function(){var e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8];return t*a*u-t*s*c-n*o*u+n*s*l+i*o*c-i*a*l},r.prototype.invert=function(){var e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=u*a-s*c,d=s*l-u*o,p=c*o-a*l,f=t*h+n*d+i*p;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);var m=1/f;return e[0]=h*m,e[1]=(i*c-u*n)*m,e[2]=(s*n-i*a)*m,e[3]=d*m,e[4]=(u*t-i*l)*m,e[5]=(i*o-s*t)*m,e[6]=p*m,e[7]=(n*l-c*t)*m,e[8]=(a*t-n*o)*m,this},r.prototype.transpose=function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},r.prototype.getNormalMatrix=function(e){return this.setFromMatrix4(e).invert().transpose()},r.prototype.transposeIntoArray=function(e){var t=this.elements;return e.elements[0]=t[0],e.elements[1]=t[3],e.elements[2]=t[6],e.elements[3]=t[1],e.elements[4]=t[4],e.elements[5]=t[7],e.elements[6]=t[2],e.elements[7]=t[5],e.elements[8]=t[8],this},r.prototype.setUvTransform=function(e,t,n,i,o,a,s){var l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+e,-i*c,i*l,-i*(-c*a+l*s)+s+t,0,0,1),this},r.prototype.scale=function(e,t){return this.premultiply(nI.makeScale(e,t)),this},r.prototype.rotate=function(e){return this.premultiply(nI.makeRotation(-e)),this},r.prototype.translate=function(e,t){return this.premultiply(nI.makeTranslation(e,t)),this},r.prototype.makeTranslation=function(e,t){return e instanceof Ut?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this},r.prototype.makeRotation=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this},r.prototype.makeScale=function(e,t){return this.set(e,0,0,0,t,0,0,0,1),this},r.prototype.equals=function(e){for(var t=this.elements,n=e.elements,i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0},r.prototype.fromArray=function(e,t){t===void 0&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},r.prototype.toArray=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e},r.prototype.clone=function(){return new r().fromArray(this.elements)},r.IDENTITY=Object.freeze(new r),r})(),nI=new Ks});var Pt,Ge,hS,hh,iI=W(()=>{Pt=1e-6,Ge=2*Math.PI,hS={x:0,y:0},hh={x:0,y:0,z:0}});var Ce,Ji,Vd=W(()=>{Yr();iI();Ce=(function(){function r(){this.equalPointTol=Pt,this.equalVectorTol=Pt}return r.prototype.clone=function(){var e=new r;return e.equalPointTol=this.equalPointTol,e.equalVectorTol=this.equalVectorTol,e},r.prototype.equalPoint2d=function(e,t){return new Ut(e).sub(t).length()<this.equalPointTol},r.prototype.equalPoint3d=function(e,t){return new G(e).sub(t).length()<this.equalPointTol},r.equalToZero=function(e,t){return t===void 0&&(t=Pt),e<t&&e>-t},r.equal=function(e,t,n){return n===void 0&&(n=Pt),Math.abs(e-t)<n},r.great=function(e,t,n){return n===void 0&&(n=Pt),e-t>n},r.less=function(e,t,n){return n===void 0&&(n=Pt),e-t<n},r.isPositive=function(e,t){return t===void 0&&(t=Pt),e>t},r.isNonPositive=function(e,t){return t===void 0&&(t=Pt),e<=t},r})(),Ji=new Ce});var Dre,Ma,dS=W(()=>{xm();Dre=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Ma=(function(){function r(e,t,n,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=1),this._x=e,this._y=t,this._z=n,this._w=i}return r.slerpFlat=function(e,t,n,i,o,a,s){var l=n[i+0],c=n[i+1],u=n[i+2],h=n[i+3],d=o[a+0],p=o[a+1],f=o[a+2],m=o[a+3];if(s===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h;return}if(s===1){e[t+0]=d,e[t+1]=p,e[t+2]=f,e[t+3]=m;return}if(h!==m||l!==d||c!==p||u!==f){var g=1-s,y=l*d+c*p+u*f+h*m,b=y>=0?1:-1,v=1-y*y;if(v>Number.EPSILON){var x=Math.sqrt(v),w=Math.atan2(x,y*b);g=Math.sin(g*w)/x,s=Math.sin(s*w)/x}var _=s*b;if(l=l*g+d*_,c=c*g+p*_,u=u*g+f*_,h=h*g+m*_,g===1-s){var A=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=A,c*=A,u*=A,h*=A}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h},r.multiplyQuaternionsFlat=function(e,t,n,i,o,a){var s=n[i],l=n[i+1],c=n[i+2],u=n[i+3],h=o[a],d=o[a+1],p=o[a+2],f=o[a+3];return e[t]=s*f+u*h+l*p-c*d,e[t+1]=l*f+u*d+c*h-s*p,e[t+2]=c*f+u*p+s*d-l*h,e[t+3]=u*f-s*h-l*d-c*p,e},Object.defineProperty(r.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"w",{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),r.prototype.set=function(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this},r.prototype.clone=function(){return new r(this._x,this._y,this._z,this._w)},r.prototype.copy=function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},r.prototype.setFromEuler=function(e,t){t===void 0&&(t=!0);var n=e.x,i=e.y,o=e.z,a=e.order,s=Math.cos,l=Math.sin,c=s(n/2),u=s(i/2),h=s(o/2),d=l(n/2),p=l(i/2),f=l(o/2);switch(a){case"XYZ":this._x=d*u*h+c*p*f,this._y=c*p*h-d*u*f,this._z=c*u*f+d*p*h,this._w=c*u*h-d*p*f;break;case"YXZ":this._x=d*u*h+c*p*f,this._y=c*p*h-d*u*f,this._z=c*u*f-d*p*h,this._w=c*u*h+d*p*f;break;case"ZXY":this._x=d*u*h-c*p*f,this._y=c*p*h+d*u*f,this._z=c*u*f+d*p*h,this._w=c*u*h-d*p*f;break;case"ZYX":this._x=d*u*h-c*p*f,this._y=c*p*h+d*u*f,this._z=c*u*f-d*p*h,this._w=c*u*h+d*p*f;break;case"YZX":this._x=d*u*h+c*p*f,this._y=c*p*h+d*u*f,this._z=c*u*f-d*p*h,this._w=c*u*h-d*p*f;break;case"XZY":this._x=d*u*h-c*p*f,this._y=c*p*h-d*u*f,this._z=c*u*f+d*p*h,this._w=c*u*h+d*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this},r.prototype.setFromAxisAngle=function(e,t){var n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this},r.prototype.setFromRotationMatrix=function(e){var t=e.elements,n=t[0],i=t[4],o=t[8],a=t[1],s=t[5],l=t[9],c=t[2],u=t[6],h=t[10],d=n+s+h;if(d>0){var p=.5/Math.sqrt(d+1);this._w=.25/p,this._x=(u-l)*p,this._y=(o-c)*p,this._z=(a-i)*p}else if(n>s&&n>h){var p=2*Math.sqrt(1+n-s-h);this._w=(u-l)/p,this._x=.25*p,this._y=(i+a)/p,this._z=(o+c)/p}else if(s>h){var p=2*Math.sqrt(1+s-n-h);this._w=(o-c)/p,this._x=(i+a)/p,this._y=.25*p,this._z=(l+u)/p}else{var p=2*Math.sqrt(1+h-n-s);this._w=(a-i)/p,this._x=(o+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this},r.prototype.setFromUnitVectors=function(e,t){var n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()},r.prototype.angleTo=function(e){return 2*Math.acos(Math.abs(ti(this.dot(e),-1,1)))},r.prototype.rotateTowards=function(e,t){var n=this.angleTo(e);if(n===0)return this;var i=Math.min(1,t/n);return this.slerp(e,i),this},r.prototype.identity=function(){return this.set(0,0,0,1)},r.prototype.invert=function(){return this.conjugate()},r.prototype.conjugate=function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},r.prototype.dot=function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},r.prototype.lengthSq=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},r.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},r.prototype.normalize=function(){var e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},r.prototype.multiply=function(e){return this.multiplyQuaternions(this,e)},r.prototype.premultiply=function(e){return this.multiplyQuaternions(e,this)},r.prototype.multiplyQuaternions=function(e,t){var n=e._x,i=e._y,o=e._z,a=e._w,s=t._x,l=t._y,c=t._z,u=t._w;return this._x=n*u+a*s+i*c-o*l,this._y=i*u+a*l+o*s-n*c,this._z=o*u+a*c+n*l-i*s,this._w=a*u-n*s-i*l-o*c,this._onChangeCallback(),this},r.prototype.slerp=function(e,t){if(t===0)return this;if(t===1)return this.copy(e);var n=this._x,i=this._y,o=this._z,a=this._w,s=a*e._w+n*e._x+i*e._y+o*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=n,this._y=i,this._z=o,this;var l=1-s*s;if(l<=Number.EPSILON){var c=1-t;return this._w=c*a+t*this._w,this._x=c*n+t*this._x,this._y=c*i+t*this._y,this._z=c*o+t*this._z,this.normalize(),this}var u=Math.sqrt(l),h=Math.atan2(u,s),d=Math.sin((1-t)*h)/u,p=Math.sin(t*h)/u;return this._w=a*d+this._w*p,this._x=n*d+this._x*p,this._y=i*d+this._y*p,this._z=o*d+this._z*p,this._onChangeCallback(),this},r.prototype.slerpQuaternions=function(e,t,n){return this.copy(e).slerp(t,n)},r.prototype.random=function(){var e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),o*Math.sin(t),o*Math.cos(t))},r.prototype.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},r.prototype.fromArray=function(e,t){return t===void 0&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},r.prototype.toArray=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},r.prototype.toJSON=function(){return this.toArray()},r.prototype._onChange=function(e){return this._onChangeCallback=e,this},r.prototype._onChangeCallback=function(){},r.prototype[Symbol.iterator]=function(){return Dre(this,function(e){switch(e.label){case 0:return[4,this._x];case 1:return e.sent(),[4,this._y];case 2:return e.sent(),[4,this._z];case 3:return e.sent(),[4,this._w];case 4:return e.sent(),[2]}})},r})()});var Rre,G,oI,QU,Gd=W(()=>{zt();dS();Rre=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},G=(function(){function r(e,t,n){this.x=0,this.y=0,this.z=0;var i=+(e!==void 0)+ +(t!==void 0)+ +(n!==void 0);if(i!==0){if(i===1&&e instanceof Array){this.x=e[0],this.y=e[1],this.z=e[2];return}if(i===1){var o=e,a=o.x,s=o.y,l=o.z;this.x=a,this.y=s,this.z=l||0;return}if(i===3){this.x=e,this.y=t,this.z=n;return}throw Qn.ILLEGAL_PARAMETERS}}return r.prototype.set=function(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this},r.prototype.setScalar=function(e){return this.x=e,this.y=e,this.z=e,this},r.prototype.setX=function(e){return this.x=e,this},r.prototype.setY=function(e){return this.y=e,this},r.prototype.setZ=function(e){return this.z=e,this},r.prototype.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},r.prototype.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},r.prototype.clone=function(){return new r(this.x,this.y,this.z)},r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this.z=e.z||0,this},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z||0,this},r.prototype.addScalar=function(e){return this.x+=e,this.y+=e,this.z+=e,this},r.prototype.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},r.prototype.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this},r.prototype.subScalar=function(e){return this.x-=e,this.y-=e,this.z-=e,this},r.prototype.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},r.prototype.multiply=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this},r.prototype.multiplyScalar=function(e){return this.x*=e,this.y*=e,this.z*=e,this},r.prototype.multiplyVectors=function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},r.prototype.applyEuler=function(e){return this.applyQuaternion(QU.setFromEuler(e))},r.prototype.applyAxisAngle=function(e,t){return this.applyQuaternion(QU.setFromAxisAngle(e,t))},r.prototype.applyMatrix3=function(e){var t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*i,this.y=o[1]*t+o[4]*n+o[7]*i,this.z=o[2]*t+o[5]*n+o[8]*i,this},r.prototype.applyNormalMatrix=function(e){return this.applyMatrix3(e).normalize()},r.prototype.applyMatrix4=function(e){var t=this.x,n=this.y,i=this.z,o=e.elements,a=1/(o[3]*t+o[7]*n+o[11]*i+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*i+o[12])*a,this.y=(o[1]*t+o[5]*n+o[9]*i+o[13])*a,this.z=(o[2]*t+o[6]*n+o[10]*i+o[14])*a,this},r.prototype.applyQuaternion=function(e){var t=this.x,n=this.y,i=this.z,o=e.x,a=e.y,s=e.z,l=e.w,c=2*(a*i-s*n),u=2*(s*t-o*i),h=2*(o*n-a*t);return this.x=t+l*c+a*h-s*u,this.y=n+l*u+s*c-o*h,this.z=i+l*h+o*u-a*c,this},r.prototype.transformDirection=function(e){var t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i,this.y=o[1]*t+o[5]*n+o[9]*i,this.z=o[2]*t+o[6]*n+o[10]*i,this.normalize()},r.prototype.divide=function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},r.prototype.divideScalar=function(e){return this.multiplyScalar(1/e)},r.prototype.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},r.prototype.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},r.prototype.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},r.prototype.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},r.prototype.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},r.prototype.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},r.prototype.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},r.prototype.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},r.prototype.roundToZero=function(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z},r.prototype.isParallelTo=function(e){var t=this.dot(e),n=this.length(),i=e.length();return Math.abs(t)===n*i},r.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y+this.z*this.z},r.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},r.prototype.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},r.prototype.normalize=function(){return this.divideScalar(this.length()||1)},r.prototype.setLength=function(e){return this.normalize().multiplyScalar(e)},r.prototype.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},r.prototype.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this},r.prototype.cross=function(e){return this.crossVectors(this,e)},r.prototype.crossVectors=function(e,t){var n=e.x,i=e.y,o=e.z,a=t.x,s=t.y,l=t.z;return this.x=i*l-o*s,this.y=o*a-n*l,this.z=n*s-i*a,this},r.prototype.projectOnVector=function(e){var t=e.lengthSq();if(t===0)return this.set(0,0,0);var n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)},r.prototype.projectOnPlane=function(e){return oI.copy(this).projectOnVector(e),this.sub(oI)},r.prototype.reflect=function(e){return this.sub(oI.copy(e).multiplyScalar(2*this.dot(e)))},r.prototype.angleTo=function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(Math.max(-1,Math.min(1,n)))},r.prototype.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},r.prototype.distanceToSquared=function(e){var t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i},r.prototype.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},r.prototype.setFromMatrixPosition=function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},r.prototype.setFromMatrixScale=function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this},r.prototype.setFromMatrixColumn=function(e,t){return this.fromArray(e.elements,t*4)},r.prototype.setFromMatrix3Column=function(e,t){return this.fromArray(e.elements,t*3)},r.prototype.equals=function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},r.prototype.fromArray=function(e,t){return t===void 0&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},r.prototype.toArray=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},r.prototype.random=function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this},r.prototype.randomDirection=function(){var e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this},r.prototype[Symbol.iterator]=function(){return Rre(this,function(e){switch(e.label){case 0:return[4,this.x];case 1:return e.sent(),[4,this.y];case 2:return e.sent(),[4,this.z];case 3:return e.sent(),[2]}})},r.ORIGIN=Object.freeze(new r(0,0,0)),r.X_AXIS=Object.freeze(new r(1,0,0)),r.NEGATIVE_X_AXIS=Object.freeze(new r(-1,0,0)),r.Y_AXIS=Object.freeze(new r(0,1,0)),r.NEGATIVE_Y_AXIS=Object.freeze(new r(0,-1,0)),r.Z_AXIS=Object.freeze(new r(0,0,1)),r.NEGATIVE_Z_AXIS=Object.freeze(new r(0,0,-1)),r})(),oI=new G,QU=new Ma});var Ie,wm,qs,Bre,Fre,dh,pS,Pa,fS=W(()=>{Vd();Gd();Ie=(function(){function r(e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!=null&&t!=null&&n!=null&&i!=null&&o!=null&&a!=null&&s!=null&&l!=null&&c!=null&&u!=null&&h!=null&&d!=null&&p!=null&&f!=null&&m!=null&&g!=null&&this.set(e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g)}return r.makeTranslation=function(e,t,n){return new r().makeTranslation(e,t,n)},r.prototype.set=function(e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g){var y=this.elements;return y[0]=e,y[4]=t,y[8]=n,y[12]=i,y[1]=o,y[5]=a,y[9]=s,y[13]=l,y[2]=c,y[6]=u,y[10]=h,y[14]=d,y[3]=p,y[7]=f,y[11]=m,y[15]=g,this},r.prototype.identity=function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},r.prototype.clone=function(){return new r().fromArray(this.elements)},r.prototype.copy=function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},r.prototype.copyPosition=function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},r.prototype.setFromMatrix3=function(e){var t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this},r.prototype.setFromExtrusionDirection=function(e){var t=Math.hypot(e.x,e.y,e.z);if(!Number.isFinite(t)||t<1e-12)return this.identity(),this;var n=Math.abs(t-1)>1e-6?e.clone().multiplyScalar(1/t):e;if(Ji.equalPoint3d(n,G.Z_AXIS))this.identity();else{var i=new G(1,0,0);Math.abs(n.x)<1/64&&Math.abs(n.y)<1/64?i.crossVectors(G.Y_AXIS,n).normalize():i.crossVectors(G.Z_AXIS,n).normalize();var o=n.clone().cross(i).normalize();this.makeBasis(i,o,n)}return this},r.prototype.extractBasis=function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},r.prototype.makeBasis=function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},r.prototype.extractRotation=function(e){var t=this.elements,n=e.elements,i=1/wm.setFromMatrixColumn(e,0).length(),o=1/wm.setFromMatrixColumn(e,1).length(),a=1/wm.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},r.prototype.makeRotationFromQuaternion=function(e){return this.compose(Bre,e,Fre)},r.prototype.lookAt=function(e,t,n){var i=this.elements;return Pa.subVectors(e,t),Pa.lengthSq()===0&&(Pa.z=1),Pa.normalize(),dh.crossVectors(n,Pa),dh.lengthSq()===0&&(Math.abs(n.z)===1?Pa.x+=1e-4:Pa.z+=1e-4,Pa.normalize(),dh.crossVectors(n,Pa)),dh.normalize(),pS.crossVectors(Pa,dh),i[0]=dh.x,i[4]=pS.x,i[8]=Pa.x,i[1]=dh.y,i[5]=pS.y,i[9]=Pa.y,i[2]=dh.z,i[6]=pS.z,i[10]=Pa.z,this},r.prototype.multiply=function(e){return this.multiplyMatrices(this,e)},r.prototype.premultiply=function(e){return this.multiplyMatrices(e,this)},r.prototype.multiplyMatrices=function(e,t){var n=e.elements,i=t.elements,o=this.elements,a=n[0],s=n[4],l=n[8],c=n[12],u=n[1],h=n[5],d=n[9],p=n[13],f=n[2],m=n[6],g=n[10],y=n[14],b=n[3],v=n[7],x=n[11],w=n[15],_=i[0],A=i[4],E=i[8],S=i[12],M=i[1],T=i[5],L=i[9],O=i[13],D=i[2],z=i[6],N=i[10],J=i[14],X=i[3],Q=i[7],ce=i[11],H=i[15];return o[0]=a*_+s*M+l*D+c*X,o[4]=a*A+s*T+l*z+c*Q,o[8]=a*E+s*L+l*N+c*ce,o[12]=a*S+s*O+l*J+c*H,o[1]=u*_+h*M+d*D+p*X,o[5]=u*A+h*T+d*z+p*Q,o[9]=u*E+h*L+d*N+p*ce,o[13]=u*S+h*O+d*J+p*H,o[2]=f*_+m*M+g*D+y*X,o[6]=f*A+m*T+g*z+y*Q,o[10]=f*E+m*L+g*N+y*ce,o[14]=f*S+m*O+g*J+y*H,o[3]=b*_+v*M+x*D+w*X,o[7]=b*A+v*T+x*z+w*Q,o[11]=b*E+v*L+x*N+w*ce,o[15]=b*S+v*O+x*J+w*H,this},r.prototype.multiplyScalar=function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},r.prototype.determinant=function(){var e=this.elements,t=e[0],n=e[4],i=e[8],o=e[12],a=e[1],s=e[5],l=e[9],c=e[13],u=e[2],h=e[6],d=e[10],p=e[14],f=e[3],m=e[7],g=e[11],y=e[15];return f*(+o*l*h-i*c*h-o*s*d+n*c*d+i*s*p-n*l*p)+m*(+t*l*p-t*c*d+o*a*d-i*a*p+i*c*u-o*l*u)+g*(+t*c*h-t*s*p-o*a*h+n*a*p+o*s*u-n*c*u)+y*(-i*s*u-t*l*h+t*s*d+i*a*h-n*a*d+n*l*u)},r.prototype.transpose=function(){var e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},r.prototype.setPosition=function(e,t,n){var i=this.elements;return e instanceof G?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this},r.prototype.invert=function(){var e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],p=e[11],f=e[12],m=e[13],g=e[14],y=e[15],b=h*g*c-m*d*c+m*l*p-s*g*p-h*l*y+s*d*y,v=f*d*c-u*g*c-f*l*p+a*g*p+u*l*y-a*d*y,x=u*m*c-f*h*c+f*s*p-a*m*p-u*s*y+a*h*y,w=f*h*l-u*m*l-f*s*d+a*m*d+u*s*g-a*h*g,_=t*b+n*v+i*x+o*w;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var A=1/_;return e[0]=b*A,e[1]=(m*d*o-h*g*o-m*i*p+n*g*p+h*i*y-n*d*y)*A,e[2]=(s*g*o-m*l*o+m*i*c-n*g*c-s*i*y+n*l*y)*A,e[3]=(h*l*o-s*d*o-h*i*c+n*d*c+s*i*p-n*l*p)*A,e[4]=v*A,e[5]=(u*g*o-f*d*o+f*i*p-t*g*p-u*i*y+t*d*y)*A,e[6]=(f*l*o-a*g*o-f*i*c+t*g*c+a*i*y-t*l*y)*A,e[7]=(a*d*o-u*l*o+u*i*c-t*d*c-a*i*p+t*l*p)*A,e[8]=x*A,e[9]=(f*h*o-u*m*o-f*n*p+t*m*p+u*n*y-t*h*y)*A,e[10]=(a*m*o-f*s*o+f*n*c-t*m*c-a*n*y+t*s*y)*A,e[11]=(u*s*o-a*h*o-u*n*c+t*h*c+a*n*p-t*s*p)*A,e[12]=w*A,e[13]=(u*m*i-f*h*i+f*n*d-t*m*d-u*n*g+t*h*g)*A,e[14]=(f*s*i-a*m*i-f*n*l+t*m*l+a*n*g-t*s*g)*A,e[15]=(a*h*i-u*s*i+u*n*l-t*h*l-a*n*d+t*s*d)*A,this},r.prototype.scale=function(e){var t=this.elements,n=e.x,i=e.y,o=e.z;return t[0]*=n,t[4]*=i,t[8]*=o,t[1]*=n,t[5]*=i,t[9]*=o,t[2]*=n,t[6]*=i,t[10]*=o,t[3]*=n,t[7]*=i,t[11]*=o,this},r.prototype.getMaxScaleOnAxis=function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))},r.prototype.makeTranslation=function(e,t,n){var i;return typeof e=="object"?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,(i=e.z)!==null&&i!==void 0?i:0,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},r.prototype.makeRotationX=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},r.prototype.makeRotationY=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},r.prototype.makeRotationZ=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},r.prototype.makeRotationAxis=function(e,t){var n=Math.cos(t),i=Math.sin(t),o=1-n,a=e.x,s=e.y,l=e.z,c=o*a,u=o*s;return this.set(c*a+n,c*s-i*l,c*l+i*s,0,c*s+i*l,u*s+n,u*l-i*a,0,c*l-i*s,u*l+i*a,o*l*l+n,0,0,0,0,1),this},r.prototype.makeScale=function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},r.prototype.makeShear=function(e,t,n,i,o,a){return this.set(1,n,o,0,e,1,a,0,t,i,1,0,0,0,0,1),this},r.prototype.compose=function(e,t,n){var i=this.elements,o=t.x,a=t.y,s=t.z,l=t.w,c=o+o,u=a+a,h=s+s,d=o*c,p=o*u,f=o*h,m=a*u,g=a*h,y=s*h,b=l*c,v=l*u,x=l*h,w=n.x,_=n.y,A=n.z;return i[0]=(1-(m+y))*w,i[1]=(p+x)*w,i[2]=(f-v)*w,i[3]=0,i[4]=(p-x)*_,i[5]=(1-(d+y))*_,i[6]=(g+b)*_,i[7]=0,i[8]=(f+v)*A,i[9]=(g-b)*A,i[10]=(1-(d+m))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},r.prototype.decompose=function(e,t,n){var i=this.elements,o=wm.set(i[0],i[1],i[2]).length(),a=wm.set(i[4],i[5],i[6]).length(),s=wm.set(i[8],i[9],i[10]).length(),l=this.determinant();l<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],qs.copy(this);var c=1/o,u=1/a,h=1/s;return qs.elements[0]*=c,qs.elements[1]*=c,qs.elements[2]*=c,qs.elements[4]*=u,qs.elements[5]*=u,qs.elements[6]*=u,qs.elements[8]*=h,qs.elements[9]*=h,qs.elements[10]*=h,t.setFromRotationMatrix(qs),n.x=o,n.y=a,n.z=s,this},r.prototype.equals=function(e){for(var t=this.elements,n=e.elements,i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0},r.prototype.fromArray=function(e,t){t===void 0&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},r.prototype.toArray=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e},r.IDENTITY=Object.freeze(new r),r})(),wm=new G,qs=new Ie,Bre=new G(0,0,0),Fre=new G(1,1,1),dh=new G,pS=new G,Pa=new G});var De,qc,aI,ej=W(()=>{Gd();De=(function(){function r(e,t){e===void 0&&(e=void 0),t===void 0&&(t=void 0),this.min=e==null?new G(1/0,1/0,1/0):new G(e.x,e.y,e.z),this.max=t==null?new G(-1/0,-1/0,-1/0):new G(t.x,t.y,t.z)}return r.prototype.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},r.prototype.setFromArray=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t+=3)this.expandByPoint(aI.fromArray(e,t));return this},r.prototype.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},r.prototype.setFromCenterAndSize=function(e,t){var n=aI.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},r.prototype.clone=function(){return new r().copy(this)},r.prototype.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},r.prototype.makeEmpty=function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},r.prototype.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},r.prototype.getCenter=function(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},r.prototype.getSize=function(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},Object.defineProperty(r.prototype,"center",{get:function(){return this.isEmpty()?new G(0,0,0):new G(0,0,0).addVectors(this.min,this.max).multiplyScalar(.5)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"size",{get:function(){return this.isEmpty()?new G(0,0,0):new G(0,0,0).subVectors(this.max,this.min)},enumerable:!1,configurable:!0}),r.prototype.expandByPoint=function(e){return!Number.isFinite(e.x)||!Number.isFinite(e.y)||!Number.isFinite(e.z)?this:(this.min.min(e),this.max.max(e),this)},r.prototype.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},r.prototype.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},r.prototype.containsPoint=function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},r.prototype.containsBox=function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},r.prototype.getParameter=function(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},r.prototype.intersectsBox=function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},r.prototype.intersectsPlane=function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant},r.prototype.clampPoint=function(e,t){return t.copy(e).clamp(this.min,this.max)},r.prototype.distanceToPoint=function(e){return this.clampPoint(e,aI).distanceTo(e)},r.prototype.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},r.prototype.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},r.prototype.applyMatrix4=function(e){return this.isEmpty()?this:(qc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),qc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),qc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),qc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),qc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),qc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),qc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),qc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(qc),this)},r.prototype.translate=function(e){return this.min.add(e),this.max.add(e),this},r.prototype.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},r})(),qc=[new G,new G,new G,new G,new G,new G,new G,new G],aI=new G});var tj,ct,nj=W(()=>{wv();tj=new Ut,ct=(function(){function r(e,t){e===void 0&&(e=void 0),t===void 0&&(t=void 0),this.min=e==null?new Ut(1/0,1/0):new Ut(e.x,e.y),this.max=t==null?new Ut(-1/0,-1/0):new Ut(t.x,t.y)}return r.prototype.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},r.prototype.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},r.prototype.setFromCenterAndSize=function(e,t){var n=tj.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},r.prototype.clone=function(){return new r().copy(this)},r.prototype.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},r.prototype.makeEmpty=function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},r.prototype.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y},r.prototype.getCenter=function(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},r.prototype.getSize=function(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},Object.defineProperty(r.prototype,"center",{get:function(){return this.isEmpty()?new Ut(0,0):new Ut(0,0).addVectors(this.min,this.max).multiplyScalar(.5)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"size",{get:function(){return this.isEmpty()?new Ut(0,0):new Ut(0,0).subVectors(this.max,this.min)},enumerable:!1,configurable:!0}),r.prototype.expandByPoint=function(e){return!Number.isFinite(e.x)||!Number.isFinite(e.y)?this:(this.min.min(e),this.max.max(e),this)},r.prototype.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},r.prototype.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},r.prototype.containsPoint=function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},r.prototype.containsBox=function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},r.prototype.getParameter=function(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},r.prototype.intersectsBox=function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},r.prototype.clampPoint=function(e,t){return t.copy(e).clamp(this.min,this.max)},r.prototype.distanceToPoint=function(e){return this.clampPoint(e,tj).distanceTo(e)},r.prototype.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},r.prototype.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},r.prototype.translate=function(e){return this.min.add(e),this.max.add(e),this},r.prototype.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},r})()});var rj,Nre,zre,jl,ij=W(()=>{rI();Gd();rj=new G,Nre=new G,zre=new Ks,jl=(function(){function r(e,t){e===void 0&&(e=new G(1,0,0)),t===void 0&&(t=0),this.normal=e,this.constant=t}return r.prototype.set=function(e,t){return this.normal.copy(e),this.constant=t,this},r.prototype.setComponents=function(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this},r.prototype.setFromNormalAndCoplanarPoint=function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},r.prototype.setFromCoplanarPoints=function(e,t,n){var i=rj.subVectors(n,t).cross(Nre.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this},r.prototype.copy=function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},r.prototype.normalize=function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},r.prototype.negate=function(){return this.constant*=-1,this.normal.negate(),this},r.prototype.distanceToPoint=function(e){return this.normal.dot(e)+this.constant},r.prototype.projectPoint=function(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))},r.prototype.intersectsBox=function(e){return e.intersectsPlane(this)},r.prototype.coplanarPoint=function(e){return e.copy(this.normal).multiplyScalar(-this.constant)},r.prototype.applyMatrix4=function(e,t){var n=t||zre.getNormalMatrix(e),i=this.coplanarPoint(rj).applyMatrix4(e),o=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(o),this},r.prototype.translate=function(e){return this.constant-=e.dot(this.normal),this},r.prototype.equals=function(e){return e.normal.equals(this.normal)&&e.constant===this.constant},r.prototype.clone=function(){return new r().copy(this)},r})()});var Ure,Z,_m=W(()=>{wv();Ure=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Z=(function(r){Ure(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.clone=function(){return new e(this.x,this.y)},e.pointArrayToNumberArray=function(t){var n=new Array(t.length*2);return t.forEach(function(i,o){i.toArray(n,o*2)}),n},e})(Ut)});var jre,k,sI=W(()=>{Gd();jre=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),k=(function(r){jre(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.clone=function(){return new e(this.x,this.y,this.z)},e.pointArrayToNumberArray=function(t,n){n===void 0&&(n=!0);var i=n?3:2,o=new Array(t.length*i);return t.forEach(function(a,s){a.toArray(o,s*i)}),o},e})(G)});var Vre,oj,aj,mS,sj=W(()=>{xm();fS();dS();Vre=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},oj=new Ie,aj=new Ma,mS=(function(){function r(e,t,n,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=r.DEFAULT_ORDER),this._x=e,this._y=t,this._z=n,this._order=i}return Object.defineProperty(r.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()},enumerable:!1,configurable:!0}),r.prototype.set=function(e,t,n,i){return i===void 0&&(i=this._order),this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this},r.prototype.clone=function(){return new r(this._x,this._y,this._z,this._order)},r.prototype.copy=function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this},r.prototype.setFromRotationMatrix=function(e,t,n){t===void 0&&(t=this._order),n===void 0&&(n=!0);var i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],c=i[5],u=i[9],h=i[2],d=i[6],p=i[10];switch(t){case"XYZ":this._y=Math.asin(ti(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-ti(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(ti(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-ti(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(ti(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,p));break;case"XZY":this._z=Math.asin(-ti(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this},r.prototype.setFromQuaternion=function(e,t,n){return n===void 0&&(n=!0),oj.makeRotationFromQuaternion(e),this.setFromRotationMatrix(oj,t,n)},r.prototype.setFromVector3=function(e,t){return t===void 0&&(t=this._order),this.set(e.x,e.y,e.z,t)},r.prototype.reorder=function(e){return aj.setFromEuler(this),this.setFromQuaternion(aj,e)},r.prototype.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},r.prototype.fromArray=function(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this},r.prototype.toArray=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},r.prototype._onChange=function(e){return this._onChangeCallback=e,this},r.prototype._onChangeCallback=function(){},r.prototype[Symbol.iterator]=function(){return Vre(this,function(e){switch(e.label){case 0:return[4,this._x];case 1:return e.sent(),[4,this._y];case 2:return e.sent(),[4,this._z];case 3:return e.sent(),[4,this._order];case 4:return e.sent(),[2]}})},r.DEFAULT_ORDER="XYZ",r})()});var Yr=W(()=>{rI();fS();ej();nj();wv();Gd();ij();_m();sI();dS();sj()});function Gre(r){var e,t=r;return{x:r.x,y:r.y,z:(e=t.z)!==null&&e!==void 0?e:0}}function Hre(r,e){var t,n;r.x+=e.x,r.y+=e.y,r.z=((t=r.z)!==null&&t!==void 0?t:0)+((n=e.z)!==null&&n!==void 0?n:0)}function Wre(r,e,t){t===void 0&&(t=!1);for(var n=r.x,i=r.y,o=!1,a=e.length,s=0,l=a-1;s<a;l=s++){var c=e[s].x,u=e[s].y,h=e[l].x,d=e[l].y,p=u>i!=d>i;t&&(p=u>=i!=d>=i);var f=p&&n<(h-c)*(i-u)/(d-u)+c;f&&(o=!o)}return o}function Xre(r,e){if(r.length===0||e.length===0)return!1;var t=new ct().setFromPoints(r),n=new ct().setFromPoints(e);if(!t.intersectsBox(n))return!1;for(var i=0;i<r.length;){if(Rn.isPointInPolygon(r[i],e,!0))return!0;i<r.length-1&&Ji.equalPoint2d(r[i+1],r[i])&&++i,++i}return!1}var Rn,lI=W(()=>{Yr();Vd();Rn={applyOffsetToPoint3d:Hre,isPointInPolygon:Wre,isPolygonIntersect:Xre,point2dToPoint3d:Gre}});function bS(r,e){for(var t=[],n=e-1,i=r,o=0;o<=i;o++)t.push(0);for(var o=1;o<=n-i;o++)t.push(o);for(var o=0;o<=i;o++)t.push(n-i+1);return t}function vS(r,e){for(var t=e.length-1,n=r,i=[0],o=0,a=1;a<=t;a++){var s=e[a][0]-e[a-1][0],l=e[a][1]-e[a-1][1],c=e[a][2]-e[a-1][2],u=Math.sqrt(s*s+l*l+c*c);o+=u,i.push(o)}for(var h=[],a=0;a<=n;a++)h.push(0);for(var a=1;a<=t-n;a++){var d=i[a]/o;h.push(d*(t-n+1))}for(var a=0;a<=n;a++)h.push(t-n+1);return h}function Sv(r,e){e===void 0&&(e="Uniform");var t=r.length;if(t===0)return[];if(t===1)return[0];var n=t-1;if(e==="Uniform")return new Array(t).fill(0).map(function(d,p){return p/n});for(var i=[0],o=0,a=1;a<=n;a++){var s=r[a][0]-r[a-1][0],l=r[a][1]-r[a-1][1],c=r[a][2]-r[a-1][2],u=Math.sqrt(s*s+l*l+c*c),h=e==="SqrtChord"?Math.sqrt(u):u;o+=h,i.push(o)}return o<1e-12?new Array(t).fill(0).map(function(d,p){return p/n}):i.map(function(d){return d/o})}function Av(r,e){for(var t=e.length-1,n=r,i=t+n+1,o=new Array(i+1).fill(0),a=e[e.length-1],s=i-n;s<=i;s++)o[s]=a;for(var l=1;l<=t-n;l++){for(var c=0,s=l;s<l+n;s++)c+=e[s];o[l+n]=c/n}return o}function xS(r,e){for(var t=e.length-1,n=r,i=[0],o=0,a=1;a<=t;a++){var s=e[a][0]-e[a-1][0],l=e[a][1]-e[a-1][1],c=e[a][2]-e[a-1][2],u=Math.sqrt(s*s+l*l+c*c),h=Math.sqrt(u);o+=h,i.push(o)}for(var d=[],a=0;a<=n;a++)d.push(0);for(var a=1;a<=t-n;a++){var p=i[a]/o;d.push(p*(t-n+1))}for(var a=0;a<=n;a++)d.push(t-n+1);return d}function yS(r,e){var t,n;try{for(var i=Sm(r),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.col===e)return a.value}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return 0}function lj(r,e){for(var t=0;t<r.length;t++)if(r[t].col===e)return t;return-1}function Yre(r,e){for(var t,n,i,o,a,s,l,c,u,h,d=r.length,p=r.map(function(ve){return ve.map(function(se){return{col:se.col,value:se.value}})}),f=e.map(function(ve){return ve.slice()}),m=0;m<d;m++){for(var g=-1,y=1e-12,b=m;b<d;b++){var v=Math.abs(yS(p[b],m));v>y&&(y=v,g=b)}if(g<0)throw new Error("Interpolation matrix is singular.");if(g!==m){var x=p[m];p[m]=p[g],p[g]=x;try{for(var w=(t=void 0,Sm(f)),_=w.next();!_.done;_=w.next()){var A=_.value,E=A[m];A[m]=A[g],A[g]=E}}catch(ve){t={error:ve}}finally{try{_&&!_.done&&(n=w.return)&&n.call(w)}finally{if(t)throw t.error}}}for(var S=yS(p[m],m),b=m+1;b<d;b++){var M=lj(p[b],m);if(!(M<0)){var T=p[b][M].value/S;if(!(Math.abs(T)<1e-14)){try{for(var L=(i=void 0,Sm(p[b])),O=L.next();!O.done;O=L.next()){var D=O.value;D.col>m&&(D.value-=T*yS(p[m],D.col))}}catch(se){i={error:se}}finally{try{O&&!O.done&&(o=L.return)&&o.call(L)}finally{if(i)throw i.error}}try{for(var z=(a=void 0,Sm(p[m])),N=z.next();!N.done;N=z.next()){var J=N.value;J.col<=m||J.value===0||lj(p[b],J.col)<0&&p[b].push({col:J.col,value:-T*J.value})}}catch(se){a={error:se}}finally{try{N&&!N.done&&(s=z.return)&&s.call(z)}finally{if(a)throw a.error}}p[b][M].value=0;try{for(var X=(l=void 0,Sm(f)),Q=X.next();!Q.done;Q=X.next()){var A=Q.value;A[b]-=T*A[m]}}catch(se){l={error:se}}finally{try{Q&&!Q.done&&(c=X.return)&&c.call(X)}finally{if(l)throw l.error}}}}}}for(var ce=f.map(function(){return new Array(d).fill(0)}),b=d-1;b>=0;b--)for(var H=yS(p[b],b),de=0;de<f.length;de++){var Se=f[de][b];try{for(var te=(u=void 0,Sm(p[b])),ue=te.next();!ue.done;ue=te.next()){var D=ue.value;D.col>b&&(Se-=D.value*ce[de][D.col])}}catch(se){u={error:se}}finally{try{ue&&!ue.done&&(h=te.return)&&h.call(te)}finally{if(u)throw u.error}}ce[de][b]=Se/H}return ce}function $re(r,e,t){var n=t.length-e-2;if(r>=t[n+1])return n;for(var i=e,o=t.length-e-2;i<=o;){var a=i+o>>1;if(r<t[a])o=a-1;else if(r>=t[a+1])i=a+1;else return a}return e}function Hd(r,e,t,n,i){var o,a,s,l,c,u;if(t===void 0&&(t="Uniform"),r.length===0)return{controlPoints:[],knots:[],weights:[]};var h=r.map(function(ue){var ve;return[ue[0],ue[1],(ve=ue[2])!==null&&ve!==void 0?ve:0]}),d=!!n,p=!!i,f=(d?1:0)+(p?1:0),m=h.length-1,g=m+f;if(g<e)throw new Error("Not enough points to interpolate a curve of this degree.");var y=Sv(h,t),b=y.slice();d&&b.unshift(y[0]),p&&b.push(y[y.length-1]);var v=Av(e,b),x=g+1,w=[],_=[],A=[],E=[];if(d){var S=v[e+1]-v[0],M=S!==0?e/S:0;w.push([{col:0,value:-M},{col:1,value:M}]),_.push((o=n?.[0])!==null&&o!==void 0?o:0),A.push((a=n?.[1])!==null&&a!==void 0?a:0),E.push((s=n?.[2])!==null&&s!==void 0?s:0)}w.push([{col:0,value:1}]),_.push(h[0][0]),A.push(h[0][1]),E.push(h[0][2]);for(var T=1;T<=m-1;T++){for(var L=y[T],O=[],D=$re(L,e,v),z=Math.max(0,D-e),N=Math.min(g,D),J=z;J<=N;J++){var X=Zs(J,e,L,v);X!==0&&O.push({col:J,value:X})}w.push(O),_.push(h[T][0]),A.push(h[T][1]),E.push(h[T][2])}if(w.push([{col:g,value:1}]),_.push(h[m][0]),A.push(h[m][1]),E.push(h[m][2]),p){var S=v[g+e+1]-v[g],M=S!==0?e/S:0;w.push([{col:g-1,value:-M},{col:g,value:M}]),_.push((l=i?.[0])!==null&&l!==void 0?l:0),A.push((c=i?.[1])!==null&&c!==void 0?c:0),E.push((u=i?.[2])!==null&&u!==void 0?u:0)}for(var Q=_v(Yre(w,[_,A,E]),3),ce=Q[0],H=Q[1],de=Q[2],Se=new Array(x),T=0;T<x;T++)Se[T]=[ce[T],H[T],de[T]];var te=new Array(x).fill(1);return{controlPoints:Se,knots:v,weights:te}}function Zs(r,e,t,n){if(e===0)return t>=n[r]&&t<n[r+1]?1:0;var i=n[r+e]-n[r],o=n[r+e+1]-n[r+1],a=i>1e-10?(t-n[r])/i:0,s=o>1e-10?(n[r+e+1]-t)/o:0;return a*Zs(r,e-1,t,n)+s*Zs(r+1,e-1,t,n)}function ph(r,e,t,n,i){var o=n.length-1,a=e;if(r=Math.max(t[a],Math.min(t[o+1],r)),Math.abs(r-t[o+1])<1e-8)return gS([],_v(n[o]),!1);if(Math.abs(r-t[a])<1e-8)return gS([],_v(n[0]),!1);for(var s=[0,0,0],l=0,c=0;c<=o;c++){var u=Zs(c,a,r,t),h=i[c]*u;s[0]+=n[c][0]*h,s[1]+=n[c][1]*h,s[2]+=n[c][2]*h,l+=h}if(Math.abs(l)<1e-10){var d=t[t.length-a-1];if(Math.abs(r-d)<1e-8)return gS([],_v(n[o]),!1);if(Math.abs(r-t[a])<1e-8)return gS([],_v(n[0]),!1)}return Math.abs(l)>=1e-10&&(s[0]/=l,s[1]/=l,s[2]/=l),s}function cI(r,e,t,n){if(e===0)return 0;var i=n[r+e]-n[r],o=n[r+e+1]-n[r+1],a=0;return i>1e-10&&(a+=e/i*Zs(r,e-1,t,n)),o>1e-10&&(a-=e/o*Zs(r+1,e-1,t,n)),a}function Kre(r,e,t,n){if(e<=1)return 0;var i=n[r+e]-n[r],o=n[r+e+1]-n[r+1],a=0;return i>1e-10&&(a+=e/i*cI(r,e-1,t,n)),o>1e-10&&(a-=e/o*cI(r+1,e-1,t,n)),a}function wS(r,e,t,n,i){var o=n.length-1,a=e,s=t[a],l=t[o+1];r=Math.max(s,Math.min(l,r));for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],d=0,p=0,f=0,m=0;m<=o;m++){var g=Zs(m,a,r,t),y=cI(m,a,r,t),b=Kre(m,a,r,t),v=i[m],x=v*g,w=v*y,_=v*b,A=n[m];c[0]+=x*A[0],c[1]+=x*A[1],c[2]+=x*A[2],u[0]+=w*A[0],u[1]+=w*A[1],u[2]+=w*A[2],h[0]+=_*A[0],h[1]+=_*A[1],h[2]+=_*A[2],d+=x,p+=w,f+=_}if(Math.abs(d)<1e-10){var E=ph(r,e,t,n,i);return{point:E,deriv1:[0,0,0],deriv2:[0,0,0]}}var S=d*d,M=[c[0]/d,c[1]/d,c[2]/d],T=[(u[0]*d-c[0]*p)/S,(u[1]*d-c[1]*p)/S,(u[2]*d-c[2]*p)/S],L=h[0]*d-c[0]*f,O=h[1]*d-c[1]*f,D=h[2]*d-c[2]*f,z=[L/S-2*p*T[0]/d,O/S-2*p*T[1]/d,D/S-2*p*T[2]/d];return{point:M,deriv1:T,deriv2:z}}function _S(r,e){var t=r[0],n=r[1],i=e[0],o=e[1],a=t*t+n*n;return a<1e-20?0:(t*o-n*i)/Math.pow(a,1.5)}function Am(r,e,t,n){for(var i=r,o=e[i],a=e[e.length-i-1],s=0,l=1e3,c=(a-o)/l,u=ph(o,r,e,t,n),h=1;h<=l;h++){var d=o+h*c,p=ph(d,r,e,t,n),f=p[0]-u[0],m=p[1]-u[1],g=p[2]-u[2];s+=Math.sqrt(f*f+m*m+g*g),u=p}var y=ph(a,r,e,t,n),b=y[0]-u[0],v=y[1]-u[1],x=y[2]-u[2];return s+=Math.sqrt(b*b+v*v+x*x),s}function SS(r,e,t,n,i){return e===void 0&&(e=3),t===void 0&&(t="Uniform"),r.length===0?[]:Hd(r,e,t,n,i).controlPoints}var Sm,_v,gS,cj=W(()=>{Sm=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_v=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},gS=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))}});function Jre(r){return new Ie().setFromExtrusionDirection(new G(r.x,r.y,r.z))}function Ea(r){return fh(new G,r)}function fh(r,e){return AS.setFromExtrusionDirection(hj.set(e.x,e.y,e.z)),AS.extractBasis(uj,qre,Zre),r.copy(uj),r}function Er(r,e){return Wd(new k,r,e)}function Wd(r,e,t){var n,i;return t.x===0&&t.y===0&&t.z===1?(r.set(e.x,e.y,(n=e.z)!==null&&n!==void 0?n:0),r):(AS.setFromExtrusionDirection(hj.set(t.x,t.y,t.z)),r.set(e.x,e.y,(i=e.z)!==null&&i!==void 0?i:0),r.applyMatrix4(AS),r)}function dr(r,e){var t;return new k(r.x,r.y,(t=r.z)!==null&&t!==void 0?t:0).applyMatrix4(Jre(e).invert())}function To(r,e,t){var n,i,o=dr(r,t),a=dr(e,t);return uI.set(a.x-o.x,a.y-o.y,((n=a.z)!==null&&n!==void 0?n:0)-((i=o.z)!==null&&i!==void 0?i:0)),xe.normalizeAngle(Math.atan2(uI.y,uI.x))}var AS,uj,qre,Zre,uI,hj,dj=W(()=>{fS();sI();Gd();xm();AS=new Ie,uj=new G,qre=new G,Zre=new G,uI=new k,hj=new G});function Mv(r){var e=r.length;if(e<3)return 0;for(var t=0,n=0,i=e-1;n<e;i=n++){var o=r[i],a=r[n];t+=o.x*a.y-a.x*o.y}return t*.5}function hI(r){return Math.abs(Mv(r))}function dI(r){var e,t,n=r.length;if(n<3)return 0;for(var i=0,o=0,a=0,s=0,l=n-1;s<n;l=s++){var c=r[l],u=r[s],h=c.x,d=c.y,p=(e=c.z)!==null&&e!==void 0?e:0,f=u.x,m=u.y,g=(t=u.z)!==null&&t!==void 0?t:0;i+=(p+g)*(d-m),o+=(h+f)*(p-g),a+=(d+m)*(h-f)}return .5*Math.hypot(i,o,a)}function MS(r){return r.length<3?0:hI(r)}function Mm(r){return r.length<3?0:dI(r)}var Pv=W(()=>{});function Ev(r,e,t){var n=r.x,i=r.y,o=e.x,a=e.y,s=t.x,l=t.y,c=2*(n*(a-l)+o*(l-i)+s*(i-a));if(Ce.equalToZero(c))return null;var u=((n*n+i*i)*(a-l)+(o*o+a*a)*(l-i)+(s*s+l*l)*(i-a))/c,h=((n*n+i*i)*(s-o)+(o*o+a*a)*(n-s)+(s*s+l*l)*(o-n))/c,d=Math.hypot(u-n,h-i);return!Number.isFinite(d)||Ce.isNonPositive(d)?null:{center:new Z(u,h),radius:d}}function pI(r,e,t){var n,i,o,a=r.x,s=r.y,l=(n=r.z)!==null&&n!==void 0?n:0,c=new G(e.x-a,e.y-s,((i=e.z)!==null&&i!==void 0?i:0)-l),u=new G(t.x-a,t.y-s,((o=t.z)!==null&&o!==void 0?o:0)-l),h=new G().crossVectors(c,u),d=h.lengthSq();if(d<Pt*Pt)return null;var p=c.lengthSq(),f=u.lengthSq(),m=new G().crossVectors(h,c).multiplyScalar(f).add(new G().crossVectors(u,h).multiplyScalar(p)).multiplyScalar(1/(2*d)),g=new k(a+m.x,s+m.y,l+m.z),y=Math.hypot(g.x-a,g.y-s,g.z-l);return!Number.isFinite(y)||Ce.isNonPositive(y)?null:{center:g,radius:y}}function Zc(r,e){return Math.atan2(e.y-r.y,e.x-r.x)}function Js(r,e){return Math.hypot(e.x-r.x,e.y-r.y)}function PS(r,e,t){if(Ce.isNonPositive(e))return null;var n=t.x-r.x,i=t.y-r.y,o=Math.hypot(n,i);if(Ce.isNonPositive(o))return null;var a=e/o;return new Z(r.x+n*a,r.y+i*a)}function Pm(r,e,t,n){var i=Math.abs(Js(r,e)-t);return i<=(n??Math.max(Pt,t*1e-5))}function Em(r,e,t,n,i){return i===void 0&&(i=Qre),Math.abs(r.x-t.x)<=i&&Math.abs(r.y-t.y)<=i&&Math.abs(e-n)<=i}function Cm(r,e,t,n){var i=Math.max(1e-18,Math.abs(t)*1e-9);return r<t-i?!0:r>t+i?!1:e>n}var Qre,Cv=W(()=>{Yr();Ii();Qre=1e-8});function fI(r,e,t,n){n===void 0&&(n=!1);var i=Ev(r,e,t);if(!i)return null;var o=Zc(i.center,r),a=Zc(i.center,e),s=Zc(i.center,t),l=!xe.isAngleOnCcwSweep(o,a,s);return n&&(l=!l),Ke.fromMathAngles(i.center,i.radius,o,s,l)}function ES(r,e){return!Number.isFinite(e)||Ce.isNonPositive(e)?null:new Ke(r,e,0,Ge,!1)}function pj(r,e){var t=Js(r,e);return Ce.isNonPositive(t)?null:ES({x:(r.x+e.x)/2,y:(r.y+e.y)/2},t/2)}function fj(r,e,t){var n=Ev(r,e,t);return n?ES(n.center,n.radius):null}function mj(r,e,t){var n=Js(t,r);if(Ce.isNonPositive(n))return null;var i=Zc(t,r),o=Zc(t,e),a=xe.normalizeAngle(o-i);return Ke.fromMathAngles(t,n,i,o,a>Math.PI)}function Tm(r,e,t,n){var i=Js(r,e),o=Js(r,t);if(Ce.isNonPositive(i)||Ce.isNonPositive(o))return null;var a=Math.max(Pt,i*Pt);return Math.abs(i-o)>a?null:Ke.fromMathAngles(r,i,Zc(r,e),Zc(r,t),n)}function gj(r,e,t,n){var i=Js(r,e);if(Ce.isNonPositive(i))return null;var o=PS(r,i,t);return o?Tm(r,e,o,n):null}function mI(r,e,t){var n=Js(r,e),i=Math.abs(t);if(Ce.isNonPositive(n)||Ce.isNonPositive(i)||!Ce.great(Ge-i,0))return null;var o=t<0,a=Zc(r,e),s=o?a-i:a+i;return Ke.fromMathAngles(r,n,a,s,o)}function yj(r,e,t){var n=Js(r,e),i=Math.abs(t);if(Ce.isNonPositive(n)||Ce.isNonPositive(i)||Ce.great(i,2*n))return null;var o=Math.max(-1,Math.min(1,i/(2*n))),a=2*Math.asin(o);return mI(r,e,t>=0?a:-a)}function bj(r,e,t){var n=Js(r,e),i=Math.abs(t);if(Ce.isNonPositive(n)||Ce.isNonPositive(i)||!Ce.great(Ge-i,0))return null;var o=Math.sin(i/2);if(Ce.equalToZero(o))return null;var a=n/(2*o),s=a*a-n*n/4;if(Ce.less(s,0))return null;var l=Math.sqrt(Math.max(0,s)),c=(r.x+e.x)/2,u=(r.y+e.y)/2,h=e.x-r.x,d=e.y-r.y,p=-d/n,f=h/n,m=t>=0,g=m&&i<=Math.PI||!m&&i>Math.PI,y=g?1:-1,b={x:c+p*l*y,y:u+f*l*y};return Tm(b,r,e,!m)}function vj(r,e,t){var n=Math.cos(t),i=Math.sin(t),o=e.x-r.x,a=e.y-r.y,s=-i,l=n,c=2*(o*s+a*l);if(Ce.equalToZero(c))return null;var u=(o*o+a*a)/c;if(!Number.isFinite(u))return null;var h={x:r.x+s*u,y:r.y+l*u},d=r.x-h.x,p=r.y-h.y,f=d*i-p*n;return Ce.equalToZero(f)?null:Tm(h,r,e,f<0)}function xj(r,e,t){var n=Math.abs(t),i=Js(r,e);if(Ce.isNonPositive(n)||Ce.isNonPositive(i)||Ce.great(i,2*n))return null;var o=(r.x+e.x)/2,a=(r.y+e.y)/2,s=e.x-r.x,l=e.y-r.y,c=-l/i,u=s/i,h=Math.sqrt(Math.max(0,n*n-i*i/4)),d=t>=0?1:-1,p={x:o+c*h*d,y:a+u*h*d};return Tm(p,r,e,t<0)}var wj=W(()=>{Ii();Jc();Cv()});var CS,gI=W(()=>{CS=(function(){function r(){this._boundingBoxNeedsUpdate=!1}return Object.defineProperty(r.prototype,"boundingBoxNeedUpdate",{get:function(){return this._boundingBoxNeedsUpdate},enumerable:!1,configurable:!0}),r})()});var eie,mh,TS=W(()=>{Yr();gI();eie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),mh=(function(r){eie(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.translate=function(t){return this.transform(new Ks().makeTranslation(t.x,t.y))},Object.defineProperty(e.prototype,"box",{get:function(){return(this._box==null||this._boundingBoxNeedsUpdate)&&(this._box=this.calculateBoundingBox(),this._boundingBoxNeedsUpdate=!1),this._box},enumerable:!1,configurable:!0}),e})(CS)});var tie,ea,Xd=W(()=>{_m();TS();tie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ea=(function(r){tie(e,r);function e(){var t=r.call(this)||this;return t.arcLengthDivisions=100,t}return Object.defineProperty(e.prototype,"startPoint",{get:function(){return this.getPoint(0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this.getPoint(1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.getLength()},enumerable:!1,configurable:!0}),e.prototype.getPoint=function(t){throw new Error("AcGeCurve2d: .getPoint() not implemented.")},e.prototype.getPointAt=function(t){var n=this.getUtoTmapping(t);return this.getPoint(n)},e.prototype.getPoints=function(t){t===void 0&&(t=5);for(var n=[],i=0;i<=t;i++)n.push(this.getPoint(i/t));return n},e.prototype.getSpacedPoints=function(t){t===void 0&&(t=5);for(var n=[],i=0;i<=t;i++)n.push(this.getPointAt(i/t));return n},e.prototype.getLength=function(){var t=this.getLengths();return t[t.length-1]},e.prototype.getLengths=function(t){t===void 0&&(t=this.arcLengthDivisions);var n=[],i,o=this.getPoint(0),a=0;n.push(0);for(var s=1;s<=t;s++)i=this.getPoint(s/t),a+=i.distanceTo(o),n.push(a),o=i;return n},e.prototype.getUtoTmapping=function(t,n){var i=this.getLengths(),o=0,a=i.length,s;n?s=n:s=t*i[a-1];for(var l=0,c=a-1,u;l<=c;)if(o=Math.floor(l+(c-l)/2),u=i[o]-s,u<0)l=o+1;else if(u>0)c=o-1;else{c=o;break}if(o=c,i[o]===s)return o/(a-1);var h=i[o],d=i[o+1],p=d-h,f=(s-h)/p,m=(o+f)/(a-1);return m},e.prototype.getTangent=function(t){var n=1e-4,i=t-n,o=t+n;i<0&&(i=0),o>1&&(o=1);var a=this.getPoint(i),s=this.getPoint(o),l=new Z;return l.copy(s).sub(a).normalize(),l},e.prototype.getTangentAt=function(t){var n=this.getUtoTmapping(t);return this.getTangent(n)},e})(mh)});var nie,OS,kS,IS,LS,Ke,Jc=W(()=>{zt();Yr();Ii();wj();Cv();Xd();nie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),OS=function(){return OS=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},OS.apply(this,arguments)},kS=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},IS=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},LS=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Ke=(function(r){nie(e,r);function e(t,n,i,o,a){var s=r.call(this)||this,l=+(t!==void 0)+ +(n!==void 0)+ +(i!==void 0)+ +(o!==void 0)+ +(a!==void 0);if(l==3)typeof t=="object"&&typeof n=="object"&&typeof i=="object"?s.createByThreePoints(t,n,i):s.createByStartEndPointsAndBulge(t,n,i);else if(l==5){var c=t;s.center=new Z(c.x,c.y),s.radius=n,s._clockwise=a,s._startAngle=s._clockwise?s._mirrorAngle(xe.normalizeAngle(i)):xe.normalizeAngle(i),s._endAngle=s._clockwise?s._mirrorAngle(xe.normalizeAngle(o)):xe.normalizeAngle(o)}else throw Qn.ILLEGAL_PARAMETERS;return s}return e.fromMathAngles=function(t,n,i,o,a){var s=new e(t,n,xe.normalizeAngle(i),xe.normalizeAngle(o),!1);return s._clockwise=a,s._boundingBoxNeedsUpdate=!0,s},e.computeCircumcircle=function(t,n,i){return Ev(t,n,i)},e.projectPoint=function(t,n,i){return PS(t,n,i)},e.pointLiesOnCircle=function(t,n,i,o){return Pm(t,n,i,o)},e.sameCircle=function(t,n,i,o,a){return Em(t,n,i,o,a)},e.isBetterDistanceAlign=function(t,n,i,o){return Cm(t,n,i,o)},e.tryCreateByThreePoints=function(t,n,i,o){return o===void 0&&(o=!1),fI(t,n,i,o)},e.tryCreateCircle=function(t,n){return ES(t,n)},e.tryCreateCircleByDiameter=function(t,n){return pj(t,n)},e.tryCreateCircleByThreePoints=function(t,n,i){return fj(t,n,i)},e.tryCreateShorterArc=function(t,n,i){return mj(t,n,i)},e.tryCreateByCenterStartEnd=function(t,n,i,o){return Tm(t,n,i,o)},e.tryCreateByCenterStartProjectedEnd=function(t,n,i,o){return gj(t,n,i,o)},e.tryCreateByCenterStartSweep=function(t,n,i){return mI(t,n,i)},e.tryCreateByCenterStartChord=function(t,n,i){return yj(t,n,i)},e.tryCreateByStartEndAngle=function(t,n,i){return bj(t,n,i)},e.tryCreateByStartEndDirection=function(t,n,i){return vj(t,n,i)},e.tryCreateByStartEndRadius=function(t,n,i){return xj(t,n,i)},e.prototype.createByThreePoints=function(t,n,i){var o=fI(t,n,i);if(!o)throw Qn.ILLEGAL_PARAMETERS;this.center=o.center,this.radius=o.radius,this._clockwise=o._clockwise,this._startAngle=o._startAngle,this._endAngle=o._endAngle,this._boundingBoxNeedsUpdate=!0},e.prototype.createByStartEndPointsAndBulge=function(t,n,i){var o,a,s;i<0?(o=Math.atan(-i)*4,a=new Ut(t),s=new Ut(n)):(o=Math.atan(i)*4,a=new Ut(n),s=new Ut(t));var l=new Ut().subVectors(s,a),c=l.length(),u=new Ut().addVectors(a,l.multiplyScalar(.5)),h=Math.abs(c/2/Math.tan(o/2)),d=l.normalize(),p=i<0?-Math.PI/2:Math.PI/2,f=new Ut(d.x*Math.cos(p)-d.y*Math.sin(p),d.y*Math.cos(p)+d.x*Math.sin(p)),m;o<Math.PI?i<0?m=u.add(f.multiplyScalar(h)):m=u.add(f.multiplyScalar(-h)):i<0?m=u.add(f.multiplyScalar(-h)):m=u.add(f.multiplyScalar(h)),i<0?(this._startAngle=Math.atan2(a.y-m.y,a.x-m.x),this._endAngle=Math.atan2(s.y-m.y,s.x-m.x)):(this._startAngle=Math.atan2(s.y-m.y,s.x-m.x),this._endAngle=Math.atan2(a.y-m.y,a.x-m.x)),this._clockwise=i<0,this.center=m,this.radius=s.sub(m).length()},Object.defineProperty(e.prototype,"center",{get:function(){return this._center},set:function(t){this._center=new Z(t.x,t.y),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._clockwise?this._mirrorAngle(this._startAngle):this._startAngle},set:function(t){this._startAngle=this._clockwise?this._mirrorAngle(xe.normalizeAngle(t)):xe.normalizeAngle(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._clockwise?this._mirrorAngle(this._endAngle):this._endAngle},set:function(t){var n=this.startAngle==0&&t==Ge?t:xe.normalizeAngle(t);this._endAngle=this._clockwise?this._mirrorAngle(n):n,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),e.prototype._mirrorAngle=function(t){var n=t*180/Math.PI,i=(360-n)%360;return i*Math.PI/180},e.prototype._getInternalAngle=function(t){return this._clockwise?this._mirrorAngle(t):t},Object.defineProperty(e.prototype,"deltaAngle",{get:function(){var t=this._getInternalAngle(this.startAngle),n=this._getInternalAngle(this.endAngle);return this.clockwise?xe.normalizeAngle(t-n):xe.normalizeAngle(n-t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clockwise",{get:function(){return this._clockwise},set:function(t){this._clockwise=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this.getPointAtAngle(this.startAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this.getPointAtAngle(this.endAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"midPoint",{get:function(){var t=this._getInternalAngle(this.startAngle),n=this._clockwise?xe.normalizeAngle(t-this.deltaAngle/2):xe.normalizeAngle(t+this.deltaAngle/2),i=this._clockwise?this._mirrorAngle(n):n;return this.getPointAtAngle(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){var t=this._getInternalAngle(this.startAngle),n=this._getInternalAngle(this.endAngle);return Math.abs(n-t)/Math.PI%2==0},enumerable:!1,configurable:!0}),e.prototype.calculateBoundingBox=function(){var t,n,i=[this.startPoint,this.endPoint],o=[0,Math.PI/2,Math.PI,3*Math.PI/2];try{for(var a=kS(o),s=a.next();!s.done;s=a.next()){var l=s.value,c=this._getInternalAngle(l);xe.isBetweenAngle(c,this._getInternalAngle(this.startAngle),this._getInternalAngle(this.endAngle),this.clockwise)&&i.push(this.getPointAtAngle(l))}}catch(d){t={error:d}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var u=i.map(function(d){return d.x}),h=i.map(function(d){return d.y});return new ct(new Z(Math.min.apply(Math,LS([],IS(u),!1)),Math.min.apply(Math,LS([],IS(h),!1))),new Z(Math.max.apply(Math,LS([],IS(u),!1)),Math.max.apply(Math,LS([],IS(h),!1))))},Object.defineProperty(e.prototype,"length",{get:function(){return Math.abs(this.deltaAngle*this.radius)},enumerable:!1,configurable:!0}),e.prototype.transform=function(t){var n=this,i=t,o=this.center.clone().applyMatrix2d(i),a=this.startPoint.clone().applyMatrix2d(i);if(this.closed)return this.center=o,this.radius=o.distanceTo(a),this._startAngle=Math.atan2(a.y-o.y,a.x-o.x),this._endAngle=this._startAngle,this._clockwise=i.determinant()<0?!this._clockwise:this._clockwise,this._boundingBoxNeedsUpdate=!0,this;var s=this.midPoint.clone().applyMatrix2d(i),l=this.endPoint.clone().applyMatrix2d(i),c=new e(a,s,l),u=i.determinant()<0?!this.clockwise:this.clockwise,h=function(d){var p=xe.normalizeAngle(d);return u?n._mirrorAngle(p):p};return this.center=c.center,this.radius=c.radius,this.clockwise=u,this.startAngle=h(Math.atan2(a.y-c.center.y,a.x-c.center.x)),this.endAngle=h(Math.atan2(l.y-c.center.y,l.x-c.center.x)),this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this._startAngle,this._endAngle,this.clockwise)},e.prototype.getPointAtAngle=function(t){var n=this._getInternalAngle(t),i=this.center.x+this.radius*Math.cos(n),o=this.center.y+this.radius*Math.sin(n);return new Z(i,o)},e.prototype.getQuadrantPoints=function(){var t,n,i=[],o=this._getInternalAngle(this.startAngle),a=this._getInternalAngle(this.endAngle),s=[0,Math.PI/2,Math.PI,3*Math.PI/2];try{for(var l=kS(s),c=l.next();!c.done;c=l.next()){var u=c.value,h=this._getInternalAngle(u);xe.isBetweenAngle(h,o,a,this.clockwise)&&i.push(this.getPointAtAngle(u))}}catch(d){t={error:d}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return i},e.prototype.nearestPoint=function(t){var n=new Z(t.x,t.y),i=n.x-this.center.x,o=n.y-this.center.y,a=Math.hypot(i,o);if(a<1e-12)return this.startPoint.clone();var s=Math.atan2(o,i),l=this.clockwise?this._mirrorAngle(xe.normalizeAngle(s)):xe.normalizeAngle(s),c=this._getInternalAngle(l),u=this._getInternalAngle(this.startAngle),h=this._getInternalAngle(this.endAngle);if(xe.isBetweenAngle(c,u,h,this.clockwise))return this.getPointAtAngle(l);var d=n.distanceToSquared(this.startPoint),p=n.distanceToSquared(this.endPoint);return d<=p?this.startPoint.clone():this.endPoint.clone()},e.prototype.inwardAlignment=function(t,n){var i=n.x-t.x,o=n.y-t.y;if(i*i+o*o<1e-24)return 0;var a=this.radius>0?this.radius:1,s=Math.max(1e-16,1e-12*a*a),l=this.startPoint.distanceToSquared(t)<=s,c=this.endPoint.distanceToSquared(t)<=s;if(!l&&!c)return 0;var u=this.getPoints(8);if(u.length<3)return 0;var h=l&&!c?u[1]:u[u.length-2],d=h.x-t.x,p=h.y-t.y,f=Math.hypot(d,p);return f>1e-18?(i*d+o*p)/f:0},e.prototype.perpendicularPoints=function(t){var n,i,o=new Z(t.x,t.y),a=o.x-this.center.x,s=o.y-this.center.y,l=Math.hypot(a,s);if(l<1e-12)return[];var c=a/l,u=s/l,h=[new Z(this.center.x+c*this.radius,this.center.y+u*this.radius),new Z(this.center.x-c*this.radius,this.center.y-u*this.radius)],d=[],p=this._getInternalAngle(this.startAngle),f=this._getInternalAngle(this.endAngle);try{for(var m=kS(h),g=m.next();!g.done;g=m.next()){var y=g.value,b=Math.atan2(y.y-this.center.y,y.x-this.center.x),v=this.clockwise?this._mirrorAngle(xe.normalizeAngle(b)):xe.normalizeAngle(b),x=this._getInternalAngle(v);(this.closed||xe.isBetweenAngle(x,p,f,this.clockwise))&&d.push(y)}}catch(w){n={error:w}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}return d},e.prototype.tangentPoints=function(t){var n,i,o=[],a=t.x-this.center.x,s=t.y-this.center.y,l=Math.hypot(a,s),c=this.radius;if(l<c)return o;var u=Math.acos(c/l),h=Math.atan2(s,a),d=[h+u,h-u],p=this._getInternalAngle(this.startAngle),f=this._getInternalAngle(this.endAngle);try{for(var m=kS(d),g=m.next();!g.done;g=m.next()){var y=g.value,b=this.clockwise?this._mirrorAngle(xe.normalizeAngle(y)):xe.normalizeAngle(y),v=this._getInternalAngle(b);(this.closed||xe.isBetweenAngle(v,p,f,this.clockwise))&&o.push(this.getPointAtAngle(b))}}catch(x){n={error:x}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}return o},e.prototype.getPoints=function(t){t===void 0&&(t=100);var n=[],i=this.deltaAngle,o=this._getInternalAngle(this.startAngle);if(this.closed&&(i=Ge,o=0),this.clockwise)for(var a=0;a<=t;a++){var s=o-i*(a/t),l=this._clockwise?this._mirrorAngle(s):s,c=this.getPointAtAngle(l);n.push(new Z(c.x,c.y))}else for(var a=0;a<=t;a++){var s=o+i*(a/t),l=this._clockwise?this._mirrorAngle(s):s,c=this.getPointAtAngle(l);n.push(new Z(c.x,c.y))}return n},e.prototype.tessellate=function(t){var n,i=this.closed?Ge:this.deltaAngle,o=e.segmentCount(this.radius,i,OS(OS({},t),{minSegments:(n=t?.minSegments)!==null&&n!==void 0?n:this.closed?8:3}));return this.getPoints(o)},e.resolveCircleSides=function(t){return t==null||!Number.isFinite(t)?e.DEFAULT_CIRCLE_SIDES:ti(Math.round(t),e.MIN_CIRCLE_SIDES,e.MAX_CIRCLE_SIDES)},e.resolveTessellateOptions=function(t){var n,i=e.resolveCircleSides(t?.circleSides),o=Math.max(1,Math.round((n=t?.maxSegments)!==null&&n!==void 0?n:i));return{deviation:t?.deviation,circleSides:i,minSegments:t?.minSegments,maxSegments:o}},e.chordDeviationFromRadius=function(t,n){n===void 0&&(n=e.DEFAULT_CIRCLE_SIDES);var i=Math.abs(t),o=e.resolveCircleSides(n);return i<=Pt?Pt:Math.max(Pt,i*(1-Math.cos(Math.PI/o)))},e.segmentCount=function(t,n,i){var o,a,s=e.resolveTessellateOptions(i),l=Math.abs(n),c=l>=Ge-1e-8,u=Math.max(1,Math.round((o=s.minSegments)!==null&&o!==void 0?o:c?8:3)),h=Math.max(u,s.maxSegments),d=Math.abs(t);if(d<=Pt||l<=Pt)return u;var p=(a=s.deviation)!==null&&a!==void 0?a:e.chordDeviationFromRadius(d,s.circleSides),f=1-p/d;if(!Number.isFinite(f)||f>=1)return h;if(f<=-1)return u;var m=2*Math.acos(f);return m<=Pt?h:ti(Math.ceil(l/m),u,h)},e.DEFAULT_CIRCLE_SIDES=100,e.MIN_CIRCLE_SIDES=8,e.MAX_CIRCLE_SIDES=2e4,e})(ea)});function BS(r,e){if(Aie(r)){var t=iie(r,e);return t?[t]:[]}var n=Cj(r),i=n.numberOfVertices;if(i<2)return[];var o=Pie(n,e);return o?[o]:[]}function Aj(r){return Cj(r)}function iie(r,e){var t,n,i=oie(r);if(i.length===0)return null;var o=[];try{for(var a=rie(i),s=a.next();!s.done;s=a.next()){var l=s.value,c=sie(l,e);if(!c)return null;o.push(c)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var u=aie(r),h=hie(o,u,r.closed,e);if(h.length<2)return null;var d=new Ot;return h.forEach(function(p,f){d.addVertexAt(f,{x:p.x,y:p.y})}),d.closed=r.closed,d}function oie(r){for(var e,t=[],n=r.numberOfVertices,i=r.closed?n:n-1,o=0;o<i;o++){var a=r.vertices[o],s=r.vertices[(o+1)%n];Ce.isPositive(Math.abs((e=a.bulge)!==null&&e!==void 0?e:0))?t.push({kind:"arc",arc:new Ke(a,s,a.bulge)}):t.push({kind:"line",start:new Z(a.x,a.y),end:new Z(s.x,s.y)})}return t}function aie(r){for(var e=[],t=0;t<r.numberOfVertices;t++)e.push(r.getPointAt(t));return e}function sie(r,e){if(r.kind==="line"){var t=uie(r.start,r.end,e);return t?yI({kind:"line"},t):null}var n=lie(r.arc,r.arc.startPoint,r.arc.endPoint,e);return n?{kind:"arc",arc:n}:null}function lie(r,e,t,n){var i=cie(r,e,t,n),o=r.radius+i;return Ce.isNonPositive(o)?null:new Ke(r.center,o,r.startAngle,r.endAngle,r.clockwise)}function cie(r,e,t,n){var i=t.x-e.x,o=t.y-e.y,a=Math.hypot(i,o);if(Ce.isNonPositive(a))return r.clockwise?-n:n;var s=-o/a,l=i/a,c=r.center.x-(e.x+t.x)/2,u=r.center.y-(e.y+t.y)/2,h=c*s+u*l>0;return h?-n:n}function uie(r,e,t){var n=e.x-r.x,i=e.y-r.y,o=Math.hypot(n,i);if(Ce.isNonPositive(o))return null;var a=-i/o*t,s=n/o*t;return{start:new Z(r.x+a,r.y+s),end:new Z(e.x+a,e.y+s),dx:n,dy:i}}function hie(r,e,t,n){var i,o,a,s=r.length;if(s===0)return[];for(var l=die(r,e,t,n),c=[(o=(i=l[0].nextSegmentStart)===null||i===void 0?void 0:i.clone())!==null&&o!==void 0?o:l[0].point.clone()],u=0;u<s;u++){var h=r[u],d=u===s-1&&!t?{point:yie(h)}:l[(u+1)%s];if(u>0&&l[u].filletPoints&&l[u].filletPoints.forEach(function(y){return c.push(y.clone())}),h.kind==="arc")for(var p=(a=l[u].nextSegmentStart)!==null&&a!==void 0?a:l[u].point,f=d.point,m=pie(h.arc,p,f,Math.max(16,32)),g=1;g<m.length;g++)c.push(m[g]);else c.push(d.point.clone())}return Tj(c)}function die(r,e,t,n){for(var i=r.length,o=[],a=0;a<i;a++)a===0?o.push(t?_j(r[i-1],r[0],e[0],n):{point:gie(r[0])}):o.push(_j(r[a-1],r[a],e[a],n));return o}function pie(r,e,t,n){for(var i=r.nearestPoint(e),o=r.nearestPoint(t),a=bI(r,i),s=bI(r,o),l=mie(r,a,s),c=[],u=0;u<=n;u++){var h=u/n,d=r.clockwise?a-l*h:a+l*h;c.push(r.getPointAtAngle(fie(r,d)))}return c}function bI(r,e){return Math.atan2(e.y-r.center.y,e.x-r.center.x)}function fie(r,e){var t=xe.normalizeAngle(e);return r.clockwise?vI(t):t}function vI(r){var e=r*180/Math.PI;return(360-e)%360*(Math.PI/180)}function mie(r,e,t){if(r.clockwise){var n=e-t;return Ce.isNonPositive(n)&&(n+=Ge),n}var i=t-e;return Ce.isNonPositive(i)&&(i+=Ge),i}function gie(r){return r.kind==="line"?r.start.clone():r.arc.startPoint.clone()}function yie(r){return r.kind==="line"?r.end.clone():r.arc.endPoint.clone()}function _j(r,e,t,n){return r.kind==="line"&&e.kind==="line"?{point:xI({start:r.start,end:r.end,dx:r.dx,dy:r.dy},{start:e.start,end:e.end,dx:e.dx,dy:e.dy})}:r.kind==="line"&&e.kind==="arc"?Sj(r,e.arc,t,n,!0):r.kind==="arc"&&e.kind==="line"?Sj(e,r.arc,t,n,!1):r.kind==="arc"&&e.kind==="arc"?bie(r.arc,e.arc,t,n):{point:t.clone()}}function bie(r,e,t,n){var i=Ej(r.endPoint,e.startPoint),o=Sie(r,e),a=o.filter(function(u){return RS(r,u)&&RS(e,u)});if(a.length>0)return{point:Pj(a,i)};var s=r.endPoint.clone(),l=e.startPoint.clone(),c=Mj(t,Math.abs(n),s,l);return{point:s,filletPoints:c,nextSegmentStart:l}}function Sj(r,e,t,n,i){var o=Ej(i?r.end:r.start,i?e.startPoint:e.endPoint),a=_ie(r,e,o);if(xie(r,a)&&RS(e,a))return{point:a};var s=vie(r,t,n),l=i?e.startPoint.clone():e.endPoint.clone(),c=Mj(t,Math.abs(n),i?s:l,i?l:s);return i?{point:s,filletPoints:c,nextSegmentStart:l}:{point:l,filletPoints:c,nextSegmentStart:s}}function vie(r,e,t){var n=Math.hypot(r.dx,r.dy),i=-r.dy/n*t,o=r.dx/n*t;return new Z(e.x+i,e.y+o)}function xie(r,e){var t=Math.hypot(r.dx,r.dy);if(Ce.isNonPositive(t))return!1;var n=r.dx/t,i=r.dy/t,o=e.x-r.start.x,a=e.y-r.start.y,s=Math.abs(o*i-a*n);return Ce.equalToZero(s)}function Mj(r,e,t,n){var i=Math.atan2(t.y-r.y,t.x-r.x),o=Math.atan2(n.y-r.y,n.x-r.x),a=wie(i,o);if(Ce.equalToZero(Math.abs(a)))return[];for(var s=[],l=Math.max(2,Math.ceil(Math.abs(a)/Math.PI*16)),c=1;c<l;c++){var u=c/l,h=i+a*u;s.push(new Z(r.x+e*Math.cos(h),r.y+e*Math.sin(h)))}return s}function wie(r,e){for(var t=e-r;t>Math.PI;)t-=Ge;for(;t<=-Math.PI;)t+=Ge;return t}function _ie(r,e,t){var n=Math.hypot(r.dx,r.dy);if(Ce.isNonPositive(n))return t.clone();var i=r.dx/n,o=r.dy/n,a=r.start.x-e.center.x,s=r.start.y-e.center.y,l=2*(a*i+s*o),c=a*a+s*s-e.radius*e.radius,u=l*l-4*c;if(u<0)return t.clone();var h=Math.sqrt(u),d=[(-l-h)/2,(-l+h)/2].map(function(f){return new Z(r.start.x+i*f,r.start.y+o*f)}),p=d.filter(function(f){return RS(e,f)});return Pj(p.length>0?p:d,t)}function RS(r,e){var t=Math.abs(Math.hypot(e.x-r.center.x,e.y-r.center.y)-r.radius);if(Ce.isPositive(t))return!1;var n=bI(r,e),i=r.clockwise?vI(xe.normalizeAngle(r.startAngle)):xe.normalizeAngle(r.startAngle),o=r.clockwise?vI(xe.normalizeAngle(r.endAngle)):xe.normalizeAngle(r.endAngle);return xe.isBetweenAngle(n,i,o,r.clockwise)}function Sie(r,e){var t=e.center.x-r.center.x,n=e.center.y-r.center.y,i=Math.hypot(t,n);if(Ce.isNonPositive(i))return[];var o=r.radius+e.radius,a=Math.abs(r.radius-e.radius);if(i>o+DS)return[];if(i<a-DS)return[];var s=(r.radius*r.radius-e.radius*e.radius+i*i)/(2*i),l=r.radius*r.radius-s*s;if(l<-DS)return[];var c=r.center.x+s*t/i,u=r.center.y+s*n/i;if(l<=DS)return[new Z(c,u)];var h=Math.sqrt(l),d=-n*h/i,p=t*h/i;return[new Z(c+d,u+p),new Z(c-d,u-p)]}function Pj(r,e){for(var t=r[0],n=t.distanceToSquared(e),i=1;i<r.length;i++){var o=r[i].distanceToSquared(e);o<n&&(t=r[i],n=o)}return t.clone()}function Ej(r,e){return new Z((r.x+e.x)/2,(r.y+e.y)/2)}function Aie(r){for(var e,t=r.numberOfVertices,n=r.closed?t:t-1,i=0;i<n;i++){var o=r.vertices[i];if(Ce.isPositive(Math.abs((e=o.bulge)!==null&&e!==void 0?e:0)))return!0}return!1}function Cj(r){var e=Mie(r.vertices.map(function(t){return new Z(t.x,t.y)}),r.closed);return e.length===r.numberOfVertices?r:new Ot(e.map(function(t){return{x:t.x,y:t.y}}),r.closed)}function Mie(r,e){var t=Tj(r);if(!e||t.length<2)return t;var n=t[0],i=t[t.length-1];return Ce.isNonPositive(Math.hypot(n.x-i.x,n.y-i.y))&&t.pop(),t}function Tj(r){var e=[];return r.forEach(function(t){var n=e[e.length-1];(!n||Ce.isPositive(Math.hypot(n.x-t.x,n.y-t.y)))&&e.push(new Z(t.x,t.y))}),e}function Pie(r,e){for(var t=[],n=0;n<r.numberOfVertices;n++)t.push(r.getPointAt(n));var i=Eie(t,r.closed,e);if(i.length===0)return null;var o=[];if(r.closed){if(i.length<2)return null;for(var a=i.length,n=0;n<a;n++){var s=i[(n-1+a)%a],l=i[n];o.push(xI(s,l))}}else{o.push(i[0].start);for(var n=1;n<i.length;n++)o.push(xI(i[n-1],i[n]));o.push(i[i.length-1].end)}var c=new Ot;return o.forEach(function(u,h){c.addVertexAt(h,{x:u.x,y:u.y})}),c.closed=r.closed,c}function Eie(r,e,t){for(var n=[],i=e?r.length:r.length-1,o=0;o<i;o++){var a=r[o],s=r[e?(o+1)%r.length:o+1],l=s.x-a.x,c=s.y-a.y,u=Math.hypot(l,c);if(!Ce.isNonPositive(u)){var h=-c/u*t,d=l/u*t;n.push({start:new Z(a.x+h,a.y+d),end:new Z(s.x+h,s.y+d),dx:l,dy:c})}}return n}function xI(r,e){var t=r.dx*e.dy-r.dy*e.dx;if(Ce.equalToZero(t))return new Z((r.end.x+e.start.x)/2,(r.end.y+e.start.y)/2);var n=e.start.x-r.start.x,i=e.start.y-r.start.y,o=(n*e.dy-i*e.dx)/t;return new Z(r.start.x+o*r.dx,r.start.y+o*r.dy)}var yI,rie,DS,wI=W(()=>{_m();Ii();Jc();Tv();yI=function(){return yI=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},yI.apply(this,arguments)},rie=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},DS=1e-6});function kj(r,e){var t=r[r.length-1];if(t){var n=t.x-e.x,i=t.y-e.y;if(n*n+i*i<=Pt*Pt)return}r.push(new Z(e.x,e.y))}var Cie,_I,Ot,Tv=W(()=>{Yr();Ii();Pv();Jc();Xd();wI();Cie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),_I=function(){return _I=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},_I.apply(this,arguments)},Ot=(function(r){Cie(e,r);function e(t,n){t===void 0&&(t=null),n===void 0&&(n=!1);var i=r.call(this)||this;return i._vertices=t||new Array,i._closed=n,i}return Object.defineProperty(e.prototype,"vertices",{get:function(){return this._vertices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfVertices",{get:function(){return this._vertices.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return this._closed},set:function(t){this._closed=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){if(this.numberOfVertices>0){var t=this._vertices[0];return new Z(t.x,t.y)}throw new Error("Start point does not exist in an empty polyline.")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){var t=this.numberOfVertices;if(t>0)if(this.closed){var n=this._vertices[0];return new Z(n.x,n.y)}else{var n=this._vertices[t-1];return new Z(n.x,n.y)}throw new Error("End point does not exist in an empty polyline.")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){for(var t=0,n=this._vertices.length,i=0;i<n;++i){var o=this._vertices[i],a=null;if(i<n-1?a=this._vertices[i+1]:i==n-1&&this.closed&&(a=this._vertices[0]),a)if(o.bulge){var s=new Ke(o,a,o.bulge);t+=s.length}else t+=new Z(o.x,o.y).distanceTo(a)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){if(!this._closed||this._vertices.length<3)return 0;var t=this.getPoints(128);return MS(t)},enumerable:!1,configurable:!0}),e.prototype.addVertexAt=function(t,n){t<=0?this._vertices.unshift(n):this._vertices.splice(t,0,n),this._boundingBoxNeedsUpdate=!0},e.prototype.removeVertexAt=function(t){if(t<0||t>=this._vertices.length)throw new Error("Index ".concat(t," is out of bounds. Valid range is 0 to ").concat(this._vertices.length-1,"."));this._vertices.splice(t,1),this._boundingBoxNeedsUpdate=!0},e.prototype.reset=function(t,n){t?n!==void 0&&n>=0&&n<this._vertices.length&&(this._vertices=this._vertices.slice(0,n),this._boundingBoxNeedsUpdate=!0):(this._vertices=new Array,this._boundingBoxNeedsUpdate=!0)},e.prototype.getPointAt=function(t){var n=this._vertices[t];return new Z(n.x,n.y)},e.prototype.calculateBoundingBox=function(){var t=this.getPoints(100);return new ct().setFromPoints(t)},e.prototype.transform=function(t){var n=t.determinant()<0;return this._vertices.forEach(function(i){var o=new Z(i).applyMatrix2d(t);i.x=o.x,i.y=o.y,n&&i.bulge!=null&&(i.bulge=-i.bulge)}),this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return new e(this._vertices.map(function(t){return _I({},t)}),this._closed)},e.prototype.getPoints3d=function(t,n){var i=[],o=this.getPoints(t);return o.forEach(function(a){return i.push(new k().set(a.x,a.y,n))}),i},e.prototype.getPoints=function(t){for(var n=[],i=this._vertices.length,o=0;o<i;++o){var a=this._vertices[o];if(a.bulge){var s=null;if(o<i-1?s=this._vertices[o+1]:o==i-1&&this.closed&&(s=this._vertices[0]),s)for(var l=new Ke(a,s,a.bulge),c=l.getPoints(t),u=c.length,h=0;h<u;++h){var d=c[h];n.push(new Z(d.x,d.y))}}else n.push(new Z(a.x,a.y)),o==i-1&&this.closed&&n.push(n[0])}return n},e.prototype.tessellate=function(t){for(var n=[],i=this._vertices.length,o=0;o<i;++o){var a=this._vertices[o];if(a.bulge){var s=null;if(o<i-1?s=this._vertices[o+1]:o===i-1&&this.closed&&(s=this._vertices[0]),s)for(var l=new Ke(a,s,a.bulge),c=l.tessellate(t),u=0;u<c.length;++u)kj(n,c[u])}else kj(n,a),o===i-1&&this.closed&&n.length>0&&n.push(n[0].clone())}return n},e.prototype.offset=function(t){return BS(this,t)},e})(ea)});function km(r,e,t){var n=Math.hypot(e.x,e.y);if(Ce.isNonPositive(n))return null;var i=-e.y/n*t,o=e.x/n*t;return new k(r.x+i,r.y+o,r.z)}function FS(r,e,t){var n;if(r.length<2)return null;var i=Aj(new Ot(r.map(function(a){return{x:a.x,y:a.y}}),e)),o=BS(i,t);return(n=o[0])!==null&&n!==void 0?n:null}var Ij=W(()=>{Tv();wI();Yr();Vd()});function US(r,e,t,n){if(r.length<2||Ce.equalToZero(t))return null;var i=Oj(r,n),o=i.points,a=i.tangents;if(o.length<2)return null;var s=a??Tie(o,e),l=kie(o,s,t),c=e?Lie(l):Iie(l);if(c.length<2)return null;var u=new Ot;return c.forEach(function(h,d){u.addVertexAt(d,{x:h.x,y:h.y})}),u.closed=e,u}function Tie(r,e){for(var t=r.length,n=new Array(t),i=0;i<t;i++){var o=0,a=0;if(e){var s=r[(i-1+t)%t],l=r[(i+1)%t];o=l.x-s.x,a=l.y-s.y}else i===0?(o=r[1].x-r[0].x,a=r[1].y-r[0].y):i===t-1?(o=r[t-1].x-r[t-2].x,a=r[t-1].y-r[t-2].y):(o=r[i+1].x-r[i-1].x,a=r[i+1].y-r[i-1].y);var c=Math.hypot(o,a);Ce.isNonPositive(c)?n[i]=new Z(1,0):n[i]=new Z(o/c,a/c)}return n}function kie(r,e,t){return r.map(function(n,i){var o=e[i],a=-o.y*t,s=o.x*t;return new Z(n.x+a,n.y+s)})}function Iie(r){var e=zS(r);if(e.length<3)return e;for(;;){var t=Lj(e,!1);if(!t||(e=zS(Im(Im(Im([],NS(e.slice(0,t.segmentA+1)),!1),[t.point],!1),NS(e.slice(t.segmentB+1)),!1)),e.length<2))break}return e}function Lie(r){var e=zS(r);if(e.length<4)return e;for(;;){var t=Lj(e,!0);if(!t||(e=zS(Im(Im(Im([],NS(e.slice(0,t.segmentA+1)),!1),[t.point],!1),NS(e.slice(t.segmentB+1)),!1)),e.length<3))break}return e}function Lj(r,e){var t=e?r.length:r.length-1;if(t<2)return null;for(var n=0;n<t;n++)for(var i=r[n],o=r[(n+1)%r.length],a=n+1;a<t;a++)if(!Oie(n,a,t,e)){var s=r[a],l=r[(a+1)%r.length],c=Die(i,o,s,l);if(c)return{point:c,segmentA:n,segmentB:a}}return null}function Oie(r,e,t,n){return!!(e===r||e===r+1||n&&r===0&&e===t-1)}function Die(r,e,t,n){var i=e.x-r.x,o=e.y-r.y,a=n.x-t.x,s=n.y-t.y,l=i*s-o*a;if(Ce.equalToZero(l))return null;var c=t.x-r.x,u=t.y-r.y,h=(c*s-u*a)/l,d=(c*o-u*i)/l,p=Ji.equalPointTol;return h<-p||h>1+p||d<-p||d>1+p?null:new Z(r.x+h*i,r.y+h*o)}function Oj(r,e){var t=[],n=[],i=e!=null&&e.length===r.length;return r.forEach(function(o,a){var s=t[t.length-1];if((!s||Ce.isPositive(Math.hypot(s.x-o.x,s.y-o.y)))&&(t.push(new Z(o.x,o.y)),i)){var l=e[a];n.push(new Z(l.x,l.y))}}),{points:t,tangents:i?n:void 0}}function zS(r){return Oj(r).points}var NS,Im,Dj=W(()=>{Tv();_m();Vd();NS=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Im=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))}});var Ii=W(()=>{iI();lI();xm();cj();dj();Vd();Ij();Dj();Pv()});var Rie,pr,Rj=W(()=>{Yr();Ii();Pv();TS();Rie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),pr=(function(r){Rie(e,r);function e(){var t=r.call(this)||this;return t._loops=[],t}return e.prototype.add=function(t){this._loops.push(t),this._boundingBoxNeedsUpdate=!0},Object.defineProperty(e.prototype,"loops",{get:function(){return this._loops},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outter",{get:function(){if(this._loops.length>0)return this._loops[0]},enumerable:!1,configurable:!0}),e.prototype.calculateBoundingBox=function(){var t=this.outter;return t?t.box:new ct},e.prototype.transform=function(t){return this._loops.forEach(function(n){n.transform(t)}),this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){var t=new e;return this._loops.forEach(function(n){t.add(n.clone())}),t},e.prototype.getPoints=function(t){for(var n=[],i=0;i<this.loops.length;++i){var o=this.loops[i],a=o.getPoints(t);n.push(a)}return n},e.prototype.tessellate=function(t){return this.loops.map(function(n){return n.tessellate(t)})},e.prototype.buildHierarchy=function(t){for(var n,i=this.tessellate(t),o=this.calculateBoundaryBoxes(i),a=this.sortBoundaryBoxesByAreas(o),s=new Map,l=a.length,c=0;c<l;c++)s.set(a[c],{index:a[c],children:[]});for(var u={index:-1,children:[]},c=0;c<l;c++){for(var h=a[c],d=i[h],p=o[h],f=c+1;f<l;f++){var m=a[f],g=i[m],y=o[m];if(y.containsBox(p)&&Rn.isPointInPolygon(d[0],g)){(n=s.get(m))===null||n===void 0||n.children.push(s.get(h));break}}f===l&&u.children.push(s.get(h))}return u},Object.defineProperty(e.prototype,"area",{get:function(){if(this._loops.length===0)return 0;for(var t=0,n=0;n<this._loops.length;n++){var i=this._loops[n],o=i.getPoints(128),a=Mv(o);n===0?t+=Math.abs(a):t-=Math.abs(a)}return t},enumerable:!1,configurable:!0}),e.prototype.calculateBoundaryBoxes=function(t){var n=[];return t.forEach(function(i){n.push(new ct().setFromPoints(i))}),n},e.prototype.sortBoundaryBoxesByAreas=function(t){var n=[];t.forEach(function(o,a){var s=o.size,l=s.width*s.height;n.push({area:l,index:a})}),n.sort(function(o,a){return o.area-a.area});var i=[];return n.forEach(function(o){i.push(o.index)}),i},e})(mh)});var Bie,Bj,Fj=W(()=>{Yr();gI();Bie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Bj=(function(r){Bie(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.translate=function(t){return this.transform(new Ie().makeTranslation(t.x,t.y,t.z))},Object.defineProperty(e.prototype,"box",{get:function(){return(this._box==null||this._boundingBoxNeedsUpdate)&&(this._box=this.calculateBoundingBox(),this._boundingBoxNeedsUpdate=!1),this._box},enumerable:!1,configurable:!0}),e})(CS)});function Nie(r,e,t){var n=t.x-e.x,i=t.y-e.y,o=t.z-e.z,a=r.x-e.x,s=r.y-e.y,l=r.z-e.z,c=n*n+i*i+o*o;if(c<=Pt*Pt)return a*a+s*s+l*l;var u=ti((a*n+s*i+l*o)/c,0,1),h=a-n*u,d=s-i*u,p=l-o*u;return h*h+d*d+p*p}function zie(r,e,t){if(t<=1)return[r];for(var n=[],i=0;i<t;i++)n.push(i===t-1?e:r+(e-r)*i/(t-1));return n}function Uie(r,e,t){for(var n=[],i=[],o=0,a=0;a<r.length;a++)for(n.push(r[a]),i.push(e[a]);o<t.length&&t[o].index===a;)n.push(t[o].t),i.push(t[o].point),o++;return{params:n,points:i}}var Fie,as,Lm=W(()=>{Ii();Fj();Fie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),as=(function(r){Fie(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.tessellateParametricCurve=function(t,n,i,o){var a=Math.max(2,Math.round(o.maxSegments)),s=Math.max(1,Math.round(o.minSegments)),l=Math.max(0,o.deviation)*Math.max(0,o.deviation);if(!Number.isFinite(t)||!Number.isFinite(n))return[i(0)];if(Math.abs(n-t)<=Pt)return[i(t)];for(var c=Math.min(a,Math.max(2,s+1)),u=Math.min(a,Math.max(c,8)),h=zie(t,n,u),d=[],p=0;p<h.length;p++)d.push(i(h[p]));for(var f=d.length,m=0;m<8&&f<a;m++){for(var g=[],p=0;p<h.length-1&&!(f>=a);p++){var y=(h[p]+h[p+1])/2,b=i(y);f++,Nie(b,d[p],d[p+1])>l&&g.push({index:p,t:y,point:b})}if(g.length===0)break;var v=Uie(h,d,g);h=v.params,d.length=0;for(var p=0;p<v.points.length;p++)d.push(v.points[p])}return d},e})(Bj)});var jie,jS,SI,Pn,Nj,VS=W(()=>{zt();Yr();Ii();Jc();Cv();Lm();jie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),jS=function(){return jS=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},jS.apply(this,arguments)},SI=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pn=(function(r){jie(e,r);function e(t,n,i,o,a,s){s===void 0&&(s=G.X_AXIS);var l=r.call(this)||this;return l.center=t,l.radius=n,l.startAngle=i,l.endAngle=o,l.normal=a,l.refVec=s,(o-i)%Ge==0?(l.startAngle=0,l.endAngle=Ge):(l.startAngle=i,l.endAngle=o),l}return e.computeCenterPoint=function(t,n,i){var o,a;return(a=(o=pI(t,i,n))===null||o===void 0?void 0:o.center)!==null&&a!==void 0?a:null},e.tryCreateByThreePoints=function(t,n,i){var o,a,s,l=pI(t,i,n);if(!l)return null;var c=l.center,u=l.radius,h=new G(t.x-c.x,t.y-c.y,((o=t.z)!==null&&o!==void 0?o:0)-c.z),d=new G(i.x-c.x,i.y-c.y,((a=i.z)!==null&&a!==void 0?a:0)-c.z),p=new G(n.x-c.x,n.y-c.y,((s=n.z)!==null&&s!==void 0?s:0)-c.z);if(h.lengthSq()===0||p.lengthSq()===0)return null;var f=new G().crossVectors(h,p);if(f.lengthSq()===0&&(f.crossVectors(h,d),f.lengthSq()===0))return null;f.normalize();var m=h.clone().normalize(),g=new G().crossVectors(f,m),y=function(v){return xe.normalizeAngle(Math.atan2(v.dot(g),v.dot(m)))};xe.isAngleOnCcwSweep(0,y(d),y(p))||(f.negate(),g.negate());var b=y(p);return Ce.equalToZero(b)&&(b=Ge),new e(c,u,0,b,f,m)},e.createByThreePoints=function(t,n,i){return e.tryCreateByThreePoints(t,n,i)},Object.defineProperty(e.prototype,"center",{get:function(){return this._center},set:function(t){this._center=new k(t.x,t.y,t.z||0),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){if(t<0)throw Qn.ILLEGAL_PARAMETERS;this._radius=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){this._startAngle=xe.normalizeAngle(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._endAngle},set:function(t){this._endAngle=this.startAngle==0&&t==Ge?t:xe.normalizeAngle(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deltaAngle",{get:function(){return xe.normalizeAngle(this.endAngle-this.startAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLargeArc",{get:function(){return Math.abs(this.deltaAngle)>Math.PI?1:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clockwise",{get:function(){return this.deltaAngle<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal=new G(t.x,t.y,t.z),this._normal.normalize(),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"refVec",{get:function(){return this._refVec},set:function(t){this._refVec=new G(t.x,t.y,t.z),this._refVec.normalize(),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this.getPointAtAngle(this._startAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this.getPointAtAngle(this._endAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"midPoint",{get:function(){var t=this.startAngle,n=this.deltaAngle;this.closed&&(t=0,n=Ge);var i=t+n*.5;return this.getPointAtAngle(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.closed?2*Math.PI*this.radius:Math.abs(this.deltaAngle*this.radius)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this.closed?Math.PI*this.radius*this.radius:0},enumerable:!1,configurable:!0}),e.prototype.nearestPoint=function(t){var n=new G(t.x,t.y,t.z||0),i=this.center,o=this.normal,a=n.clone().sub(i),s=a.dot(o),l=n.clone().sub(o.clone().multiplyScalar(s)),c=l.clone().sub(i);if(c.lengthSq()===0)return this.startPoint.clone();c.normalize().multiplyScalar(this.radius);var u=i.clone().add(c),h=this.getAngle(u.clone()),d=this.startAngle,p=this.deltaAngle,f=xe.normalizeAngle(h-d);f<0&&(f=0),f>p&&(f=p);var m=this.getPointAtAngle(d+f),g=m.distanceTo(n),y=this.startPoint.distanceTo(n),b=this.endPoint.distanceTo(n);return y<g&&y<=b?this.startPoint.clone():b<g&&b<y?this.endPoint.clone():m},e.prototype.tangentPoints=function(t){var n,i,o=[],a=new G(t.x,t.y,t.z||0),s=this.center,l=this.normal,c=this.radius,u=a.clone().sub(s),h=u.dot(l),d=a.clone().sub(l.clone().multiplyScalar(h)),p=s.clone(),f=d.clone().sub(p),m=f.length();if(m<c)return o;var g=Math.acos(c/m),y=this.getAngle(d.clone()),b=[y+g,y-g];try{for(var v=SI(b),x=v.next();!x.done;x=v.next()){var w=x.value,_=xe.normalizeAngle(w-this.startAngle);_>=0&&_<=this.deltaAngle&&o.push(this.getPointAtAngle(this.startAngle+_))}}catch(A){n={error:A}}finally{try{x&&!x.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}return o},e.prototype.perpendicularPoints=function(t){var n,i,o=[],a=new G(t.x,t.y,t.z||0),s=this.center,l=this.normal,c=this.radius,u=a.clone().sub(s),h=u.dot(l),d=a.clone().sub(l.clone().multiplyScalar(h)),p=d.clone().sub(s);if(p.lengthSq()<1e-24)return o;p.normalize();var f=[s.clone().add(p.clone().multiplyScalar(c)),s.clone().sub(p.clone().multiplyScalar(c))];try{for(var m=SI(f),g=m.next();!g.done;g=m.next()){var y=g.value,b=this.getAngle(y.clone()),v=xe.normalizeAngle(b-this.startAngle);v>=0&&v<=this.deltaAngle&&o.push(new k(y.x,y.y,y.z||0))}}catch(x){n={error:x}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}return o},e.prototype.nearestTangentPoint=function(t){var n=this.tangentPoints(t);if(n.length===0)return null;var i=new k(t.x,t.y,t.z||0);return n.length===1||n[0].distanceTo(i)<n[1].distanceTo(i)?n[0]:n[1]},e.prototype.calculateBoundingBox=function(){for(var t,n,i=[this.startAngle,this.endAngle],o=0;o<2*Math.PI;o+=Math.PI/2)xe.isBetweenAngle(o,this.startAngle,this.endAngle)&&i.push(o);var a=1/0,s=1/0,l=1/0,c=-1/0,u=-1/0,h=-1/0;try{for(var d=SI(i),p=d.next();!p.done;p=d.next()){var f=p.value,m=this.getPointAtAngle(f);m.x<a&&(a=m.x),m.y<s&&(s=m.y),m.z<l&&(l=m.z),m.x>c&&(c=m.x),m.y>u&&(u=m.y),m.z>h&&(h=m.z)}}catch(g){t={error:g}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return new De({x:a,y:s,z:l},{x:c,y:u,z:h})},Object.defineProperty(e.prototype,"closed",{get:function(){return Math.abs(this.endAngle-this.startAngle)/Math.PI%2==0},enumerable:!1,configurable:!0}),e.prototype.getPoints=function(t){var n=[],i=this.deltaAngle,o=this.startAngle;this.closed&&(i=Ge,o=0);for(var a=0;a<=t;a++){var s=o+i*(a/t),l=this.getPointAtAngle(s);n.push(l)}return n},e.prototype.tessellate=function(t){var n,i=this.closed?Ge:this.deltaAngle,o=e.segmentCount(this.radius,i,jS(jS({},t),{minSegments:(n=t?.minSegments)!==null&&n!==void 0?n:this.closed?8:3}));return this.getPoints(o)},e.segmentCount=function(t,n,i){return Ke.segmentCount(t,n,i)},e.prototype.transform=function(t){var n=this.center.clone().applyMatrix4(t),i=this.startPoint.clone().applyMatrix4(t),o=this.endPoint.clone().applyMatrix4(t),a=this.getPointAtAngle(this.closed?Math.PI/2:this.startAngle+this.deltaAngle/2).clone().applyMatrix4(t),s=new G(i).sub(n).normalize(),l=n.distanceTo(i),c=new G().crossVectors(new G(i).sub(n),new G(a).sub(n)).normalize();c.lengthSq()===0&&(c=this.normal.clone().transformDirection(t));var u=function(h){var d=new G(h).sub(n);return Math.atan2(d.dot(Nj.crossVectors(c,s)),d.dot(s))};return this.center=n,this.radius=l,this.normal=c,this.refVec=s,this.startAngle=0,this.endAngle=this.closed?Ge:u(o),this._boundingBoxNeedsUpdate=!0,this},e.prototype.copy=function(t){return this.center=t.center,this.radius=t.radius,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.normal=t.normal,this.refVec=t.refVec,this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this.startAngle,this.endAngle,this.normal,this.refVec)},e.prototype.getAngle=function(t){return t.sub(this.center),Math.atan2(t.dot(Nj.crossVectors(this.refVec,this.normal)),t.dot(this.refVec))},e.prototype.getPointAtAngle=function(t){var n=this.normal,i=this.refVec,o={x:n.y*i.z-n.z*i.y,y:n.z*i.x-n.x*i.z,z:n.x*i.y-n.y*i.x},a=this.center,s=this.radius;return new k(a.x+s*(i.x*Math.cos(t)+o.x*Math.sin(t)),a.y+s*(i.y*Math.cos(t)+o.y*Math.sin(t)),a.z+s*(i.z*Math.cos(t)+o.z*Math.sin(t)))},Object.defineProperty(e.prototype,"plane",{get:function(){var t=new G(this.center).distanceTo(hh);return new jl(this.normal,t)},enumerable:!1,configurable:!0}),e.prototype.offset=function(t){var n=this.radius+t;return n<=0?null:new e(this.center,n,this.startAngle,this.endAngle,this.normal,this.refVec)},e})(as),Nj=new G});var Vie,ko,AI=W(()=>{zt();Yr();Ii();Xd();Vie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ko=(function(r){Vie(e,r);function e(t,n,i,o,a,s,l){o===void 0&&(o=0),a===void 0&&(a=Ge),s===void 0&&(s=!1),l===void 0&&(l=0);var c=r.call(this)||this;return c.center=t,c.majorAxisRadius=n,c.minorAxisRadius=i,(a-o)%Ge==0?(c.startAngle=0,c.endAngle=Ge):(c.startAngle=o,c.endAngle=a),c.clockwise=s,c.rotation=l,c}return Object.defineProperty(e.prototype,"center",{get:function(){return this._center},set:function(t){this._center=new k(t.x,t.y,t.z||0),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"majorAxisRadius",{get:function(){return this._majorAxisRadius},set:function(t){if(t<0)throw Qn.ILLEGAL_PARAMETERS;this._majorAxisRadius=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minorAxisRadius",{get:function(){return this._minorAxisRadius},set:function(t){if(t<0)throw Qn.ILLEGAL_PARAMETERS;this._minorAxisRadius=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){this._startAngle=xe.normalizeAngle(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._endAngle},set:function(t){this._endAngle=this.startAngle==0&&t==Ge?t:xe.normalizeAngle(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clockwise",{get:function(){return this._clockwise},set:function(t){this._clockwise=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deltaAngle",{get:function(){return xe.normalizeAngle(this.endAngle-this.startAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLargeArc",{get:function(){return Math.abs(this.deltaAngle)>Math.PI?1:0},enumerable:!1,configurable:!0}),e.prototype.calculateBoundingBox=function(){for(var t=100,n=1/0,i=1/0,o=-1/0,a=-1/0,s=0;s<=t;s++){var l=this.getPoint(s/t);n=Math.min(n,l.x),i=Math.min(i,l.y),o=Math.max(o,l.x),a=Math.max(a,l.y)}return new ct({x:n,y:i},{x:o,y:a})},Object.defineProperty(e.prototype,"closed",{get:function(){return this.deltaAngle==0},enumerable:!1,configurable:!0}),e.prototype.getPoint=function(t){for(var n=Math.PI*2,i=this.endAngle-this.startAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=n;for(;i>n;)i-=n;i<Number.EPSILON&&(o?i=0:i=n),this.clockwise===!0&&!o&&(i===n?i=-n:i=i-n);var a=this.startAngle+t*i,s=this.center.x+this.majorAxisRadius*Math.cos(a),l=this.center.y+this.minorAxisRadius*Math.sin(a);if(this.rotation!==0){var c=Math.cos(this.rotation),u=Math.sin(this.rotation),h=s-this.center.x,d=l-this.center.y;s=h*c-d*u+this.center.x,l=h*u+d*c+this.center.y}return new Z(s,l)},e.prototype.transform=function(t){var n=t,i=new Z(this.center).applyMatrix2d(n),o=new k(i.x,i.y,this.center.z),a=this.getPointAtAngle(0).clone().applyMatrix2d(n),s=this.getPointAtAngle(Math.PI/2).clone().applyMatrix2d(n),l=new Z(a).sub(i),c=new Z(s).sub(i),u=l.length(),h=c.length(),d=Math.atan2(l.y,l.x),p=l.clone().normalize(),f=c.clone().normalize(),m=function(b){var v=new Z(b).sub(i),x=v.dot(p),w=v.dot(f);return xe.normalizeAngle(Math.atan2(w/h,x/u))},g=n.determinant()<0?!this.clockwise:this.clockwise,y=this.closed?new e(o,u,h,0,Ge,g,d):new e(o,u,h,m(this.startPoint.clone().applyMatrix2d(n)),m(this.endPoint.clone().applyMatrix2d(n)),g,d);return this.center=y.center,this.majorAxisRadius=y.majorAxisRadius,this.minorAxisRadius=y.minorAxisRadius,this._startAngle=y._startAngle,this._endAngle=y._endAngle,this._clockwise=y._clockwise,this.rotation=y.rotation,this._boundingBoxNeedsUpdate=!0,this},e.prototype.getPointAtAngle=function(t){return this.getPoint(this.closed?t/Ge:xe.normalizeAngle(t-this.startAngle)/this.deltaAngle)},e.prototype.copy=function(t){return this.center=t.center,this.majorAxisRadius=t.majorAxisRadius,this.minorAxisRadius=t.minorAxisRadius,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.clockwise=t.clockwise,this.rotation=t.rotation,this},e.prototype.clone=function(){return new e(this.center,this.majorAxisRadius,this.minorAxisRadius,this.startAngle,this.endAngle,this.clockwise,this.rotation)},e.prototype.getFocusPoints=function(){var t=Math.max(this.majorAxisRadius,this.minorAxisRadius),n=Math.min(this.majorAxisRadius,this.minorAxisRadius);if(t-n<1e-9)return[];var i=Math.sqrt(t*t-n*n),o=Math.cos(this.rotation),a=Math.sin(this.rotation),s=this.majorAxisRadius>=this.minorAxisRadius,l=s?o:-a,c=s?a:o;return[new Z(this.center.x-i*l,this.center.y-i*c),new Z(this.center.x+i*l,this.center.y+i*c)]},e.prototype.getQuadrantPoints=function(){return this.closed?[this.getPoint(0),this.getPoint(.25),this.getPoint(.5),this.getPoint(.75)]:[]},e.prototype.nearestPoint=function(t){for(var n=new Z(t.x,t.y),i=this.getPoint(0),o=n.distanceToSquared(i),a=72,s=1;s<=a;s++){var l=this.getPoint(s/a),c=n.distanceToSquared(l);c<o&&(o=c,i=l)}return i},e.prototype.tangentPoints=function(t){var n=this,i=this._projectPointToLocal(t),o=this._findSnapAngles(i,function(a,s,l,c){var u=-n.majorAxisRadius*c,h=n.minorAxisRadius*l;return(a-i.x)*h-(s-i.y)*u});return o.map(function(a){return n.getPointAtAngle(a)})},e.prototype.perpendicularPoints=function(t){var n=this,i=this._projectPointToLocal(t),o=this._findSnapAngles(i,function(a,s,l,c){var u=n.minorAxisRadius*l,h=n.majorAxisRadius*c;return(a-i.x)*h-(s-i.y)*u});return o.map(function(a){return n.getPointAtAngle(a)})},e.prototype._projectPointToLocal=function(t){var n=t.x-this.center.x,i=t.y-this.center.y,o=Math.cos(-this.rotation),a=Math.sin(-this.rotation);return{x:n*o-i*a,y:n*a+i*o}},e.prototype._findSnapAngles=function(t,n,i){i===void 0&&(i=144);for(var o=this.majorAxisRadius,a=this.minorAxisRadius,s=this.startAngle,l=this.deltaAngle,c=[],u=function(x){var w=Math.cos(x),_=Math.sin(x);return n(o*w,a*_,w,_)},h=s,d=u(h),p=1;p<=i;p++){var f=s+l*p/i,m=u(f);if(Math.abs(d)<1e-10&&c.push(h),d*m<0){for(var g=h,y=f,b=0;b<32;b++){var v=(g+y)/2;u(g)*u(v)<=0?y=v:g=v}c.push((g+y)/2)}h=f,d=m}return c},e})(ea)});var Gie,GS,Hie,yi,MI=W(()=>{zt();Yr();Ii();Vd();Jc();VS();Lm();Gie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),GS=function(){return GS=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},GS.apply(this,arguments)},Hie=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yi=(function(r){Gie(e,r);function e(t,n,i,o,a,s,l){s===void 0&&(s=0),l===void 0&&(l=Ge);var c=r.call(this)||this;c.center=t,c.normal=n,c.majorAxis=i,c.majorAxisRadius=o,c.minorAxisRadius=a;var u=Math.abs(l-s);return Math.abs(u-Ge)<1e-10||Math.abs(u-2*Ge)<1e-10?(c.startAngle=0,c.endAngle=Ge):(c.startAngle=s,c.endAngle=l),c}return Object.defineProperty(e.prototype,"center",{get:function(){return this._center},set:function(t){this._center=new k(t.x,t.y,t.z||0),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"majorAxisRadius",{get:function(){return this._majorAxisRadius},set:function(t){if(t<0)throw Qn.ILLEGAL_PARAMETERS;this._majorAxisRadius=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minorAxisRadius",{get:function(){return this._minorAxisRadius},set:function(t){if(t<0)throw Qn.ILLEGAL_PARAMETERS;this._minorAxisRadius=t,this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){this._startAngle=xe.normalizeAngle(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._endAngle},set:function(t){this._endAngle=this.startAngle==0&&t==Ge?t:xe.normalizeAngle(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deltaAngle",{get:function(){var t=this.endAngle-this.startAngle;return Math.abs(t-Ge)<1e-10?Ge:xe.normalizeAngle(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLargeArc",{get:function(){return Math.abs(this.deltaAngle)>Math.PI?1:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clockwise",{get:function(){return this.deltaAngle<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal=new G(t.x,t.y,t.z),this._normal.normalize(),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"majorAxis",{get:function(){return this._majorAxis},set:function(t){this._majorAxis=new G(t.x,t.y,t.z),this._majorAxis.normalize(),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minorAxis",{get:function(){return new G().crossVectors(this.normal,this.majorAxis).normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this.getPointAtAngle(this._startAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this.getPointAtAngle(this._endAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"midPoint",{get:function(){var t=this.startAngle,n=this.deltaAngle;(this.closed||Math.abs(n-Ge)<1e-10)&&(t=0,n=Ge);var i=t+n/2;return this.getPointAtAngle(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCircular",{get:function(){return Ce.equal(this.majorAxisRadius,this.minorAxisRadius)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){if(this.isCircular)return this.majorAxisRadius*Math.abs(this.deltaAngle);for(var t=1e3,n=this.deltaAngle/t,i=0,o=this.getPointAtAngle(this.startAngle),a=1;a<=t;a++){var s=this.startAngle+a*n,l=this.getPointAtAngle(s),c=l.x-o.x,u=l.y-o.y,h=l.z-o.z;i+=Math.sqrt(c*c+u*u+h*h),o=l}return i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return Math.abs(this.deltaAngle-Ge)>=1e-10?0:Math.PI*this.majorAxisRadius*this.minorAxisRadius},enumerable:!1,configurable:!0}),e.prototype.calculateBoundingBox=function(){var t,n;if(this.majorAxis.equals(G.X_AXIS)||this.majorAxis.equals(G.Y_AXIS)||this.majorAxis.isParallelTo(G.X_AXIS)||this.majorAxis.isParallelTo(G.Y_AXIS)){for(var i=[this.startAngle,this.endAngle],o=0;o<2*Math.PI;o+=Math.PI/2)xe.isBetweenAngle(o,this.startAngle,this.endAngle)&&i.push(o);var a=1/0,s=1/0,l=1/0,c=-1/0,u=-1/0,h=-1/0;try{for(var d=Hie(i),p=d.next();!p.done;p=d.next()){var f=p.value,m=this.getPointAtAngle(f);m.x<a&&(a=m.x),m.y<s&&(s=m.y),m.z<l&&(l=m.z),m.x>c&&(c=m.x),m.y>u&&(u=m.y),m.z>h&&(h=m.z)}}catch(y){t={error:y}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return new De({x:a,y:s,z:l},{x:c,y:u,z:h})}else{for(var g=100,a=1/0,s=1/0,l=1/0,c=-1/0,u=-1/0,h=-1/0,o=0;o<=g;o++){var f=this.startAngle+this.deltaAngle*(o/g),m=this.getPointAtAngle(f);a=Math.min(a,m.x),s=Math.min(s,m.y),l=Math.min(l,m.z),c=Math.max(c,m.x),u=Math.max(u,m.y),h=Math.max(h,m.z)}return new De({x:a,y:s,z:l},{x:c,y:u,z:h})}},Object.defineProperty(e.prototype,"closed",{get:function(){return this.deltaAngle==0},enumerable:!1,configurable:!0}),e.prototype.getPoints=function(t){t===void 0&&(t=100);var n=[],i=this.deltaAngle,o=this.startAngle;this.closed&&(i=Ge,o=0);for(var a=0;a<=t;a++){var s=o+i*(a/t),l=this.getPointAtAngle(s);n.push(l)}return n},e.prototype.tessellate=function(t){var n=this,i,o,a=Ke.resolveTessellateOptions(t),s=this.closed?Ge:this.deltaAngle,l=Math.max(this.majorAxisRadius,this.minorAxisRadius),c=Math.abs(s)>=Ge-1e-8,u=(i=a.minSegments)!==null&&i!==void 0?i:c?8:3;if(this.isCircular){var h=Pn.segmentCount(l,s,GS(GS({},t),{minSegments:u}));return this.getPoints(h)}var d=(o=a.deviation)!==null&&o!==void 0?o:Ke.chordDeviationFromRadius(l,a.circleSides),p=this.closed?0:this.startAngle;return as.tessellateParametricCurve(p,p+s,function(f){return n.getPointAtAngle(f)},{deviation:Math.max(Pt,d),minSegments:u,maxSegments:a.maxSegments})},e.prototype.getPointAtAngle=function(t){var n=Math.cos(t),i=Math.sin(t),o=this.minorAxis.clone().multiplyScalar(this.minorAxisRadius).multiplyScalar(i),a=this.majorAxis.clone().multiplyScalar(n*this.majorAxisRadius).add(o);return new k(this.center.x+a.x,this.center.y+a.y,this.center.z+a.z)},e.prototype.nearestPoint=function(t,n){n===void 0&&(n=72);for(var i=new k(t.x,t.y,t.z||0),o=this.getPointAtAngle(this.startAngle),a=i.distanceToSquared(o),s=1;s<=n;s++){var l=this.startAngle+this.deltaAngle*s/n,c=this.getPointAtAngle(l),u=i.distanceToSquared(c);u<a&&(a=u,o=c)}var h=i.distanceToSquared(this.startPoint),d=i.distanceToSquared(this.endPoint);return h<a&&h<=d?this.startPoint.clone():d<a&&d<h?this.endPoint.clone():o.clone()},e.prototype.tangentPoints=function(t){var n=this,i=this._projectPointToLocalPlane(t),o=this._findSnapParameterAngles(function(a,s,l,c){var u=-n.majorAxisRadius*c,h=n.minorAxisRadius*l;return(a-i.x)*h-(s-i.y)*u});return o.map(function(a){return n.getPointAtAngle(a)})},e.prototype.perpendicularPoints=function(t){var n=this,i=this._projectPointToLocalPlane(t),o=this._findSnapParameterAngles(function(a,s,l,c){var u=n.minorAxisRadius*l,h=n.majorAxisRadius*c;return(a-i.x)*h-(s-i.y)*u});return o.map(function(a){return n.getPointAtAngle(a)})},e.prototype._projectPointToLocalPlane=function(t){var n=new k(t.x,t.y,t.z||0),i=new G(n).sub(this.center),o=i.dot(this.normal);return i.sub(this.normal.clone().multiplyScalar(o)),{x:i.dot(this.majorAxis),y:i.dot(this.minorAxis)}},e.prototype._findSnapParameterAngles=function(t,n){n===void 0&&(n=144);for(var i=this.majorAxisRadius,o=this.minorAxisRadius,a=this.startAngle,s=this.deltaAngle,l=[],c=function(v){var x=Math.cos(v),w=Math.sin(v);return t(i*x,o*w,x,w)},u=a,h=c(u),d=1;d<=n;d++){var p=a+s*d/n,f=c(p);if(Math.abs(h)<1e-10&&l.push(u),h*f<0){for(var m=u,g=p,y=0;y<32;y++){var b=(m+g)/2;c(m)*c(b)<=0?g=b:m=b}l.push((m+g)/2)}u=p,h=f}return l},e.prototype.contains=function(t){var n=new G(t).sub(this.center),i=n.dot(this.majorAxis),o=n.dot(this.minorAxis),a=i/this.majorAxisRadius,s=o/this.minorAxisRadius;return a*a+s*s<=1},e.prototype.transform=function(t){var n=t,i=this.center.clone().applyMatrix4(n),o=this.getPointAtAngle(0).clone().applyMatrix4(n),a=this.getPointAtAngle(Math.PI/2).clone().applyMatrix4(n),s=new G(o).sub(i),l=new G(a).sub(i),c=s.length(),u=l.length(),h=s.clone().normalize(),d=new G().crossVectors(s,l).normalize(),p=new G().crossVectors(d,h).normalize();p.dot(l)<0&&(d.negate(),p=new G().crossVectors(d,h).normalize());var f=function(g){var y=new G(g).sub(i),b=y.dot(h),v=y.dot(p);return xe.normalizeAngle(Math.atan2(v/u,b/c))},m=this.closed?new e(i,d,h,c,u,0,Ge):new e(i,d,h,c,u,f(this.startPoint.clone().applyMatrix4(n)),f(this.endPoint.clone().applyMatrix4(n)));return this.center=m.center,this.normal=m.normal,this.majorAxis=m.majorAxis,this.majorAxisRadius=m.majorAxisRadius,this.minorAxisRadius=m.minorAxisRadius,this._startAngle=m._startAngle,this._endAngle=m._endAngle,this._boundingBoxNeedsUpdate=!0,this},e.prototype.copy=function(t){return this.center=t.center,this.normal=t.normal,this.majorAxis=t.majorAxis,this.majorAxisRadius=t.majorAxisRadius,this.minorAxisRadius=t.minorAxisRadius,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return new e(this.center,this.normal,this.majorAxis,this.majorAxisRadius,this.minorAxisRadius,this.startAngle,this.endAngle)},Object.defineProperty(e.prototype,"plane",{get:function(){var t=new G(this.center).distanceTo(hh);return new jl(this.normal,t)},enumerable:!1,configurable:!0}),e.prototype.offset=function(t){var n=this.majorAxisRadius+t,i=this.minorAxisRadius+t;return n<=0||i<=0?null:new e(this.center,this.normal,this.majorAxis,n,i,this.startAngle,this.endAngle)},e})(as)});var Wie,fr,PI=W(()=>{Yr();Xd();Wie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),fr=(function(r){Wie(e,r);function e(t,n){var i=r.call(this)||this;return i._start=new Z(t),i._end=new Z(n),i}return Object.defineProperty(e.prototype,"startPoint",{get:function(){return this._start},set:function(t){this._start.copy(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this._end},set:function(t){this._end.copy(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),e.prototype.getPoints=function(){return[this.startPoint,this.endPoint]},Object.defineProperty(e.prototype,"length",{get:function(){return this.startPoint.distanceTo(this.endPoint)},enumerable:!1,configurable:!0}),e.prototype.calculateBoundingBox=function(){var t=new Z(Math.min(this._start.x,this._end.x),Math.min(this._start.y,this._end.y)),n=new Z(Math.max(this._start.x,this._end.x),Math.max(this._start.y,this._end.y));return new ct(t,n)},e.prototype.transform=function(t){return this._start.applyMatrix2d(t),this._end.applyMatrix2d(t),this._boundingBoxNeedsUpdate=!0,this},Object.defineProperty(e.prototype,"closed",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.copy=function(t){return this.startPoint=t.startPoint,this.endPoint=t.endPoint,this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return new e(this._start.clone(),this._end.clone())},e.prototype.project=function(t){var n=this._end.x-this._start.x,i=this._end.y-this._start.y,o=n*n+i*i;if(o<1e-18)return this._start.clone();var a=((t.x-this._start.x)*n+(t.y-this._start.y)*i)/o;return a=Math.max(0,Math.min(1,a)),new Z(this._start.x+a*n,this._start.y+a*i)},e.prototype.nearestPoint=function(t){return this.project(t)},e})(ea)});var Xie,Yn,Yd,zj,HS,Uj=W(()=>{Yr();Ii();Lm();Xie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Yn=(function(r){Xie(e,r);function e(t,n){var i=r.call(this)||this;return i._start=new k(t),i._end=new k(n),i}return Object.defineProperty(e.prototype,"startPoint",{get:function(){return this._start},set:function(t){this._start.copy(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this._end},set:function(t){this._end.copy(t),this._boundingBoxNeedsUpdate=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return new G().subVectors(this.endPoint,this.startPoint).normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"midPoint",{get:function(){return new k((this._start.x+this._end.x)/2,(this._start.y+this._end.y)/2,(this._start.z+this._end.z)/2)},enumerable:!1,configurable:!0}),e.prototype.nearestPoint=function(t){return this.project(t)},Object.defineProperty(e.prototype,"length",{get:function(){return this.startPoint.distanceTo(this.endPoint)},enumerable:!1,configurable:!0}),e.prototype.isPointOnLine=function(t){var n=this.project(t),i=1e-6;return n.distanceTo(t)<i},e.prototype.at=function(t,n){return this.delta(n).multiplyScalar(t).add(this._start)},e.prototype.atLength=function(t,n){if(n===void 0&&(n=!1),n){var i=this.delta(Yd).normalize();return new k(this._start).addScaledVector(i,t)}else{var i=this.delta(Yd).normalize();return new k(this._end).addScaledVector(i,t)}},e.prototype.extend=function(t,n){if(n===void 0&&(n=!1),n){var i=Yd.subVectors(this._start,this._end).normalize();this._start=new k(this._start).addScaledVector(i,t)}else{var i=this.delta(Yd).normalize();this._end=new k(this._end).addScaledVector(i,t)}return this._boundingBoxNeedsUpdate=!0,this},e.prototype.closestPointToPointParameter=function(t,n){zj.subVectors(t,this._start),HS.subVectors(this.endPoint,this.startPoint);var i=HS.dot(HS),o=HS.dot(zj),a=o/i;return n&&(a=xe.clamp(a,0,1)),a},e.prototype.closestPointToPoint=function(t,n,i){var o=this.closestPointToPointParameter(t,n);return this.delta(i).multiplyScalar(o).add(this._start)},e.prototype.delta=function(t){return t.subVectors(this._end,this._start)},e.prototype.distanceSq=function(){return this._start.distanceToSquared(this._end)},e.prototype.distance=function(){return this._start.distanceTo(this._end)},e.prototype.project=function(t){var n=this.direction,i=Yd.subVectors(t,this.startPoint),o=i.dot(n);return new k().copy(n).multiplyScalar(o).add(this.startPoint)},e.prototype.perpPoint=function(t){var n=this.direction,i=this.startPoint,o=Yd.subVectors(t,i),a=o.dot(n),s=Yd.copy(n).multiplyScalar(a);return new k().addVectors(i,s)},e.prototype.calculateBoundingBox=function(){var t=new k(Math.min(this._start.x,this._end.x),Math.min(this._start.y,this._end.y),Math.min(this._start.z,this._end.z)),n=new k(Math.max(this._start.x,this._end.x),Math.max(this._start.y,this._end.y),Math.max(this._start.z,this._end.z));return new De(t,n)},e.prototype.transform=function(t){return this._start.applyMatrix4(t),this._end.applyMatrix4(t),this._boundingBoxNeedsUpdate=!0,this},Object.defineProperty(e.prototype,"closed",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.copy=function(t){return this.startPoint=t.startPoint,this.endPoint=t.endPoint,this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return new e(this._start.clone(),this._end.clone())},e.prototype.offset=function(t){var n=this.startPoint,i=this.endPoint,o=Math.hypot(i.x-n.x,i.y-n.y);if(o===0)return this.clone();var a=new G(i.x-n.x,i.y-n.y,0).normalize(),s=new G(-a.y,a.x,0);return new e(new k(n.x+s.x*t,n.y+s.y*t,n.z),new k(i.x+s.x*t,i.y+s.y*t,i.z))},e})(as),Yd=new G,zj=new G,HS=new G});var Yie,EI,Om,CI=W(()=>{Yr();Lm();Yie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),EI=(function(){function r(){this.c0=0,this.c1=0,this.c2=0,this.c3=0}return r.prototype.init=function(e,t,n,i){this.c0=e,this.c1=n,this.c2=-3*e+3*t-2*n-i,this.c3=2*e-2*t+n+i},r.prototype.initCatmullRom=function(e,t,n,i,o){this.init(t,n,o*(n-e),o*(i-t))},r.prototype.initNonuniformCatmullRom=function(e,t,n,i,o,a,s){var l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(i-t)/(a+s)+(i-n)/s;l*=a,c*=a,this.init(t,n,l,c)},r.prototype.calc=function(e){var t=e*e,n=t*e;return this.c0+this.c1*e+this.c2*t+this.c3*n},r})(),Om=(function(r){Yie(e,r);function e(t,n,i,o){t===void 0&&(t=[]),n===void 0&&(n=!1),i===void 0&&(i="centripetal"),o===void 0&&(o=.5);var a=r.call(this)||this;return a.isCatmullRomCurve3d=!0,a.type="CatmullRomCurve3d",a._tmp=new G,a._px=new EI,a._py=new EI,a._pz=new EI,a._points=t.map(function(s){return new k(s)}),a._closed=n,a._curveType=i,a._tension=o,a}return Object.defineProperty(e.prototype,"points",{get:function(){return this._points},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return this._closed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"curveType",{get:function(){return this._curveType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tension",{get:function(){return this._tension},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this._points.length>0?this._points[0]:new k},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this._points.length>0?this._points[this._points.length-1]:new k},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){if(this._points.length<2)return 0;for(var t=0,n=1;n<this._points.length;n++)t+=this._points[n-1].distanceTo(this._points[n]);return this._closed&&this._points.length>2&&(t+=this._points[this._points.length-1].distanceTo(this._points[0])),t},enumerable:!1,configurable:!0}),e.prototype.getPoint=function(t,n){n===void 0&&(n=new k);var i=n,o=this._points,a=o.length;if(a===0)return i.set(0,0,0);if(a===1)return i.copy(o[0]);var s=(a-(this._closed?0:1))*t,l=Math.floor(s),c=s-l;this._closed?l+=l>0?0:(Math.floor(Math.abs(l)/a)+1)*a:c===0&&l===a-1&&(l=a-2,c=1);var u,h;this._closed||l>0?u=o[(l-1)%a]:(this._tmp.subVectors(o[0],o[1]).add(o[0]),u=new k(this._tmp.x,this._tmp.y,this._tmp.z));var d=o[l%a],p=o[(l+1)%a];if(this._closed||l+2<a?h=o[(l+2)%a]:(this._tmp.subVectors(o[a-1],o[a-2]).add(o[a-1]),h=new k(this._tmp.x,this._tmp.y,this._tmp.z)),this._curveType==="centripetal"||this._curveType==="chordal"){var f=this._curveType==="chordal"?.5:.25,m=Math.pow(u.distanceToSquared(d),f),g=Math.pow(d.distanceToSquared(p),f),y=Math.pow(p.distanceToSquared(h),f);g<1e-4&&(g=1),m<1e-4&&(m=g),y<1e-4&&(y=g),this._px.initNonuniformCatmullRom(u.x,d.x,p.x,h.x,m,g,y),this._py.initNonuniformCatmullRom(u.y,d.y,p.y,h.y,m,g,y),this._pz.initNonuniformCatmullRom(u.z,d.z,p.z,h.z,m,g,y)}else this._curveType==="catmullrom"&&(this._px.initCatmullRom(u.x,d.x,p.x,h.x,this._tension),this._py.initCatmullRom(u.y,d.y,p.y,h.y,this._tension),this._pz.initCatmullRom(u.z,d.z,p.z,h.z,this._tension));return i.set(this._px.calc(c),this._py.calc(c),this._pz.calc(c)),i},e.prototype.getPoints=function(t){for(var n=[],i=0;i<=t;i++)n.push(this.getPoint(i/t));return n},e.prototype.setPoints=function(t){this._points=t.map(function(n){return new k(n)}),this._boundingBoxNeedsUpdate=!0},e.prototype.setClosed=function(t){this._closed!==t&&(this._closed=t,this._boundingBoxNeedsUpdate=!0)},e.prototype.setCurveType=function(t){this._curveType=t},e.prototype.setTension=function(t){this._tension=t},e.prototype.clone=function(){return new e(this._points.map(function(t){return t.clone()}),this._closed,this._curveType,this._tension)},e.prototype.transform=function(t){return this._points=this._points.map(function(n){var i=new k;return i.copy(n),i.applyMatrix4(t),i}),this._boundingBoxNeedsUpdate=!0,this},e.prototype.calculateBoundingBox=function(){if(this._points.length===0)return new De;var t=new De;return this._points.forEach(function(n){t.expandByPoint(n)}),t},e})(as)});function jj(r,e){var t,n,i=r.x-e[0],o=r.y-e[1],a=((t=r.z)!==null&&t!==void 0?t:0)-((n=e[2])!==null&&n!==void 0?n:0);return i*i+o*o+a*a}function $ie(r,e,t){if(t<2)return[r,e];for(var n=[],i=0;i<t;i++)n.push(i===t-1?e:r+(e-r)*i/(t-1));return n}function Kie(r,e){var t=Rm(Rm([],Dm(r),!1),Dm(e),!1).sort(function(i,o){return i-o}),n=[];return t.forEach(function(i){var o=n[n.length-1];(o===void 0||Math.abs(o-i)>1e-10)&&n.push(i)}),n}var Dm,Rm,Qi,TI=W(()=>{_m();Ii();CI();Dm=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Rm=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};Qi=(function(){function r(e,t,n,i){this._degree=e,this._knots=Rm([],Dm(t),!1),this._controlPoints=n.map(function(o){return{x:o.x,y:o.y,z:o.z}}),this._weights=i?Rm([],Dm(i),!1):new Array(n.length).fill(1)}return r.prototype.degree=function(){return this._degree},r.prototype.knots=function(){return Rm([],Dm(this._knots),!1)},r.prototype.controlPoints=function(){return this._controlPoints.map(function(e){return{x:e.x,y:e.y,z:e.z}})},r.prototype.weights=function(){return Rm([],Dm(this._weights),!1)},r.prototype.clone=function(){return new r(this._degree,this._knots,this._controlPoints,this._weights)},r.prototype.point=function(e){return this.evaluate(e).point},r.prototype.evaluate=function(e){var t=this._controlPoints.map(function(n){return[n.x,n.y,n.z]});return wS(e,this._degree,this._knots,t,this._weights)},r.prototype.signedPlanarCurvatureAt=function(e){var t=this.evaluate(e);return _S(t.deriv1,t.deriv2)},r.prototype.getOffsetSamplePath2d=function(e,t){var n=this;t===void 0&&(t=512);for(var i=Math.abs(e),o=this.getParameterRange(),a=o.start,s=o.end,l=this.length(),c=Math.max(64,Math.ceil(l/Math.max(i*.2,1e-6))),u=$ie(a,s,Math.min(c,t)),h=0;h<8&&u.length<t;h++){for(var d=[],p=0;p<u.length-1;p++){var f=u[p],m=u[p+1],g=(f+m)/2,y=Math.max(Math.abs(this.signedPlanarCurvatureAt(f)),Math.abs(this.signedPlanarCurvatureAt(m)),Math.abs(this.signedPlanarCurvatureAt(g)));i*y>.85&&d.push(g)}if(d.length===0)break;if(u=Kie(u,d),u.length>t){u=u.slice(0,t);break}}var b=[],v=[];return u.forEach(function(x){var w=n.evaluate(x);b.push(new Z(w.point[0],w.point[1]));var _=w.deriv1[0],A=w.deriv1[1],E=Math.hypot(_,A);v.push(E>1e-10?new Z(_/E,A/E):new Z(1,0))}),{points:b,tangents:v}},r.prototype.length=function(){var e=this._controlPoints.map(function(t){return[t.x,t.y,t.z]});return Am(this._degree,this._knots,e,this._weights)},r.byKnotsControlPointsWeights=function(e,t,n,i){return new r(e,t,n,i)},r.byPoints=function(e,t,n,i,o){n===void 0&&(n="Uniform");var a=Hd(e,t,n,i,o),s=a.controlPoints.map(function(l){return{x:l[0],y:l[1],z:l[2]}});return new r(t,a.knots,s,a.weights)},r.prototype.getParameterRange=function(){var e=this._knots[this._degree],t=this._knots[this._knots.length-this._degree-1];return{start:e,end:t}},r.prototype.getPoints=function(e){for(var t=[],n=this.getParameterRange(),i=n.start,o=n.end,a=0;a<=e;a++){var s=i+(o-i)*(a/e);t.push(this.point(s))}return t},r.prototype.isClosed=function(e){e===void 0&&(e=1e-6);var t=this.getParameterRange(),n=t.start,i=t.end,o=this.point(n),a=this.point(i),s=o[0]-a[0],l=o[1]-a[1],c=o[2]-a[2];return Math.sqrt(s*s+l*l+c*c)<e},r.createFitPointsForClosedCurve=function(e){if(e.length<4)throw new Error("At least 4 points are required for a closed NURBS curve");var t=new Om(e,!0,"centripetal"),n=Math.max(50,e.length*2);return t.getPoints(n)},r.prototype.nearestPoint=function(e,t){var n;t===void 0&&(t=64);for(var i=this.getParameterRange(),o=i.start,a=i.end,s=this.point(o),l=jj(e,s),c=0;c<=t;c++){var u=o+(a-o)*c/t,h=this.point(u),d=jj(e,h);d<l&&(l=d,s=h)}return{x:s[0],y:s[1],z:(n=s[2])!==null&&n!==void 0?n:0}},r.createClosedCurve=function(e,t,n){n===void 0&&(n="Chord");var i=this.createFitPointsForClosedCurve(e),o=i.map(function(a){return[a.x,a.y,a.z]});return r.byPoints(o,t,n)},r})()});function kI(r){var e,t,n;if(!r)return!1;var i=(e=r.x)!==null&&e!==void 0?e:0,o=(t=r.y)!==null&&t!==void 0?t:0,a=(n=r.z)!==null&&n!==void 0?n:0;return i*i+o*o+a*a>1e-20}function Vj(r,e,t){var n=r??0;return n<1&&t>0&&e>0&&(n=t-e-1),n<1&&(n=3),n=Math.min(n,e-1),Math.max(1,n)}function Gj(r,e,t){var n=r??0;n<1&&(n=3);var i=e+t-1;return n=Math.min(n,i),Math.max(1,n)}function Hj(r,e){if(!(!r||r.length!==e))return r}var Wj=W(()=>{});var qie,Xj,Yj,$j,mr,II=W(()=>{zt();Yr();Ii();lI();Pv();Jc();Lm();TI();Wj();qie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Xj=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Yj=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},$j=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mr=(function(r){qie(e,r);function e(t,n,i,o,a,s){var l=r.call(this)||this,c=arguments.length;if(l._degree=3,l._closed=!1,Array.isArray(n)){if(c<2||c>5)throw Qn.ILLEGAL_PARAMETERS;l._controlPoints=t;var p=void 0,f=3,m=!1;if(c>=3&&(Array.isArray(i)?(p=i,c>=4&&(f=o||3),c>=5&&(m=a)):i!==void 0&&(f=i||3,c>=4&&(m=o))),i===void 0&&c>=4&&(f=o||3,c>=5&&(m=a)),l._degree=f,l._closed=m,l._controlPoints.length<l._degree+1)throw Qn.ILLEGAL_PARAMETERS;l._nurbsCurve=Qi.byKnotsControlPointsWeights(l._degree,n,l._controlPoints,p)}else{if(c<2||c>6)throw Qn.ILLEGAL_PARAMETERS;l._fitPoints=t,l._knotParameterization=n,c>=3&&(l._degree=i||3);var u=typeof o=="boolean";c>=4&&u&&(l._closed=o),u?(c>=5&&(l._startTangent=a),c>=6&&(l._endTangent=s)):(c>=4&&(l._startTangent=o),c>=5&&(l._endTangent=a)),l._closed&&(l._startTangent=void 0,l._endTangent=void 0);var h=(l._startTangent?1:0)+(l._endTangent?1:0);if(l._fitPoints.length+h<l._degree+1)throw Qn.ILLEGAL_PARAMETERS;if(l._closed)l._nurbsCurve=Qi.createClosedCurve(l._fitPoints,l._degree,l._knotParameterization);else{var d=l.toNurbsPoints(l._fitPoints);l._nurbsCurve=Qi.byPoints(d,l._degree,l._knotParameterization,l._startTangent?l.toNurbsPoint(l._startTangent):void 0,l._endTangent?l.toNurbsPoint(l._endTangent):void 0)}l._controlPoints=l.toGePoints(l._nurbsCurve.controlPoints().map(function(g){return[g.x,g.y,g.z||0]}))}return l}return e.prototype.buildCurve=function(){if(this._fitPoints&&this._knotParameterization){if(this._closed){var t=Qi.createFitPointsForClosedCurve(this._fitPoints),n=this.toNurbsPoints(t);this._nurbsCurve=Qi.byPoints(n,this._degree,this._knotParameterization)}else{var n=this.toNurbsPoints(this._fitPoints);this._nurbsCurve=Qi.byPoints(n,this._degree,this._knotParameterization,this._startTangent?this.toNurbsPoint(this._startTangent):void 0,this._endTangent?this.toNurbsPoint(this._endTangent):void 0)}this._controlPoints=this.toGePoints(this._nurbsCurve.controlPoints().map(function(a){return[a.x,a.y,a.z||0]}))}else if(this._controlPoints)if(this._closed){var t=Qi.createFitPointsForClosedCurve(this._controlPoints),n=this.toNurbsPoints(t);this._nurbsCurve=Qi.byPoints(n,this._degree,this._knotParameterization),this._controlPoints=this.toGePoints(this._nurbsCurve.controlPoints().map(function(l){return[l.x,l.y,l.z||0]}))}else{var i=this._nurbsCurve.knots(),o=this._nurbsCurve.weights();this._nurbsCurve=Qi.byKnotsControlPointsWeights(this._degree,i,this._controlPoints,o)}},e.prototype.setClosed=function(t){this._closed!==t&&(this._closed=t,this._boundingBoxNeedsUpdate=!0,this.buildCurve())},Object.defineProperty(e.prototype,"degree",{get:function(){return this._degree},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"knotParameterization",{get:function(){return this._knotParameterization},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlPoints",{get:function(){return this._controlPoints.map(Rn.point2dToPoint3d)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fitPoints",{get:function(){var t;return(t=this._fitPoints)===null||t===void 0?void 0:t.map(Rn.point2dToPoint3d)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"knots",{get:function(){return Yj([],Xj(this._nurbsCurve.knots()),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"weights",{get:function(){return Yj([],Xj(this._nurbsCurve.weights()),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){var t=this._nurbsCurve.knots(),n=this._nurbsCurve.degree(),i=t[n],o=this._nurbsCurve.point(i);return new k(o[0],o[1],o[2])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){var t=this._nurbsCurve.knots(),n=this._nurbsCurve.degree(),i=t[t.length-n-1],o=this._nurbsCurve.point(i);return new k(o[0],o[1],o[2])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._nurbsCurve.length()},enumerable:!1,configurable:!0}),e.prototype.nearestPoint=function(t,n){n===void 0&&(n=64);var i=this._nurbsCurve.nearestPoint(t,n);return new k(i.x,i.y,i.z||0)},e.prototype.evaluateAt=function(t){var n=this._nurbsCurve.point(t);return new k(n[0],n[1],n[2])},e.prototype.getFitPointAt=function(t){if(!this._fitPoints)throw new Error("No fit points in this spline");var n=this._fitPoints.length,i=t<0||t>=n?n-1:t,o=this._fitPoints[i];return Rn.point2dToPoint3d(o)},e.prototype.getControlPointAt=function(t){var n=this._controlPoints.length,i=t<0||t>=n?n-1:t;return this._controlPoints[i]},Object.defineProperty(e.prototype,"isFitPointSpline",{get:function(){return!!(this._fitPoints&&this._fitPoints.length>0&&this._knotParameterization)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isControlPointSpline",{get:function(){return!this.isFitPointSpline},enumerable:!1,configurable:!0}),e.prototype.getGripPoints=function(){return this.isFitPointSpline?this._fitPoints.map(function(t){var n;return new k(t.x,t.y,(n=t.z)!==null&&n!==void 0?n:0)}):this._controlPoints.map(function(t){var n;return new k(t.x,t.y,(n=t.z)!==null&&n!==void 0?n:0)})},e.prototype.moveGripPointsAt=function(t,n){return this.isFitPointSpline?(this.moveFitPointsAt(t,n),this):(this.moveControlPointsAt(t,n),this)},e.prototype.moveFitPointsAt=function(t,n){var i,o;if(this._fitPoints){try{for(var a=$j(t),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(!Number.isInteger(l)||l<0)){var c=this._fitPoints[l];c&&Rn.applyOffsetToPoint3d(c,n)}}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}this._boundingBoxNeedsUpdate=!0,this.buildCurve()}},e.prototype.moveControlPointsAt=function(t,n){var i,o;try{for(var a=$j(t),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(!Number.isInteger(l)||l<0)){var c=this.getControlPointAt(l);c&&Rn.applyOffsetToPoint3d(c,n)}}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}this.rebuildAfterControlPointMutation()},e.prototype.rebuildAfterControlPointMutation=function(){var t=this._nurbsCurve.knots(),n=this._nurbsCurve.weights();this.isFitPointSpline&&(this._fitPoints=void 0,this._knotParameterization=void 0,this._startTangent=void 0,this._endTangent=void 0),this._nurbsCurve=Qi.byKnotsControlPointsWeights(this._degree,t,this._controlPoints,n.length>0?n:void 0),this._boundingBoxNeedsUpdate=!0},e.prototype.getOffsetSamplePath2d=function(t){return this._nurbsCurve.getOffsetSamplePath2d(t)},e.prototype.getPoints=function(t){t===void 0&&(t=100);for(var n=this._nurbsCurve,i=[],o=n.knots(),a=this._nurbsCurve.degree(),s=o[a],l=o[o.length-a-1],c=(l-s)/(t-1),u=0;u<t;u++){var h=u===t-1?l:s+u*c,d=n.point(h);i.push(new k(d[0],d[1],d[2]))}return i},e.prototype.tessellate=function(t){var n=this,i,o,a=Ke.resolveTessellateOptions(t),s=this._nurbsCurve.knots(),l=this._nurbsCurve.degree();if(s.length<l+2)return[this.startPoint.clone(),this.endPoint.clone()];var c=s[l],u=s[s.length-l-1],h=a.circleSides,d=Math.abs(this.length),p=(i=a.deviation)!==null&&i!==void 0?i:Math.max(Pt,d<=Pt?Pt:d/(2*h*h));return as.tessellateParametricCurve(c,u,function(f){return n.evaluateAt(f)},{deviation:p,minSegments:(o=a.minSegments)!==null&&o!==void 0?o:this.closed?8:2,maxSegments:a.maxSegments})},e.prototype.getCurvePoints=function(t,n){for(var i=[],o=t.knots(),a=t.degree(),s=o[a],l=o[o.length-a-1],c=(l-s)/(n-1),u=0;u<n;u++){var h=s+u*c;i.push(t.point(h))}return i},e.prototype.calculateBoundingBox=function(){var t=this.getPoints(100);return new De().setFromPoints(t)},Object.defineProperty(e.prototype,"closed",{get:function(){return this._closed},set:function(t){this.setClosed(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){if(!this._closed)return 0;var t=this.getPoints(128);return Mm(t)},enumerable:!1,configurable:!0}),e.prototype.transform=function(t){if(this._fitPoints&&this._knotParameterization)this._fitPoints=this._fitPoints.map(function(o){return new k(o).applyMatrix4(t)}),this._startTangent&&(this._startTangent=new k(this._startTangent).transformDirection(t)),this._endTangent&&(this._endTangent=new k(this._endTangent).transformDirection(t)),this.buildCurve();else{var n=this._nurbsCurve.knots(),i=this._nurbsCurve.weights();this._controlPoints=this._controlPoints.map(function(o){return new k(o).applyMatrix4(t)}),this._nurbsCurve=Qi.byKnotsControlPointsWeights(this._degree,n,this._controlPoints,i.length>0?i:void 0)}return this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return this._fitPoints&&this._knotParameterization?new e(this._fitPoints.map(Rn.point2dToPoint3d),this._knotParameterization,this._degree,this._closed,this._startTangent?Rn.point2dToPoint3d(this._startTangent):void 0,this._endTangent?Rn.point2dToPoint3d(this._endTangent):void 0):new e(this._controlPoints.map(Rn.point2dToPoint3d),this._nurbsCurve.knots(),this._nurbsCurve.weights(),this._degree,this._closed)},e.prototype.toNurbsPoints=function(t){var n=new Array(t.length);return t.forEach(function(i,o){n[o]=[i.x,i.y,i.z||0]}),n},e.prototype.toGePoints=function(t){var n=new Array(t.length);return t.forEach(function(i,o){n[o]={x:i[0],y:i[1],z:i[2]}}),n},e.prototype.toNurbsPoint=function(t){return[t.x,t.y,t.z||0]},e.createClosedSpline=function(t,n,i){if(n===void 0&&(n="Uniform"),i===void 0&&(i=3),t.length<i+1)throw new Error("At least ".concat(i+1," points are required for a degree ").concat(i," closed spline"));return new e(t,n,i,!0)},e.fromControlPoints=function(t,n,i,o,a){if(t.length<2||n.length<2)return null;var s=Vj(o,t.length,n.length);if(t.length<s+1)return null;try{return new e(t,n,Hj(i,t.length),s,a)}catch{return null}},e.fromFitPoints=function(t,n,i,o,a,s){if(t.length<2)return null;var l=kI(a),c=kI(s),u=(l?1:0)+(c?1:0),h=Gj(i,t.length,u);if(t.length+u<h+1)return null;try{return l||c?new e(t,n,h,o,l?a:void 0,c?s:void 0):new e(t,n,h,o)}catch{return null}},e.fromDwgSplineEdge=function(t){if(t.numberOfControlPoints>0&&t.numberOfKnots>0){var n=t.controlPoints.map(Rn.point2dToPoint3d),i=!0,o=t.controlPoints.map(function(s){return s.weight==null&&(i=!1),s.weight||1});return e.fromControlPoints(n,t.knots,i?o:void 0,t.degree,!1)}if(t.numberOfFitData>0){var a=t.fitDatum.map(Rn.point2dToPoint3d);return e.fromFitPoints(a,"Uniform",t.degree,!1,t.startTangent?Rn.point2dToPoint3d(t.startTangent):void 0,t.endTangent?Rn.point2dToPoint3d(t.endTangent):void 0)}return null},e})(as)});function Jie(r,e){if(r instanceof fr)return r.getPoints();if(r instanceof Ke||r instanceof mr)return r.tessellate(e);var t=r.closed?Ge:r.deltaAngle,n=Ke.segmentCount(Math.max(r.majorAxisRadius,r.minorAxisRadius),t,e);return r.getPoints(n)}var Zie,LI,OI,ta,Kj=W(()=>{Yr();Ii();Jc();Xd();AI();PI();II();Zie=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),LI=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},OI=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ta=(function(r){Zie(e,r);function e(t){t===void 0&&(t=[]);var n=r.call(this)||this;return n._curves=t,n}return Object.defineProperty(e.prototype,"curves",{get:function(){return this._curves},enumerable:!1,configurable:!0}),e.buildFromEdges=function(t,n){if(n===void 0&&(n=.001),t.length===0)return[];for(var i=OI([],LI(t),!1),o=[],a=n*n,s=function(f,m){var g=f.x-m.x,y=f.y-m.y;return g*g+y*y<=a};i.length>0;){var l=[],c=i.shift();l.push(c);var u=e.getEdgeStartPoint(c),h=e.getEdgeEndPoint(c);if(!s(u,h))for(;i.length>0;){var d=e.findConnectingEdge(i,h,a);if(d.index<0)break;var p=i.splice(d.index,1)[0];if(d.reverse&&(p=e.reverseEdge(p)),l.push(p),h=e.getEdgeEndPoint(p),s(h,u))break}o.push(new e(l))}return o},e.prototype.add=function(t){this._curves.push(t),this._boundingBoxNeedsUpdate=!0},Object.defineProperty(e.prototype,"numberOfEdges",{get:function(){return this._curves.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){if(this._curves.length>0){var t=this._curves[0].startPoint;return new Z(t.x,t.y)}throw new Error("Start point does not exist in an empty loop.")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this.startPoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){var t=0;return this._curves.forEach(function(n){t+=n.length}),t},enumerable:!1,configurable:!0}),e.prototype.calculateBoundingBox=function(){var t=this.getPoints(100),n=new ct;return n.setFromPoints(t),n},e.prototype.transform=function(t){var n=new Ie().set(t.elements[0],t.elements[3],0,t.elements[6],t.elements[1],t.elements[4],0,t.elements[7],0,0,1,0,0,0,0,1);return this._curves.forEach(function(i){i instanceof mr?i.transform(n):i.transform(t)}),this._boundingBoxNeedsUpdate=!0,this},e.prototype.clone=function(){return new e(this._curves.map(function(t){return t.clone()}))},Object.defineProperty(e.prototype,"closed",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.getPoints=function(t){var n=[];return this.curves.forEach(function(i){i.getPoints(t).forEach(function(o){n.push(new Z(o.x,o.y))})}),n},e.prototype.tessellate=function(t){var n=[];return this._curves.forEach(function(i){Jie(i,t).forEach(function(o){var a=n[n.length-1];a&&Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)<=Pt*Pt||n.push(new Z(o.x,o.y))})}),n},e.findConnectingEdge=function(t,n,i){for(var o=-1,a=!1,s=Number.POSITIVE_INFINITY,l=0;l<t.length;l++){var c=t[l],u=e.getEdgeStartPoint(c),h=e.getEdgeEndPoint(c),d=n.x-u.x,p=n.y-u.y,f=d*d+p*p;f<s&&(s=f,o=l,a=!1);var m=n.x-h.x,g=n.y-h.y,y=m*m+g*g;y<s&&(s=y,o=l,a=!0)}return s>i?{index:-1,reverse:!1}:{index:o,reverse:a}},e.getEdgeStartPoint=function(t){var n=t.startPoint;return new Z(n.x,n.y)},e.getEdgeEndPoint=function(t){var n=t.endPoint;return new Z(n.x,n.y)},e.reverseEdge=function(t){return t instanceof fr?new fr(t.endPoint,t.startPoint):t instanceof Ke?e.reverseCircArcEdge(t):t instanceof ko?new ko(t.center,t.majorAxisRadius,t.minorAxisRadius,t.endAngle,t.startAngle,!t.clockwise,t.rotation):t instanceof mr?e.reverseSplineEdge(t):t},e.reverseCircArcEdge=function(t){var n=t.startPoint,i=t.endPoint,o=!t.clockwise,a=Math.atan2(i.y-t.center.y,i.x-t.center.x),s=Math.atan2(n.y-t.center.y,n.x-t.center.x),l=function(c){var u=xe.normalizeAngle(c);return o?xe.normalizeAngle(-u):u};return new Ke(t.center,t.radius,l(a),l(s),o)},e.reverseSplineEdge=function(t){var n=OI([],LI(t.controlPoints),!1).reverse(),i=t.knots,o=i[0],a=i[i.length-1],s=i.map(function(u){return o+a-u}).reverse(),l=t.weights,c=l.length>0?OI([],LI(l),!1).reverse():void 0;return new mr(n,s,c,t.degree,t.closed)},e})(ea)});function YS(r,e,t,n,i){var o,a,s,l;t===void 0&&(t=!1),n===void 0&&(n=!1);var c=qj(r,t,i),u=qj(e,n,i),h=[];try{for(var d=Ca(c),p=d.next();!p.done;p=d.next()){var f=p.value;try{for(var m=(s=void 0,Ca(u)),g=m.next();!g.done;g=m.next()){var y=g.value;NI(f,y)&&GI(h,rV(f,y))}}catch(b){s={error:b}}finally{try{g&&!g.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}}}catch(b){o={error:b}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}return moe(h)}function $S(r,e){var t=FI(r);switch(t.kind){case"line":return t.line.transform(e),t;case"circArc":return t.arc.transform(e),t;case"ellipseArc":return t.arc.transform(e),t;case"spline":return t.spline.transform(e),t}}function FI(r){switch(r.kind){case"line":return{kind:"line",line:r.line.clone(),extent:r.extent,extendable:r.extendable};case"circArc":return{kind:"circArc",arc:r.arc.clone(),extendable:r.extendable};case"ellipseArc":return{kind:"ellipseArc",arc:r.arc.clone(),extendable:r.extendable};case"spline":return{kind:"spline",spline:r.spline.clone(),extendable:r.extendable}}}function qj(r,e,t){var n,i,o=[];try{for(var a=Ca(r),s=a.next();!s.done;s=a.next()){var l=s.value,c=e&&l.extendable!==!1;switch(l.kind){case"line":{var u=noe(l.line,t);if(!u)break;var h=c?"unbounded":l.extent;o.push(Um(u.start,u.end,h));break}case"circArc":{var d=eoe(l.arc,c);if(t&&!Iv(d.normal,t.normal)){var p=ioe(d,t);p?.kind==="circArc"?o.push(Zj(p.arc,Vl(p.arc))):p?.kind==="ellipseArc"?o.push(Jj(p.arc,eu(p.arc))):DI(o,tV(d,Vl(d)),Vl(d),t)}else{var p=roe(d,t);p&&o.push(Zj(p,Vl(p)))}break}case"ellipseArc":{var d=toe(l.arc,c);if(t&&!Iv(d.normal,t.normal))DI(o,nV(d,eu(d)),eu(d),t);else{var p=ooe(d,t);p&&o.push(Jj(p,eu(p)))}break}case"spline":{t?DI(o,l.spline.getPoints(kv),l.spline.closed,t):o.push(Qie(l.spline));break}}}}catch(f){n={error:f}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}function Um(r,e,t){var n=new G().subVectors(e,r);return{kind:"line",start:r,dir:n,extent:t,box:t==="bounded"?new De().setFromPoints([r,e]):void 0}}function Zj(r,e){return{kind:"circArc",arc:r,full:e||Vl(r),box:r.box}}function Jj(r,e){return{kind:"ellipseArc",arc:r,full:e||eu(r),box:r.box}}function Qie(r){var e,t,n=[],i=r.getPoints(kv);if(i.length>=2)for(var o=r.closed?i.length:i.length-1,a=0;a<o;a++){var s=i[a],l=i[(a+1)%i.length];s.distanceToSquared(l)<_t*_t||n.push(Um(s.clone(),l.clone(),"bounded"))}var c=new De;try{for(var u=Ca(n),h=u.next();!h.done;h=u.next()){var d=h.value;d.box&&c.union(d.box)}}catch(p){e={error:p}}finally{try{h&&!h.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}return{kind:"spline",spline:r,samples:n,box:n.length>0?c:void 0}}function eoe(r,e){return!e||Vl(r)?r:new Pn(r.center,r.radius,0,Ge,r.normal,r.refVec)}function toe(r,e){return!e||eu(r)?r:new yi(r.center,r.normal,r.majorAxis,r.majorAxisRadius,r.minorAxisRadius,0,Ge)}function noe(r,e){if(!e)return{start:r.startPoint.clone(),end:r.endPoint.clone()};var t=Qc(r.startPoint,e),n=Qc(r.endPoint,e);return t.distanceToSquared(n)<_t*_t?null:{start:t,end:n}}function roe(r,e){if(!e)return r;var t=Qc(r.center,e);return new Pn(t,r.radius,r.startAngle,r.endAngle,e.normal.clone(),UI(r.refVec,e.normal))}function ioe(r,e){var t=Qc(r.center,e),n=r.normal.clone();if(n.lengthSq()<_t*_t)return null;n.normalize();var i=e.normal.clone();if(i.lengthSq()<_t*_t)return null;i.normalize();var o=n.dot(i),a=Math.abs(o);if(a>1-1e-8)return{kind:"circArc",arc:new Pn(t,r.radius,r.startAngle,r.endAngle,i,UI(r.refVec,i))};if(a<1e-8)return null;var s=new G().crossVectors(n,i);if(s.lengthSq()<_t*_t)return null;s.normalize();var l=new yi(t,i,s,r.radius,r.radius*a,0,Ge);if(Vl(r))return{kind:"ellipseArc",arc:l};var c=Qc(r.startPoint,e),u=Qc(r.endPoint,e),h=Qc(r.midPoint,e),d=Bm(l,c),p=Bm(l,u),f=Bm(l,h),m=xe.normalizeAngle(f-d),g=xe.normalizeAngle(p-d),y=m<=g||g<1e-8?d+g:d+g+Ge;return{kind:"ellipseArc",arc:new yi(t,i,s,r.radius,r.radius*a,d,y)}}function ooe(r,e){if(!e)return r;var t=Qc(r.center,e),n=UI(r.majorAxis,e.normal);return n.lengthSq()<_t*_t?null:new yi(t,e.normal.clone(),n,r.majorAxisRadius,r.minorAxisRadius,r.startAngle,r.endAngle)}function DI(r,e,t,n){if(!(e.length<2))for(var i=n?e.map(function(c){return Qc(c,n)}):e,o=t?i.length:i.length-1,a=0;a<o;a++){var s=i[a],l=i[(a+1)%i.length];s.distanceToSquared(l)<_t*_t||r.push(Um(s.clone(),l.clone(),"bounded"))}}function tV(r,e){return e||Vl(r)?new Pn(r.center,r.radius,0,Ge,r.normal,r.refVec).getPoints(WS):r.getPoints(WS)}function nV(r,e){return e||eu(r)?new yi(r.center,r.normal,r.majorAxis,r.majorAxisRadius,r.minorAxisRadius,0,Ge).getPoints(WS):r.getPoints(WS)}function NI(r,e){return!r.box||!e.box?!0:r.box.intersectsBox(e.box)}function rV(r,e){return r.kind==="spline"&&e.kind==="spline"?aoe(r,e):r.kind==="spline"?Qj(r,e):e.kind==="spline"?Qj(e,r):r.kind==="line"&&e.kind==="line"?iV(r,e):r.kind==="line"&&e.kind==="circArc"?XS(r,e.arc,e.full):e.kind==="line"&&r.kind==="circArc"?XS(e,r.arc,r.full):r.kind==="line"&&e.kind==="ellipseArc"?RI(r,e.arc,e.full):e.kind==="line"&&r.kind==="ellipseArc"?RI(e,r.arc,r.full):r.kind==="circArc"&&e.kind==="circArc"?hoe(r.arc,r.full,e.arc,e.full):r.kind==="circArc"&&e.kind==="ellipseArc"?eV(r.arc,r.full,e.arc,e.full):r.kind==="ellipseArc"&&e.kind==="circArc"?eV(e.arc,e.full,r.arc,r.full):r.kind==="ellipseArc"&&e.kind==="ellipseArc"?poe(r.arc,r.full,e.arc,e.full):[]}function Qj(r,e){var t,n,i=[];try{for(var o=Ca(r.samples),a=o.next();!a.done;a=o.next()){var s=a.value;NI(s,e)&&GI(i,rV(s,e))}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return soe(r.spline,i,e)}function aoe(r,e){var t,n,i,o,a,s,l=[];try{for(var c=Ca(r.samples),u=c.next();!u.done;u=c.next()){var h=u.value;try{for(var d=(i=void 0,Ca(e.samples)),p=d.next();!p.done;p=d.next()){var f=p.value;NI(h,f)&&GI(l,iV(h,f))}}catch(w){i={error:w}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(w){t={error:w}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}var m=[];try{for(var g=Ca(l),y=g.next();!y.done;y=g.next()){var b=y.value,v=r.spline.nearestPoint(b,kv),x=e.spline.nearestPoint(b,kv);v.distanceTo(x)<=BI&&m.push(v)}}catch(w){a={error:w}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}return m}function soe(r,e,t){var n,i,o=[];try{for(var a=Ca(e),s=a.next();!s.done;s=a.next()){var l=s.value,c=r.nearestPoint(l,kv);loe(t,c)<=BI&&o.push(c)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}function loe(r,e){if(r.kind==="line"){var t=r.dir.lengthSq();if(t<_t*_t)return Number.POSITIVE_INFINITY;var n=new G().subVectors(e,r.start).dot(r.dir)/t;return Fm(n,r.extent)?Nm(r.start,r.dir,n).distanceTo(e):Number.POSITIVE_INFINITY}if(r.kind==="circArc"){if(!VI(e,r.arc)){var i=ss(r.arc.normal,r.arc.center),o=Math.abs(i.distanceToPoint(e)),a=Math.abs(e.distanceTo(r.arc.center)-r.arc.radius),s=Math.hypot(o,a);if(s>BI)return s}return Kd(r.arc,$d(r.arc,e),r.full)?0:Number.POSITIVE_INFINITY}return r.kind==="ellipseArc"?zm(e,r.arc,r.full)?0:Math.abs(KS(r.arc,e)):Number.POSITIVE_INFINITY}function iV(r,e){var t=r.dir,n=e.dir,i=t.lengthSq(),o=n.lengthSq();if(i<_t*_t||o<_t*_t)return[];var a=new G().subVectors(r.start,e.start),s=t.dot(t),l=t.dot(n),c=n.dot(n),u=t.dot(a),h=n.dot(a),d=s*c-l*l;if(Math.abs(d)<Pt*Pt*s*c)return[];var p=(l*h-c*u)/d,f=(s*h-l*u)/d;if(!Fm(p,r.extent)||!Fm(f,e.extent))return[];var m=Nm(r.start,t,p),g=Nm(e.start,n,f);return m.distanceTo(g)>_t?[]:[m]}function XS(r,e,t){var n=ss(e.normal,e.center),i=aV(r,n);return i==="coplanar"?coe(r,e,t):i?VI(i,e)?Kd(e,$d(e,i),t)?[i]:[]:[]:[]}function coe(r,e,t){var n,i,o=new G().subVectors(r.start,e.center),a=r.dir.dot(r.dir);if(a<_t*_t)return[];var s=2*r.dir.dot(o),l=o.dot(o)-e.radius*e.radius,c=[];try{for(var u=Ca(lV(a,s,l)),h=u.next();!h.done;h=u.next()){var d=h.value;if(Fm(d,r.extent)){var p=Nm(r.start,r.dir,d);Kd(e,$d(e,p),t)&&c.push(p)}}}catch(f){n={error:f}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return c}function RI(r,e,t){var n=ss(e.normal,e.center),i=aV(r,n);return i==="coplanar"?uoe(r,e,t):i?zm(i,e,t)?[i]:[]:[]}function uoe(r,e,t){var n,i,o=e.majorAxis,a=e.minorAxis,s=e.majorAxisRadius,l=e.minorAxisRadius;if(s<_t||l<_t)return[];var c=new G().subVectors(r.start,e.center),u=c.dot(o),h=c.dot(a),d=r.dir.dot(o),p=r.dir.dot(a),f=d*d/(s*s)+p*p/(l*l),m=2*u*d/(s*s)+2*h*p/(l*l),g=u*u/(s*s)+h*h/(l*l)-1,y=[];try{for(var b=Ca(lV(f,m,g)),v=b.next();!v.done;v=b.next()){var x=v.value;if(Fm(x,r.extent)){var w=Nm(r.start,r.dir,x);jI(e,Bm(e,w),t)&&y.push(w)}}}catch(_){n={error:_}}finally{try{v&&!v.done&&(i=b.return)&&i.call(b)}finally{if(n)throw n.error}}return y}function hoe(r,e,t,n){if(Iv(r.normal,t.normal)){var i=ss(r.normal,r.center);return Math.abs(i.distanceToPoint(t.center))>_t?[]:foe(doe(r,t),r,e,t,n)}var o=zI(ss(r.normal,r.center),ss(t.normal,t.center));if(!o)return[];var a=Um(o.point.clone(),new k().addVectors(o.point,o.dir),"unbounded"),s=XS(a,r,e);return s.filter(function(l){return VI(l,t)?Kd(t,$d(t,l),n):!1})}function doe(r,e){var t=new G().subVectors(e.center,r.center),n=t.length(),i=r.radius,o=e.radius;if(n<_t&&Ce.equal(i,o,_t))return[];if(n>i+o+_t)return[];if(n+Math.min(i,o)+_t<Math.max(i,o))return[];var a=n<_t?sV(r.normal):t.clone().normalize(),s=(i*i-o*o+n*n)/(2*Math.max(n,_t)),l=i*i-s*s,c=new k().copy(r.center).addScaledVector(a,s);if(l<-_t*_t)return[];if(l<_t*_t)return[c];var u=Math.sqrt(Math.max(0,l)),h=new G().crossVectors(r.normal,a).normalize();return[new k().copy(c).addScaledVector(h,u),new k().copy(c).addScaledVector(h,-u)]}function eV(r,e,t,n){if(!Iv(r.normal,t.normal)){var i=zI(ss(r.normal,r.center),ss(t.normal,t.center));if(!i)return[];var o=Um(i.point.clone(),new k().addVectors(i.point,i.dir),"unbounded");return XS(o,r,e).filter(function(a){return zm(a,t,n)})}return oV(tV(r,e),Vl(r)||e,function(a){return KS(t,a)},function(a){return Kd(r,$d(r,a),e)&&zm(a,t,n)})}function poe(r,e,t,n){if(!Iv(r.normal,t.normal)){var i=zI(ss(r.normal,r.center),ss(t.normal,t.center));if(!i)return[];var o=Um(i.point.clone(),new k().addVectors(i.point,i.dir),"unbounded");return RI(o,r,e).filter(function(a){return zm(a,t,n)})}return oV(nV(r,e),eu(r)||e,function(a){return KS(t,a)},function(a){return jI(r,Bm(r,a),e)&&zm(a,t,n)})}function oV(r,e,t,n){for(var i=[],o=e?r.length:r.length-1,a=0;a<o;a++){var s=r[a],l=r[(a+1)%r.length],c=t(s),u=t(l);if(Math.abs(c)<=_t){n(s)&&i.push(s.clone());continue}if(!(c*u>0)){for(var h=0,d=1,p=c,f=0;f<40;f++){var m=(h+d)/2,g=new k().lerpVectors(s,l,m),y=t(g);p*y<=0?d=m:(h=m,p=y)}var b=new k().lerpVectors(s,l,(h+d)/2);n(b)&&i.push(b)}}return i}function aV(r,e){var t=e.normal.dot(r.dir),n=e.distanceToPoint(r.start);if(Ce.equalToZero(t,_t*Math.max(1,r.dir.length())))return Ce.equalToZero(n,_t)?"coplanar":null;var i=-n/t;return Fm(i,r.extent)?Nm(r.start,r.dir,i):null}function zI(r,e){var t=new G().crossVectors(r.normal,e.normal);if(t.lengthSq()<_t*_t)return null;t.normalize();var n=r.normal,i=e.normal,o=n.dot(n)*i.dot(i)-Math.pow(n.dot(i),2);if(Math.abs(o)<Pt)return null;var a=-r.constant,s=-e.constant,l=(i.dot(i)*a-n.dot(i)*s)/o,c=(n.dot(n)*s-n.dot(i)*a)/o,u=new k().addScaledVector(n,l).addScaledVector(i,c);return{point:u,dir:t}}function Fm(r,e){return e==="unbounded"?!0:e==="ray"?r>=-_t:r>=-_t&&r<=1+_t}function Nm(r,e,t){return new k().copy(r).addScaledVector(e,t)}function Qc(r,e){var t=new k;return e.projectPoint(r,t),t}function UI(r,e){var t=r.clone().addScaledVector(e,-r.dot(e));return t.lengthSq()<_t*_t?sV(e):t.normalize()}function ss(r,e){return new jl().setFromNormalAndCoplanarPoint(r,e)}function Iv(r,e){return new G().crossVectors(r,e).lengthSq()<_t*_t}function $d(r,e){var t=new G().subVectors(e,r.center),n=new G().crossVectors(r.normal,r.refVec);return Math.atan2(t.dot(n),t.dot(r.refVec))}function Bm(r,e){var t=new G().subVectors(e,r.center),n=t.dot(r.majorAxis)/r.majorAxisRadius,i=t.dot(r.minorAxis)/r.minorAxisRadius;return Math.atan2(i,n)}function Vl(r){return r.closed||Math.abs(r.deltaAngle-Ge)<1e-10}function eu(r){return r.closed||Math.abs(r.endAngle-r.startAngle)<1e-10||Math.abs(r.deltaAngle-Ge)<1e-10}function Kd(r,e,t){if(t||Vl(r))return!0;var n=xe.normalizeAngle(e-r.startAngle);return n<=r.deltaAngle+1e-8}function jI(r,e,t){if(t||eu(r))return!0;var n=xe.normalizeAngle(e-r.startAngle);return n<=r.deltaAngle+1e-8}function VI(r,e){var t=ss(e.normal,e.center);return Math.abs(t.distanceToPoint(r))>_t?!1:Math.abs(r.distanceTo(e.center)-e.radius)<=_t}function KS(r,e){var t=new G().subVectors(e,r.center),n=t.dot(r.majorAxis)/r.majorAxisRadius,i=t.dot(r.minorAxis)/r.minorAxisRadius;return n*n+i*i-1}function zm(r,e,t){var n=ss(e.normal,e.center);return Math.abs(n.distanceToPoint(r))>_t||Math.abs(KS(e,r))>1e-4?!1:jI(e,Bm(e,r),t)}function foe(r,e,t,n,i){return r.filter(function(o){return Kd(e,$d(e,o),t)&&Kd(n,$d(n,o),i)})}function sV(r){var e=Math.abs(r.x)<.9?G.X_AXIS:G.Y_AXIS,t=new G().crossVectors(r,e);return t.lengthSq()<_t*_t&&t.crossVectors(r,G.Z_AXIS),t.normalize()}function lV(r,e,t){if(Math.abs(r)<Pt)return Math.abs(e)<Pt?[]:[-t/e];var n=e*e-4*r*t;if(n<-_t)return[];if(n<_t)return[-e/(2*r)];var i=Math.sqrt(Math.max(0,n));return[(-e-i)/(2*r),(-e+i)/(2*r)]}function GI(r,e){var t,n;try{for(var i=Ca(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}function moe(r){var e,t,n=[],i=function(l){if(n.some(function(c){return c.distanceTo(l)<=_t}))return"continue";n.push(l)};try{for(var o=Ca(r),a=o.next();!a.done;a=o.next()){var s=a.value;i(s)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n}var Ca,kv,WS,_t,BI,cV=W(()=>{Yr();Ii();VS();MI();Ca=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kv=128,WS=96,_t=Ji.equalPointTol,BI=_t*8});var uV=W(()=>{Rj();TS();Xd();Jc();VS();Cv();AI();MI();Tv();PI();Uj();Kj();II();TI();CI();cV()});var tt=W(()=>{uV();Yr();Ii()});var hV,Br,jm=W(()=>{hV=[{name:"AC1.2",value:1},{name:"AC1.40",value:2},{name:"AC1.50",value:3},{name:"AC2.20",value:4},{name:"AC2.10",value:5},{name:"AC2.21",value:6},{name:"AC2.22",value:7},{name:"AC1001",value:8},{name:"AC1002",value:9},{name:"AC1003",value:10},{name:"AC1004",value:11},{name:"AC1005",value:12},{name:"AC1006",value:13},{name:"AC1007",value:14},{name:"AC1008",value:15},{name:"AC1009",value:16},{name:"AC1010",value:17},{name:"AC1011",value:18},{name:"AC1012",value:19},{name:"AC1013",value:20},{name:"AC1014",value:21},{name:"AC1500",value:22},{name:"AC1015",value:23},{name:"AC1800a",value:24},{name:"AC1018",value:25},{name:"AC2100a",value:26},{name:"AC1021",value:27},{name:"AC2400a",value:28},{name:"AC1024",value:29},{name:"AC1027",value:31},{name:"AC3200a",value:32},{name:"AC1032",value:33}],Br=(function(){function r(e){if(typeof e=="string"){var t=hV.find(function(n){return n.name===e});if(!t)throw new Error("Unknown DWG version name: ".concat(e));this.name=t.name,this.value=t.value;return}if(typeof e=="number"){var t=hV.find(function(i){return i.value===e});if(!t)throw new Error("Unknown DWG version value: ".concat(e));this.name=t.name,this.value=t.value;return}throw new Error("Invalid constructor argument for AcDbDwgVersion")}return Object.defineProperty(r.prototype,"capabilities",{get:function(){return r.capabilitiesFor(this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(r,"latest",{get:function(){return new r("AC1032")},enumerable:!1,configurable:!0}),r.capabilitiesFor=function(e){var t=e>=19;return{supportsHandles:t,supportsSubclassMarkers:t,supportsClassesSection:t,supportsObjectsSection:t,supportsBlockRecordTable:t,supportsLwPolyline:t,supportsLineWeight:e>=23,supportsTrueColor:e>=25,supportsTransparency:e>=25,supportsUtf8CodePage:e>=27}},r})()});function Qs(r){return r===999?"comment":r===5?"handle":r<=9||r===100||r===102?"string":r===105?"handle":r>=101&&r<=109?"string":r<=59?"double":r<=79?"int":r<=89?"string":r<=99?"int":r<=149?"double":r<=159?"string":r<=169?"long":r<=179?"int":r<=209?"string":r<=239?"double":r<=269?"long":r<=289?"int":r<=299?"bool":r<=309?"string":r<=319?"binary":r<=369?"handle":r<=389?"int":r<=399?"handle":r<=409?"int":r<=419?"string":r<=429?"int":r<=439?"string":r<=449||r<=459?"int":r<=469?"double":r<=479?"string":r===480||r===481?"handle":r===1004?"binary":r===1005?"handle":r>=1e3&&r<=1009?"string":r>=1010&&r<=1059?"double":r>=1060&&r<=1070||r===1071?"int":"string"}function Lv(r){return r>=90&&r<=99||r>=420&&r<=429||r>=440&&r<=449||r>=450&&r<=459||r===1071}var Ov=W(()=>{});var qd,goe,Dv,yoe,Rv,HI=W(()=>{(function(r){r[r.UTF8=0]="UTF8",r[r.US_ASCII=1]="US_ASCII",r[r.ISO_8859_1=2]="ISO_8859_1",r[r.ISO_8859_2=3]="ISO_8859_2",r[r.ISO_8859_3=4]="ISO_8859_3",r[r.ISO_8859_4=5]="ISO_8859_4",r[r.ISO_8859_5=6]="ISO_8859_5",r[r.ISO_8859_6=7]="ISO_8859_6",r[r.ISO_8859_7=8]="ISO_8859_7",r[r.ISO_8859_8=9]="ISO_8859_8",r[r.ISO_8859_9=10]="ISO_8859_9",r[r.CP437=11]="CP437",r[r.CP850=12]="CP850",r[r.CP852=13]="CP852",r[r.CP855=14]="CP855",r[r.CP857=15]="CP857",r[r.CP860=16]="CP860",r[r.CP861=17]="CP861",r[r.CP863=18]="CP863",r[r.CP864=19]="CP864",r[r.CP865=20]="CP865",r[r.CP869=21]="CP869",r[r.CP932=22]="CP932",r[r.MACINTOSH=23]="MACINTOSH",r[r.BIG5=24]="BIG5",r[r.CP949=25]="CP949",r[r.JOHAB=26]="JOHAB",r[r.CP866=27]="CP866",r[r.ANSI_1250=28]="ANSI_1250",r[r.ANSI_1251=29]="ANSI_1251",r[r.ANSI_1252=30]="ANSI_1252",r[r.GB2312=31]="GB2312",r[r.ANSI_1253=32]="ANSI_1253",r[r.ANSI_1254=33]="ANSI_1254",r[r.ANSI_1255=34]="ANSI_1255",r[r.ANSI_1256=35]="ANSI_1256",r[r.ANSI_1257=36]="ANSI_1257",r[r.ANSI_874=37]="ANSI_874",r[r.ANSI_932=38]="ANSI_932",r[r.ANSI_936=39]="ANSI_936",r[r.ANSI_949=40]="ANSI_949",r[r.ANSI_950=41]="ANSI_950",r[r.ANSI_1361=42]="ANSI_1361",r[r.UTF16=43]="UTF16",r[r.ANSI_1258=44]="ANSI_1258",r[r.UNDEFINED=255]="UNDEFINED"})(qd||(qd={}));goe=["utf-8","utf-8","iso-8859-1","iso-8859-2","iso-8859-3","iso-8859-4","iso-8859-5","iso-8859-6","iso-8859-7","iso-8859-8","iso-8859-9","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","shift-jis","macintosh","big5","euc-kr","utf-8","ibm866","windows-1250","windows-1251","windows-1252","gbk","windows-1253","windows-1254","windows-1255","windows-1256","windows-1257","windows-874","shift-jis","gbk","euc-kr","big5","utf-8","utf-16le","windows-1258"],Dv=function(r){return goe[r]},yoe={cp949:"euc-kr",uhc:"euc-kr",euckr:"euc-kr",windows949:"euc-kr",ksc56011987:"euc-kr",cp936:"gbk"},Rv=function(r){var e,t=r.toLowerCase().replace(/[_-]/g,"");return(e=yoe[t])!==null&&e!==void 0?e:r}});function Fv(r){var e=r??"";if(e.length<=Zd)return[{code:1,value:e}];for(var t=[],n=0;e.length-n>Zd;)t.push({code:3,value:e.slice(n,n+Zd)}),n+=Zd;return t.push({code:1,value:e.slice(n)}),t}function Nv(r,e){var t,n;if(e<=0)return[r??""];var i=r??"";if(i.length===0)return[""];var o=new TextEncoder,a=[],s="",l=0;try{for(var c=WI(i),u=c.next();!u.done;u=c.next()){var h=u.value,d=o.encode(h).byteLength;if(d>e){s.length>0&&(a.push(s),s="",l=0),a.push(h);continue}l+d>e&&s.length>0?(a.push(s),s=h,l=d):(s+=h,l+=d)}}catch(p){t={error:p}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return s.length>0&&a.push(s),a}function zv(r,e){if(e<=0)return[r];if(r.byteLength===0)return[r];for(var t=[],n=0;n<r.byteLength;n+=e)t.push(r.subarray(n,n+e));return t}function boe(r){return r<=127?1:3+(r<=65535?4:8)}function XI(r,e){var t,n;if(e<=0)return[r??""];var i=r??"";if(i.length===0)return[""];var o=[],a="",s=0;try{for(var l=WI(i),c=l.next();!c.done;c=l.next()){var u=c.value,h=u.codePointAt(0),d=boe(h);if(d>e){a.length>0&&(o.push(a),a="",s=0),o.push(u);continue}s+d>e&&a.length>0?(o.push(a),a=u,s=d):(a+=u,s+=d)}}catch(p){t={error:p}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a.length>0&&o.push(a),o}function YI(r){for(var e,t,n=r??"",i=!1,o=0;o<n.length;o++)if(n.charCodeAt(o)>127){i=!0;break}if(!i)return n;var a="";try{for(var s=WI(n),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.codePointAt(0);if(u<=127)a+=c;else{var h=u.toString(16).toUpperCase();a+="\\U+"+(h.length<=4?h.padStart(4,"0"):h.padStart(8,"0"))}}}catch(d){e={error:d}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return a}function Uv(r){var e=r??"";return!e.includes("\\U+")&&!e.includes("\\u+")?e:e.replace(/\\U\+([0-9A-Fa-f]{4,8})/gi,function(t,n){var i=Number.parseInt(n,16);if(!Number.isFinite(i)||i<0||i>1114111)return t;try{return String.fromCodePoint(i)}catch{return t}})}var WI,Zd,Vm,Bv,qS=W(()=>{WI=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zd=250,Vm=255,Bv=127});function JS(r){if(r.length<$I.length)return!1;for(var e=0;e<$I.length;e++)if(r[e]!==$I[e])return!1;return!0}function ls(r){return r===32||r>=9&&r<=13}function ZS(r){return ls(r)||r===160||r===5760||r===8232||r===8233||r===8239||r===8287||r===12288||r===65279||r>=8192&&r<=8202}function xoe(r,e,t){var n=t-e;if(n<=0)return"";if(n<=16){for(var i="",o=e;o<t;o++)i+=String.fromCharCode(r[o]);return i}for(var a=4096,s="",l=e;l<t;l+=a){var c=Math.min(l+a,t);s+=String.fromCharCode.apply(null,r.subarray(l,c))}return s}function gh(r,e,t,n,i){return n?i.decode(r.subarray(e,t)):xoe(r,e,t)}function woe(r,e,t,n,i){if(n){var o=Number(gh(r,e,t,!0,i).trim());return Number.isFinite(o)?o:NaN}for(var a=e;a<t&&ls(r[a]);)a++;if(a>=t)return NaN;var s=1,l=r[a];l===45?(s=-1,a++):l===43&&a++;for(var c=0,u=0;a<t;){var h=r[a];if(h>=48&&h<=57)c=c*10+(h-48),u++,a++;else break}if(u===0)return NaN;for(;a<t;){if(!ls(r[a]))return NaN;a++}return s*c}function _oe(r,e,t){for(var n=e;n<t&&ls(r[n]);)n++;if(n>=t)return 0;var i=1,o=r[n];o===45?(i=-1,n++):o===43&&n++;for(var a=0,s=0,l=!1,c=!1;n<t;){var u=r[n];if(u<48||u>57)break;if(l=!0,n++,!(a===0&&u===48)){if(a>dV){c=!0;continue}a=a*10+(u-48)}}if(n<t&&r[n]===46)for(n++;n<t;){var u=r[n];if(u<48||u>57)break;if(l=!0,n++,a===0&&u===48){s--;continue}if(a>dV){c=!0;continue}a=a*10+(u-48),s--}if(n<t&&(r[n]===101||r[n]===69)){n++;var h=1,d=r[n];d===45?(h=-1,n++):d===43&&n++;for(var p=0,f=0;n<t;){var u=r[n];if(u<48||u>57)break;n++,f++,p<=1e4&&(p=p*10+(u-48))}if(f===0)return;s+=h*p}for(;n<t;){if(!ls(r[n]))return;n++}if(!l)return 0;if(!c){if(a===0)return i*a;if(!(s>22||s<-22)){for(var m=1,g=s<0?-s:s,y=0;y<g;y++)m*=10;return i*(s<0?a/m:a*m)}}}function Soe(r,e,t){for(var n=e;!(n>=t);){var i=r[n];if(i>=128)return;if(!ls(i))break;n++}var o=1,a=r[n];if(a===45?(o=-1,n++):a===43&&n++,!(n<t&&r[n]>=128)){for(var s=0,l=0,c=!1;n<t;){var i=r[n];if(i<48||i>57)break;if(n++,c=!0,!(s===0&&i===48)){if(l>=15)return;s=s*10+(i-48),l++}}return c?o*s:0}}function Aoe(r,e,t){for(var n=e;n<t&&ls(r[n]);)n++;var i=1,o=r[n];o===45?(i=-1,n++):o===43&&n++;for(var a=0,s=0,l=!1;n<t;){var c=r[n];if(c<48||c>57)break;if(n++,l=!0,!(a===0&&c===48)){if(s>=15)return;a=a*10+(c-48),s++}}for(;n<t;){if(!ls(r[n]))return;n++}return l?i*a:0}function Moe(r,e,t,n){if(!n){for(;e<t&&ls(r[e]);)e++;for(;t>e&&ls(r[t-1]);)t--;return e>=t?!1:!(t-e===1&&r[e]===48)}}function Poe(r,e,t){for(;e<t&&ZS(r.charCodeAt(e));)e++;for(;t>e&&ZS(r.charCodeAt(t-1));)t--;for(var n=t-e>>>1,i=new Uint8Array(n),o=0;o<n;o++){var a=Gm[r.charCodeAt(e+o*2)&127],s=Gm[r.charCodeAt(e+o*2+1)&127];i[o]=a<<4|s}return i}function Eoe(r,e,t,n,i){for(;e<t&&ls(r[e]);)e++;for(;t>e&&ls(r[t-1]);)t--;if(n){var o=gh(r,e,t,!0,i);return Poe(o,0,o.length)}for(var a=t-e>>>1,s=new Uint8Array(a),l=0;l<a;l++){var c=Gm[r[e+l*2]&127],u=Gm[r[e+l*2+1]&127];s[l]=c<<4|u}return s}function Coe(r,e,t,n,i,o){var a=Qs(r);if(a==="comment")return null;switch(a){case"string":return{code:r,type:a,value:Uv(gh(e,t,n,i,o))};case"int":{var s=Soe(e,t,n),l=s===void 0?parseInt(gh(e,t,n,i,o),10):s;return{code:r,type:a,value:Number.isFinite(l)?l:0}}case"long":{var s=Aoe(e,t,n);if(s!==void 0)return{code:r,type:a,value:s};var c=gh(e,t,n,i,o),l=Number(c);if(Number.isSafeInteger(l))return{code:r,type:a,value:l};try{return{code:r,type:a,value:BigInt(c.trim())}}catch{return{code:r,type:a,value:0}}}case"double":{var s=_oe(e,t,n),l=s===void 0?Number(gh(e,t,n,i,o)):s;return{code:r,type:a,value:Number.isFinite(l)?l:0}}case"bool":{var s=Moe(e,t,n,i);if(s!==void 0)return{code:r,type:a,value:s};var u=gh(e,t,n,i,o).trim();return{code:r,type:a,value:u!==""&&u!=="0"}}case"handle":{var h=gh(e,t,n,i,o);if(h.length===0)return{code:r,type:a,value:h};var d=h.charCodeAt(0),p=h.charCodeAt(h.length-1);return!ZS(d)&&!ZS(p)?{code:r,type:a,value:h}:{code:r,type:a,value:h.trim()}}case"binary":return{code:r,type:a,value:Eoe(e,t,n,i,o)};default:return null}}function Toe(r){var e=r.toLowerCase().replace(/_/g,"-");return e==="utf-8"||e==="utf8"||e==="unicode-1-1-utf-8"}function KI(r,e){e===void 0&&(e="utf-8");var t=Toe(e)?voe:new TextDecoder(e),n=r.length>=3&&r[0]===239&&r[1]===187&&r[2]===191?3:0,i=1,o,a=!1;function s(){if(!(n>=r.length)){for(var c=n,u=n,h=0;u<r.length;){var d=r[u];if(d===10||d===13)break;h|=d,u++}var p=u;return p<r.length&&r[p]===13&&p++,p<r.length&&r[p]===10&&p++,n=p,i++,{start:c,end:u,nonAscii:h>=128}}}function l(){for(;;){var c=s();if(c===void 0)return;var u=woe(r,c.start,c.end,c.nonAscii,t);if(!Number.isNaN(u)){if(u===999){if(s()===void 0)return;continue}var h=s();if(h===void 0)return;var d=Coe(u,r,h.start,h.end,h.nonAscii,t);if(d)return d}}}return{kind:"ascii",next:function(){if(a){var c=o;return o=void 0,a=!1,c}return l()},peek:function(){return a||(o=l(),a=!0),o},position:function(){return{line:i,byteOffset:n}}}}function qI(r){return KI(r,"utf-8")}function fV(r){var e;if(!r)return null;var t=qd[r];return t===void 0?null:(e=Dv(t))!==null&&e!==void 0?e:null}function koe(r,e){for(var t=Vv(r,{encoding:"utf-8",legacyR12:e}),n=null,i=null,o=!1,a=null,s=t.next();s;s=t.next()){if(s.code===0&&s.type==="string"){var l=s.value;if(l==="SECTION"){var c=t.next();c?.code===2&&c.type==="string"&&c.value==="HEADER"&&(o=!0),a=null;continue}if(l==="ENDSEC"&&o)return{version:n,encoding:i};a=null;continue}if(o){if(s.code===9&&s.type==="string"){a=s.value;continue}if(a==="$ACADVER"&&s.code===1&&s.type==="string")try{n=new Br(s.value)}catch{}else a==="$DWGCODEPAGE"&&s.code===3&&s.type==="string"&&(i=fV(s.value));if(a!==null&&(a=null,n&&i))return{version:n,encoding:i}}}return{version:n,encoding:i}}function pV(r){return r.version&&!r.version.capabilities.supportsUtf8CodePage&&r.encoding?r.encoding:null}function QS(r){for(var e,t,n,i,o=65536,a=new TextDecoder("utf-8"),s=0,l="",c=null,u=null,h=!1;s<r.byteLength;){var d=Math.min(s+o,r.byteLength),p=r.slice(s,d);s=d;var f=l+a.decode(p,{stream:!0}),m=f.split(/\r?\n/);l=(e=m.pop())!==null&&e!==void 0?e:"";for(var g=0;g<m.length;g++){var y=m[g].trim();if(y==="SECTION"&&((t=m[g+2])===null||t===void 0?void 0:t.trim())==="HEADER")h=!0;else if(y==="ENDSEC"&&h)return{version:c,encoding:u};if(h&&y==="$ACADVER"){var b=(n=m[g+2])===null||n===void 0?void 0:n.trim();b&&(c=new Br(b))}else if(h&&y==="$DWGCODEPAGE"){var b=(i=m[g+2])===null||i===void 0?void 0:i.trim();b&&(u=fV(b))}if(c&&u)return{version:c,encoding:u}}}return{version:c,encoding:u}}function Ioe(r){for(var e=r.trim(),t=e.length>>>1,n=new Uint8Array(t),i=0;i<t;i++){var o=Gm[e.charCodeAt(i*2)&127],a=Gm[e.charCodeAt(i*2+1)&127];n[i]=o<<4|a}return n}function Loe(r,e){var t=Qs(r);if(t==="comment")return null;switch(t){case"string":return{code:r,type:t,value:Uv(e)};case"int":{var n=parseInt(e.trim(),10);return{code:r,type:t,value:Number.isFinite(n)?n:0}}case"long":{var i=e.trim(),n=Number(i);if(Number.isSafeInteger(n))return{code:r,type:t,value:n};try{return{code:r,type:t,value:BigInt(i)}}catch{return{code:r,type:t,value:0}}}case"double":{var n=Number(e.trim());return{code:r,type:t,value:Number.isFinite(n)?n:0}}case"bool":{var o=e.trim();return{code:r,type:t,value:o!=="0"&&o!==""}}case"handle":return{code:r,type:t,value:e.trim()};case"binary":return{code:r,type:t,value:Ioe(e)};default:return null}}function jv(r){var e=0,t=1,n,i=!1;function o(){if(!(e>=r.length)){for(var s=e;s<r.length;){var l=r.charCodeAt(s);if(l===10||l===13)break;s++}var c=r.slice(e,s);return s<r.length&&r.charCodeAt(s)===13&&s++,s<r.length&&r.charCodeAt(s)===10&&s++,e=s,t++,c}}function a(){for(;;){var s=o();if(s===void 0)return;var l=s.trim();if(l!==""){var c=o();if(c===void 0)return;var u=Number(l);if(Number.isFinite(u)&&u!==999){var h=Loe(u,c);if(h)return h}}}}return{kind:"ascii",next:function(){if(i){var s=n;return n=void 0,i=!1,s}return a()},peek:function(){return i||(n=a(),i=!0),n},position:function(){return{line:t,byteOffset:e}}}}function ZI(r){return qI(r)}function Ooe(r){var e=BigInt(Number.MAX_SAFE_INTEGER),t=-e;return r>=t&&r<=e?Number(r):r}function Vv(r,e){var t,n;e===void 0&&(e={});var i=(t=e.encoding)!==null&&t!==void 0?t:"utf-8",o=(n=e.legacyR12)!==null&&n!==void 0?n:!1,a=new TextDecoder(i),s=22,l=new DataView(r.buffer,r.byteOffset,r.byteLength),c=r.length>=s?s:r.length,u,h=!1;function d(){if(!(c>=r.length)){if(o){var w=r[c];if(w===void 0)return;if(w===255){if(c+3>r.length)return;c+=1;var _=r[c],A=r[c+1];return c+=2,A<<8|_}return c+=1,w}if(!(c+2>r.length)){var E=l.getUint16(c,!0);return c+=2,E}}}function p(){for(var w=c;c<r.length&&r[c]!==0;)c+=1;if(!(c>=r.length)){var _=r.subarray(w,c);return c+=1,a.decode(_)}}function f(){if(!(c+2>r.length)){var w=l.getInt16(c,!0);return c+=2,w}}function m(){if(!(c+4>r.length)){var w=l.getInt32(c,!0);return c+=4,w}}function g(){if(!(c+8>r.length)){var w=l.getBigInt64(c,!0);return c+=8,Ooe(w)}}function y(){if(!(c+8>r.length)){var w=l.getFloat64(c,!0);return c+=8,w}}function b(){if(!(c>=r.length)){var w=r[c];if(w!==void 0)return c+=1,w!==0}}function v(){if(!(c>=r.length)){var w=r[c];if(w!==void 0&&(c+=1,!(c+w>r.length))){var _=r.slice(c,c+w);return c+=w,_}}}function x(){for(;c<r.length;){var w=d();if(w===void 0)return;if(w===999){if(p()===void 0)return;continue}var _=Qs(w);switch(_){case"string":{var A=p();return A===void 0?void 0:{code:w,type:"string",value:Uv(A)}}case"int":{var E=Lv(w)?m():f();return E===void 0?void 0:{code:w,type:"int",value:E}}case"long":{var E=g();return E===void 0?void 0:{code:w,type:"long",value:E}}case"double":{var E=y();return E===void 0?void 0:{code:w,type:"double",value:E}}case"bool":{var E=b();return E===void 0?void 0:{code:w,type:"bool",value:E}}case"handle":{var S=p();return S===void 0?void 0:{code:w,type:"handle",value:S}}case"binary":{var M=v();return M===void 0?void 0:{code:w,type:"binary",value:M}}case"comment":continue;default:p();continue}}}return{kind:"binary",next:function(){if(h){var w=u;return u=void 0,h=!1,w}return x()},peek:function(){return h||(u=x(),h=!0),u},position:function(){return{byteOffset:c}}}}function Doe(r){for(var e=r.length,t=0;t<e;){var n=r[t];if(n<128){t++;continue}if(n<194)return!1;if(n<224){if(t+1>=e||(r[t+1]&192)!==128)return!1;t+=2;continue}if(n<240){if(t+2>=e)return!1;var i=r[t+1];if((i&192)!==128||n===224&&i<160||n===237&&i>=160||(r[t+2]&192)!==128)return!1;t+=3;continue}if(n<245){if(t+3>=e)return!1;var i=r[t+1];if((i&192)!==128||n===240&&i<144||n===244&&i>=144||(r[t+2]&192)!==128||(r[t+3]&192)!==128)return!1;t+=4;continue}return!1}return!0}function Gv(r,e){var t;e===void 0&&(e={});var n=r instanceof Uint8Array?r:new Uint8Array(r),i=e.encoding?Rv(e.encoding):void 0;if(JS(n)){var o=i,a=e.legacyR12;if(a==null){var s=22,l=n[s],c=n[s+1],u=n[s+2];l===0&&c===83?a=!0:a=!1}if(o==null){try{o=(t=pV(koe(n,a)))!==null&&t!==void 0?t:void 0}catch{}o=o??"utf-8"}return Vv(n,{encoding:o,legacyR12:a})}if(i)return KI(n,i);if(Doe(n))return qI(n);var h=null;try{var d=n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength);h=pV(QS(d))}catch{}return h?KI(n,h):qI(n)}var $I,voe,Gm,dV,JI=W(()=>{jm();HI();Ov();qS();$I=(function(){for(var r=`AutoCAD Binary DXF\r
  2. `,e=new Uint8Array(22),t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e[20]=26,e[21]=0,e})(),voe=new TextDecoder("utf-8"),Gm=(function(){for(var r=new Int8Array(128),e=0;e<10;e++)r[48+e]=e;for(var e=0;e<6;e++)r[65+e]=10+e,r[97+e]=10+e;return r})();dV=(Number.MAX_SAFE_INTEGER-9)/10});function mV(r){for(var e,t="",n=0;n<r.length;n++)t+=((e=r[n])!==null&&e!==void 0?e:0).toString(16).padStart(2,"0").toUpperCase();return t}function Boe(r){for(var e=r.replace(/\s+/g,""),t=e.length>>>1,n=new Uint8Array(t),i=0;i<t;i++)n[i]=Number.parseInt(e.slice(i*2,i*2+2),16)||0;return n}function Foe(r){if(r instanceof Uint8Array)return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r)&&!(r instanceof DataView)){var e=r;return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}if(typeof r=="string"){var t=r.replace(/\s+/g,"");return t.length===0?new Uint8Array(0):!/^[0-9A-Fa-f]*$/.test(t)||t.length%2!==0?void 0:Boe(t)}if(Array.isArray(r)&&r.every(function(n){return typeof n=="number"&&Number.isFinite(n)&&n>=0&&n<=255}))return Uint8Array.from(r)}function Noe(r){var e;if(!(r==null||typeof r=="number"||typeof r=="string")){if(typeof r=="object"&&"x"in r&&"y"in r&&typeof r.x=="number"&&typeof r.y=="number"){var t=r;return{x:t.x,y:t.y,z:(e=t.z)!==null&&e!==void 0?e:0}}if(Array.isArray(r)&&typeof r[0]=="number"&&typeof r[1]=="number")return{x:r[0],y:r[1],z:typeof r[2]=="number"?r[2]:0}}}var eA,Hv,na,Roe,el,Hm=W(()=>{zt();tt();jm();Ov();JI();qS();eA=function(){return eA=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},eA.apply(this,arguments)},Hv=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.Ok=0]="Ok",r[r.EndOfFile=1]="EndOfFile",r[r.EndOfObject=2]="EndOfObject",r[r.InvalidDxfCode=3]="InvalidDxfCode",r[r.BadDxfSequence=4]="BadDxfSequence",r[r.NotThatKindOfClass=5]="NotThatKindOfClass",r[r.WrongMode=6]="WrongMode"})(na||(na={}));Roe=(function(){for(var r=`AutoCAD Binary DXF\r
  3. `,e=new Uint8Array(22),t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e[20]=26,e[21]=0,e})(),el=(function(){function r(e){e===void 0&&(e={});var t,n;this._binaryLength=0,this._pushed=[],this._status=na.Ok,this._errorMessage="",this._database=e.database,this._precision=Math.max(0,Math.min(16,(t=e.precision)!==null&&t!==void 0?t:16)),this._version=e.version instanceof Br?e.version:e.version!=null?new Br(e.version):void 0,this._outputFormat=(n=e.outputFormat)!==null&&n!==void 0?n:"ascii",this._lines=[],this._binaryChunks=[],this._handleMap=new Map,this._nextHandle=1,this._mode=e.reader?"read":"write",this._reader=e.reader,this._mode==="write"&&this._outputFormat==="binary"&&this.appendBinary(Roe)}return r.forReading=function(e,t){return t===void 0&&(t={}),new r(eA(eA({},t),{reader:e}))},r.fromBuffer=function(e,t){return t===void 0&&(t={}),r.forReading(Gv(e,{encoding:t.encoding}),t)},r.fromString=function(e,t){return t===void 0&&(t={}),r.forReading(jv(e),t)},Object.defineProperty(r.prototype,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"database",{get:function(){return this._database},set:function(e){this._database=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"precision",{get:function(){return this._precision},enumerable:!1,configurable:!0}),r.prototype.setPrecision=function(e){return this._precision=Math.max(0,Math.min(16,e)),this},Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nextHandle",{get:function(){return this._nextHandle},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"filerStatus",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"errorMessage",{get:function(){return this._errorMessage},enumerable:!1,configurable:!0}),r.prototype.setVersion=function(e){return this._version=e instanceof Br?e:new Br(e),this},r.prototype.setError=function(e,t){return t===void 0&&(t=""),this._status=e,this._errorMessage=t,this},r.prototype.resetStatus=function(){return this._status=na.Ok,this._errorMessage="",this},r.prototype.toString=function(){if(this.assertWriteMode(),this._outputFormat==="binary")throw new Error("Use toBinary() for binary DXF output");return this._lines.join(`
  4. `)+`
  5. `},r.prototype.toBinary=function(){var e,t;if(this.assertWriteMode(),this._outputFormat!=="binary")throw new Error("Filer is not in binary output mode");var n=new Uint8Array(this._binaryLength),i=0;try{for(var o=Hv(this._binaryChunks),a=o.next();!a.done;a=o.next()){var s=a.value;n.set(s,i),i+=s.length}}catch(l){e={error:l}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},r.prototype.registerHandle=function(e){return this._handleMap.has(e)||(/^[0-9A-F]+$/i.test(e)?this._handleMap.set(e,e.toUpperCase()):(this._handleMap.set(e,this._nextHandle.toString(16).toUpperCase()),this._nextHandle+=1)),this._handleMap.get(e)},r.prototype.resolveHandle=function(e){if(e)return this.registerHandle(e)},Object.defineProperty(r.prototype,"atEof",{get:function(){var e;return this._mode!=="read"||this._pushed.length>0?!1:((e=this._reader)===null||e===void 0?void 0:e.peek())===void 0},enumerable:!1,configurable:!0}),r.prototype.position=function(){return this._mode!=="read"||!this._reader?{byteOffset:0}:this._reader.position()},Object.defineProperty(r.prototype,"atEndOfObject",{get:function(){if(this._mode!=="read")return!0;var e=this.peekPair();return e===void 0||e.code===0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"atExtendedData",{get:function(){if(this._mode!=="read")return!1;var e=this.peekPair();return e?e.code===1001||e.code===1e3||e.code===1002:!1},enumerable:!1,configurable:!0}),r.prototype.atSubclassData=function(e){if(this._mode!=="read")return!1;var t=this.peekPair();return!t||t.code!==100||typeof t.value!="string"||t.value!==e?!1:(this.readPair(),!0)},r.prototype.peekItem=function(){var e=this.peekPair();return e?this.pairToTypedValue(e):void 0},r.prototype.readItem=function(){var e=this.readPair();if(!e){this._status=na.EndOfFile;return}return this._status=na.Ok,this.pairToTypedValue(e)},r.prototype.pushBackItem=function(e){if(e&&"type"in e){this._pushed.push(e);return}if(e){this._pushed.push(this.typedValueToPair(e));return}this._lastRead&&this._pushed.push(this._lastRead)},r.prototype.skipToEndOfObject=function(){for(;!this.atEndOfObject&&!this.atEof;)this.readPair()},r.prototype.readString=function(e){var t=this.readPair();if(t){if(e!=null&&t.code!==e){this.pushBackPair(t),this.setError(na.InvalidDxfCode,"Expected group code ".concat(e,", got ").concat(t.code));return}return t.type==="string"||t.type==="handle"?t.value:String(t.value)}},r.prototype.readInt16=function(e){return this.readNumber(e)},r.prototype.readInt32=function(e){return this.readNumber(e)},r.prototype.readInt64=function(e){var t=this.readPair();if(t){if(e!=null&&t.code!==e){this.pushBackPair(t),this.setError(na.InvalidDxfCode,"Expected group code ".concat(e,", got ").concat(t.code));return}if(t.type==="long"||t.type==="int"||t.type==="double")return t.value;if(t.type==="bool")return t.value?1:0;var n=Number(t.value);return Number.isFinite(n)?n:0}},r.prototype.readDouble=function(e){return this.readNumber(e)},r.prototype.readBoolean=function(e){var t=this.readPair();if(t){if(e!=null&&t.code!==e){this.pushBackPair(t),this.setError(na.InvalidDxfCode,"Expected group code ".concat(e,", got ").concat(t.code));return}return t.type==="bool"?t.value:typeof t.value=="number"?t.value!==0:typeof t.value=="string"?t.value!=="0"&&t.value!=="":!!t.value}},r.prototype.readHandle=function(e){var t=this.readPair();if(t){if(e!=null&&t.code!==e){this.pushBackPair(t),this.setError(na.InvalidDxfCode,"Expected group code ".concat(e,", got ").concat(t.code));return}return t.type==="handle"||t.type==="string"?t.value:String(t.value)}},r.prototype.readObjectId=function(e){return this.readHandle(e)},r.prototype.readPoint2d=function(e){var t,n=this.readDouble(e);if(n!==void 0){var i=this.peekPair(),o=0;return i&&i.code===e+10&&(o=(t=this.readNumber())!==null&&t!==void 0?t:0),new Z(n,o)}},r.prototype.readPoint3d=function(e){var t,n,i=this.readDouble(e);if(i!==void 0){var o=0,a=0,s=this.peekPair();s&&s.code===e+10&&(o=(t=this.readNumber())!==null&&t!==void 0?t:0);var l=this.peekPair();return l&&l.code===e+20&&(a=(n=this.readNumber())!==null&&n!==void 0?n:0),new k(i,o,a)}},r.prototype.readVector3d=function(e){var t=this.readPoint3d(e);return t?new G(t.x,t.y,t.z):void 0},r.prototype.readCmColorInto=function(e,t,n){t===void 0&&(t=62),n===void 0&&(n=420);var i=this.peekPair();if(!i)return!1;if(i.code===t){var o=this.readNumber();return o!=null&&(e.colorIndex=o),!0}if(i.code===n){var o=this.readNumber();return o!=null&&e.setRGBValue(o),!0}return!1},r.prototype.writeGroup=function(e,t){if(this.assertWriteMode(),t==null)return this;if(this._outputFormat==="binary")return this.writeBinaryGroup(e,t);this._lines.push(String(Math.trunc(e)));var n=this.formatValue(t);return this._lines.push(n===""?"0":n),this},r.prototype.writeStart=function(e){return this.writeString(0,e)},Object.defineProperty(r.prototype,"capabilities",{get:function(){var e;return((e=this._version)!==null&&e!==void 0?e:Br.latest).capabilities},enumerable:!1,configurable:!0}),r.prototype.writeSubclassMarker=function(e){return this.capabilities.supportsSubclassMarkers?this.writeString(100,e):this},r.prototype.writeString=function(e,t){return!t&&t!==""?this:this.writeGroup(e,t)},r.prototype.writeMTextContents=function(e){var t,n;try{for(var i=Hv(Fv(e??"")),o=i.next();!o.done;o=i.next()){var a=o.value;this.writeString(a.code,a.value)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},r.prototype.writeInt8=function(e,t){return t==null?this:this.writeGroup(e,Math.trunc(t))},r.prototype.writeInt16=function(e,t){return t==null?this:this.writeGroup(e,Math.trunc(t))},r.prototype.writeInt32=function(e,t){return t==null?this:this.writeGroup(e,Math.trunc(t))},r.prototype.writeInt64=function(e,t){return t==null?this:this.writeGroup(e,Math.trunc(t))},r.prototype.writeUInt16=function(e,t){return t==null?this:this.writeGroup(e,Math.max(0,t))},r.prototype.writeUInt32=function(e,t){return t==null?this:this.writeGroup(e,Math.max(0,t))},r.prototype.writeBoolean=function(e,t){return t==null?this:this.writeGroup(e,t?1:0)},r.prototype.writeBool=function(e,t){return this.writeBoolean(e,t)},r.prototype.writeDouble=function(e,t){return t==null||!Number.isFinite(t)?this:this.writeGroup(e,t)},r.prototype.writeAngle=function(e,t){return t==null||!Number.isFinite(t)?this:this.writeDouble(e,t*180/Math.PI)},r.prototype.writeHandle=function(e,t){if(!this.capabilities.supportsHandles)return this;var n=this.resolveHandle(t);return n?this.writeString(e,n):this},r.prototype.writeObjectId=function(e,t){return this.writeHandle(e,t)},r.prototype.writeLineWeight=function(e,t){return t==null||!this.capabilities.supportsLineWeight?this:this.writeInt16(e,t)},r.prototype.writePoint2d=function(e,t){return t?(this.writeDouble(e,t.x),this.writeDouble(e+10,t.y),this):this},r.prototype.writePoint3d=function(e,t){var n;return t?(this.writeDouble(e,t.x),this.writeDouble(e+10,t.y),this.writeDouble(e+20,(n=t.z)!==null&&n!==void 0?n:0),this):this},r.prototype.writeVector3d=function(e,t){var n;return t?(this.writeDouble(e,t.x),this.writeDouble(e+10,t.y),this.writeDouble(e+20,(n=t.z)!==null&&n!==void 0?n:0),this):this},r.prototype.writeCmColor=function(e,t,n){if(t===void 0&&(t=62),n===void 0&&(n=420),!e)return this;var i=e.colorIndex;i!=null&&this.writeInt16(t,i);var o=e.RGB;return o!=null&&e.colorIndex==null&&(this.capabilities.supportsTrueColor?this.writeInt32(n,o):this.writeInt16(t,7)),this},r.prototype.writeTransparency=function(e,t){return t===void 0&&(t=440),!e||e.method===Pr.ErrorValue||!this.capabilities.supportsTransparency?this:this.writeInt32(t,e.serialize())},r.prototype.writeResultBuffer=function(e){return this.writeTypedValues(e)},r.prototype.writeTypedValues=function(e){var t,n,i,o,a,s;if(!e)return this;try{for(var l=Hv(e),c=l.next();!c.done;c=l.next()){var u=c.value,h=Number(u.code);if(h===1e3&&typeof u.value=="string"){var d=this.capabilities.supportsUtf8CodePage?Nv(u.value,Vm):XI(this.sanitizeStringForDxfLine(u.value),Vm);try{for(var p=(i=void 0,Hv(d)),f=p.next();!f.done;f=p.next()){var m=f.value;this.writeGroup(1e3,m)}}catch(x){i={error:x}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}continue}if(h===1004){var g=Foe(u.value);if(g){try{for(var y=(a=void 0,Hv(zv(g,Bv))),b=y.next();!b.done;b=y.next()){var m=b.value;this._outputFormat==="binary"?this.writeGroup(1004,m):this.writeGroup(1004,mV(m))}}catch(x){a={error:x}}finally{try{b&&!b.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}continue}}if(h>=1010&&h<=1013){var v=Noe(u.value);if(v){this.writePoint3d(h,v);continue}}this.writeGroup(u.code,u.value)}}catch(x){t={error:x}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return this},r.prototype.startSection=function(e){return this.writeStart("SECTION"),this.writeString(2,e),this},r.prototype.endSection=function(){return this.writeStart("ENDSEC"),this},r.prototype.startTable=function(e){return this.writeStart("TABLE"),this.writeString(2,e),this},r.prototype.endTable=function(){return this.writeStart("ENDTAB"),this},r.prototype.assertWriteMode=function(){if(this._mode!=="write")throw new Error("AcDbDxfFiler is in read mode")},r.prototype.appendBinary=function(e){this._binaryChunks.push(e),this._binaryLength+=e.length},r.prototype.writeBinaryCode=function(e){var t=Math.trunc(e)&65535,n=!this.capabilities.supportsSubclassMarkers;if(n){t<=255?this.appendBinary(Uint8Array.of(t)):this.appendBinary(Uint8Array.of(255,t&255,t>>8&255));return}var i=new Uint8Array(2);new DataView(i.buffer).setUint16(0,t,!0),this.appendBinary(i)},r.prototype.writeBinaryGroup=function(e,t){var n=Qs(Math.trunc(e));switch(this.writeBinaryCode(Math.trunc(e)),n){case"string":case"handle":{var i=typeof t=="string"?this.encodeStringForWrite(t):this.formatValue(t),o=new TextEncoder().encode(i===""?"0":i),a=new Uint8Array(o.length+1);a.set(o),a[o.length]=0,this.appendBinary(a);break}case"int":{var s=Math.trunc(Number(t))||0;if(Lv(Math.trunc(e))){var l=new Uint8Array(4);new DataView(l.buffer).setInt32(0,s,!0),this.appendBinary(l)}else{var l=new Uint8Array(2);new DataView(l.buffer).setInt16(0,s,!0),this.appendBinary(l)}break}case"long":{var l=new Uint8Array(8),c=new DataView(l.buffer);typeof t=="bigint"?c.setBigInt64(0,t,!0):c.setBigInt64(0,BigInt(Math.trunc(Number(t))||0),!0),this.appendBinary(l);break}case"double":{var l=new Uint8Array(8),s=Number(t);new DataView(l.buffer).setFloat64(0,Number.isFinite(s)?s:0,!0),this.appendBinary(l);break}case"bool":{var u=typeof t=="boolean"?t:Number(t)!==0&&t!==""&&t!=null;this.appendBinary(Uint8Array.of(u?1:0));break}case"binary":{var h=t instanceof Uint8Array?t:new Uint8Array(0),d=Math.min(255,h.length),p=new Uint8Array(1+d);p[0]=d,p.set(h.subarray(0,d),1),this.appendBinary(p);break}default:{var i=this.formatValue(t),o=new TextEncoder().encode(i===""?"0":i),a=new Uint8Array(o.length+1);a.set(o),a[o.length]=0,this.appendBinary(a);break}}return this},r.prototype.assertReadMode=function(){if(this._mode!=="read"||!this._reader)throw new Error("AcDbDxfFiler is not in read mode")},r.prototype.peekPair=function(){return this.assertReadMode(),this._pushed.length>0?this._pushed[this._pushed.length-1]:this._reader.peek()},r.prototype.readPair=function(){if(this.assertReadMode(),this._pushed.length>0){var e=this._pushed.pop();return this._lastRead=e,e}var t=this._reader.next();return this._lastRead=t,t},r.prototype.pushBackPair=function(e){this._pushed.push(e)},r.prototype.readNumber=function(e){var t=this.readPair();if(t){if(e!=null&&t.code!==e){this.pushBackPair(t),this.setError(na.InvalidDxfCode,"Expected group code ".concat(e,", got ").concat(t.code));return}if(t.type==="double"||t.type==="int"||t.type==="long"){var n=t.value;return typeof n=="bigint"?Number(n):n}if(t.type==="bool")return t.value?1:0;var i=Number(t.value);return Number.isFinite(i)?i:0}},r.prototype.pairToTypedValue=function(e){return{code:e.code,value:e.value}},r.prototype.typedValueToPair=function(e){var t=Number(e.code),n=e.value;return typeof n=="boolean"?{code:t,type:"bool",value:n}:typeof n=="number"?Number.isInteger(n)?{code:t,type:"int",value:n}:{code:t,type:"double",value:n}:typeof n=="bigint"?{code:t,type:"long",value:n}:n instanceof Uint8Array?{code:t,type:"binary",value:n}:{code:t,type:"string",value:String(n??"")}},r.prototype.formatValue=function(e){if(typeof e=="string")return this.encodeStringForWrite(e);if(typeof e=="boolean")return e?"1":"0";if(typeof e=="number"){if(!Number.isFinite(e))return"0";if(Number.isInteger(e))return String(e);var t=e.toFixed(this._precision),n=t.replace(/\.?0+$/,"");return n===""||n==="-"?"0":n}return e instanceof Uint8Array?mV(e):String(e)},r.prototype.sanitizeStringForDxfLine=function(e){return e.replace(/\r\n|\r|\n/g," ").replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"")},r.prototype.encodeStringForWrite=function(e){var t=this.sanitizeStringForDxfLine(e);return this.capabilities.supportsUtf8CodePage?t:YI(t)},r})()});function bV(r){var e=0,t=r||11;if(!tA||Jd+t>gV*2)for(tA="",Jd=0;e<gV;e++)tA+=yV[Math.random()*256|0];return tA.substring(Jd,Jd+++t)}var Jd,yV,gV,tA,vV=W(()=>{Jd=256,yV=[],gV=256;for(;Jd--;)yV[Jd]=(Jd+256).toString(16).substring(1)});var nA,xV,tl,Wv=W(()=>{nA=function(){return nA=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},nA.apply(this,arguments)},xV=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tl=(function(){function r(e){var t,n;if(this._values=[],e)try{for(var i=xV(e),o=i.next();!o.done;o=i.next()){var a=o.value;this._values.push(nA({},a))}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}return Object.defineProperty(r.prototype,"length",{get:function(){return this._values.length},enumerable:!1,configurable:!0}),r.prototype.at=function(e){return this._values[e]},r.prototype.add=function(e){this._values.push(e)},r.prototype.addRange=function(e){var t,n;try{for(var i=xV(e),o=i.next();!o.done;o=i.next()){var a=o.value;this._values.push(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},r.prototype.clear=function(){this._values.length=0},r.prototype.toArray=function(){return this._values.map(function(e){return nA({},e)})},r.prototype.clone=function(){return new r(this._values)},r.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},r})()});function Xv(r){Qd=r}function Yv(r){Qd&&(Qd().workingDatabase=r)}function $v(){if(Qd)return Qd().workingDatabase;throw new Error("The current working database must be set before using it!")}var zoe,Io,QI,nl,Qd,Kt,gr=W(()=>{zt();vV();Kb();Wv();zoe=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Io=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},QI=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},nl="TEMP_";Kt=(function(){function r(e,t){e=e||{},this._attrs=new pm(e,t),this._attrs.get("objectId")||(this._database?this._attrs.set("objectId",this._database.generateHandle()):this._attrs.set("objectId",this.generateTemporaryHandle()))}return r.prototype.generateTemporaryHandle=function(){return nl+bV()},Object.defineProperty(r.prototype,"attrs",{get:function(){return this._attrs},enumerable:!1,configurable:!0}),r.prototype.getAttr=function(e){var t=this._attrs.get(e);if(t===void 0)throw new Error("[AcDbObject] Attribute name '".concat(e,"' does't exist in this object!"));return t},r.prototype.getAttrWithoutException=function(e){return this._attrs.get(e)},r.prototype.setAttr=function(e,t){this._attrs.set(e,t)},Object.defineProperty(r.prototype,"objectId",{get:function(){return this.getAttr("objectId")},set:function(e){this._attrs.set("objectId",e),e&&!e.startsWith(nl)&&this._database&&this._database.updateMaxHandle(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isTemp",{get:function(){var e=this.getAttrWithoutException("objectId");return!!e&&e.startsWith(nl)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ownerId",{get:function(){return this.getAttr("ownerId")},set:function(e){this._attrs.set("ownerId",e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"extensionDictionary",{get:function(){return this.getAttrWithoutException("extensionDictionary")},set:function(e){this._attrs.set("extensionDictionary",e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"database",{get:function(){if(this._database)return this._database;if(Qd)return Qd().workingDatabase;throw new Error("The current working database must be set before using it!")},set:function(e){this.assignDatabase(e)},enumerable:!1,configurable:!0}),r.prototype.assignDatabase=function(e){this._database=e},r.prototype.findImportedXDataRange=function(e){var t,n=this._importedXData;if(n)for(var i=0;i<n.length;){if(Number(n[i])!==Ki.ExtendedDataRegAppName){i+=2;continue}for(var o=String((t=n[i+1])!==null&&t!==void 0?t:""),a=i+2;a<n.length&&Number(n[a])!==Ki.ExtendedDataRegAppName;)a+=2;if(o===e)return[i,a];i=a}},r.prototype.removeImportedXData=function(e){var t=this._importedXData,n=this.findImportedXDataRange(e);!t||!n||(t.splice(n[0],n[1]-n[0]),t.length===0&&(this._importedXData=void 0))},r.prototype.rememberXDataApp=function(e){var t;if(e){var n=(t=this._xDataOrder)!==null&&t!==void 0?t:this._xDataOrder=[];n.indexOf(e)===-1&&n.push(e)}},r.prototype.forgetXDataApp=function(e){var t=this._xDataOrder;if(t){var n=t.indexOf(e);n>=0&&t.splice(n,1),t.length===0&&(this._xDataOrder=void 0)}},r.prototype.clearMaterializedXData=function(e){var t=this._xDataMap;t&&(t.delete(e),t.size===0&&(this._xDataMap=void 0))},r.prototype.importedXDataValues=function(e,t){var n,i;return zoe(this,function(o){switch(o.label){case 0:if(n=this._importedXData,!n)return[2];i=e,o.label=1;case 1:return i<t?[4,{code:Number(n[i]),value:n[i+1]}]:[3,4];case 2:o.sent(),o.label=3;case 3:return i+=2,[3,1];case 4:return[2]}})},r.prototype.setImportedXData=function(e){var t,n,i,o,a,s,l,c=[],u,h;try{for(var d=Io(e),p=d.next();!p.done;p=d.next()){var f=p.value,m=Number(f.code);if(m===Ki.ExtendedDataRegAppName){u&&h&&c.push({appId:u,flat:h}),u=String(f.value),h=[m,f.value];continue}!u||!h||h.push(m,f.value)}}catch(A){t={error:A}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}if(u&&h&&c.push({appId:u,flat:h}),c.length!==0)try{for(var g=Io(c),y=g.next();!y.done;y=g.next()){var b=y.value;if(b.appId){this.removeImportedXData(b.appId),this.clearMaterializedXData(b.appId);var v=(l=this._importedXData)!==null&&l!==void 0?l:this._importedXData=[];try{for(var x=(a=void 0,Io(b.flat)),w=x.next();!w.done;w=x.next()){var _=w.value;v.push(_)}}catch(A){a={error:A}}finally{try{w&&!w.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}this.rememberXDataApp(b.appId)}}}catch(A){i={error:A}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}},r.prototype.getXData=function(e){var t,n,i,o,a=(i=this._xDataMap)===null||i===void 0?void 0:i.get(e);if(a)return a;var s=this.findImportedXDataRange(e);if(s){var l=new tl;try{for(var c=Io(this.importedXDataValues(s[0],s[1])),u=c.next();!u.done;u=c.next()){var h=u.value;l.add(h)}}catch(d){t={error:d}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return this.removeImportedXData(e),((o=this._xDataMap)!==null&&o!==void 0?o:this._xDataMap=new Map).set(e,l),l}},r.prototype.setXData=function(e){var t,n,i;try{for(var o=Io(e),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.code===Ki.ExtendedDataRegAppName){var l=s.value;this.removeImportedXData(l),((i=this._xDataMap)!==null&&i!==void 0?i:this._xDataMap=new Map).set(l,e),this.rememberXDataApp(l)}}}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},r.prototype.removeXData=function(e){this.removeImportedXData(e),this.clearMaterializedXData(e),this.forgetXDataApp(e)},r.prototype.createExtensionDictionary=function(){var e=this.extensionDictionary;if(e)return e;var t=this.database;if(t)return t.createExtensionDictionaryFor(this)},r.prototype.close=function(){},r.prototype.getOwnSnapshotKeys=function(){return Reflect.ownKeys(this).filter(function(e){return typeof e=="string"&&!r.SNAPSHOT_EXCLUDED_KEYS.has(e)})},r.prototype.cloneAttrs=function(e){var t=this.cloneValue(e.attributes);return new pm(t)},r.prototype.restoreAttrsFrom=function(e){var t,n,i=this.cloneValue(e.attributes),o=this._attrs.attributes;try{for(var a=Io(Object.keys(o)),s=a.next();!s.done;s=a.next()){var l=s.value;l in i||this._attrs.set(l,void 0,{unset:!0,silent:!0})}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}this._attrs.set(i,{silent:!0})},r.prototype.restoreXDataMapFrom=function(e){var t,n;if(!e||e.size===0){this._xDataMap=void 0;return}var i=new Map;try{for(var o=Io(e.entries()),a=o.next();!a.done;a=o.next()){var s=QI(a.value,2),l=s[0],c=s[1];i.set(l,this.cloneValue(c))}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this._xDataMap=i},r.prototype.copySnapshotStateTo=function(e){var t,n;e._attrs=this.cloneAttrs(this._attrs),e._xDataMap=this._xDataMap?this.cloneValue(this._xDataMap):void 0;var i=this,o=e;try{for(var a=Io(this.getOwnSnapshotKeys()),s=a.next();!s.done;s=a.next()){var l=s.value;r.SNAPSHOT_INTERNAL_KEYS.has(l)||(o[l]=this.cloneValue(i[l]))}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},r.prototype.clone=function(){var e=Object.create(Object.getPrototypeOf(this));return this.copySnapshotStateTo(e),e.objectId=this.generateTemporaryHandle(),e},r.prototype.clonePreservingIdentity=function(){var e=this.clone(),t=this.getAttrWithoutException("objectId");t&&e._attrs.set("objectId",t);var n=this.getAttrWithoutException("ownerId");return n!==void 0&&e._attrs.set("ownerId",n),this._database&&(e._database=this._database),e},r.prototype.restoreFrom=function(e){var t,n,i,o,a=this.objectId,s=this._database;this.restoreAttrsFrom(e._attrs),this.restoreXDataMapFrom(e._xDataMap);var l=e,c=this,u=new Set(e.getOwnSnapshotKeys());try{for(var h=Io(u),d=h.next();!d.done;d=h.next()){var p=d.value;r.SNAPSHOT_INTERNAL_KEYS.has(p)||r.SNAPSHOT_EXCLUDED_KEYS.has(p)||(c[p]=this.cloneValue(l[p]))}}catch(g){t={error:g}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}try{for(var f=Io(this.getOwnSnapshotKeys()),m=f.next();!m.done;m=f.next()){var p=m.value;r.SNAPSHOT_INTERNAL_KEYS.has(p)||r.SNAPSHOT_EXCLUDED_KEYS.has(p)||u.has(p)||delete c[p]}}catch(g){i={error:g}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}this.objectId=a,s&&(this.database=s)},r.prototype.cloneValue=function(e){var t,n,i,o,a,s,l=this;if(e==null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e))return e.map(function(A){return l.cloneValue(A)});if(e instanceof Map){var c=new Map;try{for(var u=Io(e.entries()),h=u.next();!h.done;h=u.next()){var d=QI(h.value,2),p=d[0],f=d[1];c.set(this.cloneValue(p),this.cloneValue(f))}}catch(A){t={error:A}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return c}if(e instanceof Set){var m=new Set;try{for(var g=Io(e.values()),y=g.next();!y.done;y=g.next()){var f=y.value;m.add(this.cloneValue(f))}}catch(A){i={error:A}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}return m}if(ArrayBuffer.isView(e)){if(e instanceof DataView)return new DataView(e.buffer.slice(0));var b=e.constructor;return new b(e)}if(e instanceof ArrayBuffer)return e.slice(0);if(typeof Blob<"u"&&e instanceof Blob||e&&typeof e=="object"&&"tables"in e&&"transactionManager"in e)return e;if("clone"in e&&typeof e.clone=="function")return e.clone();var v=Object.create(Object.getPrototypeOf(e)),x=e;try{for(var w=Io(Object.keys(x)),_=w.next();!_.done;_=w.next()){var p=_.value;v[p]=this.cloneValue(x[p])}}catch(A){a={error:A}}finally{try{_&&!_.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}return v},r.prototype.dxfOut=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=QI(e,2),i=n[0],o=n[1],a=o===void 0?!1:o;return i.writeHandle(5,this.objectId),i.writeObjectId(330,this.ownerId),i.writeObjectId(360,this.extensionDictionary),this.dxfOutFields(i),a&&this.dxfOutXData(i),this},r.prototype.dxfOutXData=function(e){var t,n,i,o,a,s=this._xDataOrder;if(s){try{for(var l=Io(s),c=l.next();!c.done;c=l.next()){var u=c.value,h=(a=this._xDataMap)===null||a===void 0?void 0:a.get(u);if(h){e.writeResultBuffer(h);continue}var d=this.findImportedXDataRange(u);d&&e.writeTypedValues(this.importedXDataValues(d[0],d[1]))}}catch(x){t={error:x}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return}var p=this._importedXData;if(p)for(var f=0;f<p.length;){for(var m=f+2;m<p.length&&Number(p[m])!==Ki.ExtendedDataRegAppName;)m+=2;e.writeTypedValues(this.importedXDataValues(f,m)),f=m}var g=this._xDataMap;if(g)try{for(var y=Io(g.values()),b=y.next();!b.done;b=y.next()){var v=b.value;e.writeResultBuffer(v)}}catch(x){i={error:x}}finally{try{b&&!b.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}},r.prototype.dxfOutFields=function(e){return this},r.prototype.dxfIn=function(e){for(;!e.atEndOfObject&&!e.atEof&&!e.atExtendedData;){var t=e.readItem();if(!t)break;var n=Number(t.code);if(n===5||n===105)this.objectId=String(t.value);else if(n===330)this.ownerId=String(t.value);else if(n===360)this.extensionDictionary=String(t.value);else if(n===102)this.dxfInControlString(e,String(t.value));else if(n===100){e.pushBackItem(t);break}else{e.pushBackItem(t);break}}return this.dxfInFields(e),e.atExtendedData&&this.dxfInXData(e),this},r.prototype.dxfInControlString=function(e,t){for(var n=t==="{ACAD_XDICTIONARY"||t==="ACAD_XDICTIONARY";!e.atEndOfObject&&!e.atEof;){var i=e.readItem();if(!i)break;var o=Number(i.code);if(o===102){var a=String(i.value);if(a==="}"||a==="")break;this.dxfInControlString(e,a);continue}n&&o===360&&!this.extensionDictionary&&(this.extensionDictionary=String(i.value))}},r.prototype.dxfInFields=function(e){return this},r.prototype.dxfInXData=function(e){for(var t=this,n,i=function(){n&&n.length>0&&t.setXData(n),n=void 0};!e.atEndOfObject&&!e.atEof;){var o=e.readItem();if(!o)break;var a=Number(o.code);if(a===1001)i(),n=new tl([{code:o.code,value:o.value}]);else if(a>=1e3&&a<=1071)n||(n=new tl),n.add({code:o.code,value:o.value});else{e.pushBackItem(o);break}}i()},r.SNAPSHOT_EXCLUDED_KEYS=new Set(["_database","transactionManager"]),r.SNAPSHOT_INTERNAL_KEYS=new Set(["_attrs","_xDataMap"]),r})()});var ep,wV=W(()=>{(function(r){r.ClosedFilled="",r.Dot="_DOT",r.DotSmall="_DOTSMALL",r.DotBlank="_DOTBLANK",r.Origin="_ORIGIN",r.Origin2="_ORIGIN2",r.Open="_OPEN",r.Open90="_OPEN90",r.Open30="_OPEN30",r.Closed="_CLOSED",r.Small="_SMALL",r.None="_NONE",r.Oblique="_OBLIQUE",r.BoxFilled="_BOXFILLED",r.Box="_BOXBLANK",r.ClosedBlank="_CLOSEDBLANK",r.DatumBlank="_DATUMBLANK",r.DatumFilled="_DATUMFILLED",r.Integral="_INTEGRAL",r.ArchTick="_ARCHTICK"})(ep||(ep={}))});var $r,_V=W(()=>{(function(r){r[r.ByBlock=-2]="ByBlock",r[r.ByDIPs=-4]="ByDIPs",r[r.ByLayer=-1]="ByLayer",r[r.ByLineWeightDefault=-3]="ByLineWeightDefault",r[r.LineWeight000=0]="LineWeight000",r[r.LineWeight005=5]="LineWeight005",r[r.LineWeight009=9]="LineWeight009",r[r.LineWeight013=13]="LineWeight013",r[r.LineWeight015=15]="LineWeight015",r[r.LineWeight018=18]="LineWeight018",r[r.LineWeight020=20]="LineWeight020",r[r.LineWeight025=25]="LineWeight025",r[r.LineWeight030=30]="LineWeight030",r[r.LineWeight035=35]="LineWeight035",r[r.LineWeight040=40]="LineWeight040",r[r.LineWeight050=50]="LineWeight050",r[r.LineWeight053=53]="LineWeight053",r[r.LineWeight060=60]="LineWeight060",r[r.LineWeight070=70]="LineWeight070",r[r.LineWeight080=80]="LineWeight080",r[r.LineWeight090=90]="LineWeight090",r[r.LineWeight100=100]="LineWeight100",r[r.LineWeight106=106]="LineWeight106",r[r.LineWeight120=120]="LineWeight120",r[r.LineWeight140=140]="LineWeight140",r[r.LineWeight158=158]="LineWeight158",r[r.LineWeight200=200]="LineWeight200",r[r.LineWeight211=211]="LineWeight211"})($r||($r={}))});function Wl(r){var e=r>>16&255,t=r>>8&255,n=r&255;return .299*e+.587*t+.114*n>Uoe}function Ta(r){var e=Gl.fromBackgroundColor(r);return e.backgroundIsDark?e.foregroundOnDark:e.foregroundOnLight}function rA(r){return r?nu:tu}function Kv(r,e){return Gl.fromBackgroundColor(e).resolveSubEntityTraitsRgb(r)}var Gl,cs,tu,nu,Hl,Uoe,eL,SV=W(()=>{Gl=(function(){function r(e){e===void 0&&(e={});var t,n,i,o;this.database=e.database,this.foregroundOnDark=(t=e.foregroundOnDark)!==null&&t!==void 0?t:tu,this.foregroundOnLight=(n=e.foregroundOnLight)!==null&&n!==void 0?n:nu,this.backgroundIsDark=(i=e.backgroundIsDark)!==null&&i!==void 0?i:!0,this.fallbackRgb=(o=e.fallbackRgb)!==null&&o!==void 0?o:16777215}return r.prototype.resolveSubEntityTraitsRgb=function(e){var t,n,i,o=e.color;return o.isForeground?this.backgroundIsDark?this.foregroundOnDark:this.foregroundOnLight:o.isByLayer||o.isByBlock?(t=this.fallbackRgb)!==null&&t!==void 0?t:16777215:(i=(n=o.RGB)!==null&&n!==void 0?n:this.fallbackRgb)!==null&&i!==void 0?i:16777215},r.fromBackgroundColor=function(e,t){return e===void 0&&(e=cs),new r({database:t,foregroundOnDark:tu,foregroundOnLight:nu,backgroundIsDark:!Wl(e),fallbackRgb:16777215})},r})(),cs=0,tu=16777215,nu=0,Hl=16777215,Uoe=128,eL=new Gl({database:void 0,foregroundOnDark:tu,foregroundOnLight:nu,backgroundIsDark:!0,fallbackRgb:16777215})});var Cr,ut,AV=W(()=>{(function(r){r[r.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",r[r.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT",r[r.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",r[r.BOTTOM_TO_TOP=4]="BOTTOM_TO_TOP",r[r.BY_STYLE=5]="BY_STYLE"})(Cr||(Cr={}));(function(r){r[r.TopLeft=1]="TopLeft",r[r.TopCenter=2]="TopCenter",r[r.TopRight=3]="TopRight",r[r.MiddleLeft=4]="MiddleLeft",r[r.MiddleCenter=5]="MiddleCenter",r[r.MiddleRight=6]="MiddleRight",r[r.BottomLeft=7]="BottomLeft",r[r.BottomCenter=8]="BottomCenter",r[r.BottomRight=9]="BottomRight",r[r.BaselineLeft=10]="BaselineLeft",r[r.BaselineCenter=11]="BaselineCenter",r[r.BaselineRight=12]="BaselineRight"})(ut||(ut={}))});var tp,np,rp,MV=W(()=>{(function(r){r[r.OPTIMIZED_2D=0]="OPTIMIZED_2D",r[r.WIREFRAME=1]="WIREFRAME",r[r.HIDDEN_LINE=2]="HIDDEN_LINE",r[r.FLAT_SHADED=3]="FLAT_SHADED",r[r.GOURAUD_SHADED=4]="GOURAUD_SHADED",r[r.FLAT_SHADED_WITH_WIREFRAME=5]="FLAT_SHADED_WITH_WIREFRAME",r[r.GOURAUD_SHADED_WITH_WIREFRAME=6]="GOURAUD_SHADED_WITH_WIREFRAME"})(tp||(tp={}));(function(r){r[r.NON_ORTHOGRAPHIC=0]="NON_ORTHOGRAPHIC",r[r.TOP=1]="TOP",r[r.BOTTOM=2]="BOTTOM",r[r.FRONT=3]="FRONT",r[r.BACK=4]="BACK",r[r.LEFT=5]="LEFT",r[r.RIGHT=6]="RIGHT"})(np||(np={}));(function(r){r[r.ONE_DISTANT_LIGHT=0]="ONE_DISTANT_LIGHT",r[r.TWO_DISTANT_LIGHTS=1]="TWO_DISTANT_LIGHTS"})(rp||(rp={}))});var PV,EV,qv,CV=W(()=>{tt();PV=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},EV=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},qv=(function(){function r(){this._number=-1,this._id="",this._groupId="",this._centerPoint=new k,this._height=0,this._width=0,this._viewCenter=new k,this._viewTarget=new k,this._viewTwistAngle=0,this._viewHeight=0,this._frozenLayerIds=[],this._frozenLayers=[],this._annotationScaleName="",this._annotationScaleFactor=0}return Object.defineProperty(r.prototype,"number",{get:function(){return this._number},set:function(e){this._number=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groupId",{get:function(){return this._groupId},set:function(e){this._groupId=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"frozenLayerIds",{get:function(){return this._frozenLayerIds},set:function(e){this._frozenLayerIds=EV([],PV(e),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"frozenLayers",{get:function(){return this._frozenLayers},set:function(e){this._frozenLayers=EV([],PV(e),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"annotationScaleName",{get:function(){return this._annotationScaleName},set:function(e){this._annotationScaleName=e??""},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"annotationScaleFactor",{get:function(){return this._annotationScaleFactor},set:function(e){this._annotationScaleFactor=e>0?e:0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"centerPoint",{get:function(){return this._centerPoint},set:function(e){this._centerPoint.copy(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"box",{get:function(){var e=new ct;return e.setFromCenterAndSize(this.centerPoint,{x:this.width,y:this.height}),e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewCenter",{get:function(){return this._viewCenter},set:function(e){this._viewCenter.copy(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewTarget",{get:function(){return this._viewTarget},set:function(e){this._viewTarget.copy(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewTwistAngle",{get:function(){return this._viewTwistAngle},set:function(e){this._viewTwistAngle=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewHeight",{get:function(){return this._viewHeight},set:function(e){this._viewHeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewWidth",{get:function(){return this.viewHeight*(this.width/this.height)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewBox",{get:function(){var e=r.dcsCenterToWcs(this.viewCenter,this.viewTarget,this.viewTwistAngle),t=new ct;return t.setFromCenterAndSize(e,{x:this.viewWidth,y:this.viewHeight}),t},enumerable:!1,configurable:!0}),r.dcsCenterToWcs=function(e,t,n){var i=e.x,o=e.y;if(Number.isFinite(n)&&n!==0){var a=Math.cos(n),s=Math.sin(n);i=e.x*a-e.y*s,o=e.x*s+e.y*a}return t&&Number.isFinite(t.x)&&Number.isFinite(t.y)&&(i+=t.x,o+=t.y),new k(i,o,0)},r.prototype.clone=function(){var e=new r;return e.id=this.id,e.groupId=this.groupId,e.number=this.number,e.centerPoint.copy(this.centerPoint),e.height=this.height,e.width=this.width,e.viewCenter.copy(this.viewCenter),e.viewTarget.copy(this.viewTarget),e.viewTwistAngle=this.viewTwistAngle,e.viewHeight=this.viewHeight,e.frozenLayerIds=this.frozenLayerIds,e.frozenLayers=this.frozenLayers,e.annotationScaleName=this.annotationScaleName,e.annotationScaleFactor=this.annotationScaleFactor,e},r.prototype.copy=function(e){return this.id=e.id,this.groupId=e.groupId,this.number=e.number,this.centerPoint.copy(e.centerPoint),this.height=e.height,this.width=e.width,this.viewCenter.copy(e.viewCenter),this.viewTarget.copy(e.viewTarget),this.viewTwistAngle=e.viewTwistAngle,this.viewHeight=e.viewHeight,this.frozenLayerIds=e.frozenLayerIds,this.frozenLayers=e.frozenLayers,this.annotationScaleName=e.annotationScaleName,this.annotationScaleFactor=e.annotationScaleFactor,this},r})()});var Li=W(()=>{wV();_V();SV();AV();MV();CV()});function ru(r){if(r==null)return!1;var e=r.trim().toUpperCase().replace(/^_+/,"");return e===us}function ra(r,e,t,n){var i=Math.trunc(e);if(!Number.isFinite(i)||i<t||i>n)throw new Error("Invalid ".concat(r," value! Valid range is ").concat(t," to ").concat(n,"."));return i}function wh(r,e,t){var n=Math.trunc(r);if(!(!Number.isFinite(n)||n<e||n>t))return n}var ka,cn,Lo,Oo,tL,Zv,us,Jv,Qv,Vn,eo,rl,Wm,Xm,nL,rL,iL,oL,aL,e0,Ym,$m,t0,Km,qm,sL,lL,cL,uL,n0,Zm,Jm,iA,oA,aA,sA,lA,cA,uA,r0,i0,o0,yh,iu,ou,bh,au,su,vh,lu,cu,xh,uu,hu,bi=W(()=>{ka="Continuous",cn="Standard",Lo="Standard",Oo="Standard",tL="ANSI31",Zv="ANGLE",us="SOLID";Jv="USER",Qv="LINEAR",Vn="ByLayer",eo="ByBlock",rl="*Active",Wm="mlightcad",Xm="ACAD",nL=Object.freeze({x:0,y:0}),rL=Object.freeze({x:0,y:0}),iL=Object.freeze({x:1,y:1}),oL=Object.freeze({x:0,y:0,z:1}),aL=Object.freeze({x:0,y:0,z:0}),e0=150,Ym=1,$m=255,t0=12,Km=1,qm=255,sL=0,lL=32767,cL=0,uL=2,n0=5,Zm=1,Jm=255,iA=1,oA=2,aA=4,sA=8,lA=16,cA=32,uA=64,r0=0,i0=0,o0=iA|oA|aA|sA|lA|cA|uA,yh=0,iu=0,ou=1,bh=5,au=1,su=25,vh=1,lu=0,cu=1,xh=6,uu=0,hu=14});var il,hL=W(()=>{(function(r){r[r.OnBothOperands=0]="OnBothOperands",r[r.ExtendThis=1]="ExtendThis",r[r.ExtendArg=2]="ExtendArg",r[r.ExtendBoth=3]="ExtendBoth"})(il||(il={}))});var joe,dL,Voe,Goe,bt,Gn=W(()=>{zt();tt();Li();gr();bi();hL();joe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),dL=function(){return dL=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},dL.apply(this,arguments)},Voe=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Goe=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},bt=(function(r){joe(e,r);function e(){var t=r.apply(this,Goe([],Voe(arguments),!1))||this;return t._colorIsByLayerDefault=!1,t._visibility=!0,t._transparencySet=!1,t._dxfPaperSpace=!1,t}return Object.defineProperty(e.prototype,"type",{get:function(){return this.constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layer",{get:function(){var t;return this._layer==null&&(this._layer=(t=this.database.clayer)!==null&&t!==void 0?t:"0"),this._layer},set:function(t){this._layer=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.getEntityColor()},set:function(t){this.setEntityColor(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolvedColor",{get:function(){return this.resolveStandardColor()},enumerable:!1,configurable:!0}),e.prototype.resolveStandardColor=function(){var t=this.color;if(t.isByLayer){var n=this.getLayerColor();n&&n.RGB!=null&&(t=n)}else t.isByBlock&&(t=new je().setForeground());return t},Object.defineProperty(e.prototype,"lineType",{get:function(){var t,n;return this._lineType==null&&(this._lineType=(n=(t=this.database)===null||t===void 0?void 0:t.celtype)!==null&&n!==void 0?n:Vn),this._lineType},set:function(t){t?t.toUpperCase()==="BYLAYER"?this._lineType=Vn:t.toUpperCase()==="BYBLOCK"?this._lineType=eo:this._lineType=t:this._lineType=Vn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineWeight",{get:function(){var t;return this._lineWeight==null&&(this._lineWeight=(t=this.database.celweight)!==null&&t!==void 0?t:$r.ByLayer),this._lineWeight},set:function(t){this._lineWeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linetypeScale",{get:function(){var t;return this._linetypeScale==null&&(this._linetypeScale=(t=this.database.celtscale)!==null&&t!==void 0?t:-1),this._linetypeScale},set:function(t){this._linetypeScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visibility",{get:function(){return this._visibility},set:function(t){this._visibility=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transparency",{get:function(){var t;return(t=this._transparency)!==null&&t!==void 0?t:this._transparency=new Mn},set:function(t){this._transparency=t.clone(),this._transparencySet=!0},enumerable:!1,configurable:!0}),e.prototype.hasExplicitLayer=function(){return this._layer!=null},e.prototype.hasExplicitColor=function(){return this._color!=null||this._colorIsByLayerDefault},e.prototype.getEntityColor=function(){return this._color==null&&(this._colorIsByLayerDefault?this._color=new je().setByLayer():(this._color=new je,this.database.cecolor&&this._color.copy(this.database.cecolor))),this._color},e.prototype.setEntityColor=function(t){this._colorIsByLayerDefault=!1,this._color==null&&(this._color=new je),this._color.copy(t)},e.prototype.shouldResolveColorFromCecolor=function(){return!this._colorIsByLayerDefault},e.prototype.applyDxfFileDefaults=function(){this._color==null&&(this._colorIsByLayerDefault=!0)},e.prototype.hasExplicitTransparency=function(){return this._transparencySet},e.prototype.dxfOutFields=function(t){t.writeSubclassMarker("AcDbEntity"),t.writeString(8,this.layer),t.writeString(6,this.lineType),t.writeDouble(48,this.linetypeScale),t.writeInt16(60,this.visibility?0:1),t.writeCmColor(this.color),t.writeLineWeight(370,this.lineWeight),t.writeTransparency(this.transparency);var n=this.database.tables.blockTable.getIdAt(this.ownerId);return n?.isPaperSapce&&t.writeInt16(67,1),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t);var n=t.atSubclassData("AcDbEntity");if(!n){var i=t.peekItem();if(i&&Number(i.code)===100)return this}for(var o;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var a=t.readItem();if(!a)break;var s=Number(a.code);if(s===100){t.pushBackItem(a);break}switch(s){case 8:this.layer=String(a.value);break;case 6:this.lineType=String(a.value);break;case 48:this.linetypeScale=Number(a.value);break;case 60:this.visibility=Number(a.value)===0;break;case 62:o==null&&(o=new je),o.colorIndex=Number(a.value);break;case 420:o==null&&(o=new je),o.setRGBValue(Number(a.value));break;case 370:this.lineWeight=Number(a.value);break;case 440:this.transparency=Mn.deserialize(Number(a.value));break;case 67:this._dxfPaperSpace=Number(a.value)!==0;break;case 410:break;case 92:case 160:case 310:break;case 284:case 347:case 380:case 390:case 430:break;default:if(!n)return t.pushBackItem(a),o!=null&&(this.color=o),this.applyDxfFileDefaults(),this;break}}return o!=null&&(this.color=o),this.applyDxfFileDefaults(),this},Object.defineProperty(e.prototype,"dxfPaperSpace",{get:function(){return this._dxfPaperSpace},enumerable:!1,configurable:!0}),e.prototype.resolveEffectiveProperties=function(){var t,n,i,o;this._layer==null&&(this._layer=(t=this.database.clayer)!==null&&t!==void 0?t:"0"),this._color==null&&this.shouldResolveColorFromCecolor()&&(this._color=new je,this.database.cecolor&&this._color.copy(this.database.cecolor)),this._lineType==null&&(this._lineType=(n=this.database.celtype)!==null&&n!==void 0?n:Vn),this._linetypeScale==null&&(this._linetypeScale=(i=this.database.celtscale)!==null&&i!==void 0?i:-1),this._lineWeight==null&&(this._lineWeight=(o=this.database.celweight)!==null&&o!==void 0?o:$r.ByLayer)},Object.defineProperty(e.prototype,"properties",{get:function(){return{type:this.type,groups:[this.getGeneralProperties()]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t},e.prototype.subMoveGripPointsAt=function(t,n){return this},e.prototype.subGetOsnapPoints=function(t,n,i,o,a,s){},e.prototype.intersectWith=function(t,n,i){n===void 0&&(n=il.OnBothOperands);var o=this.subGetIntersectCurves(),a=t.subGetIntersectCurves();if(o.length===0||a.length===0)return[];var s=n===il.ExtendThis||n===il.ExtendBoth,l=n===il.ExtendArg||n===il.ExtendBoth;return YS(o,a,s,l,i)},e.prototype.subGetIntersectCurves=function(){return[]},e.prototype.transformBy=function(t){return this},e.prototype.erase=function(){return this.database.tables.blockTable.removeEntity(this.objectId)},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.worldDraw=function(t,n){if(this.database.isLayerDrawable(this.layer)){var i=t.subEntityTraits;i.color=this.resolvedColor,i.lineType=this.lineStyle,i.lineTypeScale=this.linetypeScale,i.lineWeight=this.lineWeight,i.transparency=this.transparency,i.layer=this.layer,i.drawOrder=0,i.isBackgroundFill=!1,"thickness"in this&&(i.thickness=this.thickness),t.context.database=this.database;var o=this.subWorldDraw(t,n);return this.attachEntityInfo(o),o}},e.prototype.getGeneralProperties=function(){var t=this;return{groupName:"general",properties:[{name:"handle",type:"int",editable:!1,accessor:{get:function(){return t.objectId}}},{name:"color",type:"color",editable:!0,accessor:{get:function(){return t.color},set:function(n){t.color=n}}},{name:"layer",type:"string",editable:!0,accessor:{get:function(){return t.layer},set:function(n){t.layer=n}}},{name:"linetype",type:"linetype",editable:!0,accessor:{get:function(){return t.lineType},set:function(n){t.lineType=n}}},{name:"linetypeScale",type:"float",editable:!0,accessor:{get:function(){return t.linetypeScale},set:function(n){t.linetypeScale=n}}},{name:"lineWeight",type:"lineweight",editable:!0,accessor:{get:function(){return t.lineWeight},set:function(n){t.lineWeight=n}}},{name:"transparency",type:"transparency",editable:!0,accessor:{get:function(){return t.transparency},set:function(n){t.transparency=n}}}]}},Object.defineProperty(e.prototype,"lineStyle",{get:function(){var t,n=this.getLineType(),i=n.type,o=n.name,a=(t=this.database)===null||t===void 0?void 0:t.tables.linetypeTable.getAt(o);return a?dL({type:i},a.linetype):{type:i,name:o,standardFlag:0,description:"",totalPatternLength:0}},enumerable:!1,configurable:!0}),e.prototype.getLineType=function(){if(this.lineType==Vn){var t=this.database.tables.layerTable.getAt(this.layer);if(t&&t.linetype)return{type:"ByLayer",name:t.linetype}}else return this.lineType==eo?{type:"ByBlock",name:ka}:{type:"UserSpecified",name:this.lineType};return{type:"UserSpecified",name:ka}},e.prototype.getLayerColor=function(){var t=this.database.tables.layerTable.getAt(this.layer);if(t==null)console.error("The layer with name '".concat(this.layer,"' not found in drawing database!"));else return t.color;return null},e.prototype.attachEntityInfo=function(t){t&&(t.objectId=this.objectId,this.attrs.has("ownerId")&&(t.ownerId=this.ownerId),t.layerName=this.layer,t.visible=this.visibility)},e.typeName="Entity",e})(Kt)});var Hoe,Woe,hs,Qm=W(()=>{Hoe=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Woe=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},hs=(function(){function r(e){this.i=0,e instanceof Map?(this._records=e,this._array=null,this._keys=Array.from(e.keys())):(this._records=null,this._array=e,this._keys=[])}return Object.defineProperty(r.prototype,"count",{get:function(){var e,t;return(t=(e=this._records)===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:this._array.length},enumerable:!1,configurable:!0}),r.prototype.toArray=function(){return this._records?Array.from(this._records.values()):Woe([],Hoe(this._array),!1)},r.prototype[Symbol.iterator]=function(){return this},r.prototype.next=function(){if(this._array){if(this.i<this._array.length){var e=this._array[this.i];return this.i+=1,{value:e,done:!1}}return{value:null,done:!0}}for(;this.i<this._keys.length;){var e=this._records.get(this._keys[this.i]);return this.i+=1,{value:e,done:!1}}return{value:null,done:!0}},r})()});function TV(r){return r instanceof ArrayBuffer?new Uint8Array(r):r}function Xl(r){return Array.from(r,function(e){return e.toString(16).padStart(2,"0")}).join("").toUpperCase()}function ip(r){var e,t,n=r.reduce(function(u,h){return u+Math.floor(h.length/2)},0),i=new Uint8Array(n),o=0;try{for(var a=hA(r),s=a.next();!s.done;s=a.next())for(var l=s.value,c=0;c<l.length;c+=2)i[o++]=parseInt(l.slice(c,c+2),16)}catch(u){e={error:u}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return i}function ds(r){var e,t,n,i;if(r.length===0)return new Uint8Array;var o=[];try{for(var a=hA(r),s=a.next();!s.done;s=a.next()){var l=s.value;l instanceof Uint8Array?o.push(l):o.push(ip([String(l)]))}}catch(m){e={error:m}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}var c=o.reduce(function(m,g){return m+g.length},0),u=new Uint8Array(c),h=0;try{for(var d=hA(o),p=d.next();!p.done;p=d.next()){var f=p.value;u.set(f,h),h+=f.length}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return u}var Xoe,hA,ol,to,eg,dA=W(()=>{Xoe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),hA=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ol=(function(r){Xoe(e,r);function e(t){t===void 0&&(t="Unexpected end of buffer.");var n=r.call(this,t)||this;return n.name="AcDbProxyGraphicEndOfBufferError",n}return e})(Error);to=(function(){function r(e,t){t===void 0&&(t=4),this._index=0,this._buffer=TV(e),this._align=t}return Object.defineProperty(r.prototype,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasData",{get:function(){return this._index<this._buffer.length},enumerable:!1,configurable:!0}),r.prototype.alignIndex=function(e){var t=e%this._align;return t?e+this._align-t:e},r.prototype.readStruct=function(e){var t,n;if(!this.hasData)throw new ol;var i=[],o=0;try{for(var a=hA(e),s=a.next();!s.done;s=a.next()){var l=s.value,c=new DataView(this._buffer.buffer,this._buffer.byteOffset+this._index+o,l);if(l===8)i.push(c.getFloat64(0,!0));else if(l===4)i.push(c.getUint32(0,!0));else throw new Error("Unsupported struct size: ".concat(l));o+=l}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return this._index=this.alignIndex(this._index+o),i},r.prototype.readFloat=function(){return this.readStruct([8])[0]},r.prototype.readLong=function(){return this.readStruct([4])[0]},r.prototype.readSignedLong=function(){if(!this.hasData)throw new ol;var e=new DataView(this._buffer.buffer,this._buffer.byteOffset+this._index,4),t=e.getInt32(0,!0);return this._index=this.alignIndex(this._index+4),t},r.prototype.readVertex=function(){return this.readStruct([8,8,8])},r.prototype.readPaddedString=function(e){e===void 0&&(e="utf-8");for(var t=this._buffer,n=this._index;n<t.length;n++)if(t[n]===0){var i=this._index;this._index=this.alignIndex(n+1);var o=t.subarray(i,n);return new TextDecoder(e).decode(o)}throw new ol("Did not detect terminating zero byte.")},r.prototype.readPaddedUnicodeString=function(){for(var e=this._buffer,t=this._index;t<e.length;t+=2)if(t+1<e.length&&e[t]===0&&e[t+1]===0){var n=this._index;this._index=this.alignIndex(t+2);var i=e.subarray(n,t);return new TextDecoder("utf-16le").decode(i)}throw new ol("Did not detect terminating zero bytes.")},r})(),eg=(function(){function r(e,t,n){t===void 0&&(t="AC1015"),n===void 0&&(n="cp1252"),this._bitIndex=0,this._buffer=TV(e),this.dxfversion=t,this.encoding=n}return Object.defineProperty(r.prototype,"hasData",{get:function(){return this._bitIndex>>3<this._buffer.length},enumerable:!1,configurable:!0}),r.prototype.readBit=function(){var e=this._bitIndex;this._bitIndex+=1;var t=e>>3;if(t>=this._buffer.length)throw new ol;return this._buffer[t]&128>>(e&7)?1:0},r.prototype.readBits=function(e){var t=this._bitIndex,n=t+e;if(n-1>>3>=this._buffer.length)throw new ol;this._bitIndex=n;for(var i=128>>(t&7),o=t>>3,a=0,s=this._buffer[o];e>0;)a<<=1,s&i&&(a|=1),e-=1,i>>=1,!i&&e&&(i=128,o+=1,s=this._buffer[o]);return a},r.prototype.readUnsignedByte=function(){return this.readBits(8)},r.prototype.readSignedByte=function(){var e=this.readBits(8);return e&128?-((~e&255)+1):e},r.prototype.readAlignedBytes=function(e){var t=this._bitIndex>>3,n=t+e;if(n>this._buffer.length)throw new ol;return this._bitIndex+=e<<3,this._buffer.subarray(t,n)},r.prototype.readUnsignedShort=function(){if(this._bitIndex&7){var e=this.readBits(8),t=this.readBits(8);return(t<<8)+e}var n=this.readAlignedBytes(2);return n[1]<<8|n[0]},r.prototype.readSignedShort=function(){var e=this.readUnsignedShort();return e&32768?-((~e&65535)+1):e},r.prototype.readUnsignedLong=function(){if(this._bitIndex&7){var e=this.readBits(8),t=this.readBits(8),n=this.readBits(8),i=this.readBits(8);return(i<<24)+(n<<16)+(t<<8)+e}var o=this.readAlignedBytes(4);return(o[3]<<24)+(o[2]<<16)+(o[1]<<8)+o[0]},r.prototype.readSignedLong=function(){var e=this.readUnsignedLong();return e&2147483648?-((~e&4294967295)+1):e},r.prototype.readFloat=function(){if(this._bitIndex&7){for(var e=new Uint8Array(8),t=0;t<8;t++)e[t]=this.readBits(8);return new DataView(e.buffer).getFloat64(0,!0)}var n=this.readAlignedBytes(8),i=new Uint8Array(n);return new DataView(i.buffer).getFloat64(0,!0)},r.prototype.readRawDouble=function(e){var t=this;return e===void 0&&(e=1),e===1?this.readFloat():Array.from({length:e},function(){return t.readFloat()})},r.prototype.readBitShort=function(e){var t=this;e===void 0&&(e=1);var n=function(){var i=t.readBits(2);return i===0?t.readSignedShort():i===1?t.readUnsignedByte():i===2?0:256};return e===1?n():Array.from({length:e},function(){return n()})},r.prototype.readBitLong=function(e){var t=this;e===void 0&&(e=1);var n=function(){var i=t.readBits(2);return i===0?t.readSignedLong():i===1?t.readUnsignedByte():i===2?0:256};return e===1?n():Array.from({length:e},function(){return n()})},r.prototype.readBitDouble=function(e){var t=this;e===void 0&&(e=1);var n=function(){var i=t.readBits(2);return i===0?t.readFloat():i===1?1:0};return e===1?n():Array.from({length:e},function(){return n()})},r.prototype.readBitDoubleDefault=function(e,t){var n=this;e===void 0&&(e=1),t===void 0&&(t=0);var i=new Uint8Array(8);new DataView(i.buffer).setFloat64(0,t,!0);var o=function(){var a=n.readBits(2);if(a===0)return t;if(a===1){var s=new Uint8Array(i);return s[0]=n.readUnsignedByte(),s[1]=n.readUnsignedByte(),s[2]=n.readUnsignedByte(),s[3]=n.readUnsignedByte(),new DataView(s.buffer).getFloat64(0,!0)}if(a===2){var s=new Uint8Array(i);return s[4]=n.readUnsignedByte(),s[5]=n.readUnsignedByte(),s[0]=n.readUnsignedByte(),s[1]=n.readUnsignedByte(),s[2]=n.readUnsignedByte(),s[3]=n.readUnsignedByte(),new DataView(s.buffer).getFloat64(0,!0)}return n.readFloat()};return e===1?o():Array.from({length:e},function(){return o()})},r})()});var Yoe,ni,Yl=W(()=>{zt();gr();Yoe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ni=(function(r){Yoe(e,r);function e(t,n){return t=t||{},er(t,{name:""}),r.call(this,t,n)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return this.getAttr("name")},set:function(t){this.setAttr("name",t)},enumerable:!1,configurable:!0}),e.prototype.setAttr=function(t,n){this.assertOpenForWrite(),r.prototype.setAttr.call(this,t,n)},e.prototype.assertOpenForWrite=function(){if(!this.isTemp){var t=this.database;if(t){var n=t.transactionManager;if(!n.isApplyingUndoRedo()){if(n.strictMode&&!n.isRecording())throw new Error("Cannot modify symbol table records outside an active transaction.");if(n.isRecording()&&!n.isOpenedForWriteInTransaction(this.objectId))throw new Error('Symbol table record "'.concat(this.name||this.objectId,'" is not open for write. Use openObjectForWrite().'))}}}},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbSymbolTableRecord"),this},e})(Kt)});var $oe,pL,tg,Kr,rn,$l=W(()=>{zt();tt();Gn();Qm();dA();Yl();$oe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),pL=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.Any=0]="Any",r[r.Uniform=1]="Uniform"})(tg||(tg={}));(function(r){r[r.None=0]="None",r[r.Anonymous=1]="Anonymous",r[r.HasNonConstantAttributes=2]="HasNonConstantAttributes",r[r.Xref=4]="Xref",r[r.XrefOverlay=8]="XrefOverlay",r[r.ExternallyDependent=16]="ExternallyDependent",r[r.Resolved=32]="Resolved",r[r.Referenced=64]="Referenced"})(Kr||(Kr={}));rn=(function(r){$oe(e,r);function e(t,n){var i=this;return t=t||{},er(t,{origin:new k,layoutId:"",flags:Kr.None,pathName:"",blockInsertUnits:0,explodability:1,blockScaling:tg.Uniform,previewIcon:void 0}),i=r.call(this,t,n)||this,i._entities=[],i}return e.isModelSapceName=function(t){return t.toLowerCase()==e.MODEL_SPACE_NAME.toLowerCase()},e.isPaperSapceName=function(t){return t.toLowerCase().startsWith(e.PAPER_SPACE_NAME_PREFIX.toLowerCase())},e.sanitizeImportedFlags=function(t){return t&~(Kr.Resolved|Kr.Referenced)},Object.defineProperty(e.prototype,"isModelSapce",{get:function(){return e.isModelSapceName(this.name)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaperSapce",{get:function(){return e.isPaperSapceName(this.name)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){return this.getAttr("origin")},set:function(t){this.getAttr("origin").copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layoutId",{get:function(){return this.getAttr("layoutId")},set:function(t){this.setAttr("layoutId",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this.getAttr("flags")},set:function(t){this.setAttr("flags",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathName",{get:function(){return this.getAttr("pathName")},set:function(t){this.setAttr("pathName",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isXref",{get:function(){return(this.flags&(Kr.Xref|Kr.XrefOverlay))!==0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOverlayReference",{get:function(){return(this.flags&Kr.XrefOverlay)!==0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnresolvedXref",{get:function(){return!this.isXref||(this.flags&Kr.Resolved)!==0?!1:this._entities.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockInsertUnits",{get:function(){return this.getAttr("blockInsertUnits")},set:function(t){this.setAttr("blockInsertUnits",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"explodability",{get:function(){return this.getAttr("explodability")},set:function(t){this.setAttr("explodability",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockScaling",{get:function(){return this.getAttr("blockScaling")},set:function(t){this.setAttr("blockScaling",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previewIcon",{get:function(){return this.getAttrWithoutException("previewIcon")},set:function(t){if(!t||t.length===0){this.setAttr("previewIcon",void 0);return}this.setAttr("previewIcon",t)},enumerable:!1,configurable:!0}),e.prototype.appendEntity=function(t){var n,i,o,a,s=this,l=this.database.transactionManager;if(l.strictMode&&!l.isRecording()&&!l.isApplyingUndoRedo())throw new Error("Cannot append entities outside an active transaction.");var c=function(g){g.database=s.database,s.database.ensureEntityStyleDefaults(g),s.database.commitObjectHandle(g,function(y){return s.hasEntityId(y)}),g.ownerId=s.objectId,g.resolveEffectiveProperties(),s._entities.push(g),g.dxfTypeName==="INSERT"&&"syncAttributeDatabases"in g&&typeof g.syncAttributeDatabases=="function"&&g.syncAttributeDatabases()},u=Array.isArray(t)?t:[t];try{for(var h=pL(u),d=h.next();!d.done;d=h.next()){var p=d.value;c(p)}}catch(g){n={error:g}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}if(l.isRecording())try{for(var f=pL(u),m=f.next();!m.done;m=f.next()){var p=m.value;l.recordAppend({type:"blockTableRecord",ownerId:this.objectId},p)}}catch(g){o={error:g}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}(this.isModelSapce||this.isPaperSapce)&&!l.isRecording()&&!l.isApplyingUndoRedo()&&this.database.notifyEntityAppended(t)},e.prototype.removeEntity=function(t){var n,i,o=this.database.transactionManager;if(o.strictMode&&!o.isRecording()&&!o.isApplyingUndoRedo())throw new Error("Cannot remove entities outside an active transaction.");var a=Array.isArray(t)?t:[t];if(a.length===0)return!1;var s=new Set(a),l=[],c=0;try{for(var u=pL(this._entities),h=u.next();!h.done;h=u.next()){var d=h.value;s.has(d.objectId)?(o.isRecording()&&o.recordRemove({type:"blockTableRecord",ownerId:this.objectId},d),l.push(d),this.database.releaseObjectHandle(d)):this._entities[c++]=d}}catch(p){n={error:p}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return this._entities.length=c,l.length>0&&!o.isRecording()&&!o.isApplyingUndoRedo()&&this.database.notifyEntityErased(l),l.length>0},e.prototype.newIterator=function(){return new hs(this._entities)},e.prototype.getIdAt=function(t){var n=this.database.getObjectById(t);if(n instanceof bt){var i=n.getAttrWithoutException("ownerId");if(i===this.objectId)return n}},e.prototype.hasEntityId=function(t){return this.getIdAt(t)!==void 0},e.prototype.dxfOutBlockRecord=function(t){return t.writeStart("BLOCK_RECORD"),this.dxfOut(t),this},e.prototype.dxfOutBlockBegin=function(t){return t.writeStart("BLOCK"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeString(8,"0"),t.writeSubclassMarker("AcDbBlockBegin"),t.writeString(2,this.name),t.writeInt16(70,this.flags),t.writePoint3d(10,this.origin),t.writeString(3,this.name),this.pathName&&t.writeString(1,this.pathName),this},e.prototype.dxfOutBlockEnd=function(t){return t.writeStart("ENDBLK"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeSubclassMarker("AcDbBlockEnd"),this},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbBlockTableRecord"),t.writeString(2,this.name),t.writeInt16(70,this.blockInsertUnits),t.writeInt16(280,this.explodability),t.writeInt16(281,this.blockScaling),(this.isModelSapce||this.isPaperSapce)&&t.writeObjectId(340,this.layoutId),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbBlockTableRecord");for(var n=[];!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var i=t.readItem();if(!i)break;var o=Number(i.code);if(o===100){t.pushBackItem(i);break}switch(o){case 2:this.name=String(i.value);break;case 70:this.blockInsertUnits=Number(i.value);break;case 280:this.explodability=Number(i.value);break;case 281:this.blockScaling=Number(i.value);break;case 340:this.layoutId=String(i.value);break;case 310:{var a=String(i.value).replace(/\s+/g,"");a&&n.push(a);break}default:break}}return n.length>0&&(this.previewIcon=ip(n)),this},e.MODEL_SPACE_NAME="*Model_Space",e.PAPER_SPACE_NAME_PREFIX="*Paper_Space",e})(ni)});var Koe,sn,op,ap,sp,lp,al,Ht,qoe,ng,fL=W(()=>{tt();gr();Koe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();(function(r){r[r.kInches=0]="kInches",r[r.kMillimeters=1]="kMillimeters",r[r.kPixels=2]="kPixels"})(op||(op={}));(function(r){r[r.k0degrees=0]="k0degrees",r[r.k90degrees=1]="k90degrees",r[r.k180degrees=2]="k180degrees",r[r.k270degrees=3]="k270degrees"})(ap||(ap={}));(function(r){r[r.kDisplay=0]="kDisplay",r[r.kExtents=1]="kExtents",r[r.kLimits=2]="kLimits",r[r.kView=3]="kView",r[r.kWindow=4]="kWindow",r[r.kLayout=5]="kLayout"})(sp||(sp={}));(function(r){r[r.kDraft=0]="kDraft",r[r.kPreview=1]="kPreview",r[r.kNormal=2]="kNormal",r[r.kPresentation=3]="kPresentation",r[r.kMaximum=4]="kMaximum",r[r.kCustom=5]="kCustom"})(lp||(lp={}));(function(r){r[r.kAsDisplayed=0]="kAsDisplayed",r[r.kWireframe=1]="kWireframe",r[r.kHidden=2]="kHidden",r[r.kRendered=3]="kRendered",r[r.kVisualStyle=4]="kVisualStyle",r[r.kRenderPreset=5]="kRenderPreset"})(al||(al={}));(function(r){r[r.kScaleToFit=0]="kScaleToFit",r[r.k1_128in_1ft=1]="k1_128in_1ft",r[r.k1_64in_1ft=2]="k1_64in_1ft",r[r.k1_32in_1ft=3]="k1_32in_1ft",r[r.k1_16in_1ft=4]="k1_16in_1ft",r[r.k3_32in_1ft=5]="k3_32in_1ft",r[r.k1_8in_1ft=6]="k1_8in_1ft",r[r.k3_16in_1ft=7]="k3_16in_1ft",r[r.k1_4in_1ft=8]="k1_4in_1ft",r[r.k3_8in_1ft=9]="k3_8in_1ft",r[r.k1_2in_1ft=10]="k1_2in_1ft",r[r.k3_4in_1ft=11]="k3_4in_1ft",r[r.k1in_1ft=12]="k1in_1ft",r[r.k3in_1ft=13]="k3in_1ft",r[r.k6in_1ft=14]="k6in_1ft",r[r.k1ft_1ft=15]="k1ft_1ft",r[r.k1_1=16]="k1_1",r[r.k1_2=17]="k1_2",r[r.k1_4=18]="k1_4",r[r.k1_5=19]="k1_5",r[r.k1_8=20]="k1_8",r[r.k1_10=21]="k1_10",r[r.k1_16=22]="k1_16",r[r.k1_20=23]="k1_20",r[r.k1_30=24]="k1_30",r[r.k1_40=25]="k1_40",r[r.k1_50=26]="k1_50",r[r.k1_100=27]="k1_100",r[r.k2_1=28]="k2_1",r[r.k4_1=29]="k4_1",r[r.k8_1=30]="k8_1",r[r.k10_1=31]="k10_1",r[r.k100_1=32]="k100_1",r[r.k1000_1=33]="k1000_1",r[r.k1and1_2in_1ft=34]="k1and1_2in_1ft"})(Ht||(Ht={}));qoe=(sn={},sn[Ht.kScaleToFit]=0,sn[Ht.k1_128in_1ft]=1/1536,sn[Ht.k1_64in_1ft]=1/768,sn[Ht.k1_32in_1ft]=1/384,sn[Ht.k1_16in_1ft]=1/192,sn[Ht.k3_32in_1ft]=1/128,sn[Ht.k1_8in_1ft]=1/96,sn[Ht.k3_16in_1ft]=1/64,sn[Ht.k1_4in_1ft]=1/48,sn[Ht.k3_8in_1ft]=1/32,sn[Ht.k1_2in_1ft]=1/24,sn[Ht.k3_4in_1ft]=1/16,sn[Ht.k1in_1ft]=1/12,sn[Ht.k3in_1ft]=1/4,sn[Ht.k6in_1ft]=1/2,sn[Ht.k1ft_1ft]=1,sn[Ht.k1_1]=1,sn[Ht.k1_2]=1/2,sn[Ht.k1_4]=1/4,sn[Ht.k1_5]=1/5,sn[Ht.k1_8]=1/8,sn[Ht.k1_10]=1/10,sn[Ht.k1_16]=1/16,sn[Ht.k1_20]=1/20,sn[Ht.k1_30]=1/30,sn[Ht.k1_40]=1/40,sn[Ht.k1_50]=1/50,sn[Ht.k1_100]=1/100,sn[Ht.k2_1]=2,sn[Ht.k4_1]=4,sn[Ht.k8_1]=8,sn[Ht.k10_1]=10,sn[Ht.k100_1]=100,sn[Ht.k1000_1]=1e3,sn[Ht.k1and1_2in_1ft]=1/8,sn),ng=(function(r){Koe(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this)||this;return n._plotSettingsName="",n._plotCfgName="",n._canonicalMediaName="",n._currentStyleSheet="",n._plotOrigin=new Z,n._customPrintScale={numerator:1,denominator:1},n._plotPaperSize=new Z,n._plotPaperMargins={left:0,right:0,top:0,bottom:0},n._plotViewName="",n._paperImageOrigin=new Z,n._plotWindowArea=new ct,n._modelType=t,n._plotCentered=!1,n._plotHidden=!1,n._plotPaperUnits=op.kMillimeters,n._plotPlotStyles=!0,n._plotRotation=ap.k0degrees,n._plotType=sp.kLayout,n._plotViewportBorders=!1,n._printLineweights=!0,n._scaleLineweights=!1,n._drawViewportsFirst=!1,n._showPlotStyles=!0,n._shadePlotType=al.kAsDisplayed,n._shadePlotResLevel=lp.kNormal,n._shadePlotCustomDpi=300,n._shadePlotId=void 0,n._stdScaleType=Ht.kScaleToFit,n._useStandardScale=!0,n}return Object.defineProperty(e.prototype,"plotSettingsName",{get:function(){return this._plotSettingsName},set:function(t){this._plotSettingsName=t},enumerable:!1,configurable:!0}),e.prototype.getPlotSettingsName=function(){return this._plotSettingsName},e.prototype.setPlotSettingsName=function(t){this._plotSettingsName=t},Object.defineProperty(e.prototype,"plotCfgName",{get:function(){return this._plotCfgName},set:function(t){this._plotCfgName=t},enumerable:!1,configurable:!0}),e.prototype.getPlotCfgName=function(){return this._plotCfgName},Object.defineProperty(e.prototype,"canonicalMediaName",{get:function(){return this._canonicalMediaName},set:function(t){this._canonicalMediaName=t},enumerable:!1,configurable:!0}),e.prototype.getCanonicalMediaName=function(){return this._canonicalMediaName},Object.defineProperty(e.prototype,"currentStyleSheet",{get:function(){return this._currentStyleSheet},set:function(t){this._currentStyleSheet=t},enumerable:!1,configurable:!0}),e.prototype.getCurrentStyleSheet=function(){return this._currentStyleSheet},Object.defineProperty(e.prototype,"plotOrigin",{get:function(){return this._plotOrigin},set:function(t){this._plotOrigin=t},enumerable:!1,configurable:!0}),e.prototype.getPlotOrigin=function(){return this._plotOrigin},Object.defineProperty(e.prototype,"customPrintScale",{get:function(){return this._customPrintScale},set:function(t){this._customPrintScale=t},enumerable:!1,configurable:!0}),e.prototype.getCustomPrintScale=function(){return this._customPrintScale},Object.defineProperty(e.prototype,"plotPaperSize",{get:function(){return this._plotPaperSize},set:function(t){this._plotPaperSize=t},enumerable:!1,configurable:!0}),e.prototype.getPlotPaperSize=function(){return this._plotPaperSize},Object.defineProperty(e.prototype,"plotPaperMargins",{get:function(){return this._plotPaperMargins},set:function(t){this._plotPaperMargins=t},enumerable:!1,configurable:!0}),e.prototype.getPlotPaperMargins=function(){return this._plotPaperMargins},Object.defineProperty(e.prototype,"plotViewName",{get:function(){return this._plotViewName},set:function(t){this._plotViewName=t},enumerable:!1,configurable:!0}),e.prototype.getPlotViewName=function(){return this._plotViewName},Object.defineProperty(e.prototype,"paperImageOrigin",{get:function(){return this._paperImageOrigin},set:function(t){this._paperImageOrigin=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plotWindowArea",{get:function(){return this._plotWindowArea},set:function(t){this._plotWindowArea=t},enumerable:!1,configurable:!0}),e.prototype.getPlotWindowArea=function(){return this._plotWindowArea},Object.defineProperty(e.prototype,"modelType",{get:function(){return this._modelType},set:function(t){this._modelType=t},enumerable:!1,configurable:!0}),e.prototype.getModelType=function(){return this._modelType},e.prototype.setModelType=function(t){this._modelType=t},Object.defineProperty(e.prototype,"drawViewportsFirst",{get:function(){return this._drawViewportsFirst},set:function(t){this._drawViewportsFirst=t},enumerable:!1,configurable:!0}),e.prototype.setDrawViewportsFirst=function(t){this._drawViewportsFirst=t},Object.defineProperty(e.prototype,"plotCentered",{get:function(){return this._plotCentered},set:function(t){this._plotCentered=t},enumerable:!1,configurable:!0}),e.prototype.setPlotCentered=function(t){this._plotCentered=t},Object.defineProperty(e.prototype,"plotHidden",{get:function(){return this._plotHidden},set:function(t){this._plotHidden=t},enumerable:!1,configurable:!0}),e.prototype.setPlotHidden=function(t){this._plotHidden=t},Object.defineProperty(e.prototype,"plotPaperUnits",{get:function(){return this._plotPaperUnits},set:function(t){this._plotPaperUnits=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plotPlotStyles",{get:function(){return this._plotPlotStyles},set:function(t){this._plotPlotStyles=t},enumerable:!1,configurable:!0}),e.prototype.setPlotPlotStyles=function(t){this._plotPlotStyles=t},Object.defineProperty(e.prototype,"plotRotation",{get:function(){return this._plotRotation},set:function(t){this._plotRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plotType",{get:function(){return this._plotType},set:function(t){this._plotType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plotViewportBorders",{get:function(){return this._plotViewportBorders},set:function(t){this._plotViewportBorders=t},enumerable:!1,configurable:!0}),e.prototype.setPlotViewportBorders=function(t){this._plotViewportBorders=t},Object.defineProperty(e.prototype,"printLineweights",{get:function(){return this._printLineweights},set:function(t){this._printLineweights=t},enumerable:!1,configurable:!0}),e.prototype.setPrintLineweights=function(t){this._printLineweights=t},Object.defineProperty(e.prototype,"scaleLineweights",{get:function(){return this._scaleLineweights},set:function(t){this._scaleLineweights=t},enumerable:!1,configurable:!0}),e.prototype.setScaleLineweights=function(t){this._scaleLineweights=t},Object.defineProperty(e.prototype,"showPlotStyles",{get:function(){return this._showPlotStyles},set:function(t){this._showPlotStyles=t},enumerable:!1,configurable:!0}),e.prototype.setShowPlotStyles=function(t){this._showPlotStyles=t},Object.defineProperty(e.prototype,"shadePlot",{get:function(){return this._shadePlotType},set:function(t){this._shadePlotType=t},enumerable:!1,configurable:!0}),e.prototype.setShadePlot=function(t){this._shadePlotType=t},Object.defineProperty(e.prototype,"shadePlotResLevel",{get:function(){return this._shadePlotResLevel},set:function(t){this._shadePlotResLevel=t},enumerable:!1,configurable:!0}),e.prototype.setShadePlotResLevel=function(t){this._shadePlotResLevel=t},Object.defineProperty(e.prototype,"shadePlotCustomDPI",{get:function(){return this._shadePlotCustomDpi},set:function(t){this._shadePlotCustomDpi=t},enumerable:!1,configurable:!0}),e.prototype.setShadePlotCustomDPI=function(t){this._shadePlotCustomDpi=t},Object.defineProperty(e.prototype,"shadePlotId",{get:function(){return this._shadePlotId},set:function(t){this._shadePlotId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plotWireframe",{get:function(){return this._shadePlotType===al.kWireframe},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plotAsRaster",{get:function(){return this._shadePlotType===al.kRendered||this._shadePlotType===al.kVisualStyle||this._shadePlotType===al.kRenderPreset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stdScaleType",{get:function(){return this._stdScaleType},set:function(t){this._stdScaleType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stdScale",{get:function(){var t;return(t=qoe[this._stdScaleType])!==null&&t!==void 0?t:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useStandardScale",{get:function(){return this._useStandardScale},set:function(t){this._useStandardScale=t},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbPlotSettings"),t.writeString(1,this.plotSettingsName),t.writeString(2,this.plotCfgName),t.writeString(4,this.canonicalMediaName),t.writeString(6,this.plotViewName),t.writeDouble(40,this.plotPaperMargins.left),t.writeDouble(41,this.plotPaperMargins.bottom),t.writeDouble(42,this.plotPaperMargins.right),t.writeDouble(43,this.plotPaperMargins.top),t.writeDouble(44,this.plotPaperSize.x),t.writeDouble(45,this.plotPaperSize.y),t.writeDouble(46,this.plotOrigin.x),t.writeDouble(47,this.plotOrigin.y),t.writeDouble(48,this.plotWindowArea.min.x),t.writeDouble(49,this.plotWindowArea.min.y),t.writeDouble(140,this.plotWindowArea.max.x),t.writeDouble(141,this.plotWindowArea.max.y),t.writeDouble(142,this.customPrintScale.numerator),t.writeDouble(143,this.customPrintScale.denominator);var n=0;return this.plotViewportBorders&&(n|=1),this.showPlotStyles&&(n|=2),this.plotCentered&&(n|=4),this.plotHidden&&(n|=8),this.useStandardScale&&(n|=16),this.plotPlotStyles&&(n|=32),this.scaleLineweights&&(n|=64),this.printLineweights&&(n|=128),this.drawViewportsFirst&&(n|=512),this.modelType&&(n|=1024),t.writeInt16(70,n),t.writeInt16(72,this.plotPaperUnits),t.writeInt16(73,this.plotRotation),t.writeInt16(74,this.plotType),t.writeString(7,this.currentStyleSheet),t.writeInt16(75,this.stdScaleType),t.writeInt16(76,this.shadePlot),t.writeInt16(77,this.shadePlotResLevel),t.writeInt16(78,this.shadePlotCustomDPI),t.writeDouble(147,this.stdScale),t.writeDouble(148,this.paperImageOrigin.x),t.writeDouble(149,this.paperImageOrigin.y),t.writeObjectId(333,this.shadePlotId),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbPlotSettings");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code),o=Number(n.value);switch(i){case 1:this.plotSettingsName=String(n.value);break;case 2:this.plotCfgName=String(n.value);break;case 4:this.canonicalMediaName=String(n.value);break;case 6:this.plotViewName=String(n.value);break;case 7:this.currentStyleSheet=String(n.value);break;case 40:this.plotPaperMargins.left=o;break;case 41:this.plotPaperMargins.bottom=o;break;case 42:this.plotPaperMargins.right=o;break;case 43:this.plotPaperMargins.top=o;break;case 44:this.plotPaperSize.x=o;break;case 45:this.plotPaperSize.y=o;break;case 46:this.plotOrigin.x=o;break;case 47:this.plotOrigin.y=o;break;case 48:this.plotWindowArea.min.x=o;break;case 49:this.plotWindowArea.min.y=o;break;case 140:this.plotWindowArea.max.x=o;break;case 141:this.plotWindowArea.max.y=o;break;case 142:this.customPrintScale.numerator=o;break;case 143:this.customPrintScale.denominator=o;break;case 70:{var a=o;this.plotViewportBorders=(a&1)!==0,this.showPlotStyles=(a&2)!==0,this.plotCentered=(a&4)!==0,this.plotHidden=(a&8)!==0,this.useStandardScale=(a&16)!==0,this.plotPlotStyles=(a&32)!==0,this.scaleLineweights=(a&64)!==0,this.printLineweights=(a&128)!==0,this.drawViewportsFirst=(a&512)!==0,this.modelType=(a&1024)!==0;break}case 72:this.plotPaperUnits=o;break;case 73:this.plotRotation=o;break;case 74:this.plotType=o;break;case 75:this.stdScaleType=o;break;case 76:this.shadePlot=o;break;case 77:this.shadePlotResLevel=o;break;case 78:this.shadePlotCustomDPI=o;break;case 147:break;case 148:this.paperImageOrigin.x=o;break;case 149:this.paperImageOrigin.y=o;break;case 333:this.shadePlotId=String(n.value);break;case 100:return t.pushBackItem(n),this;default:break}}return this},e})(Kt)});var Zoe,ia,rg=W(()=>{tt();fL();Zoe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ia=(function(r){Zoe(e,r);function e(){var t=r.call(this)||this;return t._insertionPoint=new k,t._ucsOrigin=new k,t._ucsXAxis=new G(1,0,0),t._ucsYAxis=new G(0,1,0),t._elevation=0,t._orthographicType=0,t._tabOrder=-1,t._tabSelected=!1,t._blockTableRecordId="",t._layoutName="",t._limits=new ct,t._extents=new De,t._viewportArray=[],t}return Object.defineProperty(e.prototype,"layoutName",{get:function(){return this._layoutName},set:function(t){this._layoutName=t.length>256?t.slice(0,256):t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tabOrder",{get:function(){return this._tabOrder},set:function(t){this._tabOrder=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tabSelected",{get:function(){return this._tabSelected},set:function(t){this._tabSelected=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockTableRecordId",{get:function(){return this._blockTableRecordId},set:function(t){this._blockTableRecordId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"limits",{get:function(){return this._limits},set:function(t){this._limits.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extents",{get:function(){return this._extents},set:function(t){this._extents.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportArray",{get:function(){return this._viewportArray},set:function(t){this._viewportArray=t.slice()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"namedUcsId",{get:function(){return this._namedUcsId},set:function(t){this._namedUcsId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orthographicUcsId",{get:function(){return this._orthographicUcsId},set:function(t){this._orthographicUcsId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"insertionPoint",{get:function(){return this._insertionPoint},set:function(t){this._insertionPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsOrigin",{get:function(){return this._ucsOrigin},set:function(t){this._ucsOrigin.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsXAxis",{get:function(){return this._ucsXAxis},set:function(t){this._ucsXAxis.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsYAxis",{get:function(){return this._ucsYAxis},set:function(t){this._ucsYAxis.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elevation",{get:function(){return this._elevation},set:function(t){this._elevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orthographicType",{get:function(){return this._orthographicType},set:function(t){this._orthographicType=t},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbLayout"),t.writeString(1,this.layoutName),t.writeInt16(70,this.tabSelected?1:0),t.writeInt16(71,this.tabOrder),t.writeObjectId(330,this.blockTableRecordId),t.writeObjectId(331,this._viewportArray.length>0?this._viewportArray[0]:"0"),t.writePoint2d(10,this.limits.min),t.writePoint2d(11,this.limits.max),t.writePoint3d(14,this.extents.min),t.writePoint3d(15,this.extents.max),t.writePoint3d(12,this.insertionPoint),t.writePoint3d(13,this.ucsOrigin),t.writeVector3d(16,this.ucsXAxis),t.writeVector3d(17,this.ucsYAxis),t.writeDouble(146,this.elevation),t.writeInt16(76,this.orthographicType),t.writeObjectId(345,this._namedUcsId),t.writeObjectId(346,this._orthographicUcsId),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbLayout");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code),o=Number(n.value);switch(i){case 1:this.layoutName=String(n.value);break;case 70:this.tabSelected=o!==0;break;case 71:this.tabOrder=o;break;case 330:this.blockTableRecordId=String(n.value);break;case 331:{var a=String(n.value);a&&a!=="0"&&(this.viewportArray=[a]);break}case 10:this.limits.min.x=o;break;case 20:this.limits.min.y=o;break;case 11:this.limits.max.x=o;break;case 21:this.limits.max.y=o;break;case 14:this.extents.min.x=o;break;case 24:this.extents.min.y=o;break;case 34:this.extents.min.z=o;break;case 15:this.extents.max.x=o;break;case 25:this.extents.max.y=o;break;case 35:this.extents.max.z=o;break;case 345:this.namedUcsId=String(n.value);break;case 346:this.orthographicUcsId=String(n.value);break;case 12:this.insertionPoint.x=o;break;case 22:this.insertionPoint.y=o;break;case 32:this.insertionPoint.z=o;break;case 13:this.ucsOrigin.x=o;break;case 23:this.ucsOrigin.y=o;break;case 33:this.ucsOrigin.z=o;break;case 16:this.ucsXAxis.x=o;break;case 26:this.ucsXAxis.y=o;break;case 36:this.ucsXAxis.z=o;break;case 17:this.ucsYAxis.x=o;break;case 27:this.ucsYAxis.y=o;break;case 37:this.ucsYAxis.z=o;break;case 76:this.orthographicType=o;break;case 146:this.elevation=o;break;case 100:return t.pushBackItem(n),this;default:break}}return this},e})(ng)});var ig,mL=W(()=>{zt();gr();$l();rg();ig=(function(){function r(){this.events={layoutCreated:new wt,layoutRemoved:new wt,layoutRenamed:new wt,layoutSwitched:new wt}}return r.prototype.countLayouts=function(e){return this.getWorkingDatabase(e).objects.layout.numEntries},r.prototype.findLayoutNamed=function(e,t){return this.getWorkingDatabase(t).objects.layout.getAt(e)},r.prototype.findActiveLayout=function(){var e=this.getActiveLayout();return e?e.layoutName:"Model"},r.prototype.setCurrentLayoutId=function(e,t){var n=this.getWorkingDatabase(t),i=n.objects.layout.getIdAt(e);return this.setCurrentLayoutInternal(i,n)},r.prototype.setCurrentLayoutBtrId=function(e,t){var n=this.getWorkingDatabase(t),i=n.objects.layout.getBtrIdAt(e);return this.setCurrentLayoutInternal(i,n)},r.prototype.setCurrentLayout=function(e,t){var n=this.getWorkingDatabase(t),i=n.objects.layout.getAt(e);return this.setCurrentLayoutInternal(i,n)},r.prototype.renameLayout=function(e,t,n){var i=this.getWorkingDatabase(n),o=i.objects.layout.getAt(e);return o?(o.layoutName=t,this.events.layoutRenamed.dispatch({layout:o,oldName:e,newName:t}),!0):!1},r.prototype.layoutExists=function(e,t){return this.getWorkingDatabase(t).objects.layout.has(e)},r.prototype.deleteLayout=function(e,t){var n=this.getWorkingDatabase(t).objects.layout,i=n.getAt(e),o=!1;return i&&(o=n.remove(e),o&&this.events.layoutRemoved.dispatch({layout:i})),o},r.prototype.createLayout=function(e,t){var n=this.getWorkingDatabase(t),i=new ia;i.layoutName=e,i.tabOrder=n.objects.layout.maxTabOrder;var o=new rn;return o.name="*Paper_Space".concat(i.tabOrder),n.tables.blockTable.add(o),n.objects.layout.setAt(e,i),this.events.layoutCreated.dispatch({layout:i}),{layout:i,btr:o}},r.prototype.getActiveLayout=function(e){var t=this.getWorkingDatabase(e);return t.objects.layout.getBtrIdAt(t.currentSpaceId)},r.prototype.getWorkingDatabase=function(e){return e||$v()},r.prototype.setCurrentLayoutInternal=function(e,t){return e?(this.events.layoutSwitched.dispatch({layout:e}),t.currentSpaceId=e.blockTableRecordId,!0):!1},r})()});function gL(r){pA=r}function Fr(){return fA.instance}var pA,fA,kV=W(()=>{mL();gr();fA=(function(){function r(){this._workingDatabase=null}return Object.defineProperty(r.prototype,"workingDatabase",{get:function(){if(this._workingDatabase==null)throw new Error("The current working database must be set before using it!");return this._workingDatabase},set:function(e){this._workingDatabase=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"layoutManager",{get:function(){return this._layoutManager||(pA||(pA=function(){return new ig}),this._layoutManager=pA()),this._layoutManager},enumerable:!1,configurable:!0}),r.instance=new r,r})();Xv(Fr)});var sl,yL=W(()=>{(function(r){r.kForRead="kForRead",r.kForWrite="kForWrite"})(sl||(sl={}))});var bL=W(()=>{Kb();Hm();Ov();JI();qS();kV();gr();yL();Wv()});function IV(r){for(var e="",t=0;t<r.length;t++){var n=r.charCodeAt(t);e+=n<=32?r[t]:String.fromCharCode(159-n)}return e}function LV(r){var e=r.trimStart();return!(!e||/^\d/.test(e)||/^ACIS/i.test(e)||/^ASM/i.test(e)||/^(body|point|plane|cone|cylinder|sphere|torus|lump|shell|face|edge|wire|transform)\b/i.test(e)||/\b(body|point|straight-curve|ellipse-curve)\s+\$/.test(e))}function OV(r){return!r||!LV(r)?r:IV(r)}function vL(r){return r.length===0?"":r.map(function(e){return OV(e)}).join(`
  6. `)}function mA(r,e,t){if(e===1){r.push(t);return}if(r.length===0){r.push(t);return}r[r.length-1]+=t}var DV=W(()=>{});function nae(r,e){var t,n,i="";try{for(var o=Joe(Qoe),a=o.next();!a.done;a=o.next()){var s=a.value;if(iae(e,s)){i=s,r.index=s.length;break}}}catch(b){t={error:b}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}if(i==="")throw new RangeError("SAB: not a SAB stream (missing signature)");var l=r.readInt(),c=r.readInt(),u=r.readInt(),h=r.readInt(),d=xL(r),p=xL(r),f=xL(r),m=wL(r),g=wL(r),y=wL(r);return{signature:i,version:l,numRecords:c,numEntities:u,flags:h,productId:d,acisVersion:p,creationDate:f,unitsInMm:m,resTol:g,norTol:y}}function xL(r){if(r.readByte()!==tn.Str)throw new RangeError("SAB: expected string tag (0x07)");return r.readStr(r.readByte())}function wL(r){if(r.readByte()!==tn.Double)throw new RangeError("SAB: expected double tag (0x06)");return r.readFloat()}function rae(r){for(var e=[],t=[],n="",i=0;;){if(!r.hasData){if(BV.has(n))return{type:n,tokens:e};throw new RangeError("SAB: premature end of data")}var o=r.readByte();switch(o){case tn.Int:e.push({tag:o,value:r.readInt()});break;case tn.Double:e.push({tag:o,value:r.readFloat()});break;case tn.Str:e.push({tag:o,value:r.readStr(r.readByte())});break;case tn.Pointer:e.push({tag:o,value:r.readInt()});break;case tn.BoolTrue:e.push({tag:o,value:!0});break;case tn.BoolFalse:e.push({tag:o,value:!1});break;case tn.LiteralStr:e.push({tag:o,value:r.readStr(r.readInt())});break;case tn.EntityTypeEx:t.push(r.readStr(r.readByte()));break;case tn.EntityType:{t.push(r.readStr(r.readByte()));var a=t.join("-");t.length=0,n===""&&(n=a),e.push({tag:o,value:a});break}case tn.LocationVec:e.push({tag:o,value:RV(r)});break;case tn.DirectionVec:e.push({tag:o,value:RV(r)});break;case tn.Enum:e.push({tag:o,value:r.readInt()});break;case tn.Unknown0x17:e.push({tag:o,value:r.readFloat()});break;case tn.SubtypeStart:i++,e.push({tag:o,value:i});break;case tn.SubtypeEnd:e.push({tag:o,value:i}),i--;break;case tn.RecordEnd:return{type:n,tokens:e};default:throw new RangeError("SAB: unknown tag 0x".concat(o.toString(16)," (").concat(String(o),") in record '").concat(n,"'"))}}}function RV(r){return[r.readFloat(),r.readFloat(),r.readFloat()]}function FV(r){for(var e=new eae(r),t=nae(e,r),n=[];e.hasData;){var i=rae(e);if(n.push(i),BV.has(i.type))break}return{header:t,records:n}}function iae(r,e){if(r.length<e.length)return!1;for(var t=0;t<e.length;t++)if(r[t]!==e.charCodeAt(t))return!1;return!0}var Joe,Qoe,BV,tn,eae,tae,a0=W(()=>{Joe=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qoe=["ACIS BinaryFile","ASM BinaryFile4"],BV=new Set(["End-of-ACIS-data","End-of-ASM-data","End-of-ACIS-History-data"]),tn={NoType:0,Byte:1,Char:2,Short:3,Int:4,Float:5,Double:6,Str:7,Str2:8,Str3:9,BoolTrue:10,BoolFalse:11,Pointer:12,EntityType:13,EntityTypeEx:14,SubtypeStart:15,SubtypeEnd:16,RecordEnd:17,LiteralStr:18,LocationVec:19,DirectionVec:20,Enum:21,Unknown0x17:23},eae=(function(){function r(e){this.data=e,this.index=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}return Object.defineProperty(r.prototype,"hasData",{get:function(){return this.index<this.data.length},enumerable:!1,configurable:!0}),r.prototype.require=function(e){if(this.index+e>this.data.length)throw new RangeError("SAB: read past end of data (need ".concat(String(e)," at ").concat(String(this.index),")"))},r.prototype.readByte=function(){var e;return this.require(1),(e=this.data[this.index++])!==null&&e!==void 0?e:0},r.prototype.readInt=function(){this.require(4);var e=this.view.getInt32(this.index,!0);return this.index+=4,e},r.prototype.readFloat=function(){this.require(8);var e=this.view.getFloat64(this.index,!0);return this.index+=8,e},r.prototype.readStr=function(e){this.require(e);var t=tae.decode(this.data.subarray(this.index,this.index+e));return this.index+=e,t},r})(),tae=new TextDecoder("latin1")});function NV(r){var e,t,n,i,o,a,s,l,c=r.records,u=c.map(function(E,S){return{index:S,type:E.type,record:E,refs:[]}});try{for(var h=gA(u),d=h.next();!d.done;d=h.next()){var p=d.value;try{for(var f=(n=void 0,gA(p.record.tokens)),m=f.next();!m.done;m=f.next()){var g=m.value;if(g.tag===tn.Pointer){var y=g.value;p.refs.push(y>=0&&y<u.length?u[y]:null)}}}catch(E){n={error:E}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}}catch(E){e={error:E}}finally{try{d&&!d.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}var b=u,v=new Map,x=new Map;try{for(var w=gA(b),_=w.next();!_.done;_=w.next()){var p=_.value;if(!oae.has(p.type)){var A=v.get(p.type);A===void 0&&(A=[],v.set(p.type,A)),A.push(p),x.set(p.type,((s=x.get(p.type))!==null&&s!==void 0?s:0)+1)}}}catch(E){o={error:E}}finally{try{_&&!_.done&&(a=w.return)&&a.call(w)}finally{if(o)throw o.error}}return{header:r.header,nodes:b,bodies:(l=v.get("body"))!==null&&l!==void 0?l:[],typeCounts:x,nodesOfType:function(E){var S;return(S=v.get(E))!==null&&S!==void 0?S:[]},pointLocations:function(){var E,S,M,T=[];try{for(var L=gA((M=v.get("point"))!==null&&M!==void 0?M:[]),O=L.next();!O.done;O=L.next()){var D=O.value,z=D.record.tokens.find(function(N){return N.tag===tn.LocationVec});z!==void 0&&T.push(z.value)}}catch(N){E={error:N}}finally{try{O&&!O.done&&(S=L.return)&&S.call(L)}finally{if(E)throw E.error}}return T}}}var gA,oae,zV=W(()=>{a0();gA=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},oae=new Set(["End-of-ACIS-data","End-of-ASM-data","End-of-ACIS-History-data"])});function lae(r,e){if(e.length===0||r.length<e.length)return-1;for(var t=e.charCodeAt(0),n=0;n<=r.length-e.length;n++)if(r[n]===t){for(var i=!0,o=1;o<e.length;o++)if(r[n+o]!==e.charCodeAt(o)){i=!1;break}if(i)return n}return-1}function cae(r){var e,t;try{for(var n=aae(sae),i=n.next();!i.done;i=n.next()){var o=i.value,a=lae(r,o);if(a>=0)return a}}catch(s){e={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return-1}function UV(r){if(r.length===0)return null;var e=cae(r);if(e<0)return null;try{return NV(FV(r.subarray(e)))}catch{return null}}var aae,sae,jV=W(()=>{zV();a0();aae=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sae=["ACIS BinaryFile","ASM BinaryFile","ASM BinaryFile4"]});function og(){return vA}function AL(r,e){return bA(r.scale,e.scale)&&yA(r.xAxis,e.xAxis)&&yA(r.yAxis,e.yAxis)&&yA(r.zAxis,e.zAxis)&&yA(r.translation,e.translation)}function dae(r){var e,t,n=[],i;try{for(var o=_L(r.record.tokens),a=o.next();!a.done;a=o.next()){var s=a.value;if(hae.has(s.tag)){n.push(s.value);continue}s.tag===tn.Double&&n.length>=4&&i===void 0&&(i=s.value)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n.length<4?null:{xAxis:n[0],yAxis:n[1],zAxis:n[2],translation:n[3],scale:i??1}}function pae(r){var e,t=r.refs.find(function(n){return n?.type==="transform"});return t==null?vA:(e=dae(t))!==null&&e!==void 0?e:vA}function cp(r){return AL(r,vA)}function ps(r,e){var t=e.scale,n=SL(r,3),i=n[0],o=n[1],a=n[2],s=e.xAxis,l=e.yAxis,c=e.zAxis,u=e.translation;return[t*(s[0]*i+l[0]*o+c[0]*a)+u[0],t*(s[1]*i+l[1]*o+c[1]*a)+u[1],t*(s[2]*i+l[2]*o+c[2]*a)+u[2]]}function ll(r,e){var t=e.scale,n=SL(r,3),i=n[0],o=n[1],a=n[2],s=e.xAxis,l=e.yAxis,c=e.zAxis;return[t*(s[0]*i+l[0]*o+c[0]*a),t*(s[1]*i+l[1]*o+c[1]*a),t*(s[2]*i+l[2]*o+c[2]*a)]}function xA(r){var e,t,n=new Map,i=function(l,c,u){var h,d;if(!(l==null||u.has(l.index))&&!l.type.includes("attrib")){u.add(l.index),n.has(l.index)||n.set(l.index,c);try{for(var p=_L(l.refs),f=p.next();!f.done;f=p.next()){var m=f.value;i(m,c,u)}}catch(g){h={error:g}}finally{try{f&&!f.done&&(d=p.return)&&d.call(p)}finally{if(h)throw h.error}}}};try{for(var o=_L(r.bodies),a=o.next();!a.done;a=o.next()){var s=a.value;i(s,pae(s),new Set)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n}function VV(r,e){if(cp(e)||r.length<3)return r;for(var t=new Float32Array(r.length),n=0;n+2<r.length;n+=3){var i=SL(ps([r[n],r[n+1],r[n+2]],e),3),o=i[0],a=i[1],s=i[2];t[n]=o,t[n+1]=a,t[n+2]=s}return t}var _L,SL,vA,uae,hae,bA,yA,wA=W(()=>{a0();_L=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},SL=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},vA={xAxis:[1,0,0],yAxis:[0,1,0],zAxis:[0,0,1],translation:[0,0,0],scale:1},uae=1e-12,hae=new Set([tn.LocationVec,tn.DirectionVec]),bA=function(r,e){return Math.abs(r-e)<=uae},yA=function(r,e){return bA(r[0],e[0])&&bA(r[1],e[1])&&bA(r[2],e[2])}});function ML(r){if(r===null)return null;var e=sg(r,"point");if(e===null)return null;var t=e.record.tokens.find(function(n){return n.tag===tn.LocationVec});return t?t.value:null}function fae(r){var e=new HV(r.record.tokens);if(r.type==="straight-curve"){var t=e.nextVec(),n=e.nextVec();if(t&&n)return{kind:"straight",origin:t,direction:n}}else if(r.type==="ellipse-curve"){var i=e.nextVec(),o=e.nextVec(),a=e.nextVec(),s=e.nextDouble();if(i&&o&&a&&s!==void 0)return{kind:"ellipse",center:i,normal:o,majorAxis:a,ratio:s}}else if(r.type==="intcurve-curve")return{kind:"intcurve",controlPoints:mae(r.record.tokens)};return{kind:"unknown"}}function mae(r){var e,t,n,i=r.findIndex(function(m){return m.tag===tn.EntityType&&(m.value==="nubs"||m.value==="nurbs")});if(i<0)return[];for(var o=i+1,a=-1;o<r.length;o++){var s=r[o];if(s===void 0||s.tag===tn.Double)break;if(s.tag===tn.Int&&(a=s.value),s.tag===tn.EntityType||s.tag===tn.SubtypeEnd)return[]}if(a<0)return[];for(var l=0;l<a;l++){if(((e=r[o])===null||e===void 0?void 0:e.tag)!==tn.Double)return[];o+=1,((t=r[o])===null||t===void 0?void 0:t.tag)===tn.Int&&(o+=1)}for(var c=[];((n=r[o])===null||n===void 0?void 0:n.tag)===tn.Double;){var u=r[o];if(u===void 0)break;c.push(u.value),o+=1}for(var h=[],l=0;l+3<=c.length;l+=3){var d=c[l],p=c[l+1],f=c[l+2];if(d===void 0||p===void 0||f===void 0)break;h.push([d,p,f])}return h}function XV(r){var e=new HV(r.record.tokens);if(r.type==="plane-surface"){var t=e.nextVec(),n=e.nextVec(),i=e.nextVec();if(t&&n)return i?{kind:"plane",origin:t,normal:n,uDir:i}:{kind:"plane",origin:t,normal:n}}else if(r.type==="cone-surface"){var o=e.nextVec(),a=e.nextVec(),s=e.nextVec(),l=e.nextDouble(),c=e.nextDouble(),u=e.nextDouble();if(o&&a&&s&&l!==void 0&&c!==void 0&&u!==void 0)return{kind:"cone",origin:o,axis:a,majorAxis:s,ratio:l,sineAngle:c,cosineAngle:u}}else if(r.type==="torus-surface"){var h=e.nextVec(),a=e.nextVec(),d=e.nextDouble(),p=e.nextDouble();if(h&&a&&d!==void 0&&p!==void 0)return{kind:"torus",center:h,axis:a,majorRadius:d,minorRadius:p}}else if(r.type==="sphere-surface"){var h=e.nextVec(),f=e.nextDouble(),i=e.nextVec(),m=e.nextVec();if(h&&f!==void 0&&i&&m)return{kind:"sphere",center:h,radius:f,uDir:i,poleAxis:m}}return{kind:"unknown"}}function YV(r){return XV(r)}function bae(r){var e,t=sg(r,"coedge");if(t===null)return 0;for(var n=new Set,i=t;i!==null&&!n.has(i.index);)n.add(i.index),i=(e=WV(i,"coedge")[0])!==null&&e!==void 0?e:null;return n.size}function vae(r,e){return r.kind==="straight"?{kind:"straight",origin:ps(r.origin,e),direction:ll(r.direction,e)}:r.kind==="ellipse"?{kind:"ellipse",center:ps(r.center,e),normal:ll(r.normal,e),majorAxis:ll(r.majorAxis,e),ratio:r.ratio}:r.kind==="intcurve"?{kind:"intcurve",controlPoints:r.controlPoints.map(function(t){return ps(t,e)})}:r}function xae(r,e){return r.kind==="plane"?PL({kind:"plane",origin:ps(r.origin,e),normal:ll(r.normal,e)},r.uDir?{uDir:ll(r.uDir,e)}:{}):r.kind==="cone"?{kind:"cone",origin:ps(r.origin,e),axis:ll(r.axis,e),majorAxis:ll(r.majorAxis,e),ratio:r.ratio,sineAngle:r.sineAngle,cosineAngle:r.cosineAngle}:r.kind==="torus"?{kind:"torus",center:ps(r.center,e),axis:ll(r.axis,e),majorRadius:r.majorRadius*e.scale,minorRadius:r.minorRadius*e.scale}:r.kind==="sphere"?{kind:"sphere",center:ps(r.center,e),radius:r.radius*e.scale,uDir:ll(r.uDir,e),poleAxis:ll(r.poleAxis,e)}:r}function $V(r){var e=[],t=xA(r),n=og(),i=function(y){var b;return(b=t.get(y))!==null&&b!==void 0?b:n},o=function(y,b){if(y===null)return null;var v=i(b);return cp(v)?y:ps(y,v)},a=1/0,s=1/0,l=1/0,c=-1/0,u=-1/0,h=-1/0,d=function(y){y[0]<a&&(a=y[0]),y[0]>c&&(c=y[0]),y[1]<s&&(s=y[1]),y[1]>u&&(u=y[1]),y[2]<l&&(l=y[2]),y[2]>h&&(h=y[2])},p=r.nodesOfType("vertex").map(function(y){var b=o(ML(y),y.index);return b===null?e.push("vertex#".concat(String(y.index),": no resolvable point")):d(b),{nodeIndex:y.index,point:b}}),f=r.nodesOfType("edge").map(function(y){var b,v,x,w=WV(y,"vertex"),_=o(ML((b=w[0])!==null&&b!==void 0?b:null),y.index),A=o(ML((v=w[1])!==null&&v!==void 0?v:null),y.index),E=sg(y,"-curve"),S=E&&(x=yae[E.type])!==null&&x!==void 0?x:"unknown",M=E?fae(E):void 0,T=i(y.index);return M!==void 0&&M.kind!=="unknown"&&!cp(T)&&(M=vae(M,T)),_!==null&&A!==null&&_[0]===A[0]&&_[1]===A[1]&&_[2]===A[2]&&e.push("edge#".concat(String(y.index),": degenerate (coincident endpoints)")),M===void 0||M.kind==="unknown"?{nodeIndex:y.index,start:_,end:A,curveType:S}:{nodeIndex:y.index,start:_,end:A,curveType:S,curve:M}}),m=r.nodesOfType("face").map(function(y){var b,v=sg(y,"-surface"),x=v&&(b=gae[v.type])!==null&&b!==void 0?b:"unknown",w=v?XV(v):void 0,_=i(y.index);w!==void 0&&w.kind!=="unknown"&&!cp(_)&&(w=xae(w,_));for(var A=[],E=new Set,S=sg(y,"loop");S!==null&&!E.has(S.index);)E.add(S.index),A.push({nodeIndex:S.index,coedgeCount:bae(S)}),S=sg(S,"loop");return v===null&&e.push("face#".concat(String(y.index),": no surface")),w===void 0||w.kind==="unknown"?{nodeIndex:y.index,surfaceType:x,loops:A}:{nodeIndex:y.index,surfaceType:x,surface:w,loops:A}}),g=a===1/0?null:{min:[a,s,l],max:[c,u,h]};return{vertices:p,edges:f,faces:m,bbox:g,diagnostics:e}}function KV(r){var e,t,n=[];try{for(var i=GV(r.record.tokens),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.tag===tn.Double&&(n.push(a.value),n.length===2))break}}catch(c){e={error:c}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}var s=n[0],l=n[1];return s===void 0||l===void 0?null:[s,l]}function SA(r,e,t,n){for(var i=_h(_A(ag(r.normal),r.majorAxis),r.ratio),o=Math.max(1,n),a=[],s=0;s<=o;s++){var l=e+(t-e)*s/o;a.push(up(r.center,up(_h(r.majorAxis,Math.cos(l)),_h(i,Math.sin(l)))))}return a}function qV(r,e){var t,n;e===void 0&&(e=16);var i=ag(r.poleAxis),o=ag(r.uDir),a=_A(i,o);wae(a)<1e-9?(o=Math.abs(i[0])<.9?[1,0,0]:[0,1,0],a=ag(_A(i,o))):a=ag(a),o=ag(_A(a,i));var s=[],l=function(v,x){for(var w=[],_=Math.max(8,e),A=0;A<=_;A++){var E=Math.PI*2*A/_;w.push(up(r.center,up(_h(v,r.radius*Math.cos(E)),_h(x,r.radius*Math.sin(E)))))}s.push(w)};l(o,a),l(o,i),l(a,i);try{for(var c=GV([-.5,.5]),u=c.next();!u.done;u=c.next()){var h=u.value,d=_h(i,r.radius*h),p=up(r.center,d),f=r.radius*Math.sqrt(Math.max(0,1-h*h));if(f>1e-6){for(var m=[],g=Math.max(8,e),y=0;y<=g;y++){var b=Math.PI*2*y/g;m.push(up(p,up(_h(o,f*Math.cos(b)),_h(a,f*Math.sin(b)))))}s.push(m)}}}catch(v){t={error:v}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return s}var PL,GV,HV,sg,WV,gae,yae,up,_h,wae,_A,ag,EL=W(()=>{a0();wA();PL=function(){return PL=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},PL.apply(this,arguments)},GV=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},HV=(function(){function r(e){this.tokens=e,this.i=0}return r.prototype.next=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(;this.i<this.tokens.length;){var n=this.tokens[this.i++];if(n!==void 0&&e.includes(n.tag))return n}},r.prototype.nextVec=function(){var e;return(e=this.next(tn.LocationVec,tn.DirectionVec))===null||e===void 0?void 0:e.value},r.prototype.nextDouble=function(){var e;return(e=this.next(tn.Double))===null||e===void 0?void 0:e.value},r})(),sg=function(r,e){var t;return(t=r.refs.find(function(n){return n!==null&&(n.type===e||n.type.endsWith(e))}))!==null&&t!==void 0?t:null},WV=function(r,e){return r.refs.filter(function(t){return t!==null&&t.type===e})};gae={"plane-surface":"plane","cone-surface":"cone","torus-surface":"torus","sphere-surface":"sphere","spline-surface":"spline"},yae={"straight-curve":"straight","ellipse-curve":"ellipse","intcurve-curve":"intcurve"};up=function(r,e){return[r[0]+e[0],r[1]+e[1],r[2]+e[2]]},_h=function(r,e){return[r[0]*e,r[1]*e,r[2]*e]},wae=function(r){return Math.hypot(r[0],r[1],r[2])},_A=function(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]},ag=function(r){var e=Math.hypot(r[0],r[1],r[2]);return e>0?[r[0]/e,r[1]/e,r[2]/e]:[0,0,0]}});function ZV(r,e,t){r.push(e[0],e[1],e[2],t[0],t[1],t[2])}function AA(r,e){for(var t=0;t+1<e.length;t++){var n=e[t],i=e[t+1];n&&i&&ZV(r,n,i)}}function Aae(r){var e,t,n,i=[],o=xA(r),a=og(),s=function(h){var d,p,f=Sae(h,"-surface");if(f?.type!=="sphere-surface")return"continue";var m=YV(f);if(m.kind!=="sphere")return"continue";var g=(n=o.get(h.index))!==null&&n!==void 0?n:a;try{for(var y=(d=void 0,CL(qV(m))),b=y.next();!b.done;b=y.next()){var v=b.value;if(cp(g)){AA(i,v);continue}AA(i,v.map(function(x){return ps(x,g)}))}}catch(x){d={error:x}}finally{try{b&&!b.done&&(p=y.return)&&p.call(y)}finally{if(d)throw d.error}}};try{for(var l=CL(r.nodesOfType("face")),c=l.next();!c.done;c=l.next()){var u=c.value;s(u)}}catch(h){e={error:h}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return new Float32Array(i)}function JV(r,e){var t,n,i,o,a,s,l=[];try{for(var c=CL(r.edges),u=c.next();!u.done;u=c.next()){var h=u.value,d=e?.nodes[h.nodeIndex];if(((i=h.curve)===null||i===void 0?void 0:i.kind)==="ellipse"){var p=d!==void 0?KV(d):null,f=(o=p?.[0])!==null&&o!==void 0?o:0,m=(a=p?.[1])!==null&&a!==void 0?a:Math.PI*2;AA(l,SA(h.curve,f,m,_ae));continue}if(((s=h.curve)===null||s===void 0?void 0:s.kind)==="intcurve"&&h.curve.controlPoints.length>0){AA(l,h.curve.controlPoints);continue}h.start&&h.end&&ZV(l,h.start,h.end)}}catch(g){t={error:g}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return new Float32Array(l)}function TL(r){var e=UV(r);if(e===null)return null;var t=$V(e),n=JV(t,e);if(n.length>0)return n;var i=Aae(e);return i.length>0?i:null}var CL,_ae,Sae,QV=W(()=>{jV();EL();wA();CL=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_ae=16,Sae=function(r,e){var t;return(t=r.refs.find(function(n){return n!==null&&(n.type===e||n.type.endsWith(e))}))!==null&&t!==void 0?t:null}});function kL(r,e){var t,n;e===void 0&&(e=!0);var i=r.split(/\s+/),o=[],a=!e;try{for(var s=s0(i),l=s.next();!l.done;l=s.next()){var c=l.value;if(!a&&/^-?\d+$/.test(c)){a=!0;continue}if(!(c.startsWith("$")||c==="I"||c==="F"||c==="#")){var u=Number.parseFloat(c);Number.isFinite(u)&&o.push(u)}}}catch(h){t={error:h}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o}function e7(r,e,t){r.push(e[0],e[1],e[2],t[0],t[1],t[2])}function n7(r){return r.split("#").map(function(e){return e.trim()}).filter(function(e){return e.length>0})}function Cae(r){var e=[];return r.forEach(function(t,n){var i=/^-(\d+)\b/.exec(t),o=i?Number(i[1]):n;e[o]=t}),e}function t7(r){if(!/(?:^|\s)transform\b/.test(r))return null;var e=kL(r);return e.length<13?null:{xAxis:[e[0],e[1],e[2]],yAxis:[e[3],e[4],e[5]],zAxis:[e[6],e[7],e[8]],translation:[e[9],e[10],e[11]],scale:e[12]}}function Tae(r){var e,t,n,i,o,a,s=og(),l=Cae(n7(r)),c=[];try{for(var u=s0(l),h=u.next();!h.done;h=u.next()){var d=h.value;if(!(d==null||!/(?:^|\s)body\b/.test(d))){var p=Pae([],Mae(d.matchAll(/\$(-?\d+)/g)),!1).map(function(E){return Number(E[1])});try{for(var f=(n=void 0,s0(p)),m=f.next();!m.done;m=f.next()){var g=m.value;if(!(g<0)){var y=l[g];if(y!=null){var b=t7(y);if(b!=null){c.push(b);break}}}}}catch(E){n={error:E}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}}}catch(E){e={error:E}}finally{try{h&&!h.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}if(c.length===0){var v=[];try{for(var x=s0(l),w=x.next();!w.done;w=x.next()){var d=w.value;if(d!=null){var b=t7(d);b!=null&&v.push(b)}}}catch(E){o={error:E}}finally{try{w&&!w.done&&(a=x.return)&&a.call(x)}finally{if(o)throw o.error}}return v.length===1?v[0]:s}for(var _=c[0],A=1;A<c.length;A++)if(!AL(c[A],_))return s;return _}function kae(r){if(!r.includes("straight-curve"))return null;var e=kL(r);if(e.length<6)return null;var t=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5];return[[t,n,i],[t+o,n+a,i+s]]}function Iae(r){if(!r.includes("ellipse-curve"))return null;var e=kL(r);return e.length<10?null:{kind:"ellipse",center:[e[0],e[1],e[2]],normal:[e[3],e[4],e[5]],majorAxis:[e[6],e[7],e[8]],ratio:e[9]}}function IL(r){var e,t,n=[];if(!r||r.trim().length===0)return new Float32Array(0);try{for(var i=s0(n7(r)),o=i.next();!o.done;o=i.next()){var a=o.value,s=kae(a);if(s!==null){e7(n,s[0],s[1]);continue}var l=Iae(a);if(l!==null)for(var c=SA(l,0,Math.PI*2,Eae),u=1;u<c.length;u++)e7(n,c[u-1],c[u])}}catch(h){e={error:h}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n.length===0?new Float32Array(0):VV(new Float32Array(n),Tae(r))}var s0,Mae,Pae,Eae,r7=W(()=>{EL();wA();s0=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mae=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Pae=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Eae=16});var i7=W(()=>{DV();QV();r7()});function Dae(r){return r.split("#").map(function(e){return e.trim()}).filter(function(e){return e.length>0})}function Rae(r,e){e===void 0&&(e=1);for(var t=r.split(/\s+/),n=[],i=e;i<t.length;i++){var o=t[i];if(!(o.startsWith("$")||o==="I"||o==="F")){var a=Number.parseFloat(o);Number.isFinite(a)&&n.push(a)}}return n}function Bae(r){var e,t,n,i,o=[];try{for(var a=o7(r.matchAll(Oae)),s=a.next();!s.done;s=a.next()){var l=s.value,c=Number.parseFloat(l[1]),u=Number.parseFloat(l[2]),h=Number.parseFloat(l[3]);Number.isFinite(c)&&Number.isFinite(u)&&Number.isFinite(h)&&o.push(new k(c,u,h))}}catch(g){e={error:g}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}if(o.length>0)return o;try{for(var d=o7(Dae(r)),p=d.next();!p.done;p=d.next()){var f=p.value;if(f.startsWith("point ")){var m=Rae(f);if(m.length>=3){var c=m[m.length-3],u=m[m.length-2],h=m[m.length-1];o.push(new k(c,u,h))}}}}catch(g){n={error:g}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return o}function Fae(r){for(var e=[],t=0;t<r.length;t+=3){var n=r[t],i=r[t+1],o=r[t+2];e.push(new k(n,i,o))}return e}function Nae(r,e){var t,n,i;return typeof r=="string"?{satText:r,version:e}:{sabBytes:r.sabBytes,satText:(n=(t=r.satText)!==null&&t!==void 0?t:r.acisData)!==null&&n!==void 0?n:"",version:(i=r.version)!==null&&i!==void 0?i:e}}var Lae,o7,Oae,hp,MA=W(()=>{tt();i7();Gn();Lae=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),o7=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oae=/\bpoint\s+(?:\$-?\d+\s+){1,4}([-\d.eE+]+)\s+([-\d.eE+]+)\s+([-\d.eE+]+)/g;hp=(function(r){Lae(e,r);function e(t,n){var i=r.call(this)||this;i._points=[],i._wireframe=new Float32Array(0);var o=Nae(t,n);return i._acisData=o.satText,i._sabBytes=o.sabBytes,i._version=o.version,i.rebuildGeometryCaches(),i}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"3DSOLID"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"acisData",{get:function(){return this._acisData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"historyObjectSoftId",{get:function(){return this._historyObjectSoftId},set:function(t){this._historyObjectSoftId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"guid",{get:function(){return this._guid},set:function(t){this._guid=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"satCache",{get:function(){return this._satCache},set:function(t){this._satCache=t},enumerable:!1,configurable:!0}),e.prototype.setAcisData=function(t,n){this._acisData=t??"",n!=null&&(this._version=n),this.rebuildGeometryCaches()},e.prototype.setSabBytes=function(t){this._sabBytes=t&&t.length>0?t:void 0,this.rebuildGeometryCaches()},Object.defineProperty(e.prototype,"sabBytes",{get:function(){return this._sabBytes},enumerable:!1,configurable:!0}),e.prototype.rebuildGeometryCaches=function(){var t,n=new Float32Array(0);this._sabBytes&&this._sabBytes.length>0&&(n=(t=TL(this._sabBytes))!==null&&t!==void 0?t:new Float32Array(0)),n.length===0&&this._acisData&&(n=IL(this._acisData)),this._wireframe=n,this._points=n.length>0?Fae(n):Bae(this._acisData)},Object.defineProperty(e.prototype,"hasRenderableGeometry",{get:function(){return this._wireframe.length>0||this._points.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this._points.length===0?new De(new k(0,0,0),new k(0,0,0)):new De().setFromPoints(this._points)},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){for(var t=[],n=0;n+5<this._wireframe.length;n+=6)t.push({kind:"line",line:new Yn({x:this._wireframe[n],y:this._wireframe[n+1],z:this._wireframe[n+2]},{x:this._wireframe[n+3],y:this._wireframe[n+4],z:this._wireframe[n+5]}),extent:"bounded",extendable:!1});return t},e.prototype.transformBy=function(t){if(this._points.forEach(function(a){return a.applyMatrix4(t)}),this._wireframe.length>0){for(var n=new Float32Array(this._wireframe.length),i=0;i<this._wireframe.length;i+=3){var o=new k(this._wireframe[i],this._wireframe[i+1],this._wireframe[i+2]);o.applyMatrix4(t),n[i]=o.x,n[i+1]=o.y,n[i+2]=o.z}this._wireframe=n}return this},e.prototype.subWorldDraw=function(t){if(this._wireframe.length>=6){for(var n=this._wireframe.length/3,i=new Uint16Array(n),o=0;o<n;o++)i[o]=o;return t.lineSegments(this._wireframe,3,i)}if(this._points.length!==0){var a=this.geometricExtents,s=a.min,l=a.max,c=[new k(s.x,s.y,s.z),new k(l.x,s.y,s.z),new k(l.x,l.y,s.z),new k(s.x,l.y,s.z),new k(s.x,s.y,l.z),new k(l.x,s.y,l.z),new k(l.x,l.y,l.z),new k(s.x,l.y,l.z)],u=new Float32Array(c.length*3);c.forEach(function(d,p){u[p*3]=d.x,u[p*3+1]=d.y,u[p*3+2]=d.z});var h=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);return t.lineSegments(u,3,h)}},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDb3dSolid"),this._version!=null&&t.writeInt16(70,this._version),this._guid!=null&&t.writeString(2,this._guid),this._satCache!=null&&t.writeInt16(290,this._satCache?1:0);for(var n=255,i=this._acisData.split(`
  7. `),o=0;o<i.length;o++){for(var a=o===i.length-1,s=i[o];s.length>n;)t.writeString(3,s.slice(0,n)),s=s.slice(n);t.writeString(a?1:3,s)}return this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbModelerGeometry");for(var n=[],i=this._version;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var o=t.peekItem();if(!o)break;var a=Number(o.code);if(a===100){t.readItem();var s=String(o.value);if(s==="AcDb3dSolid")continue;t.pushBackItem(o);break}t.readItem();var l=Number(o.value);switch(a){case 1:mA(n,1,String(o.value));break;case 3:mA(n,3,String(o.value));break;case 70:i=l;break;case 350:this._historyObjectSoftId=String(o.value);break;case 2:this._guid=String(o.value);break;case 290:this._satCache=l!==0;break;default:break}}return this.setAcisData(vL(n),i),this},e.typeName="3dSolid",e})(bt)});function l0(r){var e,t,n=0;try{for(var i=a7(r),o=i.next();!o.done;o=i.next()){var a=o.value;n|=1<<a-1}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n}function lg(r){var e,t,n=[];try{for(var i=a7(Object.values(ne)),o=i.next();!o.done;o=i.next()){var a=o.value;if(typeof a=="number"){var s=1<<a-1;(r&s)!==0&&n.push(a)}}}catch(l){e={error:l}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n}function LL(r,e){return r^1<<e-1}function cg(r,e){return(r&1<<e-1)!==0}var a7,ne,Fn=W(()=>{a7=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.EndPoint=1]="EndPoint",r[r.MidPoint=2]="MidPoint",r[r.Center=3]="Center",r[r.Node=4]="Node",r[r.Quadrant=5]="Quadrant",r[r.Intersection=6]="Intersection",r[r.Insertion=7]="Insertion",r[r.Perpendicular=8]="Perpendicular",r[r.Tangent=9]="Tangent",r[r.Nearest=10]="Nearest",r[r.Centroid=11]="Centroid"})(ne||(ne={}))});var zae,vn,no=W(()=>{Gn();zae=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),vn=(function(r){zae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getOffsetSideAtPoint=function(t){return 1},e.typeName="Curve",e})(bt)});function un(r,e){var t,n;try{for(var i=Uae(r),o=i.next();!o.done;o=i.next()){var a=o.value;Number.isInteger(a)&&a>=0&&e(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}function Tr(r,e,t){un(r,function(n){n===0&&t.add(e)})}function Sh(r,e,t){var n=r[e];n&&(n.x+=t.x,n.y+=t.y)}function fs(r,e,t){un(r,function(n){var i=t[n];i&&i.add(e)})}var Uae,En=W(()=>{Uae=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});function u7(r){if(typeof r!="string")return{objectId:r,occurrence:0};var e=/^(.*)#(\d+)$/.exec(r);return e?{objectId:e[1],occurrence:Number(e[2])}:{objectId:r,occurrence:0}}function c7(r,e){var t=r.x-e.x,n=r.y-e.y,i=(r.z||0)-(e.z||0);return t*t+n*n+i*i}function yr(r,e){if(e.length!==0){for(var t=new k(e[0].x,e[0].y,e[0].z||0),n=c7(r,t),i=1;i<e.length;i++){var o=e[i],a=new k(o.x,o.y,o.z||0),s=c7(r,a);s<n&&(t=a,n=s)}return t}}function Kl(r,e,t,n,i){var o=new k(r.x,r.y,r.z||0),a=new k(e.x,e.y,e.z||0),s=new Yn(o,a);switch(t){case ne.EndPoint:i.push(o,a);break;case ne.MidPoint:i.push(s.midPoint);break;case ne.Nearest:i.push(s.nearestPoint(n));break;case ne.Perpendicular:i.push(s.perpPoint(n));break;default:break}}function Ah(r,e,t,n,i,o,a){if(t){var s=new Ke(r,e,t);switch(i){case ne.EndPoint:a.push(new k(s.startPoint.x,s.startPoint.y,n),new k(s.endPoint.x,s.endPoint.y,n));break;case ne.MidPoint:a.push(new k(s.midPoint.x,s.midPoint.y,n));break;case ne.Nearest:{var l=s.nearestPoint({x:o.x,y:o.y});a.push(new k(l.x,l.y,n));break}case ne.Perpendicular:{var c=s.perpendicularPoints({x:o.x,y:o.y});c.forEach(function(h){return a.push(new k(h.x,h.y,n))});break}case ne.Tangent:{var u=s.tangentPoints({x:o.x,y:o.y});u.forEach(function(h){return a.push(new k(h.x,h.y,n))});break}default:break}return}Kl(new k(r.x,r.y,n),new k(e.x,e.y,n),i,o,a)}function Mh(r,e,t,n,i){if(r.length!==0)switch(t){case ne.EndPoint:r.forEach(function(u){return i.push(new k(u.x,u.y,u.z||0))});break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:{for(var o=e?r.length:r.length-1,a=[],s=0;s<o;s++){var l=[];Kl(r[s],r[(s+1)%r.length],t,n,l),a.push.apply(a,l7([],s7(l),!1))}if(t===ne.MidPoint)i.push.apply(i,l7([],s7(a),!1));else{var c=yr(n,a);c&&i.push(c)}break}default:break}}var s7,l7,ro=W(()=>{tt();Fn();s7=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},l7=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))}});var jae,Vae,Gae,Hae,ug,PA,h7,ms,OL=W(()=>{tt();Fn();no();En();ro();jae=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Vae=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gae=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Hae=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ug=new G,PA=new G,h7=new k,ms=(function(r){jae(e,r);function e(t,n,i,o,a){a===void 0&&(a=G.Z_AXIS);var s=r.call(this)||this;if(s._geoData=null,s._thickness=0,t!==void 0&&n!==void 0&&i!==void 0&&o!==void 0){var l=Ea(a);s._geo=new Pn(t,n,i,o,a,l)}return s}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"ARC"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_geo",{get:function(){return this._geoData==null&&(this._geoData=new Pn(new k,1,0,Math.PI/2,G.Z_AXIS,G.X_AXIS)),this._geoData},set:function(t){this._geoData=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this._geo.center},set:function(t){this._geo.center=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this._geo.radius},set:function(t){this._geo.radius=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._geo.startAngle},set:function(t){this._geo.startAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._geo.endAngle},set:function(t){this._geo.endAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._geo.normal},set:function(t){this.setNormalAndRefVec(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this._geo.startPoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this._geo.endPoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"midPoint",{get:function(){return this._geo.midPoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this._geo.box},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return[{kind:"circArc",arc:this._geo.clone(),extendable:!this.closed}]},Object.defineProperty(e.prototype,"closed",{get:function(){return this._geo.closed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this._geo.area},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"centerX",type:"float",editable:!0,accessor:{get:function(){return t.center.x},set:function(n){t.center.x=n}}},{name:"centerY",type:"float",editable:!0,accessor:{get:function(){return t.center.y},set:function(n){t.center.y=n}}},{name:"centerZ",type:"float",editable:!0,accessor:{get:function(){return t.center.z},set:function(n){t.center.z=n}}},{name:"radius",type:"float",editable:!0,accessor:{get:function(){return t.radius},set:function(n){t.radius=n}}},{name:"startAngle",type:"float",editable:!0,accessor:{get:function(){return t.startAngle},set:function(n){t.startAngle=n}}},{name:"endAngle",type:"float",editable:!0,accessor:{get:function(){return t.endAngle},set:function(n){t.endAngle=n}}},{name:"normalX",type:"float",editable:!0,accessor:{get:function(){return t.normal.x},set:function(n){t.normal.x=n}}},{name:"normalY",type:"float",editable:!0,accessor:{get:function(){return t.normal.y},set:function(n){t.normal.y=n}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:function(){return t.normal.z},set:function(n){t.normal.z=n}}},{name:"arcLength",type:"float",editable:!1,accessor:{get:function(){return t._geo.length}}},{name:"totalAngle",type:"float",editable:!1,accessor:{get:function(){return xe.radToDeg(Math.abs(t._geo.deltaAngle))}}},{name:"area",type:"float",editable:!1,accessor:{get:function(){return t.area}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push(this.center),t.push(this.startPoint),t.push(this.endPoint),t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){i.moveGripAt(o,n)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a,s,l=this.startPoint,c=this.endPoint;switch(t){case ne.EndPoint:o.push(l),o.push(c);break;case ne.MidPoint:o.push(this.midPoint);break;case ne.Center:case ne.Centroid:o.push(this._geo.center);break;case ne.Quadrant:{var u=[0,Math.PI/2,Math.PI,3*Math.PI/2];try{for(var h=Vae(u),d=h.next();!d.done;d=h.next()){var p=d.value;xe.isBetweenAngle(p,this.startAngle,this.endAngle)&&o.push(this._geo.getPointAtAngle(p))}}catch(b){a={error:b}}finally{try{d&&!d.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}break}case ne.Nearest:{var f=this._geo.nearestPoint(n);o.push(f)}break;case ne.Perpendicular:{var m=this._geo.perpendicularPoints(n),g=yr(n,m);g&&o.push(g);break}case ne.Tangent:{var y=this._geo.tangentPoints(n);o.push.apply(o,Hae([],Gae(y),!1));break}default:break}},e.prototype.transformBy=function(t){return this._geo.transform(t),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){return t.circularArc(this._geo)},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t);var n=dr(this.center,this.normal);return t.writeSubclassMarker("AcDbCircle"),this.thickness!==0&&t.writeDouble(39,this.thickness),t.writePoint3d(10,n),t.writeDouble(40,this.radius),t.writeVector3d(210,this.normal),t.writeSubclassMarker("AcDbArc"),t.writeAngle(50,To(this.center,this.startPoint,this.normal)),t.writeAngle(51,To(this.center,this.endPoint,this.normal)),this},e.prototype.dxfInFields=function(t){var n=this,i;r.prototype.dxfInFields.call(this,t);var o=0,a=0,s=0,l=this.radius,c=xe.radToDeg(this.startAngle),u=xe.radToDeg(this.endAngle),h=this.normal.x,d=this.normal.y,p=this.normal.z,f=function(m){for(;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var g=t.readItem();if(!g)break;var y=Number(g.code);if(m&&y===100)return t.pushBackItem(g),!0;var b=Number(g.value);switch(y){case 10:o=b;break;case 20:a=b;break;case 30:s=b;break;case 40:l=b;break;case 39:n.thickness=b;break;case 50:c=b;break;case 51:u=b;break;case 210:h=b;break;case 220:d=b;break;case 230:p=b;break;default:break}}return!1};return t.atSubclassData("AcDbCircle")&&f(!0),(t.atSubclassData("AcDbArc")||!t.peekItem()||Number((i=t.peekItem())===null||i===void 0?void 0:i.code)!==100)&&f(!1),this.applyDxfInGeometry(o,a,s,l,c,u,h,d,p),this},e.prototype.applyDxfInGeometry=function(t,n,i,o,a,s,l,c,u){ug.set(l,c,u),ug.lengthSq()>0&&ug.normalize(),fh(PA,ug),Wd(h7,{x:t,y:n,z:i},ug),this._geo=new Pn(h7,o,xe.degToRad(a),xe.degToRad(s),ug,PA)},e.prototype.setNormalAndRefVec=function(t){this._geo.normal=t,fh(PA,this._geo.normal),this._geo.refVec=PA},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.center,i=this.radius;return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))>=i?1:-1},e.prototype.moveGripAt=function(t,n){var i,o,a,s;switch(t){case 0:this.transformBy(Ie.makeTranslation(n));break;case 1:{var l=this._geo.startPoint;this._geo.startAngle=To(this._geo.center,{x:l.x+n.x,y:l.y+n.y,z:((i=l.z)!==null&&i!==void 0?i:0)+((o=n.z)!==null&&o!==void 0?o:0)},this._geo.normal);break}case 2:{var l=this._geo.endPoint;this._geo.endAngle=To(this._geo.center,{x:l.x+n.x,y:l.y+n.y,z:((a=l.z)!==null&&a!==void 0?a:0)+((s=n.z)!==null&&s!==void 0?s:0)},this._geo.normal);break}default:break}},e.prototype.createOffsetCurve=function(t){var n=this._geo.offset(t);return n?new e(n.center,n.radius,n.startAngle,n.endAngle,n.normal):null},e.typeName="Arc",e})(vn)});function EA(r){return r.replace(/\\[PpNn]/g,`
  8. `).replace(/\\[A-Za-z][^;]*;/g,"").replace(/[{}]/g,"")}function p7(r){return r.replace(/\\/g,"\\\\").replace(/([{}])/g,"\\$1")}function Kae(r){return r.replace(/\\[PpNn]/g,`
  9. `).replace($ae,"").replace(/\\[A-Za-z][^;]*;/g,"").replace(/[{}]/g,"").trim()}function f7(r,e,t){t===void 0&&(t=1);var n=r.trim();if(!n||e<=0)return 0;var i=Kae(n),o=Yae.test(n);return i?Math.max(e,oa(i,e,t)):o?e:0}function oa(r,e,t){if(t===void 0&&(t=1),!r||e<=0)return 0;var n=EA(r),i=Math.max.apply(Math,d7(d7([],DL(n.split(/\r\n|\r|\n/g).map(function(o){return o.length})),!1),[0],!1));return i===0?0:Math.max(e,i*e*Xae*t)}function RL(r){var e=EA(r);return Math.max(e.split(/\r\n|\r|\n/g).length,1)}function BL(r,e,t,n){if(n===void 0&&(n=1),e<=0||r<=0)return 0;if(r===1)return e;var i=Math.max(t,0)*(5/3),o=n===2?i:Math.max(i,1);return e+(r-1)*e*o}function FL(r,e,t){switch(t){case ut.TopCenter:return{minX:-r/2,minY:-e,maxX:r/2,maxY:0};case ut.TopRight:return{minX:-r,minY:-e,maxX:0,maxY:0};case ut.MiddleLeft:return{minX:0,minY:-e/2,maxX:r,maxY:e/2};case ut.MiddleCenter:return{minX:-r/2,minY:-e/2,maxX:r/2,maxY:e/2};case ut.MiddleRight:return{minX:-r,minY:-e/2,maxX:0,maxY:e/2};case ut.BottomLeft:case ut.BaselineLeft:return{minX:0,minY:0,maxX:r,maxY:e};case ut.BottomCenter:case ut.BaselineCenter:return{minX:-r/2,minY:0,maxX:r/2,maxY:e};case ut.BottomRight:case ut.BaselineRight:return{minX:-r,minY:0,maxX:0,maxY:e};case ut.TopLeft:default:return{minX:0,minY:-e,maxX:r,maxY:0}}}function NL(r,e){var t;e&&e.lengthSq()>0?t=e.clone().normalize():t=new G(Math.cos(r),Math.sin(r),0);var n=new G(-t.y,t.x,t.z);return n.lengthSq()===0?n.set(0,1,0):n.normalize(),{xAxis:t,yAxis:n}}function CA(r,e,t,n,i,o,a){var s,l;if(o===void 0&&(o=0),t<=0&&n<=0)return r.expandByPoint(e),r;var c=FL(t,n,i),u=NL(o,a?new G(a.x,a.y,a.z||0):void 0),h=u.xAxis,d=u.yAxis,p=[[c.minX,c.minY],[c.maxX,c.minY],[c.maxX,c.maxY],[c.minX,c.maxY]];try{for(var f=Wae(p),m=f.next();!m.done;m=f.next()){var g=DL(m.value,2),y=g[0],b=g[1];r.expandByPoint(new k(e.x+h.x*y+d.x*b,e.y+h.y*y+d.y*b,e.z+h.z*y+d.z*b))}}catch(v){s={error:v}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(s)throw s.error}}return r}function m7(r){var e,t,n=r.extentsWidth>0?r.extentsWidth:r.width>0?r.width:oa(r.contents,r.height),i=BL(RL(r.contents),r.height,r.lineSpacingFactor,(e=r.lineSpacingStyle)!==null&&e!==void 0?e:1);return{width:n,height:i,attachment:r.attachmentPoint,rotation:r.rotation,direction:r.direction.lengthSq()>0?r.direction.clone():void 0,location:new k(r.location.x,r.location.y,(t=r.location.z)!==null&&t!==void 0?t:0)}}function qae(r,e){var t,n=NL(e.rotation,e.direction),i=n.xAxis,o=n.yAxis,a=r.x-e.location.x,s=r.y-e.location.y,l=((t=r.z)!==null&&t!==void 0?t:0)-e.location.z;return{x:a*i.x+s*i.y+l*i.z,y:a*o.x+s*o.y+l*o.z}}function g7(r){var e=FL(r.width,r.height,r.attachment),t=NL(r.rotation,r.direction),n=t.xAxis,i=t.yAxis,o=[[e.minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]];return o.map(function(a){var s=DL(a,2),l=s[0],c=s[1];return new k(r.location.x+n.x*l+i.x*c,r.location.y+n.y*l+i.y*c,r.location.z+n.z*l+i.z*c)})}function y7(r,e,t){var n=FL(e.width,e.height,e.attachment),i=qae(r,e),o=i.x,a=i.y,s=n.minX-t.padX,l=n.maxX+t.padX,c=n.minY-t.padYBelow,u=n.maxY+t.padYAbove;if(o<s||o>l||a<c||a>u)return null;var h=o<n.minX?n.minX-o:o>n.maxX?n.maxX-o:0,d=a<n.minY?n.minY-a:a>n.maxY?a-n.maxY:0;return h+d}var DL,d7,Wae,Xae,Yae,$ae,dp=W(()=>{tt();Li();DL=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},d7=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Wae=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xae=1,Yae=/\\[fF][^\\|{}]*(?:\|[^;\\|{}]*)*;./i,$ae=/\\[fF][^\\|{}]*(?:\|[^;\\|{}]*)*;./gi});function ese(r,e){var t=typeof r=="number"?r:Number(r);return Number.isFinite(t)?t:e}function jL(r,e){return e===void 0&&(e=0),ese(r,e)}var Zae,UL,Jae,Qae,b7,du,Ph,pp,zL,c0,VL=W(()=>{zt();tt();Li();bi();Gn();dp();Zae=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),UL=function(){return UL=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},UL.apply(this,arguments)},Jae=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Qae=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},b7=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.Fit=1]="Fit",r[r.Left=2]="Left",r[r.Right=3]="Right",r[r.Center=4]="Center"})(du||(du={}));(function(r){r[r.OutwardFromCenter=1]="OutwardFromCenter",r[r.InwardToTheCenter=2]="InwardToTheCenter"})(Ph||(Ph={}));(function(r){r[r.OnConvexSide=1]="OnConvexSide",r[r.OnConcaveSide=2]="OnConcaveSide"})(pp||(pp={}));zL=Math.PI*2;c0=(function(r){Zae(e,r);function e(){var t=r.apply(this,Qae([],Jae(arguments),!1))||this;return t._textString="",t._textSize=0,t._xScale=1,t._characterSpacing=0,t._styleName="",t._fontName="",t._bigFontName="",t._offsetFromArc=0,t._rightOffset=0,t._leftOffset=0,t._center=new k,t._radius=0,t._startAngle=0,t._endAngle=0,t._normal=new G(0,0,1),t._characterSet=0,t._pitchAndFamily=0,t._isShx=!1,t._isBold=!1,t._isItalic=!1,t._isUnderlined=!1,t._alignment=du.Fit,t._isReverse=!1,t._wizardFlag=0,t._textPosition=pp.OnConvexSide,t._textDirection=Ph.OutwardFromCenter,t._arcId="",t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"ARCALIGNEDTEXT"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textString",{get:function(){return this._textString},set:function(t){this._textString=t??""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textSize",{get:function(){return this._textSize},set:function(t){this._textSize=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xScale",{get:function(){return this._xScale},set:function(t){this._xScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"characterSpacing",{get:function(){return this._characterSpacing},set:function(t){this._characterSpacing=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleName",{get:function(){return this._styleName},set:function(t){this._styleName=t??""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},set:function(t){this._fontName=t??""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bigFontName",{get:function(){return this._bigFontName},set:function(t){this._bigFontName=t??""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetFromArc",{get:function(){return this._offsetFromArc},set:function(t){this._offsetFromArc=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightOffset",{get:function(){return this._rightOffset},set:function(t){this._rightOffset=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftOffset",{get:function(){return this._leftOffset},set:function(t){this._leftOffset=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this._center},set:function(t){this._center.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){this._startAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._endAngle},set:function(t){this._endAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"characterSet",{get:function(){return this._characterSet},set:function(t){this._characterSet=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pitchAndFamily",{get:function(){return this._pitchAndFamily},set:function(t){this._pitchAndFamily=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isShx",{get:function(){return this._isShx},set:function(t){this._isShx=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBold",{get:function(){return this._isBold},set:function(t){this._isBold=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isItalic",{get:function(){return this._isItalic},set:function(t){this._isItalic=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnderlined",{get:function(){return this._isUnderlined},set:function(t){this._isUnderlined=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},set:function(t){this._alignment=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReverse",{get:function(){return this._isReverse},set:function(t){this._isReverse=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wizardFlag",{get:function(){return this._wizardFlag},set:function(t){this._wizardFlag=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textPosition",{get:function(){return this._textPosition},set:function(t){this._textPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textDirection",{get:function(){return this._textDirection},set:function(t){this._textDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcId",{get:function(){return this._arcId},set:function(t){this._arcId=t??""},enumerable:!1,configurable:!0}),e.prototype.applyRawTextColor=function(t){if(Number.isFinite(t)){var n=new je,i=t>>>24&255;if(t===0||i===193)n.setByBlock();else if(t===256||i===192||i===200)n.setByLayer();else if(t>0&&t<256)n.colorIndex=t;else if(i===194||i===195||i===197)n.setRGBValue(t&16777215);else return;this._rawTextColor=t,this.color=n}},e.prototype.rawTextColor=function(){if(this._rawTextColor!=null&&Number.isFinite(this._rawTextColor))return this._rawTextColor;if(this.color.isByBlock)return 0;if(this.color.isByLayer)return 256;var t=this.color.colorIndex;if(t!=null&&t>0&&t<256)return t;var n=this.color.RGB;return n!=null?(194<<24|n&16777215)>>0:256},e.prototype.glyphPlacements=function(){var t,n,i=Array.from(this._textString).filter(function(D){return D!=="\r"});if(this._isReverse&&i.reverse(),i.length===0)return[];for(var o=this._textSize>0?this._textSize:1,a=this._xScale>0?this._xScale:1,s=i.map(function(D){return D===" "||D===`
  10. `?o*.5*a:oa(D,o,a)}),l=s.reduce(function(D,z){return D+z},0),c=this._textPosition!==pp.OnConcaveSide,u=this._textDirection===Ph.OutwardFromCenter,h=Math.abs(this._radius)+(c?1:-1)*this._offsetFromArc,d=c===u?0:c?o:-o,p=Math.max(1e-6,h+d),f=this._endAngle-this._startAngle;f<=1e-9;)f+=zL;for(;f>zL;)f-=zL;var m=f*p,g=Math.max(0,m-this._leftOffset-this._rightOffset),y=Math.max(0,i.length-1),b=this._characterSpacing;this._alignment===du.Fit&&y>0&&(b=(g-l)/y);var v=l+b*y,x=this._leftOffset;this._alignment===du.Right?x=m-this._rightOffset-v:(this._alignment===du.Center||this._alignment===0)&&(x=this._leftOffset+(g-v)/2);for(var w=this.extrusionMatrix(),_=[],A=0;A<i.length;A++){var E=(t=s[A])!==null&&t!==void 0?t:0,S=(n=i[A])!==null&&n!==void 0?n:"";if(S!==`
  11. `){var M=x+E/2,T=this._startAngle+M/p,L=new k(this._center.x+p*Math.cos(T),this._center.y+p*Math.sin(T),this._center.z),O=T+Math.PI/2;this._textDirection===Ph.OutwardFromCenter&&(O+=Math.PI),_.push({text:S,position:L.applyMatrix4(w),rotation:this.rotationInWcs(O,w)}),x+=E+b}}return _},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t,n,i=new De,o=this.glyphPlacements();if(o.length===0)return i.expandByPoint(this._center),i;var a=this._textSize>0?this._textSize:1;try{for(var s=b7(o),l=s.next();!l.done;l=s.next()){var c=l.value,u=oa(c.text,a,this._xScale>0?this._xScale:1),h=Math.max(u,a)/2;i.expandByPoint(new k(c.position.x-h,c.position.y-h,c.position.z)),i.expandByPoint(new k(c.position.x+h,c.position.y+h,c.position.z))}}catch(d){t={error:d}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"text",properties:[{name:"contents",type:"string",editable:!0,accessor:{get:function(){return t.textString},set:function(n){t.textString=n}}},{name:"styleName",type:"string",editable:!0,accessor:{get:function(){return t.styleName},set:function(n){t.styleName=n}}},{name:"textHeight",type:"float",editable:!0,accessor:{get:function(){return t.textSize},set:function(n){t.textSize=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t,n){var i,o,a=this.glyphPlacements();if(a.length!==0){var s=this.getTextStyle(),l=this._textSize>0?this._textSize:1,c=[];try{for(var u=b7(a),h=u.next();!h.done;h=u.next()){var d=h.value,p=this._isUnderlined?"\\L".concat(d.text):d.text,f={text:p,height:l,width:1/0,widthFactor:this._xScale>0?this._xScale:1,position:d.position,rotation:d.rotation,drawingDirection:Cr.BOTTOM_TO_TOP,attachmentPoint:ut.BaselineCenter};c.push(t.mtext(f,s,n))}}catch(m){i={error:m}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return c.length===1?c[0]:t.group(c)}},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbArcAlignedText"),t.writeString(1,this._textString),t.writeString(2,this._fontName),t.writeString(3,this._bigFontName),t.writeString(7,this._styleName),t.writePoint3d(10,this._center),t.writeDouble(40,this._radius),t.writeDouble(41,this._xScale),t.writeDouble(42,this._textSize),t.writeDouble(43,this._characterSpacing),t.writeDouble(44,this._offsetFromArc),t.writeDouble(45,this._rightOffset),t.writeDouble(46,this._leftOffset),t.writeAngle(50,this._startAngle),t.writeAngle(51,this._endAngle),t.writeInt16(70,this._isReverse?1:0),t.writeInt16(71,this._textDirection),t.writeInt16(72,this._alignment),t.writeInt16(73,this._textPosition),t.writeInt16(74,this._isBold?1:0),t.writeInt16(75,this._isItalic?1:0),t.writeInt16(76,this._isUnderlined?1:0),t.writeInt16(77,this._characterSet),t.writeInt16(78,this._pitchAndFamily),t.writeInt16(79,this._isShx?1:0),t.writeInt32(90,this.rawTextColor()),t.writeVector3d(210,this._normal),t.writeInt16(280,this._wizardFlag),this._arcId&&t.writeHandle(330,this._arcId),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbArcAlignedText");for(var n=this._center.x,i=this._center.y,o=this._center.z,a=this._normal.x,s=this._normal.y,l=this._normal.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var c=t.readItem();if(!c)break;var u=Number(c.code),h=Number(c.value),d=c.value==null?"":String(c.value);switch(u){case 1:this._textString=d;break;case 2:this._fontName=d;break;case 3:this._bigFontName=d;break;case 7:this._styleName=d;break;case 10:n=h;break;case 20:i=h;break;case 30:o=h;break;case 40:this._radius=h;break;case 41:this._xScale=h;break;case 42:this._textSize=h;break;case 43:this._characterSpacing=h;break;case 44:this._offsetFromArc=h;break;case 45:this._rightOffset=h;break;case 46:this._leftOffset=h;break;case 50:this._startAngle=h;break;case 51:this._endAngle=h;break;case 70:this._isReverse=h!==0;break;case 71:this._textDirection=h;break;case 72:this._alignment=h;break;case 73:this._textPosition=h;break;case 74:this._isBold=h!==0;break;case 75:this._isItalic=h!==0;break;case 76:this._isUnderlined=h!==0;break;case 77:this._characterSet=h;break;case 78:this._pitchAndFamily=h;break;case 79:this._isShx=h!==0;break;case 90:this.applyRawTextColor(h);break;case 210:a=h;break;case 220:s=h;break;case 230:l=h;break;case 280:this._wizardFlag=h;break;case 330:this._arcId=d;break;default:break}}return this._center.set(n,i,o),this._normal.set(a,s,l),this},e.prototype.getTextStyle=function(){var t,n,i,o=(n=(t=this.database)===null||t===void 0?void 0:t.tables)===null||n===void 0?void 0:n.textStyleTable,a=(i=o?.resolveAt(this._styleName))!==null&&i!==void 0?i:o?.resolveAt(cn),s=a?UL({},a.textStyle):{name:this._styleName||cn,standardFlag:0,fixedTextHeight:0,widthFactor:this._xScale>0?this._xScale:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:this._textSize,font:this._fontName||"txt",bigFont:this._bigFontName};return this._fontName&&(s.font=this._fontName),this._bigFontName&&(s.bigFont=this._bigFontName),this._xScale>0&&(s.widthFactor=this._xScale),s},e.prototype.isPlanarInWcs=function(){return Math.abs(this._normal.x)<1e-10&&Math.abs(this._normal.y)<1e-10&&this._normal.z>0},e.prototype.extrusionMatrix=function(){return this.isPlanarInWcs()?new Ie:new Ie().setFromExtrusionDirection(this._normal)},e.prototype.rotationInWcs=function(t,n){if(this.isPlanarInWcs())return t;var i=new G(Math.cos(t),Math.sin(t),0);return i.transformDirection(n),Math.atan2(i.y,i.x)},e.typeName="ArcAlignedText",e})(bt)});var tse,Oi,ql,pu,u0=W(()=>{tt();Li();Fn();Gn();En();dp();tse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();(function(r){r[r.LEFT=0]="LEFT",r[r.CENTER=1]="CENTER",r[r.RIGHT=2]="RIGHT",r[r.ALIGNED=3]="ALIGNED",r[r.MIDDLE=4]="MIDDLE",r[r.FIT=5]="FIT"})(Oi||(Oi={}));(function(r){r[r.BASELINE=0]="BASELINE",r[r.BOTTOM=1]="BOTTOM",r[r.MIDDLE=2]="MIDDLE",r[r.TOP=3]="TOP"})(ql||(ql={}));pu=(function(r){tse(e,r);function e(){var t=r.call(this)||this;return t._hasAlignmentPoint=!1,t._generationFlag=0,t._normal=new G(0,0,1),t._textString="",t._height=0,t._thickness=1,t._position=new k,t._alignmentPoint=new k,t._rotation=0,t._oblique=0,t._horizontalMode=Oi.LEFT,t._verticalModel=ql.MIDDLE,t._styleName="",t._widthFactor=1,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"TEXT"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textString",{get:function(){return this._textString},set:function(t){this._textString=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(t){this._position.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alignmentPoint",{get:function(){return this._alignmentPoint},set:function(t){this._alignmentPoint.copy(t),this._hasAlignmentPoint=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasAlignmentPoint",{get:function(){return this._hasAlignmentPoint},set:function(t){this._hasAlignmentPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oblique",{get:function(){return this._oblique},set:function(t){this._oblique=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalMode",{get:function(){return this._horizontalMode},set:function(t){this._horizontalMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalMode",{get:function(){return this._verticalModel},set:function(t){this._verticalModel=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleName",{get:function(){return this._styleName},set:function(t){this._styleName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"widthFactor",{get:function(){return this._widthFactor},set:function(t){this._widthFactor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationFlag",{get:function(){return this._generationFlag},set:function(t){this._generationFlag=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBackward",{get:function(){return(this._generationFlag&2)!==0},set:function(t){this._generationFlag=t?this._generationFlag|2:this._generationFlag&-3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUpsideDown",{get:function(){return(this._generationFlag&4)!==0},set:function(t){this._generationFlag=t?this._generationFlag|4:this._generationFlag&-5},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=new De,n=this.resolveTextAnchor(),i=n.anchor,o=n.attachmentPoint,a=this.extrusionDrawingAdjust(),s=oa(this.textString,this.height,Math.abs(a.widthFactor));return CA(t,i,s,this.height,o,a.rotation)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return[this.pointToWcs(this._position)]},e.prototype.subMoveGripPointsAt=function(t,n){var i=dr(n,this._normal);return Tr(t,i,this._position),this._alignmentPoint.add(i),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){ne.Insertion===t&&o.push(this.pointToWcs(this._position))},e.prototype.transformBy=function(t){var n=this._position.clone(),i=this._position.clone().add(new G(Math.cos(this._rotation),Math.sin(this._rotation),0)),o=this._position.clone().add(new G(-Math.sin(this._rotation),Math.cos(this._rotation),0)),a=this._position.clone().add(new G(0,0,1));n.applyMatrix4(t),i.applyMatrix4(t),o.applyMatrix4(t),a.applyMatrix4(t);var s=new G(i).sub(n),l=new G(o).sub(n),c=new G(a).sub(n),u=l.length(),h=s.length(),d=c.length();this._position.copy(n),h>0&&(this._rotation=Math.atan2(s.y,s.x)),u>0&&(this._height*=u,h>0&&(this._widthFactor*=h/u)),d>0&&(this._thickness*=d);var p=this._alignmentPoint.clone();return p.applyMatrix4(t),this._alignmentPoint.copy(p),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"text",properties:[{name:"contents",type:"string",editable:!0,accessor:{get:function(){return t.textString},set:function(n){t.textString=n}}},{name:"styleName",type:"string",editable:!0,accessor:{get:function(){return t.styleName},set:function(n){t.styleName=n}}},{name:"textHeight",type:"float",editable:!0,accessor:{get:function(){return t.height},set:function(n){t.height=n}}},{name:"rotation",type:"float",editable:!0,accessor:{get:function(){return t.rotation},set:function(n){t.rotation=n}}},{name:"widthFactor",type:"float",editable:!0,accessor:{get:function(){return t.widthFactor},set:function(n){t.widthFactor=n}}},{name:"oblique",type:"float",editable:!0,accessor:{get:function(){return t.oblique},set:function(n){t.oblique=n}}}]},{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:function(){return t.position.x},set:function(n){t.position.x=n}}},{name:"positionY",type:"float",editable:!0,accessor:{get:function(){return t.position.y},set:function(n){t.position.y=n}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:function(){return t.position.z},set:function(n){t.position.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.getTextStyle=function(){var t=this.database.tables.textStyleTable.resolveAt(this.styleName);if(!t)throw new Error("No valid text style found in text style table.");return t.textStyle},e.prototype.subWorldDraw=function(t,n){var i=this.resolveTextAnchor(),o=i.anchor,a=i.attachmentPoint,s=this.extrusionDrawingAdjust(),l={text:this.textString,height:this.height,width:1/0,widthFactor:s.widthFactor,position:o,rotation:s.rotation,drawingDirection:Cr.BOTTOM_TO_TOP,attachmentPoint:a};return t.mtext(l,this.getTextStyle(),n)},e.prototype.pointToWcs=function(t){return Er(t,this._normal)},e.prototype.extrusionDrawingAdjust=function(){if(this._normal.x===0&&this._normal.y===0&&this._normal.z===1)return{rotation:this._rotation,widthFactor:this._widthFactor};if(this._normal.x===0&&this._normal.y===0&&this._normal.z<0)return{rotation:-this._rotation,widthFactor:-this._widthFactor};var t=new G(Math.cos(this._rotation),Math.sin(this._rotation),0);return t.transformDirection(new Ie().setFromExtrusionDirection(this._normal)),{rotation:Math.atan2(t.y,t.x),widthFactor:this._widthFactor}},e.prototype.resolveTextAnchor=function(){var t=this.resolveAttachmentPoint();if(t===ut.BaselineLeft)return{anchor:this.pointToWcs(this._position),attachmentPoint:t};var n=this._alignmentPoint,i=!this._hasAlignmentPoint||n.x===0&&n.y===0&&n.z===0;return i?{anchor:this.pointToWcs(this._position),attachmentPoint:ut.BaselineLeft}:{anchor:this.pointToWcs(n),attachmentPoint:t}},e.prototype.resolveAttachmentPoint=function(){var t=this._horizontalMode,n=this._verticalModel;if(t===Oi.MIDDLE)return ut.MiddleCenter;if(t===Oi.ALIGNED||t===Oi.FIT)return ut.BaselineLeft;switch(n){case ql.TOP:return t===Oi.CENTER?ut.TopCenter:t===Oi.RIGHT?ut.TopRight:ut.TopLeft;case ql.MIDDLE:return t===Oi.CENTER?ut.MiddleCenter:t===Oi.RIGHT?ut.MiddleRight:ut.MiddleLeft;case ql.BOTTOM:return t===Oi.CENTER?ut.BottomCenter:t===Oi.RIGHT?ut.BottomRight:ut.BottomLeft;case ql.BASELINE:default:return t===Oi.CENTER?ut.BaselineCenter:t===Oi.RIGHT?ut.BaselineRight:ut.BaselineLeft}},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbText"),t.writePoint3d(10,this.position),t.writeDouble(39,this.thickness),t.writeDouble(40,this.height),t.writeString(1,this.textString),t.writeAngle(50,this.rotation),t.writeDouble(41,this.widthFactor),t.writeAngle(51,this.oblique),t.writeString(7,this.styleName),this.generationFlag!==0&&t.writeInt16(71,this.generationFlag),t.writeInt16(72,this.horizontalMode),t.writeInt16(73,this.verticalMode),t.writePoint3d(11,this.alignmentPoint),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbText");for(var n=this.position.x,i=this.position.y,o=this.position.z,a=this.alignmentPoint.x,s=this.alignmentPoint.y,l=this.alignmentPoint.z,c=!1,u=this.normal.x,h=this.normal.y,d=this.normal.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var p=t.readItem();if(!p)break;var f=Number(p.code),m=Number(p.value);switch(f){case 10:n=m;break;case 20:i=m;break;case 30:o=m;break;case 11:a=m,c=!0;break;case 21:s=m,c=!0;break;case 31:l=m,c=!0;break;case 1:this.textString=String(p.value);break;case 7:this.styleName=String(p.value);break;case 39:this.thickness=m;break;case 40:this.height=m;break;case 41:this.widthFactor=m;break;case 50:this.rotation=xe.degToRad(m);break;case 51:this.oblique=xe.degToRad(m);break;case 71:this.generationFlag=m;break;case 72:this.horizontalMode=m;break;case 73:this.verticalMode=m;break;case 210:u=m;break;case 220:h=m;break;case 230:d=m;break;case 100:{var g=String(p.value);if(g==="AcDbText")break;return t.pushBackItem(p),this.finishTextDxfIn(n,i,o,a,s,l,c,u,h,d),this}default:break}}return this.finishTextDxfIn(n,i,o,a,s,l,c,u,h,d),this},e.prototype.finishTextDxfIn=function(t,n,i,o,a,s,l,c,u,h){this.position=new k(t,n,i),l&&!(o===0&&a===0&&s===0)?(this.alignmentPoint=new k(o,a,s),this._hasAlignmentPoint=!0):(this.alignmentPoint=new k(t,n,i),this._hasAlignmentPoint=!1);var d=new G(c,u,h);d.lengthSq()>0&&this.normal.copy(d.normalize())},e.typeName="Text",e})(bt)});var nse,on,kr,h0,TA=W(()=>{u0();nse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();(function(r){r[r.Invisible=1]="Invisible",r[r.Const=2]="Const",r[r.Verifiable=4]="Verifiable",r[r.Preset=8]="Preset"})(on||(on={}));(function(r){r[r.MultiLine=2]="MultiLine",r[r.ConstMultiLine=4]="ConstMultiLine"})(kr||(kr={}));h0=(function(r){nse(e,r);function e(){var t=r.call(this)||this;return t._flags=0,t._prompt="",t._mtextFlag=0,t._tag="",t._fieldLength=0,t._lockPositionInBlock=!1,t._isReallyLocked=!1,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"ATTDEF"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInvisible",{get:function(){return(this._flags&on.Invisible)!==0},set:function(t){t?this._flags|=on.Invisible:this._flags&=~on.Invisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prompt",{get:function(){return this._prompt},set:function(t){this._prompt=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConst",{get:function(){return(this._flags&on.Const)!==0},set:function(t){t?this._flags|=on.Const:this._flags&=~on.Const},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVerifiable",{get:function(){return(this._flags&on.Verifiable)!==0},set:function(t){t?this._flags|=on.Verifiable:this._flags&=~on.Verifiable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPreset",{get:function(){return(this._flags&on.Preset)!==0},set:function(t){t?this._flags|=on.Preset:this._flags&=~on.Preset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMTextAttribute",{get:function(){return(this._mtextFlag&kr.MultiLine)!==0},set:function(t){t?this._mtextFlag|=kr.MultiLine:this._mtextFlag&=~kr.MultiLine},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConstMTextAttribute",{get:function(){return(this._mtextFlag&kr.ConstMultiLine)!==0},set:function(t){t?this._mtextFlag|=kr.ConstMultiLine:this._mtextFlag&=~kr.ConstMultiLine},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tag",{get:function(){return this._tag},set:function(t){this._tag=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fieldLength",{get:function(){return this._fieldLength},set:function(t){this._fieldLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lockPositionInBlock",{get:function(){return this._lockPositionInBlock},set:function(t){this._lockPositionInBlock=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReallyLocked",{get:function(){return this._isReallyLocked},set:function(t){this._isReallyLocked=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mtext",{get:function(){return this._mtext},set:function(t){this._mtext=t,this.isMTextAttribute=t!=null},enumerable:!1,configurable:!0}),e.prototype.isLooseInDrawingSpace=function(){var t=this.database;if(!t)return!1;var n=this.getAttrWithoutException("ownerId");if(!n)return!1;var i=t.tables.blockTable.getIdAt(n);return i?i.isModelSapce||i.isPaperSapce:!1},e.prototype.resolveDisplayText=function(){if(!this.isInvisible){if(this.isLooseInDrawingSpace())return this.tag||this.textString;if(this.isConst||this.isConstMTextAttribute)return this.textString}},e.prototype.subWorldDraw=function(t,n){var i=this.resolveDisplayText();if(i!==void 0){if(i===this.textString)return r.prototype.subWorldDraw.call(this,t,n);var o=this.textString;this.textString=i;try{return r.prototype.subWorldDraw.call(this,t,n)}finally{this.textString=o}}},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbAttributeDefinition"),t.writeString(3,this.prompt),t.writeString(2,this.tag),t.writeInt16(70,this._flags),t.writeInt16(73,this.fieldLength),t.writeInt16(74,this.lockPositionInBlock?1:0),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbAttributeDefinition");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){if(String(n.value)==="AcDbAttributeDefinition")continue;for(;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData&&t.readItem(););break}var o=Number(n.value);switch(i){case 2:this.tag=String(n.value);break;case 3:this.prompt=String(n.value);break;case 70:this.isInvisible=(o&on.Invisible)!==0,this.isConst=(o&on.Const)!==0,this.isVerifiable=(o&on.Verifiable)!==0,this.isPreset=(o&on.Preset)!==0;break;case 71:this.isMTextAttribute=(o&kr.MultiLine)!==0,this.isConstMTextAttribute=(o&kr.ConstMultiLine)!==0;break;case 73:this.fieldLength=o;break;case 74:this.verticalMode=o;break;case 280:this.lockPositionInBlock=o!==0;break;case 340:break;default:break}}return this},e.typeName="AttDef",e})(pu)});function ise(r){return r!=null&&typeof r=="object"&&"blockTableRecord"in r}var rse,Zl,kA=W(()=>{TA();u0();rse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Zl=(function(r){rse(e,r);function e(){var t=r.call(this)||this;return t._flags=0,t._mtextFlag=0,t._tag="",t._fieldLength=0,t._lockPositionInBlock=!1,t._isReallyLocked=!1,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"ATTRIB"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolvedColor",{get:function(){var t;if(this.color.isByBlock){var n=(t=this.database)===null||t===void 0?void 0:t.tables.blockTable.getEntityById(this.ownerId);if(ise(n))return n.resolvedColor}return this.resolveStandardColor()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInvisible",{get:function(){return(this._flags&on.Invisible)!==0},set:function(t){t?this._flags|=on.Invisible:this._flags&=~on.Invisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConst",{get:function(){return(this._flags&on.Const)!==0},set:function(t){t?this._flags|=on.Const:this._flags&=~on.Const},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVerifiable",{get:function(){return(this._flags&on.Verifiable)!==0},set:function(t){t?this._flags|=on.Verifiable:this._flags&=~on.Verifiable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPreset",{get:function(){return(this._flags&on.Preset)!==0},set:function(t){t?this._flags|=on.Preset:this._flags&=~on.Preset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMTextAttribute",{get:function(){return(this._mtextFlag&kr.MultiLine)!==0},set:function(t){t?this._mtextFlag|=kr.MultiLine:this._mtextFlag&=~kr.MultiLine},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConstMTextAttribute",{get:function(){return(this._mtextFlag&kr.ConstMultiLine)!==0},set:function(t){t?this._mtextFlag|=kr.ConstMultiLine:this._mtextFlag&=~kr.ConstMultiLine},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tag",{get:function(){return this._tag},set:function(t){this._tag=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fieldLength",{get:function(){return this._fieldLength},set:function(t){this._fieldLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lockPositionInBlock",{get:function(){return this._lockPositionInBlock},set:function(t){this._lockPositionInBlock=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReallyLocked",{get:function(){return this._isReallyLocked},set:function(t){this._isReallyLocked=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mtext",{get:function(){return this._mtext},set:function(t){this._mtext=t,this.isMTextAttribute=t!=null},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbAttribute"),t.writeInt16(70,this.isInvisible?1:0),t.writeInt16(73,this.fieldLength),t.writeString(2,this.tag),t.writeInt16(74,this.isReallyLocked?1:0),this.mtext&&t.writeInt16(71,this.isMTextAttribute?1:0),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbAttribute");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){if(String(n.value)==="AcDbAttribute")continue;for(;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData&&t.readItem(););break}var o=Number(n.value);switch(i){case 2:this.tag=String(n.value);break;case 70:this.isInvisible=(o&on.Invisible)!==0,this.isConst=(o&on.Const)!==0,this.isVerifiable=(o&on.Verifiable)!==0,this.isPreset=(o&on.Preset)!==0;break;case 71:this.isMTextAttribute=(o&kr.MultiLine)!==0,this.isConstMTextAttribute=(o&kr.ConstMultiLine)!==0;break;case 73:this.fieldLength=o;break;case 74:this.verticalMode=o;break;case 280:this.lockPositionInBlock=o!==0;break;case 340:break;default:break}}return this},e.typeName="Attrib",e})(pu)});function hse(r){var e=r.childCount;return typeof e=="number"?e:Number.POSITIVE_INFINITY}function x7(r){var e=r.isCompacted;return e===!0}function dse(r,e){var t=hse(r);return t<cse?!1:t>=use?!0:e}function pse(r){var e=r.prepareCacheTemplate;typeof e=="function"&&e.call(r)}function HL(r,e){var t=r.userData;t.blockCacheKey=e}function fse(r){var e,t=(e=w7.pop())!==null&&e!==void 0?e:new je;return t.copy(r),t}function mse(r){w7.push(r)}var ose,ase,d0,sse,v7,Nr,IA,GL,lse,cse,use,w7,LA=W(()=>{zt();tt();$l();ose=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},ase=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},d0=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sse=function(){return{hits:0,misses:0,hitMs:0,missBuildMs:0,missCompactMs:0,cloneMs:0,setCloneMs:0,applyMs:0}},v7=function(){return{hits:0,misses:0,hitMs:0,missBuildMs:0,missCompactMs:0,cloneMs:0,setCloneMs:0,applyMs:0,topLevel:sse(),blockMisses:[]}},Nr=(function(){function r(){this._lruTotalBytes=0,this._retiredCompactedTemplates=[],this._blocks=new Map,this._lruBytes=new Map}return Object.defineProperty(r,"profileStats",{get:function(){return this._profileStats},enumerable:!1,configurable:!0}),r.resetProfile=function(){this._profileStats=v7(),this._drawDepth=0},Object.defineProperty(r,"instance",{get:function(){return this._instance||(this._instance=new r),this._instance},enumerable:!1,configurable:!0}),r.prototype.createKey=function(e,t){var n=t.toString();return!n&&t.isByColor&&(n="RGB:".concat(t.red,",").concat(t.green,",").concat(t.blue)),"".concat(e,"_").concat(n)},r.prototype.createCacheKey=function(e,t,n){return n?this.createKey(e,t):e},r.prototype.set=function(e,t){var n;if(this._blocks.set(e,t),r.lruEnabled){var i=(n=this._lruBytes.get(e))!==null&&n!==void 0?n:0,o=this.estimateTemplateBytes(t);this._lruBytes.set(e,o),this._lruTotalBytes+=o-i,this.enforceLruBudget()}return t},r.prototype.enforceLruBudget=function(){for(var e=r.lruMaxEntries;e>0&&this._blocks.size>e;)this.evictOldest();for(var t=r.lruMaxEstimatedBytes;t>0&&this._lruTotalBytes>t&&this._blocks.size>1;)this.evictOldest()},r.prototype.evictOldest=function(){var e,t,n=this._blocks.keys().next();if(!(n.done||n.value===void 0)){var i=n.value,o=this._blocks.get(i);this._blocks.delete(i),this._lruTotalBytes-=(e=this._lruBytes.get(i))!==null&&e!==void 0?e:0,this._lruBytes.delete(i),o&&(x7(o)?this._retiredCompactedTemplates.push(o):(t=o.dispose)===null||t===void 0||t.call(o))}},r.prototype.estimateTemplateBytes=function(e){for(var t,n,i=0,o=[e];o.length>0;){var a=o.pop();if(a!=null){if(a.geometry){var s=a.geometry.attributes;if(s)for(var l in s){var c=(t=s[l])===null||t===void 0?void 0:t.array;c&&(i+=c.byteLength)}var u=(n=a.geometry.index)===null||n===void 0?void 0:n.array;u&&(i+=u.byteLength)}var h=a.children;if(h)for(var d=0;d<h.length;d++)o.push(h[d])}}return i},r.prototype.peek=function(e){return this._blocks.get(e)},r.prototype.get=function(e){var t=this._blocks.get(e);if(t){if(r.lruEnabled&&(this._blocks.delete(e),this._blocks.set(e,t)),r.profiling){var n=performance.now(),i=this.maybeCompactTemplate(t,!0);if(i){var o=performance.now()-n;r._profileStats.missCompactMs+=o,r._drawDepth===1&&(r._profileStats.topLevel.missCompactMs+=o)}var a=performance.now(),s=t.fastDeepClone(),l=performance.now()-a;return r._profileStats.cloneMs+=l,r._drawDepth===1&&(r._profileStats.topLevel.cloneMs+=l),HL(s,e),s}this.maybeCompactTemplate(t,!0);var c=t.fastDeepClone();return HL(c,e),c}},r.prototype.has=function(e){return this._blocks.has(e)},r.prototype.clear=function(){var e;this._blocks.forEach(function(t){var n;(n=t.dispose)===null||n===void 0||n.call(t)}),this._blocks.clear(),this._lruBytes.clear(),this._lruTotalBytes=0,this._retiredCompactedTemplates.forEach(function(t){var n;(n=t.dispose)===null||n===void 0||n.call(t)}),this._retiredCompactedTemplates.length=0,(e=r.onCleared)===null||e===void 0||e.call(r)},r.prototype.prebuildAll=function(e,t,n){return ose(this,void 0,void 0,function(){var i,o,a,p,s,l,c,u,h,d,p,f,m,g,y,b,v;return ase(this,function(x){switch(x.label){case 0:i=[];try{for(o=d0(t),a=o.next();!a.done;a=o.next())p=a.value,!(!p||!p.name)&&(this.shouldSkipPrebuild(p)||i.push(p))}catch(w){g={error:w}}finally{try{a&&!a.done&&(y=o.return)&&y.call(o)}finally{if(g)throw g.error}}s=i.length,l=0,c=new je().setForeground(),u=new $s,x.label=1;case 1:x.trys.push([1,8,9,10]),h=d0(i),d=h.next(),x.label=2;case 2:return d.done?[3,7]:(p=d.value,f=this.createCacheKey(p.name,c,!1),this.has(f)||this.draw(e,p,c,[],!0),l++,n?[4,n(l,s,p.name)]:[3,4]);case 3:x.sent(),x.label=4;case 4:return[4,u.maybeYield(os)];case 5:x.sent(),x.label=6;case 6:return d=h.next(),[3,2];case 7:return[3,10];case 8:return m=x.sent(),b={error:m},[3,10];case 9:try{d&&!d.done&&(v=h.return)&&v.call(h)}finally{if(b)throw b.error}return[7];case 10:return[2]}})})},r.prototype.draw=function(e,t,n,i,o,a,s){var l,c,u;i===void 0&&(i=[]),o===void 0&&(o=!0);var h=r.profiling;h&&r._drawDepth++;var d=h&&r._drawDepth===1,p=r._profileStats,f=[];try{if(t!=null){var m=(u=n.RGB)!==null&&u!==void 0?u:0,g=t.name,y=void 0;if(g&&this.has(g))y=g;else if(g){var b=this.createKey(g,n);this.has(b)&&(y=b)}var v;if(y!==void 0){var x=h?performance.now():0;if(v=this.get(y),h){var w=performance.now()-x;p.hits++,p.hitMs+=w,d&&(p.topLevel.hits++,p.topLevel.hitMs+=w)}}else{var _=h?performance.now():0,A=!1,E=t.newIterator();try{for(var S=d0(E),M=S.next();!M.done;M=S.next()){var T=M.value;if(T.visibility)if(T.color.isByBlock){A=!0;var L=fse(T.color);try{n.isForeground?T.color.setForeground():T.color.setRGBValue(m),this.addEntity(T,f,e)}finally{T.color.copy(L),mse(L)}}else this.addEntity(T,f,e)}}catch(de){l={error:de}}finally{try{M&&!M.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}v=e.group(f);var O=0;h&&(O=performance.now()-_,p.missBuildMs+=O,d&&(p.topLevel.missBuildMs+=O));var D=0,z=!!o&&!!g&&!g.startsWith("*U");if(v&&z){var N=h?performance.now():0,J=this.maybeCompactTemplate(v,!1);h&&J&&(D=performance.now()-N,p.missCompactMs+=D,d&&(p.topLevel.missCompactMs+=D))}y=this.createCacheKey(g,n,A);var X=h?p.setCloneMs:0;if(v&&z){if(pse(v),this.set(y,v),h){var Q=performance.now();v=v.fastDeepClone();var w=performance.now()-Q;p.setCloneMs+=w,d&&(p.topLevel.setCloneMs+=w)}else v=v.fastDeepClone();HL(v,y)}h&&(p.misses++,d&&p.topLevel.misses++,p.blockMisses.push({blockName:g||"(unnamed)",buildMs:O,compactMs:D,setCloneMs:p.setCloneMs-X}))}var ce=h?performance.now():0;if(v&&a&&(IA.copy(a),v.applyMatrix(IA),s&&(s.x!=0||s.y!=0||s.z!=1)&&(GL.setFromExtrusionDirection(s),v.applyMatrix(GL),IA.premultiply(GL))),v&&i&&i.length>0){var H=a!=null?lse.copy(IA).invert():void 0;i.forEach(function(de){H&&de.applyMatrix(H),v.addChild(de)})}if(h){var w=performance.now()-ce;p.applyMs+=w,d&&(p.topLevel.applyMs+=w)}return v}else return e.group(f)}finally{h&&r._drawDepth--}},r.prototype.shouldSkipPrebuild=function(e){var t,n,i=e.name;if(rn.isModelSapceName(i)||rn.isPaperSapceName(i)||i.startsWith("*U")||this.blockHasByBlockColor(e))return!0;try{for(var o=d0(e.newIterator()),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.visibility)return!1}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!0},r.prototype.blockHasByBlockColor=function(e){var t,n;try{for(var i=d0(e.newIterator()),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.visibility&&a.color.isByBlock)return!0}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!1},r.prototype.addEntity=function(e,t,n){if(e.visibility){var i=e.worldDraw(n);i&&(this.attachEntityInfo(i,e),t.push(i))}},r.prototype.attachEntityInfo=function(e,t){e.objectId=t.objectId,e.ownerId=t.ownerId,e.layerName=t.layer,e.visible=t.visibility},r.prototype.maybeCompactTemplate=function(e,t){return!e.compactForInstancing||x7(e)||!dse(e,t)?!1:(e.compactForInstancing(),!0)},r.profiling=!1,r.lruEnabled=!0,r.lruMaxEntries=512,r.lruMaxEstimatedBytes=64*1024*1024,r._profileStats=v7(),r._drawDepth=0,r})(),IA=new Ie,GL=new Ie,lse=new Ie,cse=8,use=32,w7=[]});function Eh(r){return r?r.trim().toUpperCase().startsWith("*U"):!1}var fu,fp,cl,mp,WL,XL,YL,p0=W(()=>{fu="AcDbBlockRepresentation",fp="AcDbRepData",cl="ACAD_ENHANCEDBLOCK",mp="AcDbBlockRepBTag",WL="AcDbBlockRepETag",XL="AcDbDynamicBlockTrueName",YL="AcDbDynamicBlockGUID"});var gse,yse,bse,f0,$L=W(()=>{gr();gse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),yse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},bse=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},f0=(function(r){gse(e,r);function e(){var t=r.apply(this,bse([],yse(arguments),!1))||this;return t._blockId="",t}return Object.defineProperty(e.prototype,"blockId",{get:function(){return this._blockId},set:function(t){this._blockId=t??""},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeObjectId(340,this._blockId),this},e.prototype.dxfInFields=function(t){var n;for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbBlockRepresentationData");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var i=t.readItem();if(!i)break;var o=Number(i.code);if(o===100){t.pushBackItem(i);break}o===340&&(this._blockId=String((n=i.value)!==null&&n!==void 0?n:""))}return this},e})(Kt)});var vse,xse,wse,Wt,mu=W(()=>{gr();Qm();vse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),xse=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Wt=(function(r){vse(e,r);function e(t){var n=r.call(this)||this;return n.database=t,n.objectId=t.generateHandle(),n._recordsByName=new Map,n}return Object.defineProperty(e.prototype,"numEntries",{get:function(){return this._recordsByName.size},enumerable:!1,configurable:!0}),e.prototype.setAt=function(t,n){var i=this,o=this.database.transactionManager;if(o.strictMode&&!o.isRecording()&&!o.isApplyingUndoRedo())throw new Error("Cannot modify dictionary entries outside an active transaction.");var a=this.getAt(t);a&&(o.isRecording()&&o.recordRemove({type:"dictionary",dictionaryId:this.objectId,key:t},a),this.database.releaseObjectHandle(a)),n.database=this.database,this.database.commitObjectHandle(n,function(s){return i.hasId(s)}),n.ownerId=this.objectId,this._recordsByName.set(t,n),o.isRecording()&&o.recordAppend({type:"dictionary",dictionaryId:this.objectId,key:t},n),!o.isRecording()&&!o.isApplyingUndoRedo()&&this.database.notifyDictObjectSet(n,t)},e.prototype.remove=function(t){var n=this.getAt(t);return n?(this.removeStoredObject(n,t),!0):!1},e.prototype.removeId=function(t){var n=this.getIdAt(t);if(n){var i="";return this._recordsByName.forEach(function(o,a){o===n&&(i=a)}),this.removeStoredObject(n,i),!0}return!1},e.prototype.removeStoredObject=function(t,n){var i=this,o=this.database.transactionManager;if(o.strictMode&&!o.isRecording()&&!o.isApplyingUndoRedo())throw new Error("Cannot remove dictionary entries outside an active transaction.");o.isRecording()&&o.recordRemove({type:"dictionary",dictionaryId:this.objectId,key:n},t),this._recordsByName.forEach(function(a,s){a===t&&i._recordsByName.delete(s)}),this.database.releaseObjectHandle(t),n&&!o.isRecording()&&!o.isApplyingUndoRedo()&&this.database.notifyDictObjectErased(t,n)},e.prototype.removeAll=function(){var t=this;this._recordsByName.forEach(function(n,i){t.database.releaseObjectHandle(n),t.database.events.dictObjectErased.dispatch({database:t.database,object:n,key:i})}),this._recordsByName.clear()},e.prototype.has=function(t){return this._recordsByName.has(t.toUpperCase())},e.prototype.hasId=function(t){return this.getIdAt(t)!==void 0},e.prototype.getAt=function(t){return this._recordsByName.get(t)},e.prototype.getIdAt=function(t){var n=this.database.getObjectById(t);if(n){var i=n.getAttrWithoutException("ownerId");if(i===this.objectId)return n}},e.prototype.newIterator=function(){return new hs(this._recordsByName)},e.prototype.entries=function(){return this._recordsByName.entries()},e.prototype.dxfOutFields=function(t){var n,i;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbDictionary"),t.writeInt16(280,1),t.writeInt16(281,1);try{for(var o=xse(this._recordsByName),a=o.next();!a.done;a=o.next()){var s=wse(a.value,2),l=s[0],c=s[1];t.writeString(3,l),t.writeObjectId(350,c.objectId)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbDictionary");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}switch(i){case 3:case 350:case 340:case 360:break;case 280:case 281:break;default:break}}return this},e})(Kt)});var _se,gp,OA=W(()=>{Kb();$l();gu();p0();$L();mu();_se=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gp=(function(){function r(e){typeof e=="string"?(this._blockRefId=e,this._blockRef=void 0):(this._blockRef=e,this._blockRefId=e.objectId)}return r.isDynamicBlock=function(e,t){return new r(e).isDynamicBlock(t)},r.drawableBlockTableRecord=function(e){var t=new r(e);if(t.isDynamicBlock()){var n=t.anonymousBlockTableRecord();if(n&&e.database){var i=e.database.tables.blockTable.getIdAt(n);if(i)return i;var o=e.database.getObjectById(n);if(o instanceof rn)return o}}return e.blockTableRecord},r.prototype.blockId=function(){return this._blockRefId},r.prototype.isDynamicBlock=function(e){var t=this.resolveBlockRef(e);if(!t)return!1;if(this.getRepresentationData(t)||this.hasRepresentationDictionary(t))return!0;var n=t.blockTableRecord;return n?!!(this.getDynamicDefinitionIdFromBTag(n)||this.blockTableRecordIsEnhanced(n)):!1},r.prototype.anonymousBlockTableRecord=function(e){var t=this.resolveBlockRef(e);if(t&&this.isDynamicBlock(e)){var n=t.blockTableRecord;if(n&&(Eh(n.name)||this.getDynamicDefinitionIdFromBTag(n)!=null))return n.objectId}},r.prototype.dynamicBlockTableRecord=function(e){var t,n=this.resolveBlockRef(e);if(n){var i=(t=this.getRepresentationData(n))===null||t===void 0?void 0:t.blockId;if(i)return i;var o=n.blockTableRecord;if(o){var a=this.getDynamicDefinitionIdFromBTag(o);if(a)return a;if(this.blockTableRecordIsEnhanced(o))return o.objectId}}},r.prototype.resolveBlockRef=function(e){if(this._blockRef)return this._blockRef;var t=e??this.guessDatabase();if(t){var n=t.getObjectById(this._blockRefId);return n instanceof pn?n:void 0}},r.prototype.guessDatabase=function(){var e;return(e=this._blockRef)===null||e===void 0?void 0:e.database},r.prototype.getExtensionDictionary=function(e){var t=e.extensionDictionary;if(!(!t||!e.database)){var n=e.database.getObjectById(t);return n instanceof Wt?n:void 0}},r.prototype.hasRepresentationDictionary=function(e){var t=this.getExtensionDictionary(e);return t?t.getAt(fu)!=null||t.has(fu):!1},r.prototype.getRepresentationData=function(e){var t=this.getExtensionDictionary(e);if(t){var n=t.getAt(fu),i=n instanceof Wt?n:this.asDictionary(n);if(i){var o=i.getAt(fp);if(o instanceof f0)return o}}},r.prototype.asDictionary=function(e){if(e){if(e instanceof Wt)return e;if(e.database){var t=e.database.getObjectById(e.objectId);return t instanceof Wt?t:void 0}}},r.prototype.getDynamicDefinitionIdFromBTag=function(e){var t,n,i,o=e.getXData(mp);if(o)try{for(var a=_se(o),s=a.next();!s.done;s=a.next()){var l=s.value;if(Number(l.code)===Ki.ExtendedDataHandle){var c=String((i=l.value)!==null&&i!==void 0?i:"").trim();if(c)return c.toUpperCase()}}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},r.prototype.blockTableRecordIsEnhanced=function(e){var t=this.getExtensionDictionary(e);return t?t.getAt(cl)!=null||t.has(cl):!1},r})()});function or(r,e,t){var n=e?r.length:r.length-1;if(n<1||r.length<2)return[];for(var i=[],o=0;o<n;o++){var a=r[o],s=r[(o+1)%r.length];if(!RA(a,s)){var l=!e&&(o===0||o===n-1);i.push({kind:"line",line:new Yn(a,s),extent:"bounded",extendable:t??l})}}return i}function m0(r,e,t,n){var i,o=e?r.length:r.length-1;if(o<1||r.length<2)return[];for(var a=[],s=0;s<o;s++){var l=r[s],c=r[(s+1)%r.length],u=!e&&(s===0||s===o-1),h=u,d=(i=l.bulge)!==null&&i!==void 0?i:0;if(Math.abs(d)>Sse){var p=P7(new Ke(l,c,d),t,n,h);p&&a.push(p);continue}var f=yu(l.x,l.y,t,n),m=yu(c.x,c.y,t,n);RA(f,m)||a.push({kind:"line",line:new Yn(f,m),extent:"bounded",extendable:h})}return a}function M7(r,e,t){var n,i,o,a,s=[];try{for(var l=_7(r),c=l.next();!c.done;c=l.next()){var u=c.value;if(u instanceof Ot){s.push.apply(s,A7([],S7(m0(u.vertices,u.closed,e,t)),!1));continue}if(u instanceof ta)try{for(var h=(o=void 0,_7(u.curves)),d=h.next();!d.done;d=h.next()){var p=d.value,f=Ase(p,e,t);f&&s.push.apply(s,A7([],S7(f),!1))}}catch(m){o={error:m}}finally{try{d&&!d.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}}catch(m){n={error:m}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s}function DA(r,e){return r.map(function(t){return $S(t,e)})}function Ase(r,e,t){if(r instanceof fr){var n=yu(r.startPoint.x,r.startPoint.y,e,t),i=yu(r.endPoint.x,r.endPoint.y,e,t);return RA(n,i)?[]:[{kind:"line",line:new Yn(n,i),extent:"bounded",extendable:!1}]}if(r instanceof Ke){var o=P7(r,e,t,!1);return o?[o]:[]}if(r instanceof ko){var o=Mse(r,e,t,!1);return o?[o]:[]}if(r instanceof mr){var a=r.clone(),s=Pse(e,t);return s&&a.transform(s),[{kind:"spline",spline:a,extendable:!1}]}return[]}function P7(r,e,t,n){if(r.closed||Math.abs(r.deltaAngle-Ge)<1e-10){var i=yu(r.center.x,r.center.y,e,t);return{kind:"circArc",arc:new Pn(i,r.radius,0,Ge,t,Ea(t)),extendable:!1}}var o=yu(r.startPoint.x,r.startPoint.y,e,t),a=yu(r.endPoint.x,r.endPoint.y,e,t),s=yu(r.midPoint.x,r.midPoint.y,e,t),l=Pn.tryCreateByThreePoints(o,a,s);return l?{kind:"circArc",arc:l,extendable:n&&!l.closed}:RA(o,a)?null:{kind:"line",line:new Yn(o,a),extent:"bounded",extendable:n}}function Mse(r,e,t,n){var i=yu(r.center.x,r.center.y,e,t),o=new Ie().setFromExtrusionDirection(new G(t.x,t.y,t.z)),a=new G(Math.cos(r.rotation),Math.sin(r.rotation),0).transformDirection(o);if(a.lengthSq()===0)return null;var s=r.clockwise?r.endAngle:r.startAngle,l=r.clockwise?r.startAngle:r.endAngle,c=new yi(i,t,a,r.majorAxisRadius,r.minorAxisRadius,s,l);return{kind:"ellipseArc",arc:c,extendable:n&&!c.closed&&Math.abs(c.deltaAngle-Ge)>1e-10}}function yu(r,e,t,n){return Er({x:r,y:e,z:t},n)}function Pse(r,e){var t=Math.abs(e.x)<1e-10&&Math.abs(e.y)<1e-10&&Math.abs(e.z-1)<1e-10;if(t&&Math.abs(r)<1e-10)return null;var n=new Ie().setFromExtrusionDirection(new G(e.x,e.y,e.z));return Math.abs(r)<1e-10?n:n.multiply(new Ie().makeTranslation(0,0,r))}function RA(r,e){var t,n,i=r.x-e.x,o=r.y-e.y,a=((t=r.z)!==null&&t!==void 0?t:0)-((n=e.z)!==null&&n!==void 0?n:0);return i*i+o*o+a*a<1e-20}var _7,S7,A7,Sse,Di=W(()=>{tt();_7=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},S7=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},A7=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Sse=1e-10});var Ese,g0,Cse,Tse,pn,gu=W(()=>{tt();Qm();Fn();LA();OA();Gn();En();Di();ro();Ese=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),g0=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Tse=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},pn=(function(r){Ese(e,r);function e(t){var n=r.call(this)||this;return n._columnCount=1,n._rowCount=1,n._columnSpacing=0,n._rowSpacing=0,n._blockName=t??"",n._position=new k,n._rotation=0,n._normal=new G(0,0,1),n._scaleFactors=new k(1,1,1),n._attribs=new Map,n}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"INSERT"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(t){this._position.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleFactors",{get:function(){return this._scaleFactors},set:function(t){this._scaleFactors.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t).normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockName",{get:function(){return this._blockName},set:function(t){this._blockName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnCount",{get:function(){return this._columnCount},set:function(t){this._columnCount=Math.max(1,Math.floor(t)||1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowCount",{get:function(){return this._rowCount},set:function(t){this._rowCount=Math.max(1,Math.floor(t)||1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpacing",{get:function(){return this._columnSpacing},set:function(t){this._columnSpacing=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowSpacing",{get:function(){return this._rowSpacing},set:function(t){this._rowSpacing=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockTableRecord",{get:function(){if(this._blockName)return this.database.tables.blockTable.getAt(this._blockName)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawableBlockTableRecord",{get:function(){return gp.drawableBlockTableRecord(this)},enumerable:!1,configurable:!0}),e.prototype.appendAttributes=function(t){this._attribs.set(t.objectId,t),t.ownerId=this.objectId,this.syncAttributeDatabases()},e.prototype.syncAttributeDatabases=function(){var t=this;try{var n=this.database,i=new Map;this._attribs.forEach(function(o){o.database=n,n.commitObjectHandle(o),o.ownerId=t.objectId,i.set(o.objectId,o)}),this._attribs=i}catch{}},e.prototype.attributeIterator=function(){return new hs(this._attribs)},Object.defineProperty(e.prototype,"blockTransform",{get:function(){var t,n=this.drawableBlockTableRecord,i=(t=n?.origin)!==null&&t!==void 0?t:k.ORIGIN,o=new Ie().makeTranslation(-i.x,-i.y,-i.z),a=new Ie().makeScale(this._scaleFactors.x,this._scaleFactors.y,this._scaleFactors.z),s=new Ma().setFromAxisAngle(G.Z_AXIS,this._rotation),l=new Ie().makeRotationFromQuaternion(s),c=new Ie().makeTranslation(this._position.x,this._position.y,0);return new Ie().multiplyMatrices(c,l).multiply(a).multiply(o)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return[this._position]},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this._position),this},e.prototype.subGetOsnapPoints=function(t,n,i,o,a,s){var l=s??new Ie;ne.Insertion===t?o.push(this.getInsertionPoint(l)):a?this.subEntityGetOsnapPoints(t,n,i,o,a,l):this.collectBlockOsnapPoints(t,n,i,o,l)},e.prototype.transformBy=function(t){var n=new Ie().setFromExtrusionDirection(this._normal),i=new Ie().makeRotationZ(this._rotation),o=new Ie().multiplyMatrices(n,i),a=this._position.clone(),s=new k(this._scaleFactors.x,0,0).applyMatrix4(o).add(a),l=new k(0,this._scaleFactors.y,0).applyMatrix4(o).add(a),c=new k(0,0,this._scaleFactors.z).applyMatrix4(o).add(a);a.applyMatrix4(t),s.applyMatrix4(t),l.applyMatrix4(t),c.applyMatrix4(t);var u=new G(s).sub(a),h=new G(l).sub(a),d=new G(c).sub(a),p=new G().crossVectors(u,h);p.lengthSq()===0?p=this._normal.clone().transformDirection(t):p.normalize();var f=new Ie().setFromExtrusionDirection(p),m=f.clone().invert(),g=u.clone().applyMatrix4(m);return this._position.copy(a),this._normal.copy(p),this._rotation=Math.atan2(g.y,g.x),this._scaleFactors.set(u.length(),h.length(),d.length()),this._attribs.forEach(function(y){return y.transformBy(t)}),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this,n={type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"blockName",type:"float",editable:!1,accessor:{get:function(){return t._blockName}}},{name:"positionX",type:"float",editable:!0,accessor:{get:function(){return t.position.x},set:function(o){t.position.x=o}}},{name:"positionY",type:"float",editable:!0,accessor:{get:function(){return t.position.y},set:function(o){t.position.y=o}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:function(){return t.position.z},set:function(o){t.position.z=o}}},{name:"rotation",type:"float",editable:!0,accessor:{get:function(){return t.rotation},set:function(o){t.rotation=o}}},{name:"scaleFactorsX",type:"float",editable:!0,accessor:{get:function(){return t.scaleFactors.x},set:function(o){t.scaleFactors.x=o}}},{name:"scaleFactorsY",type:"float",editable:!0,accessor:{get:function(){return t.scaleFactors.y},set:function(o){t.scaleFactors.y=o}}},{name:"scaleFactorsZ",type:"float",editable:!0,accessor:{get:function(){return t.scaleFactors.z},set:function(o){t.scaleFactors.z=o}}},{name:"normalX",type:"float",editable:!0,accessor:{get:function(){return t.normal.x},set:function(o){t.normal.x=o}}},{name:"normalY",type:"float",editable:!0,accessor:{get:function(){return t.normal.y},set:function(o){t.normal.y=o}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:function(){return t.normal.z},set:function(o){t.normal.z=o}}}]}]};if(this._attribs.size>0){var i={groupName:"attribute",properties:[]};n.groups.push(i),this._attribs.forEach(function(o){i.properties.push({name:o.tag,type:"string",editable:!o.isConst,skipTranslation:!0,accessor:{get:function(){return o.textString},set:function(a){o.textString=a}}})})}return n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t,n,i=new De,o=this.drawableBlockTableRecord;if(o!=null){var a=o.newIterator();try{for(var s=g0(a),l=s.next();!l.done;l=s.next()){var c=l.value;i.union(c.geometricExtents)}}catch(h){t={error:h}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}var u=this.getFullInsertionTransform();return i.applyMatrix4(u),i},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t,n,i=this.drawableBlockTableRecord;if(i==null)return[];for(var o=[],a=Math.max(1,this.columnCount),s=Math.max(1,this.rowCount),l=0;l<s;l++)for(var c=0;c<a;c++){var u=new Ie().makeTranslation(c*this.columnSpacing,l*this.rowSpacing,0),h=new Ie().multiplyMatrices(this.getFullInsertionTransform(),u);try{for(var d=(t=void 0,g0(i.newIterator())),p=d.next();!p.done;p=d.next()){var f=p.value;o.push.apply(o,Tse([],Cse(DA(f.subGetIntersectCurves(),h)),!1))}}catch(m){t={error:m}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}}return o},e.prototype.subWorldDraw=function(t){var n=this.drawableBlockTableRecord;if(n!=null){var i=[];this._attribs.forEach(function(f){if(!f.isInvisible){var m=f.worldDraw(t);m&&i.push(m)}});var o=Math.max(1,this.columnCount),a=Math.max(1,this.rowCount);if(o===1&&a===1)return Nr.instance.draw(t,n,this.resolvedColor,i,!0,this.blockTransform,this._normal);for(var s=[],l=0;l<a;l++)for(var c=0;c<o;c++){var u=new Ie().makeTranslation(c*this.columnSpacing,l*this.rowSpacing,0),h=new Ie().multiplyMatrices(this.blockTransform,u),d=Nr.instance.draw(t,n,this.resolvedColor,c===0&&l===0?i:[],!0,h,this._normal);d&&s.push(d)}return t.group(s)}else{var p=t.group([]);return p}},e.prototype.dxfOut=function(t,n){var i,o;n===void 0&&(n=!1),r.prototype.dxfOut.call(this,t,n);var a=!1;try{for(var s=g0(this.attributeIterator()),l=s.next();!l.done;l=s.next()){var c=l.value;a=!0,t.writeStart("ATTRIB"),c.dxfOut(t,n)}}catch(u){i={error:u}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a&&(t.writeStart("SEQEND"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity")),this},e.prototype.collectBlockOsnapPoints=function(t,n,i,o,a){var s,l,c=this.drawableBlockTableRecord;if(c){var u=new Ie().multiplyMatrices(a,this.getFullInsertionTransform()),h=u.clone().invert(),d=new k(n).applyMatrix4(h),p=new k(i).applyMatrix4(h),f=[];try{for(var m=g0(c.newIterator()),g=m.next();!g.done;g=m.next()){var y=g.value,b=[];if(y instanceof e){y.subGetOsnapPoints(t,n,i,b,void 0,u);for(var v=0;v<b.length;v++)f.push(b[v]);continue}y.subGetOsnapPoints(t,d,p,b,void 0,u),b.forEach(function(w){return f.push(new k(w).applyMatrix4(u))})}}catch(w){s={error:w}}finally{try{g&&!g.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}if(f.length!==0)if(t===ne.Nearest||t===ne.Perpendicular||t===ne.Tangent){var x=yr(n,f);x&&o.push(x)}else for(var v=0;v<f.length;v++)o.push(f[v])}},e.prototype.subEntityGetOsnapPoints=function(t,n,i,o,a,s,l,c){var u,h;l===void 0&&(l=new Set);var d=u7(a),p=d.objectId,f=c===void 0?d.occurrence:c;if(p===this.objectId||l.has(this.objectId))return f;l.add(this.objectId);try{var m=this.drawableBlockTableRecord;if(m==null)return f;var g=new Ie().multiplyMatrices(s,this.getFullInsertionTransform()),y=g.clone().invert(),b=new k(n).applyMatrix4(y),v=new k(i).applyMatrix4(y);try{for(var x=g0(m.newIterator()),w=x.next();!w.done;w=x.next()){var _=w.value;if(_.objectId===p){if(f>0){f-=1;continue}var A=[];return _.subGetOsnapPoints(t,b,v,A,p,g),_ instanceof e?A.forEach(function(S){o.push(S.clone())}):A.forEach(function(S){o.push(new k(S).applyMatrix4(g))}),-1}if(_ instanceof e){var E=_.subEntityGetOsnapPoints(t,n,i,o,a,g,l,f);if(E<0)return-1;f=E}}}catch(S){u={error:S}}finally{try{w&&!w.done&&(h=x.return)&&h.call(x)}finally{if(u)throw u.error}}return f}finally{l.delete(this.objectId)}},e.prototype.getInsertionPoint=function(t){var n,i,o=(i=(n=this.drawableBlockTableRecord)===null||n===void 0?void 0:n.origin)!==null&&i!==void 0?i:k.ORIGIN,a=new Ie().multiplyMatrices(t,this.getFullInsertionTransform());return new k(o).applyMatrix4(a)},e.prototype.getFullInsertionTransform=function(){var t=new Ie().setFromExtrusionDirection(this._normal);return new Ie().multiplyMatrices(t,this.blockTransform)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbBlockReference"),t.writePoint3d(10,this.position),t.writeString(2,this.blockName),t.writeDouble(41,this.scaleFactors.x),t.writeDouble(42,this.scaleFactors.y),t.writeDouble(43,this.scaleFactors.z),t.writeAngle(50,this.rotation),this.columnCount>1&&t.writeInt16(70,this.columnCount),this.rowCount>1&&t.writeInt16(71,this.rowCount),this.columnSpacing!==0&&t.writeDouble(44,this.columnSpacing),this.rowSpacing!==0&&t.writeDouble(45,this.rowSpacing),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbBlockReference");for(var i=this.position.x,o=this.position.y,a=this.position.z,s=this.scaleFactors.x,l=this.scaleFactors.y,c=this.scaleFactors.z,u=xe.radToDeg(this.rotation),h=this.normal.x,d=this.normal.y,p=this.normal.z,f=this.columnCount,m=this.rowCount,g=this.columnSpacing,y=this.rowSpacing,b=function(){n.position=new k(i,o,a),n.scaleFactors=new k(s,l,c),n.rotation=xe.degToRad(u),n.normal.copy(new G(h,d,p)),n.columnCount=f>0?f:1,n.rowCount=m>0?m:1,n.columnSpacing=g,n.rowSpacing=y};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var v=t.readItem();if(!v)break;var x=Number(v.code),w=Number(v.value);switch(x){case 10:i=w;break;case 20:o=w;break;case 30:a=w;break;case 2:this.blockName=String(v.value);break;case 41:s=w;break;case 42:l=w;break;case 43:c=w;break;case 44:g=w;break;case 45:y=w;break;case 50:u=w;break;case 66:break;case 70:f=w;break;case 71:m=w;break;case 210:h=w;break;case 220:d=w;break;case 230:p=w;break;case 100:return t.pushBackItem(v),b(),this;default:break}}return b(),this},e.typeName="BlockReference",e})(bt)});var kse,Ise,Lse,Ose,hg,E7,C7,T7,Do,KL=W(()=>{tt();Fn();no();En();ro();kse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Ise=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Lse=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Ose=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hg=new G,E7=new G,C7=new k,T7=[0,Math.PI/2,Math.PI,Math.PI/2*3],Do=(function(r){kse(e,r);function e(t,n,i){i===void 0&&(i=G.Z_AXIS);var o=r.call(this)||this;if(o._geoData=null,o._thickness=0,t!==void 0&&n!==void 0){var a=Ea(i);o._geo=new Pn(t,n,0,Ge,i,a)}return o}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"CIRCLE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_geo",{get:function(){return this._geoData==null&&(this._geoData=new Pn(new k,1,0,Ge,G.Z_AXIS,G.X_AXIS)),this._geoData},set:function(t){this._geoData=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this._geo.center},set:function(t){this._geo.center=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this._geo.radius},set:function(t){this._geo.radius=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._geo.normal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this._geo.box},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return[{kind:"circArc",arc:this._geo.clone(),extendable:!1}]},Object.defineProperty(e.prototype,"closed",{get:function(){return this._geo.closed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this._geo.area},enumerable:!1,configurable:!0}),e.prototype.subGetOsnapPoints=function(t,n,i,o){switch(t){case ne.Center:case ne.Centroid:o.push(this._geo.center);break;case ne.Quadrant:o.push(this._geo.getPointAtAngle(0)),o.push(this._geo.getPointAtAngle(Math.PI/2)),o.push(this._geo.getPointAtAngle(Math.PI)),o.push(this._geo.getPointAtAngle(Math.PI/2*3));break;case ne.Nearest:{var a=this._geo.nearestPoint(n);o.push(a)}break;case ne.Tangent:{var s=this._geo.tangentPoints(n);o.push.apply(o,Lse([],Ise(s),!1));break}case ne.Perpendicular:{var l=this._geo.perpendicularPoints(n),c=yr(n,l);c&&o.push(c);break}default:break}},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"centerX",type:"float",editable:!0,accessor:{get:function(){return t.center.x},set:function(n){t.center.x=n}}},{name:"centerY",type:"float",editable:!0,accessor:{get:function(){return t.center.y},set:function(n){t.center.y=n}}},{name:"centerZ",type:"float",editable:!0,accessor:{get:function(){return t.center.z},set:function(n){t.center.z=n}}},{name:"radius",type:"float",editable:!0,accessor:{get:function(){return t.radius},set:function(n){t.radius=n}}},{name:"normalX",type:"float",editable:!0,accessor:{get:function(){return t.normal.x},set:function(n){t.normal.x=n}}},{name:"normalY",type:"float",editable:!0,accessor:{get:function(){return t.normal.y},set:function(n){t.normal.y=n}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:function(){return t.normal.z},set:function(n){t.normal.z=n}}},{name:"diameter",type:"float",editable:!1,accessor:{get:function(){return t._geo.radius*2}}},{name:"perimeter",type:"float",editable:!1,accessor:{get:function(){return t._geo.length}}},{name:"area",type:"float",editable:!1,accessor:{get:function(){return t.area}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t,n,i=new Array;i.push(this.center);try{for(var o=Ose(T7),a=o.next();!a.done;a=o.next()){var s=a.value;i.push(this._geo.getPointAtAngle(s))}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){i.moveGripAt(o,n)}),this},e.prototype.transformBy=function(t){return this._geo.transform(t),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){return t.circularArc(this._geo)},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t);var n=dr(this.center,this.normal);return t.writeSubclassMarker("AcDbCircle"),t.writePoint3d(10,n),t.writeDouble(40,this.radius),this.thickness!==0&&t.writeDouble(39,this.thickness),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbCircle");for(var n=0,i=0,o=0,a=this.radius,s=this.normal.x,l=this.normal.y,c=this.normal.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var u=t.readItem();if(!u)break;var h=Number(u.code),d=Number(u.value);switch(h){case 10:n=d;break;case 20:i=d;break;case 30:o=d;break;case 40:a=d;break;case 39:this.thickness=d;break;case 210:s=d;break;case 220:l=d;break;case 230:c=d;break;default:break}}return this.applyDxfInGeometry(n,i,o,a,s,l,c),this},e.prototype.applyDxfInGeometry=function(t,n,i,o,a,s,l){hg.set(a,s,l),hg.lengthSq()>0&&hg.normalize(),fh(E7,hg),Wd(C7,{x:t,y:n,z:i},hg),this._geo=new Pn(C7,o,0,Ge,hg,E7)},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.center,i=this.radius;return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))>=i?1:-1},e.prototype.createOffsetCurve=function(t){var n=this._geo.offset(t);return n?new e(n.center,n.radius,n.normal):null},e.prototype.moveGripAt=function(t,n){var i,o;switch(t){case 0:this.transformBy(Ie.makeTranslation(n));break;case 1:case 2:case 3:case 4:{var a=T7[t-1],s=this._geo.getPointAtAngle(a),l=new k(s.x+n.x,s.y+n.y,((i=s.z)!==null&&i!==void 0?i:0)+((o=n.z)!==null&&o!==void 0?o:0)),c=l.distanceTo(this.center);c>0&&(this.radius=c);break}default:break}},e.typeName="Circle",e})(vn)});var Dse,k7,Rse,Bse,y0,Jl,qL=W(()=>{tt();Fn();no();En();ro();Dse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),k7=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Bse=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},y0=[0,Math.PI/2,Math.PI,Math.PI/2*3],Jl=(function(r){Dse(e,r);function e(t,n,i,o,a,s,l){var c=r.call(this)||this;return c._geoData=null,t!==void 0&&n!==void 0&&i!==void 0&&o!==void 0&&a!==void 0&&s!==void 0&&l!==void 0&&(c._geo=new yi(t,n,i,o,a,s,l)),c}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"ELLIPSE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_geo",{get:function(){return this._geoData==null&&(this._geoData=new yi(new k,G.Z_AXIS,G.X_AXIS,1,1,0,Math.PI*2)),this._geoData},set:function(t){this._geoData=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this._geo.center},set:function(t){this._geo.center=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"majorAxis",{get:function(){return this._geo.majorAxis},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"majorAxisRadius",{get:function(){return this._geo.majorAxisRadius},set:function(t){this._geo.majorAxisRadius=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minorAxisRadius",{get:function(){return this._geo.minorAxisRadius},set:function(t){this._geo.minorAxisRadius=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._geo.startAngle},set:function(t){this._geo.startAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._geo.endAngle},set:function(t){this._geo.endAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._geo.normal},set:function(t){this._geo.normal=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this._geo.box},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return[{kind:"ellipseArc",arc:this._geo.clone(),extendable:!this.closed}]},Object.defineProperty(e.prototype,"closed",{get:function(){return this._geo.closed||Math.abs(this._geo.deltaAngle-Ge)<1e-10},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this._geo.area},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t,n,i=new Array;if(i.push(this._geo.center),this.closed)try{for(var o=k7(y0),a=o.next();!a.done;a=o.next()){var s=a.value;i.push(this._geo.getPointAtAngle(s))}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}else i.push(this._geo.startPoint),i.push(this._geo.endPoint);return i},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){i.moveGripAt(o,n)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a,s;switch(t){case ne.EndPoint:this.closed||(o.push(this._geo.startPoint),o.push(this._geo.endPoint));break;case ne.MidPoint:this.closed||o.push(this._geo.midPoint);break;case ne.Center:case ne.Centroid:o.push(this._geo.center);break;case ne.Quadrant:if(this.closed)try{for(var l=k7(y0),c=l.next();!c.done;c=l.next()){var u=c.value;o.push(this._geo.getPointAtAngle(u))}}catch(p){a={error:p}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}break;case ne.Nearest:o.push(this._geo.nearestPoint(n));break;case ne.Tangent:o.push.apply(o,Bse([],Rse(this._geo.tangentPoints(n)),!1));break;case ne.Perpendicular:{var h=this._geo.perpendicularPoints(n),d=yr(n,h);d&&o.push(d);break}default:break}},e.prototype.transformBy=function(t){return this._geo.transform(t),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"centerX",type:"float",editable:!0,accessor:{get:function(){return t.center.x},set:function(n){t.center.x=n}}},{name:"centerY",type:"float",editable:!0,accessor:{get:function(){return t.center.y},set:function(n){t.center.y=n}}},{name:"centerZ",type:"float",editable:!0,accessor:{get:function(){return t.center.z},set:function(n){t.center.z=n}}},{name:"majorAxisRadius",type:"float",editable:!0,accessor:{get:function(){return t.majorAxisRadius},set:function(n){t.center.x=n}}},{name:"minorAxisRadius",type:"float",editable:!0,accessor:{get:function(){return t.minorAxisRadius},set:function(n){t.minorAxisRadius=n}}},{name:"startAngle",type:"float",editable:!0,accessor:{get:function(){return t.startAngle},set:function(n){t.startAngle=n}}},{name:"endAngle",type:"float",editable:!0,accessor:{get:function(){return t.endAngle},set:function(n){t.endAngle=n}}},{name:"normalX",type:"float",editable:!0,accessor:{get:function(){return t.normal.x},set:function(n){t.normal.x=n}}},{name:"normalY",type:"float",editable:!0,accessor:{get:function(){return t.normal.y},set:function(n){t.normal.y=n}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:function(){return t.normal.z},set:function(n){t.normal.z=n}}},{name:"length",type:"float",editable:!1,accessor:{get:function(){return t._geo.length}}},{name:"area",type:"float",editable:!1,accessor:{get:function(){return t.area}}}]}]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){return t.ellipticalArc(this._geo)},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbEllipse"),t.writePoint3d(10,this.center);var n=this._geo.majorAxis,i=this.majorAxisRadius;return t.writePoint3d(11,{x:n.x*i,y:n.y*i,z:n.z*i}),t.writeVector3d(210,this.normal),t.writeDouble(40,this.minorAxisRadius/this.majorAxisRadius),t.writeDouble(41,this.startAngle),t.writeDouble(42,this.endAngle),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbEllipse");for(var n=this.center.x,i=this.center.y,o=this.center.z,a=this.majorAxis.x*this.majorAxisRadius,s=this.majorAxis.y*this.majorAxisRadius,l=this.majorAxis.z*this.majorAxisRadius,c=this.normal.x,u=this.normal.y,h=this.normal.z,d=this.majorAxisRadius>0?this.minorAxisRadius/this.majorAxisRadius:1,p=this.startAngle,f=this.endAngle;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var m=t.readItem();if(!m)break;var g=Number(m.code),y=Number(m.value);switch(g){case 10:n=y;break;case 20:i=y;break;case 30:o=y;break;case 11:a=y;break;case 21:s=y;break;case 31:l=y;break;case 210:c=y;break;case 220:u=y;break;case 230:h=y;break;case 40:d=y;break;case 41:p=y;break;case 42:f=y;break;default:break}}return this.applyDxfInGeometry(n,i,o,a,s,l,c,u,h,d,p,f),this},e.prototype.applyDxfInGeometry=function(t,n,i,o,a,s,l,c,u,h,d,p){var f=Math.hypot(o,a,s)||1;this._geo=new yi({x:t,y:n,z:i},{x:l,y:c,z:u},{x:o,y:a,z:s},f,f*h,d,p)},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.center,i=t.x-n.x,o=t.y-n.y,a=this.majorAxis,s=Math.hypot(a.x,a.y)||1,l=this.minorAxisRadius/this.majorAxisRadius*s||1,c=a.x/s,u=a.y/s,h=-u,d=c,p=i*c+o*u,f=i*h+o*d;return Math.pow(p/s,2)+Math.pow(f/l,2)>=1?1:-1},e.prototype.moveGripAt=function(t,n){var i,o,a,s;switch(t){case 0:this.transformBy(Ie.makeTranslation(n));break;case 1:if(this.closed)this.moveQuadrantGripAt(y0[0],n);else{var l=this._geo.startPoint;this._geo.startAngle=To(this._geo.center,{x:l.x+n.x,y:l.y+n.y,z:((i=l.z)!==null&&i!==void 0?i:0)+((o=n.z)!==null&&o!==void 0?o:0)},this._geo.normal)}break;case 2:if(this.closed)this.moveQuadrantGripAt(y0[1],n);else{var l=this._geo.endPoint;this._geo.endAngle=To(this._geo.center,{x:l.x+n.x,y:l.y+n.y,z:((a=l.z)!==null&&a!==void 0?a:0)+((s=n.z)!==null&&s!==void 0?s:0)},this._geo.normal)}break;case 3:case 4:this.closed&&this.moveQuadrantGripAt(y0[t-1],n);break;default:break}},e.prototype.moveQuadrantGripAt=function(t,n){var i,o,a,s,l=this._geo.getPointAtAngle(t),c=new k(l.x+n.x,l.y+n.y,((i=l.z)!==null&&i!==void 0?i:0)+((o=n.z)!==null&&o!==void 0?o:0)),u=this._geo.center,h=c.x-u.x,d=c.y-u.y,p=((a=c.z)!==null&&a!==void 0?a:0)-((s=u.z)!==null&&s!==void 0?s:0),f=t===0||t===Math.PI?this._geo.majorAxis:this._geo.minorAxis,m=h*f.x+d*f.y+p*f.z,g=Math.abs(m);g<=0||(t===0||t===Math.PI?this.majorAxisRadius=g:this.minorAxisRadius=g)},e.prototype.createOffsetCurve=function(t){var n=this._geo.offset(t);return n?new e(n.center,n.normal,n.majorAxis,n.majorAxisRadius,n.minorAxisRadius,n.startAngle,n.endAngle):null},e.typeName="Ellipse",e})(vn)});var Fse,Nse,zse,b0,ZL=W(()=>{tt();Gn();En();Di();ro();Fse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Nse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},zse=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},b0=(function(r){Fse(e,r);function e(){var t=r.call(this)||this;return t._vertices=[new k,new k,new k],t._edgeInvisibilities=0,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"3DFACE"},enumerable:!1,configurable:!0}),e.prototype.getVertexAt=function(t){return t<0?this._vertices[0]:t>=this._vertices.length?this._vertices[this._vertices.length-1]:this._vertices[t]},e.prototype.setVertexAt=function(t,n){if(t<0&&this._vertices[0].copy(n),t>=3)return this._vertices.length===3&&this._vertices.push(new k),this._vertices[3].copy(n);this._vertices[t].copy(n)},e.prototype.setEdgeInvisibilities=function(t){this._edgeInvisibilities=t},e.prototype.isEdgeVisibleAt=function(t){if(t<0||t>3)throw new Error("Index out of range");return(this._edgeInvisibilities&1<<t)===0},e.prototype.makeEdgeInvisibleAt=function(t){if(t<0||t>3)throw new Error("Index out of range");this._edgeInvisibilities=this._edgeInvisibilities|1<<t},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return new De().setFromPoints(this._vertices)},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return or(this._vertices,!0)},Object.defineProperty(e.prototype,"area",{get:function(){var t=[this.getVertexAt(0),this.getVertexAt(1),this.getVertexAt(2)],n=this.getVertexAt(3);return(n.x!==t[2].x||n.y!==t[2].y||n.z!==t[2].z)&&t.push(n),Mm(t)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push.apply(t,zse([],Nse(this._vertices),!1)),t},e.prototype.subMoveGripPointsAt=function(t,n){return fs(t,n,this._vertices),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){Mh(this._vertices,!0,t,n,o)},e.prototype.transformBy=function(t){return this._vertices.forEach(function(n){return n.applyMatrix4(t)}),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineSegments"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){for(var n=this._vertices.length,i=new Float32Array(n*3),o=new Uint16Array(n*2),a=0;a<n;a++)i[a*3]=this._vertices[a].x,i[a*3+1]=this._vertices[a].y,i[a*3+2]=this._vertices[a].z,this.isEdgeVisibleAt(a)&&(o[a*2]=a,o[a*2+1]=(a+1)%4);return t.lineSegments(i,3,o)},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t);var n=this.getVertexAt(0),i=this.getVertexAt(1),o=this.getVertexAt(2),a=this.getVertexAt(3);t.writeSubclassMarker("AcDbFace"),t.writePoint3d(10,n),t.writePoint3d(11,i),t.writePoint3d(12,o),t.writePoint3d(13,a);for(var s=0,l=0;l<4;++l)this.isEdgeVisibleAt(l)||(s|=1<<l);return t.writeInt16(70,s),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbFace");for(var i=[0,1,2,3].map(function(c){var u=n._vertices[c];return u?{x:u.x,y:u.y,z:u.z}:{x:0,y:0,z:0}}),o=this._edgeInvisibilities;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var a=t.readItem();if(!a)break;var s=Number(a.code),l=Number(a.value);switch(s){case 10:case 11:case 12:case 13:i[s-10].x=l;break;case 20:case 21:case 22:case 23:i[s-20].y=l;break;case 30:case 31:case 32:case 33:i[s-30].z=l;break;case 70:o=l;break;default:break}}return i.forEach(function(c,u){return n.setVertexAt(u,c)}),this._edgeInvisibilities=o,this},e.typeName="Face",e})(bt)});var ar,v0=W(()=>{(function(r){r[r.DecimalDegrees=0]="DecimalDegrees",r[r.DegreesMinutesSeconds=1]="DegreesMinutesSeconds",r[r.Gradians=2]="Gradians",r[r.Radians=3]="Radians",r[r.SurveyorsUnits=4]="SurveyorsUnits"})(ar||(ar={}))});var Cn,x0=W(()=>{(function(r){r[r.Scientific=1]="Scientific",r[r.Decimal=2]="Decimal",r[r.Engineering=3]="Engineering",r[r.Architectural=4]="Architectural",r[r.Fractional=5]="Fractional",r[r.WindowsDesktop=6]="WindowsDesktop"})(Cn||(Cn={}))});function I7(r){return r==Ft.Millimeters||r==Ft.Centimeters||r==Ft.Meters||r==Ft.Kilometers||r==Ft.Nanometers||r==Ft.Microns||r==Ft.Decimeters||r==Ft.Dekameters||r==Ft.Hectometers||r==Ft.Gigameters}function L7(r){return r==Ft.Inches||r==Ft.Feet||r==Ft.Miles||r==Ft.Microinches||r==Ft.Mils||r==Ft.Yards||r==Ft.USSurveyFeet}var Ft,w0=W(()=>{(function(r){r[r.Undefined=0]="Undefined",r[r.Inches=1]="Inches",r[r.Feet=2]="Feet",r[r.Miles=3]="Miles",r[r.Millimeters=4]="Millimeters",r[r.Centimeters=5]="Centimeters",r[r.Meters=6]="Meters",r[r.Kilometers=7]="Kilometers",r[r.Microinches=8]="Microinches",r[r.Mils=9]="Mils",r[r.Yards=10]="Yards",r[r.Angstroms=11]="Angstroms",r[r.Nanometers=12]="Nanometers",r[r.Microns=13]="Microns",r[r.Decimeters=14]="Decimeters",r[r.Dekameters=15]="Dekameters",r[r.Hectometers=16]="Hectometers",r[r.Gigameters=17]="Gigameters",r[r.Astronomical=18]="Astronomical",r[r.LightYears=19]="LightYears",r[r.Parsecs=20]="Parsecs",r[r.USSurveyFeet=21]="USSurveyFeet",r[r.USSurveyInch=22]="USSurveyInch",r[r.USSurveyYard=23]="USSurveyYard",r[r.USSurveyMile=24]="USSurveyMile",r[r.Max=24]="Max"})(Ft||(Ft={}))});var oe,JL,yp=W(()=>{oe={ACADVER:"ACADVER",ANGBASE:"ANGBASE",ANGDIR:"ANGDIR",AUNITS:"AUNITS",AUPREC:"AUPREC",CECOLOR:"CECOLOR",CELTSCALE:"CELTSCALE",CELTYPE:"CELTYPE",CELWEIGHT:"CELWEIGHT",CETRANSPARENCY:"CETRANSPARENCY",CLAYER:"CLAYER",CMLEADERSTYLE:"CMLEADERSTYLE",CMLSCALE:"CMLSCALE",CMLSTYLE:"CMLSTYLE",COLORTHEME:"COLORTHEME",COMPAREHATCH:"COMPAREHATCH",COMPAREPROPS:"COMPAREPROPS",COMPARERCMARGIN:"COMPARERCMARGIN",COMPARETEXT:"COMPARETEXT",COMPARETOLERANCE:"COMPARETOLERANCE",DYNMODE:"DYNMODE",DYNPROMPT:"DYNPROMPT",DWGNAME:"DWGNAME",EXTMAX:"EXTMAX",EXTMIN:"EXTMIN",GRIPCOLOR:"GRIPCOLOR",GRIPHOT:"GRIPHOT",GRIPOBJLIMIT:"GRIPOBJLIMIT",GRIPS:"GRIPS",GRIPSIZE:"GRIPSIZE",HPANG:"HPANG",HPASSOC:"HPASSOC",HPBACKGROUNDCOLOR:"HPBACKGROUNDCOLOR",HPCOLOR:"HPCOLOR",HPDOUBLE:"HPDOUBLE",HPISLANDDETECTION:"HPISLANDDETECTION",HPLAYER:"HPLAYER",HPNAME:"HPNAME",HPSCALE:"HPSCALE",HPSEPARATE:"HPSEPARATE",HPTRANSPARENCY:"HPTRANSPARENCY",INSUNITS:"INSUNITS",LOGINNAME:"LOGINNAME",LTSCALE:"LTSCALE",LUNITS:"LUNITS",LUPREC:"LUPREC",LWDISPLAY:"LWDISPLAY",MEASUREMENT:"MEASUREMENT",MEASUREMENTCOLOR:"MEASUREMENTCOLOR",MODELBKCOLOR:"MODELBKCOLOR",OSMODE:"OSMODE",ORTHOMODE:"ORTHOMODE",OPENPROF:"OPENPROF",PAPERBKCOLOR:"PAPERBKCOLOR",PDMODE:"PDMODE",PDSIZE:"PDSIZE",PICKBOX:"PICKBOX",POLARADDANG:"POLARADDANG",POLARMODE:"POLARMODE",POLARANG:"POLARANG",SHORTCUTMENU:"SHORTCUTMENU",TEXTSTYLE:"TEXTSTYLE",DIMSTYLE:"DIMSTYLE",UNITMODE:"UNITMODE"},JL=Object.freeze(Object.values(oe))});function Vse(){try{var r=typeof process<"u"&&process.env?process.env:void 0;if(!r)return"";var e=r.USERNAME||r.USER||r.LOGNAME||"";return typeof e=="string"?e.trim():""}catch{return""}}var BA,Use,jse,gt,Ql=W(()=>{zt();Li();v0();bi();x0();w0();yp();BA=function(){return BA=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},BA.apply(this,arguments)},Use=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},jse=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};gt=(function(){function r(){this.registry=new Map,this.cache=new Map,this.events={sysVarChanged:new wt},this.registerVar({name:oe.ANGBASE,type:"number",isDbVar:!0,defaultValue:0}),this.registerVar({name:oe.ANGDIR,type:"number",isDbVar:!0,defaultValue:0}),this.registerVar({name:oe.AUNITS,type:"number",isDbVar:!0,defaultValue:ar.DecimalDegrees}),this.registerVar({name:oe.AUPREC,type:"number",isDbVar:!0,defaultValue:0}),this.registerVar({name:oe.CECOLOR,type:"color",isDbVar:!0,defaultValue:new je(Be.ByLayer)}),this.registerVar({name:oe.CELTSCALE,type:"number",isDbVar:!0,defaultValue:-1}),this.registerVar({name:oe.CELTYPE,type:"string",isDbVar:!0,defaultValue:Vn}),this.registerVar({name:oe.CELWEIGHT,type:"number",isDbVar:!0,defaultValue:$r.ByLayer}),this.registerVar({name:oe.CETRANSPARENCY,type:"transparency",isDbVar:!0,defaultValue:new Mn}),this.registerVar({name:oe.CLAYER,type:"string",isDbVar:!0,defaultValue:"0"}),this.registerVar({name:oe.CMLEADERSTYLE,type:"string",isDbVar:!0,defaultValue:Oo}),this.registerVar({name:oe.CMLSCALE,type:"number",isDbVar:!0,defaultValue:1}),this.registerVar({name:oe.CMLSTYLE,type:"string",isDbVar:!0,defaultValue:Lo}),this.registerVar({name:oe.COLORTHEME,type:"number",isDbVar:!1,defaultValue:0}),this.registerVar({name:oe.COMPAREHATCH,type:"number",isDbVar:!0,defaultValue:yh}),this.registerVar({name:oe.COMPAREPROPS,type:"number",isDbVar:!1,defaultValue:r0}),this.registerVar({name:oe.COMPARERCMARGIN,type:"number",isDbVar:!0,defaultValue:bh}),this.registerVar({name:oe.COMPARETEXT,type:"number",isDbVar:!0,defaultValue:vh}),this.registerVar({name:oe.COMPARETOLERANCE,type:"number",isDbVar:!0,defaultValue:xh}),this.registerVar({name:oe.DYNMODE,type:"number",isDbVar:!1,defaultValue:3}),this.registerVar({name:oe.DYNPROMPT,type:"boolean",isDbVar:!1,defaultValue:!0}),this.registerVar({name:oe.DWGNAME,type:"string",isDbVar:!0,readOnly:!0,defaultValue:"Drawing1.dwg"}),this.registerVar({name:oe.GRIPCOLOR,type:"number",isDbVar:!1,defaultValue:e0}),this.registerVar({name:oe.GRIPHOT,type:"number",isDbVar:!1,defaultValue:t0}),this.registerVar({name:oe.GRIPOBJLIMIT,type:"number",isDbVar:!1,defaultValue:100}),this.registerVar({name:oe.GRIPS,type:"number",isDbVar:!1,defaultValue:2}),this.registerVar({name:oe.GRIPSIZE,type:"number",isDbVar:!1,defaultValue:n0}),this.registerVar({name:oe.HPANG,type:"number",isDbVar:!1,defaultValue:0}),this.registerVar({name:oe.HPASSOC,type:"number",isDbVar:!1,defaultValue:1}),this.registerVar({name:oe.HPBACKGROUNDCOLOR,type:"color",isDbVar:!0,defaultValue:new je(Be.None)}),this.registerVar({name:oe.HPCOLOR,type:"color",isDbVar:!0,defaultValue:new je(Be.ByLayer)}),this.registerVar({name:oe.HPDOUBLE,type:"number",isDbVar:!1,defaultValue:0}),this.registerVar({name:oe.HPISLANDDETECTION,type:"number",isDbVar:!1,defaultValue:1}),this.registerVar({name:oe.HPLAYER,type:"string",isDbVar:!0,defaultValue:"."}),this.registerVar({name:oe.HPNAME,type:"string",isDbVar:!1,defaultValue:Zv}),this.registerVar({name:oe.HPSCALE,type:"number",isDbVar:!1,defaultValue:1}),this.registerVar({name:oe.HPSEPARATE,type:"number",isDbVar:!1,defaultValue:0}),this.registerVar({name:oe.HPTRANSPARENCY,type:"transparency",isDbVar:!0,defaultValue:new Mn}),this.registerVar({name:oe.INSUNITS,type:"number",isDbVar:!0,defaultValue:Ft.Millimeters}),this.registerVar({name:oe.LOGINNAME,type:"string",isDbVar:!1,readOnly:!0,defaultValue:Vse()}),this.registerVar({name:oe.LUNITS,type:"number",isDbVar:!0,defaultValue:Cn.Decimal}),this.registerVar({name:oe.LUPREC,type:"number",isDbVar:!0,defaultValue:4}),this.registerVar({name:oe.LWDISPLAY,type:"boolean",isDbVar:!0,defaultValue:!1}),this.registerVar({name:oe.MEASUREMENT,type:"number",isDbVar:!0,defaultValue:1}),this.registerVar({name:oe.MEASUREMENTCOLOR,type:"color",isDbVar:!1,defaultValue:(function(){var e=new je(Be.ByColor);return e.setRGB(96,165,250),e})()}),this.registerVar({name:oe.MODELBKCOLOR,type:"color",isDbVar:!1,defaultValue:(function(){var e=new je(Be.ByColor);return e.setRGB(0,0,0),e})()}),this.registerVar({name:oe.OSMODE,type:"number",isDbVar:!0,defaultValue:0}),this.registerVar({name:oe.ORTHOMODE,type:"number",isDbVar:!0,defaultValue:0}),this.registerVar({name:oe.OPENPROF,type:"boolean",isDbVar:!1,defaultValue:!1}),this.registerVar({name:oe.PAPERBKCOLOR,type:"color",isDbVar:!1,defaultValue:(function(){var e=new je(Be.ByColor);return e.setRGB(255,255,255),e})()}),this.registerVar({name:oe.PICKBOX,type:"number",isDbVar:!1,defaultValue:10}),this.registerVar({name:oe.POLARADDANG,type:"string",isDbVar:!1,defaultValue:""}),this.registerVar({name:oe.POLARMODE,type:"number",isDbVar:!1,defaultValue:0}),this.registerVar({name:oe.POLARANG,type:"number",isDbVar:!1,defaultValue:90}),this.registerVar({name:oe.SHORTCUTMENU,type:"number",isDbVar:!1,defaultValue:0}),this.registerVar({name:oe.TEXTSTYLE,type:"string",isDbVar:!0,defaultValue:cn}),this.registerVar({name:oe.UNITMODE,type:"number",isDbVar:!0,defaultValue:0})}return r.instance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.registerVar=function(e){var t=this.normalizeName(e.name);this.registry.set(t,BA(BA({},e),{name:t})),e.isDbVar||this.cache.set(t,e.defaultValue)},r.prototype.registerMany=function(e){var t=this;e.forEach(function(n){return t.registerVar(n)})},r.prototype.setLoginName=function(e){var t=this.normalizeName(oe.LOGINNAME);this.cache.set(t,e.trim())},r.prototype.getVar=function(e,t){e=this.normalizeName(e);var n=this.getDescriptor(e);if(!n)throw new Error("System variable ".concat(e," not found!"));if(n.isDbVar)return t[e.toLowerCase()];if(this.cache.has(e))return this.cache.get(e)},r.prototype.getDefaultValue=function(e){e=this.normalizeName(e);var t=this.getDescriptor(e);if(!t)throw new Error("System variable ".concat(e," not found!"));return t.defaultValue},r.prototype.applyVarMutation=function(e,t,n,i,o){var a=this.normalizeName(e);if(this.hasValueChanged(t,n)){if(i.transactionManager.isRecording())i.transactionManager.recordSysvar(a,t);else if(i.transactionManager.strictMode&&!i.transactionManager.isApplyingUndoRedo())throw new Error("Cannot change system variable ".concat(a," outside an active transaction."));o(),!i.transactionManager.isApplyingUndoRedo()&&!i.transactionManager.isRecording()&&this.events.sysVarChanged.dispatch({database:i,name:a,newVal:n,oldVal:t})}},r.prototype.setVar=function(e,t,n){var i=this;e=this.normalizeName(e);var o=this.getDescriptor(e);if(o){if(o.readOnly)throw new Error("System variable ".concat(e," is read-only!"));var a=this.getVar(e,n);if(o.type==="transparency"){var s=this.parseTransparency(t);if(s==null||s.isInvalid)throw new Error("Invalid transparency value!");t=s}else if(o.type!=="string"&&(typeof t=="string"||t instanceof String)){if(o.type==="number"){var l=Number(t);if(Number.isNaN(l))throw new Error("Invalid number input!");t=l}else if(o.type==="boolean")t=this.parseBoolean(t);else if(o.type==="color"){var s=this.parseColorSysVar(e,t,n);if(s==null)throw new Error("Invalid color value!");t=s}}if(e===oe.GRIPCOLOR.toLowerCase()){var c=Math.trunc(t);if(!Number.isFinite(c)||c<Ym||c>$m)throw new Error("Invalid GRIPCOLOR value! Valid range is ".concat(Ym," to ").concat($m,"."));t=c}if(e===oe.GRIPHOT.toLowerCase()){var c=Math.trunc(t);if(!Number.isFinite(c)||c<Km||c>qm)throw new Error("Invalid GRIPHOT value! Valid range is ".concat(Km," to ").concat(qm,"."));t=c}if(e===oe.GRIPOBJLIMIT.toLowerCase()){var c=Math.trunc(t);if(!Number.isFinite(c)||c<0||c>32767)throw new Error("Invalid GRIPOBJLIMIT value! Valid range is 0 to 32767.");t=c}if(e===oe.GRIPS.toLowerCase()){var c=Math.trunc(t);if(!Number.isFinite(c)||c<0||c>2)throw new Error("Invalid GRIPS value! Valid range is 0 to 2.");t=c}if(e===oe.GRIPSIZE.toLowerCase()){var c=Math.trunc(t);if(!Number.isFinite(c)||c<Zm||c>Jm)throw new Error("Invalid GRIPSIZE value! Valid range is ".concat(Zm," to ").concat(Jm,"."));t=c}e===oe.COMPAREHATCH.toLowerCase()&&(t=ra("COMPAREHATCH",t,iu,ou)),e===oe.COMPAREPROPS.toLowerCase()&&(t=ra("COMPAREPROPS",t,i0,o0)),e===oe.COMPARERCMARGIN.toLowerCase()&&(t=ra("COMPARERCMARGIN",t,au,su)),e===oe.COMPARETEXT.toLowerCase()&&(t=ra("COMPARETEXT",t,lu,cu)),e===oe.COMPARETOLERANCE.toLowerCase()&&(t=ra("COMPARETOLERANCE",t,uu,hu)),o.isDbVar?this.applyVarMutation(e,a,t,n,function(){n[e.toLowerCase()]=t}):this.applyVarMutation(e,a,t,n,function(){i.cache.set(e,t)})}else throw new Error("System variable ".concat(e," not found!"))},r.prototype.getDescriptor=function(e){return this.registry.get(this.normalizeName(e))},r.prototype.getAllDescriptors=function(){return jse([],Use(this.registry.values()),!1)},r.prototype.parseBoolean=function(e){if(e==null)return!1;var t=String(e).trim().toLowerCase(),n=new Set(["true","t","1","yes","y"]),i=new Set(["false","f","0","no","n"]);return n.has(t)?!0:(i.has(t),!1)},r.prototype.parseColorSysVar=function(e,t,n){var i=t.trim().toLowerCase();return e===oe.HPCOLOR.toLowerCase()&&(i==="."||i==="use current")?n.cecolor.clone():e===oe.HPBACKGROUNDCOLOR.toLowerCase()&&(i===""||i==="."||i==="none")?new je(Be.None):je.fromString(t)},r.prototype.parseTransparency=function(e){if(e instanceof Mn)return e;if(typeof e=="number")return Mn.deserialize(e);if(!(typeof e!="string"&&!(e instanceof String)))return Mn.fromString(String(e))},r.prototype.hasValueChanged=function(e,t){return e instanceof je&&t instanceof je||e instanceof Mn&&t instanceof Mn?!e.equals(t):!Object.is(e,t)},r.prototype.normalizeName=function(e){return e.toLowerCase()},r._instance=null,r})()});var Gse,QL,io,oo,Hse,Wse,D7,O7,Xse,Yse,Ia,bp,FA=W(()=>{zt();Ql();Gse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),QL=function(){return QL=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},QL.apply(this,arguments)},io=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},oo=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Hse=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},D7="Load Database",O7=3e4,Xse=12e4,Yse=1024*1024,Ia=(function(r){Gse(e,r);function e(t,n){var i=r.call(this,t.stage)||this;return i.data=t,i.progress=n,i}return e.prototype.run=function(t){return io(this,void 0,void 0,function(){var n,i,o;return oo(this,function(a){switch(a.label){case 0:return n=$c.getInstance().getEntry(D7),i=Date.now(),this.progress?[4,this.progress(this.data.progress.value,this.data.stage,"START")]:[3,2];case 1:a.sent(),a.label=2;case 2:return[4,this.data.task(t)];case 3:return o=a.sent(),this.progress?[4,this.progress(this.data.progress.value,this.data.stage,"END",o?o.data:null)]:[3,5];case 4:a.sent(),this.data.progress.value+=this.data.step,this.data.progress.value>100&&(this.data.progress.value=100),a.label=5;case 5:return n&&(n.data[this.name]=Date.now()-i),[2,o]}})})},e})(Jb),bp=(function(){function r(e){e===void 0&&(e={});var t;this.config=QL({useWorker:(t=e.useWorker)!==null&&t!==void 0?t:!0},e)}return r.prototype.read=function(e,t){return io(this,arguments,void 0,function(n,i,o){var a,s,l,c,u,h,d,p,f,m=this;return o===void 0&&(o={}),oo(this,function(g){switch(g.label){case 0:return a=o.minimumChunkSize,s=a===void 0?10:a,l=o.progress,c=o.timeout,u=o.sysVars,h={name:D7,data:{total:0},format:function(){var y=this,b="";return Object.keys(this.data).forEach(function(v){v!=="total"&&(b+="- ".concat(v,": ").concat(y.data[v],` ms
  12. `))}),b+="- total: ".concat(this.data.total," ms"),b}},$c.getInstance().collect(h),this.progress=l,d={value:0},p=new Qb,p.setCompleteCallback(function(){return m.onFinished()}),p.setErrorCallback(function(y){return m.onError(y)}),p.addTask(new Ia({stage:"START",step:1,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return[2,y]})})}},l)),p.addTask(new Ia({stage:"PARSE",step:5,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){switch(b.label){case 0:return[4,this.parse(y,c)];case 1:return[2,b.sent()]}})})}},l)),p.addTask(new Ia({stage:"LTYPE",step:1,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return this.processLineTypes(y.model,i),[2,y]})})}},l)),p.addTask(new Ia({stage:"STYLE",step:1,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return this.processTextStyles(y.model,i),[2,y]})})}},l)),p.addTask(new Ia({stage:"DIMSTYLE",step:1,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return this.processDimStyles(y.model,i),[2,y]})})}},l)),p.addTask(new Ia({stage:"LAYER",step:1,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return this.processLayers(y.model,i),i.tables.layerTable.numEntries===0&&i.createDefaultData({layer:!0}),[2,y]})})}},l)),p.addTask(new Ia({stage:"VPORT",step:1,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return this.processViewports(y.model,i),[2,y]})})}},l)),p.addTask(new Ia({stage:"HEADER",step:1,progress:d,task:function(y){return io(m,void 0,void 0,function(){var b,v,x,w,_,A,E,S;return oo(this,function(M){if(this.processClasses(y.model,i),this.processHeader(y.model,i),u){b=gt.instance();try{for(v=Hse(Object.entries(u)),x=v.next();!x.done;x=v.next())w=Wse(x.value,2),_=w[0],A=w[1],b.setVar(_,A,i)}catch(T){E={error:T}}finally{try{x&&!x.done&&(S=v.return)&&S.call(v)}finally{if(E)throw E.error}}}return[2,y]})})}},l)),p.addTask(new Ia({stage:"BLOCK_RECORD",step:5,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return this.processBlockTables(y.model,i),[2,y]})})}},l)),p.addTask(new Ia({stage:"OBJECT",step:5,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return this.processObjects(y.model,i),i.objects.layout.numEntries===0&&i.createDefaultData({layout:!0}),[2,y]})})}},l)),p.addTask(new Ia({stage:"BLOCK",step:5,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){switch(b.label){case 0:return[4,this.processBlocks(y.model,i)];case 1:return b.sent(),[2,y]}})})}},l)),p.addTask(new Ia({stage:"ENTITY",step:100,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){switch(b.label){case 0:return[4,this.processEntities(y.model,i,s,d,l)];case 1:return b.sent(),[2,y]}})})}},l)),p.addTask(new Ia({stage:"END",step:0,progress:d,task:function(y){return io(m,void 0,void 0,function(){return oo(this,function(b){return[2,y]})})}},l)),f=Date.now(),[4,p.run(n)];case 1:return g.sent(),h.data.total=Date.now()-f,[2]}})})},r.prototype.onError=function(e){if(this.progress){var t=e.task;this.progress(t.data.progress.value,t.data.stage,"ERROR",void 0,e)}return console.error("Error occurred in conversion stage '".concat(e.task.name,"': "),e.error),e.task.name==="ENTITY"?!1:(this.onFinished(),!0)},r.prototype.onFinished=function(){this.progress&&this.progress(100,"END","END")},r.prototype.getParserWorkerTimeout=function(e,t){var n=t??this.config.timeout;if(n!=null)return n;var i=Math.ceil(e.byteLength/Yse),o=O7+i*1e3;return Math.min(Xse,Math.max(O7,o))},r.prototype.parse=function(e,t){return io(this,void 0,void 0,function(){return oo(this,function(n){throw new Error("Not impelemented yet!")})})},r.prototype.processLineTypes=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processTextStyles=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processDimStyles=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processLayers=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processViewports=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processHeader=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processClasses=function(e,t){},r.prototype.processBlockTables=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processObjects=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processBlocks=function(e,t){throw new Error("Not impelemented yet!")},r.prototype.processEntities=function(e,t,n,i,o){throw new Error("Not impelemented yet!")},r})()});var eO,tO,_0,nO=W(()=>{zt();eO=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},tO=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},_0=(function(){function r(e,t,n){this._chunkSize=-1,this._minimumChunkSize=50,this._count=e,this._numerOfChunk=t<1?1:t,this._minimumChunkSize=n,this.calculateChunkSize()}return Object.defineProperty(r.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"numerOfChunk",{get:function(){return this._numerOfChunk},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minimumChunkSize",{get:function(){return this._minimumChunkSize},set:function(e){this._minimumChunkSize=e,this.calculateChunkSize()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"chunkSize",{get:function(){return this._chunkSize},enumerable:!1,configurable:!0}),r.prototype.calculateChunkSize=function(){var e=this._count/this._numerOfChunk;e<this._minimumChunkSize&&(e=Math.min(this._minimumChunkSize,this._count)),this._chunkSize=e<1?this._count:Math.floor(e)},r.prototype.scheduleTask=function(e){return eO(this,void 0,void 0,function(){return tO(this,function(t){switch(t.label){case 0:return[4,os()];case 1:return t.sent(),[4,e()];case 2:return t.sent(),[2]}})})},r.prototype.processChunk=function(e,t){return eO(this,void 0,void 0,function(){var n,i,o=this;return tO(this,function(a){switch(a.label){case 0:return this._count<=0?[4,t?.()]:[3,2];case 1:return a.sent(),[2];case 2:return n=0,i=function(){return eO(o,void 0,void 0,function(){var s,l;return tO(this,function(c){switch(c.label){case 0:return s=n,l=Math.min(n+this._chunkSize,this._count),[4,e(s,l)];case 1:return c.sent(),n=l,n<this._count?[4,this.scheduleTask(i)]:[3,3];case 2:c.sent(),c.label=3;case 3:return[2]}})})},[4,i()];case 3:return a.sent(),[4,t?.()];case 4:return a.sent(),[2]}})})},r})()});var $se,rO,iO,vp,S0,oO=W(()=>{FA();nO();$se=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),rO=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},iO=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},vp=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},S0=(function(r){$se(e,r);function e(t){var n=r.call(this,{})||this;return n._database=t,n}return e.prototype.parse=function(){return rO(this,void 0,void 0,function(){return iO(this,function(t){return[2,{model:this._database,data:{unknownEntityCount:0}}]})})},e.prototype.processEntities=function(t,n,i,o,a){return rO(this,void 0,void 0,function(){var s,l,c,u,h=this;return iO(this,function(d){switch(d.label){case 0:return s=t.tables.blockTable.modelSpace.newIterator().toArray(),l=s.length,c=new _0(l,100-o.value,i),this.config.convertByEntityType&&(s=this.groupAndFlattenByType(s)),u=n.tables.blockTable.modelSpace,[4,c.processChunk(function(p,f){return rO(h,void 0,void 0,function(){var m,g,y,b,v;return iO(this,function(x){switch(x.label){case 0:for(m=[],g=p<f?s[p].type:"",y=p;y<f;y++)b=s[y],this.config.convertByEntityType&&b.type!==g&&(this.triggerEvents(u,m),m=[],g=b.type),m.push(b);return this.triggerEvents(u,m),a?(v=o.value+f/l*(100-o.value),v>100&&(v=100),[4,a(v,"ENTITY","IN-PROGRESS")]):[3,2];case 1:x.sent(),x.label=2;case 2:return[2]}})})})];case 1:return d.sent(),[2]}})})},e.prototype.processBlocks=function(){var t,n,i=this._database.tables.blockTable.newIterator();try{for(var o=vp(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=s.newIterator().toArray();this.triggerEvents(s,l)}}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.processHeader=function(){},e.prototype.processClasses=function(){},e.prototype.processBlockTables=function(){},e.prototype.processObjects=function(){var t,n,i,o,a,s,l,c,u,h,d=this._database.objects.layout.newIterator();try{for(var p=vp(d),f=p.next();!f.done;f=p.next()){var m=f.value;this._database.events.dictObjetSet.dispatch({database:this._database,object:m,key:m.layoutName})}}catch(N){t={error:N}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}var g=this._database.objects.imageDefinition.newIterator();try{for(var y=vp(g),b=y.next();!b.done;b=y.next()){var v=b.value;this._database.events.dictObjetSet.dispatch({database:this._database,object:v,key:v.objectId})}}catch(N){i={error:N}}finally{try{b&&!b.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}var x=this._database.objects.mleaderStyle.newIterator();try{for(var w=vp(x),_=w.next();!_.done;_=w.next()){var A=_.value;this._database.events.dictObjetSet.dispatch({database:this._database,object:A,key:A.objectId})}}catch(N){a={error:N}}finally{try{_&&!_.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}var E=this._database.objects.layerFilter.newIterator();try{for(var S=vp(E),M=S.next();!M.done;M=S.next()){var T=M.value;this._database.events.dictObjetSet.dispatch({database:this._database,object:T,key:T.objectId})}}catch(N){l={error:N}}finally{try{M&&!M.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}var L=this._database.objects.layerIndex.newIterator();try{for(var O=vp(L),D=O.next();!D.done;D=O.next()){var z=D.value;this._database.events.dictObjetSet.dispatch({database:this._database,object:z,key:z.objectId})}}catch(N){u={error:N}}finally{try{D&&!D.done&&(h=O.return)&&h.call(O)}finally{if(u)throw u.error}}},e.prototype.processViewports=function(){},e.prototype.processLayers=function(){var t=this,n=this._database.tables.layerTable.newIterator().toArray();n.forEach(function(i){t._database.events.layerAppended.dispatch({database:t._database,layer:i})})},e.prototype.processLineTypes=function(){},e.prototype.processTextStyles=function(){},e.prototype.processDimStyles=function(){},e.prototype.groupAndFlattenByType=function(t){var n,i,o={},a=[];try{for(var s=vp(t),l=s.next();!l.done;l=s.next()){var c=l.value;o[c.type]||(o[c.type]=[],a.push(c.type)),o[c.type].push(c)}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a.flatMap(function(u){return o[u]})},e.prototype.triggerEvents=function(t,n){(t.isModelSapce||t.isPaperSapce)&&t.database.events.entityAppended.dispatch({database:t.database,entity:n})},e})(bp)});var Kse,qse,dg,Ch,bu,pg,fg,ri,A0=W(()=>{zt();bi();Yl();Kse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),qse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o};(function(r){r[r.Center=0]="Center",r[r.Left=1]="Left",r[r.Right=2]="Right",r[r.OverFirst=3]="OverFirst",r[r.OverSecond=4]="OverSecond"})(dg||(dg={}));(function(r){r[r.Center=0]="Center",r[r.Above=1]="Above",r[r.Outside=2]="Outside",r[r.JIS=3]="JIS",r[r.Below=4]="Below"})(Ch||(Ch={}));(function(r){r[r.Feet=0]="Feet",r[r.None=1]="None",r[r.Inch=2]="Inch",r[r.FeetAndInch=3]="FeetAndInch",r[r.Leading=4]="Leading",r[r.Trailing=8]="Trailing",r[r.LeadingAndTrailing=12]="LeadingAndTrailing"})(bu||(bu={}));(function(r){r[r.None=0]="None",r[r.Leading=1]="Leading",r[r.Trailing=2]="Trailing",r[r.LeadingAndTrailing=3]="LeadingAndTrailing"})(pg||(pg={}));(function(r){r[r.Bottom=0]="Bottom",r[r.Middle=1]="Middle",r[r.Top=2]="Top"})(fg||(fg={}));ri=(function(r){Kse(e,r);function e(t,n){return t=t||{},er(t,e.DEFAULT_DIM_VALUES),r.call(this,t,n)||this}return Object.defineProperty(e.prototype,"dimpost",{get:function(){return this.getAttr("dimpost")},set:function(t){this.setAttr("dimpost",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimapost",{get:function(){return this.getAttr("dimapost")},set:function(t){this.setAttr("dimapost",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimscale",{get:function(){return this.getAttr("dimscale")},set:function(t){this.setAttr("dimscale",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimasz",{get:function(){return this.getAttr("dimasz")},set:function(t){this.setAttr("dimasz",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimexo",{get:function(){return this.getAttr("dimexo")},set:function(t){this.setAttr("dimexo",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimdli",{get:function(){return this.getAttr("dimdli")},set:function(t){this.setAttr("dimdli",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimexe",{get:function(){return this.getAttr("dimexe")},set:function(t){this.setAttr("dimexe",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimrnd",{get:function(){return this.getAttr("dimrnd")},set:function(t){this.setAttr("dimrnd",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimdle",{get:function(){return this.getAttr("dimdle")},set:function(t){this.setAttr("dimdle",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtp",{get:function(){return this.getAttr("dimtp")},set:function(t){this.setAttr("dimtp",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtm",{get:function(){return this.getAttr("dimtm")},set:function(t){this.setAttr("dimtm",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtxt",{get:function(){return this.getAttr("dimtxt")},set:function(t){this.setAttr("dimtxt",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimcen",{get:function(){return this.getAttr("dimcen")},set:function(t){this.setAttr("dimcen",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtsz",{get:function(){return this.getAttr("dimtsz")},set:function(t){this.setAttr("dimtsz",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimaltf",{get:function(){return this.getAttr("dimaltf")},set:function(t){this.setAttr("dimaltf",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimlfac",{get:function(){return this.getAttr("dimlfac")},set:function(t){this.setAttr("dimlfac",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtvp",{get:function(){return this.getAttr("dimtvp")},set:function(t){this.setAttr("dimtvp",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtfac",{get:function(){return this.getAttr("dimtfac")},set:function(t){this.setAttr("dimtfac",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimgap",{get:function(){return this.getAttr("dimgap")},set:function(t){this.setAttr("dimgap",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimaltrnd",{get:function(){return this.getAttr("dimaltrnd")},set:function(t){this.setAttr("dimaltrnd",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtol",{get:function(){return this.getAttr("dimtol")},set:function(t){this.setAttr("dimtol",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimlim",{get:function(){return this.getAttr("dimlim")},set:function(t){this.setAttr("dimlim",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtih",{get:function(){return this.getAttr("dimtih")},set:function(t){this.setAttr("dimtih",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtoh",{get:function(){return this.getAttr("dimtoh")},set:function(t){this.setAttr("dimtoh",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimse1",{get:function(){return this.getAttr("dimse1")},set:function(t){this.setAttr("dimse1",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimse2",{get:function(){return this.getAttr("dimse2")},set:function(t){this.setAttr("dimse2",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtad",{get:function(){return this.getAttr("dimtad")},set:function(t){this.setAttr("dimtad",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimzin",{get:function(){return this.getAttr("dimzin")},set:function(t){this.setAttr("dimzin",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimazin",{get:function(){return this.getAttr("dimazin")},set:function(t){this.setAttr("dimazin",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimalt",{get:function(){return this.getAttr("dimalt")},set:function(t){this.setAttr("dimalt",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimaltd",{get:function(){return this.getAttr("dimaltd")},set:function(t){this.setAttr("dimaltd",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtofl",{get:function(){return this.getAttr("dimtofl")},set:function(t){this.setAttr("dimtofl",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimsah",{get:function(){return this.getAttr("dimsah")},set:function(t){this.setAttr("dimsah",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtix",{get:function(){return this.getAttr("dimtix")},set:function(t){this.setAttr("dimtix",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimsoxd",{get:function(){return this.getAttr("dimsoxd")},set:function(t){this.setAttr("dimsoxd",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimclrd",{get:function(){return this.getAttr("dimclrd")},set:function(t){this.setAttr("dimclrd",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimclre",{get:function(){return this.getAttr("dimclre")},set:function(t){this.setAttr("dimclre",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimclrt",{get:function(){return this.getAttr("dimclrt")},set:function(t){this.setAttr("dimclrt",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimadec",{get:function(){return this.getAttr("dimadec")},set:function(t){this.setAttr("dimadec",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimunit",{get:function(){return this.getAttr("dimunit")},set:function(t){this.setAttr("dimunit",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimdec",{get:function(){return this.getAttr("dimdec")},set:function(t){this.setAttr("dimdec",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtdec",{get:function(){return this.getAttr("dimtdec")},set:function(t){this.setAttr("dimtdec",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimaltu",{get:function(){return this.getAttr("dimaltu")},set:function(t){this.setAttr("dimaltu",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimalttd",{get:function(){return this.getAttr("dimalttd")},set:function(t){this.setAttr("dimalttd",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimaunit",{get:function(){return this.getAttr("dimaunit")},set:function(t){this.setAttr("dimaunit",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimfrac",{get:function(){return this.getAttr("dimfrac")},set:function(t){this.setAttr("dimfrac",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimlunit",{get:function(){return this.getAttr("dimlunit")},set:function(t){this.setAttr("dimlunit",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimdsep",{get:function(){return this.getAttr("dimdsep")},set:function(t){this.setAttr("dimdsep",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtmove",{get:function(){return this.getAttr("dimtmove")},set:function(t){this.setAttr("dimtmove",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimjust",{get:function(){return this.getAttr("dimjust")},set:function(t){this.setAttr("dimjust",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimsd1",{get:function(){return this.getAttr("dimsd1")},set:function(t){this.setAttr("dimsd1",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimsd2",{get:function(){return this.getAttr("dimsd2")},set:function(t){this.setAttr("dimsd2",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtolj",{get:function(){return this.getAttr("dimtolj")},set:function(t){this.setAttr("dimtolj",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtzin",{get:function(){return this.getAttr("dimtzin")},set:function(t){this.setAttr("dimtzin",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimaltz",{get:function(){return this.getAttr("dimaltz")},set:function(t){this.setAttr("dimaltz",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimalttz",{get:function(){return this.getAttr("dimalttz")},set:function(t){this.setAttr("dimalttz",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimfit",{get:function(){return this.getAttr("dimfit")},set:function(t){this.setAttr("dimfit",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimupt",{get:function(){return this.getAttr("dimupt")},set:function(t){this.setAttr("dimupt",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimatfit",{get:function(){return this.getAttr("dimatfit")},set:function(t){this.setAttr("dimatfit",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimtxsty",{get:function(){return this.getAttr("dimtxsty")},set:function(t){this.setAttr("dimtxsty",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimldrblk",{get:function(){return this.getAttr("dimldrblk")},set:function(t){this.setAttr("dimldrblk",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimblk",{get:function(){return this.getAttr("dimblk")},set:function(t){this.setAttr("dimblk",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimblk1",{get:function(){return this.getAttr("dimblk1")},set:function(t){this.setAttr("dimblk1",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimblk2",{get:function(){return this.getAttr("dimblk2")},set:function(t){this.setAttr("dimblk2",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimlwd",{get:function(){return this.getAttr("dimlwd")},set:function(t){this.setAttr("dimlwd",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimlwe",{get:function(){return this.getAttr("dimlwe")},set:function(t){this.setAttr("dimlwe",t)},enumerable:!1,configurable:!0}),e.prototype.dxfOut=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=qse(t,2),o=i[0],a=i[1],s=a===void 0?!1:a;return o.writeHandle(105,this.objectId),o.writeObjectId(330,this.ownerId),o.writeObjectId(360,this.extensionDictionary),this.dxfOutFields(o),s&&this.dxfOutXData(o),this},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t);var n=this.database.tables.textStyleTable.getAt(this.dimtxsty),i=this.database.tables.blockTable.getAt(this.dimldrblk),o=this.database.tables.blockTable.getAt(this.dimblk),a=this.database.tables.blockTable.getAt(this.dimblk1),s=this.database.tables.blockTable.getAt(this.dimblk2);return t.writeSubclassMarker("AcDbDimStyleTableRecord"),t.writeString(2,this.name),t.writeInt16(70,0),t.writeString(3,this.dimpost),t.writeString(4,this.dimapost),t.writeDouble(40,this.dimscale),t.writeDouble(41,this.dimasz),t.writeDouble(42,this.dimexo),t.writeDouble(43,this.dimdli),t.writeDouble(44,this.dimexe),t.writeDouble(140,this.dimtxt),t.writeDouble(147,this.dimgap),t.writeInt16(170,this.dimalt),t.writeInt16(171,this.dimtol),t.writeInt16(172,this.dimlim),t.writeInt16(173,this.dimtih),t.writeInt16(174,this.dimtoh),t.writeObjectId(340,n?.objectId),t.writeObjectId(341,i?.objectId),t.writeObjectId(342,o?.objectId),t.writeObjectId(343,a?.objectId),t.writeObjectId(344,s?.objectId),t.writeInt16(371,this.dimlwd),t.writeInt16(372,this.dimlwe),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbDimStyleTableRecord");for(var n=function(s){return s===0?0:1};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var i=t.readItem();if(!i)break;var o=Number(i.code);if(o===100){t.pushBackItem(i);break}var a=Number(i.value);switch(o){case 2:this.name=String(i.value);break;case 70:break;case 3:this.dimpost=String(i.value);break;case 4:this.dimapost=String(i.value);break;case 5:this.dimblk=String(i.value);break;case 6:this.dimblk1=String(i.value);break;case 7:this.dimblk2=String(i.value);break;case 40:this.dimscale=a;break;case 41:this.dimasz=a;break;case 42:this.dimexo=a;break;case 43:this.dimdli=a;break;case 44:this.dimexe=a;break;case 45:this.dimrnd=a;break;case 46:this.dimdle=a;break;case 47:this.dimtp=a;break;case 48:this.dimtm=a;break;case 140:this.dimtxt=a;break;case 141:this.dimcen=a;break;case 142:this.dimtsz=a;break;case 143:this.dimaltf=a;break;case 144:this.dimlfac=a;break;case 145:this.dimtvp=a;break;case 146:this.dimtfac=a;break;case 147:this.dimgap=a;break;case 148:this.dimaltrnd=a;break;case 71:this.dimtol=n(a);break;case 72:this.dimlim=n(a);break;case 73:this.dimtih=n(a);break;case 74:this.dimtoh=n(a);break;case 75:this.dimse1=n(a);break;case 76:this.dimse2=n(a);break;case 77:this.dimtad=a;break;case 78:this.dimzin=a;break;case 79:this.dimazin=a;break;case 170:this.dimalt=n(a);break;case 171:this.dimaltd=a;break;case 172:this.dimtofl=n(a);break;case 173:this.dimsah=n(a);break;case 174:this.dimtix=n(a);break;case 175:this.dimsoxd=n(a);break;case 176:this.dimclrd=a;break;case 177:this.dimclre=a;break;case 178:this.dimclrt=a;break;case 179:this.dimadec=a;break;case 270:this.dimunit=a;break;case 271:this.dimdec=a;break;case 272:this.dimtdec=a;break;case 273:this.dimaltu=a;break;case 274:this.dimalttd=a;break;case 275:this.dimaunit=a;break;case 276:this.dimfrac=a;break;case 277:this.dimlunit=a;break;case 278:this.dimdsep=typeof i.value=="string"?i.value:String.fromCharCode(a||46);break;case 279:this.dimtmove=a;break;case 280:this.dimjust=a;break;case 281:this.dimsd1=n(a);break;case 282:this.dimsd2=n(a);break;case 283:this.dimtolj=a;break;case 284:this.dimtzin=a;break;case 285:this.dimaltz=a;break;case 286:this.dimalttz=a;break;case 287:this.dimfit=a;break;case 288:this.dimupt=n(a);break;case 289:this.dimatfit=a;break;case 340:this.dimtxsty=String(i.value);break;case 341:this.dimldrblk=String(i.value);break;case 342:this.dimblk=String(i.value);break;case 343:this.dimblk1=String(i.value);break;case 344:this.dimblk2=String(i.value);break;case 371:this.dimlwd=a;break;case 372:this.dimlwe=a;break;default:break}}return this},e.DEFAULT_DIM_VALUES={name:"",dimpost:"",dimapost:"",dimscale:1,dimasz:2.5,dimexo:.625,dimdli:.38,dimexe:.18,dimrnd:0,dimdle:0,dimtp:0,dimtm:0,dimtxt:2.5,dimcen:2.5,dimtsz:0,dimaltf:0,dimlfac:1,dimtvp:0,dimtfac:1,dimgap:1,dimaltrnd:0,dimtol:0,dimlim:0,dimtih:0,dimtoh:0,dimse1:0,dimse2:0,dimtad:Ch.Center,dimzin:bu.Feet,dimazin:pg.None,dimalt:0,dimaltd:2,dimtofl:0,dimsah:0,dimtix:0,dimsoxd:0,dimclrd:0,dimclre:0,dimclrt:0,dimadec:0,dimunit:2,dimdec:4,dimtdec:4,dimaltu:2,dimalttd:2,dimaunit:0,dimfrac:0,dimlunit:2,dimdsep:".",dimtmove:0,dimjust:dg.Center,dimsd1:0,dimsd2:0,dimtolj:fg.Bottom,dimtzin:bu.Feet,dimaltz:bu.Feet,dimalttz:bu.Feet,dimfit:0,dimupt:0,dimatfit:3,dimtxsty:cn,dimldrblk:"",dimblk:"",dimblk1:"",dimblk2:"",dimlwd:-2,dimlwe:-2},e})(ni)});function R7(){return{color:new je,description:"",standardFlags:0,isHidden:!1,isInUse:!0,isOff:!1,isPlottable:!0,transparency:new Mn,linetype:"",lineWeight:1,materialId:-1}}var Zse,aO,Jse,Qse,B7,aa,mg=W(()=>{zt();Yl();Zse=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),aO=function(){return aO=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},aO.apply(this,arguments)},Jse=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Qse=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};B7=Qse(["name"],Jse(Object.keys(R7())),!1),aa=(function(r){Zse(e,r);function e(t,n){return t=t||{},er(t,R7()),r.call(this,t,n)||this}return Object.defineProperty(e.prototype,"color",{get:function(){return this.getAttr("color")},set:function(t){this.setAttr("color",t.clone())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this.getAttr("description")},set:function(t){this.setAttr("description",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"standardFlags",{get:function(){return this.getAttr("standardFlags")},set:function(t){this.setAttr("standardFlags",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFrozen",{get:function(){return(this.standardFlags&1)==1},set:function(t){var n=t?1:0;this.standardFlags=this.standardFlags|n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHidden",{get:function(){return this.getAttr("isHidden")},set:function(t){this.setAttr("isHidden",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInUse",{get:function(){return this.getAttr("isInUse")},set:function(t){this.setAttr("isInUse",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLocked",{get:function(){return(this.standardFlags&4)==4},set:function(t){var n=t?4:0;this.standardFlags=this.standardFlags|n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOff",{get:function(){return this.getAttr("isOff")},set:function(t){this.setAttr("isOff",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPlottable",{get:function(){return this.getAttr("isPlottable")},set:function(t){this.setAttr("isPlottable",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transparency",{get:function(){return this.getAttr("transparency")},set:function(t){this.setAttr("transparency",t.clone())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linetype",{get:function(){return this.getAttr("linetype")},set:function(t){this.setAttr("linetype",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineStyle",{get:function(){var t,n=(t=this.database)===null||t===void 0?void 0:t.tables.linetypeTable.getAt(this.linetype);if(n)return aO({type:"UserSpecified"},n.linetype)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineWeight",{get:function(){return this.getAttr("lineWeight")},set:function(t){this.setAttr("lineWeight",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"materialId",{get:function(){return this.getAttr("materialId")},set:function(t){this.setAttr("materialId",t)},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbLayerTableRecord"),t.writeString(2,this.name),t.writeInt16(70,this.standardFlags),t.writeCmColor(this.color),t.writeString(6,this.linetype),t.writeInt16(290,this.isPlottable?1:0),t.writeLineWeight(370,this.lineWeight),t.writeTransparency(this.transparency),this.description&&t.writeString(4,this.description),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbLayerTableRecord");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}switch(i){case 2:this.name=String(n.value);break;case 70:this.standardFlags=Number(n.value);break;case 62:{var o=Number(n.value);this.isOff=o<0,this.color.colorIndex=Math.abs(o);break}case 420:this.color.setRGBValue(Number(n.value));break;case 6:this.linetype=String(n.value);break;case 290:this.isPlottable=Number(n.value)!==0;break;case 370:this.lineWeight=Number(n.value);break;case 440:this.transparency=Mn.deserialize(Number(n.value));break;case 4:this.description=String(n.value);break;default:break}}return this},e})(ni)});var ele,F7,tle,La,M0=W(()=>{zt();Yl();ele=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),F7=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tle=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},La=(function(r){ele(e,r);function e(t,n){return t=t||{},er(t,{standardFlag:0,description:"",totalPatternLength:0}),r.call(this,t,n)||this}return Object.defineProperty(e.prototype,"numDashes",{get:function(){var t=this.getAttrWithoutException("pattern");return t?t.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"patternLength",{get:function(){return this.getAttr("totalPatternLength")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comments",{get:function(){return this.getAttr("description")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linetype",{get:function(){return{name:this.name,standardFlag:this.getAttr("standardFlag"),description:this.getAttr("description"),totalPatternLength:this.getAttr("totalPatternLength"),pattern:this.getAttrWithoutException("pattern")}},enumerable:!1,configurable:!0}),e.prototype.dashLengthAt=function(t){if(t<0||t>=this.numDashes)throw new Error('Index must be greater than or equal to zero, but less than the value of property "numDashes".');return this.getAttr("pattern")[t].elementLength},e.prototype.toPreviewSvgString=function(t){var n,i,o,a,s,l,c,u,h,d=Math.max((o=t?.width)!==null&&o!==void 0?o:220,1),p=Math.max((a=t?.height)!==null&&a!==void 0?a:36,1),f=Math.min(Math.max((s=t?.padding)!==null&&s!==void 0?s:8,0),Math.floor(d/2)),m=Math.max((l=t?.strokeWidth)!==null&&l!==void 0?l:2,.5),g=this.escapeSvgAttribute((c=t?.stroke)!==null&&c!==void 0?c:"currentColor"),y=Math.max((u=t?.repeats)!==null&&u!==void 0?u:4,1),b=p/2,v=f,x=Math.max(d-f,v+1),w=x-v,_=(h=this.getAttrWithoutException("pattern"))!==null&&h!==void 0?h:[];if(_.length===0||this.patternLength<=0||!_.some(function(Q){return Q.elementLength!==0}))return this.buildSvgString({width:d,height:p,stroke:g,strokeWidth:m,lineSegments:[[v,x]],dots:[],y:b});for(var A=[],E=[],S=w/(this.patternLength*y),M=.5,T=Math.max(m*2,2),L=v;L<x;)try{for(var O=(n=void 0,F7(_)),D=O.next();!D.done;D=O.next()){var z=D.value;if(L>=x)break;var N=z.elementLength;if(N===0){E.push(L),L=Math.min(L+T,x);continue}var J=Math.max(Math.abs(N)*S,M),X=Math.min(L+J,x);N>0&&X>L&&A.push([L,X]),L=X}}catch(Q){n={error:Q}}finally{try{D&&!D.done&&(i=O.return)&&i.call(O)}finally{if(n)throw n.error}}return this.buildSvgString({width:d,height:p,stroke:g,strokeWidth:m,lineSegments:A,dots:E,y:b})},e.prototype.buildSvgString=function(t){var n=t.width,i=t.height,o=t.stroke,a=t.strokeWidth,s=t.lineSegments,l=t.dots,c=t.y,u=s.map(function(d){var p=tle(d,2),f=p[0],m=p[1];return'<line x1="'.concat(f.toFixed(2),'" y1="').concat(c.toFixed(2),'" x2="').concat(m.toFixed(2),'" y2="').concat(c.toFixed(2),'" stroke="').concat(o,'" stroke-width="').concat(a.toFixed(2),'" stroke-linecap="round" />')}).join(""),h=l.map(function(d){return'<circle cx="'.concat(d.toFixed(2),'" cy="').concat(c.toFixed(2),'" r="').concat((a/2).toFixed(2),'" fill="').concat(o,'" />')}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(n,'" height="').concat(i,'" viewBox="0 0 ').concat(n," ").concat(i,'" role="img" aria-label="').concat(this.escapeSvgAttribute(this.name),' linetype preview">').concat(u).concat(h,"</svg>")},e.prototype.escapeSvgAttribute=function(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;")},e.prototype.dxfOutFields=function(t){var n,i,o;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbLinetypeTableRecord"),t.writeString(2,this.name),t.writeInt16(70,this.getAttr("standardFlag")),t.writeString(3,this.comments),t.writeInt16(72,65),t.writeInt16(73,this.numDashes),t.writeDouble(40,this.patternLength);try{for(var a=F7((o=this.getAttrWithoutException("pattern"))!==null&&o!==void 0?o:[]),s=a.next();!s.done;s=a.next()){var l=s.value;t.writeDouble(49,l.elementLength),t.writeInt16(74,l.elementTypeFlag),l.elementTypeFlag!==0&&(l.shapeNumber!=null&&t.writeInt16(75,l.shapeNumber),l.styleObjectId&&t.writeObjectId(340,l.styleObjectId),l.scale!=null&&t.writeDouble(46,l.scale),l.rotation!=null&&t.writeDouble(50,l.rotation),l.offsetX!=null&&t.writeDouble(44,l.offsetX),l.offsetY!=null&&t.writeDouble(45,l.offsetY),l.text&&t.writeString(9,l.text))}}catch(c){n={error:c}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbLinetypeTableRecord");for(var n=[];!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var i=t.readItem();if(!i)break;var o=Number(i.code);if(o===100){t.pushBackItem(i);break}switch(o){case 2:this.name=String(i.value);break;case 70:this.setAttr("standardFlag",Number(i.value));break;case 3:this.setAttr("description",String(i.value));break;case 72:break;case 73:break;case 40:this.setAttr("totalPatternLength",Number(i.value));break;case 49:n.push({elementLength:Number(i.value),elementTypeFlag:0});break;case 74:n.length>0&&(n[n.length-1].elementTypeFlag=Number(i.value));break;case 75:n.length>0&&(n[n.length-1].shapeNumber=Number(i.value));break;case 340:n.length>0&&(n[n.length-1].styleObjectId=String(i.value));break;case 46:n.length>0&&(n[n.length-1].scale=Number(i.value));break;case 50:n.length>0&&(n[n.length-1].rotation=Number(i.value));break;case 44:n.length>0&&(n[n.length-1].offsetX=Number(i.value));break;case 45:n.length>0&&(n[n.length-1].offsetY=Number(i.value));break;case 9:n.length>0&&(n[n.length-1].text=String(i.value));break;default:break}}return this.setAttr("pattern",n),this},e})(ni)});var nle,Th,NA=W(()=>{Yl();nle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Th=(function(r){nle(e,r);function e(t){return typeof t=="string"&&(t={name:t}),r.call(this,t)||this}return e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbRegAppTableRecord"),t.writeString(2,this.name),t.writeInt16(70,0),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbRegAppTableRecord");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}switch(i){case 2:this.name=String(n.value);break;case 70:break;default:break}}return this},e})(ni)});var rle,ile,vu,P0=W(()=>{zt();Yl();rle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ile=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vu=(function(r){rle(e,r);function e(t,n){var i=this;return t=t||{},er(t,{standardFlag:0,fixedTextHeight:0,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:0,font:"",bigFont:""}),i=r.call(this,t,n)||this,i.setAttr("font",i.getFileNameWithoutExtension(i.getAttr("font")||i.getAttrWithoutException("extendedFont")||i.name)),i}return Object.defineProperty(e.prototype,"obliquingAngle",{get:function(){return this.getAttr("obliqueAngle")},set:function(t){this.setAttr("obliqueAngle",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"priorSize",{get:function(){return this.getAttr("lastHeight")},set:function(t){this.setAttr("lastHeight",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textSize",{get:function(){return this.getAttr("fixedTextHeight")},set:function(t){this.setAttr("fixedTextHeight",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xScale",{get:function(){return this.getAttr("widthFactor")},set:function(t){this.setAttr("widthFactor",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVertical",{get:function(){return(this.getAttr("standardFlag")&4)===4},set:function(t){var n=this.getAttr("standardFlag");this.setAttr("standardFlag",t?n|4:n&-5)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isShapeFile",{get:function(){return(this.getAttr("standardFlag")&1)===1},set:function(t){var n=this.getAttr("standardFlag");this.setAttr("standardFlag",t?n|1:n&-2)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileName",{get:function(){return this.getAttr("font")},set:function(t){this.setAttr("font",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bigFontFileName",{get:function(){return this.getAttr("bigFont")},set:function(t){this.setAttr("bigFont",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textStyle",{get:function(){return{name:this.name,standardFlag:this.getAttr("standardFlag"),fixedTextHeight:this.getAttr("fixedTextHeight"),widthFactor:this.getAttr("widthFactor"),obliqueAngle:this.getAttr("obliqueAngle"),textGenerationFlag:this.getAttr("textGenerationFlag"),lastHeight:this.getAttr("lastHeight"),font:this.getAttr("font"),bigFont:this.getAttr("bigFont"),extendedFont:this.getAttrWithoutException("extendedFont")}},enumerable:!1,configurable:!0}),e.prototype.getFileNameWithoutExtension=function(t){var n=t.split("/").pop();if(n){var i=n.lastIndexOf(".");return i===-1?n:n.substring(0,i)}return t},Object.defineProperty(e.prototype,"dxfFontFileName",{get:function(){var t,n,i=(n=(t=this.fileName)===null||t===void 0?void 0:t.trim())!==null&&n!==void 0?n:"";return!i||!this.isShapeFile||/\.[^./\\]+$/i.test(i)?i:"".concat(i,".shx")},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbTextStyleTableRecord"),t.writeString(2,this.name),t.writeInt16(70,this.getAttr("standardFlag")),t.writeDouble(40,this.textSize),t.writeDouble(41,this.xScale),t.writeAngle(50,this.obliquingAngle),t.writeInt16(71,this.getAttr("textGenerationFlag")),t.writeDouble(42,this.priorSize),t.writeString(3,this.dxfFontFileName),t.writeString(4,this.bigFontFileName),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbTextStyleTableRecord");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}switch(i){case 2:this.name=String(n.value);break;case 70:this.setAttr("standardFlag",Number(n.value));break;case 40:this.textSize=Number(n.value);break;case 41:this.xScale=Number(n.value);break;case 50:this.obliquingAngle=Number(n.value);break;case 71:this.setAttr("textGenerationFlag",Number(n.value));break;case 42:this.priorSize=Number(n.value);break;case 3:this.fileName=this.getFileNameWithoutExtension(String(n.value));break;case 4:this.bigFontFileName=String(n.value);break;default:break}}return this},e.prototype.dxfInXData=function(t){r.prototype.dxfInXData.call(this,t),this.applyExtendedFontFromXData()},e.prototype.applyExtendedFontFromXData=function(){var t,n,i,o=this.getXData("ACAD");if(o)try{for(var a=ile(o),s=a.next();!s.done;s=a.next()){var l=s.value;if(Number(l.code)===1e3&&l.value!=null){var c=String(l.value).trim();if(c){this.setAttr("extendedFont",c);break}}}}catch(d){t={error:d}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var u=((i=this.getAttr("font"))!==null&&i!==void 0?i:"").trim();if(!u){var h=this.getAttrWithoutException("extendedFont")||this.name||"";h&&(this.fileName=this.getFileNameWithoutExtension(h))}},e})(ni)});var ole,E0,sO=W(()=>{zt();tt();Yl();ole=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),E0=(function(r){ole(e,r);function e(t,n){return t=t||{},er(t,{standardFlags:0,origin:new k(0,0,0),xAxis:new k(1,0,0),yAxis:new k(0,1,0),isOrthographic:!1,elevation:0}),r.call(this,t,n)||this}return Object.defineProperty(e.prototype,"standardFlags",{get:function(){return this.getAttr("standardFlags")},set:function(t){this.setAttr("standardFlags",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){return this.getAttr("origin")},set:function(t){this.setAttr("origin",t.clone())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xAxis",{get:function(){return this.getAttr("xAxis")},set:function(t){this.setAttr("xAxis",t.clone())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yAxis",{get:function(){return this.getAttr("yAxis")},set:function(t){this.setAttr("yAxis",t.clone())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOrthographic",{get:function(){return this.getAttr("isOrthographic")},set:function(t){this.setAttr("isOrthographic",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elevation",{get:function(){return this.getAttr("elevation")},set:function(t){this.setAttr("elevation",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseUcsId",{get:function(){return this.getAttrWithoutException("baseUcsId")},set:function(t){this.setAttr("baseUcsId",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orthographicType",{get:function(){return this.getAttrWithoutException("orthographicType")},set:function(t){this.setAttr("orthographicType",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orthographicOrigin",{get:function(){return this.getAttrWithoutException("orthographicOrigin")},set:function(t){this.setAttr("orthographicOrigin",t?.clone())},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbUCSTableRecord"),t.writeString(2,this.name),t.writeInt16(70,this.standardFlags),t.writePoint3d(10,this.origin),t.writePoint3d(11,this.xAxis),t.writePoint3d(12,this.yAxis),t.writeDouble(146,this.elevation),t.writeInt16(79,this.isOrthographic?1:0),this.isOrthographic&&t.writeObjectId(346,this.baseUcsId),this.orthographicType!=null&&this.orthographicOrigin&&(t.writeInt16(71,this.orthographicType),t.writePoint3d(13,this.orthographicOrigin)),this},e.prototype.dxfInFields=function(t){var n;for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbUCSTableRecord");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var i=t.readItem();if(!i)break;var o=Number(i.code);if(o===100){t.pushBackItem(i);break}var a=Number(i.value);switch(o){case 2:this.name=String(i.value);break;case 70:this.standardFlags=a;break;case 10:this.origin.x=a;break;case 20:this.origin.y=a;break;case 30:this.origin.z=a;break;case 11:this.xAxis.x=a;break;case 21:this.xAxis.y=a;break;case 31:this.xAxis.z=a;break;case 12:this.yAxis.x=a;break;case 22:this.yAxis.y=a;break;case 32:this.yAxis.z=a;break;case 79:this.isOrthographic=a!==0;break;case 146:this.elevation=a;break;case 346:this.baseUcsId=String(i.value);break;case 71:this.orthographicType=a;break;case 13:this.orthographicOrigin=(n=this.orthographicOrigin)!==null&&n!==void 0?n:new k,this.orthographicOrigin.x=a;break;case 23:this.orthographicOrigin&&(this.orthographicOrigin.y=a);break;case 33:this.orthographicOrigin&&(this.orthographicOrigin.z=a);break;default:break}}return this},e})(ni)});var ale,sle,xp,zA=W(()=>{zt();tt();Li();Yl();ale=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),sle=function(){return{center:new Z,viewDirectionFromTarget:new k(0,0,1),viewTarget:new k(0,0,0),lensLength:500,frontClippingPlane:0,backClippingPlane:0,viewHeight:1e3,viewTwistAngle:0,frozenLayers:[],styleSheet:"",renderMode:tp.OPTIMIZED_2D,viewMode:0,ucsIconSetting:0,ucsOrigin:new k(0,0,0),ucsXAxis:new k(1,0,0),ucsYAxis:new k(0,1,0),orthographicType:np.TOP,shadePlotSetting:0,shadePlotObjectId:void 0,visualStyleObjectId:void 0,isDefaultLightingOn:!1,defaultLightingType:rp.ONE_DISTANT_LIGHT,brightness:0,contrast:0,ambientColor:void 0,aspectRatio:void 0}},xp=(function(r){ale(e,r);function e(t,n){return t=t||{},er(t,{gsView:sle()}),r.call(this,t,n)||this}return Object.defineProperty(e.prototype,"gsView",{get:function(){return this.getAttr("gsView")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerPoint",{get:function(){return this.gsView.center},set:function(t){this.gsView.center.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewDirectionFromTarget",{get:function(){return this.gsView.viewDirectionFromTarget},set:function(t){this.gsView.viewDirectionFromTarget.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewTarget",{get:function(){return this.gsView.viewTarget},set:function(t){this.gsView.viewTarget.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewHeight",{get:function(){return this.gsView.viewHeight},set:function(t){this.gsView.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewTwistAngle",{get:function(){return this.gsView.viewTwistAngle},set:function(t){this.gsView.viewTwistAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lensLength",{get:function(){return this.gsView.lensLength},set:function(t){this.gsView.lensLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontClippingPlane",{get:function(){return this.gsView.frontClippingPlane},set:function(t){this.gsView.frontClippingPlane=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backClippingPlane",{get:function(){return this.gsView.backClippingPlane},set:function(t){this.gsView.backClippingPlane=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderMode",{get:function(){return this.gsView.renderMode},set:function(t){this.gsView.renderMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewMode",{get:function(){return this.gsView.viewMode},set:function(t){this.gsView.viewMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsIconSetting",{get:function(){return this.gsView.ucsIconSetting},set:function(t){this.gsView.ucsIconSetting=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsOrigin",{get:function(){return this.gsView.ucsOrigin},set:function(t){this.gsView.ucsOrigin.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsXAxis",{get:function(){return this.gsView.ucsXAxis},set:function(t){this.gsView.ucsXAxis.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsYAxis",{get:function(){return this.gsView.ucsYAxis},set:function(t){this.gsView.ucsYAxis.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orthographicType",{get:function(){return this.gsView.orthographicType},set:function(t){this.gsView.orthographicType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadePlotSetting",{get:function(){return this.gsView.shadePlotSetting},set:function(t){this.gsView.shadePlotSetting=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadePlotObjectId",{get:function(){return this.gsView.shadePlotObjectId},set:function(t){this.gsView.shadePlotObjectId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visualStyleObjectId",{get:function(){return this.gsView.visualStyleObjectId},set:function(t){this.gsView.visualStyleObjectId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDefaultLightingOn",{get:function(){return this.gsView.isDefaultLightingOn},set:function(t){this.gsView.isDefaultLightingOn=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultLightingType",{get:function(){return this.gsView.defaultLightingType},set:function(t){this.gsView.defaultLightingType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"brightness",{get:function(){return this.gsView.brightness},set:function(t){this.gsView.brightness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contrast",{get:function(){return this.gsView.contrast},set:function(t){this.gsView.contrast=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ambientColor",{get:function(){return this.gsView.ambientColor},set:function(t){this.gsView.ambientColor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){return this.gsView.aspectRatio},set:function(t){this.gsView.aspectRatio=t},enumerable:!1,configurable:!0}),e})(ni)});function ple(r){var e,t,n=r,i=(e=n.aspectRatio)!==null&&e!==void 0?e:(t=n.gsView)===null||t===void 0?void 0:t.aspectRatio;return Number.isFinite(i)?i:void 0}function fle(r,e){if(Number.isFinite(e)&&e>0)return e;var t=ple(r);return t!=null&&t>0?t:1}function mle(r,e){var t=Math.max(r.min.x,e.min.x),n=Math.max(r.min.y,e.min.y),i=Math.min(r.max.x,e.max.x),o=Math.min(r.max.y,e.max.y);return t>=i||n>=o?0:(i-t)*(o-n)}function z7(r){return{x:(r.min.x+r.max.x)/2,y:(r.min.y+r.max.y)/2}}function gle(r){if(!r||r.isEmpty())return!1;var e=r.max.x-r.min.x,t=r.max.y-r.min.y;return e>0&&t>0}var lle,cle,ule,N7,hle,dle,xu,C0=W(()=>{zt();tt();bi();zA();lle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),cle=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},ule=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},N7=2,hle=.45,dle=1e5;xu=(function(r){lle(e,r);function e(t,n){return t=t||{},er(t,{circleSides:100,lowerLeftCorner:new Z(0,0),upperRightCorner:new Z(1,1),snapBase:new Z(0,0),snapAngle:0,snapSpacing:new Z(0,0),standardFlag:0,gridSpacing:new Z,gridMajor:10,ucsElevation:0}),r.call(this,t,n)||this}return e.isActiveVportName=function(t){return t.toLowerCase()===rl.toLowerCase()},Object.defineProperty(e.prototype,"circleSides",{get:function(){return this.getAttr("circleSides")},set:function(t){this.setAttr("circleSides",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this.centerPoint},set:function(t){this.centerPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lowerLeftCorner",{get:function(){return this.getAttr("lowerLeftCorner")},set:function(t){this.getAttr("lowerLeftCorner").copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"upperRightCorner",{get:function(){return this.getAttr("upperRightCorner")},set:function(t){this.getAttr("upperRightCorner").copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapBase",{get:function(){return this.getAttr("snapBase")},set:function(t){this.getAttr("snapBase").copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapAngle",{get:function(){return this.getAttr("snapAngle")},set:function(t){this.setAttr("snapAngle",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapIncrements",{get:function(){return this.getAttr("snapSpacing")},set:function(t){this.getAttr("snapSpacing").copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridMajor",{get:function(){return this.getAttr("gridMajor")},set:function(t){this.setAttr("gridMajor",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridIncrements",{get:function(){return this.getAttr("gridSpacing")},set:function(t){this.getAttr("gridSpacing").copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"standardFlag",{get:function(){return this.getAttr("standardFlag")},set:function(t){this.setAttr("standardFlag",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapEnabled",{get:function(){return!!(this.standardFlag&256)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundObjectId",{get:function(){return this.getAttrWithoutException("backgroundObjectId")},set:function(t){this.setAttr("backgroundObjectId",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsElevation",{get:function(){return this.getAttr("ucsElevation")},set:function(t){this.setAttr("ucsElevation",t)},enumerable:!1,configurable:!0}),e.prototype.modelViewBox=function(t){var n=this.centerPoint,i=this.viewHeight;if(!(!Number.isFinite(n.x)||!Number.isFinite(n.y)||!Number.isFinite(i)||i<=0)){var o=this.viewTwistAngle,a=n.x,s=n.y;if(Number.isFinite(o)&&o!==0){var l=Math.cos(o),c=Math.sin(o);a=n.x*l-n.y*c,s=n.x*c+n.y*l}var u=this.viewTarget;u&&Number.isFinite(u.x)&&Number.isFinite(u.y)&&(a+=u.x,s+=u.y);var h=fle(this,t),d=i*h,p=i/2,f=d/2;return new ct().expandByPoint({x:a-f,y:s-p}).expandByPoint({x:a+f,y:s+p})}},e.isModelViewBoxUsable=function(t,n){if(t.isEmpty()||n.isEmpty())return!1;var i=t.max.x-t.min.x,o=t.max.y-t.min.y,a=n.max.x-n.min.x,s=n.max.y-n.min.y;if(i<=0||o<=0||a<=0||s<=0||i>a*N7||o>s*N7)return!1;var l=Math.max(a,s)*hle,c=z7(t),u=z7(n),h=Math.hypot(c.x-u.x,c.y-u.y);if(h>l)return!1;var d=i*o,p=mle(t,n);return!(p<=0||p/d<.25)},e.prototype.resolveModelViewBox=function(t,n){var i=this.modelViewBox(t);if(!(!i||!e.isModelViewBoxStructurallyValid(i))){if(gle(n)){if(!e.isModelViewBoxUsable(i,n))return}else if(!e.isModelViewBoxPlausibleWithoutExtents(i))return;return i}},e.isModelViewBoxStructurallyValid=function(t){if(t.isEmpty())return!1;var n=t.max.x-t.min.x,i=t.max.y-t.min.y;return Number.isFinite(n)&&Number.isFinite(i)&&n>0&&i>0},e.isModelViewBoxPlausibleWithoutExtents=function(t){var n=t.max.x-t.min.x,i=t.max.y-t.min.y;return Math.max(n,i)<=dle},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbViewportTableRecord"),t.writeString(2,this.name),t.writeDouble(40,this.gsView.viewHeight),this.gsView.aspectRatio!=null&&Number.isFinite(this.gsView.aspectRatio)&&t.writeDouble(41,this.gsView.aspectRatio),t.writeDouble(45,this.gsView.viewHeight),t.writePoint2d(10,this.lowerLeftCorner),t.writePoint2d(11,this.upperRightCorner),t.writePoint2d(12,this.center),t.writePoint2d(13,this.snapBase),t.writePoint2d(14,this.snapIncrements),t.writePoint2d(15,this.gridIncrements),t.writeInt16(70,this.standardFlag),t.writeInt16(71,this.circleSides),t.writeDouble(42,this.gsView.lensLength),t.writePoint3d(16,this.gsView.viewDirectionFromTarget),t.writePoint3d(17,this.gsView.viewTarget),t.writeAngle(50,this.snapAngle),t.writeAngle(51,this.gsView.viewTwistAngle),t.writeInt16(61,this.gridMajor),t.writeDouble(146,this.ucsElevation),t.writeInt16(170,this.shadePlotSetting),t.writeInt16(282,this.defaultLightingType),t.writeInt16(292,this.isDefaultLightingOn?1:0),t.writeInt16(281,this.backgroundObjectId?1:0),t.writeObjectId(332,this.backgroundObjectId),t.writeObjectId(333,this.shadePlotObjectId),t.writeObjectId(348,this.gsView.visualStyleObjectId),this},e.prototype.dxfInFields=function(t){var n;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbAbstractViewTableRecord"),t.atSubclassData("AcDbViewportTableRecord");for(var i=ule([],cle((n=this.gsView.frozenLayers)!==null&&n!==void 0?n:[]),!1);!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var o=t.readItem();if(!o)break;var a=Number(o.code);if(a===100){t.pushBackItem(o);break}var s=Number(o.value);switch(a){case 2:this.name=String(o.value);break;case 1:this.gsView.styleSheet=String(o.value);break;case 10:this.lowerLeftCorner.x=s;break;case 20:this.lowerLeftCorner.y=s;break;case 11:this.upperRightCorner.x=s;break;case 21:this.upperRightCorner.y=s;break;case 12:this.center.x=s,this.gsView.center.x=s;break;case 22:this.center.y=s,this.gsView.center.y=s;break;case 13:this.snapBase.x=s;break;case 23:this.snapBase.y=s;break;case 14:this.snapIncrements.x=s;break;case 24:this.snapIncrements.y=s;break;case 15:this.gridIncrements.x=s;break;case 25:this.gridIncrements.y=s;break;case 16:this.gsView.viewDirectionFromTarget.x=s;break;case 26:this.gsView.viewDirectionFromTarget.y=s;break;case 36:this.gsView.viewDirectionFromTarget.z=s;break;case 17:this.gsView.viewTarget.x=s;break;case 27:this.gsView.viewTarget.y=s;break;case 37:this.gsView.viewTarget.z=s;break;case 40:case 45:this.gsView.viewHeight=s;break;case 41:Number.isFinite(s)&&s>0&&(this.gsView.aspectRatio=s);break;case 42:this.gsView.lensLength=s;break;case 43:this.gsView.frontClippingPlane=s;break;case 44:this.gsView.backClippingPlane=s;break;case 50:this.snapAngle=s;break;case 51:this.gsView.viewTwistAngle=s;break;case 61:this.gridMajor=s;break;case 70:this.standardFlag=s;break;case 71:s>=1&&s<=2e4&&(this.circleSides=s),this.gsView.viewMode=s;break;case 72:this.circleSides=s;break;case 74:this.gsView.ucsIconSetting=s;break;case 110:this.gsView.ucsOrigin.x=s;break;case 120:this.gsView.ucsOrigin.y=s;break;case 130:this.gsView.ucsOrigin.z=s;break;case 111:this.gsView.ucsXAxis.x=s;break;case 121:this.gsView.ucsXAxis.y=s;break;case 131:this.gsView.ucsXAxis.z=s;break;case 112:this.gsView.ucsYAxis.x=s;break;case 122:this.gsView.ucsYAxis.y=s;break;case 132:this.gsView.ucsYAxis.z=s;break;case 79:this.gsView.orthographicType=s;break;case 281:this.gsView.renderMode=s;break;case 331:case 441:i.push(String(o.value));break;case 332:this.backgroundObjectId=String(o.value);break;case 146:this.ucsElevation=s;break;case 170:this.shadePlotSetting=s;break;case 282:this.defaultLightingType=s;break;case 292:this.isDefaultLightingOn=s!==0;break;case 333:this.shadePlotObjectId=String(o.value);break;case 348:this.gsView.visualStyleObjectId=String(o.value);break;case 73:case 75:case 76:case 77:case 78:case 60:case 65:case 141:case 142:case 63:case 421:case 431:break;default:break}}return this.gsView.frozenLayers=i,this},e})(xp)});var yle,T0,lO=W(()=>{zt();zA();yle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),T0=(function(r){yle(e,r);function e(t,n){var i=this;t=t||{};var o=t.viewWidth!==void 0;return er(t,{standardFlags:0,ucsAssociated:!1,cameraPlottable:!1,ucsElevation:0}),i=r.call(this,t,n)||this,o||(i.viewWidth=i.viewHeight),i}return Object.defineProperty(e.prototype,"standardFlags",{get:function(){return this.getAttr("standardFlags")},set:function(t){this.setAttr("standardFlags",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewWidth",{get:function(){return this.getAttr("viewWidth")},set:function(t){this.setAttr("viewWidth",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsAssociated",{get:function(){return this.getAttr("ucsAssociated")},set:function(t){this.setAttr("ucsAssociated",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cameraPlottable",{get:function(){return this.getAttr("cameraPlottable")},set:function(t){this.setAttr("cameraPlottable",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsElevation",{get:function(){return this.getAttr("ucsElevation")},set:function(t){this.setAttr("ucsElevation",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsObjectId",{get:function(){return this.getAttrWithoutException("ucsObjectId")},set:function(t){this.setAttr("ucsObjectId",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsBaseObjectId",{get:function(){return this.getAttrWithoutException("ucsBaseObjectId")},set:function(t){this.setAttr("ucsBaseObjectId",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundObjectId",{get:function(){return this.getAttrWithoutException("backgroundObjectId")},set:function(t){this.setAttr("backgroundObjectId",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"liveSectionObjectId",{get:function(){return this.getAttrWithoutException("liveSectionObjectId")},set:function(t){this.setAttr("liveSectionObjectId",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sunObjectId",{get:function(){return this.getAttrWithoutException("sunObjectId")},set:function(t){this.setAttr("sunObjectId",t)},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbViewTableRecord"),t.writeString(2,this.name),t.writeInt16(70,this.standardFlags),t.writeDouble(40,this.gsView.viewHeight),t.writePoint2d(10,this.centerPoint),t.writeDouble(41,this.viewWidth),t.writePoint3d(11,this.gsView.viewDirectionFromTarget),t.writePoint3d(12,this.gsView.viewTarget),t.writeDouble(42,this.gsView.lensLength),t.writeDouble(43,this.gsView.frontClippingPlane),t.writeDouble(44,this.gsView.backClippingPlane),t.writeAngle(50,this.gsView.viewTwistAngle),t.writeInt16(71,this.gsView.viewMode),t.writeInt16(281,this.gsView.renderMode),t.writeInt16(72,this.ucsAssociated?1:0),t.writeInt16(73,this.cameraPlottable?1:0),t.writeObjectId(332,this.backgroundObjectId),t.writeObjectId(334,this.liveSectionObjectId),t.writeObjectId(348,this.gsView.visualStyleObjectId),t.writeObjectId(361,this.sunObjectId),this.ucsAssociated&&(t.writePoint3d(110,this.gsView.ucsOrigin),t.writePoint3d(111,this.gsView.ucsXAxis),t.writePoint3d(112,this.gsView.ucsYAxis),t.writeInt16(79,this.gsView.orthographicType),t.writeDouble(146,this.ucsElevation),t.writeObjectId(345,this.ucsObjectId),t.writeObjectId(346,this.ucsBaseObjectId)),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSymbolTableRecord"),t.atSubclassData("AcDbAbstractViewTableRecord"),t.atSubclassData("AcDbViewTableRecord");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}var o=Number(n.value);switch(i){case 2:this.name=String(n.value);break;case 70:this.standardFlags=o;break;case 40:this.gsView.viewHeight=o;break;case 10:this.centerPoint.x=o;break;case 20:this.centerPoint.y=o;break;case 41:this.viewWidth=o;break;case 11:this.gsView.viewDirectionFromTarget.x=o;break;case 21:this.gsView.viewDirectionFromTarget.y=o;break;case 31:this.gsView.viewDirectionFromTarget.z=o;break;case 12:this.gsView.viewTarget.x=o;break;case 22:this.gsView.viewTarget.y=o;break;case 32:this.gsView.viewTarget.z=o;break;case 42:this.gsView.lensLength=o;break;case 43:this.gsView.frontClippingPlane=o;break;case 44:this.gsView.backClippingPlane=o;break;case 50:this.gsView.viewTwistAngle=o*Math.PI/180;break;case 71:this.gsView.viewMode=o;break;case 281:this.gsView.renderMode=o;break;case 72:this.ucsAssociated=o!==0;break;case 73:this.cameraPlottable=o!==0;break;case 332:this.backgroundObjectId=String(n.value);break;case 334:this.liveSectionObjectId=String(n.value);break;case 348:this.gsView.visualStyleObjectId=String(n.value);break;case 361:this.sunObjectId=String(n.value);break;case 110:this.gsView.ucsOrigin.x=o;break;case 120:this.gsView.ucsOrigin.y=o;break;case 130:this.gsView.ucsOrigin.z=o;break;case 111:this.gsView.ucsXAxis.x=o;break;case 121:this.gsView.ucsXAxis.y=o;break;case 131:this.gsView.ucsXAxis.z=o;break;case 112:this.gsView.ucsYAxis.x=o;break;case 122:this.gsView.ucsYAxis.y=o;break;case 132:this.gsView.ucsYAxis.z=o;break;case 79:this.gsView.orthographicType=o;break;case 146:this.ucsElevation=o;break;case 345:this.ucsObjectId=String(n.value);break;case 346:this.ucsBaseObjectId=String(n.value);break;default:break}}return this},e})(xp)});function jA(r){if(r.isByBlock)return kh<<24>>0;if(r.isByLayer)return wp<<24>>0;var e=r.colorIndex;if(e!=null&&e>0&&e<256)return(Sp<<24|e&255)>>0;var t=r.RGB;return t!=null?(_p<<24|t&16777215)>>0:kh<<24>>0}function sa(r){var e=new je(Be.ByBlock),t=r>>>24&255;switch(t){case wp:e.setByLayer();break;case kh:case UA:e.setByBlock();break;case Sp:e.colorIndex=r&255;break;case _p:e.setRGBValue(r&16777215);break;default:r===256?e.setByLayer():r===0?e.setByBlock():r>0&&r<256&&(e.colorIndex=r);break}return e}var wp,kh,_p,Sp,UA,k0=W(()=>{zt();wp=192,kh=193,_p=194,Sp=195,UA=200});function vle(r){var e=r>>24&255;return e===_p?{rgb:r&16777215}:e===wp?{colorIndex:256}:e===kh?{colorIndex:0}:e===Sp?{colorIndex:r&255}:{colorIndex:r&255}}function cO(r){var e;return new G(r.x,r.y,(e=r.z)!==null&&e!==void 0?e:0)}function uO(r){var e;return new k(r.x,r.y,(e=r.z)!==null&&e!==void 0?e:0)}function j7(r){return{x:r[0],y:r[1],z:r[2]}}function hO(r,e){if(e?.length){var t=ds(e);return r!=null&&r>0&&t.length>=r?t.subarray(0,r):t}}var I0,U7,VA,hn,Ap,ble,Mp,V7=W(()=>{zt();tt();Li();bi();k0();dA();I0=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},U7=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},VA=127;(function(r){r[r.Extents=1]="Extents",r[r.Circle=2]="Circle",r[r.Circle3P=3]="Circle3P",r[r.CircularArc=4]="CircularArc",r[r.CircularArc3P=5]="CircularArc3P",r[r.Polyline=6]="Polyline",r[r.Polygon=7]="Polygon",r[r.Mesh=8]="Mesh",r[r.Shell=9]="Shell",r[r.Text=10]="Text",r[r.Text2=11]="Text2",r[r.Xline=12]="Xline",r[r.Ray=13]="Ray",r[r.AttributeColor=14]="AttributeColor",r[r.AttributeLayer=16]="AttributeLayer",r[r.AttributeLinetype=18]="AttributeLinetype",r[r.AttributeMarker=19]="AttributeMarker",r[r.AttributeFill=20]="AttributeFill",r[r.AttributeTrueColor=22]="AttributeTrueColor",r[r.AttributeLineweight=23]="AttributeLineweight",r[r.AttributeLtscale=24]="AttributeLtscale",r[r.AttributeThickness=25]="AttributeThickness",r[r.PushMatrix=29]="PushMatrix",r[r.PopMatrix=31]="PopMatrix",r[r.PolylineWithNormals=32]="PolylineWithNormals",r[r.LwPolyline=33]="LwPolyline",r[r.UnicodeText=36]="UnicodeText",r[r.UnicodeText2=38]="UnicodeText2",r[r.EllipticArc=44]="EllipticArc"})(hn||(hn={}));Ap=G.Z_AXIS,ble=529;Mp=(function(){function r(e,t){t===void 0&&(t={});var n=this,i,o,a;this._index=8,this._colorIndex=256,this._layer="0",this._linetype=Vn,this._lineweight=$r.ByLineWeightDefault,this._ltscale=1,this._thickness=0,this._fill=!1,this._layers=[],this._linetypes=[],this._matrices=[],this._buffer=e,this._database=t.database,this._dxfversion=(i=t.dxfversion)!==null&&i!==void 0?i:"AC1015",this._encoding=(o=t.encoding)!==null&&o!==void 0?o:this._dxfversion<"AC1024"?"windows-1252":"utf-8",this._layer=(a=t.defaultLayer)!==null&&a!==void 0?a:"0",this._database&&(this._database.tables.layerTable.newIterator().toArray().forEach(function(s){return n._layers.push(s.name)}),this._database.tables.linetypeTable.newIterator().toArray().forEach(function(s){return n._linetypes.push(s.name)}))}return Object.defineProperty(r.prototype,"extents",{get:function(){return this._extents},enumerable:!1,configurable:!0}),r.prototype.scanExtents=function(){for(var e,t=this._buffer,n=this._index;n<t.length;){var i=new DataView(t.buffer,t.byteOffset+n,8),o=i.getUint32(0,!0),a=i.getUint32(4,!0);if(o<8)break;if(a===hn.Extents){var s=t.subarray(n+8,n+o);return this.readExtents(s),((e=this._extents)===null||e===void 0?void 0:e.length)===2?[this._extents[0],this._extents[1]]:void 0}n+=o}},r.prototype.worldDraw=function(e){for(var t=[],n=e.subEntityTraits,i={color:n.color.clone(),lineType:n.lineType,lineTypeScale:n.lineTypeScale,lineWeight:n.lineWeight,layer:n.layer,thickness:n.thickness},o=this._buffer,a=this._index;a<o.length;){var s=new DataView(o.buffer,o.byteOffset+a,8),l=s.getUint32(0,!0),c=s.getUint32(4,!0);if(l<8)break;var u=o.subarray(a+8,a+l);this.dispatchChunk(e,t,c,u),c!==hn.AttributeFill&&(this._fill=!1),a+=l}if(n.color=i.color,n.lineType=i.lineType,n.lineTypeScale=i.lineTypeScale,n.lineWeight=i.lineWeight,n.layer=i.layer,n.thickness=i.thickness,t.length!==0)return e.group(t)},r.prototype.dispatchChunk=function(e,t,n,i){switch(n){case hn.Extents:this.readExtents(i);break;case hn.Circle:this.drawCircle(e,t,i);break;case hn.Circle3P:this.drawCircle3P(e,t,i);break;case hn.CircularArc:this.drawCircularArc(e,t,i);break;case hn.CircularArc3P:this.drawCircularArc3P(e,t,i);break;case hn.EllipticArc:this.drawEllipticArc(e,t,i);break;case hn.Polyline:this.drawPolyline(e,t,i,!1);break;case hn.PolylineWithNormals:this.drawPolyline(e,t,i,!0);break;case hn.Polygon:this.drawPolygon(e,t,i);break;case hn.LwPolyline:this.drawLwPolyline(e,t,i);break;case hn.Shell:this.drawShell(e,t,i);break;case hn.Text:this.drawText(e,t,i,!1);break;case hn.UnicodeText:this.drawText(e,t,i,!0);break;case hn.Text2:this.drawText2(e,t,i,!1);break;case hn.UnicodeText2:this.drawText2(e,t,i,!0);break;case hn.Xline:this.drawXline(e,t,i,!1);break;case hn.Ray:this.drawXline(e,t,i,!0);break;case hn.AttributeColor:this.readAttributeColor(i);break;case hn.AttributeLayer:this.readAttributeLayer(i);break;case hn.AttributeLinetype:this.readAttributeLinetype(i);break;case hn.AttributeFill:this.readAttributeFill(i);break;case hn.AttributeTrueColor:this.readAttributeTrueColor(i);break;case hn.AttributeLineweight:this.readAttributeLineweight(i);break;case hn.AttributeLtscale:this.readAttributeLtscale(i);break;case hn.AttributeThickness:this.readAttributeThickness(i);break;case hn.PushMatrix:this.pushMatrix(i);break;case hn.PopMatrix:this.popMatrix();break;default:break}},r.prototype.applyTraits=function(e){var t=e.subEntityTraits;t.layer=this._layer,t.lineTypeScale=this._ltscale,t.thickness=this._thickness,t.lineWeight=this._lineweight,this._rgbColor!=null?t.color=new je(Be.ByColor,this._rgbColor):this._colorIndex===256?t.color=new je(Be.ByLayer):this._colorIndex===0?t.color=new je(Be.ByBlock):this._colorIndex===7?t.color=new je(Be.ByACI,7):t.color=new je(Be.ByACI,this._colorIndex),t.lineType={name:this._linetype,type:this.resolveLineStyleType(),standardFlag:0,description:"",totalPatternLength:0}},r.prototype.resolveLineStyleType=function(){return this._linetype===Vn?"ByLayer":this._linetype===eo?"ByBlock":"UserSpecified"},r.prototype.transformPoint=function(e){var t=Array.isArray(e)?j7(e):e,n=uO(t);return this._matrices.length>0&&n.applyMatrix4(this._matrices[this._matrices.length-1]),n},r.prototype.transformVector=function(e){var t=Array.isArray(e)?j7(e):e,n=cO(t);return this._matrices.length>0&&n.transformDirection(this._matrices[this._matrices.length-1]),!Number.isFinite(n.lengthSq())||n.lengthSq()<1e-24?Ap.clone():n.normalize()},r.prototype.pushEntity=function(e,t){t&&e.push(t)},r.prototype.readExtents=function(e){var t=new to(e),n=t.readVertex(),i=t.readVertex();this._extents=[new k(n[0],n[1],n[2]),new k(i[0],i[1],i[2])]},r.prototype.readAttributeColor=function(e){var t=new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0);this._rgbColor=void 0,this._colorIndex=t>256||t<0?256:t},r.prototype.readAttributeLayer=function(e){var t=new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0);t<this._layers.length&&(this._layer=this._layers[t])},r.prototype.readAttributeLinetype=function(e){var t=new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0);t+2<this._linetypes.length?this._linetype=this._linetypes[t+2]:t===32766?this._linetype=eo:this._linetype=Vn},r.prototype.readAttributeFill=function(e){this._fill=new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)!==0},r.prototype.readAttributeTrueColor=function(e){var t=new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0),n=vle(t);this._rgbColor=n.rgb,n.colorIndex!=null&&(this._colorIndex=n.colorIndex)},r.prototype.readAttributeLineweight=function(e){var t=new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0);t>ble?this._lineweight=t-4294967296:this._lineweight=t},r.prototype.readAttributeLtscale=function(e){this._ltscale=new DataView(e.buffer,e.byteOffset,8).getFloat64(0,!0)},r.prototype.readAttributeThickness=function(e){this._thickness=new DataView(e.buffer,e.byteOffset,8).getFloat64(0,!0)},r.prototype.pushMatrix=function(e){var t=new Float64Array(e.buffer,e.byteOffset,16),n=new Ie().fromArray(Array.from(t));n.transpose(),this._matrices.push(n)},r.prototype.popMatrix=function(){this._matrices.length>0&&this._matrices.pop()},r.prototype.loadVertices=function(e,t){var n=new to(e),i=n.readLong();t&&(i+=1);for(var o=[];i>0;){var a=I0(n.readVertex(),3),s=a[0],l=a[1],c=a[2];o.push(this.transformPoint({x:s,y:l,z:c})),i-=1}var u=Ap;return t&&o.length>0&&(u=cO(o.pop())),{vertices:o,normal:u}},r.prototype.drawCircle=function(e,t,n){var i=new to(n),o=i.readVertex(),a=i.readFloat(),s=this.transformVector(i.readVertex()),l=uO({x:o[0],y:o[1],z:o[2]});s.equals(Ap)||(l=dr(l,s)),l=this.transformPoint(l);var c=Ea(s),u=new Pn(Er(l,s),a,0,Ge,s,c);this.applyTraits(e),this.pushEntity(t,e.circularArc(u))},r.prototype.drawCircle3P=function(e,t,n){var i=new to(n),o=this.transformPoint(i.readVertex()),a=this.transformPoint(i.readVertex()),s=this.transformPoint(i.readVertex()),l=Pn.computeCenterPoint(o,a,s);if(l){var c=l.distanceTo(o),u=new Pn(l,c,0,Ge,Ap);this.applyTraits(e),this.pushEntity(t,e.circularArc(u))}},r.prototype.drawCircularArc=function(e,t,n){var i=new to(n),o=i.readVertex(),a=i.readFloat(),s=i.readVertex(),l=i.readVertex(),c=i.readFloat(),u=this.transformVector(s),h=uO({x:o[0],y:o[1],z:o[2]}),d=cO({x:l[0],y:l[1],z:l[2]});this._matrices.length>0&&d.transformDirection(this._matrices[this._matrices.length-1]);var p=Number.isFinite(d.lengthSq())&&d.lengthSq()>=1e-24?d.normalize():Ea(u),f=0,m=c,g=new Pn(this.transformPoint(h),a,f,m,u,p);this.applyTraits(e),this.pushEntity(t,e.circularArc(g))},r.prototype.drawCircularArc3P=function(e,t,n){var i=new to(n),o=this.transformPoint(i.readVertex()),a=this.transformPoint(i.readVertex()),s=this.transformPoint(i.readVertex()),l=Pn.computeCenterPoint(o,s,a);if(l){var c=l.distanceTo(o),u=To(l,o,Ap),h=To(l,s,Ap),d=new Pn(l,c,u,h,Ap);this.applyTraits(e),this.pushEntity(t,e.circularArc(d))}},r.prototype.drawEllipticArc=function(e,t,n){var i=new to(n),o=this.transformPoint(i.readVertex()),a=this.transformVector(i.readVertex()),s=i.readFloat(),l=i.readFloat(),c=i.readFloat(),u=i.readFloat(),h=i.readFloat(),d=Er({x:Math.cos(h)*s,y:Math.sin(h)*s,z:0},a),p=new yi(o,a,d,s,l,c,u);this.applyTraits(e),this.pushEntity(t,e.ellipticalArc(p))},r.prototype.drawPolyline=function(e,t,n,i){var o,a,s,l,c=this.loadVertices(n,i).vertices;if(c.length!==0){if(c.length===1){this.applyTraits(e);var u=(a=(o=this._database)===null||o===void 0?void 0:o.pdmode)!==null&&a!==void 0?a:0,h=(l=(s=this._database)===null||s===void 0?void 0:s.pdsize)!==null&&l!==void 0?l:0;this.pushEntity(t,e.point(c[0],{displayMode:u,displaySize:h}));return}this.applyTraits(e),this.pushEntity(t,e.lines(c))}},r.prototype.drawPolygon=function(e,t,n){var i=this.loadVertices(n,!1).vertices;if(!(i.length<2)){if(this._fill){var o=new Ot(i.map(function(c){return{x:c.x,y:c.y}}),!0),a=new pr;a.add(o);var s=e.subEntityTraits;s.fillType={solidFill:!0,patternAngle:0,definitionLines:[]},s.drawOrder=-1,this.applyTraits(e),this.pushEntity(t,e.area(a));return}var l=U7(U7([],I0(i),!1),[i[0]],!1);this.applyTraits(e),this.pushEntity(t,e.lines(l))}},r.prototype.drawLwPolyline=function(e,t,n){var i=new eg(n,this._dxfversion,this._encoding),o=0,a=!1;i.readUnsignedLong();var s=i.readBitShort();s&8&&(o=i.readBitDouble()),s&512&&(a=!0);var l=i.readBitLong();if(!(l<=0)){var c=s&16?i.readBitLong():0;this._dxfversion>="AC1024"&&(s&1024&&i.readBitLong(),s&32&&i.readBitLong());for(var u=i.readRawDouble(2),h=[this.transformPoint({x:u[0],y:u[1],z:o})],d=u,p=1;p<l;p++){var f=i.readBitDoubleDefault(1,d[0]),m=i.readBitDoubleDefault(1,d[1]);d=[f,m],h.push(this.transformPoint({x:f,y:m,z:o}))}for(var p=0;p<c;p++)i.readBitDouble();a&&h.length>1&&h.push(h[0].clone()),this.applyTraits(e),this.pushEntity(t,e.lines(h))}},r.prototype.drawShell=function(e,t,n){for(var i=new to(n),o=i.readLong(),a=[],s=0;s<o;s++){var l=I0(i.readVertex(),3),c=l[0],u=l[1],h=l[2];a.push(this.transformPoint({x:c,y:u,z:h}))}for(var d=i.readLong(),p=[],f=0;f<d;){var m=Math.abs(i.readSignedLong());f+=1+m;for(var g=[],s=0;s<m;s++)g.push(i.readLong());var y=g.map(function(b){return a[b]}).filter(Boolean);if(y.length>=3)for(var s=0;s<y.length;s++)p.push(y[s]),p.push(y[(s+1)%y.length])}p.length!==0&&(this.applyTraits(e),this.pushEntity(t,e.lines(p)))},r.prototype.drawText=function(e,t,n,i){var o=new to(n),a=this.transformPoint(o.readVertex()),s=this.transformVector(o.readVertex()),l=this.transformVector(o.readVertex()),c=I0(o.readStruct([8,8,8]),3),u=c[0],h=c[1],d=c[2],p=i?o.readPaddedUnicodeString():o.readPaddedString(this._encoding);this.drawTextPrimitive(e,t,{insert:a,normal:s,textDirection:l,text:p,height:u,widthFactor:h,obliqueAngle:d})},r.prototype.drawText2=function(e,t,n,i){var o=new to(n),a=this.transformPoint(o.readVertex()),s=this.transformVector(o.readVertex()),l=this.transformVector(o.readVertex()),c=i?o.readPaddedUnicodeString():o.readPaddedString(this._encoding);o.readSignedLong(),o.readSignedLong();var u=I0(o.readStruct([8,8,8]),3),h=u[0],d=u[1],p=u[2];o.readFloat(),this.drawTextPrimitive(e,t,{insert:a,normal:s,textDirection:l,text:c,height:h,widthFactor:d,obliqueAngle:p})},r.prototype.drawTextPrimitive=function(e,t,n){var i=Math.atan2(n.textDirection.y,n.textDirection.x),o={text:n.text,height:n.height,width:1/0,widthFactor:n.widthFactor,position:n.insert,rotation:i*180/Math.PI,drawingDirection:Cr.BOTTOM_TO_TOP,attachmentPoint:ut.BaselineLeft},a={name:cn,standardFlag:0,fixedTextHeight:0,widthFactor:n.widthFactor,obliqueAngle:n.obliqueAngle*180/Math.PI,textGenerationFlag:0,lastHeight:n.height,font:"txt",bigFont:""};this.applyTraits(e),this.pushEntity(t,e.mtext(o,a))},r.prototype.drawXline=function(e,t,n,i){var o=new to(n),a=this.transformPoint(o.readVertex()),s=this.transformPoint(o.readVertex()),l=new G().subVectors(s,a);if(l.lengthSq()!==0){var c=1e6,u=i?a.clone().add(l.normalize().multiplyScalar(c)):a.clone().sub(l.normalize().multiplyScalar(c)),h=s.clone().add(l.normalize().multiplyScalar(c));this.applyTraits(e),this.pushEntity(t,e.lines([u,h]))}},r})()});var wu=W(()=>{V7();dA()});function GA(r){return String(r).trim().toUpperCase()}function wle(r){for(var e,t,n,i,o={};!r.atEndOfObject&&!r.atEof;){var a=r.readItem();if(!a)break;var s=Number(a.code);switch(s){case 320:n=GA(String(a.value));break;case 2:i=String(a.value),(e=o[i])!==null&&e!==void 0||(o[i]=[]);break;case 310:i&&(a.value instanceof Uint8Array?o[i].push(a.value):o[i].push(String(a.value)));break;default:break}}return{ownerHandle:n,hexChunks:(t=o[xle])!==null&&t!==void 0?t:[]}}function G7(r){for(var e={};!r.atEof;){var t=r.peekItem();if(!t)break;if(Number(t.code)!==0){r.readItem();continue}var n=String(t.value).toUpperCase();if(n==="ENDSEC"||n==="EOF"){r.readItem();break}if(r.readItem(),n==="ACDSRECORD"){var i=wle(r);if(i.ownerHandle&&i.hexChunks.length>0){var o=ds(i.hexChunks);o.length>0&&(e[i.ownerHandle]=o)}}else r.skipToEndOfObject()}return{byOwnerHandle:e}}var xle,H7=W(()=>{wu();xle="ASM_Data"});function L0(r,e){for(;!r.atEof;){var t=r.peekItem();if(!t)break;if(Number(t.code)===0){var n=String(t.value).toUpperCase();if(n==="ENDSEC"){r.readItem();break}break}if(r.readItem(),Number(t.code)===9){var i=String(t.value).toUpperCase();_le(r,e,i)}}}function _le(r,e,t){var n,i,o,a,s,l,c,u,h,d,p;switch(t){case"$ACADVER":{var f=ec(r);f&&(e.version=f);break}case"$DWGCODEPAGE":{var f=ec(r);f&&(e.dwgCodePage=f);break}case"$CECOLOR":{var m=tr(r);e.cecolor.colorIndex=m??256;break}case"$ANGBASE":e.angbase=(n=tr(r))!==null&&n!==void 0?n:0;break;case"$ANGDIR":e.angdir=(i=tr(r))!==null&&i!==void 0?i:0;break;case"$AUNITS":{var m=tr(r);m!=null&&(e.aunits=m);break}case"$AUPREC":{var m=tr(r);m!=null&&(e.auprec=m);break}case"$LUNITS":{var m=tr(r);m!=null&&(e.lunits=m);break}case"$LUPREC":{var m=tr(r);m!=null&&(e.luprec=m);break}case"$UNITMODE":{var m=tr(r);m!=null&&(e.unitmode=m);break}case"$MEASUREMENT":{var m=tr(r);m!=null&&(e.measurement=m);break}case"$CELTYPE":e.celtype=ec(r)||Vn;break;case"$CETRANSPARENCY":{W7(r,e,oe.CETRANSPARENCY);break}case"$CELTSCALE":e.celtscale=(o=tr(r))!==null&&o!==void 0?o:1;break;case"$CELWEIGHT":{var m=tr(r);m!=null&&(e.celweight=m);break}case"$LWDISPLAY":e.lwdisplay=((a=tr(r))!==null&&a!==void 0?a:0)!==0;break;case"$TILEMODE":e.tilemode=((s=tr(r))!==null&&s!==void 0?s:1)!==0;break;case"$PSLTSCALE":e.psltscale=((l=tr(r))!==null&&l!==void 0?l:1)!==0;break;case"$CMLSTYLE":case"CMLSTYLE":e.cmlstyle=ec(r)||Lo;break;case"$CMLSCALE":case"CMLSCALE":{var m=tr(r);m!=null&&Number.isFinite(m)&&(e.cmlscale=m);break}case"$CMLEADERSTYLE":case"CMLEADERSTYLE":e.cmleaderstyle=ec(r)||Oo;break;case"$HPLAYER":case"HPLAYER":e.hplayer=ec(r)||".";break;case"$HPTRANSPARENCY":{W7(r,e,oe.HPTRANSPARENCY);break}case"$LTSCALE":e.ltscale=(c=tr(r))!==null&&c!==void 0?c:1;break;case"$EXTMAX":{var g=X7(r);g&&(e.extmax=g);break}case"$EXTMIN":{var g=X7(r);g&&(e.extmin=g);break}case"$INSUNITS":{var m=tr(r);m!=null&&(e.insunits=m);break}case"$OSMODE":e.osmode=(u=tr(r))!==null&&u!==void 0?u:0;break;case"$ORTHOMODE":e.orthomode=(h=tr(r))!==null&&h!==void 0?h:0;break;case"$COMPAREHATCH":{var m=wh(tr(r),iu,ou);m!=null&&(e.comparehatch=m);break}case"$COMPARERCMARGIN":{var m=wh(tr(r),au,su);m!=null&&(e.comparercmargin=m);break}case"$COMPARETEXT":{var m=wh(tr(r),lu,cu);m!=null&&(e.comparetext=m);break}case"$COMPARETOLERANCE":{var m=wh(tr(r),uu,hu);m!=null&&(e.comparetolerance=m);break}case"$PDMODE":e.pdmode=(d=tr(r))!==null&&d!==void 0?d:0;break;case"$PDSIZE":e.pdsize=(p=tr(r))!==null&&p!==void 0?p:0;break;case"$TEXTSTYLE":e.textstyle=ec(r)||cn;break;case"$DIMSTYLE":e.dimstyle=ec(r)||cn;break;case"$CLAYER":e.clayer=ec(r)||"0";break;case"$HANDSEED":{var f=ec(r);f&&e.initializeHandleSeed(f);break}default:Sle(r);break}}function ec(r){var e=r.readItem();if(e){if(Number(e.code)===9||Number(e.code)===0){r.pushBackItem(e);return}return String(e.value)}}function tr(r){var e=r.readItem();if(e){if(Number(e.code)===9||Number(e.code)===0){r.pushBackItem(e);return}var t=Number(e.value);return Number.isFinite(t)?t:void 0}}function W7(r,e,t){var n=r.readItem();if(!n||Number(n.code)===9||Number(n.code)===0){n&&r.pushBackItem(n),gt.instance().setVar(t,"ByLayer",e);return}var i=Number(n.code),o=String(n.value).trim();if(o===""){gt.instance().setVar(t,"ByLayer",e);return}if(i===440){var a=Number(o);gt.instance().setVar(t,Number.isFinite(a)?a:"ByLayer",e);return}gt.instance().setVar(t,o,e)}function X7(r){for(var e=0,t=0,n=0,i=!1;!r.atEof;){var o=r.peekItem();if(!o)break;var a=Number(o.code);if(a===9||a===0)break;r.readItem();var s=Number(o.value);a===10?(e=s,i=!0):a===20?(t=s,i=!0):a===30&&(n=s,i=!0)}return i?new k(e,t,n):void 0}function Sle(r){for(;!r.atEof;){var e=r.peekItem();if(!e)break;var t=Number(e.code);if(t===9||t===0)break;r.readItem()}}var dO=W(()=>{tt();yp();Ql();bi()});var O0,pO=W(()=>{O0=(function(){function r(e){this._expression=e}return Object.defineProperty(r.prototype,"expression",{get:function(){return this._expression},enumerable:!1,configurable:!0}),r})()});function Ale(r,e){var t=r.trim();if(!t)return!0;var n=Y7(t,"OR");return n.some(function(i){var o=Y7(i,"AND");return o.every(function(a){return Mle(a,e)})})}function Y7(r,e){var t=new RegExp("\\s+".concat(e,"\\s+"),"i");return r.split(t).map(function(n){return n.trim()}).filter(function(n){return n.length>0})}function Mle(r,e){var t,n=r.trim().match(/^([A-Za-z_]+)\s*(==|=)\s*"?(.*?)"?\s*$/);if(!n)return!1;var i=n[1].toUpperCase(),o=n[3],a=Ele(o);switch(i){case"NAME":return Ple(e.name,o);case"LOCKED":return a!=null?e.isLocked===a:!1;case"FROZEN":return a!=null?e.isFrozen===a:!1;case"OFF":return a!=null?e.isOff===a:!1;case"PLOT":return a!=null?e.isPlottable===a:!1;case"COLOR":{var s=(t=e.color)===null||t===void 0?void 0:t.colorIndex;return s!=null&&String(s)===o}case"LINETYPE":return e.linetype.localeCompare(o,void 0,{sensitivity:"accent"})===0;default:return!1}}function Ple(r,e){if(!/[*?]/.test(e))return r.localeCompare(e,void 0,{sensitivity:"accent"})===0;var t=new RegExp("^".concat(e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,"."),"$"),"i");return t.test(r)}function Ele(r){var e=r.trim().toLowerCase();return e==="true"||e==="1"?!0:e==="false"||e==="0"?!1:null}var gg,_u,D0=W(()=>{pO();(function(r){r[r.Cancel=0]="Cancel",r[r.Ok=1]="Ok"})(gg||(gg={}));_u=(function(){function r(){this._name="",this._filterExpression="",this._nestedFilters=[],this._parent=null,this._allowDelete=!0,this._allowRename=!0,this._dynamicallyGenerated=!1,this._isProxy=!1}return Object.defineProperty(r.prototype,"name",{get:function(){return this._name},set:function(e){this.setName(e)},enumerable:!1,configurable:!0}),r.prototype.setName=function(e){return!this.allowRename()&&this._name.length>0?!1:(this._name=e,!0)},Object.defineProperty(r.prototype,"filterExpression",{get:function(){return this._filterExpression},set:function(e){this.setFilterExpression(e)},enumerable:!1,configurable:!0}),r.prototype.setFilterExpression=function(e){return this.isIdFilter()?!1:(this._filterExpression=e??"",!0)},r.prototype.filterExpressionTree=function(){return this.isIdFilter()||!this._filterExpression?null:new O0(this._filterExpression)},r.prototype.getNestedFilters=function(){return this._nestedFilters},Object.defineProperty(r.prototype,"nestedFilters",{get:function(){return this._nestedFilters},enumerable:!1,configurable:!0}),r.prototype.parent=function(){return this._parent},r.prototype.isIdFilter=function(){return!1},r.prototype.allowNested=function(){return!0},r.prototype.allowDelete=function(){return this._allowDelete},r.prototype.setAllowDelete=function(e){this._allowDelete=e},r.prototype.allowRename=function(){return this._allowRename},r.prototype.setAllowRename=function(e){this._allowRename=e},r.prototype.dynamicallyGenerated=function(){return this._dynamicallyGenerated},r.prototype.setDynamicallyGenerated=function(e){this._dynamicallyGenerated=e},r.prototype.isProxy=function(){return this._isProxy},r.prototype.setIsProxy=function(e){this._isProxy=e},r.prototype.addNested=function(e){if(!e||e===this||!this.allowNested())return!1;var t=this._parent==null;return!t&&!this.isIdFilter()&&e.isIdFilter()||this._nestedFilters.includes(e)?!1:(e._parent&&e._parent.removeNested(e),e._parent=this,this._nestedFilters.push(e),!0)},r.prototype.removeNested=function(e){var t=this._nestedFilters.indexOf(e);return t<0?!1:(this._nestedFilters.splice(t,1),e._parent===this&&(e._parent=null),!0)},r.prototype.generateNested=function(){return!1},r.prototype.compareTo=function(e){return e?this.isIdFilter()===e.isIdFilter()&&this._name===e._name&&this._filterExpression===e._filterExpression:!1},r.prototype.filter=function(e){return e?this._filterExpression?Ale(this._filterExpression,e):!0:!1},r.prototype.showEditor=function(){return gg.Cancel},r})()});var tc,HA=W(()=>{D0();tc=(function(){function r(e,t){this._root=e??r.createDefaultRoot(),this._current=t===void 0?this._root:t}return r.createDefaultRoot=function(){var e=new _u;return e.setName("All"),e.setAllowDelete(!1),e.setAllowRename(!1),e.setFilterExpression(""),e},Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"current",{get:function(){return this._current},set:function(e){this._current=e},enumerable:!1,configurable:!0}),r.prototype.clone=function(){return new r(this._root,this._current)},r})()});var Cle,R0,fO=W(()=>{D0();Cle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),R0=(function(r){Cle(e,r);function e(){var t=r.call(this)||this;return t._layerIds=[],t}return e.prototype.isIdFilter=function(){return!0},e.prototype.layerIds=function(){return this._layerIds},Object.defineProperty(e.prototype,"layerIdList",{get:function(){return this._layerIds},enumerable:!1,configurable:!0}),e.prototype.addLayerId=function(t){return!t||this._layerIds.includes(t)?!1:(this._layerIds.push(t),!0)},e.prototype.removeLayerId=function(t){var n=this._layerIds.indexOf(t);return n<0?!1:(this._layerIds.splice(n,1),!0)},e.prototype.filter=function(t){return t?this._layerIds.includes(t.objectId):!1},e.prototype.setFilterExpression=function(t){return!1},e})(_u)});function B0(r){var e,t,n,i,o=tc.createDefaultRoot(),a=new tc(o,o),s=$7(r,Au),l=$7(r,Pp);if(s){try{for(var c=gs(Object.entries(s.entries)),u=c.next();!u.done;u=c.next()){var h=WA(u.value,2),d=h[0],p=h[1],f=mO(r,p,d);f&&o.addNested(f)}}catch(b){e={error:b}}finally{try{u&&!u.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}return a}if(l)try{for(var m=gs(Object.entries(l.entries)),g=m.next();!g.done;g=m.next()){var y=WA(g.value,2),d=y[0],p=y[1],f=mO(r,p,d);f&&o.addNested(f)}}catch(b){n={error:b}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}return a}function F0(r){var e,t,n=[];try{for(var i=gs(r.root.getNestedFilters()),o=i.next();!o.done;o=i.next()){var a=o.value;n.push(K7(a))}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return{nodes:n}}function N0(r){var e,t,n=new tl;try{for(var i=gs(r),o=i.next();!o.done;o=i.next()){var a=o.value;n.add({code:a.code,value:a.value})}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n}function gO(r){return r?r.toArray().map(function(e){return{code:Number(e.code),value:e.value}}):[]}function $7(r,e){var t,n,i;try{for(var o=gs(r.dictionaries.values()),a=o.next();!a.done;a=o.next()){var s=a.value,l=s.entries[e];if(l){var c=r.dictionaries.get(Su(l));if(c){var u=s.ownerObjectId?r.xrecords.has(Su(s.ownerObjectId)):!1;if(!u)return c;i=c}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function mO(r,e,t){var n,i,o,a,s=r.xrecords.get(Su(e));if(s){var l=XA(s.data,t),c=l.isIdFilter?new R0:new _u;if(c.setAllowRename(!0),c.setName(l.name||t),!l.isIdFilter)c.setFilterExpression(l.filterExpression);else{var u=c;try{for(var h=gs(l.layerIds),d=h.next();!d.done;d=h.next()){var p=d.value;u.addLayerId(p)}}catch(b){n={error:b}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}try{for(var f=gs(Tle(r,s)),m=f.next();!m.done;m=f.next()){var g=m.value,y=mO(r,g.handle,g.key);y&&c.addNested(y)}}catch(b){o={error:b}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}return c}}function Tle(r,e){var t,n,i,o,a,s,l=[],c=new Set,u=Su(e.handle),h=e.extensionDictionaryId?Su(e.extensionDictionaryId):void 0,d=function(L,O){var D=Su(O);c.has(D)||(c.add(D),l.push({key:L,handle:O}))};try{for(var p=gs(r.dictionaries.values()),f=p.next();!f.done;f=p.next()){var m=f.value,g=m.ownerObjectId?Su(m.ownerObjectId):void 0;if(g){var y=g===u||g===h;if(y){var b=m.entries[Au];if(b){var v=r.dictionaries.get(Su(b));if(v){try{for(var x=(i=void 0,gs(Object.entries(v.entries))),w=x.next();!w.done;w=x.next()){var _=WA(w.value,2),A=_[0],E=_[1];d(A,E)}}catch(L){i={error:L}}finally{try{w&&!w.done&&(o=x.return)&&o.call(x)}finally{if(i)throw i.error}}continue}}try{for(var S=(a=void 0,gs(Object.entries(m.entries))),M=S.next();!M.done;M=S.next()){var T=WA(M.value,2),A=T[0],E=T[1];A===Au||A===Pp||d(A,E)}}catch(L){a={error:L}}finally{try{M&&!M.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}}}}}catch(L){t={error:L}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return l}function XA(r,e){var t,n,i;e===void 0&&(e="");var o=[],a=[],s=0,l,c,u;try{for(var h=gs(r),d=h.next();!d.done;d=h.next()){var p=d.value,f=Number(p.code),m=p.value;f===1&&typeof m=="string"?o.push(m):f===300&&typeof m=="string"?c=m:f===301&&typeof m=="string"?u=m:f===70||f===90?s=Number(m)||0:f===290||f===280?l=Number(m)===1:(f===330||f===340||f===350||f===360)&&m!=null&&String(m).length>0&&a.push(Su(String(m)))}}catch(_){t={error:_}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}var g=o[0],y=g==="AcLyLayerFilter"||g==="AcLyLayerGroup",b=c||(y?void 0:g)||e,v=(i=o[1])!==null&&i!==void 0?i:"",x=u??v;!u&&x&&x!=="*"&&!/==/.test(x)&&(x='NAME=="'.concat(x,'"'));var w=u!=null&&u.length>0?!1:l===!0&&a.length>0?!0:a.length>0&&(x.length===0||x==="*");return{name:b,filterExpression:w?"":x,flags:s,layerIds:a,isIdFilter:w}}function K7(r){var e=r.isIdFilter(),t=YA(r),n=r.getNestedFilters().map(function(o){return K7(o)}),i=r.name||(e?"Group":"Filter");return{key:i,isIdFilter:e,data:t,children:n}}function YA(r){var e,t,n=[];if(n.push({code:1,value:r.name}),r.isIdFilter()){n.push({code:1,value:""}),n.push({code:1,value:"*"}),n.push({code:1,value:"*"}),n.push({code:70,value:0}),n.push({code:1,value:"*"}),n.push({code:1,value:"*"}),n.push({code:290,value:1});var i=r;try{for(var o=gs(i.layerIds()),a=o.next();!a.done;a=o.next()){var s=a.value;n.push({code:330,value:s})}}catch(l){e={error:l}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}else n.push({code:1,value:r.filterExpression||"*"}),n.push({code:1,value:"*"}),n.push({code:1,value:"*"}),n.push({code:70,value:0}),n.push({code:1,value:"*"}),n.push({code:1,value:"*"}),n.push({code:290,value:0});return n}function Su(r){return r.trim().toUpperCase()}var gs,WA,Pp,Au,$A=W(()=>{Wv();D0();HA();fO();gs=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},WA=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Pp="ACAD_LAYERFILTERS",Au="ACLYDICTIONARY"});var kle,Ile,Lle,yg,yO=W(()=>{gr();kle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Ile=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Lle=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},yg=(function(r){kle(e,r);function e(){var t=r.apply(this,Lle([],Ile(arguments),!1))||this;return t._schema=0,t._value="",t}return Object.defineProperty(e.prototype,"schema",{get:function(){return this._schema},set:function(t){this._schema=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("DictionaryVariables"),t.writeInt16(280,this._schema),t.writeString(1,this._value),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("DictionaryVariables")||t.atSubclassData("AcDbDictionaryVar");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}switch(i){case 280:this._schema=Number(n.value);break;case 1:this._value=String(n.value);break;default:break}}return this},e})(Kt)});var Ole,q7,Z7,Dle,z0,bO=W(()=>{gr();Ole=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),q7=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Z7=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Dle=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},z0=(function(r){Ole(e,r);function e(){var t=r.apply(this,Z7([],q7(arguments),!1))||this;return t._name="",t._unnamed=!1,t._selectable=!0,t._entityIds=[],t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unnamed",{get:function(){return this._unnamed},set:function(t){this._unnamed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectable",{get:function(){return this._selectable},set:function(t){this._selectable=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"entityIds",{get:function(){return this._entityIds},set:function(t){this._entityIds=Z7([],q7(t),!1)},enumerable:!1,configurable:!0}),e.prototype.addEntityId=function(t){this._entityIds.push(t)},e.prototype.dxfOutFields=function(t){var n,i;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbGroup"),this.name&&t.writeString(300,this.name),t.writeInt16(70,this.unnamed?1:0),t.writeInt16(71,this.selectable?1:0);try{for(var o=Dle(this._entityIds),a=o.next();!a.done;a=o.next()){var s=a.value;t.writeObjectId(340,s)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbGroup"),this._entityIds=[];!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}switch(i){case 300:this._name=String(n.value);break;case 70:this._unnamed=Number(n.value)!==0;break;case 71:this._selectable=Number(n.value)!==0;break;case 340:this._entityIds.push(String(n.value));break;default:break}}return this},e})(Kt)});var Rle,U0,vO=W(()=>{tt();gr();Rle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),U0=(function(r){Rle(e,r);function e(){var t=r.call(this)||this;return t._boundaryVertices=[],t._clipBoundaryDisplayEnabled=!1,t._frontClippingEnabled=!1,t._backClippingEnabled=!1,t}return Object.defineProperty(e.prototype,"boundaryVertices",{get:function(){return this._boundaryVertices},set:function(t){this._boundaryVertices=t.map(function(n){return n.clone()})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clipBoundaryNormal",{get:function(){return this._clipBoundaryNormal},set:function(t){this._clipBoundaryNormal=t?.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clipBoundaryOrigin",{get:function(){return this._clipBoundaryOrigin},set:function(t){this._clipBoundaryOrigin=t?.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clipBoundaryDisplayEnabled",{get:function(){return this._clipBoundaryDisplayEnabled},set:function(t){this._clipBoundaryDisplayEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontClippingEnabled",{get:function(){return this._frontClippingEnabled},set:function(t){this._frontClippingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontClippingDistance",{get:function(){return this._frontClippingDistance},set:function(t){this._frontClippingDistance=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backClippingEnabled",{get:function(){return this._backClippingEnabled},set:function(t){this._backClippingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backClippingDistance",{get:function(){return this._backClippingDistance},set:function(t){this._backClippingDistance=t},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbFilter"),this._boundaryVertices.length>0&&(t.writeInt16(70,this._boundaryVertices.length),this._boundaryVertices.forEach(function(n){return t.writePoint2d(10,n)}),t.writeVector3d(210,this._clipBoundaryNormal),t.writePoint3d(11,this._clipBoundaryOrigin),t.writeInt16(71,this._clipBoundaryDisplayEnabled?1:0),t.writeInt16(72,this._frontClippingEnabled?1:0),this._frontClippingEnabled&&this._frontClippingDistance!=null&&t.writeDouble(40,this._frontClippingDistance),t.writeInt16(73,this._backClippingEnabled?1:0),this._backClippingEnabled&&this._backClippingDistance!=null&&t.writeDouble(41,this._backClippingDistance)),this},e.prototype.dxfInFields=function(t){var n,i;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbFilter");for(var o=null,a=!1;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var s=t.readItem();if(!s)break;var l=Number(s.code);if(l===100){t.pushBackItem(s);break}var c=Number(s.value);switch(l){case 70:break;case 10:o&&this._boundaryVertices.push(new Z(o.x,o.y)),o={x:c,y:0};break;case 20:o&&(o.y=c);break;case 210:this._clipBoundaryNormal=(n=this._clipBoundaryNormal)!==null&&n!==void 0?n:new k,this._clipBoundaryNormal.x=c;break;case 220:this._clipBoundaryNormal&&(this._clipBoundaryNormal.y=c);break;case 230:this._clipBoundaryNormal&&(this._clipBoundaryNormal.z=c);break;case 11:this._clipBoundaryOrigin=(i=this._clipBoundaryOrigin)!==null&&i!==void 0?i:new k,this._clipBoundaryOrigin.x=c;break;case 21:this._clipBoundaryOrigin&&(this._clipBoundaryOrigin.y=c);break;case 31:this._clipBoundaryOrigin&&(this._clipBoundaryOrigin.z=c);break;case 71:this._clipBoundaryDisplayEnabled=c!==0;break;case 72:this._frontClippingEnabled=c!==0;break;case 73:this._backClippingEnabled=c!==0;break;case 40:a||(this._frontClippingDistance=c,a=!0);break;case 41:this._backClippingDistance=c;break;default:break}}return o&&this._boundaryVertices.push(new Z(o.x,o.y)),this},e})(Kt)});var Ble,Fle,Nle,zle,j0,xO=W(()=>{vO();Ble=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Fle=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Nle=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},zle=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},j0=(function(r){Ble(e,r);function e(){var t=r.call(this)||this;return t._layerNames=[],t}return Object.defineProperty(e.prototype,"layerNames",{get:function(){return this._layerNames},set:function(t){this._layerNames=Nle([],Fle(t),!1)},enumerable:!1,configurable:!0}),e.prototype.add=function(t){var n=t?.trim();return!n||this._layerNames.includes(n)?!1:(this._layerNames.push(n),!0)},e.prototype.getAt=function(t){if(t<0||t>=this._layerNames.length)throw new Error("The layer index is out of range!");return this._layerNames[t]},e.prototype.remove=function(t){var n=this._layerNames.indexOf(t);return n<0?!1:(this._layerNames.splice(n,1),!0)},e.prototype.layerCount=function(){return this._layerNames.length},e.prototype.indexClass=function(){return"AcDbLayerIndex"},e.prototype.isValid=function(){return this._layerNames.some(function(t){return t.length>0})},e.prototype.dxfOutFields=function(t){var n,i;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbLayerFilter");try{for(var o=zle(this._layerNames),a=o.next();!a.done;a=o.next()){var s=a.value;t.writeString(8,s)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbLayerFilter");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);switch(i){case 8:this.add(String(n.value));break;case 100:return t.pushBackItem(n),this;default:break}}return this},e})(U0)});var Ule,V0,wO=W(()=>{gr();Ule=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),V0=(function(r){Ule(e,r);function e(){var t=r.call(this)||this;return t._lastUpdatedAt=0,t._lastUpdatedAtU=0,t._isUptoDate=!1,t._objectBeingIndexedId="",t}return Object.defineProperty(e.prototype,"lastUpdatedAt",{get:function(){return this._lastUpdatedAt},set:function(t){this._lastUpdatedAt=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastUpdatedAtU",{get:function(){return this._lastUpdatedAtU},set:function(t){this._lastUpdatedAtU=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUptoDate",{get:function(){return this._isUptoDate},set:function(t){this._isUptoDate=t},enumerable:!1,configurable:!0}),e.prototype.objectBeingIndexedId=function(){return this._objectBeingIndexedId},e.prototype.setObjectBeingIndexedId=function(t){this._objectBeingIndexedId=t},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbIndex"),t.writeDouble(40,this.lastUpdatedAt),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbIndex");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);switch(i){case 40:this.lastUpdatedAt=Number(n.value),this.lastUpdatedAtU=this.lastUpdatedAt;break;case 100:return t.pushBackItem(n),this;default:break}}return this},e})(Kt)});var jle,_O,SO,Vle,G0,AO=W(()=>{wO();jle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),_O=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},SO=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Vle=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},G0=(function(r){jle(e,r);function e(){var t=r.call(this)||this;return t._layerNames=[],t._idBufferIds=[],t._idBufferEntryCounts=[],t}return Object.defineProperty(e.prototype,"layerNames",{get:function(){return this._layerNames},set:function(t){this._layerNames=SO([],_O(t),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"idBufferIds",{get:function(){return this._idBufferIds},set:function(t){this._idBufferIds=SO([],_O(t),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"idBufferEntryCounts",{get:function(){return this._idBufferEntryCounts},set:function(t){this._idBufferEntryCounts=SO([],_O(t),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"entries",{get:function(){for(var t,n,i,o=Math.max(this._layerNames.length,this._idBufferIds.length,this._idBufferEntryCounts.length),a=[],s=0;s<o;s++)a.push({layerName:(t=this._layerNames[s])!==null&&t!==void 0?t:"",idBufferId:(n=this._idBufferIds[s])!==null&&n!==void 0?n:"",idBufferEntryCount:(i=this._idBufferEntryCounts[s])!==null&&i!==void 0?i:0});return a},set:function(t){this._layerNames=t.map(function(n){return n.layerName}),this._idBufferIds=t.map(function(n){return n.idBufferId}),this._idBufferEntryCounts=t.map(function(n){return n.idBufferEntryCount})},enumerable:!1,configurable:!0}),e.prototype.compute=function(t,n){var i,o;if(n&&this.setObjectBeingIndexedId(n.objectId),t){this._layerNames=[];try{for(var a=Vle(t.newIterator()),s=a.next();!s.done;s=a.next()){var l=s.value;this._layerNames.push(l.name)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}return this.lastUpdatedAt=Date.now(),this.lastUpdatedAtU=Date.now(),this.isUptoDate=!0,!0},e.prototype.newIterator=function(t){return null},e.prototype.rebuildFull=function(t){return this.lastUpdatedAt=Date.now(),this.lastUpdatedAtU=Date.now(),this.isUptoDate=!0,!0},e.prototype.rebuildModified=function(t){return this.lastUpdatedAt=Date.now(),this.lastUpdatedAtU=Date.now(),this.isUptoDate=!0,!0},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbLayerIndex");for(var n=Math.max(this._layerNames.length,this._idBufferIds.length,this._idBufferEntryCounts.length),i=0;i<n;i++)this._layerNames[i]!=null&&t.writeString(8,this._layerNames[i]),this._idBufferIds[i]&&t.writeHandle(360,this._idBufferIds[i]),this._idBufferEntryCounts[i]!=null&&t.writeInt32(90,this._idBufferEntryCounts[i]);return this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbLayerIndex");for(var n=[],i=[],o=[];!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var a=t.readItem();if(!a)break;var s=Number(a.code);switch(s){case 8:n.push(String(a.value));break;case 360:i.push(String(a.value));break;case 90:o.push(Number(a.value));break;case 100:return t.pushBackItem(a),this.layerNames=n,this.idBufferIds=i,this.idBufferEntryCounts=o,this.isUptoDate=!0,this;default:break}}return this.layerNames=n,this.idBufferIds=i,this.idBufferEntryCounts=o,this.isUptoDate=!0,this},e})(V0)});var Gle,Mu,H0=W(()=>{zt();tt();gr();k0();Gle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Mu=(function(r){Gle(e,r);function e(){var t=r.call(this)||this;return t._contentType=2,t._drawMLeaderOrderType=1,t._drawLeaderOrderType=0,t._bitFlags=0,t._maxLeaderSegmentsPoints=-1,t._firstSegmentAngleConstraint=0,t._secondSegmentAngleConstraint=0,t._leaderLineType=1,t._leaderLineColor=new je(Be.ByLayer),t._leaderLineWeight=-2,t._enableLanding=!0,t._landingGap=2,t._enableDogleg=!0,t._doglegLength=8,t._description="",t._arrowSize=4,t._defaultMTextContents="",t._textLeftAttachmentType=1,t._textAngleType=1,t._textAlignmentType=0,t._textRightAttachmentType=1,t._textColor=new je(Be.ByLayer),t._textHeight=4,t._enableFrameText=!1,t._textAlignAlwaysLeft=!1,t._alignSpace=0,t._blockColor=new je(Be.ByBlock),t._blockScale=new G(1,1,1),t._enableBlockScale=!0,t._blockRotation=0,t._enableBlockRotation=!1,t._blockConnectionType=0,t._scale=1,t._overwritePropChanged=!1,t._annotative=!1,t._breakSize=0,t._textAttachmentDirection=0,t._bottomTextAttachmentType=9,t._topTextAttachmentType=9,t._extendLeaderToText=!1,t}return Object.defineProperty(e.prototype,"unknown1",{get:function(){return this._unknown1},set:function(t){this._unknown1=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this._contentType},set:function(t){this._contentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawMLeaderOrderType",{get:function(){return this._drawMLeaderOrderType},set:function(t){this._drawMLeaderOrderType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawLeaderOrderType",{get:function(){return this._drawLeaderOrderType},set:function(t){this._drawLeaderOrderType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bitFlags",{get:function(){return this._bitFlags},set:function(t){this._bitFlags=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLeaderSegmentsPoints",{get:function(){return this._maxLeaderSegmentsPoints},set:function(t){this._maxLeaderSegmentsPoints=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLeaderSegmentPoints",{get:function(){return this.maxLeaderSegmentsPoints},set:function(t){this.maxLeaderSegmentsPoints=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstSegmentAngleConstraint",{get:function(){return this._firstSegmentAngleConstraint},set:function(t){this._firstSegmentAngleConstraint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"secondSegmentAngleConstraint",{get:function(){return this._secondSegmentAngleConstraint},set:function(t){this._secondSegmentAngleConstraint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineType",{get:function(){return this._leaderLineType},set:function(t){this._leaderLineType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineColor",{get:function(){return this._leaderLineColor},set:function(t){this._leaderLineColor.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineTypeId",{get:function(){return this._leaderLineTypeId},set:function(t){this._leaderLineTypeId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineWeight",{get:function(){return this._leaderLineWeight},set:function(t){this._leaderLineWeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableLanding",{get:function(){return this._enableLanding},set:function(t){this._enableLanding=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"landingEnabled",{get:function(){return this.enableLanding},set:function(t){this.enableLanding=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"landingGap",{get:function(){return this._landingGap},set:function(t){this._landingGap=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableDogleg",{get:function(){return this._enableDogleg},set:function(t){this._enableDogleg=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doglegEnabled",{get:function(){return this.enableDogleg},set:function(t){this.enableDogleg=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doglegLength",{get:function(){return this._doglegLength},set:function(t){this._doglegLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this._description},set:function(t){this._description=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowSymbolId",{get:function(){return this._arrowSymbolId},set:function(t){this._arrowSymbolId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowheadId",{get:function(){return this.arrowSymbolId},set:function(t){this.arrowSymbolId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowSize",{get:function(){return this._arrowSize},set:function(t){this._arrowSize=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowheadSize",{get:function(){return this.arrowSize},set:function(t){this.arrowSize=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultMTextContents",{get:function(){return this._defaultMTextContents},set:function(t){this._defaultMTextContents=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultMText",{get:function(){return this.defaultMTextContents},set:function(t){this.defaultMTextContents=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textString",{get:function(){return this.defaultMTextContents},set:function(t){this.defaultMTextContents=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textStyleId",{get:function(){return this._textStyleId},set:function(t){this._textStyleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textStyle",{get:function(){return this.textStyleId},set:function(t){this.textStyleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLeftAttachmentType",{get:function(){return this._textLeftAttachmentType},set:function(t){this._textLeftAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAngleType",{get:function(){return this._textAngleType},set:function(t){this._textAngleType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAlignmentType",{get:function(){return this._textAlignmentType},set:function(t){this._textAlignmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textRightAttachmentType",{get:function(){return this._textRightAttachmentType},set:function(t){this._textRightAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._textColor},set:function(t){this._textColor.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this._textHeight},set:function(t){this._textHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableFrameText",{get:function(){return this._enableFrameText},set:function(t){this._enableFrameText=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textFrameEnabled",{get:function(){return this.enableFrameText},set:function(t){this.enableFrameText=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAlignAlwaysLeft",{get:function(){return this._textAlignAlwaysLeft},set:function(t){this._textAlignAlwaysLeft=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alignSpace",{get:function(){return this._alignSpace},set:function(t){this._alignSpace=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockId",{get:function(){return this._blockId},set:function(t){this._blockId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentId",{get:function(){return this.blockId},set:function(t){this.blockId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockColor",{get:function(){return this._blockColor},set:function(t){this._blockColor.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentColor",{get:function(){return this.blockColor},set:function(t){this.blockColor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockScale",{get:function(){return this._blockScale.clone()},set:function(t){this._blockScale.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentScale",{get:function(){return this.blockScale},set:function(t){this.blockScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableBlockScale",{get:function(){return this._enableBlockScale},set:function(t){this._enableBlockScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentScaleEnabled",{get:function(){return this.enableBlockScale},set:function(t){this.enableBlockScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockRotation",{get:function(){return this._blockRotation},set:function(t){this._blockRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentRotation",{get:function(){return this.blockRotation},set:function(t){this.blockRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableBlockRotation",{get:function(){return this._enableBlockRotation},set:function(t){this._enableBlockRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentRotationEnabled",{get:function(){return this.enableBlockRotation},set:function(t){this.enableBlockRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockConnectionType",{get:function(){return this._blockConnectionType},set:function(t){this._blockConnectionType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentConnectionType",{get:function(){return this.blockConnectionType},set:function(t){this.blockConnectionType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},set:function(t){this._scale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleFactor",{get:function(){return this.scale},set:function(t){this.scale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overwritePropChanged",{get:function(){return this._overwritePropChanged},set:function(t){this._overwritePropChanged=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overwritePropertyValue",{get:function(){return this.overwritePropChanged},set:function(t){this.overwritePropChanged=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"annotative",{get:function(){return this._annotative},set:function(t){this._annotative=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakSize",{get:function(){return this._breakSize},set:function(t){this._breakSize=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakGapSize",{get:function(){return this.breakSize},set:function(t){this.breakSize=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAttachmentDirection",{get:function(){return this._textAttachmentDirection},set:function(t){this._textAttachmentDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomTextAttachmentType",{get:function(){return this._bottomTextAttachmentType},set:function(t){this._bottomTextAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomTextAttachmentDirection",{get:function(){return this.bottomTextAttachmentType},set:function(t){this.bottomTextAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topTextAttachmentType",{get:function(){return this._topTextAttachmentType},set:function(t){this._topTextAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topTextAttachmentDirection",{get:function(){return this.topTextAttachmentType},set:function(t){this.topTextAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendLeaderToText",{get:function(){return this._extendLeaderToText},set:function(t){this._extendLeaderToText=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unknown2",{get:function(){return this._unknown2},set:function(t){this._unknown2=t},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbMLeaderStyle"),t.writeInt16(179,this.unknown1),t.writeInt16(170,this.contentType),t.writeInt16(171,this.drawMLeaderOrderType),t.writeInt16(172,this.drawLeaderOrderType),t.writeInt32(90,this.maxLeaderSegmentsPoints),t.writeDouble(40,this.firstSegmentAngleConstraint),t.writeDouble(41,this.secondSegmentAngleConstraint),t.writeInt16(173,this.leaderLineType),t.writeInt32(91,jA(this.leaderLineColor)),t.writeHandle(340,this.leaderLineTypeId),t.writeInt32(92,this.leaderLineWeight),t.writeBoolean(290,this.enableLanding),t.writeDouble(42,this.landingGap),t.writeBoolean(291,this.enableDogleg),t.writeDouble(43,this.doglegLength),t.writeString(3,this.description),t.writeHandle(341,this.arrowSymbolId),t.writeDouble(44,this.arrowSize),t.writeString(300,this.defaultMTextContents),t.writeHandle(342,this.textStyleId),t.writeInt16(174,this.textLeftAttachmentType),t.writeInt16(175,this.textAngleType),t.writeInt16(176,this.textAlignmentType),t.writeInt16(178,this.textRightAttachmentType),t.writeInt32(93,jA(this.textColor)),t.writeDouble(45,this.textHeight),t.writeBoolean(292,this.enableFrameText),t.writeBoolean(297,this.textAlignAlwaysLeft),t.writeDouble(46,this.alignSpace),t.writeHandle(343,this.blockId),t.writeInt32(94,jA(this.blockColor)),t.writeDouble(47,this._blockScale.x),t.writeDouble(49,this._blockScale.y),t.writeDouble(140,this._blockScale.z),t.writeBoolean(293,this.enableBlockScale),t.writeDouble(141,this.blockRotation),t.writeBoolean(294,this.enableBlockRotation),t.writeInt16(177,this.blockConnectionType),t.writeDouble(142,this.scale),t.writeBoolean(295,this.overwritePropChanged),t.writeBoolean(296,this.annotative),t.writeDouble(143,this.breakSize),t.writeInt16(271,this.textAttachmentDirection),t.writeInt16(272,this.bottomTextAttachmentType),t.writeInt16(273,this.topTextAttachmentType),t.writeBoolean(298,this.unknown2),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbMLeaderStyle");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code),o=Number(n.value);switch(i){case 179:this.unknown1=o;break;case 170:this.contentType=o;break;case 171:this.drawMLeaderOrderType=o;break;case 172:this.drawLeaderOrderType=o;break;case 90:this.maxLeaderSegmentsPoints=o;break;case 40:this.firstSegmentAngleConstraint=o;break;case 41:this.secondSegmentAngleConstraint=o;break;case 173:this.leaderLineType=o;break;case 91:this.leaderLineColor=sa(o);break;case 340:this.leaderLineTypeId=String(n.value);break;case 92:this.leaderLineWeight=o;break;case 290:this.enableLanding=o!==0;break;case 42:this.landingGap=o;break;case 291:this.enableDogleg=o!==0;break;case 43:this.doglegLength=o;break;case 3:this.description=String(n.value);break;case 341:this.arrowSymbolId=String(n.value);break;case 44:this.arrowSize=o;break;case 300:this.defaultMTextContents=String(n.value);break;case 342:this.textStyleId=String(n.value);break;case 174:this.textLeftAttachmentType=o;break;case 175:this.textAngleType=o;break;case 176:this.textAlignmentType=o;break;case 178:this.textRightAttachmentType=o;break;case 93:this.textColor=sa(o);break;case 45:this.textHeight=o;break;case 292:this.enableFrameText=o!==0;break;case 297:this.textAlignAlwaysLeft=o!==0;break;case 46:this.alignSpace=o;break;case 343:this.blockId=String(n.value);break;case 94:this.blockColor=sa(o);break;case 47:this._blockScale.x=o;break;case 49:this._blockScale.y=o;break;case 140:this._blockScale.z=o;break;case 293:this.enableBlockScale=o!==0;break;case 141:this.blockRotation=o;break;case 294:this.enableBlockRotation=o!==0;break;case 177:this.blockConnectionType=o;break;case 142:this.scale=o;break;case 295:this.overwritePropChanged=o!==0;break;case 296:this.annotative=o!==0;break;case 143:this.breakSize=o;break;case 271:this.textAttachmentDirection=o;break;case 272:this.bottomTextAttachmentType=o;break;case 273:this.topTextAttachmentType=o;break;case 298:this.unknown2=o!==0;break;case 100:return t.pushBackItem(n),this;default:break}}return this},e})(Kt)});var Hle,Ep,KA=W(()=>{zt();gr();Hle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Ep=(function(r){Hle(e,r);function e(){var t=r.call(this)||this;return t._styleName="STANDARD",t._flags=0,t._description="",t._fillColor=new je,t._startAngle=90,t._endAngle=90,t._elements=[],t}return Object.defineProperty(e.prototype,"styleName",{get:function(){return this._styleName},set:function(t){this._styleName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this._flags},set:function(t){this._flags=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this._description},set:function(t){this._description=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillColor",{get:function(){return this._fillColor},set:function(t){this._fillColor.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){this._startAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._endAngle},set:function(t){this._endAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementCount",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elements",{get:function(){return this._elements.map(function(t){return{offset:t.offset,color:t.color.clone(),lineType:t.lineType}})},set:function(t){this._elements=t.map(function(n){return{offset:n.offset,color:n.color.clone(),lineType:n.lineType}})},enumerable:!1,configurable:!0}),e.prototype.addElement=function(t){this._elements.push({offset:t.offset,color:t.color.clone(),lineType:t.lineType})},e.prototype.removeElementAt=function(t){if(t<0||t>=this._elements.length)throw new Error("The element index is out of range!");this._elements.splice(t,1)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbMlineStyle"),t.writeString(2,this.styleName),t.writeInt16(70,this.flags),t.writeString(3,this.description),t.writeCmColor(this.fillColor),t.writeDouble(51,this.startAngle),t.writeDouble(52,this.endAngle),t.writeInt16(71,this.elementCount),this._elements.forEach(function(n){t.writeDouble(49,n.offset),t.writeCmColor(n.color),t.writeString(6,n.lineType)}),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbMlineStyle");for(var n=[],i,o=0;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var a=t.readItem();if(!a)break;var s=Number(a.code),l=Number(a.value);switch(s){case 2:this.styleName=String(a.value);break;case 70:this.flags=l;break;case 3:this.description=String(a.value);break;case 51:this.startAngle=l;break;case 52:this.endAngle=l;break;case 71:o=l;break;case 49:{i={offset:l,color:new je,lineType:"BYLAYER"},i.color.colorIndex=256,n.push(i);break}case 62:i?i.color.colorIndex=l:this.fillColor.colorIndex=l;break;case 420:i?i.color.setRGBValue(l):this.fillColor.setRGBValue(l);break;case 6:i&&(i.lineType=String(a.value));break;case 100:return t.pushBackItem(a),this.finishMlineElements(n,o),this;default:break}}return this.finishMlineElements(n,o),this},e.prototype.finishMlineElements=function(t,n){var i=Math.max(n,t.length);if(i<=0){this.elements=[];return}this.elements=Array.from({length:i},function(o,a){var s=t[a];if(s)return s;var l=new je;return l.colorIndex=256,{offset:0,color:l,lineType:"BYLAYER"}})},e})(Kt)});var Wle,Xle,Yle,Cp,qA=W(()=>{tt();gr();Wle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Xle=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Yle=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Cp=(function(r){Wle(e,r);function e(){var t=r.apply(this,Yle([],Xle(arguments),!1))||this;return t._classVersion=4,t._isDefault=!1,t._scaleId="",t._attachmentPoint=1,t._direction=new G(1,0,0),t._insertionPoint=new k,t._definedWidth=0,t._definedHeight=0,t._extentsWidth=0,t._extentsHeight=0,t._columnType=0,t}return Object.defineProperty(e.prototype,"classVersion",{get:function(){return this._classVersion},set:function(t){this._classVersion=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDefault",{get:function(){return this._isDefault},set:function(t){this._isDefault=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleId",{get:function(){return this._scaleId},set:function(t){this._scaleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachmentPoint",{get:function(){return this._attachmentPoint},set:function(t){this._attachmentPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(t){this._direction.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"insertionPoint",{get:function(){return this._insertionPoint},set:function(t){this._insertionPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definedWidth",{get:function(){return this._definedWidth},set:function(t){this._definedWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definedHeight",{get:function(){return this._definedHeight},set:function(t){this._definedHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extentsWidth",{get:function(){return this._extentsWidth},set:function(t){this._extentsWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extentsHeight",{get:function(){return this._extentsHeight},set:function(t){this._extentsHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnType",{get:function(){return this._columnType},set:function(t){this._columnType=t},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbObjectContextData"),t.writeInt16(70,this._classVersion),t.writeBoolean(290,this._isDefault),t.writeSubclassMarker("AcDbAnnotScaleObjectContextData"),t.writeObjectId(340,this._scaleId),t.writeInt16(70,this._attachmentPoint),t.writeVector3d(10,this._direction),t.writePoint3d(11,this._insertionPoint),t.writeDouble(40,this._definedWidth),t.writeDouble(41,this._definedHeight),t.writeDouble(42,this._extentsWidth),t.writeDouble(43,this._extentsHeight),t.writeInt16(71,this._columnType),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t);var n="object";for(t.atSubclassData("AcDbObjectContextData");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var i=t.readItem();if(!i)break;var o=Number(i.code);if(o===100){var a=String(i.value);if(a==="AcDbAnnotScaleObjectContextData"){n="annot";continue}if(a==="AcDbMTextObjectContextData"){n="mtext";continue}t.pushBackItem(i);break}if(n==="object"){switch(o){case 70:this._classVersion=Number(i.value);break;case 290:this._isDefault=!!Number(i.value);break;default:break}continue}switch(o){case 340:this._scaleId=String(i.value);break;case 70:this._attachmentPoint=Number(i.value);break;case 10:this._direction.x=Number(i.value);break;case 20:this._direction.y=Number(i.value);break;case 30:this._direction.z=Number(i.value);break;case 11:this._insertionPoint.x=Number(i.value);break;case 21:this._insertionPoint.y=Number(i.value);break;case 31:this._insertionPoint.z=Number(i.value);break;case 40:this._definedWidth=Number(i.value);break;case 41:this._definedHeight=Number(i.value);break;case 42:this._extentsWidth=Number(i.value);break;case 43:this._extentsHeight=Number(i.value);break;case 71:this._columnType=Number(i.value);break;default:break}}return this},e})(Kt)});var $le,Tp,MO=W(()=>{tt();gr();$le=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Tp=(function(r){$le(e,r);function e(){var t=r.call(this)||this;return t._isLoaded=!0,t._resolutionUnits=0,t._sourceFileName="",t._classVersion=0,t._imageSize=new Z,t._pixelSize=new Z(1,1),t}return Object.defineProperty(e.prototype,"sourceFileName",{get:function(){return this._sourceFileName},set:function(t){this._sourceFileName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classVersion",{get:function(){return this._classVersion},set:function(t){this._classVersion=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageSize",{get:function(){return this._imageSize},set:function(t){this._imageSize.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(t){this._pixelSize.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoaded",{get:function(){return this._isLoaded},set:function(t){this._isLoaded=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolutionUnits",{get:function(){return this._resolutionUnits},set:function(t){this._resolutionUnits=t},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbRasterImageDef"),t.writeInt32(90,this.classVersion),t.writeString(1,this.sourceFileName),t.writePoint2d(10,this.imageSize),t.writeDouble(11,this.pixelSize.x),t.writeDouble(12,this.pixelSize.y),t.writeInt16(280,this.isLoaded?1:0),t.writeInt16(281,this.resolutionUnits),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbRasterImageDef");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code),o=Number(n.value);switch(i){case 1:this.sourceFileName=String(n.value);break;case 90:this.classVersion=o;break;case 10:this.imageSize.x=o;break;case 20:this.imageSize.y=o;break;case 11:this.pixelSize.x=o;break;case 12:this.pixelSize.y=o;break;case 280:this.isLoaded=o!==0;break;case 281:this.resolutionUnits=o;break;case 100:return t.pushBackItem(n),this;default:break}}return this},e})(Kt)});var Kle,qle,Zle,Pu,ZA=W(()=>{gr();Kle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),qle=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Zle=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Pu=(function(r){Kle(e,r);function e(){var t=r.apply(this,Zle([],qle(arguments),!1))||this;return t._classVersion=0,t._scaleName="",t._paperUnits=1,t._drawingUnits=1,t._isUnitScale=!1,t}return Object.defineProperty(e.prototype,"classVersion",{get:function(){return this._classVersion},set:function(t){this._classVersion=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleName",{get:function(){return this._scaleName},set:function(t){this._scaleName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paperUnits",{get:function(){return this._paperUnits},set:function(t){this._paperUnits=t>0?t:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawingUnits",{get:function(){return this._drawingUnits},set:function(t){this._drawingUnits=t>0?t:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnitScale",{get:function(){return this._isUnitScale},set:function(t){this._isUnitScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleFactor",{get:function(){return this._drawingUnits/this._paperUnits},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbScale"),t.writeInt16(70,this._classVersion),t.writeString(300,this._scaleName),t.writeDouble(140,this._paperUnits),t.writeDouble(141,this._drawingUnits),t.writeBoolean(290,this._isUnitScale),this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbScale");!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}switch(i){case 70:this._classVersion=Number(n.value);break;case 300:this._scaleName=String(n.value);break;case 140:this.paperUnits=Number(n.value);break;case 141:this.drawingUnits=Number(n.value);break;case 290:this._isUnitScale=!!Number(n.value);break;default:break}}return this},e})(Kt)});var Jle,J7,Q7,Qle,W0,PO=W(()=>{gr();Jle=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),J7=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Q7=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Qle=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},W0=(function(r){Jle(e,r);function e(){var t=r.apply(this,Q7([],J7(arguments),!1))||this;return t._entityIds=[],t}return Object.defineProperty(e.prototype,"entityIds",{get:function(){return this._entityIds},set:function(t){this._entityIds=Q7([],J7(t),!1)},enumerable:!1,configurable:!0}),e.prototype.addEntityId=function(t){this._entityIds.push(t)},e.prototype.dxfOutFields=function(t){var n,i;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbSortentsTable");try{for(var o=Qle(this._entityIds),a=o.next();!a.done;a=o.next()){var s=a.value;t.writeObjectId(331,s)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return this},e.prototype.dxfInFields=function(t){for(r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSortentsTable"),this._entityIds=[];!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var n=t.readItem();if(!n)break;var i=Number(n.code);if(i===100){t.pushBackItem(n);break}i===331&&this._entityIds.push(String(n.value))}return this},e})(Kt)});var ece,tce,nce,kp,Eu,X0=W(()=>{gr();Wv();ece=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),tce=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},nce=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};(function(r){r[r.NotApplicable=0]="NotApplicable",r[r.Ignore=1]="Ignore",r[r.Replace=2]="Replace",r[r.XrefMangleName=3]="XrefMangleName",r[r.MangleName=4]="MangleName"})(kp||(kp={}));Eu=(function(r){ece(e,r);function e(){var t=r.apply(this,nce([],tce(arguments),!1))||this;return t._data=null,t}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t},enumerable:!1,configurable:!0}),e.prototype.clear=function(){var t;(t=this._data)===null||t===void 0||t.clear()},e.prototype.clone=function(){return r.prototype.clone.call(this)},e.prototype.getDuplicateRecordCloning=function(){var t;return(t=this._cloningFlag)!==null&&t!==void 0?t:kp.NotApplicable},e.prototype.setDuplicateRecordCloning=function(t){this._cloningFlag=t},e.prototype.dxfOutFields=function(t){var n;return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbXrecord"),t.writeInt16(280,(n=this._cloningFlag)!==null&&n!==void 0?n:kp.Ignore),t.writeResultBuffer(this.data),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbXrecord");for(var n=new tl;!t.atEndOfObject&&!t.atEof;){var i=t.readItem();if(!i)break;var o=Number(i.code);if(o===1001||o>=1e3&&o<=1071){t.pushBackItem(i);break}if(o===100){t.pushBackItem(i);break}o===280?this._cloningFlag=Number(i.value):n.add({code:i.code,value:i.value})}return this._data=n.length>0?n:null,this},e})(Kt)});var Hn,Ir,br,Y0,EO=W(()=>{$l();$A();mu();yO();bO();xO();AO();H0();KA();qA();MO();ZA();PO();X0();rg();Hn=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ir=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},br=function(r){return r?r.trim().toUpperCase():""},Y0=(function(){function r(e){this._db=e,this._dictionaries=new Map,this._xrecords=new Map,this._unknownObjectCount=0}return Object.defineProperty(r.prototype,"unknownObjectCount",{get:function(){return this._unknownObjectCount},enumerable:!1,configurable:!0}),r.prototype.read=function(e){for(this._unknownObjectCount=0;!e.atEof;){var t=e.peekItem();if(!t)break;if(Number(t.code)!==0){e.readItem();continue}var n=String(t.value).toUpperCase();if(n==="ENDSEC"){e.readItem();break}e.readItem(),this.readObject(e,n)}this.finishNamedObjectDictionaries(),this.materializeBufferedDictionaries(),this.finishCannoscale(),this.finishLayerFilterTree(),this.linkLayoutsToBlockTableRecords(),this._db.objects.layout.numEntries===0&&this._db.createDefaultData({layout:!0})},r.prototype.readObject=function(e,t){switch(t){case"LAYOUT":{var n=new ia;n.dxfIn(e),n.layoutName&&this._db.objects.layout.setAt(n.layoutName,n);break}case"IMAGEDEF":{var i=new Tp;i.dxfIn(e),this._db.objects.imageDefinition.setAt(i.objectId,i);break}case"LAYER_FILTER":{var o=new j0;o.dxfIn(e),this._db.objects.layerFilter.setAt(o.objectId,o);break}case"LAYER_INDEX":{var a=new G0;a.dxfIn(e),this._db.objects.layerIndex.setAt(a.objectId,a);break}case"MLEADERSTYLE":{var s=new Mu;s.dxfIn(e),this._db.objects.mleaderStyle.setAt(s.objectId,s);break}case"MLINESTYLE":{var s=new Ep;s.dxfIn(e),this._db.objects.mlineStyle.setAt(s.styleName||s.objectId,s);break}case"GROUP":{var l=new z0;l.dxfIn(e);var c=l.name||l.objectId;this._db.objects.group.setAt(c,l);break}case"SORTENTSTABLE":{var u=new W0;u.dxfIn(e),this._db.objects.sortentsTable.setAt(u.objectId,u);break}case"DICTIONARY":case"ACDBDICTIONARYWDFLT":{var h=this.readPersistDictionary(e);h.handle&&this._dictionaries.set(br(h.handle),h);break}case"SCALE":{var d=new Pu;d.dxfIn(e);var c=d.scaleName||br(d.objectId);c&&this._db.objects.scale.setAt(c,d);break}case"DICTIONARYVAR":{var p=new yg;p.dxfIn(e);var f=br(p.objectId);f&&this._db.objects.dictionaryVar.setAt(f,p);break}case"ACDB_MTEXTOBJECTCONTEXTDATA_CLASS":{var m=new Cp;m.dxfIn(e);var f=br(m.objectId);f&&this._db.objects.objectContextData.setAt(f,m);break}case"XRECORD":{var g=new Eu;g.dxfIn(e);var f=br(g.objectId);if(f){this._db.objects.xrecord.setAt(f,g);var y={handle:f,ownerObjectId:br(g.ownerId),data:g.data?g.data.toArray().map(function(v){return{code:Number(v.code),value:v.value}}):[]};g.extensionDictionary&&(y.extensionDictionaryId=br(g.extensionDictionary)),this._xrecords.set(f,y)}break}default:this._unknownObjectCount+=1,e.skipToEndOfObject();break}},r.prototype.finishNamedObjectDictionaries=function(){var e,t,n,i,o,a,s,l;if(this._dictionaries.size!==0){var c;try{for(var u=Hn(this._dictionaries.values()),h=u.next();!h.done;h=u.next()){var d=h.value;if(!d.ownerObjectId||d.ownerObjectId==="0"){c=d;break}}}catch(Q){e={error:Q}}finally{try{h&&!h.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}if(c?.handle){var p=this._db.objects.dictionary;p.objectId=c.handle,p.ownerId="0";var f={ACAD_LAYOUT:this._db.objects.layout,ACAD_GROUP:this._db.objects.group,ACAD_SORTENTS:this._db.objects.sortentsTable,ACAD_MLEADERSTYLE:this._db.objects.mleaderStyle,ACAD_MLINESTYLE:this._db.objects.mlineStyle,ACAD_SCALELIST:this._db.objects.scale,ISM_RASTER_IMAGE_DICT:this._db.objects.imageDefinition,MLIGHT_XRECORD:this._db.objects.xrecord},m=this.collectLoadedObjectsByHandle();try{for(var g=Hn(Object.entries(c.entries)),y=g.next();!y.done;y=g.next()){var b=Ir(y.value,2),v=b[0],x=b[1],w=f[v.toUpperCase()];if(w){w.objectId=x,w.ownerId=c.handle,p.setAt(v,w);var _=this._dictionaries.get(br(x));if(_)try{for(var A=(o=void 0,Hn(Object.entries(_.entries))),E=A.next();!E.done;E=A.next()){var S=Ir(E.value,2),M=S[0],T=S[1],L=m.get(br(T));if(L){var O=br(L.objectId),D=!1;try{for(var z=(s=void 0,Hn(w.entries())),N=z.next();!N.done;N=z.next()){var J=Ir(N.value,2),X=J[1];if(br(X.objectId)===O){D=!0;break}}}catch(Q){s={error:Q}}finally{try{N&&!N.done&&(l=z.return)&&l.call(z)}finally{if(s)throw s.error}}!w.getAt(M)&&!D&&w.setAt(M,L)}}}catch(Q){o={error:Q}}finally{try{E&&!E.done&&(a=A.return)&&a.call(A)}finally{if(o)throw o.error}}}}}catch(Q){n={error:Q}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(n)throw n.error}}}}},r.prototype.collectLoadedObjectsByHandle=function(){var e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g,y,b,v,x,w,_,A,E,S=new Map,M=function(Te){var nt=br(Te.objectId);nt&&S.set(nt,Te)};try{for(var T=Hn(this._db.objects.layout.entries()),L=T.next();!L.done;L=T.next()){var O=Ir(L.value,2),D=O[1];M(D)}}catch(Te){e={error:Te}}finally{try{L&&!L.done&&(t=T.return)&&t.call(T)}finally{if(e)throw e.error}}try{for(var z=Hn(this._db.objects.group.entries()),N=z.next();!N.done;N=z.next()){var J=Ir(N.value,2),D=J[1];M(D)}}catch(Te){n={error:Te}}finally{try{N&&!N.done&&(i=z.return)&&i.call(z)}finally{if(n)throw n.error}}try{for(var X=Hn(this._db.objects.sortentsTable.entries()),Q=X.next();!Q.done;Q=X.next()){var ce=Ir(Q.value,2),D=ce[1];M(D)}}catch(Te){o={error:Te}}finally{try{Q&&!Q.done&&(a=X.return)&&a.call(X)}finally{if(o)throw o.error}}try{for(var H=Hn(this._db.objects.imageDefinition.entries()),de=H.next();!de.done;de=H.next()){var Se=Ir(de.value,2),D=Se[1];M(D)}}catch(Te){s={error:Te}}finally{try{de&&!de.done&&(l=H.return)&&l.call(H)}finally{if(s)throw s.error}}try{for(var te=Hn(this._db.objects.mleaderStyle.entries()),ue=te.next();!ue.done;ue=te.next()){var ve=Ir(ue.value,2),D=ve[1];M(D)}}catch(Te){c={error:Te}}finally{try{ue&&!ue.done&&(u=te.return)&&u.call(te)}finally{if(c)throw c.error}}try{for(var se=Hn(this._db.objects.mlineStyle.entries()),we=se.next();!we.done;we=se.next()){var pe=Ir(we.value,2),D=pe[1];M(D)}}catch(Te){h={error:Te}}finally{try{we&&!we.done&&(d=se.return)&&d.call(se)}finally{if(h)throw h.error}}try{for(var Ee=Hn(this._db.objects.layerFilter.entries()),Oe=Ee.next();!Oe.done;Oe=Ee.next()){var Pe=Ir(Oe.value,2),D=Pe[1];M(D)}}catch(Te){p={error:Te}}finally{try{Oe&&!Oe.done&&(f=Ee.return)&&f.call(Ee)}finally{if(p)throw p.error}}try{for(var Xe=Hn(this._db.objects.layerIndex.entries()),$=Xe.next();!$.done;$=Xe.next()){var yt=Ir($.value,2),D=yt[1];M(D)}}catch(Te){m={error:Te}}finally{try{$&&!$.done&&(g=Xe.return)&&g.call(Xe)}finally{if(m)throw m.error}}try{for(var C=Hn(this._db.objects.xrecord.entries()),I=C.next();!I.done;I=C.next()){var B=Ir(I.value,2),D=B[1];M(D)}}catch(Te){y={error:Te}}finally{try{I&&!I.done&&(b=C.return)&&b.call(C)}finally{if(y)throw y.error}}try{for(var K=Hn(this._db.objects.scale.entries()),q=K.next();!q.done;q=K.next()){var F=Ir(q.value,2),D=F[1];M(D)}}catch(Te){v={error:Te}}finally{try{q&&!q.done&&(x=K.return)&&x.call(K)}finally{if(v)throw v.error}}try{for(var R=Hn(this._db.objects.dictionaryVar.entries()),ee=R.next();!ee.done;ee=R.next()){var fe=Ir(ee.value,2),D=fe[1];M(D)}}catch(Te){w={error:Te}}finally{try{ee&&!ee.done&&(_=R.return)&&_.call(R)}finally{if(w)throw w.error}}try{for(var ge=Hn(this._db.objects.objectContextData.entries()),ye=ge.next();!ye.done;ye=ge.next()){var Re=Ir(ye.value,2),D=Re[1];M(D)}}catch(Te){A={error:Te}}finally{try{ye&&!ye.done&&(E=ge.return)&&E.call(ge)}finally{if(A)throw A.error}}return S},r.prototype.materializeBufferedDictionaries=function(){var e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g,y;if(this._dictionaries.size!==0){var b=new Map;try{for(var v=Hn(this._db.getRootDictionaries()),x=v.next();!x.done;x=v.next()){var w=x.value,_=br(w.objectId);_&&(b.set(_,w),this._db.registerObjectHandle(w))}}catch(R){e={error:R}}finally{try{x&&!x.done&&(t=v.return)&&t.call(v)}finally{if(e)throw e.error}}var A=new Map;try{for(var E=Hn(this._dictionaries),S=E.next();!S.done;S=E.next()){var M=Ir(S.value,2),T=M[0],L=M[1],O=(y=this._db.getObjectById(T))!==null&&y!==void 0?y:b.get(T);if(O instanceof Wt){A.set(T,O);continue}var w=new Wt(this._db);this._db.releaseObjectHandle(w),w.objectId=T,w.ownerId=L.ownerObjectId||"0",L.extensionDictionaryId&&(w.extensionDictionary=L.extensionDictionaryId),this._db.registerObjectHandle(w),A.set(T,w)}}catch(R){n={error:R}}finally{try{S&&!S.done&&(i=E.return)&&i.call(E)}finally{if(n)throw n.error}}var D=this.collectLoadedObjectsByHandle();try{for(var z=Hn(A),N=z.next();!N.done;N=z.next()){var J=Ir(N.value,2),T=J[0],w=J[1];D.set(T,w)}}catch(R){o={error:R}}finally{try{N&&!N.done&&(a=z.return)&&a.call(z)}finally{if(o)throw o.error}}try{for(var X=Hn(this._dictionaries),Q=X.next();!Q.done;Q=X.next()){var ce=Ir(Q.value,2),T=ce[0],L=ce[1],w=A.get(T);if(w)try{for(var H=(c=void 0,Hn(Object.entries(L.entries))),de=H.next();!de.done;de=H.next()){var Se=Ir(de.value,2),te=Se[0],ue=Se[1],ve=D.get(br(ue));if(ve&&!w.getAt(te)){var se=br(ve.objectId),we=!1;try{for(var pe=(h=void 0,Hn(w.entries())),Ee=pe.next();!Ee.done;Ee=pe.next()){var Oe=Ir(Ee.value,2),O=Oe[1];if(br(O.objectId)===se){we=!0;break}}}catch(ge){h={error:ge}}finally{try{Ee&&!Ee.done&&(d=pe.return)&&d.call(pe)}finally{if(h)throw h.error}}if(!we)try{w.setAt(te,ve)}catch{}}}}catch(ge){c={error:ge}}finally{try{de&&!de.done&&(u=H.return)&&u.call(H)}finally{if(c)throw c.error}}}}catch(R){s={error:R}}finally{try{Q&&!Q.done&&(l=X.return)&&l.call(X)}finally{if(s)throw s.error}}var Pe;try{for(var Xe=Hn(this._dictionaries.values()),$=Xe.next();!$.done;$=Xe.next()){var w=$.value;if(!w.ownerObjectId||w.ownerObjectId==="0"){Pe=w;break}}}catch(R){p={error:R}}finally{try{$&&!$.done&&(f=Xe.return)&&f.call(Xe)}finally{if(p)throw p.error}}if(Pe?.handle){var yt=this._db.objects.dictionary;try{for(var C=Hn(Object.entries(Pe.entries)),I=C.next();!I.done;I=C.next()){var B=Ir(I.value,2),K=B[0],q=B[1];if(!yt.getAt(K)){var F=D.get(br(q));if(F instanceof Wt)try{yt.setAt(K,F)}catch{}}}}catch(R){m={error:R}}finally{try{I&&!I.done&&(g=C.return)&&g.call(C)}finally{if(m)throw m.error}}}}},r.prototype.finishCannoscale=function(){var e=this._db.objects.dictionary,t=e.getAt("AcDbVariableDictionary");if(t instanceof Wt){var n=t.getAt("CANNOSCALE");n instanceof yg&&n.value&&(this._db.cannoscale=n.value)}},r.prototype.readPersistDictionary=function(e){for(var t={handle:"",ownerObjectId:"",entries:{}},n;!e.atEndOfObject&&!e.atEof&&!e.atExtendedData;){var i=e.readItem();if(!i)break;var o=Number(i.code);switch(o){case 5:t.handle=String(i.value);break;case 330:t.ownerObjectId=String(i.value);break;case 100:case 280:case 281:break;case 3:n=String(i.value);break;case 350:case 340:case 360:{var a=br(String(i.value));n?(t.entries[n]=a,n=void 0):o===360&&!t.extensionDictionaryId&&(t.extensionDictionaryId=a);break}default:break}}return t.handle=br(t.handle),t.ownerObjectId=br(t.ownerObjectId),t.extensionDictionaryId&&(t.extensionDictionaryId=br(t.extensionDictionaryId)),t},r.prototype.finishLayerFilterTree=function(){if(!(this._dictionaries.size===0&&this._xrecords.size===0)){var e=B0({dictionaries:this._dictionaries,xrecords:this._xrecords});e.root.getNestedFilters().length>0&&(this._db.layerFilters=e),this._dictionaries.clear(),this._xrecords.clear()}},r.prototype.linkLayoutsToBlockTableRecords=function(){var e,t,n,i,o,a,s=this._db.tables.blockTable,l=rn.MODEL_SPACE_NAME.toUpperCase();try{for(var c=Hn(this._db.objects.layout.entries()),u=c.next();!u.done;u=c.next()){var h=Ir(u.value,2),d=h[1];if(d.layoutName==="Model"){var p=s.modelSpace;d.blockTableRecordId=p.objectId,p.layoutId=d.objectId;continue}var f=br(d.objectId),m=!1;try{for(var g=(n=void 0,Hn(s.newIterator())),y=g.next();!y.done;y=g.next()){var b=y.value;if(br(b.layoutId)===f){d.blockTableRecordId=b.objectId,m=!0;break}}}catch(w){n={error:w}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(n)throw n.error}}if(!m&&d.blockTableRecordId){var b=s.getIdAt(d.blockTableRecordId);b&&(b.layoutId=d.objectId)}else if(!m)try{for(var v=(o=void 0,Hn(s.newIterator())),x=v.next();!x.done;x=v.next()){var b=x.value;if(b.isPaperSapce&&b.name.toUpperCase()!==l&&!b.layoutId){d.blockTableRecordId=b.objectId,b.layoutId=d.objectId;break}}}catch(w){o={error:w}}finally{try{x&&!x.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}}}catch(w){e={error:w}}finally{try{u&&!u.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}},r})()});var Ip,Lp,bg,rce,$0,CO=W(()=>{zt();tt();$l();A0();mg();M0();NA();P0();sO();C0();lO();MA();kA();gu();wu();H7();TO();dO();EO();Ip=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},Lp=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},bg=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rce=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},$0=(function(){function r(e,t){t===void 0&&(t={});var n;this._db=e,this._options=t,this._unknownEntityCount=0,this._unknownObjectCount=0,this._attributeMap=new Map,this._yieldGate=new $s((n=this._options.yieldBudgetMs)!==null&&n!==void 0?n:Kc)}return Object.defineProperty(r.prototype,"unknownEntityCount",{get:function(){return this._unknownEntityCount},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"unknownObjectCount",{get:function(){return this._unknownObjectCount},enumerable:!1,configurable:!0}),r.prototype.read=function(e){return Ip(this,void 0,void 0,function(){var t,n,i;return Lp(this,function(o){switch(o.label){case 0:this._unknownEntityCount=0,this._unknownObjectCount=0,this._attributeMap.clear(),e.database=this._db,o.label=1;case 1:return e.atEof?[3,4]:(t=e.readItem(),t?Number(t.code)!==0?[3,1]:(n=String(t.value).toUpperCase(),n==="EOF"?[3,4]:n!=="SECTION"?[3,3]:(i=this.readSectionName(e),[4,this.readSection(e,i)])):[3,4]);case 2:return o.sent(),[3,1];case 3:return[3,1];case 4:return this.flushRemainingAttributes(),[2,{unknownEntityCount:this._unknownEntityCount,unknownObjectCount:this._unknownObjectCount}]}})})},r.prototype.readSectionName=function(e){var t=e.readItem();return t&&Number(t.code)===2?String(t.value).toUpperCase():(t&&e.pushBackItem(t),"")},r.prototype.readSection=function(e,t){return Ip(this,void 0,void 0,function(){var n,i;return Lp(this,function(o){switch(o.label){case 0:switch(n=t,n){case"HEADER":return[3,1];case"CLASSES":return[3,3];case"TABLES":return[3,5];case"BLOCKS":return[3,7];case"ENTITIES":return[3,10];case"OBJECTS":return[3,13];case"ACDSDATA":return[3,15];case"THUMBNAILIMAGE":return[3,17]}return[3,19];case 1:return L0(e,this._db),[4,this.reportParseProgress(e)];case 2:return o.sent(),[3,21];case 3:return this.readClassesSection(e),[4,this.reportParseProgress(e)];case 4:return o.sent(),[3,21];case 5:return this.readTablesSection(e),[4,this.reportParseProgress(e)];case 6:return o.sent(),[3,21];case 7:return[4,this.readBlocksSection(e)];case 8:return o.sent(),[4,this.reportParseProgress(e)];case 9:return o.sent(),[3,21];case 10:return[4,this.readEntitiesSection(e)];case 11:return o.sent(),[4,this.reportParseProgress(e)];case 12:return o.sent(),[3,21];case 13:return i=new Y0(this._db),i.read(e),this._unknownObjectCount+=i.unknownObjectCount,[4,this.reportParseProgress(e)];case 14:return o.sent(),[3,21];case 15:return this.applyAcdsDataToSolids(G7(e)),[4,this.reportParseProgress(e)];case 16:return o.sent(),[3,21];case 17:return this.readThumbnailImageSection(e),[4,this.reportParseProgress(e)];case 18:return o.sent(),[3,21];case 19:return this.skipUntilEndSec(e),[4,this.reportParseProgress(e)];case 20:return o.sent(),[3,21];case 21:return[2]}})})},r.prototype.applyAcdsDataToSolids=function(e){var t,n,i,o,a,s,l=Object.keys(e.byOwnerHandle);if(l.length!==0){var c=new Map;try{for(var u=bg(this._db.tables.blockTable.newIterator()),h=u.next();!h.done;h=u.next()){var d=h.value;try{for(var p=(i=void 0,bg(d.newIterator())),f=p.next();!f.done;f=p.next()){var m=f.value;m instanceof hp&&c.set(GA(m.objectId),m)}}catch(w){i={error:w}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}}catch(w){t={error:w}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var g=bg(l),y=g.next();!y.done;y=g.next()){var b=y.value,v=e.byOwnerHandle[b];if(v){var x=c.get(GA(b));x&&x.setSabBytes(v)}}}catch(w){a={error:w}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}}},r.prototype.readThumbnailImageSection=function(e){for(var t=0,n=[];!e.atEof;){var i=e.readItem();if(!i)break;if(Number(i.code)===0){var o=String(i.value).toUpperCase();if(o==="ENDSEC")break;e.pushBackItem(i);break}Number(i.code)===90?t=Number(i.value)||0:Number(i.code)===310&&(i.value instanceof Uint8Array?n.push(i.value):n.push(String(i.value)))}if(n.length!==0){var a=ds(n);!a||a.length===0||(this._db.thumbnailImage=t>0&&a.length>t?a.subarray(0,t):a)}},r.prototype.readClassesSection=function(e){for(var t=[];!e.atEof;){var n=e.peekItem();if(!n)break;if(Number(n.code)!==0){e.readItem();continue}var i=String(n.value).toUpperCase();if(i==="ENDSEC"){e.readItem();break}if(i==="CLASS"){e.readItem();var o=this.readClassRecord(e);(o.name||o.cppClassName)&&t.push(o);continue}e.readItem(),e.skipToEndOfObject()}t.length>0&&(this._db.classes=t)},r.prototype.readClassRecord=function(e){for(var t={name:"",cppClassName:"",appName:"",proxyFlag:0,instanceCount:0,wasProxy:!1,isEntity:!1};!e.atEndOfObject&&!e.atEof;){var n=e.readItem();if(!n)break;var i=Number(n.code);switch(i){case 1:t.name=String(n.value);break;case 2:t.cppClassName=String(n.value);break;case 3:t.appName=String(n.value);break;case 90:t.proxyFlag=Number(n.value);break;case 91:t.instanceCount=Number(n.value);break;case 280:t.wasProxy=Number(n.value)!==0;break;case 281:t.isEntity=Number(n.value)!==0;break;default:break}}return t},r.prototype.readTablesSection=function(e){for(;!e.atEof;){var t=e.peekItem();if(!t)break;if(Number(t.code)!==0){e.readItem();continue}var n=String(t.value).toUpperCase();if(n==="ENDSEC"){e.readItem();break}if(n==="TABLE"){e.readItem();var i=this.readTableName(e);this.readTable(e,i);continue}e.readItem(),e.skipToEndOfObject()}this._db.ensureTextStyleDefaults()},r.prototype.readTableName=function(e){for(;!e.atEof;){var t=e.peekItem();if(!t)return"";var n=Number(t.code);if(n===0)return"";if(e.readItem(),n===2)return String(t.value).toUpperCase()}return""},r.prototype.readTable=function(e,t){var n=this;switch(t){case"LAYER":this.readNamedTable(e,"LAYER",function(){return new aa},function(i){i.name&&n._db.tables.layerTable.add(i)});break;case"LTYPE":this.readNamedTable(e,"LTYPE",function(){return new La},function(i){i.name&&n._db.tables.linetypeTable.add(i)});break;case"STYLE":this.readNamedTable(e,"STYLE",function(){return new vu},function(i){n._db.tables.textStyleTable.add(i)});break;case"DIMSTYLE":this.readNamedTable(e,"DIMSTYLE",function(){return new ri},function(i){i.name&&n._db.tables.dimStyleTable.add(i)});break;case"VPORT":this.readNamedTable(e,"VPORT",function(){return new xu},function(i){i.name&&n._db.tables.viewportTable.add(i)});break;case"APPID":this.readNamedTable(e,"APPID",function(){return new Th},function(i){i.name&&n._db.tables.appIdTable.add(i)});break;case"VIEW":this.readNamedTable(e,"VIEW",function(){return new T0},function(i){i.name&&n._db.tables.viewTable.add(i)});break;case"UCS":this.readNamedTable(e,"UCS",function(){return new E0},function(i){i.name&&n._db.tables.ucsTable.add(i)});break;case"BLOCK_RECORD":this.readBlockRecordTable(e);break;default:this.skipUntilEndTab(e);break}},r.prototype.readNamedTable=function(e,t,n,i){for(;!e.atEof;){var o=e.peekItem();if(!o)break;if(Number(o.code)!==0){e.readItem();continue}var a=String(o.value).toUpperCase();if(a==="ENDTAB"){e.readItem();break}if(a==="ENDSEC")break;if(a===t){e.readItem();var s=n();s.dxfIn(e),i(s);continue}e.readItem(),e.skipToEndOfObject()}},r.prototype.readBlockRecordTable=function(e){for(var t=!1;!e.atEof;){var n=e.peekItem();if(!n)break;if(Number(n.code)!==0){e.readItem();continue}var i=String(n.value).toUpperCase();if(i==="ENDTAB"){e.readItem();break}if(i==="ENDSEC")break;if(i==="BLOCK_RECORD"){e.readItem(),t||(this._db.tables.blockTable.removeAll(),t=!0);var o=new rn;o.dxfIn(e),o.name&&this._db.tables.blockTable.add(o);continue}e.readItem(),e.skipToEndOfObject()}},r.prototype.skipUntilEndTab=function(e){for(;!e.atEof;){var t=e.readItem();if(!t||Number(t.code)===0&&String(t.value).toUpperCase()==="ENDTAB")break}},r.prototype.readBlocksSection=function(e){return Ip(this,void 0,void 0,function(){var t,n,i,o,a,s;return Lp(this,function(l){switch(l.label){case 0:t=Math.max(1,(s=this._options.entityBatchSize)!==null&&s!==void 0?s:200),n=0,l.label=1;case 1:return e.atEof?[3,4]:(i=e.peekItem(),i?Number(i.code)!==0?(e.readItem(),[3,1]):(o=String(i.value).toUpperCase(),o==="ENDSEC"?(e.readItem(),[3,4]):o!=="BLOCK"?[3,3]:(e.readItem(),[4,this.readBlockDefinition(e,t,n)])):[3,4]);case 2:return a=l.sent(),n=a,[3,1];case 3:return e.readItem(),e.skipToEndOfObject(),[3,1];case 4:return[2]}})})},r.prototype.readBlockDefinition=function(e,t,n){return Ip(this,void 0,void 0,function(){var i,o,a,s,l;return Lp(this,function(c){switch(c.label){case 0:i=this.readBlockBeginFields(e),o=this.ensureBlockTableRecord(i),c.label=1;case 1:return e.atEof?[3,7]:(a=e.peekItem(),a?Number(a.code)!==0?(e.readItem(),[3,1]):(s=String(a.value).toUpperCase(),s==="ENDBLK"?(e.readItem(),e.skipToEndOfObject(),[3,7]):s==="ENDSEC"?[3,7]:(e.readItem(),this.consumeSeqend(e,s)?(n+=1,n>=t?(n=0,[4,this.yieldAndReportProgress(e)]):[3,3]):[3,4])):[3,7]);case 2:c.sent(),c.label=3;case 3:return[3,1];case 4:return l=vg(e,s),l?this.shouldAcceptBlockEntity(o)&&this.acceptEntity(l,o):(this._unknownEntityCount+=1,e.skipToEndOfObject()),n+=1,n>=t?(n=0,[4,this.yieldAndReportProgress(e)]):[3,6];case 5:c.sent(),c.label=6;case 6:return[3,1];case 7:return[2,n]}})})},r.prototype.shouldAcceptBlockEntity=function(e){return!e.isModelSapce&&!e.isPaperSapce},r.prototype.consumeSeqend=function(e,t){return t!=="SEQEND"?!1:(e.skipToEndOfObject(),!0)},r.prototype.readBlockBeginFields=function(e){for(var t=new k,n="",i=0,o="",a,s;!e.atEndOfObject&&!e.atEof&&!e.atExtendedData;){var l=e.readItem();if(!l)break;var c=Number(l.code);if(c!==100){var u=Number(l.value);switch(c){case 5:a=String(l.value);break;case 330:s=String(l.value);break;case 2:case 3:n||(n=String(l.value));break;case 70:i=u;break;case 10:t.x=u;break;case 20:t.y=u;break;case 30:t.z=u;break;case 1:o=String(l.value);break;case 8:case 67:case 410:break;default:break}}}return{name:n,flags:i,origin:t,pathName:o,objectId:a,ownerId:s}},r.prototype.ensureBlockTableRecord=function(e){var t=e.name?this._db.tables.blockTable.getAt(e.name):void 0;t||(t=new rn,t.name=e.name||"*UNKNOWN",e.objectId&&(t.objectId=e.objectId),this._db.tables.blockTable.add(t)),t.origin.copy(e.origin);var n=rn.sanitizeImportedFlags(e.flags);return e.pathName&&(t.pathName=e.pathName,(n&(Kr.Xref|Kr.XrefOverlay))===0&&(n=n|Kr.Xref)),t.flags=n,t},r.prototype.readEntitiesSection=function(e){return Ip(this,void 0,void 0,function(){var t,n,i,o,a,s,l;return Lp(this,function(c){switch(c.label){case 0:t=Math.max(1,(l=this._options.entityBatchSize)!==null&&l!==void 0?l:200),n=0,i=this._db.tables.blockTable.modelSpace,c.label=1;case 1:return e.atEof?[3,7]:(o=e.peekItem(),o?Number(o.code)!==0?(e.readItem(),[3,1]):(a=String(o.value).toUpperCase(),a==="ENDSEC"?(e.readItem(),[3,7]):(e.readItem(),this.consumeSeqend(e,a)?(n+=1,n>=t?(n=0,[4,this.yieldAndReportProgress(e)]):[3,3]):[3,4])):[3,7]);case 2:c.sent(),c.label=3;case 3:return[3,1];case 4:return s=vg(e,a),s?this.acceptEntity(s,this.resolveEntityOwner(s,i)):(this._unknownEntityCount+=1,e.skipToEndOfObject()),n+=1,n>=t?(n=0,[4,this.yieldAndReportProgress(e)]):[3,6];case 5:c.sent(),c.label=6;case 6:return[3,1];case 7:return[2]}})})},r.prototype.resolveEntityOwner=function(e,t){var n=e.getAttrWithoutException("ownerId");if(n){var i=this._db.tables.blockTable.getIdAt(n);if(i&&(i.isModelSapce||i.isPaperSapce))return i}if(e.dxfPaperSpace){var o=this._db.tables.blockTable.getAt(rn.PAPER_SPACE_NAME_PREFIX);if(o)return o}return t},r.prototype.acceptEntity=function(e,t){var n,i;if(e instanceof Zl){this.linkOrDeferAttribute(e,t);return}if(t.appendEntity(e),e instanceof pn){var o=this._attributeMap.get(e.objectId);if(o&&o.length>0){try{for(var a=bg(o),s=a.next();!s.done;s=a.next()){var l=s.value;e.appendAttributes(l)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this._attributeMap.delete(e.objectId)}}},r.prototype.linkOrDeferAttribute=function(e,t){var n,i=e.getAttrWithoutException("ownerId");if(!(!i||i==="0")){var o=(n=t.getIdAt(i))!==null&&n!==void 0?n:this._db.tables.blockTable.getEntityById(i);if(o instanceof pn){o.appendAttributes(e);return}var a=this._attributeMap.get(i);a||(a=[],this._attributeMap.set(i,a)),a.push(e)}},r.prototype.flushRemainingAttributes=function(){var e,t,n,i;try{for(var o=bg(this._attributeMap),a=o.next();!a.done;a=o.next()){var s=rce(a.value,2),l=s[0],c=s[1],u=this._db.tables.blockTable.getEntityById(l);if(u instanceof pn)try{for(var h=(n=void 0,bg(c)),d=h.next();!d.done;d=h.next()){var p=d.value;u.appendAttributes(p)}}catch(f){n={error:f}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}}catch(f){e={error:f}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this._attributeMap.clear()},r.prototype.skipUntilEndSec=function(e){for(;!e.atEof;){var t=e.readItem();if(!t||Number(t.code)===0&&String(t.value).toUpperCase()==="ENDSEC")break}},r.prototype.reportParseProgress=function(e){return Ip(this,void 0,void 0,function(){var t,n,i,o;return Lp(this,function(a){switch(a.label){case 0:return t=this._options,n=t.onProgress,i=t.totalBytes,!n||!i||i<=0?[2]:(o=Math.min(1,Math.max(0,e.position().byteOffset/i)),[4,n(o)]);case 1:return a.sent(),[2]}})})},r.prototype.yieldAndReportProgress=function(e){return Ip(this,void 0,void 0,function(){return Lp(this,function(t){switch(t.label){case 0:return[4,this.reportParseProgress(e)];case 1:return t.sent(),[4,this._yieldGate.maybeYield(os)];case 2:return t.sent(),[2]}})})},r})()});var ice,IO,K0,q0,JA,kO,QA,e2,Z0,LO=W(()=>{zt();Hm();FA();CO();ice=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),IO=function(){return IO=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},IO.apply(this,arguments)},K0=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},q0=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},JA=1,kO=18,QA=20,e2=98,Z0=(function(r){ice(e,r);function e(t){return t===void 0&&(t={}),r.call(this,IO({useWorker:!1},t))||this}return e.prototype.read=function(t,n){return K0(this,arguments,void 0,function(i,o,a){var s,l,c,u,h,d,p,f,m,g,y,b,v,x,w,_=this;return a===void 0&&(a={}),q0(this,function(A){switch(A.label){case 0:return s=a.minimumChunkSize,l=s===void 0?10:s,c=a.progress,u=a.encoding,this.progress=c,h=function(E,S,M,T){return K0(_,void 0,void 0,function(){return q0(this,function(L){switch(L.label){case 0:return c?[4,c(E,S,M,T)]:[2];case 1:return L.sent(),[2]}})})},[4,h(0,"START","START")];case 1:return A.sent(),[4,h(JA,"PARSE","START")];case 2:return A.sent(),[4,zl()];case 3:A.sent(),o.beginEventBatch(),d=!0,A.label=4;case 4:return A.trys.push([4,11,,12]),p=el.fromBuffer(i,{database:o,encoding:u}),f=i.byteLength,m=JA,g=new $0(o,{entityBatchSize:Math.max(1,l||200),yieldBudgetMs:Kc,totalBytes:f,onProgress:function(E){return K0(_,void 0,void 0,function(){var S;return q0(this,function(M){switch(M.label){case 0:return S=Math.min(kO-1,JA+Math.floor(E*(kO-JA))),S<=m?[2]:(m=S,[4,h(S,"PARSE","IN-PROGRESS")]);case 1:return M.sent(),[2]}})})}}),[4,g.read(p)];case 5:return y=A.sent(),[4,h(kO,"PARSE","END",{unknownEntityCount:y.unknownEntityCount})];case 6:return A.sent(),[4,h(QA,"ENTITY","START")];case 7:return A.sent(),b=Math.max(1,l||200),v=QA,x=new $s(Kc),[4,o.endEventBatchChunked(b,function(E,S){return K0(_,void 0,void 0,function(){var M;return q0(this,function(T){switch(T.label){case 0:return M=S<=0?e2:Math.min(e2,QA+Math.floor(E/S*(e2-QA))),M>v?(v=M,[4,h(M,"ENTITY","IN-PROGRESS")]):[3,2];case 1:T.sent(),T.label=2;case 2:return[4,x.maybeYield()];case 3:return T.sent(),[2]}})})})];case 8:return A.sent(),d=!1,[4,h(e2,"ENTITY","END")];case 9:return A.sent(),[4,h(100,"END","END")];case 10:return A.sent(),[3,12];case 11:throw w=A.sent(),d&&o.endEventBatch(),w;case 12:return[2]}})})},e.prototype.parse=function(t){return K0(this,void 0,void 0,function(){return q0(this,function(n){return[2,{model:null,data:{unknownEntityCount:0}}]})})},e})(bp)});var Ri,J0,OO=W(()=>{zt();LO();(function(r){r.DXF="dxf",r.DWG="dwg"})(Ri||(Ri={}));J0=(function(){function r(){this.events={registered:new wt,unregistered:new wt},this._converters=new Map,this.register(Ri.DXF,new Z0)}return r.createInstance=function(){return r._instance==null&&(r._instance=new r),this._instance},Object.defineProperty(r,"instance",{get:function(){return r._instance||(r._instance=new r),r._instance},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fileTypes",{get:function(){return this._converters.keys()},enumerable:!1,configurable:!0}),r.prototype.register=function(e,t){this._converters.set(e,t),this.events.registered.dispatch({fileType:e,converter:t})},r.prototype.get=function(e){return this._converters.get(e)},r.prototype.unregister=function(e){var t=this._converters.get(e);t&&(this._converters.delete(e),this.events.unregistered.dispatch({fileType:e,converter:t}))},r})()});function ao(r){var e,t=t2((e=r?.context)===null||e===void 0?void 0:e.database);return{circleSides:t,maxSegments:t}}function t2(r){if(r!=null&&typeof r=="object"){var e=r.drawCircleSides;if(typeof e=="number"&&Number.isFinite(e))return Ke.resolveCircleSides(e)}return Ke.DEFAULT_CIRCLE_SIDES}function BO(r){var e,t,n;if(r==null||typeof r!="object")return Ke.DEFAULT_CIRCLE_SIDES;var i=r.tables,o=(n=(t=(e=i?.viewportTable)===null||e===void 0?void 0:e.getActiveVport)===null||t===void 0?void 0:t.call(e))===null||n===void 0?void 0:n.circleSides;return typeof o!="number"||!Number.isFinite(o)?Ke.DEFAULT_CIRCLE_SIDES:Ke.resolveCircleSides(o)}var xg,DO,RO,Op=W(()=>{tt();xg=50,DO=Ke.DEFAULT_CIRCLE_SIDES,RO=1e3});function Cu(r,e,t){var n=FS(r,e,t);return n?Dt.fromGePolyline(n):null}function ace(r){var e=zO(r,!0);if(e.length<2)return null;var t=NO(e,!0),n=t.left,i=t.right,o=_g(n),a=_g(i);if(!Rp(o)||!Rp(a)||o.length!==a.length)return null;var s=Math.abs(Dp(o)),l=Math.abs(Dp(a)),c=Q0(s>=l?[o,a]:[a,o],2),u=c[0],h=c[1];return{outer:u,inner:h}}function sce(r,e){var t,n;if(r.length<2)return null;if(e){var i=t9(r,!0);return i?[i]:null}var o=lce(r),a=[];try{for(var s=wg(o),l=s.next();!l.done;l=s.next()){var c=l.value,u=t9(c,!1);u!=null&&a.push(u)}}catch(h){t={error:h}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a.length>0?a:null}function t9(r,e){var t=zO(r,e);if(t.length<2)return null;var n=NO(t,e),i=n.left,o=n.right;if(r9(i)<2||r9(o)<2)return null;var a=new pr;if(e){var s=_g(i),l=_g(o),c=Rp(s),u=Rp(l);if(!c&&!u)return null;if(!c||!u)return a.add(new Ot(c?s:l,!0)),a;var h=Math.abs(Dp(s)),d=Math.abs(Dp(l)),p=Q0(h>=d?[s,l]:[l,s],2),f=p[0],m=p[1];return a.add(new Ot(f,!0)),a.add(new Ot(m,!0)),a}return a9(t)&&uce(a,t)||dce(a,i,o)?a:null}function lce(r){if(r.length<2)return[r];for(var e=[],t=0,n=new Map,i=0;i<r.length;i++){var o=n9(r[i]),a=n.get(o);if(a!=null&&i-a>1){var s=r.slice(t,i+1);if(s.length>=2&&e.push(s),a===t&&i===r.length-1)return e.length>0?e:[r];t=a,n.clear();for(var l=t;l<=i;l++)n.set(n9(r[l]),l);continue}n.set(o,i)}var c=r.slice(t);return c.length>=2&&e.push(c),e.length>0?e:[r]}function n9(r){return"".concat(r.x.toFixed(4),":").concat(r.y.toFixed(4))}function cce(r,e){var t=Math.max(r,e),n=Math.min(r,e);if(t<=ii)return!1;var i=t-n;return i>ii}function a9(r){if(r.length<3)return!1;var e=r[0],t=r[r.length-1],n=Math.hypot(t.x-e.x,t.y-e.y);if(n<=ii)return!0;var i=Math.max.apply(Math,o9([],Q0(r.map(function(o){return o.width})),!1));return i<=ii?!1:n<=i*4}function uce(r,e){var t=NO(e,!0),n=t.left,i=t.right,o=_g(n),a=_g(i);if(!Rp(o)||!Rp(a))return!1;var s=Math.abs(Dp(o)),l=Math.abs(Dp(a));if(!cce(s,l))return!1;var c=Q0(s>=l?[o,a]:[a,o],2),u=c[0],h=c[1];return r.add(new Ot(u,!0)),r.add(new Ot(h,!0)),!0}function NO(r,e){for(var t=new Array(r.length),n=new Array(r.length),i=0;i<r.length;i++){var o=r[i],a=Math.max(0,o.width)/2;if(a<=ii){t[i]={x:o.x,y:o.y},n[i]={x:o.x,y:o.y};continue}var s=pce(r,i,e);if(s==null){t[i]=null,n[i]=null;continue}t[i]={x:o.x+s.x*a,y:o.y+s.y*a},n[i]={x:o.x-s.x*a,y:o.y-s.y*a}}return{left:t,right:n}}function hce(r,e,t,n,i){var o=[e,t,n,i];return Rp(o)?(r.add(new Ot(o,!0)),!0):!1}function dce(r,e,t){for(var n=!1,i=0;i<e.length-1;i++){var o=e[i],a=e[i+1],s=t[i],l=t[i+1];o==null||a==null||s==null||l==null||hce(r,o,a,l,s)&&(n=!0)}return n}function r9(r){return r.reduce(function(e,t){return t==null?e:e+1},0)}function _g(r){return r.filter(function(e){return e!=null})}function zO(r,e){var t=[];if(r.forEach(function(o){var a=t[t.length-1];(!a||Math.abs(a.x-o.x)>ii||Math.abs(a.y-o.y)>ii||Math.abs(a.width-o.width)>ii)&&t.push(o)}),e&&t.length>1){var n=t[0],i=t[t.length-1];Math.abs(n.x-i.x)<=ii&&Math.abs(n.y-i.y)<=ii&&t.pop()}return t}function pce(r,e,t){var n=r.length,i=r[e],o=r[(e-1+n)%n],a=r[(e+1)%n],s=i9(i.x-o.x,i.y-o.y),l=i9(a.x-i.x,a.y-i.y);if(t||(e===0&&(s=l),e===n-1&&(l=s)),s==null&&l==null)return null;if(s==null)return n2(l);if(l==null)return n2(s);var c=n2(s),u=n2(l),h=c.x+u.x,d=c.y+u.y,p=Math.hypot(h,d);if(p<=ii)return u;var f={x:h/p,y:d/p},m=Math.abs(f.x*u.x+f.y*u.y),g=m<=ii?e9:Math.min(1/m,e9);return{x:f.x*g,y:f.y*g}}function i9(r,e){var t=Math.hypot(r,e);return t<=ii?null:{x:r/t,y:e/t}}function n2(r){return{x:-r.y,y:r.x}}function Dp(r){for(var e=0,t=r.length,n=0;n<t;n++){var i=r[n],o=r[(n+1)%t];e+=i.x*o.y-o.x*i.y}return e/2}function Rp(r){return r.length>=3&&Math.abs(Dp(r))>ii}function fce(r,e,t){return r+(e-r)*t}var oce,wg,Q0,o9,FO,Dt,ii,e9,ul=W(()=>{tt();yp();Ql();Op();Fn();no();En();Di();ro();oce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),wg=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Q0=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},o9=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},FO=new Z,Dt=(function(r){oce(e,r);function e(){var t=r.call(this)||this;return t._thickness=0,t._normal=new G(0,0,1),t._elevation=0,t._geo=new Ot,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"LWPOLYLINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfVertices",{get:function(){return this._geo.numberOfVertices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elevation",{get:function(){return this._elevation},set:function(t){this._elevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return this._geo.closed},set:function(t){this._geo.closed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this._geo.area},enumerable:!1,configurable:!0}),e.prototype.addVertexAt=function(t,n,i,o,a){i===void 0&&(i=0),o===void 0&&(o=-1),a===void 0&&(a=-1);var s=o<0?void 0:o,l=a<0?void 0:a,c={x:n.x,y:n.y,bulge:i,startWidth:s,endWidth:l};this._geo.addVertexAt(t,c)},e.prototype.removeVertexAt=function(t){this._geo.removeVertexAt(t)},e.prototype.reset=function(t,n){this._geo.reset(t,n)},e.prototype.getPoint2dAt=function(t){return this._geo.getPointAt(t)},e.prototype.getPoint3dAt=function(t){var n=this.getPoint2dAt(t);return this.ocsPointToWcs(n.x,n.y)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this._geo.box;return t.isEmpty()?new De:new De().setFromPoints([this.ocsPointToWcs(t.min.x,t.min.y),this.ocsPointToWcs(t.max.x,t.min.y),this.ocsPointToWcs(t.max.x,t.max.y),this.ocsPointToWcs(t.min.x,t.max.y)])},enumerable:!1,configurable:!0}),e.prototype.ocsPointToWcs=function(t,n){return Er({x:t,y:n,z:this._elevation},this._normal)},e.prototype.subGetIntersectCurves=function(){return m0(this._geo.vertices,this.closed,this._elevation,this._normal)},e.prototype.subGetGripPoints=function(){for(var t=new Array,n=0;n<this.numberOfVertices;++n)t.push(this.getPoint3dAt(n));return this.shouldIncludeSegmentMidpointGrips()&&this.appendSegmentMidpointGrips(t),t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this,o=this.numberOfVertices,a=this.shouldIncludeSegmentMidpointGrips(),s=a?this.getSegmentCount():0,l=dr(n,this._normal);return un(t,function(c){if(c<o){Sh(i._geo.vertices,c,l);return}if(!(!a||c>=o+s)){var u=c-o;Sh(i._geo.vertices,u,l),Sh(i._geo.vertices,(u+1)%o,l)}}),this},e.prototype.shouldIncludeSegmentMidpointGrips=function(){return this.getGripsMode()>=2},e.prototype.getGripsMode=function(){try{var t=gt.instance().getVar(oe.GRIPS,this.database);return typeof t=="number"?t:2}catch{return 2}},e.prototype.getSegmentCount=function(){var t=this.numberOfVertices;return t<2?0:this.closed?t:t-1},e.prototype.appendSegmentMidpointGrips=function(t){for(var n,i,o,a=this._geo,s=this._elevation,l=this.getSegmentCount(),c=a.numberOfVertices,u=0;u<l;u++){var h=[];Ah(a.getPointAt(u),a.getPointAt((u+1)%c),(o=a.vertices[u])===null||o===void 0?void 0:o.bulge,s,ne.MidPoint,{x:0,y:0,z:0},h);try{for(var d=(n=void 0,wg(h)),p=d.next();!p.done;p=d.next()){var f=p.value;t.push(this.ocsPointToWcs(f.x,f.y))}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a,s,l,c=this._geo,u=this._elevation,h=c.numberOfVertices;if(h!==0)switch(t){case ne.EndPoint:for(var d=0;d<h;d++)o.push(this.getPoint3dAt(d));break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:case ne.Tangent:{for(var p=this.closed?h:h-1,f=[],d=0;d<p;d++){var m=[];Ah(c.getPointAt(d),c.getPointAt((d+1)%h),(l=c.vertices[d])===null||l===void 0?void 0:l.bulge,u,t,n,m);try{for(var g=(a=void 0,wg(m)),y=g.next();!y.done;y=g.next()){var b=y.value;f.push(this.ocsPointToWcs(b.x,b.y))}}catch(w){a={error:w}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}}if(t===ne.MidPoint)o.push.apply(o,o9([],Q0(f),!1));else{var v=yr(n,f);v&&o.push(v)}break}default:break}},e.prototype.transformBy=function(t){var n=this,i=t.determinant()<0,o=this._elevation;return this._geo.vertices.forEach(function(a){var s=new k(a.x,a.y,n._elevation).applyMatrix4(t);a.x=s.x,a.y=s.y,o=s.z,i&&a.bulge!=null&&(a.bulge=-a.bulge)}),this._elevation=o,this._geo._boundingBoxNeedsUpdate=!0,this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"vertices",type:"array",editable:!1,itemSchema:{properties:[{name:"x",type:"float",editable:!0},{name:"y",type:"float",editable:!0}]},accessor:{get:function(){return t._geo.vertices}}},{name:"elevation",type:"float",editable:!0,accessor:{get:function(){return t.elevation},set:function(n){t.elevation=n}}},{name:"length",type:"float",editable:!1,accessor:{get:function(){return t._geo.length}}}]},{groupName:"others",properties:[{name:"closed",type:"float",editable:!0,accessor:{get:function(){return t.closed},set:function(n){t.closed=n}}}]}]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return this.hasRenderableWidth()?null:"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=this,i=ao(t),o=this._geo.tessellate(i),a=this.createWidthProfile(i);if(a!=null){var s=this.closed||a9(zO(a,!1));if(s){var l=ace(a);if(l!=null){var c=t.subEntityTraits;return c.fillType={solidFill:!0,patternAngle:0,definitionLines:[]},t.offsetRing(l.outer.map(function(m){return n.ocsPointToWcs(m.x,m.y)}),l.inner.map(function(m){return n.ocsPointToWcs(m.x,m.y)}))}}var u=sce(a,this.closed);if(u!=null){var c=t.subEntityTraits,h=c.fillType;c.fillType={solidFill:!0,patternAngle:0,definitionLines:[]};var d=u.map(function(g){return n.mapAreaLoopsToWcs(g),t.area(g)});c.fillType=h;var p=a.map(function(g){return n.ocsPointToWcs(g.x,g.y)});return this.closed&&p.length>=2&&p.push(p[0]),p.length>=2&&d.push(t.lines(p)),d.length===1?d[0]:t.group(d)}}var f=[];return o.forEach(function(m){return f.push(n.ocsPointToWcs(m.x,m.y))}),t.lines(f)},e.prototype.mapAreaLoopsToWcs=function(t){var n,i,o,a;if(!(this._normal.x===0&&this._normal.y===0&&this._normal.z===1))try{for(var s=wg(t.loops),l=s.next();!l.done;l=s.next()){var c=l.value;if("vertices"in c)try{for(var u=(o=void 0,wg(c.vertices)),h=u.next();!h.done;h=u.next()){var d=h.value,p=this.ocsPointToWcs(d.x,d.y);d.x=p.x,d.y=p.y}}catch(f){o={error:f}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}}}catch(f){n={error:f}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.dxfOutFields=function(t){var n;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbPolyline"),t.writeInt32(90,this.numberOfVertices),t.writeInt16(70,this.closed?1:0);var i=this.resolveConstantWidth();i!=null&&t.writeDouble(43,i),t.writeDouble(38,this.elevation),this.thickness!==0&&t.writeDouble(39,this.thickness);for(var o=this._geo.vertices,a=0;a<o.length;++a){var s=o[a];t.writePoint2d(10,this.getPoint2dAt(a)),i==null&&(s.startWidth!=null&&t.writeDouble(40,s.startWidth),s.endWidth!=null&&t.writeDouble(41,s.endWidth));var l=(n=s.bulge)!==null&&n!==void 0?n:0;l!==0&&t.writeDouble(42,l),s.identifier!=null&&t.writeInt32(91,s.identifier)}return t.writeVector3d(210,this.normal),this},e.prototype.dxfOutAs2dPolyline=function(t,n){var i,o,a,s;n===void 0&&(n=!1),t.writeHandle(5,this.objectId),t.writeObjectId(330,this.ownerId),t.writeObjectId(360,this.extensionDictionary),t.writeSubclassMarker("AcDbEntity"),t.writeString(8,this.layer),t.writeString(6,this.lineType),t.writeDouble(48,this.linetypeScale),t.writeInt16(60,this.visibility?0:1),t.writeCmColor(this.color),t.writeLineWeight(370,this.lineWeight),t.writeTransparency(this.transparency);var l=(i=this.database)===null||i===void 0?void 0:i.tables.blockTable.getIdAt(this.ownerId);l?.isPaperSapce&&t.writeInt16(67,1),t.writeSubclassMarker("AcDb2dPolyline"),t.writeInt16(66,this.numberOfVertices>0?1:0),t.writeInt16(70,this.closed?1:0),t.writeDouble(10,0),t.writeDouble(20,0),t.writeDouble(30,this.elevation),n&&this.dxfOutXData(t);for(var c=0;c<this.numberOfVertices;++c){var u=this._geo.vertices[c];t.writeStart("VERTEX"),t.writeHandle(5,(o=this.database)===null||o===void 0?void 0:o.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDb2dVertex"),t.writePoint3d(10,{x:this.getPoint2dAt(c).x,y:this.getPoint2dAt(c).y,z:this.elevation});var h=(a=u?.bulge)!==null&&a!==void 0?a:0;h!==0&&t.writeDouble(42,h),t.writeInt16(70,0)}return t.writeStart("SEQEND"),t.writeHandle(5,(s=this.database)===null||s===void 0?void 0:s.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbPolyline"),this.reset(!1);for(var i=!1,o=this.elevation,a=this.thickness,s=this.normal.x,l=this.normal.y,c=this.normal.z,u=-1,h=0,d=0,p=!1,f=0,m=-1,g=-1,y,b=0,v=function(){if(p){var A=m<0?u:m,E=g<0?u:g;if(FO.x=h,FO.y=d,n.addVertexAt(b++,FO,f,A,E),y!=null){var S=n._geo.vertices[b-1];S&&(S.identifier=y)}p=!1,f=0,m=-1,g=-1,y=void 0}};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var x=t.readItem();if(!x)break;var w=Number(x.code),_=Number(x.value);switch(w){case 90:break;case 70:i=(_&1)!==0;break;case 43:u=_;break;case 38:o=_;break;case 39:a=_;break;case 10:v(),h=_,d=0,p=!0;break;case 20:d=_;break;case 40:m=_;break;case 41:g=_;break;case 42:f=_;break;case 91:y=_;break;case 210:s=_;break;case 220:l=_;break;case 230:c=_;break;default:break}}return v(),this.closed=i,this.elevation=o,this.thickness=a,s*s+l*l+c*c>0&&this.normal.set(s,l,c).normalize(),this},e.prototype.resolveConstantWidth=function(){var t,n,i=this._geo.vertices;if(i.length!==0){var o;try{for(var a=wg(i),s=a.next();!s.done;s=a.next()){var l=s.value,c=l.startWidth,u=l.endWidth;if(c==null&&u==null){if(o!=null&&o!==0)return;o=o??0;continue}var h=c??0,d=u??0;if(h!==d)return;if(o==null)o=h;else if(o!==h)return}}catch(p){t={error:p}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o!=null&&o!==0?o:void 0}},e.prototype.hasRenderableWidth=function(){for(var t,n,i=this._geo.vertices,o=0;o<i.length;o++){var a=Math.max(0,(t=i[o].startWidth)!==null&&t!==void 0?t:0),s=Math.max(0,(n=i[o].endWidth)!==null&&n!==void 0?n:0);if(a>ii||s>ii)return!0}return!1},e.prototype.createWidthProfile=function(t){var n,i,o=this._geo.vertices,a=o.length;if(a<2)return null;for(var s=this.closed?a:a-1,l=[],c=!1,u=0;u<s;u++){var h=o[u],d=o[(u+1)%a],p=Math.max(0,(n=h.startWidth)!==null&&n!==void 0?n:0),f=Math.max(0,(i=h.endWidth)!==null&&i!==void 0?i:0);(p>ii||f>ii)&&(c=!0);for(var m=this.sampleSegment(h,d,t),g=m.length-1,y=0;y<=g;y++)if(!(y===0&&l.length>0)&&!(this.closed&&u===s-1&&y===g)){var b=g>0?y/g:0;l.push({x:m[y].x,y:m[y].y,width:fce(p,f,b)})}}return c&&l.length>=2?l:null},e.prototype.sampleSegment=function(t,n,i){if(t.bulge&&Math.abs(t.bulge)>ii){var o=new Ke(t,n,t.bulge),a=o.tessellate(i);if(a.length>1)return a.map(function(s){return new Z(s.x,s.y)})}return[new Z(t.x,t.y),new Z(n.x,n.y)]},e.from2dPoints=function(t,n){var i=new e;return t.forEach(function(o,a){return i.addVertexAt(a,o)}),i.closed=n,i},e.fromGePolyline=function(t){var n=new e;return t.vertices.forEach(function(i,o){var a;n.addVertexAt(o,new Z(i.x,i.y),(a=i.bulge)!==null&&a!==void 0?a:0)}),n.closed=t.closed,n},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){for(var n=this.numberOfVertices,i=1/0,o=1,a=this.closed?n:n-1,s=0;s<a;s++){var l=this.getPoint2dAt(s),c=this.getPoint2dAt((s+1)%n),u=c.x-l.x,h=c.y-l.y,d=u*u+h*h;if(d!==0){var p=Math.max(0,Math.min(1,((t.x-l.x)*u+(t.y-l.y)*h)/d)),f=Math.pow(t.x-l.x-p*u,2)+Math.pow(t.y-l.y-p*h,2);f<i&&(i=f,o=u*(t.y-l.y)-h*(t.x-l.x)>=0?1:-1)}}return o},e.prototype.createOffsetCurve=function(t){var n=this._geo.offset(t);return n.length===0?null:e.fromGePolyline(n[0])},e.typeName="Polyline",e})(vn);ii=1e-6,e9=4});var r2,Sg,UO=W(()=>{r2={patterns:[{name:"SOLID",description:"",lines:[]},{name:"ANGLE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.275,dashes:[.2,-.075],sourceLine:23},{angle:90,originX:0,originY:0,deltaX:0,deltaY:.275,dashes:[.2,-.075],sourceLine:24}]},{name:"ANSI31",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:26}]},{name:"ANSI32",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.375,dashes:[],sourceLine:28},{angle:45,originX:.176776695,originY:0,deltaX:0,deltaY:.375,dashes:[],sourceLine:29}]},{name:"ANSI33",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:31},{angle:45,originX:.176776695,originY:0,deltaX:0,deltaY:.25,dashes:[.125,-.0625],sourceLine:32}]},{name:"ANSI34",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.75,dashes:[],sourceLine:34},{angle:45,originX:.176776695,originY:0,deltaX:0,deltaY:.75,dashes:[],sourceLine:35},{angle:45,originX:.353553391,originY:0,deltaX:0,deltaY:.75,dashes:[],sourceLine:36},{angle:45,originX:.530330086,originY:0,deltaX:0,deltaY:.75,dashes:[],sourceLine:37}]},{name:"ANSI35",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:39},{angle:45,originX:.176776695,originY:0,deltaX:0,deltaY:.25,dashes:[.3125,-.0625,0,-.0625],sourceLine:40}]},{name:"ANSI36",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:.21875,deltaY:.125,dashes:[.3125,-.0625,0,-.0625],sourceLine:42}]},{name:"ANSI37",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:44},{angle:135,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:45}]},{name:"ANSI38",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:47},{angle:135,originX:0,originY:0,deltaX:.25,deltaY:.125,dashes:[.3125,-.1875],sourceLine:48}]},{name:"AR-B816",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:8,dashes:[],sourceLine:54},{angle:90,originX:0,originY:0,deltaX:8,deltaY:8,dashes:[8,-8],sourceLine:55}]},{name:"AR-B816C",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:8,deltaY:8,dashes:[15.625,-.375],sourceLine:57},{angle:0,originX:-8,originY:.375,deltaX:8,deltaY:8,dashes:[15.625,-.375],sourceLine:58},{angle:90,originX:0,originY:0,deltaX:8,deltaY:8,dashes:[-8.375,7.625],sourceLine:59},{angle:90,originX:-.375,originY:0,deltaX:8,deltaY:8,dashes:[-8.375,7.625],sourceLine:60}]},{name:"AR-B88",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:8,dashes:[],sourceLine:62},{angle:90,originX:0,originY:0,deltaX:8,deltaY:4,dashes:[8,-8],sourceLine:63}]},{name:"AR-BRELM",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5.334,dashes:[7.625,-.375],sourceLine:65},{angle:0,originX:0,originY:2.25,deltaX:0,deltaY:5.334,dashes:[7.625,-.375],sourceLine:66},{angle:0,originX:2,originY:2.667,deltaX:0,deltaY:5.334,dashes:[3.625,-.375],sourceLine:67},{angle:0,originX:2,originY:4.917,deltaX:0,deltaY:5.334,dashes:[3.625,-.375],sourceLine:68},{angle:90,originX:0,originY:0,deltaX:0,deltaY:8,dashes:[2.25,-3.084],sourceLine:69},{angle:90,originX:-.375,originY:0,deltaX:0,deltaY:8,dashes:[2.25,-3.084],sourceLine:70},{angle:90,originX:2,originY:2.667,deltaX:0,deltaY:4,dashes:[2.25,-3.084],sourceLine:71},{angle:90,originX:1.625,originY:2.667,deltaX:0,deltaY:4,dashes:[2.25,-3.084],sourceLine:72}]},{name:"AR-BRSTD",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:2.667,dashes:[],sourceLine:74},{angle:90,originX:0,originY:0,deltaX:2.667,deltaY:4,dashes:[2.667,-2.667],sourceLine:75}]},{name:"AR-CONC",description:"",lines:[{angle:50,originX:0,originY:0,deltaX:4.12975034,deltaY:-5.89789472,dashes:[.75,-8.25],sourceLine:77},{angle:355,originX:0,originY:0,deltaX:-2.03781207,deltaY:7.3723684,dashes:[.6,-6.6],sourceLine:78},{angle:100.45144446,originX:.59771681,originY:-.05229344,deltaX:5.7305871,deltaY:-6.9397673,dashes:[.63740192,-7.01142112],sourceLine:79},{angle:46.1842,originX:0,originY:2,deltaX:6.19462554,deltaY:-8.84684596,dashes:[1.125,-12.375],sourceLine:80},{angle:96.63563549,originX:.88936745,originY:1.86206693,deltaX:8.59588239,deltaY:-10.40964966,dashes:[.95610342,-10.5171376],sourceLine:81},{angle:351.18416399,originX:0,originY:2,deltaX:7.74327494,deltaY:11.05855746,dashes:[.9,-9.90000001],sourceLine:82},{angle:21,originX:1,originY:1.5,deltaX:4.12975034,deltaY:-5.89789472,dashes:[.75,-8.25],sourceLine:83},{angle:326,originX:1,originY:1.5,deltaX:-2.03781207,deltaY:7.3723684,dashes:[.6,-6.6],sourceLine:84},{angle:71.45144474,originX:1.49742254,originY:1.16448426,deltaX:5.7305871,deltaY:-6.9397673,dashes:[.6374019,-7.01142112],sourceLine:85},{angle:37.5,originX:0,originY:0,deltaX:2.123,deltaY:2.567,dashes:[0,-6.52,0,-6.7,0,-6.625],sourceLine:86},{angle:7.5,originX:0,originY:0,deltaX:3.123,deltaY:3.567,dashes:[0,-3.82,0,-6.37,0,-2.525],sourceLine:87},{angle:-32.5,originX:-2.23,originY:0,deltaX:4.6234,deltaY:2.678,dashes:[0,-2.5,0,-7.8,0,-10.35],sourceLine:88},{angle:-42.5,originX:-3.23,originY:0,deltaX:3.6234,deltaY:4.678,dashes:[0,-3.25,0,-5.18,0,-7.35],sourceLine:89}]},{name:"AR-HBONE",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:4,deltaY:4,dashes:[12,-4],sourceLine:91},{angle:135,originX:2.828427125,originY:2.828427125,deltaX:4,deltaY:-4,dashes:[12,-4],sourceLine:92}]},{name:"AR-PARQ1",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:12,deltaY:12,dashes:[12,-12],sourceLine:94},{angle:90,originX:2,originY:0,deltaX:12,deltaY:12,dashes:[12,-12],sourceLine:95},{angle:90,originX:4,originY:0,deltaX:12,deltaY:12,dashes:[12,-12],sourceLine:96},{angle:90,originX:6,originY:0,deltaX:12,deltaY:12,dashes:[12,-12],sourceLine:97},{angle:90,originX:8,originY:0,deltaX:12,deltaY:12,dashes:[12,-12],sourceLine:98},{angle:90,originX:10,originY:0,deltaX:12,deltaY:12,dashes:[12,-12],sourceLine:99},{angle:90,originX:12,originY:0,deltaX:12,deltaY:12,dashes:[12,-12],sourceLine:100},{angle:0,originX:0,originY:12,deltaX:12,deltaY:-12,dashes:[12,-12],sourceLine:101},{angle:0,originX:0,originY:14,deltaX:12,deltaY:-12,dashes:[12,-12],sourceLine:102},{angle:0,originX:0,originY:16,deltaX:12,deltaY:-12,dashes:[12,-12],sourceLine:103},{angle:0,originX:0,originY:18,deltaX:12,deltaY:-12,dashes:[12,-12],sourceLine:104},{angle:0,originX:0,originY:20,deltaX:12,deltaY:-12,dashes:[12,-12],sourceLine:105},{angle:0,originX:0,originY:22,deltaX:12,deltaY:-12,dashes:[12,-12],sourceLine:106},{angle:0,originX:0,originY:24,deltaX:12,deltaY:-12,dashes:[12,-12],sourceLine:107}]},{name:"AR-RROOF",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:2.2,deltaY:1,dashes:[15,-2,5,-1],sourceLine:109},{angle:0,originX:1.33,originY:.5,deltaX:-1,deltaY:1.33,dashes:[3,-.33,6,-.75],sourceLine:110},{angle:0,originX:.5,originY:.85,deltaX:5.2,deltaY:.67,dashes:[8,-1.4,4,-1],sourceLine:111}]},{name:"AR-RSHKE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:25.5,deltaY:12,dashes:[6,-5,7,-3,9,-4],sourceLine:113},{angle:0,originX:6,originY:.5,deltaX:25.5,deltaY:12,dashes:[5,-19,4,-6],sourceLine:114},{angle:0,originX:18,originY:-.75,deltaX:25.5,deltaY:12,dashes:[3,-31],sourceLine:115},{angle:90,originX:0,originY:0,deltaX:12,deltaY:8.5,dashes:[11.5,-36.5],sourceLine:116},{angle:90,originX:6,originY:0,deltaX:12,deltaY:8.5,dashes:[11.25,-36.75],sourceLine:117},{angle:90,originX:11,originY:0,deltaX:12,deltaY:8.5,dashes:[10.5,-37.5],sourceLine:118},{angle:90,originX:18,originY:-.75,deltaX:12,deltaY:8.5,dashes:[11.5,-36.5],sourceLine:119},{angle:90,originX:21,originY:-.75,deltaX:12,deltaY:8.5,dashes:[11.5,-36.5],sourceLine:120},{angle:90,originX:30,originY:0,deltaX:12,deltaY:8.5,dashes:[11,-37],sourceLine:121}]},{name:"AR-SAND",description:"",lines:[{angle:37.5,originX:0,originY:0,deltaX:1.123,deltaY:1.567,dashes:[0,-1.52,0,-1.7,0,-1.625],sourceLine:123},{angle:7.5,originX:0,originY:0,deltaX:2.123,deltaY:2.567,dashes:[0,-.82,0,-1.37,0,-.525],sourceLine:124},{angle:-32.5,originX:-1.23,originY:0,deltaX:2.6234,deltaY:1.678,dashes:[0,-.5,0,-1.8,0,-2.35],sourceLine:125},{angle:-42.5,originX:-1.23,originY:0,deltaX:1.6234,deltaY:2.678,dashes:[0,-.25,0,-1.18,0,-1.35],sourceLine:126}]},{name:"BOX",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:0,deltaY:1,dashes:[],sourceLine:128},{angle:90,originX:.25,originY:0,deltaX:0,deltaY:1,dashes:[],sourceLine:129},{angle:0,originX:0,originY:0,deltaX:0,deltaY:1,dashes:[-.25,.25],sourceLine:130},{angle:0,originX:0,originY:.25,deltaX:0,deltaY:1,dashes:[-.25,.25],sourceLine:131},{angle:0,originX:0,originY:.5,deltaX:0,deltaY:1,dashes:[.25,-.25],sourceLine:132},{angle:0,originX:0,originY:.75,deltaX:0,deltaY:1,dashes:[.25,-.25],sourceLine:133},{angle:90,originX:.5,originY:0,deltaX:0,deltaY:1,dashes:[.25,-.25],sourceLine:134},{angle:90,originX:.75,originY:0,deltaX:0,deltaY:1,dashes:[.25,-.25],sourceLine:135}]},{name:"BRASS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:137},{angle:0,originX:0,originY:.125,deltaX:0,deltaY:.25,dashes:[.125,-.0625],sourceLine:138}]},{name:"BRICK",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:140},{angle:90,originX:0,originY:0,deltaX:0,deltaY:.5,dashes:[.25,-.25],sourceLine:141},{angle:90,originX:.25,originY:0,deltaX:0,deltaY:.5,dashes:[-.25,.25],sourceLine:142}]},{name:"BRSTONE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.33,dashes:[],sourceLine:144},{angle:90,originX:.9,originY:0,deltaX:.33,deltaY:.5,dashes:[.33,-.33],sourceLine:145},{angle:90,originX:.8,originY:0,deltaX:.33,deltaY:.5,dashes:[.33,-.33],sourceLine:146},{angle:0,originX:.9,originY:.055,deltaX:.5,deltaY:.33,dashes:[-.9,.1],sourceLine:147},{angle:0,originX:.9,originY:.11,deltaX:.5,deltaY:.33,dashes:[-.9,.1],sourceLine:148},{angle:0,originX:.9,originY:.165,deltaX:.5,deltaY:.33,dashes:[-.9,.1],sourceLine:149},{angle:0,originX:.9,originY:.22,deltaX:.5,deltaY:.33,dashes:[-.9,.1],sourceLine:150},{angle:0,originX:.9,originY:.275,deltaX:.5,deltaY:.33,dashes:[-.9,.1],sourceLine:151}]},{name:"CLAY",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.1875,dashes:[],sourceLine:153},{angle:0,originX:0,originY:.03125,deltaX:0,deltaY:.1875,dashes:[],sourceLine:154},{angle:0,originX:0,originY:.0625,deltaX:0,deltaY:.1875,dashes:[],sourceLine:155},{angle:0,originX:0,originY:.125,deltaX:0,deltaY:.1875,dashes:[.1875,-.125],sourceLine:156}]},{name:"CORK",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:158},{angle:135,originX:.0625,originY:-.0625,deltaX:0,deltaY:.35355339,dashes:[.176776696,-.176776696],sourceLine:159},{angle:135,originX:.09375,originY:-.0625,deltaX:0,deltaY:.35355339,dashes:[.176776696,-.176776696],sourceLine:160},{angle:135,originX:.125,originY:-.0625,deltaX:0,deltaY:.35355339,dashes:[.176776696,-.176776696],sourceLine:161}]},{name:"CROSS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.25,deltaY:.25,dashes:[.125,-.375],sourceLine:163},{angle:90,originX:.0625,originY:-.0625,deltaX:.25,deltaY:.25,dashes:[.125,-.375],sourceLine:164}]},{name:"DASH",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.125,deltaY:.125,dashes:[.125,-.125],sourceLine:166}]},{name:"DOLMIT",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:168},{angle:45,originX:0,originY:0,deltaX:0,deltaY:.70710678,dashes:[.3535533905932738,-.7071067811865476],sourceLine:169}]},{name:"DOTS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.03125,deltaY:.0625,dashes:[0,-.0625],sourceLine:171}]},{name:"EARTH",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.25,deltaY:.25,dashes:[.25,-.25],sourceLine:173},{angle:0,originX:0,originY:.09375,deltaX:.25,deltaY:.25,dashes:[.25,-.25],sourceLine:174},{angle:0,originX:0,originY:.1875,deltaX:.25,deltaY:.25,dashes:[.25,-.25],sourceLine:175},{angle:90,originX:.03125,originY:.21875,deltaX:.25,deltaY:.25,dashes:[.25,-.25],sourceLine:176},{angle:90,originX:.125,originY:.21875,deltaX:.25,deltaY:.25,dashes:[.25,-.25],sourceLine:177},{angle:90,originX:.21875,originY:.21875,deltaX:.25,deltaY:.25,dashes:[.25,-.25],sourceLine:178}]},{name:"ESCHER",description:"",lines:[{angle:60,originX:0,originY:0,deltaX:-.6,deltaY:1.039230484,dashes:[1.1,-.1],sourceLine:180},{angle:180,originX:0,originY:0,deltaX:-.6,deltaY:1.039230484,dashes:[1.1,-.1],sourceLine:181},{angle:300,originX:0,originY:0,deltaX:.6,deltaY:1.039230484,dashes:[1.1,-.1],sourceLine:182},{angle:60,originX:.1,originY:0,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:183},{angle:300,originX:.1,originY:0,deltaX:.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:184},{angle:60,originX:-.05,originY:.08660254,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:185},{angle:180,originX:-.05,originY:.08660254,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:186},{angle:300,originX:-.05,originY:-.08660254,deltaX:.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:187},{angle:180,originX:-.05,originY:-.08660254,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:188},{angle:60,originX:-.4,originY:0,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:189},{angle:300,originX:-.4,originY:0,deltaX:.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:190},{angle:60,originX:.2,originY:-.346410161,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:191},{angle:180,originX:.2,originY:-.346410161,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:192},{angle:300,originX:.2,originY:.346410161,deltaX:.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:193},{angle:180,originX:.2,originY:.346410161,deltaX:-.6,deltaY:1.039230484,dashes:[.2,-1],sourceLine:194},{angle:0,originX:.2,originY:.173205081,deltaX:-.6,deltaY:1.039230484,dashes:[.7,-.5],sourceLine:195},{angle:0,originX:.2,originY:-.173205081,deltaX:-.6,deltaY:1.039230484,dashes:[.7,-.5],sourceLine:196},{angle:120,originX:.05,originY:.259807621,deltaX:.6,deltaY:1.039230484,dashes:[.7,-.5],sourceLine:197},{angle:120,originX:-.25,originY:.08660254,deltaX:.6,deltaY:1.039230484,dashes:[.7,-.5],sourceLine:198},{angle:240,originX:-.25,originY:-.08660254,deltaX:.6,deltaY:1.039230484,dashes:[.7,-.5],sourceLine:199},{angle:240,originX:.05,originY:-.259807621,deltaX:.6,deltaY:1.039230484,dashes:[.7,-.5],sourceLine:200}]},{name:"FLEX",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[.25,-.25],sourceLine:202},{angle:45,originX:.25,originY:0,deltaX:.176776695296,deltaY:.176776695296,dashes:[.0625,-.2285533906,.0625,-.353553390593],sourceLine:203}]},{name:"GOST_GLASS",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:6,deltaY:-6,dashes:[5,-7],sourceLine:205},{angle:45,originX:2.12132,originY:0,deltaX:6,deltaY:-6,dashes:[2,-10],sourceLine:206},{angle:45,originX:0,originY:2.12132,deltaX:6,deltaY:-6,dashes:[2,-10],sourceLine:207}]},{name:"GOST_WOOD",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:0,deltaY:-6,dashes:[10,-2],sourceLine:209},{angle:90,originX:2,originY:-2,deltaX:0,deltaY:-6,dashes:[6,-1.5,3,-1.5],sourceLine:210},{angle:90,originX:4,originY:-5,deltaX:0,deltaY:-6,dashes:[10,-2],sourceLine:211}]},{name:"GOST_GROUND",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:10,deltaY:-10,dashes:[20],sourceLine:213},{angle:45,originX:3,originY:0,deltaX:10,deltaY:-10,dashes:[20],sourceLine:214},{angle:45,originX:6,originY:0,deltaX:10,deltaY:-10,dashes:[20],sourceLine:215}]},{name:"GRASS",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:.707106781,deltaY:.707106781,dashes:[.1875,-1.226713563],sourceLine:217},{angle:45,originX:0,originY:0,deltaX:0,deltaY:1,dashes:[.1875,-.8125],sourceLine:218},{angle:135,originX:0,originY:0,deltaX:0,deltaY:1,dashes:[.1875,-.8125],sourceLine:219}]},{name:"GRATE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.03125,dashes:[],sourceLine:221},{angle:90,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:222}]},{name:"GRAVEL",description:"",lines:[{angle:228.012787504,originX:.72,originY:1,deltaX:12.0413651692039,deltaY:.0743294146632,dashes:[.134536,-13.3190880470737],sourceLine:224},{angle:184.969740728,originX:.63,originY:.9,deltaX:-12.0415166747131,deltaY:.0433148081592,dashes:[.230868,-22.85592476123],sourceLine:225},{angle:132.510447078,originX:.4,originY:.88,deltaX:-14.8659418273816,deltaY:.061429511683,dashes:[.162788,-16.1160325960997],sourceLine:226},{angle:267.273689006,originX:.01,originY:.63,deltaX:-20.0249279039043,deltaY:.0475651493827,dashes:[.210238,-20.813558041629],sourceLine:227},{angle:292.833654178,originX:0,originY:.42,deltaX:-12.9999095019474,deltaY:.048507125026,dashes:[.206155,-20.4093731280883],sourceLine:228},{angle:357.273689006,originX:.08,originY:.23,deltaX:-20.0249279039043,deltaY:.0475651493827,dashes:[.210238,-20.813558041629],sourceLine:229},{angle:37.6942404667,originX:.29,originY:.22,deltaX:-16.4011800288558,deltaY:.0359675000664,dashes:[.278029,-27.524848548916],sourceLine:230},{angle:72.2553283749,originX:.51,originY:.39,deltaX:23.0867613281116,deltaY:.0380969659053,dashes:[.262488,-25.9863214968134],sourceLine:231},{angle:121.429565615,originX:.59,originY:.64,deltaX:15.2642639131074,deltaY:.047404546271,dashes:[.21095,-20.884073109729],sourceLine:232},{angle:175.236358309,originX:.48,originY:.82,deltaX:-11.0450488205478,deltaY:.083045479801,dashes:[.240832,-11.8007625787923],sourceLine:233},{angle:222.397437798,originX:.24,originY:.84,deltaX:16.2787889313724,deltaY:.0321080648114,dashes:[.311448,-30.8333750047949],sourceLine:234},{angle:138.814074834,originX:1,originY:.62,deltaX:9.2190645101588,deltaY:.0940720868851,dashes:[.106301,-10.5238448127347],sourceLine:235},{angle:171.46923439,originX:.92,originY:.69,deltaX:-13.1528534931484,deltaY:.0494468176315,dashes:[.202237,-20.021511416157],sourceLine:236},{angle:225,originX:.72,originY:.72,deltaX:.7071067811865,deltaY:.7071067811865,dashes:[.141421,-1.2727925623731],sourceLine:237},{angle:203.198590514,originX:.65,originY:.84,deltaX:-5.3835637472478,deltaY:.1313064328928,dashes:[.076158,-7.5396151058639],sourceLine:238},{angle:291.801409486,originX:.58,originY:.81,deltaX:-3.156820749011,deltaY:.185695338158,dashes:[.107703,-5.2774618071345],sourceLine:239},{angle:30.9637565321,originX:.62,originY:.71,deltaX:3.6014702879928,deltaY:.1714985851408,dashes:[.174929,-5.6560228948453],sourceLine:240},{angle:161.565051177,originX:.77,originY:.8,deltaX:-2.2135943621183,deltaY:.3162277660138,dashes:[.126491,-3.0357866601684],sourceLine:241},{angle:16.389540334,originX:0,originY:.81,deltaX:10.4401539876873,deltaY:.0564332648047,dashes:[.1772,-17.5428451466694],sourceLine:242},{angle:70.3461759419,originX:.17,originY:.86,deltaX:-11.7045066155395,deltaY:.0672672793901,dashes:[.148661,-14.717407747319],sourceLine:243},{angle:293.198590514,originX:.77,originY:1,deltaX:-5.3835637472478,deltaY:.1313064328928,dashes:[.152315,-7.4634581058639],sourceLine:244},{angle:343.610459666,originX:.83,originY:.86,deltaX:-10.4401539876873,deltaY:.0564332648047,dashes:[.1772,-17.542845146669],sourceLine:245},{angle:339.44395478,originX:0,originY:.19,deltaX:-5.3838927710229,deltaY:.117041147157,dashes:[.17088,-8.3731237453175],sourceLine:246},{angle:294.775140569,originX:.16,originY:.13,deltaX:-12.0828441168135,deltaY:.0698430296124,dashes:[.143178,-14.174643063276],sourceLine:247},{angle:66.8014094864,originX:.78,originY:0,deltaX:5.3835637472487,deltaY:.1313064328552,dashes:[.152315,-7.4634581058639],sourceLine:248},{angle:17.3540246363,originX:.84,originY:.14,deltaX:-13.6013396869991,deltaY:.0596549986364,dashes:[.167631,-16.59542361424],sourceLine:249},{angle:69.4439547804,originX:.29,originY:0,deltaX:-5.383892771022,deltaY:.1170411471946,dashes:[.08544,-8.4585637453175],sourceLine:250},{angle:101.309932474,originX:.72,originY:0,deltaX:4.1184388379018,deltaY:.1961161351396,dashes:[.05099,-5.0480295135928],sourceLine:251},{angle:165.963756532,originX:.71,originY:.05,deltaX:-3.1529631254726,deltaY:.2425356250323,dashes:[.206155,-3.9169506256177],sourceLine:252},{angle:186.009005957,originX:.51,originY:.1,deltaX:-10.0497393137326,deltaY:.0523423921723,dashes:[.19105,-18.9139231745428],sourceLine:253},{angle:303.690067526,originX:.62,originY:.62,deltaX:-2.2188007849008,deltaY:.2773500981134,dashes:[.144222,-3.461329275464],sourceLine:254},{angle:353.157226587,originX:.7,originY:.5,deltaX:17.1171966955143,deltaY:.0397150736497,dashes:[.251794,-24.9275626240283],sourceLine:255},{angle:60.9453959009,originX:.95,originY:.47,deltaX:-8.0616726575653,deltaY:.0971285862325,dashes:[.102956,-10.192674140987],sourceLine:256},{angle:90,originX:1,originY:.56,deltaX:1,deltaY:1,dashes:[.06,-.94],sourceLine:257},{angle:120.256437164,originX:.49,originY:.13,deltaX:-8.0619364083848,deltaY:.0719815751411,dashes:[.138924,-13.7535199894498],sourceLine:258},{angle:48.0127875042,originX:.42,originY:.25,deltaX:12.0413651692041,deltaY:.0743294146212,dashes:[.269072,-13.1845520470737],sourceLine:259},{angle:0,originX:.6,originY:.45,deltaX:1,deltaY:1,dashes:[.26,-.74],sourceLine:260},{angle:325.304846469,originX:.86,originY:.45,deltaX:12.2063917682497,deltaY:-.063245553253,dashes:[.158114,-15.653274300842],sourceLine:261},{angle:254.054604099,originX:.99,originY:.36,deltaX:4.1208169184605,deltaY:.1373605639542,dashes:[.145602,-7.1345078892805],sourceLine:262},{angle:207.645975364,originX:.95,originY:.22,deltaX:21.4708691170287,deltaY:.0421824539631,dashes:[.237065,-23.4694741822594],sourceLine:263},{angle:175.42607874,originX:.74,originY:.11,deltaX:13.0383438432524,deltaY:.039872611164,dashes:[.250799,-24.8290734079689],sourceLine:264}]},{name:"HEX",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.21650635094610965,dashes:[.125,-.25],sourceLine:266},{angle:120,originX:0,originY:0,deltaX:0,deltaY:.21650635094610965,dashes:[.125,-.25],sourceLine:267},{angle:60,originX:.125,originY:0,deltaX:0,deltaY:.21650635094610965,dashes:[.125,-.25],sourceLine:268}]},{name:"HONEY",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.1875,deltaY:.10825317547305482,dashes:[.125,-.25],sourceLine:270},{angle:120,originX:0,originY:0,deltaX:.1875,deltaY:.10825317547305482,dashes:[.125,-.25],sourceLine:271},{angle:60,originX:0,originY:0,deltaX:.1875,deltaY:.10825317547305482,dashes:[-.25,.125],sourceLine:272}]},{name:"HOUND",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.25,deltaY:.0625,dashes:[1,-.5],sourceLine:274},{angle:90,originX:0,originY:0,deltaX:-.25,deltaY:.0625,dashes:[1,-.5],sourceLine:275}]},{name:"INSUL",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.375,dashes:[],sourceLine:277},{angle:0,originX:0,originY:.125,deltaX:0,deltaY:.375,dashes:[.125,-.125],sourceLine:278},{angle:0,originX:0,originY:.25,deltaX:0,deltaY:.375,dashes:[.125,-.125],sourceLine:279}]},{name:"ACAD_ISO02W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3],sourceLine:292}]},{name:"ACAD_ISO03W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-18],sourceLine:294}]},{name:"ACAD_ISO04W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,.5,-3],sourceLine:296}]},{name:"ACAD_ISO05W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,.5,-3,.5,-3],sourceLine:298}]},{name:"ACAD_ISO06W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,.5,-3,.5,-6.5],sourceLine:300},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-34,.5,-3],sourceLine:301}]},{name:"ACAD_ISO07W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[.5,-3],sourceLine:303}]},{name:"ACAD_ISO08W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,6,-3],sourceLine:305}]},{name:"ACAD_ISO09W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,6,-3,6,-3],sourceLine:307}]},{name:"ACAD_ISO10W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,.5,-3],sourceLine:309}]},{name:"ACAD_ISO11W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,12,-3,.5,-3],sourceLine:311}]},{name:"ACAD_ISO12W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,.5,-3,.5,-3],sourceLine:313}]},{name:"ACAD_ISO13W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,12,-3,.5,-6.5],sourceLine:315},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-33.5,.5,-3],sourceLine:316}]},{name:"ACAD_ISO14W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,.5,-3,.5,-6.5],sourceLine:318},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-22,.5,-3],sourceLine:319}]},{name:"ACAD_ISO15W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,12,-3,.5,-10],sourceLine:321},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-33.5,.5,-3,.5,-3],sourceLine:322}]},{name:"LINE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:327}]},{name:"MUDST",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.5,deltaY:.25,dashes:[.25,-.25,0,-.25,0,-.25],sourceLine:329}]},{name:"NET",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:331},{angle:90,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:332}]},{name:"NET3",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:334},{angle:60,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:335},{angle:120,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:336}]},{name:"PLAST",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:338},{angle:0,originX:0,originY:.03125,deltaX:0,deltaY:.25,dashes:[],sourceLine:339},{angle:0,originX:0,originY:.0625,deltaX:0,deltaY:.25,dashes:[],sourceLine:340}]},{name:"PLASTI",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:342},{angle:0,originX:0,originY:.03125,deltaX:0,deltaY:.25,dashes:[],sourceLine:343},{angle:0,originX:0,originY:.0625,deltaX:0,deltaY:.25,dashes:[],sourceLine:344},{angle:0,originX:0,originY:.15625,deltaX:0,deltaY:.25,dashes:[],sourceLine:345}]},{name:"SACNCR",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.09375,dashes:[],sourceLine:347},{angle:45,originX:.066291261,originY:0,deltaX:0,deltaY:.09375,dashes:[0,-.09375],sourceLine:348}]},{name:"SQUARE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[.125,-.125],sourceLine:350},{angle:90,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[.125,-.125],sourceLine:351}]},{name:"STARS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.216506351,dashes:[.125,-.125],sourceLine:353},{angle:60,originX:0,originY:0,deltaX:0,deltaY:.216506351,dashes:[.125,-.125],sourceLine:354},{angle:120,originX:.0625,originY:.108253176,deltaX:0,deltaY:.216506351,dashes:[.125,-.125],sourceLine:355}]},{name:"STEEL",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.125,dashes:[],sourceLine:357},{angle:45,originX:0,originY:.0625,deltaX:0,deltaY:.125,dashes:[],sourceLine:358}]},{name:"SWAMP",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.5,deltaY:.866025403,dashes:[.125,-.875],sourceLine:360},{angle:90,originX:.0625,originY:0,deltaX:.866025403,deltaY:.5,dashes:[.0625,-1.669550806],sourceLine:361},{angle:90,originX:.078125,originY:0,deltaX:.866025403,deltaY:.5,dashes:[.05,-1.682050806],sourceLine:362},{angle:90,originX:.046875,originY:0,deltaX:.866025403,deltaY:.5,dashes:[.05,-1.682050806],sourceLine:363},{angle:60,originX:.09375,originY:0,deltaX:.5,deltaY:.866025403,dashes:[.04,-.96],sourceLine:364},{angle:120,originX:.03125,originY:0,deltaX:.5,deltaY:.866025403,dashes:[.04,-.96],sourceLine:365}]},{name:"TRANS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.25,dashes:[],sourceLine:367},{angle:0,originX:0,originY:.125,deltaX:0,deltaY:.25,dashes:[.125,-.125],sourceLine:368}]},{name:"TRIANG",description:"",lines:[{angle:60,originX:0,originY:0,deltaX:.1875,deltaY:.324759526,dashes:[.1875,-.1875],sourceLine:370},{angle:120,originX:0,originY:0,deltaX:.1875,deltaY:.324759526,dashes:[.1875,-.1875],sourceLine:371},{angle:0,originX:-.09375,originY:.162379763,deltaX:.1875,deltaY:.324759526,dashes:[.1875,-.1875],sourceLine:372}]},{name:"ZIGZAG",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.125,deltaY:.125,dashes:[.125,-.125],sourceLine:374},{angle:90,originX:.125,originY:0,deltaX:.125,deltaY:.125,dashes:[.125,-.125],sourceLine:375}]}],issues:[]},Sg={patterns:[{name:"SOLID",description:"",lines:[]},{name:"ANGLE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.985,dashes:[5.08,-1.905],sourceLine:20},{angle:90,originX:0,originY:0,deltaX:0,deltaY:6.985,dashes:[5.08,-1.905],sourceLine:21}]},{name:"ANSI31",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:23}]},{name:"ANSI32",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:9.525,dashes:[],sourceLine:25},{angle:45,originX:4.49013,originY:0,deltaX:0,deltaY:9.525,dashes:[],sourceLine:26}]},{name:"ANSI33",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:28},{angle:45,originX:4.49013,originY:0,deltaX:0,deltaY:6.35,dashes:[3.175,-1.5875],sourceLine:29}]},{name:"ANSI34",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:19.05,dashes:[],sourceLine:31},{angle:45,originX:4.49013,originY:0,deltaX:0,deltaY:19.05,dashes:[],sourceLine:32},{angle:45,originX:8.98026,originY:0,deltaX:0,deltaY:19.05,dashes:[],sourceLine:33},{angle:45,originX:13.4704,originY:0,deltaX:0,deltaY:19.05,dashes:[],sourceLine:34}]},{name:"ANSI35",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:36},{angle:45,originX:4.49013,originY:0,deltaX:0,deltaY:6.35,dashes:[7.9375,-1.5875,0,-1.5875],sourceLine:37}]},{name:"ANSI36",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:5.55625,deltaY:3.175,dashes:[7.9375,-1.5875,0,-1.5875],sourceLine:39}]},{name:"ANSI37",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:41},{angle:135,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:42}]},{name:"ANSI38",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:44},{angle:135,originX:0,originY:0,deltaX:6.35,deltaY:3.175,dashes:[7.9375,-4.7625],sourceLine:45}]},{name:"AR-B816",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:203.2,dashes:[],sourceLine:47},{angle:90,originX:0,originY:0,deltaX:203.2,deltaY:203.2,dashes:[203.2,-203.2],sourceLine:48}]},{name:"AR-B816C",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:203.2,deltaY:203.2,dashes:[396.875,-9.525],sourceLine:50},{angle:0,originX:-203.2,originY:9.525,deltaX:203.2,deltaY:203.2,dashes:[396.875,-9.525],sourceLine:51},{angle:90,originX:0,originY:0,deltaX:203.2,deltaY:203.2,dashes:[-212.725,193.675],sourceLine:52},{angle:90,originX:-9.525,originY:0,deltaX:203.2,deltaY:203.2,dashes:[-212.725,193.675],sourceLine:53}]},{name:"AR-B88",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:203.2,dashes:[],sourceLine:55},{angle:90,originX:0,originY:0,deltaX:203.2,deltaY:101.6,dashes:[203.2,-203.2],sourceLine:56}]},{name:"AR-BRELM",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:135.484,dashes:[193.675,-9.525],sourceLine:58},{angle:0,originX:0,originY:57.15,deltaX:0,deltaY:135.484,dashes:[193.675,-9.525],sourceLine:59},{angle:0,originX:50.8,originY:67.7418,deltaX:0,deltaY:135.484,dashes:[92.075,-9.525],sourceLine:60},{angle:0,originX:50.8,originY:124.892,deltaX:0,deltaY:135.484,dashes:[92.075,-9.525],sourceLine:61},{angle:90,originX:0,originY:0,deltaX:0,deltaY:203.2,dashes:[57.15,-78.334],sourceLine:62},{angle:90,originX:-9.525,originY:0,deltaX:0,deltaY:203.2,dashes:[57.15,-78.334],sourceLine:63},{angle:90,originX:50.8,originY:67.7418,deltaX:0,deltaY:101.6,dashes:[57.15,-78.334],sourceLine:64},{angle:90,originX:41.275,originY:67.7418,deltaX:0,deltaY:101.6,dashes:[57.15,-78.334],sourceLine:65}]},{name:"AR-BRSTD",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:67.7418,dashes:[],sourceLine:67},{angle:90,originX:0,originY:0,deltaX:67.7418,deltaY:101.6,dashes:[67.7418,-67.7418],sourceLine:68}]},{name:"AR-CONC",description:"",lines:[{angle:50,originX:0,originY:0,deltaX:104.896,deltaY:-149.807,dashes:[19.05,-209.55],sourceLine:70},{angle:355,originX:0,originY:0,deltaX:-51.76101082,deltaY:187.25814969,dashes:[15.24,-167.64058417],sourceLine:71},{angle:100.4514447,originX:15.182007,originY:-1.3282535,deltaX:145.5569059,deltaY:-176.270089,dashes:[16.1900088,-178.0902446],sourceLine:72},{angle:46.1842,originX:0,originY:50.8,deltaX:157.343,deltaY:-224.71,dashes:[28.575,-314.325],sourceLine:73},{angle:96.63555761,originX:22.5899,originY:47.2965,deltaX:218.33577212,deltaY:-264.40480444,dashes:[24.28502314,-267.13560816],sourceLine:74},{angle:351.18415117,originX:0,originY:50.8,deltaX:196.67912063,deltaY:280.88740361,dashes:[22.85996707,-251.45973192],sourceLine:75},{angle:21,originX:25.4,originY:38.1,deltaX:104.89565868,deltaY:-149.80652586,dashes:[19.05,-209.55],sourceLine:76},{angle:326,originX:25.4,originY:38.1,deltaX:-51.7604,deltaY:187.258,dashes:[15.24,-167.64],sourceLine:77},{angle:71.451445,originX:38.0345326,originY:29.5779001,deltaX:145.5567546,deltaY:-176.2700748,dashes:[16.1900088,-178.0899376],sourceLine:78},{angle:37.5,originX:0,originY:0,deltaX:53.9242,deltaY:65.2018,dashes:[0,-165.608,0,-170.18,0,-168.275],sourceLine:79},{angle:7.5,originX:0,originY:0,deltaX:79.3242,deltaY:90.6018,dashes:[0,-97.028,0,-161.798,0,-64.135],sourceLine:80},{angle:-32.5,originX:-56.642,originY:0,deltaX:117.434,deltaY:68.0212,dashes:[0,-63.5,0,-198.12,0,-262.89],sourceLine:81},{angle:-42.5,originX:-82.042,originY:0,deltaX:92.0344,deltaY:118.821,dashes:[0,-82.55,0,-131.572,0,-186.69],sourceLine:82}]},{name:"AR-HBONE",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:101.6,deltaY:101.6,dashes:[304.8,-101.6],sourceLine:84},{angle:135,originX:71.842,originY:71.842,deltaX:101.6,deltaY:-101.6,dashes:[304.8,-101.6],sourceLine:85}]},{name:"AR-PARQ1",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:304.8,deltaY:304.8,dashes:[304.8,-304.8],sourceLine:87},{angle:90,originX:50.8,originY:0,deltaX:304.8,deltaY:304.8,dashes:[304.8,-304.8],sourceLine:88},{angle:90,originX:101.6,originY:0,deltaX:304.8,deltaY:304.8,dashes:[304.8,-304.8],sourceLine:89},{angle:90,originX:152.4,originY:0,deltaX:304.8,deltaY:304.8,dashes:[304.8,-304.8],sourceLine:90},{angle:90,originX:203.2,originY:0,deltaX:304.8,deltaY:304.8,dashes:[304.8,-304.8],sourceLine:91},{angle:90,originX:254,originY:0,deltaX:304.8,deltaY:304.8,dashes:[304.8,-304.8],sourceLine:92},{angle:90,originX:304.8,originY:0,deltaX:304.8,deltaY:304.8,dashes:[304.8,-304.8],sourceLine:93},{angle:0,originX:0,originY:304.8,deltaX:304.8,deltaY:-304.8,dashes:[304.8,-304.8],sourceLine:94},{angle:0,originX:0,originY:355.6,deltaX:304.8,deltaY:-304.8,dashes:[304.8,-304.8],sourceLine:95},{angle:0,originX:0,originY:406.4,deltaX:304.8,deltaY:-304.8,dashes:[304.8,-304.8],sourceLine:96},{angle:0,originX:0,originY:457.2,deltaX:304.8,deltaY:-304.8,dashes:[304.8,-304.8],sourceLine:97},{angle:0,originX:0,originY:508,deltaX:304.8,deltaY:-304.8,dashes:[304.8,-304.8],sourceLine:98},{angle:0,originX:0,originY:558.8,deltaX:304.8,deltaY:-304.8,dashes:[304.8,-304.8],sourceLine:99},{angle:0,originX:0,originY:609.6,deltaX:304.8,deltaY:-304.8,dashes:[304.8,-304.8],sourceLine:100}]},{name:"AR-RROOF",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:55.88,deltaY:25.4,dashes:[381,-50.8,127,-25.4],sourceLine:102},{angle:0,originX:33.782,originY:12.7,deltaX:-25.4,deltaY:33.782,dashes:[76.2,-8.382,152.4,-19.05],sourceLine:103},{angle:0,originX:12.7,originY:21.59,deltaX:132.08,deltaY:17.018,dashes:[203.2,-35.56,101.6,-25.4],sourceLine:104}]},{name:"AR-RSHKE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:647.7,deltaY:304.8,dashes:[152.4,-127,177.8,-76.2,228.6,-101.6],sourceLine:106},{angle:0,originX:152.4,originY:12.7,deltaX:647.7,deltaY:304.8,dashes:[127,-482.6,101.6,-152.4],sourceLine:107},{angle:0,originX:457.2,originY:-19.05,deltaX:647.7,deltaY:304.8,dashes:[76.2,-787.4],sourceLine:108},{angle:90,originX:0,originY:0,deltaX:304.8,deltaY:215.9,dashes:[292.1,-927.1],sourceLine:109},{angle:90,originX:152.4,originY:0,deltaX:304.8,deltaY:215.9,dashes:[285.75,-933.45],sourceLine:110},{angle:90,originX:279.4,originY:0,deltaX:304.8,deltaY:215.9,dashes:[266.7,-952.5],sourceLine:111},{angle:90,originX:457.2,originY:-19.05,deltaX:304.8,deltaY:215.9,dashes:[292.1,-927.1],sourceLine:112},{angle:90,originX:533.4,originY:-19.05,deltaX:304.8,deltaY:215.9,dashes:[292.1,-927.1],sourceLine:113},{angle:90,originX:762,originY:0,deltaX:304.8,deltaY:215.9,dashes:[279.4,-939.8],sourceLine:114}]},{name:"AR-SAND",description:"",lines:[{angle:37.5,originX:0,originY:0,deltaX:28.5242,deltaY:39.8018,dashes:[0,-38.608,0,-43.18,0,-41.275],sourceLine:116},{angle:7.5,originX:0,originY:0,deltaX:53.9242,deltaY:65.2018,dashes:[0,-20.828,0,-34.798,0,-13.335],sourceLine:117},{angle:-32.5,originX:-31.242,originY:0,deltaX:66.6344,deltaY:42.6212,dashes:[0,-12.7,0,-45.72,0,-59.69],sourceLine:118},{angle:-42.5,originX:-31.242,originY:0,deltaX:41.2344,deltaY:68.0212,dashes:[0,-6.35,0,-29.972,0,-34.29],sourceLine:119}]},{name:"BOX",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:0,deltaY:25.4,dashes:[],sourceLine:121},{angle:90,originX:6.35,originY:0,deltaX:0,deltaY:25.4,dashes:[],sourceLine:122},{angle:0,originX:0,originY:0,deltaX:0,deltaY:25.4,dashes:[-6.35,6.35],sourceLine:123},{angle:0,originX:0,originY:6.35,deltaX:0,deltaY:25.4,dashes:[-6.35,6.35],sourceLine:124},{angle:0,originX:0,originY:12.7,deltaX:0,deltaY:25.4,dashes:[6.35,-6.35],sourceLine:125},{angle:0,originX:0,originY:19.05,deltaX:0,deltaY:25.4,dashes:[6.35,-6.35],sourceLine:126},{angle:90,originX:12.7,originY:0,deltaX:0,deltaY:25.4,dashes:[6.35,-6.35],sourceLine:127},{angle:90,originX:19.05,originY:0,deltaX:0,deltaY:25.4,dashes:[6.35,-6.35],sourceLine:128}]},{name:"BRASS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:130},{angle:0,originX:0,originY:3.175,deltaX:0,deltaY:6.35,dashes:[3.175,-1.5875],sourceLine:131}]},{name:"BRICK",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:133},{angle:90,originX:0,originY:0,deltaX:0,deltaY:12.7,dashes:[6.35,-6.35],sourceLine:134},{angle:90,originX:6.35,originY:0,deltaX:0,deltaY:12.7,dashes:[-6.35,6.35],sourceLine:135}]},{name:"BRSTONE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:8.382,dashes:[],sourceLine:137},{angle:90,originX:22.86,originY:0,deltaX:8.382,deltaY:12.7,dashes:[8.382,-8.382],sourceLine:138},{angle:90,originX:20.32,originY:0,deltaX:8.382,deltaY:12.7,dashes:[8.382,-8.382],sourceLine:139},{angle:0,originX:22.86,originY:1.397,deltaX:12.7,deltaY:8.382,dashes:[-22.86,2.54],sourceLine:140},{angle:0,originX:22.86,originY:2.794,deltaX:12.7,deltaY:8.382,dashes:[-22.86,2.54],sourceLine:141},{angle:0,originX:22.86,originY:4.191,deltaX:12.7,deltaY:8.382,dashes:[-22.86,2.54],sourceLine:142},{angle:0,originX:22.86,originY:5.588,deltaX:12.7,deltaY:8.382,dashes:[-22.86,2.54],sourceLine:143},{angle:0,originX:22.86,originY:6.985,deltaX:12.7,deltaY:8.382,dashes:[-22.86,2.54],sourceLine:144}]},{name:"CLAY",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:4.7625,dashes:[],sourceLine:146},{angle:0,originX:0,originY:.79375,deltaX:0,deltaY:4.7625,dashes:[],sourceLine:147},{angle:0,originX:0,originY:1.5875,deltaX:0,deltaY:4.7625,dashes:[],sourceLine:148},{angle:0,originX:0,originY:3.175,deltaX:0,deltaY:4.7625,dashes:[4.7625,-3.175],sourceLine:149}]},{name:"CORK",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:151},{angle:135,originX:1.5875,originY:-1.5875,deltaX:0,deltaY:8.98026,dashes:[4.49013,-4.49013],sourceLine:152},{angle:135,originX:2.38125,originY:-1.5875,deltaX:0,deltaY:8.98026,dashes:[4.49013,-4.49013],sourceLine:153},{angle:135,originX:3.175,originY:-1.5875,deltaX:0,deltaY:8.98026,dashes:[4.49013,-4.49013],sourceLine:154}]},{name:"CROSS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:6.35,deltaY:6.35,dashes:[3.175,-9.525],sourceLine:156},{angle:90,originX:1.5875,originY:-1.5875,deltaX:6.35,deltaY:6.35,dashes:[3.175,-9.525],sourceLine:157}]},{name:"DASH",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:3.175,deltaY:3.175,dashes:[3.175,-3.175],sourceLine:159}]},{name:"DOLMIT",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:161},{angle:45,originX:0,originY:0,deltaX:0,deltaY:17.9605,dashes:[8.980256121069154,-17.960512242138307],sourceLine:162}]},{name:"DOTS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:.79375,deltaY:1.5875,dashes:[0,-1.5875],sourceLine:164}]},{name:"EARTH",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:6.35,deltaY:6.35,dashes:[6.35,-6.35],sourceLine:166},{angle:0,originX:0,originY:2.38125,deltaX:6.35,deltaY:6.35,dashes:[6.35,-6.35],sourceLine:167},{angle:0,originX:0,originY:4.7625,deltaX:6.35,deltaY:6.35,dashes:[6.35,-6.35],sourceLine:168},{angle:90,originX:.79375,originY:5.55625,deltaX:6.35,deltaY:6.35,dashes:[6.35,-6.35],sourceLine:169},{angle:90,originX:3.175,originY:5.55625,deltaX:6.35,deltaY:6.35,dashes:[6.35,-6.35],sourceLine:170},{angle:90,originX:5.55625,originY:5.55625,deltaX:6.35,deltaY:6.35,dashes:[6.35,-6.35],sourceLine:171}]},{name:"ESCHER",description:"",lines:[{angle:60,originX:0,originY:0,deltaX:-15.24,deltaY:26.3964542936,dashes:[27.94,-2.54],sourceLine:173},{angle:180,originX:0,originY:0,deltaX:-15.24,deltaY:26.3964542936,dashes:[27.94,-2.54],sourceLine:174},{angle:300,originX:0,originY:0,deltaX:15.24,deltaY:26.3964542936,dashes:[27.94,-2.54],sourceLine:175},{angle:60,originX:2.54,originY:0,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:176},{angle:300,originX:2.54,originY:0,deltaX:15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:177},{angle:60,originX:-1.27,originY:2.199704516,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:178},{angle:180,originX:-1.27,originY:2.199704516,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:179},{angle:300,originX:-1.27,originY:-2.199704516,deltaX:15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:180},{angle:180,originX:-1.27,originY:-2.199704516,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:181},{angle:60,originX:-10.16,originY:0,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:182},{angle:300,originX:-10.16,originY:0,deltaX:15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:183},{angle:60,originX:5.08,originY:-8.7988180894,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:184},{angle:180,originX:5.08,originY:-8.7988180894,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:185},{angle:300,originX:5.08,originY:8.7988180894,deltaX:15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:186},{angle:180,originX:5.08,originY:8.7988180894,deltaX:-15.24,deltaY:26.3964542936,dashes:[5.08,-25.4],sourceLine:187},{angle:0,originX:5.08,originY:4.3994090574,deltaX:-15.24,deltaY:26.3964542936,dashes:[17.78,-12.7],sourceLine:188},{angle:0,originX:5.08,originY:-4.3994090574,deltaX:-15.24,deltaY:26.3964542936,dashes:[17.78,-12.7],sourceLine:189},{angle:120,originX:1.27,originY:6.5991135734,deltaX:15.24,deltaY:26.3964542936,dashes:[17.78,-12.7],sourceLine:190},{angle:120,originX:-6.35,originY:2.199704516,deltaX:15.24,deltaY:26.3964542936,dashes:[17.78,-12.7],sourceLine:191},{angle:240,originX:-6.35,originY:-2.199704516,deltaX:15.24,deltaY:26.3964542936,dashes:[17.78,-12.7],sourceLine:192},{angle:240,originX:1.27,originY:-6.5991135734,deltaX:15.24,deltaY:26.3964542936,dashes:[17.78,-12.7],sourceLine:193}]},{name:"FLEX",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[6.35,-6.35],sourceLine:195},{angle:45,originX:6.35,originY:0,deltaX:4.490128053,deltaY:4.490128053,dashes:[1.5875,-5.8052561314,1.5875,-8.9802561314],sourceLine:196}]},{name:"GOST_GLASS",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:6,deltaY:-6,dashes:[5,-7],sourceLine:198},{angle:45,originX:2.12132,originY:0,deltaX:6,deltaY:-6,dashes:[2,-10],sourceLine:199},{angle:45,originX:0,originY:2.12132,deltaX:6,deltaY:-6,dashes:[2,-10],sourceLine:200}]},{name:"GOST_WOOD",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:0,deltaY:-6,dashes:[10,-2],sourceLine:202},{angle:90,originX:2,originY:-2,deltaX:0,deltaY:-6,dashes:[6,-1.5,3,-1.5],sourceLine:203},{angle:90,originX:4,originY:-5,deltaX:0,deltaY:-6,dashes:[10,-2],sourceLine:204}]},{name:"GOST_GROUND",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:10,deltaY:-10,dashes:[20],sourceLine:206},{angle:45,originX:3,originY:0,deltaX:10,deltaY:-10,dashes:[20],sourceLine:207},{angle:45,originX:6,originY:0,deltaX:10,deltaY:-10,dashes:[20],sourceLine:208}]},{name:"GRASS",description:"",lines:[{angle:90,originX:0,originY:0,deltaX:17.96051224,deltaY:17.96051224,dashes:[4.7625,-31.15852448],sourceLine:210},{angle:45,originX:0,originY:0,deltaX:0,deltaY:25.4,dashes:[4.7625,-20.6375],sourceLine:211},{angle:135,originX:0,originY:0,deltaX:0,deltaY:25.4,dashes:[4.7625,-20.6375],sourceLine:212}]},{name:"GRATE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:.79375,dashes:[],sourceLine:214},{angle:90,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:215}]},{name:"GRAVEL",description:"",lines:[{angle:228.0127875,originX:18.288,originY:25.4,deltaX:305.85067529778,deltaY:1.88796713245,dashes:[3.4172144,-338.30483639565],sourceLine:217},{angle:184.969741,originX:16.002,originY:22.86,deltaX:-305.8545235377,deltaY:1.10019612724,dashes:[5.8640472,-580.54048893524],sourceLine:218},{angle:132.5104471,originX:10.16,originY:22.352,deltaX:-377.59492241548,deltaY:1.56030959675,dashes:[4.1348152,-409.347227941],sourceLine:219},{angle:267.273689,originX:.254,originY:16.002,deltaX:-508.63316875916,deltaY:1.20815479432,dashes:[5.3400452,-528.66437425738],sourceLine:220},{angle:292.83365418,originX:0,originY:10.668,deltaX:-330.19770134945,deltaY:1.23208097566,dashes:[5.236337,-518.39807745344],sourceLine:221},{angle:357.273689,originX:2.032,originY:5.842,deltaX:-508.63316875916,deltaY:1.20815479432,dashes:[5.3400452,-528.66437425738],sourceLine:222},{angle:37.69424047,originX:7.366,originY:5.588,deltaX:-416.58997273292,deltaY:.91357450169,dashes:[7.0619366,-699.13115314247],sourceLine:223},{angle:72.25532837,originX:12.954,originY:9.906,deltaX:586.40373773403,deltaY:.96766293399,dashes:[6.6671952,-660.05256601905],sourceLine:224},{angle:121.42956562,originX:14.986,originY:16.256,deltaX:387.71230339293,deltaY:1.2040754753,dashes:[5.35813,-530.45545698712],sourceLine:225},{angle:175.2363583,originX:12.192,originY:20.828,deltaX:-280.5442400419,deltaY:2.10935518695,dashes:[6.1171328,-299.7393695],sourceLine:226},{angle:222.3974378,originX:6.096,originY:21.336,deltaX:413.48123885686,deltaY:.81554484621,dashes:[7.9107792,-783.16772512177],sourceLine:227},{angle:138.81407483,originX:25.4,originY:15.748,deltaX:234.164238558,deltaY:2.38943100688,dashes:[2.7000454,-267.30565824344],sourceLine:228},{angle:171.4692344,originX:23.368,originY:17.526,deltaX:-334.082478726,deltaY:1.25594916784,dashes:[5.1368198,-508.5463899704],sourceLine:229},{angle:225,originX:18.288,originY:18.288,deltaX:17.96051224214,deltaY:17.96051224214,dashes:[3.5920934,-32.32893108428],sourceLine:230},{angle:203.19859051,originX:16.51,originY:21.336,deltaX:-136.74251918,deltaY:3.33518339548,dashes:[1.9344132,-191.50622368894],sourceLine:231},{angle:291.80140949,originX:14.732,originY:20.574,deltaX:-80.18324702488,deltaY:4.71666158921,dashes:[2.7356562,-134.0475299],sourceLine:232},{angle:30.96375653,originX:15.748,originY:18.034,deltaX:91.47734531502,deltaY:4.35606406258,dashes:[4.4431966,-143.6629815291],sourceLine:233},{angle:161.56505118,originX:19.558,originY:20.32,deltaX:-56.2252967978,deltaY:8.03218525675,dashes:[3.2128714,-77.10898116828],sourceLine:234},{angle:16.389540334,originX:0,originY:20.574,deltaX:265.17991128726,deltaY:1.43340492604,dashes:[4.50088,-445.58826672539],sourceLine:235},{angle:70.34617594,originX:4.318,originY:21.844,deltaX:-297.29446803469,deltaY:1.70858889651,dashes:[3.7759894,-373.822156782],sourceLine:236},{angle:293.19859051,originX:19.558,originY:25.4,deltaX:-136.7425191801,deltaY:3.33518339548,dashes:[3.868801,-189.57183588894],sourceLine:237},{angle:343.61045967,originX:21.082,originY:21.844,deltaX:-265.17991128725,deltaY:1.433404926,dashes:[4.50088,-445.5882667254],sourceLine:238},{angle:339.44395478,originX:0,originY:4.826,deltaX:-136.75087638398,deltaY:2.97284513779,dashes:[4.340352,-212.67734313106],sourceLine:239},{angle:294.7751406,originX:4.064,originY:3.302,deltaX:-306.90424056705,deltaY:1.77401295215,dashes:[3.6367212,-360.0359338072],sourceLine:240},{angle:66.80140949,originX:19.812,originY:0,deltaX:136.74251918012,deltaY:3.33518339452,dashes:[3.868801,-189.57183588894],sourceLine:241},{angle:17.35402464,originX:21.336,originY:3.556,deltaX:-345.47402804977,deltaY:1.51523696536,dashes:[4.2578274,-421.523759802],sourceLine:242},{angle:69.44395478,originX:7.366,originY:0,deltaX:-136.75087638396,deltaY:2.97284513874,dashes:[2.170176,-214.84751913106],sourceLine:243},{angle:101.309932474,originX:18.288,originY:0,deltaX:104.60834648271,deltaY:4.98134983255,dashes:[1.295146,-128.21994964526],sourceLine:244},{angle:165.963756532,originX:18.034,originY:1.27,deltaX:-80.085263387,deltaY:6.16040487582,dashes:[5.236337,-99.49054589069],sourceLine:245},{angle:186.00900596,originX:12.954,originY:2.54,deltaX:-255.26337856879,deltaY:1.32949676118,dashes:[4.85267,-480.41364863337],sourceLine:246},{angle:303.69006753,originX:15.748,originY:15.748,deltaX:-56.35753993648,deltaY:7.0446924921,dashes:[3.6632388,-87.9177635968],sourceLine:247},{angle:353.15722659,originX:17.78,originY:12.7,deltaX:434.77679606606,deltaY:1.0087628707,dashes:[6.3955676,-633.16009065031],sourceLine:248},{angle:60.9453959,originX:24.13,originY:11.938,deltaX:-204.76648550216,deltaY:2.46706609031,dashes:[2.6150824,-258.8939231811],sourceLine:249},{angle:90,originX:25.4,originY:14.224,deltaX:25.4,deltaY:25.4,dashes:[1.524,-23.876],sourceLine:250},{angle:120.25643716,originX:12.446,originY:3.302,deltaX:-204.77318477297,deltaY:1.8283320086,dashes:[3.5286696,-349.339407732],sourceLine:251},{angle:48.0127875,originX:10.668,originY:6.35,deltaX:305.85067529778,deltaY:1.88796713138,dashes:[6.8344288,-334.88762199565],sourceLine:252},{angle:0,originX:15.24,originY:11.43,deltaX:25.4,deltaY:25.4,dashes:[6.604,-18.796],sourceLine:253},{angle:325.3048465,originX:21.844,originY:11.43,deltaX:310.04235091354,deltaY:-1.6064370526,dashes:[4.0160956,-397.5931672414],sourceLine:254},{angle:254.0546041,originX:25.146,originY:9.144,deltaX:104.6687497289,deltaY:3.48895832444,dashes:[3.6982908,-181.21650038772],sourceLine:255},{angle:207.64597536,originX:24.13,originY:5.588,deltaX:545.36007557253,deltaY:1.07143433066,dashes:[6.021451,-596.12464422938],sourceLine:256},{angle:175.42607874,originX:18.796,originY:2.794,deltaX:331.1739336186,deltaY:1.01276432357,dashes:[6.3702946,-630.6584645624],sourceLine:257}]},{name:"HEX",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5.4992613154,dashes:[3.175,-6.35],sourceLine:259},{angle:120,originX:0,originY:0,deltaX:0,deltaY:5.4992613154,dashes:[3.175,-6.35],sourceLine:260},{angle:60,originX:3.175,originY:0,deltaX:0,deltaY:5.4992613154,dashes:[3.175,-6.35],sourceLine:261}]},{name:"HONEY",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:4.7625,deltaY:2.749630645,dashes:[3.175,-6.35],sourceLine:263},{angle:120,originX:0,originY:0,deltaX:4.7625,deltaY:2.749630645,dashes:[3.175,-6.35],sourceLine:264},{angle:60,originX:0,originY:0,deltaX:4.7625,deltaY:2.749630645,dashes:[-6.35,3.175],sourceLine:265}]},{name:"HOUND",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:6.35,deltaY:1.5875,dashes:[25.4,-12.7],sourceLine:267},{angle:90,originX:0,originY:0,deltaX:-6.35,deltaY:1.5875,dashes:[25.4,-12.7],sourceLine:268}]},{name:"INSUL",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:9.525,dashes:[],sourceLine:270},{angle:0,originX:0,originY:3.175,deltaX:0,deltaY:9.525,dashes:[3.175,-3.175],sourceLine:271},{angle:0,originX:0,originY:6.35,deltaX:0,deltaY:9.525,dashes:[3.175,-3.175],sourceLine:272}]},{name:"ACAD_ISO02W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3],sourceLine:285}]},{name:"ACAD_ISO03W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-18],sourceLine:287}]},{name:"ACAD_ISO04W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,.5,-3],sourceLine:289}]},{name:"ACAD_ISO05W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,.5,-3,.5,-3],sourceLine:291}]},{name:"ACAD_ISO06W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,.5,-3,.5,-6.5],sourceLine:293},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-34,.5,-3],sourceLine:294}]},{name:"ACAD_ISO07W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[.5,-3],sourceLine:296}]},{name:"ACAD_ISO08W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,6,-3],sourceLine:298}]},{name:"ACAD_ISO09W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[24,-3,6,-3,6,-3],sourceLine:300}]},{name:"ACAD_ISO10W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,.5,-3],sourceLine:302}]},{name:"ACAD_ISO11W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,12,-3,.5,-3],sourceLine:304}]},{name:"ACAD_ISO12W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,.5,-3,.5,-3],sourceLine:306}]},{name:"ACAD_ISO13W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,12,-3,.5,-6.5],sourceLine:308},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-33.5,.5,-3],sourceLine:309}]},{name:"ACAD_ISO14W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,.5,-3,.5,-6.5],sourceLine:311},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-22,.5,-3],sourceLine:312}]},{name:"ACAD_ISO15W100",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[12,-3,12,-3,.5,-10],sourceLine:314},{angle:0,originX:0,originY:0,deltaX:0,deltaY:5,dashes:[-33.5,.5,-3,.5,-3],sourceLine:315}]},{name:"JIS_LC_20",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:20,dashes:[],sourceLine:322},{angle:45,originX:.4,originY:0,deltaX:0,deltaY:20,dashes:[],sourceLine:323}]},{name:"JIS_LC_20A",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:20,dashes:[],sourceLine:325},{angle:45,originX:1,originY:0,deltaX:0,deltaY:20,dashes:[],sourceLine:326}]},{name:"JIS_LC_8",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:7.8,dashes:[],sourceLine:328},{angle:45,originX:.4,originY:0,deltaX:0,deltaY:7.8,dashes:[],sourceLine:329}]},{name:"JIS_LC_8A",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:7.8,dashes:[],sourceLine:331},{angle:45,originX:1,originY:0,deltaX:0,deltaY:7.8,dashes:[],sourceLine:332}]},{name:"JIS_RC_10",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:10,dashes:[],sourceLine:334},{angle:45,originX:.725,originY:0,deltaX:0,deltaY:10,dashes:[],sourceLine:335},{angle:45,originX:1.45,originY:0,deltaX:0,deltaY:10,dashes:[],sourceLine:336}]},{name:"JIS_RC_15",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:15,dashes:[],sourceLine:338},{angle:45,originX:.725,originY:0,deltaX:0,deltaY:15,dashes:[],sourceLine:339},{angle:45,originX:1.45,originY:0,deltaX:0,deltaY:15,dashes:[],sourceLine:340}]},{name:"JIS_RC_18",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:18,dashes:[],sourceLine:342},{angle:45,originX:1,originY:0,deltaX:0,deltaY:18,dashes:[],sourceLine:343},{angle:45,originX:2,originY:0,deltaX:0,deltaY:18,dashes:[],sourceLine:344}]},{name:"JIS_RC_30",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:30,dashes:[],sourceLine:346},{angle:45,originX:1,originY:0,deltaX:0,deltaY:30,dashes:[],sourceLine:347},{angle:45,originX:2,originY:0,deltaX:0,deltaY:30,dashes:[],sourceLine:348}]},{name:"JIS_STN_1E",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:1,dashes:[],sourceLine:350},{angle:45,originX:.705,originY:0,deltaX:0,deltaY:1,dashes:[1,-.5],sourceLine:351}]},{name:"JIS_STN_2.5",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:2.5,dashes:[],sourceLine:353},{angle:45,originX:1.765,originY:0,deltaX:0,deltaY:2.5,dashes:[1.2,-.5],sourceLine:354}]},{name:"JIS_WOOD",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:.70710678,dashes:[],sourceLine:356}]},{name:"LINE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:359}]},{name:"MUDST",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:12.7,deltaY:6.35,dashes:[6.35,-6.35,0,-6.35,0,-6.35],sourceLine:361}]},{name:"NET",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:363},{angle:90,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:364}]},{name:"NET3",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:366},{angle:60,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:367},{angle:120,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:368}]},{name:"PLAST",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:370},{angle:0,originX:0,originY:.79375,deltaX:0,deltaY:6.35,dashes:[],sourceLine:371},{angle:0,originX:0,originY:1.5875,deltaX:0,deltaY:6.35,dashes:[],sourceLine:372}]},{name:"PLASTI",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:374},{angle:0,originX:0,originY:.79375,deltaX:0,deltaY:6.35,dashes:[],sourceLine:375},{angle:0,originX:0,originY:1.5875,deltaX:0,deltaY:6.35,dashes:[],sourceLine:376},{angle:0,originX:0,originY:3.96875,deltaX:0,deltaY:6.35,dashes:[],sourceLine:377}]},{name:"SACNCR",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:2.38125,dashes:[],sourceLine:379},{angle:45,originX:1.6838,originY:0,deltaX:0,deltaY:2.38125,dashes:[0,-2.38125],sourceLine:380}]},{name:"SQUARE",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[3.175,-3.175],sourceLine:382},{angle:90,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[3.175,-3.175],sourceLine:383}]},{name:"STARS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:5.4992613154,dashes:[3.175,-3.175],sourceLine:385},{angle:60,originX:0,originY:0,deltaX:0,deltaY:5.4992613154,dashes:[3.175,-3.175],sourceLine:386},{angle:120,originX:1.5875,originY:2.7496306704,deltaX:0,deltaY:5.4992613154,dashes:[3.175,-3.175],sourceLine:387}]},{name:"STEEL",description:"",lines:[{angle:45,originX:0,originY:0,deltaX:0,deltaY:3.175,dashes:[],sourceLine:389},{angle:45,originX:0,originY:1.5875,deltaX:0,deltaY:3.175,dashes:[],sourceLine:390}]},{name:"SWAMP",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:12.7,deltaY:21.9970452362,dashes:[3.175,-22.225],sourceLine:392},{angle:90,originX:1.5875,originY:0,deltaX:21.9970452362,deltaY:12.7,dashes:[1.5875,-42.4065904724],sourceLine:393},{angle:90,originX:1.984375,originY:0,deltaX:21.9970452362,deltaY:12.7,dashes:[1.27,-42.7240904724],sourceLine:394},{angle:90,originX:1.190625,originY:0,deltaX:21.9970452362,deltaY:12.7,dashes:[1.27,-42.7240904724],sourceLine:395},{angle:60,originX:2.38125,originY:0,deltaX:12.7,deltaY:21.9970452362,dashes:[1.016,-24.384],sourceLine:396},{angle:120,originX:.79375,originY:0,deltaX:12.7,deltaY:21.9970452362,dashes:[1.016,-24.384],sourceLine:397}]},{name:"TRANS",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:0,deltaY:6.35,dashes:[],sourceLine:399},{angle:0,originX:0,originY:3.175,deltaX:0,deltaY:6.35,dashes:[3.175,-3.175],sourceLine:400}]},{name:"TRIANG",description:"",lines:[{angle:60,originX:0,originY:0,deltaX:4.7625,deltaY:8.2488919604,dashes:[4.7625,-4.7625],sourceLine:402},{angle:120,originX:0,originY:0,deltaX:4.7625,deltaY:8.2488919604,dashes:[4.7625,-4.7625],sourceLine:403},{angle:0,originX:-2.38125,originY:4.1244459802,deltaX:4.7625,deltaY:8.2488919604,dashes:[4.7625,-4.7625],sourceLine:404}]},{name:"ZIGZAG",description:"",lines:[{angle:0,originX:0,originY:0,deltaX:3.175,deltaY:3.175,dashes:[3.175,-3.175],sourceLine:406},{angle:90,originX:3.175,originY:0,deltaX:3.175,deltaY:3.175,dashes:[3.175,-3.175],sourceLine:407}]}],issues:[]}});var mce,ex,tx,jO,Oa,zr,Ih,Ag,Tu,i2=W(()=>{zt();tt();yp();Ql();bi();Fn();UO();Gn();En();Di();ro();mce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ex=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},tx=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},jO=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.UserDefined=0]="UserDefined",r[r.Predefined=1]="Predefined",r[r.Custom=2]="Custom"})(Oa||(Oa={}));(function(r){r[r.Normal=0]="Normal",r[r.Outer=1]="Outer",r[r.Ignore=2]="Ignore"})(zr||(zr={}));(function(r){r[r.HatchObject=0]="HatchObject",r[r.GradientObject=1]="GradientObject"})(Ih||(Ih={}));(function(r){r[r.PreDefinedGradient=0]="PreDefinedGradient",r[r.UserDefinedGradient=1]="UserDefinedGradient"})(Ag||(Ag={}));Tu=(function(r){mce(e,r);function e(){var t=r.call(this)||this;return t._areasFromLoopsCache=null,t._normal=new G(0,0,1),t._gradientAngle=0,t._elevation=0,t._geo=new pr,t._isSolidFill=!1,t._definitionLines=[],t._definitionLinesAutoGenerated=!1,t._definitionLinesPatternName="",t._definitionLinesPatternScale=1,t._patternName="",t._patternNameSet=!1,t._patternType=Oa.Predefined,t._patternAngle=0,t._patternAngleSet=!1,t._patternScale=1,t._patternScaleSet=!1,t._associative=!1,t._associativeSet=!1,t._backgroundColor=void 0,t._backgroundColorSet=!1,t._patternDouble=!1,t._patternDoubleSet=!1,t._hatchStyle=zr.Normal,t._hatchStyleSet=!1,t._hatchObjectType=Ih.HatchObject,t._gradientAngle=0,t._gradientShift=0,t._shadeTintValue=0,t._gradientStartColor=void 0,t._gradientEndColor=void 0,t._pixelSize=void 0,t._gradientType=Ag.PreDefinedGradient,t._gradientName="",t._gradientOneColorMode=!1,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"HATCH"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGradient",{get:function(){return this._hatchObjectType===Ih.GradientObject},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHatch",{get:function(){return this._hatchObjectType===Ih.HatchObject},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSolidFill",{get:function(){return this._isSolidFill||ru(this.getEffectivePatternName())},set:function(t){this._isSolidFill=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){if(this.hasExplicitColor())return this.getEntityColor();var t=this.database,n=gt.instance().getVar(oe.HPCOLOR,t);return n instanceof je&&n.colorMethod!==Be.None?n.clone():t.cecolor.clone()},set:function(t){this.setEntityColor(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definitionLines",{get:function(){return this._definitionLines},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"patternName",{get:function(){return this._patternName},set:function(t){this._patternName=t??"",this._isSolidFill=ru(this._patternName),this._patternNameSet=!0,this.updatePredefinedPatternDefinitionLines()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"patternType",{get:function(){return this._patternType},set:function(t){this._patternType=t,t!==Oa.Predefined&&this._definitionLinesAutoGenerated&&(this._definitionLines=[],this._definitionLinesAutoGenerated=!1,this._definitionLinesPatternName="",this._definitionLinesPatternScale=1),this.updatePredefinedPatternDefinitionLines()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"patternAngle",{get:function(){return this._patternAngle},set:function(t){this._patternAngle=t,this._patternAngleSet=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"patternScale",{get:function(){return this._patternScale},set:function(t){this._patternScale=t,this._patternScaleSet=!0,this.updatePredefinedPatternDefinitionLines()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"associative",{get:function(){return this._associative},set:function(t){this._associative=!!t,this._associativeSet=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t?.clone(),this._backgroundColorSet=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"patternDouble",{get:function(){return this._patternDouble},set:function(t){this._patternDouble=!!t,this._patternDoubleSet=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hatchStyle",{get:function(){return this._hatchStyle},set:function(t){this._hatchStyle=t,this._hatchStyleSet=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elevation",{get:function(){return this._elevation},set:function(t){this._elevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t),this._normal.lengthSq()>0&&this._normal.normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hatchObjectType",{get:function(){return this._hatchObjectType},set:function(t){this._hatchObjectType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientAngle",{get:function(){return this._gradientAngle},set:function(t){this._gradientAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientShift",{get:function(){return this._gradientShift},set:function(t){this._gradientShift=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientType",{get:function(){return this._gradientType},set:function(t){this._gradientType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientName",{get:function(){return this.isGradient&&this._gradientName.trim()===""?Qv:this._gradientName},set:function(t){this._gradientName=t??""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientOneColorMode",{get:function(){return this._gradientOneColorMode},set:function(t){this._gradientOneColorMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadeTintValue",{get:function(){return this._shadeTintValue},set:function(t){this._shadeTintValue=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientStartColor",{get:function(){return this._gradientStartColor},set:function(t){this._gradientStartColor=t==null||!Number.isFinite(t)?void 0:t&16777215},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientEndColor",{get:function(){return this._gradientEndColor},set:function(t){this._gradientEndColor=t==null||!Number.isFinite(t)?void 0:t&16777215},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(t){this._pixelSize=t},enumerable:!1,configurable:!0}),e.prototype.applyPatternDefaultsFromSysVars=function(t){var n=gt.instance();if(!this.hasExplicitLayer()){var i=n.getVar(oe.HPLAYER,t);this.shouldUseSysVarOverride(i)&&(this.layer=i)}if(!this.hasExplicitTransparency()){var o=this.parseHpTransparency(n.getVar(oe.HPTRANSPARENCY,t));o&&(this.transparency=o)}if(this._backgroundColorSet||(this._backgroundColor=this.parseHpBackgroundColor(n.getVar(oe.HPBACKGROUNDCOLOR,t)),this._backgroundColorSet=!0),!this._patternNameSet){var a=n.getVar(oe.HPNAME,t);this._patternName=typeof a=="string"?a:"",this._patternNameSet=!0}if(!this._patternAngleSet){var s=n.getVar(oe.HPANG,t);this._patternAngle=typeof s=="number"&&Number.isFinite(s)?s:0,this._patternAngleSet=!0}if(this._patternScaleSet||(this._patternScale=this.normalizePatternScale(n.getVar(oe.HPSCALE,t)),this._patternScaleSet=!0),!this._associativeSet){var l=n.getVar(oe.HPASSOC,t);this._associative=typeof l=="number"?l!==0:!1,this._associativeSet=!0}if(this._hatchStyleSet||(this._hatchStyle=this.normalizeHatchStyle(n.getVar(oe.HPISLANDDETECTION,t)),this._hatchStyleSet=!0),!this._patternDoubleSet){var c=n.getVar(oe.HPDOUBLE,t);this._patternDouble=typeof c=="number"?c!==0:!1,this._patternDoubleSet=!0}this.updatePredefinedPatternDefinitionLines()},e.prototype.getEffectivePatternName=function(){if(this._patternNameSet)return this._patternName;var t=this.database,n=gt.instance().getVar(oe.HPNAME,t);return typeof n=="string"?n:this._patternName},e.prototype.shouldResolveColorFromCecolor=function(){return!1},e.prototype.getEffectivePatternAngle=function(){if(this._patternAngleSet)return this._patternAngle;var t=this.database,n=gt.instance().getVar(oe.HPANG,t);return typeof n=="number"&&Number.isFinite(n)?n:this._patternAngle},e.prototype.getRenderablePatternAngle=function(){return!this._definitionLinesAutoGenerated&&this._definitionLines.length>0?0:this.getEffectivePatternAngle()},e.prototype.getEffectivePatternScale=function(){if(this._patternScaleSet)return this._patternScale;var t=this.database;return this.normalizePatternScale(gt.instance().getVar(oe.HPSCALE,t))},e.prototype.getEffectiveAssociative=function(){if(this._associativeSet)return this._associative;var t=this.database,n=gt.instance().getVar(oe.HPASSOC,t);return typeof n=="number"?n!==0:this._associative},e.prototype.normalizePatternScale=function(t){return typeof t=="number"&&Number.isFinite(t)&&t>0?t:1},e.prototype.normalizeHatchStyle=function(t){return typeof t!="number"||!Number.isFinite(t)?zr.Outer:t===zr.Normal?zr.Normal:t===zr.Ignore?zr.Ignore:zr.Outer},e.prototype.shouldUseSysVarOverride=function(t){if(typeof t!="string")return!1;var n=t.trim().toLowerCase();return n!==""&&n!=="."&&n!=="use current"},e.prototype.parseHpBackgroundColor=function(t){if(t instanceof je)return t.colorMethod===Be.None?void 0:t.clone();if(typeof t=="string"){var n=t.trim().toLowerCase();if(!(!n||n==="."||n==="none"))return je.fromString(t)}},e.prototype.parseHpTransparency=function(t){if(t instanceof Mn)return t.clone();if(this.shouldUseSysVarOverride(t)){var n=t.trim();if(/^bylayer$/i.test(n)||/^byblock$/i.test(n))return Mn.fromString(n);var i=Number(n);if(Number.isInteger(i)&&i>=0&&i<=90){var o=new Mn;return o.percentage=i,o}}},e.prototype.updatePredefinedPatternDefinitionLines=function(t,n){if(t===void 0&&(t=this.getEffectivePatternName()),n===void 0&&(n=this.getEffectivePatternScale()),this.patternType===Oa.Predefined){var i=this._definitionLinesAutoGenerated||this._definitionLines.length===0;if(i){var o=t.trim().toUpperCase();if(!o||ru(o)){this._definitionLines=[],this._definitionLinesAutoGenerated=!1,this._definitionLinesPatternName="",this._definitionLinesPatternScale=1;return}var a=this.normalizePatternScale(n);if(!(this._definitionLinesAutoGenerated&&this._definitionLinesPatternName===o&&this._definitionLinesPatternScale===a)){var s=Sg.patterns.find(function(l){return l.name.trim().toUpperCase()===o});if(!s){this._definitionLinesAutoGenerated&&(this._definitionLines=[],this._definitionLinesAutoGenerated=!1,this._definitionLinesPatternName="",this._definitionLinesPatternScale=1);return}this._definitionLines=s.lines.map(function(l){return{angle:l.angle*Math.PI/180,base:{x:l.originX*a,y:l.originY*a},offset:{x:l.deltaX*a,y:l.deltaY*a},dashLengths:l.dashes.map(function(c){return c*a})}}),this._definitionLinesAutoGenerated=!0,this._definitionLinesPatternName=o,this._definitionLinesPatternScale=a}}}},e.prototype.add=function(t){this._geo.add(t),this.invalidateAreasFromLoopsCache()},e.prototype.invalidateAreasFromLoopsCache=function(){this._areasFromLoopsCache=null},e.prototype.buildAreasFromLoops=function(){if(this._areasFromLoopsCache!=null)return this._areasFromLoopsCache;var t=this._geo.loops;if(t.length===0)return this._areasFromLoopsCache=[],this._areasFromLoopsCache;if(t.length===1)return this._areasFromLoopsCache=[this._geo],this._areasFromLoopsCache;var n=this._geo.buildHierarchy(),i=[],o=function(a,s){if(a.index>=0&&s%2===0){var l=new pr;l.add(t[a.index]),a.children.forEach(function(c){c.index>=0&&l.add(t[c.index])}),i.push(l)}a.children.forEach(function(c){return o(c,s+1)})};return n.children.forEach(function(a){return o(a,0)}),this._areasFromLoopsCache=i.length>0?i:[this._geo],this._areasFromLoopsCache},e.prototype.getCalculatedAreaValue=function(){var t=this.buildAreasFromLoops();return t.length===0?0:t.reduce(function(n,i){return n+i.area},0)},Object.defineProperty(e.prototype,"area",{get:function(){return this.getCalculatedAreaValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this,n=this.buildAreasFromLoops();if(n.length===0)return new De;var i=new De;return n.forEach(function(o){var a=o.box;i.union(new De().setFromPoints([Er({x:a.min.x,y:a.min.y,z:t._elevation},t._normal),Er({x:a.max.x,y:a.min.y,z:t._elevation},t._normal),Er({x:a.max.x,y:a.max.y,z:t._elevation},t._normal),Er({x:a.min.x,y:a.max.y,z:t._elevation},t._normal)]))}),i},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return M7(this._geo.loops,this._elevation,this._normal)},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"pattern",properties:[{name:"patternType",type:"enum",editable:!0,options:[{label:Oa[0],value:0},{label:Oa[1],value:1},{label:Oa[2],value:2}],accessor:{get:function(){return t.patternType},set:function(n){t.patternType=n}}},{name:"patternName",type:"string",editable:!0,accessor:{get:function(){return t.patternName},set:function(n){t.patternName=n}}},{name:"patternAngle",type:"float",editable:!0,accessor:{get:function(){return t.patternAngle},set:function(n){t.patternAngle=n}}},{name:"patternScale",type:"float",editable:!0,accessor:{get:function(){return t.patternScale},set:function(n){t.patternScale=n}}},{name:"associative",type:"boolean",editable:!0,accessor:{get:function(){return t.associative},set:function(n){t.associative=n}}},{name:"backgroundColor",type:"color",editable:!0,accessor:{get:function(){return t.backgroundColor},set:function(n){t.backgroundColor=n}}},{name:"patternDouble",type:"boolean",editable:!0,accessor:{get:function(){return t.patternDouble},set:function(n){t.patternDouble=n}}}]},{groupName:"geometry",properties:[{name:"elevation",type:"float",editable:!0,accessor:{get:function(){return t.elevation},set:function(n){t.elevation=n}}},{name:"area",type:"float",editable:!1,accessor:{get:function(){return t.area}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return this.associative?[]:this.collectBoundaryGripPoints()},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return this.associative?this:(un(t,function(o){i.moveBoundaryGripPointAt(o,n)}),this.invalidateAreasFromLoopsCache(),this)},e.prototype.collectBoundaryGripPoints=function(){var t=new Array,n=this._elevation,i=new Set,o=function(a){var s,l,c="".concat(a.x,",").concat(a.y,",").concat((s=a.z)!==null&&s!==void 0?s:0);i.has(c)||(i.add(c),t.push(new k(a.x,a.y,(l=a.z)!==null&&l!==void 0?l:n)))};return this._geo.loops.forEach(function(a){if(a instanceof Ot){for(var s=a.numberOfVertices,l=0;l<s;l++){var c=a.getPointAt(l);o({x:c.x,y:c.y,z:n})}return}a.curves.forEach(function(u){if(u instanceof fr)o({x:u.startPoint.x,y:u.startPoint.y,z:n}),o({x:u.endPoint.x,y:u.endPoint.y,z:n});else if(u instanceof Ke)o({x:u.startPoint.x,y:u.startPoint.y,z:n}),o({x:u.endPoint.x,y:u.endPoint.y,z:n}),o({x:u.midPoint.x,y:u.midPoint.y,z:n});else if(u instanceof ko){o({x:u.startPoint.x,y:u.startPoint.y,z:n}),o({x:u.endPoint.x,y:u.endPoint.y,z:n});var h=u.getPoint(.5);o({x:h.x,y:h.y,z:n})}})}),t},e.prototype.moveBoundaryGripPointAt=function(t,n){var i=this,o=0,a=this._elevation,s=new Set,l=function(c,u){var h,d="".concat(c.x,",").concat(c.y,",").concat((h=c.z)!==null&&h!==void 0?h:0);s.has(d)||(s.add(d),o===t&&u(),o++)};this._geo.loops.forEach(function(c){if(c instanceof Ot){for(var u=c.numberOfVertices,h=function(p){var f=c.vertices[p];if(!f)return"continue";l({x:f.x,y:f.y,z:a},function(){Sh(c.vertices,p,n)})},d=0;d<u;d++)h(d);return}c.curves.forEach(function(p){if(p instanceof fr)l({x:p.startPoint.x,y:p.startPoint.y,z:a},function(){p.startPoint.x+=n.x,p.startPoint.y+=n.y}),l({x:p.endPoint.x,y:p.endPoint.y,z:a},function(){p.endPoint.x+=n.x,p.endPoint.y+=n.y});else if(p instanceof Ke)l({x:p.startPoint.x,y:p.startPoint.y,z:a},function(){return i.moveCircArc2dGripPoint(p,"start",n)}),l({x:p.endPoint.x,y:p.endPoint.y,z:a},function(){return i.moveCircArc2dGripPoint(p,"end",n)}),l({x:p.midPoint.x,y:p.midPoint.y,z:a},function(){return i.moveCircArc2dGripPoint(p,"mid",n)});else if(p instanceof ko){l({x:p.startPoint.x,y:p.startPoint.y,z:a},function(){return i.moveEllipseArc2dGripPoint(p,"start",n)}),l({x:p.endPoint.x,y:p.endPoint.y,z:a},function(){return i.moveEllipseArc2dGripPoint(p,"end",n)});var f=p.getPoint(.5);l({x:f.x,y:f.y,z:a},function(){return i.moveEllipseArc2dGripPoint(p,"mid",n)})}})})},e.prototype.moveCircArc2dGripPoint=function(t,n,i){var o=t.center;switch(n){case"start":{var a=t.startPoint;t.startAngle=Math.atan2(a.y+i.y-o.y,a.x+i.x-o.x);break}case"end":{var a=t.endPoint;t.endAngle=Math.atan2(a.y+i.y-o.y,a.x+i.x-o.x);break}case"mid":{var s=t.midPoint,l=new Ke(t.startPoint,{x:s.x+i.x,y:s.y+i.y},t.endPoint);t.center=l.center,t.radius=l.radius,t.startAngle=l.startAngle,t.endAngle=l.endAngle,t.clockwise=l.clockwise;break}}},e.prototype.moveEllipseArc2dGripPoint=function(t,n,i){var o=t.center;switch(n){case"start":{var a=t.startPoint;t.startAngle=Math.atan2(a.y+i.y-o.y,a.x+i.x-o.x);break}case"end":{var a=t.endPoint;t.endAngle=Math.atan2(a.y+i.y-o.y,a.x+i.x-o.x);break}case"mid":{var s=t.getPoint(.5),l=s.x+i.x-t.center.x,c=s.y+i.y-t.center.y,u=Math.hypot(s.x-t.center.x,s.y-t.center.y),h=Math.hypot(l,c);if(u>0&&h>0){var d=h/u;t.majorAxisRadius*=d,t.minorAxisRadius*=d}break}}},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=this._elevation,s=[];if(this._geo.loops.forEach(function(c){var u;if(c instanceof Ot){var h=c,d=h.numberOfVertices;if(d===0)return;switch(t){case ne.EndPoint:for(var p=0;p<d;p++){var f=h.getPointAt(p);o.push(new k(f.x,f.y,a))}break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:case ne.Tangent:{for(var m=c.closed?d:d-1,p=0;p<m;p++){var g=[];Ah(h.getPointAt(p),h.getPointAt((p+1)%d),(u=h.vertices[p])===null||u===void 0?void 0:u.bulge,a,t,n,g),t===ne.MidPoint?o.push.apply(o,tx([],ex(g),!1)):s.push.apply(s,tx([],ex(g),!1))}break}default:break}return}c.curves.forEach(function(y){if(y instanceof fr){var b=[];Ah(y.startPoint,y.endPoint,void 0,a,t,n,b),t===ne.MidPoint?o.push.apply(o,tx([],ex(b),!1)):t===ne.Nearest||t===ne.Perpendicular||t===ne.Tangent?s.push.apply(s,tx([],ex(b),!1)):o.push.apply(o,tx([],ex(b),!1))}else if(y instanceof Ke)switch(t){case ne.EndPoint:o.push(new k(y.startPoint.x,y.startPoint.y,a),new k(y.endPoint.x,y.endPoint.y,a));break;case ne.MidPoint:o.push(new k(y.midPoint.x,y.midPoint.y,a));break;case ne.Nearest:{var v=y.nearestPoint({x:n.x,y:n.y});s.push(new k(v.x,v.y,a));break}case ne.Perpendicular:{var x=y.perpendicularPoints({x:n.x,y:n.y});x.forEach(function(A){return s.push(new k(A.x,A.y,a))});break}case ne.Tangent:{var w=y.tangentPoints({x:n.x,y:n.y});w.forEach(function(A){return s.push(new k(A.x,A.y,a))});break}default:break}else if(y instanceof ko)switch(t){case ne.EndPoint:o.push(new k(y.startPoint.x,y.startPoint.y,a),new k(y.endPoint.x,y.endPoint.y,a));break;case ne.MidPoint:{var _=y.getPoint(.5);o.push(new k(_.x,_.y,a));break}case ne.Nearest:{var v=y.nearestPoint({x:n.x,y:n.y});s.push(new k(v.x,v.y,a));break}case ne.Perpendicular:{var x=y.perpendicularPoints({x:n.x,y:n.y});x.forEach(function(E){return s.push(new k(E.x,E.y,a))});break}case ne.Tangent:{var w=y.tangentPoints({x:n.x,y:n.y});w.forEach(function(E){return s.push(new k(E.x,E.y,a))});break}default:break}})}),(t===ne.Nearest||t===ne.Perpendicular||t===ne.Tangent)&&s.length>0){var l=yr(n,s);o.length=0,l&&o.push(l)}},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){if(!this.isSolidFill||this.isGradient)return null;var t=this.buildAreasFromLoops();return t.length>1?null:"area"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n;this.updatePredefinedPatternDefinitionLines();var i=t.subEntityTraits;i.fillType={solidFill:this.isSolidFill,patternAngle:this.getRenderablePatternAngle(),definitionLines:this.definitionLines,backgroundColor:(n=this.backgroundColor)===null||n===void 0?void 0:n.clone(),gradient:this.isGradient?{name:this.gradientName,angle:this.gradientAngle,shift:this.gradientShift,oneColorMode:this.gradientOneColorMode,shadeTintValue:this.shadeTintValue,startColor:this.gradientStartColor,endColor:this.gradientEndColor}:void 0},i.drawOrder=-1;var o=this.buildAreasFromLoops();if(o.length===0)return t.area(this._geo);if(o.length===1)return t.area(o[0]);var a=o.map(function(s){return t.area(s)});return t.group(a)},e.prototype.transformBy=function(t){var n=t.elements,i=new Ks(n[0],n[4],n[12],n[1],n[5],n[13],0,0,1);this._geo.transform(i),this.invalidateAreasFromLoopsCache(),this._elevation=new k(0,0,this._elevation).applyMatrix4(t).z,this._normal.transformDirection(t),this._normal.lengthSq()>0&&this._normal.normalize();var o=new k(1,0,0).applyMatrix4(t),a=new k().applyMatrix4(t),s=new k(o).sub(a);if(s.length()>0){var l=Math.atan2(s.y,s.x);this._patternAngle=this.getEffectivePatternAngle()+l,this._gradientAngle+=l,this._patternScale=this.getEffectivePatternScale()*s.length(),this._patternAngleSet=!0,this._patternScaleSet=!0,this.updatePredefinedPatternDefinitionLines()}return this},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t);var n=this._geo.loops,i=this.getEffectivePatternName(),o=this.getEffectivePatternAngle(),a=this.getEffectivePatternScale();if(this.updatePredefinedPatternDefinitionLines(i,a),t.writeSubclassMarker("AcDbHatch"),t.writePoint3d(10,{x:0,y:0,z:this.elevation}),t.writeVector3d(210,this.normal),t.writeString(2,i||(this.isSolidFill?us:Jv)),t.writeInt16(70,this.isSolidFill?1:0),t.writeInt16(71,this.getEffectiveAssociative()?1:0),t.writeInt16(91,n.length),n.forEach(function(h,d){var p,f,m,g,y,b,v=d===0;if(h instanceof Ot){var x=h.vertices,w=x.some(function(D){var z;return((z=D.bulge)!==null&&z!==void 0?z:0)!==0}),_=2;t.writeInt16(92,_),t.writeInt16(72,w?1:0),t.writeInt16(73,h.closed?1:0),t.writeInt16(93,x.length);try{for(var A=jO(x),E=A.next();!E.done;E=A.next()){var S=E.value;t.writePoint2d(10,S),w&&t.writeDouble(42,(y=S.bulge)!==null&&y!==void 0?y:0)}}catch(D){p={error:D}}finally{try{E&&!E.done&&(f=A.return)&&f.call(A)}finally{if(p)throw p.error}}t.writeInt16(97,0);return}if(h instanceof ta){var _=v?1:0;t.writeInt16(92,_),t.writeInt16(93,h.numberOfEdges);var M=function(z){if(z instanceof fr)return t.writeInt16(72,1),t.writePoint2d(10,z.startPoint),t.writePoint2d(11,z.endPoint),"continue";if(z instanceof Ke)return t.writeInt16(72,2),t.writePoint2d(10,z.center),t.writeDouble(40,z.radius),t.writeAngle(50,z.startAngle),t.writeAngle(51,z.closed?z.startAngle+Math.PI*2:z.endAngle),t.writeInt16(73,z.clockwise?0:1),"continue";if(z instanceof ko){t.writeInt16(72,3),t.writePoint2d(10,z.center);var N=new Z(z.majorAxisRadius*Math.cos(z.rotation),z.majorAxisRadius*Math.sin(z.rotation));t.writePoint2d(11,N);var J=z.majorAxisRadius===0?0:z.minorAxisRadius/z.majorAxisRadius;return t.writeDouble(40,J),t.writeAngle(50,z.startAngle),t.writeAngle(51,z.closed?z.startAngle+Math.PI*2:z.endAngle),t.writeInt16(73,z.clockwise?0:1),"continue"}if(z instanceof mr){var X=z.knots,Q=z.controlPoints,ce=z.weights,H=z.fitPoints,de=ce.some(function(Se){return Se!==1});t.writeInt16(72,4),t.writeInt16(94,z.degree),t.writeInt16(73,de?1:0),t.writeInt16(74,z.closed?1:0),t.writeInt16(95,X.length),t.writeInt16(96,Q.length),X.forEach(function(Se){return t.writeDouble(40,Se)}),Q.forEach(function(Se,te){var ue;t.writePoint2d(10,Se),de&&t.writeDouble(42,(ue=ce[te])!==null&&ue!==void 0?ue:1)}),t.writeInt16(97,(b=H?.length)!==null&&b!==void 0?b:0),H?.forEach(function(Se){return t.writePoint2d(11,Se)})}};try{for(var T=jO(h.curves),L=T.next();!L.done;L=T.next()){var O=L.value;M(O)}}catch(z){m={error:z}}finally{try{L&&!L.done&&(g=T.return)&&g.call(T)}finally{if(m)throw m.error}}t.writeInt16(97,0)}}),t.writeInt16(75,this.hatchStyle),t.writeInt16(76,this.patternType),t.writeAngle(52,o),t.writeDouble(41,a),t.writeInt16(77,0),t.writeInt16(78,this.definitionLines.length),this.definitionLines.forEach(function(h){t.writeAngle(53,h.angle),t.writeDouble(43,h.base.x),t.writeDouble(44,h.base.y),t.writeDouble(45,h.offset.x),t.writeDouble(46,h.offset.y),t.writeInt16(79,h.dashLengths.length),h.dashLengths.forEach(function(d){return t.writeDouble(49,d)})}),this._pixelSize!=null&&t.writeDouble(47,this._pixelSize),this.isGradient){t.writeInt16(450,this._hatchObjectType),t.writeInt16(451,0),t.writeDouble(460,this._gradientAngle),t.writeDouble(461,this._gradientShift),t.writeInt16(452,this._gradientOneColorMode?1:0),t.writeDouble(462,this._shadeTintValue);var s=this._gradientStartColor,l=this._gradientEndColor,c=s!=null&&l!=null?2:s!=null||l!=null?1:0;t.writeInt16(453,c);var u=function(h,d){t.writeDouble(463,h);var p=qi.getIndexByColor(d);p!=null&&t.writeInt16(63,p),t.writeInt32(421,d)};s!=null&&u(0,s),l!=null&&u(1,l),t.writeString(470,this.gradientName)}return t.writeInt16(98,0),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbHatch"),this.definitionLines.length=0;for(var i=this.elevation,o=this.normal.x,a=this.normal.y,s=this.normal.z,l=this.patternAngle*180/Math.PI,c=0,u=!1,h=!1,d=!1,p=0,f=0,m=[],g=null,y=[],b=null,v="type",x=0,w=!1,_=null,A=0,E=!1,S=0,M,T=function(Se){S===0?n.gradientStartColor=Se:n.gradientEndColor=Se,S++,M=void 0},L=function(){if(M!=null){var Se=qi.getColorByIndex(M);Se!=null?T(Se):M=void 0}},O=function(){g&&(m.push(g),g=null)},D=function(){if(O(),m.length!==0){var Se=new Ot;Se.closed=d,m.forEach(function(te,ue){var ve;Se.addVertexAt(ue,{x:te.x,y:te.y,bulge:(ve=te.bulge)!==null&&ve!==void 0?ve:0})}),n.add(Se),m=[]}},z=function(){var Se,te;if(y.length!==0){var ue=[],ve=[],se=function(Pe){if(Pe.kind==="line")ve.push(new fr({x:Pe.sx,y:Pe.sy},{x:Pe.ex,y:Pe.ey}));else if(Pe.kind==="arc")ve.push(new Ke({x:Pe.cx,y:Pe.cy},Pe.radius,Pe.startDeg*Math.PI/180,Pe.endDeg*Math.PI/180,!Pe.isCcw));else if(Pe.kind==="ellipse"){var Xe=Math.hypot(Pe.mx,Pe.my),$=Xe*Pe.ratio,yt=Pe.startDeg*Math.PI/180,C=Pe.endDeg*Math.PI/180,I=Math.atan2(Pe.my,Pe.mx);Pe.isCcw||(yt=Math.PI*2-yt,C=Math.PI*2-C),ve.push(new ko({x:Pe.cx,y:Pe.cy,z:0},Xe,$,yt,C,!Pe.isCcw,I))}else{var B=mr.fromDwgSplineEdge({degree:Pe.degree,numberOfControlPoints:Pe.controlPoints.length,numberOfKnots:Pe.knots.length,numberOfFitData:Pe.fitPoints.length,knots:Pe.knots,controlPoints:Pe.controlPoints.map(function(K){var q;return{x:K.x,y:K.y,z:0,weight:Pe.rational?(q=K.weight)!==null&&q!==void 0?q:1:void 0}}),fitDatum:Pe.fitPoints.map(function(K){return{x:K.x,y:K.y,z:0}}),startTangent:null,endTangent:null});B&&ve.push(B)}};try{for(var we=jO(y),pe=we.next();!pe.done;pe=we.next()){var Ee=pe.value;se(Ee)}}catch(Pe){Se={error:Pe}}finally{try{pe&&!pe.done&&(te=we.return)&&te.call(we)}finally{if(Se)throw Se.error}}var Oe=ta.buildFromEdges(ve);Oe.length===1?n.add(Oe[0]):ve.length>0&&n.add(new ta(ve)),y=[],b=null}},N=function(){u?D():z()},J=function(){b&&(y.push(b),b=null)},X=function(){J(),N(),x=Math.max(0,x-1),x===0&&(E=!0)};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var Q=t.readItem();if(!Q)break;var ce=Number(Q.code),H=Number(Q.value);if(w||E){switch(ce){case 75:this.hatchStyle=H,E=!0;break;case 76:this.patternType=H;break;case 52:l=H;break;case 41:this.patternScale=H;break;case 77:break;case 78:w=!0;break;case 53:_&&this.definitionLines.push(_),_={angle:H*Math.PI/180,base:{x:0,y:0},offset:{x:0,y:0},dashLengths:[]};break;case 43:_&&(_.base.x=H);break;case 44:_&&(_.base.y=H);break;case 45:_&&(_.offset.x=H);break;case 46:_&&(_.offset.y=H);break;case 79:A=H;break;case 49:_&&_.dashLengths.push(H);break;case 47:this.pixelSize=H;break;case 99:break;case 450:this.hatchObjectType=H,this.gradientStartColor=void 0,this.gradientEndColor=void 0,S=0,M=void 0;break;case 451:break;case 452:this.gradientOneColorMode=H!==0;break;case 453:break;case 460:this.gradientAngle=H;break;case 461:this.gradientShift=H;break;case 462:this.shadeTintValue=H;break;case 463:L();break;case 63:M=H;break;case 421:T(H);break;case 470:L(),this.gradientName=String(Q.value);break;case 98:break;case 10:case 20:break;default:break}continue}switch(ce){case 10:u||b&&b.kind!=="line"&&b.kind!=="arc"&&b.kind!=="ellipse"&&b.kind,x>0&&u?(O(),g={x:H,y:0}):b?.kind==="line"&&v==="type"?b.sx=H:b?.kind==="arc"||b?.kind==="ellipse"?b.cx=H:b?.kind==="spline"?b.controlPoints.push({x:H,y:0}):x<=0;break;case 20:x>0&&u&&g?g.y=H:b?.kind==="line"&&v==="type"?b.sy=H:b?.kind==="arc"||b?.kind==="ellipse"?b.cy=H:b?.kind==="spline"&&b.controlPoints.length>0&&(b.controlPoints[b.controlPoints.length-1].y=H);break;case 30:x<=0&&!E&&(i=H);break;case 2:this.patternName=String(Q.value);break;case 70:this.isSolidFill=H!==0;break;case 71:this.associative=H!==0;break;case 91:x=H;break;case 92:x>0&&(m.length>0||y.length>0||b)&&(J(),N()),c=H,u=(c&2)!==0,h=!1,d=!1,p=0,f=0,m=[],y=[],b=null,v="type";break;case 72:u?h=H!==0:(J(),H===1?(b={kind:"line",sx:0,sy:0,ex:0,ey:0},v="type"):H===2?b={kind:"arc",cx:0,cy:0,radius:0,startDeg:0,endDeg:0,isCcw:!0}:H===3?b={kind:"ellipse",cx:0,cy:0,mx:0,my:0,ratio:1,startDeg:0,endDeg:0,isCcw:!0}:H===4?b={kind:"spline",degree:3,rational:!1,closed:!1,knots:[],controlPoints:[],fitPoints:[],expectedKnots:0,expectedControls:0,expectedFits:0,fitCountSeen:!1}:b=null);break;case 73:u?d=H!==0:b?.kind==="arc"||b?.kind==="ellipse"?b.isCcw=H!==0:b?.kind==="spline"&&(b.rational=H!==0);break;case 74:b?.kind==="spline"&&(b.closed=H!==0);break;case 93:u?p=H:f=H;break;case 42:u&&h&&g?g.bulge=H:b?.kind==="spline"&&b.rational&&b.controlPoints.length>0&&(b.controlPoints[b.controlPoints.length-1].weight=H);break;case 11:b?.kind==="line"?(b.ex=H,v="line-end"):b?.kind==="ellipse"?b.mx=H:b?.kind==="spline"&&b.fitPoints.push({x:H,y:0});break;case 21:b?.kind==="line"?b.ey=H:b?.kind==="ellipse"?b.my=H:b?.kind==="spline"&&b.fitPoints.length>0&&(b.fitPoints[b.fitPoints.length-1].y=H);break;case 40:b?.kind==="arc"?b.radius=H:b?.kind==="ellipse"?b.ratio=H:b?.kind==="spline"&&b.knots.push(H);break;case 50:(b?.kind==="arc"||b?.kind==="ellipse")&&(b.startDeg=H);break;case 51:(b?.kind==="arc"||b?.kind==="ellipse")&&(b.endDeg=H);break;case 94:b?.kind==="spline"&&(b.degree=H);break;case 95:b?.kind==="spline"&&(b.expectedKnots=H);break;case 96:b?.kind==="spline"&&(b.expectedControls=H);break;case 97:if(b?.kind==="spline"&&!b.fitCountSeen&&(b.controlPoints.length>0||b.knots.length>0)){b.expectedFits=H,b.fitCountSeen=!0;break}X();break;case 75:J(),N(),x=0,E=!0,this.hatchStyle=H;break;case 210:o=H;break;case 220:a=H;break;case 230:s=H;break;default:break}}b&&(y.push(b),b=null),N(),_&&this.definitionLines.push(_),L(),this.elevation=i;var de=new G(o,a,s);return de.lengthSq()>0&&(this.normal=de),this.patternAngle=l*Math.PI/180,this},e.typeName="Hatch",e})(bt)});var Bp,VO=W(()=>{zt();tt();$l();A0();mg();M0();P0();i2();rg();bi();Bp=(function(){function r(e){this.db=e}return r.prototype.createDefaultLayer=function(){var e=new je;return e.colorIndex=7,this.db.tables.layerTable.add(new aa({name:"0",standardFlags:0,linetype:"Continuous",lineWeight:0,isOff:!1,color:e,isPlottable:!0}))},r.prototype.createDefaultLineType=function(){this.db.tables.linetypeTable.add(new La({name:"ByBlock",standardFlag:0,description:"",totalPatternLength:0})),this.db.tables.linetypeTable.add(new La({name:"ByLayer",standardFlag:0,description:"",totalPatternLength:0})),this.db.tables.linetypeTable.add(new La({name:"Continuous",standardFlag:0,description:"Solid line",totalPatternLength:0}))},r.prototype.createDefaultTextStyle=function(){this.db.tables.textStyleTable.add(new vu({name:cn,standardFlag:0,fixedTextHeight:0,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:.2,font:"SimKai",bigFont:"",extendedFont:"SimKai"}))},r.prototype.createDefaultDimStyle=function(){this.db.tables.dimStyleTable.add(new ri({name:cn,dimtxsty:cn}))},r.prototype.createDefaultLayout=function(){var e=new ia;e.layoutName="Model",e.tabOrder=0,e.blockTableRecordId=this.db.tables.blockTable.modelSpace.objectId,e.limits.min.copy({x:0,y:0}),e.limits.max.copy({x:1e6,y:1e6}),e.extents.min.copy({x:0,y:0,z:0}),e.extents.max.copy({x:1e6,y:1e6,z:0}),this.db.objects.layout.setAt(e.layoutName,e),this.db.tables.blockTable.modelSpace.layoutId=e.objectId},r.prototype.createArrowBlock=function(){var e="_CAXARROW";if(!this.db.tables.blockTable.getAt(e)){var t=new Tu;t.patternName=us;var n=new ta;n.add(new fr({x:0,y:0},{x:-1,y:.125})),n.add(new fr({x:-1,y:.125},{x:-1,y:-.125})),n.add(new fr({x:-1,y:-.125},{x:0,y:0})),t.add(n);var i=new rn;i.name="_CAXARROW",i.appendEntity(t),this.db.tables.blockTable.add(i)}},r})()});function Mg(r,e){var t;switch(e.lunits){case Cn.Scientific:t=GO(Ece(r,e.luprec),e);break;case Cn.Engineering:t=Cce(r,e);break;case Cn.Architectural:t=Tce(r,e);break;case Cn.Fractional:t=GO(kce(r,e),e);break;case Cn.WindowsDesktop:case Cn.Decimal:default:t=GO(Cg(r,e.luprec),e)}return s9(t,vce(r,e),e)}function yce(r,e){var t;switch(e.aunits){case ar.DegreesMinutesSeconds:t=u9(r,e);break;case ar.Gradians:t=Oce(r,e);break;case ar.Radians:t=Lce(r,e);break;case ar.SurveyorsUnits:t=Dce(r,e);break;case ar.DecimalDegrees:default:t=Ice(r,e)}return s9(t,xce(r,e),e)}function bce(r,e,t){var n=r-e;return t===1&&(n=-n),xe.normalizeAngle(n)}function WO(r){var e=r.showUnits?'"':"";return r.unitmode===1?{feetInchSeparator:"",fractionSeparator:"-",inchSuffix:e}:{feetInchSeparator:"-",fractionSeparator:" ",inchSuffix:e}}function nx(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=8),Number.isFinite(r)?Math.max(e,Math.min(t,Math.round(r))):e}function Eg(r){return Object.is(r,-0)?0:r}function s9(r,e,t){return!t.showApproximate||!e?r:"~ ".concat(r)}function vce(r,e){if(!Number.isFinite(r))return!1;var t=_ce(r,e);return XO(r,t)}function xce(r,e){if(!Number.isFinite(r))return!1;if(e.aunits===ar.SurveyorsUnits)return wce(r,e.auprec);var t=Sce(r,e);return XO(r,t)}function wce(r,e){var t=xe.radToDeg(r),n=((90-t)%360+360)%360,i=h9(n),o=Math.min(Math.abs(n-i.base),Math.abs(i.base+90-n)),a=xe.degToRad(o),s=l9(a,e);return XO(a,s)}function _ce(r,e){var t=Eg(r);switch(e.lunits){case Cn.Scientific:return Ace(t,e.luprec);case Cn.Engineering:case Cn.Architectural:case Cn.Fractional:return Mce(t,e);case Cn.WindowsDesktop:case Cn.Decimal:default:return Pg(t,e.luprec)}}function Sce(r,e){var t=Eg(r);switch(e.aunits){case ar.DegreesMinutesSeconds:return l9(t,e.auprec);case ar.Gradians:return Pg(t/HO,e.auprec)*HO;case ar.Radians:return Pg(t,e.auprec);case ar.DecimalDegrees:default:return xe.degToRad(Pg(xe.radToDeg(t),e.auprec))}}function Pg(r,e){if(!Number.isFinite(r))return 0;var t=Math.pow(10,e);return Math.round(Eg(r)*t)/t}function Ace(r,e){if(!Number.isFinite(r))return 0;var t=Eg(r);if(t===0)return 0;var n=t.toExponential(e);return Number(n)}function Mce(r,e){if(!Number.isFinite(r))return 0;var t=r<0?-1:1,n=Math.abs(r),i=Math.floor(n/12),o=n-i*12;if(e.lunits===Cn.Architectural||e.lunits===Cn.Fractional){var a=1<<nx(e.luprec,0,8),s=Pce(o,a);return t*(i*12+s)}return t*(i*12+Pg(o,e.luprec))}function Pce(r,e){var t=Math.floor(r),n=r-t,i=Math.round(n*e);return i>=e?t+1:t+i/e}function l9(r,e){var t=xe.radToDeg(r),n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i),a=(i-o)*60,s=Math.floor(a),l=Pg((a-s)*60,e),c=o+s/60+l/3600;return xe.degToRad(n*c)}function XO(r,e){if(r===e)return!1;var t=Math.max(Math.abs(r),Math.abs(e),1);return Math.abs(r-e)>t*Number.EPSILON*8}function Cg(r,e){if(!Number.isFinite(r))return"0";var t=Eg(r);if(Number.isInteger(t)&&e===0)return String(t);var n=t.toFixed(e),i=n.replace(/\.?0+$/,"");return i===""||i==="-"?"0":i}function Ece(r,e){if(!Number.isFinite(r))return"0";var t=Eg(r);if(t===0)return"0";var n=t.toExponential(e).match(/^(.+)e([+-])(\d+)$/i);if(!n)return"0";var i=gce(n,4),o=i[1],a=i[2],s=i[3],l=s.length<2?s.padStart(2,"0"):s;return"".concat(o,"E").concat(a).concat(l).toUpperCase()}function Cce(r,e){if(!Number.isFinite(r))return"0";var t=WO(e),n=r<0?"-":"",i=Math.abs(r),o=Math.floor(i/12),a=i-o*12,s=Cg(a,e.luprec);return o===0?"".concat(n).concat(s).concat(t.inchSuffix):"".concat(n).concat(o,"'").concat(t.feetInchSeparator).concat(s).concat(t.inchSuffix)}function Tce(r,e){if(!Number.isFinite(r))return"0";var t=WO(e),n=r<0?"-":"",i=Math.abs(r),o=Math.floor(i/12),a=i-o*12,s=1<<nx(e.luprec,0,8),l=c9(a,s,t.fractionSeparator);return o===0?"".concat(n).concat(l).concat(t.inchSuffix):"".concat(n).concat(o,"'").concat(t.feetInchSeparator).concat(l).concat(t.inchSuffix)}function kce(r,e){if(!Number.isFinite(r))return"0";var t=WO(e),n=r<0?"-":"",i=Math.abs(r),o=1<<nx(e.luprec,0,8);return"".concat(n).concat(c9(i,o,t.fractionSeparator))}function c9(r,e,t){var n=Math.floor(r),i=r-n,o=Math.round(i*e);if(o>=e)return String(n+1);if(o===0)return String(n);var a=Nce(o,e);o/=a;var s=e/a,l="".concat(o,"/").concat(s);return n===0?l:"".concat(n).concat(t).concat(l)}function Ice(r,e){var t=xe.radToDeg(r);return"".concat(Cg(t,e.auprec)).concat(e.showUnits?"\xB0":"")}function Lce(r,e){return"".concat(Cg(r,e.auprec)).concat(e.showUnits?" rad":"")}function Oce(r,e){var t=r/HO;return"".concat(Cg(t,e.auprec)).concat(e.showUnits?"g":"")}function u9(r,e){var t=xe.radToDeg(r),n=t<0?"-":"",i=Math.abs(t),o=Math.floor(i),a=(i-o)*60,s=Math.floor(a),l=(a-s)*60,c=Cg(l,e.auprec),u=e.showUnits?'"':"";return"".concat(n).concat(o,"d").concat(s,"'").concat(c).concat(u)}function Dce(r,e){var t=xe.radToDeg(r),n=((90-t)%360+360)%360,i=h9(n),o=Math.min(Math.abs(n-i.base),Math.abs(i.base+90-n)),a=u9(xe.degToRad(o),e),s=a.replace(/^-/,"");return"".concat(i.prefix," ").concat(s," ").concat(i.suffix).trim()}function h9(r){return r<90?{prefix:"N",suffix:"E",base:0}:r<180?{prefix:"S",suffix:"E",base:90}:r<270?{prefix:"S",suffix:"W",base:180}:{prefix:"N",suffix:"W",base:270}}function GO(r,e){if(!e.showUnits||e.lunits===Cn.Engineering||e.lunits===Cn.Architectural)return r;var t=Rce(e.insunits,e.measurement);return t?"".concat(r).concat(t):r}function Rce(r,e){return r===Ft.Undefined?e===0?'"':" mm":I7(r)?Bce(r):L7(r)?Fce(r):""}function Bce(r){switch(r){case Ft.Millimeters:return" mm";case Ft.Centimeters:return" cm";case Ft.Meters:return" m";case Ft.Kilometers:return" km";case Ft.Decimeters:return" dm";case Ft.Microns:return" \xB5m";case Ft.Nanometers:return" nm";default:return""}}function Fce(r){switch(r){case Ft.Inches:case Ft.Microinches:case Ft.Mils:case Ft.USSurveyInch:return'"';case Ft.Feet:case Ft.USSurveyFeet:return"'";case Ft.Miles:case Ft.USSurveyMile:return" mi";case Ft.Yards:case Ft.USSurveyYard:return" yd";default:return""}}function Nce(r,e){for(var t=Math.abs(r),n=Math.abs(e);n!==0;){var i=n;n=t%n,t=i}return t||1}var gce,HO,rx,YO=W(()=>{tt();v0();x0();w0();gce=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},HO=Math.PI/200,rx=(function(){function r(e){this.database=e}return r.prototype.formatLength=function(e,t){var n=this.createContext(t);return Mg(e,n)},r.prototype.formatPoint2d=function(e,t){var n=this.createContext(t);return"".concat(Mg(e.x,n),", ").concat(Mg(e.y,n))},r.prototype.formatPoint3d=function(e,t){var n=this.createContext(t);return"".concat(Mg(e.x,n),", ").concat(Mg(e.y,n),", ").concat(Mg(e.z,n))},r.prototype.formatAngle=function(e,t){var n,i=this.createContext(t),o=(n=t?.applyAngbaseAngdir)!==null&&n!==void 0?n:!0,a=o?bce(e,this.database.angbase,this.database.angdir):xe.normalizeAngle(e);return yce(a,i)},r.prototype.createContext=function(e){var t,n;return{lunits:this.database.lunits,luprec:nx(this.database.luprec),insunits:this.database.insunits,unitmode:this.database.unitmode,measurement:this.database.measurement,aunits:this.database.aunits,auprec:nx(this.database.auprec),showUnits:(t=e?.showUnits)!==null&&t!==void 0?t:!1,showApproximate:(n=e?.showApproximate)!==null&&n!==void 0?n:!1}},r})()});var zce,d9,p9,f9,vr,ys=W(()=>{gr();Qm();zce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),d9=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p9=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},f9=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},vr=(function(r){zce(e,r);function e(t){var n=r.call(this)||this;return n.database=t,n.objectId=t.generateHandle(),n.ownerId=t.objectId,n._recordsByName=new Map,n._unnamedRecords=[],n}return Object.defineProperty(e.prototype,"numEntries",{get:function(){return this._recordsByName.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalRecordCount",{get:function(){return this._recordsByName.size+this._unnamedRecords.length},enumerable:!1,configurable:!0}),e.prototype.add=function(t){var n=this,i=this.database.transactionManager;if(i.strictMode&&!i.isRecording()&&!i.isApplyingUndoRedo())throw new Error("Cannot add symbol table records outside an active transaction.");var o=i.resolveSymbolTableName(this);t.database=this.database,this.database.commitObjectHandle(t,function(s){return n.hasId(s)}),t.ownerId=this.objectId;var a=this.normalizeName(t.name);a?this._recordsByName.set(a,t):this._unnamedRecords.push(t),i.isRecording()&&i.recordAppend({type:"symbolTable",tableName:o},t)},e.prototype.remove=function(t){var n=this.normalizeName(t),i=this._recordsByName.get(n);return i?(this.removeRecord(i),!0):!1},e.prototype.removeId=function(t){var n=this.getIdAt(t);return n?(this.removeRecord(n),!0):!1},e.prototype.removeRecord=function(t){var n=this.database.transactionManager;if(n.strictMode&&!n.isRecording()&&!n.isApplyingUndoRedo())throw new Error("Cannot remove symbol table records outside an active transaction.");if(n.isRecording()){var i=n.resolveSymbolTableName(this);n.recordRemove({type:"symbolTable",tableName:i},t)}this.removeFromMembership(t),this.database.releaseObjectHandle(t)},e.prototype.removeAll=function(){var t,n,i,o;try{for(var a=d9(this._recordsByName.values()),s=a.next();!s.done;s=a.next()){var l=s.value;this.database.releaseObjectHandle(l)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}try{for(var c=d9(this._unnamedRecords),u=c.next();!u.done;u=c.next()){var l=u.value;this.database.releaseObjectHandle(l)}}catch(h){i={error:h}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}this._recordsByName.clear(),this._unnamedRecords.length=0},e.prototype.has=function(t){var n=this.normalizeName(t);return this._recordsByName.has(n)},e.prototype.hasId=function(t){return this.getIdAt(t)!==void 0},e.prototype.getAt=function(t){var n=this.normalizeName(t);return this._recordsByName.get(n)},e.prototype.getIdAt=function(t){var n=this.database.getObjectById(t);if(n){var i=n.getAttrWithoutException("ownerId");if(i===this.objectId)return n}},e.prototype.getOwnerIdAt=function(t){return this.getIdAt(t)},e.prototype.newIterator=function(t){return t===void 0&&(t=!1),t?new hs(f9(f9([],p9(this._recordsByName.values()),!1),p9(this._unnamedRecords),!1)):new hs(this._recordsByName)},e.prototype.normalizeName=function(t){return(t??"").trim().toUpperCase()},Object.defineProperty(e.prototype,"dxfEntryCount",{get:function(){return this.numEntries},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbSymbolTable"),t.writeInt16(70,this.dxfEntryCount),this},e.prototype.removeFromMembership=function(t){var n=this.normalizeName(t.name);if(n){this._recordsByName.delete(n);return}var i=this._unnamedRecords.indexOf(t);i>=0&&this._unnamedRecords.splice(i,1)},e})(Kt)});var Uce,m9,ix,$O=W(()=>{Gn();$l();ys();Uce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),m9=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ix=(function(r){Uce(e,r);function e(t){return r.call(this,t)||this}return Object.defineProperty(e.prototype,"modelSpace",{get:function(){var t=this.getAt(rn.MODEL_SPACE_NAME);return t||(t=new rn,t.name=rn.MODEL_SPACE_NAME,this.add(t)),t},enumerable:!1,configurable:!0}),e.prototype.getEntityById=function(t){var n=this.database.getObjectById(t);if(n instanceof bt)return n},e.prototype.removeEntity=function(t){var n,i,o=!1;try{for(var a=m9(this.database.tables.blockTable.newIterator()),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.removeEntity(t)){o=!0;break}}}catch(c){n={error:c}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},e.prototype.getXrefs=function(){var t,n,i=[];try{for(var o=m9(this.newIterator()),a=o.next();!a.done;a=o.next()){var s=a.value;s.isXref&&i.push(s)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},e.prototype.getUnresolvedXrefs=function(){return this.getXrefs().filter(function(t){return t.isUnresolvedXref})},e.prototype.normalizeName=function(t){var n=(t??"").trim();if(!n)return"";if(rn.isModelSapceName(n))return rn.MODEL_SPACE_NAME;if(rn.isPaperSapceName(n)){var i=rn.PAPER_SPACE_NAME_PREFIX,o=n.substring(i.length);return i+o}return r.prototype.normalizeName.call(this,n)},e})(vr)});function a2(r){return r==="license_expired"||r==="license_invalid"}function ox(r){var e=r.toLowerCase();if(jce.some(function(t){return e.includes(t)}))return"license_expired";if(Vce.some(function(t){return e.includes(t)}))return"license_invalid"}function s2(r){var e;return(e=ox(r))!==null&&e!==void 0?e:"license_invalid"}var o2,jce,Vce,KO=W(()=>{o2="DwgConverterLicenseError",jce=["evaluation of @mlightcad/dwg-converter has expired"],Vce=["invalid @mlightcad/dwg-converter license key"]});function l2(r){var e=r.toLowerCase();return g9.some(function(t){return e.includes(t)})}var Gce,Hce,g9,c2,qO=W(()=>{KO();Gce=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},Hce=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},g9=["out of memory","data cannot be cloned","allocation failed","memory access out of bounds"];c2=(function(){function r(){this.setupMessageHandler()}return r.prototype.setupMessageHandler=function(){var e=this;self.onmessage=function(t){return Gce(e,void 0,void 0,function(){var n,i,o,a,s,l;return Hce(this,function(c){switch(c.label){case 0:n=t.data,i=n.id,o=n.input,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.executeTask(o)];case 2:return a=c.sent(),this.sendResponse(i,!0,a),[3,4];case 3:return s=c.sent(),l=s instanceof Error?s.message:String(s),this.sendResponse(i,!1,void 0,l,this.classifyTaskError(s,l)),[3,4];case 4:return[2]}})})}},r.prototype.sendResponse=function(e,t,n,i,o){var a={id:e,success:t,data:n,error:i,errorCode:o};try{self.postMessage(a)}catch(l){var s=l instanceof Error?l.message:String(l);self.postMessage({id:e,success:!1,error:s,errorCode:this.classifyPostMessageError(s)})}},r.prototype.classifyTaskError=function(e,t){if(e instanceof Error){var n=e.code;if(a2(n))return n;if(e.name===o2)return s2(t)}var i=ox(t);return i||this.classifyPostMessageError(t)},r.prototype.classifyPostMessageError=function(e){return l2(e)?"worker_oom":e.toLowerCase().includes("timed out")?"worker_timeout":"worker_error"},r})()});var Wce,nc,ZO=W(()=>{qO();KO();Wce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),nc=(function(r){Wce(e,r);function e(t,n,i){var o=r.call(this,t)||this;return o.name="AcDbOpenDatabaseError",o.code=n,o.stage=i?.stage,o.cause=i?.cause,o}return e.isLicenseErrorCode=function(t){return a2(t)},e.isWorkerOutOfMemoryMessage=function(t){return l2(t)},e.classifyThrownError=function(t){if(t instanceof Error){var n=e.readStructuredCode(t);if(n)return n;if(t.name===o2)return s2(t.message)}var i=t instanceof Error?t.message:String(t);return e.classifyWorkerErrorMessage(i)},e.classifyWorkerErrorMessage=function(t){var n=ox(t);return n||(e.isWorkerOutOfMemoryMessage(t)?"worker_oom":t.toLowerCase().includes("timed out")?"worker_timeout":"worker_error")},e.from=function(t,n){if(t instanceof e)return t;var i=t instanceof Error?t.message:String(t),o=e.classifyThrownError(t);return new e(i,o,{stage:n,cause:t})},e.fromTask=function(t){var n=t.task.name;return e.from(t.error,n)},e.throwOnWorkerParseFailure=function(t,n){if(n===void 0&&(n="PARSE"),!t.success){var i=t.error!=null?"Failed to parse drawing due to error: '".concat(t.error,"'"):"Failed to parse drawing due to an unknown worker error",o=e.mapWorkerResultCode(t.errorCode,t.error);throw new e(i,o,{stage:n})}},e.mapWorkerResultCode=function(t,n){switch(t){case"worker_oom":return"worker_oom";case"worker_timeout":return"worker_timeout";case"worker_error":return"worker_error";case"license_expired":return"license_expired";case"license_invalid":return"license_invalid";default:return e.classifyWorkerErrorMessage(n??"")}},e.readStructuredCode=function(t){var n=t.code;if(typeof n=="string")switch(n){case"license_expired":case"license_invalid":case"worker_oom":case"worker_timeout":case"worker_error":case"parse_failed":case"font_load_failed":case"fetch_failed":case"unknown":return n;default:return}},e})(Error)});var Xce,ax,JO=W(()=>{ys();Xce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ax=(function(r){Xce(e,r);function e(t){return r.call(this,t)||this}return e})(vr)});var Yce,sx,QO=W(()=>{ys();Yce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),sx=(function(r){Yce(e,r);function e(t){return r.call(this,t)||this}return e.prototype.add=function(t){r.prototype.add.call(this,t),this.database.events.layerAppended.dispatch({database:this.database,layer:t})},e})(vr)});var $ce,lx,e3=W(()=>{ys();$ce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),lx=(function(r){$ce(e,r);function e(t){return r.call(this,t)||this}return e})(vr)});var Kce,t3,cx,n3=W(()=>{bi();ys();Kce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),t3=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cx=(function(r){Kce(e,r);function e(t){return r.call(this,t)||this}return e.normalizeFontFileName=function(t){if(t){var n=t.lastIndexOf(".");return n>=0?t.substring(0,n).toLowerCase():t.toLowerCase()}},Object.defineProperty(e.prototype,"dxfEntryCount",{get:function(){return this.totalRecordCount},enumerable:!1,configurable:!0}),e.prototype.resolveAt=function(t){var n,i,o,a,s;this.database.ensureTextStyleDefaults();var l=[],c=function(b){var v=b?.trim();v&&!l.includes(v)&&l.push(v)};c(t),c(this.database.textstyle),c(cn),c("STANDARD");try{for(var u=t3(l),h=u.next();!h.done;h=u.next()){var d=h.value,p=this.getAt(d);if(p)return p;var f=d.toUpperCase();try{for(var m=(o=void 0,t3(this.newIterator())),g=m.next();!g.done;g=m.next()){var y=g.value;if(y.name.toUpperCase()===f)return y}}catch(b){o={error:b}}finally{try{g&&!g.done&&(a=m.return)&&a.call(m)}finally{if(o)throw o.error}}}}catch(b){n={error:b}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return(s=this.newIterator().next().value)!==null&&s!==void 0?s:void 0},Object.defineProperty(e.prototype,"shapeFiles",{get:function(){return this.newIterator(!0).toArray().filter(function(t){return t.isShapeFile})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fonts",{get:function(){var t,n,i=new Set;try{for(var o=t3(this.newIterator()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.normalizeFontFileName(s.fileName);l&&i.add(l);var c=e.normalizeFontFileName(s.bigFontFileName);c&&i.add(c)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return Array.from(i)},enumerable:!1,configurable:!0}),e})(vr)});var qce,ux,r3=W(()=>{ys();qce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),ux=(function(r){qce(e,r);function e(t){return r.call(this,t)||this}return e})(vr)});var Zce,hx,i3=W(()=>{ys();Zce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),hx=(function(r){Zce(e,r);function e(t){return r.call(this,t)||this}return e})(vr)});var Jce,dx,o3=W(()=>{bi();ys();C0();Jce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),dx=(function(r){Jce(e,r);function e(t){return r.call(this,t)||this}return e.prototype.normalizeName=function(t){var n=(t??"").trim();return n?xu.isActiveVportName(n)?rl:r.prototype.normalizeName.call(this,n):""},e.prototype.getActiveVport=function(){return this.getAt(rl)},e.prototype.getActiveVportBox=function(t,n){var i=this.getActiveVport();return i?.resolveModelViewBox(t,n)},e})(vr)});var Qce,px,a3=W(()=>{ys();Qce=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),px=(function(r){Qce(e,r);function e(t){return r.call(this,t)||this}return e})(vr)});var eue,tue,nue,Tg,s3=W(()=>{mu();eue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),tue=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nue=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Tg=(function(r){eue(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getBtrIdAt=function(t){var n,i;try{for(var o=tue(this._recordsByName),a=o.next();!a.done;a=o.next()){var s=nue(a.value,2),l=s[0],c=s[1];if(c.blockTableRecordId==t)return c}}catch(u){n={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"maxTabOrder",{get:function(){var t=-1;return this._recordsByName.forEach(function(n){n.tabOrder>t&&(t=n.tabOrder)}),t},enumerable:!1,configurable:!0}),e})(Wt)});function Fp(r,e){var t,n,i,o=[],a=[],s=[];try{for(var l=fx(e),c=l.next();!c.done;c=l.next()){var u=c.value;if(u.kind==="modify"){var h=r.getObjectById(u.objectId);h instanceof bt&&o.push(h)}else if(u.kind==="append"){if(u.container.type==="blockTableRecord"){var d=(i=r.tables.blockTable.getEntityById(u.object.objectId))!==null&&i!==void 0?i:u.object instanceof bt?u.object:void 0;d&&a.push(d)}}else u.kind==="remove"&&u.container.type==="blockTableRecord"&&u.object instanceof bt&&s.push(u.object)}}catch(p){t={error:p}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return{modified:o,appended:a,erased:s}}function mx(r,e){var t,n,i,o=[],a=[];try{for(var s=fx(e),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(c.kind!=="append"&&c.kind!=="remove")&&c.container.type==="dictionary"){var u=c.container.key;if(c.kind==="append"){var h=(i=r.getObjectById(c.object.objectId))!==null&&i!==void 0?i:c.object;o.push({object:h,key:u})}else c.kind==="remove"&&a.push({object:c.object,key:u})}}}catch(d){t={error:d}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return{set:o,erased:a}}function y9(r,e){var t,n,i={};try{for(var o=fx(B7),a=o.next();!a.done;a=o.next()){var s=a.value,l=r.getAttrWithoutException(s),c=e.getAttrWithoutException(s);is(l,c)||(i[s]=c)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function l3(r,e,t){var n,i;t===void 0&&(t=!1);var o=[];try{for(var a=fx(e),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.kind==="modify"){var c=r.getObjectById(l.objectId);if(c instanceof aa){var u=l.before,h=l.after;if(!(!u||!h)){var d=t?y9(h,u):y9(u,h);Object.keys(d).length!==0&&o.push({database:r,layer:c,changes:d})}}}}}catch(p){n={error:p}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}var fx,kg,c3=W(()=>{zt();Gn();mg();Ql();fx=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kg=(function(){function r(e){this.database=e}return r.prototype.applyForward=function(e){var t,n;try{for(var i=fx(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.applyChange(a,!0)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},r.prototype.applyInverse=function(e){for(var t=e.length-1;t>=0;t--)this.applyChange(e[t],!1)},r.prototype.applyChange=function(e,t){switch(e.kind){case"modify":this.applyModify(e,t);break;case"append":t?this.applyAppend(e.container,e.object):this.applyRemove(e.container,e.object);break;case"remove":t?this.applyRemove(e.container,e.object):this.applyAppend(e.container,e.object);break;case"sysvar":this.applySysvar(e,t);break}},r.prototype.applyModify=function(e,t){var n=this.database.getObjectById(e.objectId);if(n){var i=t?e.after:e.before;i&&n.restoreFrom(i)}},r.prototype.applySysvar=function(e,t){var n=t?e.after:e.before;n!==void 0&&gt.instance().setVar(e.name,n,this.database)},r.prototype.applyAppend=function(e,t){switch(e.type){case"blockTableRecord":{var n=this.database.tables.blockTable.getIdAt(e.ownerId);n&&n.appendEntity(t);break}case"symbolTable":{var i=this.getSymbolTable(e.tableName);i&&i.add(t);break}case"dictionary":{var o=this.database.getObjectById(e.dictionaryId);o&&o.setAt(e.key,t);break}}},r.prototype.applyRemove=function(e,t){switch(e.type){case"blockTableRecord":{var n=this.database.tables.blockTable.getIdAt(e.ownerId);n&&n.removeEntity(t.objectId);break}case"symbolTable":{var i=this.getSymbolTable(e.tableName);i&&i.removeId(t.objectId);break}case"dictionary":{var o=this.database.getObjectById(e.dictionaryId);o&&o.removeId(t.objectId);break}}},r.prototype.getSymbolTable=function(e){var t=this.database.tables;switch(e){case"appIdTable":return t.appIdTable;case"blockTable":return t.blockTable;case"dimStyleTable":return t.dimStyleTable;case"linetypeTable":return t.linetypeTable;case"textStyleTable":return t.textStyleTable;case"viewTable":return t.viewTable;case"layerTable":return t.layerTable;case"viewportTable":return t.viewportTable;default:return}},r})()});function u3(r,e){if(r.type!==e.type)return!1;switch(r.type){case"blockTableRecord":return e.type==="blockTableRecord"&&r.ownerId===e.ownerId;case"symbolTable":return e.type==="symbolTable"&&r.tableName===e.tableName;case"dictionary":return e.type==="dictionary"&&r.dictionaryId===e.dictionaryId&&r.key===e.key}}var b9=W(()=>{});var v9,Ig,h3=W(()=>{Ql();b9();v9=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ig=(function(){function r(){this.changes=[]}return r.prototype.getChanges=function(){return this.changes},r.prototype.clear=function(){this.changes.length=0},r.prototype.mergeFrom=function(e){var t,n;try{for(var i=v9(e.getChanges()),o=i.next();!o.done;o=i.next()){var a=o.value;this.mergeChange(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},r.prototype.recordModify=function(e){var t=e.objectId,n=this.changes.find(function(i){return i.kind==="modify"&&i.objectId===t});n||this.changes.push({kind:"modify",objectId:t,before:e.clonePreservingIdentity()})},r.prototype.hasModify=function(e){return this.changes.some(function(t){return t.kind==="modify"&&t.objectId===e})},r.prototype.recordAppend=function(e,t){this.recordStructuralChange({kind:"append",container:e,object:t.clonePreservingIdentity()})},r.prototype.recordRemove=function(e,t){this.recordStructuralChange({kind:"remove",container:e,object:t.clonePreservingIdentity()})},r.prototype.recordSysvar=function(e,t){var n=e.toLowerCase(),i=this.changes.find(function(o){return o.kind==="sysvar"&&o.name===n});i||this.changes.push({kind:"sysvar",name:n,before:t})},r.prototype.finalize=function(e){var t,n;try{for(var i=v9(this.changes),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.kind==="modify"){var s=e.getObjectById(a.objectId);s&&(a.after=s.clonePreservingIdentity())}else a.kind==="sysvar"&&(a.after=this.getSysvarValue(e,a.name))}}catch(l){t={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},r.prototype.recordStructuralChange=function(e){var t=e.kind==="append"?"remove":"append",n=this.findStructuralChangeIndex(t,e.container,e.object.objectId);if(n>=0){this.changes.splice(n,1);return}this.changes.push(e)},r.prototype.mergeChange=function(e){if(e.kind==="modify"){var t=this.changes.find(function(n){return n.kind==="modify"&&n.objectId===e.objectId});t||this.changes.push(e);return}if(e.kind==="sysvar"){var t=this.changes.find(function(i){return i.kind==="sysvar"&&i.name===e.name});t||this.changes.push(e);return}this.recordStructuralChange(e)},r.prototype.findStructuralChangeIndex=function(e,t,n){return this.changes.findIndex(function(i){return i.kind===e&&i.object.objectId===n&&u3(i.container,t)})},r.prototype.getSysvarValue=function(e,t){return gt.instance().getVar(t,e)},r})()});var rue,iue,Lh,u2=W(()=>{bL();h3();rue=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iue=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Lh=(function(){function r(){this.openedObjects=new Map,this.originalStates=new Map,this.recorder=new Ig}return r.prototype.getObject=function(e,t,n){n===void 0&&(n=!1);var i=this.openedObjects.get(e);if(i){if(t===sl.kForWrite&&!this.originalStates.has(e)){var o=i.clonePreservingIdentity();this.originalStates.set(e,o),this.recorder.recordModify(i)}return i}var a=this.lookupObject(e,n);if(this.openedObjects.set(e,a),t===sl.kForWrite){var o=a.clonePreservingIdentity();this.originalStates.set(a.objectId,o),this.recorder.recordModify(a)}return a},r.prototype.commit=function(){this.originalStates.clear(),this.openedObjects.clear()},r.prototype.abort=function(){var e,t;try{for(var n=rue(this.originalStates),i=n.next();!i.done;i=n.next()){var o=iue(i.value,2),a=o[0],s=o[1],l=this.openedObjects.get(a);l&&l.restoreFrom(s)}}catch(c){e={error:c}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.originalStates.clear(),this.openedObjects.clear(),this.recorder.clear()},r.prototype.lookupObject=function(e,t){throw new Error("lookupObject(".concat(e,") not implemented"))},r})()});var oue,Lg,d3=W(()=>{u2();oue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Lg=(function(r){oue(e,r);function e(t){var n=r.call(this)||this;return n.database=t,n}return e.prototype.lookupObject=function(t,n){var i=this.database.getObjectById(t,n);if(!i)throw new Error("lookupObject(".concat(t,") not found"));return i},e})(Lh)});var Og,p3=W(()=>{Og=(function(){function r(){this.undoRecords=[],this.redoRecords=[],this.maxDepth=100}return r.prototype.push=function(e){this.undoRecords.push(e),this.redoRecords.length=0,this.undoRecords.length>this.maxDepth&&this.undoRecords.shift()},r.prototype.popUndo=function(){return this.undoRecords.pop()},r.prototype.pushRedo=function(e){this.redoRecords.push(e)},r.prototype.popRedo=function(){return this.redoRecords.pop()},r.prototype.canUndo=function(){return this.undoRecords.length>0},r.prototype.canRedo=function(){return this.redoRecords.length>0},r.prototype.clear=function(){this.undoRecords.length=0,this.redoRecords.length=0},r})()});var gx,Bi,f3,m3,Dg,g3=W(()=>{Ql();c3();d3();p3();gx=function(){return gx=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},gx.apply(this,arguments)},Bi=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},f3=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},m3=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Dg=(function(){function r(e){this.database=e,this.transactionStack=[],this.undoStack=new Og,this.undoMarkStack=[],this._applyingUndoRedo=!1,this._pendingEntityModified=new Set,this._pendingLayerModified=new Map,this.strictMode=!1,this.changeApplier=new kg(e)}return r.prototype.startTransaction=function(){var e=new Lg(this.database);return this.transactionStack.push(e),e},r.prototype.currentTransaction=function(){return this.transactionStack[this.transactionStack.length-1]},r.prototype.hasTransaction=function(){return this.transactionStack.length>0},r.prototype.isRecording=function(){return this.hasTransaction()&&!this._applyingUndoRedo},r.prototype.isApplyingUndoRedo=function(){return this._applyingUndoRedo},r.prototype.isOpenedForWriteInTransaction=function(e){var t,n;try{for(var i=Bi(this.transactionStack),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.recorder.hasModify(e))return!0}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!1},r.prototype.commitTransaction=function(){var e=this.transactionStack.pop();if(!e)throw new Error("No active transaction to commit.");if(this.transactionStack.length>0){var t=this.transactionStack[this.transactionStack.length-1];t.recorder.mergeFrom(e.recorder),e.commit();return}e.recorder.finalize(this.database);var n=e.recorder.getChanges();e.commit(),n.length>0&&(this.dispatchCommitEvents(n),this.enqueueUndoChanges(n))},r.prototype.abortTransaction=function(){var e=this.transactionStack.pop();if(!e)throw new Error("No active transaction to abort.");var t=m3([],f3(e.recorder.getChanges()),!1);this.database.beginEventBatch(),this._applyingUndoRedo=!0;try{e.abort(),t.length>0&&this.changeApplier.applyInverse(t)}finally{this._applyingUndoRedo=!1,this.database.endEventBatch()}},r.prototype.startUndoMark=function(e){this.undoMarkStack.push({label:e,pendingChanges:[]})},r.prototype.endUndoMark=function(){var e=this.undoMarkStack.pop();if(!e)throw new Error("No active undo mark to end.");e.pendingChanges.length!==0&&this.undoStack.push({label:e.label,changes:e.pendingChanges})},r.prototype.cancelUndoMark=function(){this.undoMarkStack.length>0&&this.undoMarkStack.pop()},r.prototype.undo=function(){var e=this.undoStack.popUndo();if(!e)return!1;this.database.beginEventBatch(),this._applyingUndoRedo=!0;try{this.changeApplier.applyInverse(e.changes),this.dispatchUndoRedoEvents(e.changes,!0)}finally{this._applyingUndoRedo=!1,this.database.endEventBatch()}return this.undoStack.pushRedo(e),!0},r.prototype.redo=function(){var e=this.undoStack.popRedo();if(!e)return!1;this.database.beginEventBatch(),this._applyingUndoRedo=!0;try{this.changeApplier.applyForward(e.changes),this.dispatchUndoRedoEvents(e.changes,!1)}finally{this._applyingUndoRedo=!1,this.database.endEventBatch()}return this.undoStack.push(e),!0},r.prototype.canUndo=function(){return this.undoStack.canUndo()},r.prototype.canRedo=function(){return this.undoStack.canRedo()},r.prototype.clearUndoStack=function(){this.undoStack.clear()},r.prototype.recordAppend=function(e,t){var n;this.isRecording()&&((n=this.currentTransaction())===null||n===void 0||n.recorder.recordAppend(e,t))},r.prototype.recordRemove=function(e,t){var n;this.isRecording()&&((n=this.currentTransaction())===null||n===void 0||n.recorder.recordRemove(e,t))},r.prototype.recordSysvar=function(e,t){var n;this.isRecording()&&((n=this.currentTransaction())===null||n===void 0||n.recorder.recordSysvar(e,t))},r.prototype.resolveSymbolTableName=function(e){var t=this.database.tables;return e===t.appIdTable?"appIdTable":e===t.blockTable?"blockTable":e===t.dimStyleTable?"dimStyleTable":e===t.linetypeTable?"linetypeTable":e===t.textStyleTable?"textStyleTable":e===t.viewTable?"viewTable":e===t.layerTable?"layerTable":e===t.viewportTable?"viewportTable":e.objectId},r.prototype.runUndoable=function(e,t){this.startUndoMark(e),this.startTransaction();try{var n=t(this.currentTransaction());return this.commitTransaction(),this.endUndoMark(),n}catch(i){throw this.hasTransaction()&&this.abortTransaction(),this.cancelUndoMark(),i}},r.prototype.enqueueUndoChanges=function(e){var t,n,i=this.undoMarkStack[this.undoMarkStack.length-1];if(i)try{for(var o=Bi(e),a=o.next();!a.done;a=o.next()){var s=a.value;i.pendingChanges.push(s)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},r.prototype.dispatchCommitEvents=function(e){var t,n,i,o,a,s,l,c,u,h,d=Fp(this.database,e),p=d.modified,f=d.appended,m=d.erased;try{for(var g=Bi(p),y=g.next();!y.done;y=g.next()){var b=y.value;this.dispatchEntityModified(b)}}catch(ce){t={error:ce}}finally{try{y&&!y.done&&(n=g.return)&&n.call(g)}finally{if(t)throw t.error}}f.length>0&&this.database.notifyEntityAppended(f),m.length>0&&this.database.notifyEntityErased(m);var v=mx(this.database,e),x=v.set,w=v.erased;try{for(var _=Bi(x),A=_.next();!A.done;A=_.next()){var E=A.value,S=E.object,M=E.key;this.database.notifyDictObjectSet(S,M)}}catch(ce){i={error:ce}}finally{try{A&&!A.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}try{for(var T=Bi(w),L=T.next();!L.done;L=T.next()){var O=L.value,S=O.object,M=O.key;this.database.notifyDictObjectErased(S,M)}}catch(ce){a={error:ce}}finally{try{L&&!L.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}try{for(var D=Bi(e),z=D.next();!z.done;z=D.next()){var N=z.value;N.kind==="sysvar"&&N.after!==void 0&&gt.instance().events.sysVarChanged.dispatch({database:this.database,name:N.name,oldVal:N.before,newVal:N.after})}}catch(ce){l={error:ce}}finally{try{z&&!z.done&&(c=D.return)&&c.call(D)}finally{if(l)throw l.error}}try{for(var J=Bi(l3(this.database,e)),X=J.next();!X.done;X=J.next()){var Q=X.value;this.dispatchLayerModified(Q)}}catch(ce){u={error:ce}}finally{try{X&&!X.done&&(h=J.return)&&h.call(J)}finally{if(u)throw u.error}}},r.prototype.dispatchUndoRedoEvents=function(e,t){var n,i,o,a,s,l,c,u,h,d,p,f,m,g,y,b,v=Fp(this.database,e),x=v.modified,w=v.appended,_=v.erased,A=mx(this.database,e),E=A.set,S=A.erased;if(t){try{for(var M=Bi(x),T=M.next();!T.done;T=M.next()){var L=T.value;this.dispatchEntityModified(L)}}catch(I){n={error:I}}finally{try{T&&!T.done&&(i=M.return)&&i.call(M)}finally{if(n)throw n.error}}_.length>0&&this.database.notifyEntityAppended(_),w.length>0&&this.database.notifyEntityErased(w);try{for(var O=Bi(S),D=O.next();!D.done;D=O.next()){var z=D.value,N=z.object,J=z.key;this.database.notifyDictObjectSet(N,J)}}catch(I){o={error:I}}finally{try{D&&!D.done&&(a=O.return)&&a.call(O)}finally{if(o)throw o.error}}try{for(var X=Bi(E),Q=X.next();!Q.done;Q=X.next()){var ce=Q.value,N=ce.object,J=ce.key;this.database.notifyDictObjectErased(N,J)}}catch(I){s={error:I}}finally{try{Q&&!Q.done&&(l=X.return)&&l.call(X)}finally{if(s)throw s.error}}}else{try{for(var H=Bi(x),de=H.next();!de.done;de=H.next()){var L=de.value;this.dispatchEntityModified(L)}}catch(I){c={error:I}}finally{try{de&&!de.done&&(u=H.return)&&u.call(H)}finally{if(c)throw c.error}}w.length>0&&this.database.notifyEntityAppended(w),_.length>0&&this.database.notifyEntityErased(_);try{for(var Se=Bi(E),te=Se.next();!te.done;te=Se.next()){var ue=te.value,N=ue.object,J=ue.key;this.database.notifyDictObjectSet(N,J)}}catch(I){h={error:I}}finally{try{te&&!te.done&&(d=Se.return)&&d.call(Se)}finally{if(h)throw h.error}}try{for(var ve=Bi(S),se=ve.next();!se.done;se=ve.next()){var we=se.value,N=we.object,J=we.key;this.database.notifyDictObjectErased(N,J)}}catch(I){p={error:I}}finally{try{se&&!se.done&&(f=ve.return)&&f.call(ve)}finally{if(p)throw p.error}}}try{for(var pe=Bi(e),Ee=pe.next();!Ee.done;Ee=pe.next()){var Oe=Ee.value;if(Oe.kind==="sysvar"){var Pe=t?Oe.after:Oe.before,Xe=t?Oe.before:Oe.after;Xe!==void 0&&gt.instance().events.sysVarChanged.dispatch({database:this.database,name:Oe.name,oldVal:Pe,newVal:Xe})}}}catch(I){m={error:I}}finally{try{Ee&&!Ee.done&&(g=pe.return)&&g.call(pe)}finally{if(m)throw m.error}}try{for(var $=Bi(l3(this.database,e,t)),yt=$.next();!yt.done;yt=$.next()){var C=yt.value;this.dispatchLayerModified(C)}}catch(I){y={error:I}}finally{try{yt&&!yt.done&&(b=$.return)&&b.call($)}finally{if(y)throw y.error}}},r.prototype.dispatchLayerModified=function(e){if(this.database.isEventBatched()){var t=this._pendingLayerModified.get(e.layer.objectId);if(t){t.changes=gx(gx({},t.changes),e.changes);return}this._pendingLayerModified.set(e.layer.objectId,{database:e.database,layer:e.layer,changes:gx({},e.changes)});return}this.database.events.layerModified.dispatch(e)},r.prototype.dispatchEntityModified=function(e){if(this.database.isEventBatched()){this._pendingEntityModified.add(e);return}this.database.events.entityModified.dispatch({database:this.database,entity:e})},r.prototype.flushPendingLayerModifiedEvents=function(){var e,t;if(this._pendingLayerModified.size!==0){var n=m3([],f3(this._pendingLayerModified.values()),!1);this._pendingLayerModified.clear();try{for(var i=Bi(n),o=i.next();!o.done;o=i.next()){var a=o.value;this.database.events.layerModified.dispatch(a)}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}}},r.prototype.flushPendingEntityModifiedEvents=function(){var e,t;if(this._pendingEntityModified.size!==0){var n=m3([],f3(this._pendingEntityModified),!1);this._pendingEntityModified.clear();try{for(var i=Bi(n),o=i.next();!o.done;o=i.next()){var a=o.value;this.database.events.entityModified.dispatch({database:this.database,entity:a})}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}}},r})()});var aue,b3,yx,bx,so,y3,xn,ku,x9=W(()=>{zt();Hm();gr();yL();oO();OO();ul();bi();v0();VO();Op();YO();x0();w0();mu();H0();KA();X0();HA();$A();wu();$O();$l();ZO();JO();A0();QO();mg();e3();M0();n3();P0();r3();i3();o3();C0();tt();jm();Li();a3();NA();Ql();yp();rg();s3();ys();g3();aue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),b3=function(){return b3=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},b3.apply(this,arguments)},yx=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},bx=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},so=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},y3=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},xn=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ku=(function(r){aue(e,r);function e(){var t=r.call(this,{objectId:"0"})||this;return t._classes=[],t._handleRegistry=new Map,t._drawNoPlotLayers=!0,t._drawCircleSides=xg,t._eventBatchDepth=0,t._pendingEntityAppended=[],t._pendingEntityErased=[],t._pendingDictObjectSet=[],t._pendingDictObjectErased=[],t._lastOpenError=null,t.events={dictObjetSet:new wt,dictObjectErased:new wt,entityAppended:new wt,entityModified:new wt,entityErased:new wt,layerAppended:new wt,layerModified:new wt,layerErased:new wt,openProgress:new wt,openFailed:new wt},e._unsavedDrawingSequence+=1,t._dwgname="Drawing".concat(e._unsavedDrawingSequence,".dwg"),t._version=new Br("AC1014"),t._dwgCodePage=void 0,t._angbase=0,t._angdir=0,t._aunits=ar.DecimalDegrees,t._auprec=0,t._lunits=Cn.Decimal,t._luprec=4,t._celtscale=1,t._cecolor=new je,t._celtype=Vn,t._celweight=$r.ByLayer,t._cetransparency=new Mn,t._clayer="0",t._cmlstyle=Lo,t._cmlscale=1,t._cmleaderstyle=Oo,t._hpbackgroundcolor=new je(Be.None),t._hpcolor=t._cecolor.clone(),t._hplayer=".",t._hptransparency=new Mn,t._textstyle=cn,t._dimstyle=cn,t._extents=new De,t._insunits=Ft.Millimeters,t._unitmode=0,t._measurement=1,t._ltscale=1,t._lwdisplay=!1,t._tilemode=!0,t._psltscale=!0,t._cannoscale="1:1",t._annoallvisible=!0,t._pdmode=0,t._pdsize=0,t._osmode=0,t._orthomode=0,t._comparehatch=yh,t._comparercmargin=bh,t._comparetext=vh,t._comparetolerance=xh,t._maxHandle=0,t._tables={appIdTable:new px(t),blockTable:new ix(t),dimStyleTable:new ax(t),linetypeTable:new lx(t),textStyleTable:new cx(t),ucsTable:new ux(t),viewTable:new hx(t),layerTable:new sx(t),viewportTable:new dx(t)},t._objects={dictionary:new Wt(t),dictionaryVar:new Wt(t),group:new Wt(t),imageDefinition:new Wt(t),layerFilter:new Wt(t),layerIndex:new Wt(t),layout:new Tg(t),mleaderStyle:new Wt(t),mlineStyle:new Wt(t),objectContextData:new Wt(t),scale:new Wt(t),sortentsTable:new Wt(t),xrecord:new Wt(t)},t._layerFilters=new tc,t.transactionManager=new Dg(t),t.registerBootstrapHandles(),t}return Object.defineProperty(e.prototype,"tables",{get:function(){return this._tables},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classes",{get:function(){return this._classes},set:function(t){this._classes=t.map(function(n){return b3({},n)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"objects",{get:function(){return this._objects},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layerFilters",{get:function(){return this._layerFilters},set:function(t){this._layerFilters=t??new tc},enumerable:!1,configurable:!0}),e.prototype.getObjectById=function(t,n){return n===void 0&&(n=!1),t===this.objectId?this:this._handleRegistry.get(t)},e.prototype.createExtensionDictionaryFor=function(t){var n=t.extensionDictionary;if(n)return n;var i=new Wt(this);return i.database=this,i.ownerId=t.objectId,this.commitObjectHandle(i),t.extensionDictionary=i.objectId,i.objectId},e.prototype.isUndoRecording=function(){return this.transactionManager.isRecording()},e.prototype.openObject=function(t,n){var i=this.transactionManager.currentTransaction();if(i){var o=i.getObject(t,n);if(o)return o}return this.getObjectById(t)},e.prototype.openObjectForRead=function(t){return this.openObject(t,sl.kForRead)},e.prototype.openObjectForWrite=function(t){return this.openObject(t,sl.kForWrite)},e.prototype.openEntityForRead=function(t){var n=typeof t=="string"?t:t.objectId;return this.openObjectForRead(n)},e.prototype.openEntityForWrite=function(t){var n=typeof t=="string"?t:t.objectId;return this.openObjectForWrite(n)},e.prototype.runDatabaseEdit=function(t,n){if(this.isUndoRecording()){n();return}this.transactionManager.runUndoable(t,n)},e.prototype.getRootDictionaries=function(){return[this.objects.dictionary,this.objects.dictionaryVar,this.objects.group,this.objects.imageDefinition,this.objects.layerFilter,this.objects.layerIndex,this.objects.layout,this.objects.mleaderStyle,this.objects.mlineStyle,this.objects.objectContextData,this.objects.scale,this.objects.sortentsTable,this.objects.xrecord]},e.prototype.beginEventBatch=function(){this._eventBatchDepth++},e.prototype.endEventBatch=function(){this._eventBatchDepth<=0||(this._eventBatchDepth--,this._eventBatchDepth===0&&(this.transactionManager.flushPendingEntityModifiedEvents(),this.transactionManager.flushPendingLayerModifiedEvents(),this.flushEventBatch()))},e.prototype.endEventBatchChunked=function(t,n){return yx(this,void 0,void 0,function(){var i,o,a,s,l,c,u;return bx(this,function(h){switch(h.label){case 0:if(this._eventBatchDepth<=0)return[2];if(this._eventBatchDepth--,this._eventBatchDepth!==0)return[2];if(this.transactionManager.flushPendingEntityModifiedEvents(),this.transactionManager.flushPendingLayerModifiedEvents(),i=this._pendingEntityAppended,this._pendingEntityAppended=[],o=i.length,a=Math.max(1,t),o===0)return this.flushEventBatchRemainder(),[2];s=0,h.label=1;case 1:h.trys.push([1,,6,7]),l=0,h.label=2;case 2:return l<o?(c=Math.min(l+a,o),u=i.slice(l,c),this.events.entityAppended.dispatch({database:this,entity:u}),s=c,n?[4,n(c,o)]:[3,4]):[3,5];case 3:h.sent(),h.label=4;case 4:return l+=a,[3,2];case 5:return[3,7];case 6:return s<o&&this.events.entityAppended.dispatch({database:this,entity:i.slice(s)}),this.flushEventBatchRemainder(),[7];case 7:return[2]}})})},e.prototype.isEventBatched=function(){return this._eventBatchDepth>0},e.prototype.notifyEntityAppended=function(t){var n;if(this.isEventBatched()){var i=Array.isArray(t)?t:[t];(n=this._pendingEntityAppended).push.apply(n,y3([],so(i),!1));return}this.events.entityAppended.dispatch({database:this,entity:t})},e.prototype.notifyEntityErased=function(t){var n;if(this.isEventBatched()){var i=Array.isArray(t)?t:[t];(n=this._pendingEntityErased).push.apply(n,y3([],so(i),!1));return}this.events.entityErased.dispatch({database:this,entity:t})},e.prototype.notifyDictObjectSet=function(t,n){if(this.isEventBatched()){this._pendingDictObjectSet.push({object:t,key:n});return}this.events.dictObjetSet.dispatch({database:this,object:t,key:n})},e.prototype.notifyDictObjectErased=function(t,n){if(this.isEventBatched()){this._pendingDictObjectErased.push({object:t,key:n});return}this.events.dictObjectErased.dispatch({database:this,object:t,key:n})},e.prototype.flushEventBatch=function(){if(this._pendingEntityAppended.length>0){var t=this._pendingEntityAppended;this._pendingEntityAppended=[],this.events.entityAppended.dispatch({database:this,entity:t})}this.flushEventBatchRemainder()},e.prototype.flushEventBatchRemainder=function(){var t,n,i,o;if(this._pendingEntityErased.length>0){var a=this._pendingEntityErased;this._pendingEntityErased=[],this.events.entityErased.dispatch({database:this,entity:a})}if(this._pendingDictObjectSet.length>0){var s=this._pendingDictObjectSet;this._pendingDictObjectSet=[];try{for(var l=xn(s),c=l.next();!c.done;c=l.next()){var u=c.value,h=u.object,d=u.key;this.events.dictObjetSet.dispatch({database:this,object:h,key:d})}}catch(y){t={error:y}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}if(this._pendingDictObjectErased.length>0){var p=this._pendingDictObjectErased;this._pendingDictObjectErased=[];try{for(var f=xn(p),m=f.next();!m.done;m=f.next()){var g=m.value,h=g.object,d=g.key;this.events.dictObjectErased.dispatch({database:this,object:h,key:d})}}catch(y){i={error:y}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}},Object.defineProperty(e.prototype,"formatter",{get:function(){var t;return(t=this._formatter)!==null&&t!==void 0?t:this._formatter=new rx(this)},enumerable:!1,configurable:!0}),e.prototype.generateHandle=function(){return this._maxHandleBig!=null?(this._maxHandleBig+=BigInt(1),this._maxHandleBig.toString(16).toUpperCase()):this._maxHandle>=Number.MAX_SAFE_INTEGER?(this._maxHandleBig=BigInt(this._maxHandle),this.generateHandle()):(this._maxHandle++,this._maxHandle.toString(16).toUpperCase())},e.prototype.generateUniqueHandle=function(){for(var t=this.generateHandle();this.isHandleTaken(t);)t=this.generateHandle();return t},e.prototype.initializeHandleSeed=function(t){var n=BigInt("0x"+t);if(!(n<=BigInt(0))){var i=n-BigInt(1);if(i<=BigInt(Number.MAX_SAFE_INTEGER)){if(this._maxHandleBig==null){var o=Number(i);o>this._maxHandle&&(this._maxHandle=o)}return}(this._maxHandleBig==null||i>this._maxHandleBig)&&(this._maxHandleBig=i)}},e.prototype.adoptExternalHandle=function(t,n){return this.releaseObjectHandle(t),n&&!n.startsWith(nl)&&!this.isHandleTaken(n)?(t.objectId=n,this.registerObjectHandle(t),this.updateMaxHandle(n),n):this.assignGeneratedHandle(t)},e.prototype.registerObjectHandle=function(t){var n=t.objectId;!n||n.startsWith(nl)||this._handleRegistry.set(n,t)},e.prototype.releaseObjectHandle=function(t){var n=t.objectId;!n||n.startsWith(nl)||this._handleRegistry.get(n)===t&&this._handleRegistry.delete(n)},e.prototype.isHandleTaken=function(t,n){if(!t||t.startsWith(nl))return!1;var i=this._handleRegistry.get(t);return i!==void 0&&i!==n},e.prototype.registerBootstrapHandles=function(){var t,n,i,o;this._handleRegistry.clear(),this.registerObjectHandle(this);try{for(var a=xn([this._tables.blockTable,this._tables.dimStyleTable,this._tables.layerTable,this._tables.linetypeTable,this._tables.appIdTable,this._tables.textStyleTable,this._tables.ucsTable,this._tables.viewTable,this._tables.viewportTable]),s=a.next();!s.done;s=a.next()){var l=s.value;this.registerObjectHandle(l)}}catch(d){t={error:d}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}try{for(var c=xn([this._objects.dictionary,this._objects.dictionaryVar,this._objects.group,this._objects.imageDefinition,this._objects.layerFilter,this._objects.layerIndex,this._objects.layout,this._objects.mleaderStyle,this._objects.mlineStyle,this._objects.objectContextData,this._objects.scale,this._objects.sortentsTable,this._objects.xrecord]),u=c.next();!u.done;u=c.next()){var h=u.value;this.registerObjectHandle(h)}}catch(d){i={error:d}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}},e.prototype.assignGeneratedHandle=function(t){var n,i,o,a,s,l,c=t.objectId;this.releaseObjectHandle(t);var u=this.generateUniqueHandle();if(t.objectId=u,this.registerObjectHandle(t),c&&c!==u){if(this.updateMaxHandle(u),t instanceof rn)try{for(var h=xn(t.newIterator()),d=h.next();!d.done;d=h.next()){var p=d.value;p.getAttrWithoutException("ownerId")===c&&(p.ownerId=u)}}catch(x){n={error:x}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}if(t instanceof vr)try{for(var f=xn(t.newIterator(!0)),m=f.next();!m.done;m=f.next()){var g=m.value;g.getAttrWithoutException("ownerId")===c&&(g.ownerId=u)}}catch(x){o={error:x}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}if(t instanceof Wt)try{for(var y=xn(t.newIterator()),b=y.next();!b.done;b=y.next()){var v=b.value;v.getAttrWithoutException("ownerId")===c&&(v.ownerId=u)}}catch(x){s={error:x}}finally{try{b&&!b.done&&(l=y.return)&&l.call(y)}finally{if(s)throw s.error}}}return u},e.prototype.updateMaxHandle=function(t){this.trackMaxHandle(t)},e.prototype.trackMaxHandle=function(t){if(this._maxHandleBig!=null){if(t.length>=14){var n=BigInt("0x"+t);n>this._maxHandleBig&&(this._maxHandleBig=n)}return}var i=parseInt(t,16);if(!isNaN(i)){if(i>Number.MAX_SAFE_INTEGER){this._maxHandleBig=BigInt("0x"+t);return}i>this._maxHandle&&(this._maxHandle=i)}},e.prototype.commitObjectHandle=function(t,n){var i=t.getAttrWithoutException("objectId"),o=n!=null&&i!=null&&n(i),a=!i||t.isTemp||o;if(a){this.assignGeneratedHandle(t);return}var s=this._handleRegistry.get(i);if(s&&s!==t)if(this.shouldPreserveIncomingHandle(t))this.assignGeneratedHandle(s);else{this.assignGeneratedHandle(t);return}this.registerObjectHandle(t),this.updateMaxHandle(i)},e.prototype.shouldPreserveIncomingHandle=function(t){return!t.isTemp},Object.defineProperty(e.prototype,"currentSpaceId",{get:function(){return this._currentSpace||(this._currentSpace=this._tables.blockTable.modelSpace),this._currentSpace.objectId},set:function(t){var n=this.tables.blockTable.getIdAt(t);if(n==null)throw new Error("[AcDbDatabase] The specified block table record id '".concat(t,"' doesn't exist in the drawing database!"));this._currentSpace=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aunits",{get:function(){return this._aunits},set:function(t){var n=this;this.updateSysVar(oe.AUNITS,this._aunits,t??0,function(i){n._aunits=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"auprec",{get:function(){return this._auprec},set:function(t){var n=this;this.updateSysVar(oe.AUPREC,this._auprec,t??0,function(i){n._auprec=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lunits",{get:function(){return this._lunits},set:function(t){var n=this;this.updateSysVar(oe.LUNITS,this._lunits,t??Cn.Decimal,function(i){n._lunits=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"luprec",{get:function(){return this._luprec},set:function(t){var n=this;this.updateSysVar(oe.LUPREC,this._luprec,t??4,function(i){n._luprec=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},set:function(t){var n=this;this.updateSysVar(oe.ACADVER,this._version,new Br(t),function(i){n._version=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dwgCodePage",{get:function(){return this._dwgCodePage},set:function(t){this._dwgCodePage=t?.trim()?t.trim():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"insunits",{get:function(){return this._insunits},set:function(t){var n=this;this.updateSysVar(oe.INSUNITS,this._insunits,t??4,function(i){n._insunits=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unitmode",{get:function(){return this._unitmode},set:function(t){var n=this;this.updateSysVar(oe.UNITMODE,this._unitmode,t??0,function(i){n._unitmode=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"measurement",{get:function(){return this._measurement},set:function(t){var n=this;this.updateSysVar(oe.MEASUREMENT,this._measurement,t??1,function(i){n._measurement=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ltscale",{get:function(){return this._ltscale},set:function(t){var n=this;this.updateSysVar(oe.LTSCALE,this._ltscale,t??1,function(i){n._ltscale=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cannoscale",{get:function(){return this._cannoscale},set:function(t){this._cannoscale=t||"1:1"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"annoallvisible",{get:function(){return this._annoallvisible},set:function(t){this._annoallvisible=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lwdisplay",{get:function(){return this._lwdisplay},set:function(t){var n=this;this.updateSysVar(oe.LWDISPLAY,this._lwdisplay,t??!1,function(i){n._lwdisplay=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawNoPlotLayers",{get:function(){return this._drawNoPlotLayers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCircleSides",{get:function(){return this._drawCircleSides},set:function(t){this._drawCircleSides=Ke.resolveCircleSides(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dwgname",{get:function(){return this._dwgname},enumerable:!1,configurable:!0}),e.prototype.setDwgName=function(t){var n=this,i=t.trim();i&&this.updateSysVar(oe.DWGNAME,this._dwgname,i,function(o){n._dwgname=o})},Object.defineProperty(e.prototype,"thumbnailImage",{get:function(){return this._thumbnailImage},set:function(t){if(!t||t.length===0){this._thumbnailImage=void 0;return}this._thumbnailImage=t},enumerable:!1,configurable:!0}),e.prototype.isLayerDrawable=function(t){if(this._drawNoPlotLayers)return!0;var n=this.tables.layerTable.getAt(t);return n==null||n.isPlottable},Object.defineProperty(e.prototype,"tilemode",{get:function(){return this._tilemode},set:function(t){this._tilemode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"psltscale",{get:function(){return this._psltscale},set:function(t){this._psltscale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cecolor",{get:function(){return this._cecolor},set:function(t){var n=this;this.updateSysVar(oe.CECOLOR,this._cecolor,t||0,function(i){n._cecolor=i.clone()})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"celtscale",{get:function(){return this._celtscale},set:function(t){var n=this;this.updateSysVar(oe.CELTSCALE,this._celtscale,t??1,function(i){n._celtscale=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"celtype",{get:function(){return this._celtype},set:function(t){var n=this,i=this.normalizeLinetypeName(t??Vn);this.updateSysVar(oe.CELTYPE,this._celtype,i,function(o){n._celtype=o})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"celweight",{get:function(){return this._celweight},set:function(t){var n=this;this.updateSysVar(oe.CELWEIGHT,this._celweight,t??$r.ByLayer,function(i){n._celweight=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cetransparency",{get:function(){return this._cetransparency},set:function(t){var n=this;this.updateSysVar(oe.CETRANSPARENCY,this._cetransparency,t??new Mn,function(i){n._cetransparency=i.clone()})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clayer",{get:function(){return this._clayer},set:function(t){var n=this;this.updateSysVar(oe.CLAYER,this._clayer,t??"0",function(i){n._clayer=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cmlstyle",{get:function(){return this._cmlstyle},set:function(t){var n=this;this.updateSysVar(oe.CMLSTYLE,this._cmlstyle,t??Lo,function(i){n._cmlstyle=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cmlscale",{get:function(){return this._cmlscale},set:function(t){var n=this;this.updateSysVar(oe.CMLSCALE,this._cmlscale,t??1,function(i){n._cmlscale=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cmleaderstyle",{get:function(){return this._cmleaderstyle},set:function(t){var n=this;this.updateSysVar(oe.CMLEADERSTYLE,this._cmleaderstyle,t??Oo,function(i){n._cmleaderstyle=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hpbackgroundcolor",{get:function(){return this._hpbackgroundcolor},set:function(t){var n=this;this.updateSysVar(oe.HPBACKGROUNDCOLOR,this._hpbackgroundcolor,t??new je(Be.None),function(i){n._hpbackgroundcolor=i.clone()})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hpcolor",{get:function(){return this._hpcolor},set:function(t){var n=this;this.updateSysVar(oe.HPCOLOR,this._hpcolor,t??this._cecolor,function(i){n._hpcolor=i.clone()})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hplayer",{get:function(){return this._hplayer},set:function(t){var n=this;this.updateSysVar(oe.HPLAYER,this._hplayer,t??".",function(i){n._hplayer=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hptransparency",{get:function(){return this._hptransparency},set:function(t){var n=this;this.updateSysVar(oe.HPTRANSPARENCY,this._hptransparency,t??new Mn,function(i){n._hptransparency=i.clone()})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textstyle",{get:function(){return this._textstyle},set:function(t){var n=this;this.updateSysVar(oe.TEXTSTYLE,this._textstyle,t??cn,function(i){n._textstyle=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimstyle",{get:function(){return this._dimstyle},set:function(t){var n=this;this.updateSysVar(oe.DIMSTYLE,this._dimstyle,t??cn,function(i){n._dimstyle=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angbase",{get:function(){return this._angbase},set:function(t){var n=this;this.updateSysVar(oe.ANGBASE,this._angbase,t??0,function(i){n._angbase=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angdir",{get:function(){return this._angdir},set:function(t){var n=this;this.updateSysVar(oe.ANGDIR,this._angdir,t??0,function(i){n._angdir=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extmax",{get:function(){return this._extents.max},set:function(t){if(t){var n=this._extents.max.clone();this._extents.expandByPoint(t),this._extents.max.equals(n)||this.triggerSysVarChangedEvent(oe.EXTMAX,n,this._extents.max)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extmin",{get:function(){return this._extents.min},set:function(t){if(t){var n=this._extents.min.clone();this._extents.expandByPoint(t),this._extents.min.equals(n)||this.triggerSysVarChangedEvent(oe.EXTMIN,n,this._extents.min)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extents",{get:function(){return this._extents},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pdmode",{get:function(){return this._pdmode},set:function(t){var n=this;this.updateSysVar(oe.PDMODE,this._pdmode,t??0,function(i){n._pdmode=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pdsize",{get:function(){return this._pdsize},set:function(t){var n=this;this.updateSysVar(oe.PDSIZE,this._pdsize,t??0,function(i){n._pdsize=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"osmode",{get:function(){return this._osmode},set:function(t){var n=this;this.updateSysVar(oe.OSMODE,this._osmode,t??0,function(i){n._osmode=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orthomode",{get:function(){return this._orthomode},set:function(t){var n=this;this.updateSysVar(oe.ORTHOMODE,this._orthomode,t??0,function(i){n._orthomode=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comparehatch",{get:function(){return this._comparehatch},set:function(t){var n=this,i=ra("COMPAREHATCH",t??yh,iu,ou);this.updateSysVar(oe.COMPAREHATCH,this._comparehatch,i,function(o){n._comparehatch=o})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comparercmargin",{get:function(){return this._comparercmargin},set:function(t){var n=this,i=ra("COMPARERCMARGIN",t??bh,au,su);this.updateSysVar(oe.COMPARERCMARGIN,this._comparercmargin,i,function(o){n._comparercmargin=o})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comparetext",{get:function(){return this._comparetext},set:function(t){var n=this,i=ra("COMPARETEXT",t??vh,lu,cu);this.updateSysVar(oe.COMPARETEXT,this._comparetext,i,function(o){n._comparetext=o})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comparetolerance",{get:function(){return this._comparetolerance},set:function(t){var n=this,i=ra("COMPARETOLERANCE",t??xh,uu,hu);this.updateSysVar(oe.COMPARETOLERANCE,this._comparetolerance,i,function(o){n._comparetolerance=o})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastOpenError",{get:function(){return this._lastOpenError},enumerable:!1,configurable:!0}),e.prototype.read=function(t,n){return yx(this,arguments,void 0,function(i,o,a){var s,l,c,h,u,h,d,p;return a===void 0&&(a=Ri.DXF),bx(this,function(f){switch(f.label){case 0:if(s=J0.instance.get(a),s==null)throw new Error("Database converter for file type '".concat(a,"' isn't registered and can can't read this file!"));if(typeof i=="string")c=new TextEncoder().encode(i),l=c.buffer.slice(c.byteOffset,c.byteOffset+c.byteLength);else if(i instanceof ArrayBuffer)l=i;else if(ArrayBuffer.isView(i))l=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);else throw h=new nc("AcDbDatabase.read expects a string, ArrayBuffer, or ArrayBufferView","unknown"),this._lastOpenError=h,this.events.openFailed.dispatch({database:this,error:h}),h;this.clear(),this._lastOpenError=null,this._drawNoPlotLayers=(d=o?.drawNoPlotLayers)!==null&&d!==void 0?d:!0,this.drawCircleSides=(p=o?.circleSides)!==null&&p!==void 0?p:xg,o?.fileName&&this.setDwgName(o.fileName),Yv(this),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,s.read(l,this,{minimumChunkSize:o&&o.minimumChunkSize||10,progress:this.createConversionProgressHandler(),timeout:o?.timeout,encoding:o?.encoding,sysVars:o?.sysVars})];case 2:return f.sent(),[3,4];case 3:throw u=f.sent(),h=nc.from(u),this._lastOpenError=h,this.events.openFailed.dispatch({database:this,error:h}),h;case 4:return this._lastOpenError=null,this.ensureDatabaseDefaults(),[2]}})})},e.prototype.createConversionProgressHandler=function(){var t=this;return function(n,i,o,a,s){return yx(t,void 0,void 0,function(){var l,c,u;return bx(this,function(h){return l=a,o==="ERROR"&&s&&(c=nc.fromTask(s),this._lastOpenError=c,l={code:c.code,message:c.message,stage:(u=c.stage)!==null&&u!==void 0?u:i}),this.events.openProgress.dispatch({database:this,percentage:n,stage:"CONVERSION",subStage:i,subStageStatus:o,data:l}),[2]})})}},e.prototype.openUri=function(t,n){return yx(this,void 0,void 0,function(){var i,o,a,s,l,c,u,h,d,p,f,m,g,y,b,v,x,w,_,A;return bx(this,function(E){switch(E.label){case 0:return this.events.openProgress.dispatch({database:this,percentage:0,stage:"FETCH_FILE",subStageStatus:"START"}),[4,fetch(t)];case 1:if(i=E.sent(),!i.ok)throw this.events.openProgress.dispatch({database:this,percentage:100,stage:"FETCH_FILE",subStageStatus:"ERROR"}),new Error("Failed to fetch file '".concat(t,"' with HTTP status code '").concat(i.status,"'!"));if(o=i.headers.get("content-length"),a=o?parseInt(o,10):null,s=0,l=(A=i.body)===null||A===void 0?void 0:A.getReader(),!l)throw new Error("Failed to get response reader");c=[],E.label=2;case 2:return[4,l.read()];case 3:return u=E.sent(),h=u.done,d=u.value,h?[3,4]:(c.push(d),s+=d.length,a!==null&&(p=Math.round(s/a*100),this.events.openProgress.dispatch({database:this,percentage:p,stage:"FETCH_FILE",subStageStatus:"IN-PROGRESS"})),[3,2]);case 4:f=new Uint8Array(s),m=0;try{for(g=xn(c),y=g.next();!y.done;y=g.next())b=y.value,f.set(b,m),m+=b.length}catch(S){w={error:S}}finally{try{y&&!y.done&&(_=g.return)&&_.call(g)}finally{if(w)throw w.error}}return v=this.getFileNameFromUri(t),v&&this.setDwgName(v),x=v.toLowerCase().split(".").pop(),x!=="dwg"?[3,6]:[4,this.read(f.buffer,n,Ri.DWG)];case 5:return E.sent(),[3,10];case 6:return x!=="dxf"?[3,8]:[4,this.read(f.buffer,n,Ri.DXF)];case 7:return E.sent(),[3,10];case 8:return[4,this.read(f.buffer,n,x)];case 9:E.sent(),E.label=10;case 10:return this.events.openProgress.dispatch({database:this,percentage:100,stage:"FETCH_FILE",subStageStatus:"END"}),[2]}})})},e.prototype.dxfOut=function(t,n,i,o){var a,s;n===void 0&&(n=16),i===void 0&&(i=this.version.name),o===void 0&&(o=!1),this.ensureDatabaseDefaults(),this._layerFilters.root.getNestedFilters().length>0&&!this.tables.layerTable.extensionDictionary&&(this.tables.layerTable.extensionDictionary=this.generateHandle());var l=typeof o=="boolean"?{saveThumbnailImage:o,format:"ascii"}:{saveThumbnailImage:(a=o.saveThumbnailImage)!==null&&a!==void 0?a:!1,format:(s=o.format)!==null&&s!==void 0?s:"ascii"},c=i instanceof Br?i:new Br(i),u=new el({database:this,precision:n,version:c,outputFormat:l.format});return this.writeDxfHeaderSection(u),this.writeDxfClassesSection(u),this.writeDxfTablesSection(u,c),this.writeDxfBlocksSection(u),this.writeDxfEntitiesSection(u),this.writeDxfObjectsSection(u),this.writeDxfThumbnailImageSection(u,l.saveThumbnailImage),u.writeStart("EOF"),l.format==="binary"?u.toBinary():u.toString()},e.prototype.regen=function(){return yx(this,void 0,void 0,function(){var t;return bx(this,function(n){switch(n.label){case 0:return t=new S0(this),[4,t.read(null,this,{minimumChunkSize:500,progress:this.createConversionProgressHandler()})];case 1:return n.sent(),[2]}})})},e.prototype.createDefaultData=function(t){t===void 0&&(t={layer:!0,lineType:!0,textStyle:!0,dimStyle:!0,layout:!0});var n=new Bp(this);t.layer&&n.createDefaultLayer(),t.lineType&&n.createDefaultLineType(),t.textStyle&&n.createDefaultTextStyle(),t.dimStyle&&n.createDefaultDimStyle(),t.layout&&n.createDefaultLayout()},e.prototype.ensureEntityStyleDefaults=function(t){var n;if(t.dxfTypeName==="MLINE"){this.ensureMLineStyle(this._cmlstyle||Lo);return}if(t.dxfTypeName==="MULTILEADER"){this.ensureMLeaderStyle(this._cmleaderstyle||Oo);return}if(t.dxfTypeName==="HATCH"){var i=t;(n=i.applyPatternDefaultsFromSysVars)===null||n===void 0||n.call(i,this)}},e.prototype.ensureTextStyleDefaults=function(){this.hasDefaultTextStyle()||this.tables.textStyleTable.add(new vu({name:cn,standardFlag:0,fixedTextHeight:0,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:.2,font:"SimKai",bigFont:"",extendedFont:"SimKai"}))},e.prototype.hasDefaultTextStyle=function(){var t,n,i,o,a=[cn,"STANDARD"];try{for(var s=xn(a),l=s.next();!l.done;l=s.next()){var c=l.value;if(this.tables.textStyleTable.has(c))return!0}}catch(p){t={error:p}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}try{for(var u=xn(this.tables.textStyleTable.newIterator()),h=u.next();!h.done;h=u.next()){var d=h.value;if(d.name.toUpperCase()===cn.toUpperCase())return!0}}catch(p){i={error:p}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return!1},e.prototype.ensureDatabaseDefaults=function(){if(!this.tables.layerTable.has("0")){var t=new je;t.colorIndex=7,this.tables.layerTable.add(new aa({name:"0",standardFlags:0,linetype:ka,lineWeight:0,isOff:!1,color:t,isPlottable:!0}))}if(this.tables.linetypeTable.has(eo)||this.tables.linetypeTable.add(new La({name:eo,standardFlag:0,description:"",totalPatternLength:0})),this.tables.linetypeTable.has(Vn)||this.tables.linetypeTable.add(new La({name:Vn,standardFlag:0,description:"",totalPatternLength:0})),this.tables.linetypeTable.has(ka)||this.tables.linetypeTable.add(new La({name:ka,standardFlag:0,description:"Solid line",totalPatternLength:0})),this.ensureTextStyleDefaults(),this.tables.dimStyleTable.has(cn)||this.tables.dimStyleTable.add(new ri({name:cn,dimtxsty:cn})),!this.tables.viewportTable.has(rl)){var n=new xu;n.name=rl,this.tables.viewportTable.add(n)}this.ensureMLineStyle(this._cmlstyle||Lo),this.ensureMLeaderStyle(this._cmleaderstyle||Oo);var i=this.tables.blockTable.modelSpace;if(!this.objects.layout.getAt("Model")){var o=new ia;o.layoutName="Model",o.tabOrder=0,o.blockTableRecordId=i.objectId,o.limits.min.copy({x:0,y:0}),o.limits.max.copy({x:1e6,y:1e6}),o.extents.min.copy({x:0,y:0,z:0}),o.extents.max.copy({x:1e6,y:1e6,z:0}),this.objects.layout.setAt(o.layoutName,o),i.layoutId=o.objectId}this.tables.appIdTable.has(Xm)||this.tables.appIdTable.add(new Th(Xm)),this.tables.appIdTable.has(Wm)||this.tables.appIdTable.add(new Th(Wm))},e.prototype.ensureMLineStyle=function(t){var n,i,o,a=this.objects.mlineStyle,s=t.trim();if(s&&!a.getAt(s)){try{for(var l=xn(a.entries()),c=l.next();!c.done;c=l.next()){var u=so(c.value,2),h=u[0],d=u[1];if(h?.toUpperCase()===s.toUpperCase()||((o=d.styleName)===null||o===void 0?void 0:o.toUpperCase())===s.toUpperCase())return}}catch(f){n={error:f}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}var p=new Ep;p.styleName=s,p.elements=[{offset:.5,color:new je().setByLayer(),lineType:Vn},{offset:-.5,color:new je().setByLayer(),lineType:Vn}],a.setAt(s,p)}},e.prototype.ensureMLeaderStyle=function(t){var n,i,o=this.objects.mleaderStyle,a=t.trim();if(a&&!o.getAt(a)){try{for(var s=xn(o.entries()),l=s.next();!l.done;l=s.next()){var c=so(l.value,1),u=c[0];if(u?.toUpperCase()===a.toUpperCase())return}}catch(f){n={error:f}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}var h=new Mu;h.unknown1=2,h.maxLeaderSegmentsPoints=2,h.leaderLineColor=new je().setByBlock(),h.textColor=new je().setByBlock(),h.blockColor=new je().setByBlock(),h.alignSpace=4,h.breakSize=3.75,h.enableBlockRotation=!0,h.unknown2=!1;var d=this.tables.linetypeTable.getAt(eo);h.leaderLineTypeId=d?.objectId;var p=this.tables.textStyleTable.getAt(cn);h.textStyleId=p?.objectId,o.setAt(a,h)}},e.prototype.writeDxfHeaderSection=function(t){var n,i;if(t.startSection("HEADER"),t.writeString(9,"$ACADVER"),t.writeString(1,(i=(n=t.version)===null||n===void 0?void 0:n.name)!==null&&i!==void 0?i:this.version.name),t.writeString(9,"$HANDSEED"),t.writeString(5,t.nextHandle.toString(16).toUpperCase()),t.writeString(9,"$DWGCODEPAGE"),t.capabilities.supportsUtf8CodePage)t.writeString(3,"UTF-8");else{var o=this._dwgCodePage,a=o&&!/^utf-?8$/i.test(o)?o:"ANSI_1252";t.writeString(3,a)}t.writeString(9,"$INSUNITS"),t.writeInt16(70,this.insunits),t.writeString(9,"$LUNITS"),t.writeInt16(70,this.lunits),t.writeString(9,"$LUPREC"),t.writeInt16(70,this.luprec),t.writeString(9,"$UNITMODE"),t.writeInt16(70,this.unitmode),t.writeString(9,"$MEASUREMENT"),t.writeInt16(70,this.measurement),t.writeString(9,"$LTSCALE"),t.writeDouble(40,this.ltscale),t.capabilities.supportsLineWeight&&(t.writeString(9,"$LWDISPLAY"),t.writeInt16(70,this.lwdisplay?1:0)),t.writeString(9,"$CELTSCALE"),t.writeDouble(40,this.celtscale),t.capabilities.supportsLineWeight&&(t.writeString(9,"$CELWEIGHT"),t.writeLineWeight(370,this.celweight)),t.writeString(9,"$CECOLOR"),t.writeCmColor(this.cecolor),t.writeString(9,"$TILEMODE"),t.writeInt16(70,this.tilemode?1:0),t.writeString(9,"$PSLTSCALE"),t.writeInt16(70,this.psltscale?1:0),t.writeString(9,"$CLAYER"),t.writeString(8,this.clayer),t.writeString(9,"$CELTYPE"),t.writeString(6,this.celtype),t.capabilities.supportsTransparency&&!this.cetransparency.isInvalid&&(t.writeString(9,"$CETRANSPARENCY"),t.writeTransparency(this.cetransparency)),t.writeString(9,"$CMLSTYLE"),t.writeString(2,this.cmlstyle),t.writeString(9,"$CMLSCALE"),t.writeDouble(40,this.cmlscale),t.writeString(9,"$CMLEADERSTYLE"),t.writeString(2,this.cmleaderstyle),this.hpcolor.colorMethod!==Be.None&&(t.writeString(9,"$HPCOLOR"),t.writeCmColor(this.hpcolor,2)),this.hpbackgroundcolor.colorMethod!==Be.None&&(t.writeString(9,"$HPBACKGROUNDCOLOR"),t.writeCmColor(this.hpbackgroundcolor,2)),t.writeString(9,"$HPLAYER"),t.writeString(8,this.hplayer),t.capabilities.supportsTransparency&&!this.hptransparency.isInvalid&&(t.writeString(9,"$HPTRANSPARENCY"),t.writeTransparency(this.hptransparency)),t.writeString(9,"$TEXTSTYLE"),t.writeString(7,this.textstyle),t.writeString(9,"$DIMSTYLE"),t.writeString(2,this.dimstyle),t.writeString(9,"$ANGBASE"),t.writeAngle(50,this.angbase),t.writeString(9,"$ANGDIR"),t.writeInt16(70,this.angdir),t.writeString(9,"$AUNITS"),t.writeInt16(70,this.aunits),t.writeString(9,"$AUPREC"),t.writeInt16(70,this.auprec),t.writeString(9,"$EXTMIN"),t.writePoint3d(10,this.extmin),t.writeString(9,"$EXTMAX"),t.writePoint3d(10,this.extmax),t.writeString(9,"$PDMODE"),t.writeInt32(70,this.pdmode),t.writeString(9,"$PDSIZE"),t.writeDouble(40,this.pdsize),t.writeString(9,"$OSMODE"),t.writeInt32(70,this.osmode),t.writeString(9,"$ORTHOMODE"),t.writeInt16(70,this.orthomode),t.endSection()},e.prototype.writeDxfClassesSection=function(t){var n,i;if(!(!t.capabilities.supportsClassesSection||this._classes.length===0)){t.startSection("CLASSES");try{for(var o=xn(this._classes),a=o.next();!a.done;a=o.next()){var s=a.value;t.writeStart("CLASS"),t.writeString(1,s.name),t.writeString(2,s.cppClassName),t.writeString(3,s.appName),t.writeInt32(90,s.proxyFlag),t.writeInt32(91,s.instanceCount),t.writeInt8(280,s.wasProxy?1:0),t.writeInt8(281,s.isEntity?1:0)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}t.endSection()}},e.prototype.writeDxfTablesSection=function(t,n){t.startSection("TABLES"),this.writeDxfTable(t,"VPORT",this.tables.viewportTable,this.tables.viewportTable.newIterator(),"VPORT"),this.writeDxfTable(t,"VIEW",this.tables.viewTable,this.tables.viewTable.newIterator(),"VIEW"),this.writeDxfTable(t,"UCS",this.tables.ucsTable,this.tables.ucsTable.newIterator(),"UCS"),this.writeDxfTable(t,"LTYPE",this.tables.linetypeTable,this.tables.linetypeTable.newIterator(),"LTYPE"),this.writeDxfTable(t,"LAYER",this.tables.layerTable,this.tables.layerTable.newIterator(),"LAYER"),this.writeDxfTable(t,"STYLE",this.tables.textStyleTable,this.tables.textStyleTable.newIterator(!0),"STYLE"),this.writeDxfTable(t,"APPID",this.tables.appIdTable,this.tables.appIdTable.newIterator(),"APPID"),this.writeDxfTable(t,"DIMSTYLE",this.tables.dimStyleTable,this.tables.dimStyleTable.newIterator(),"DIMSTYLE"),n.capabilities.supportsBlockRecordTable&&this.writeDxfTable(t,"BLOCK_RECORD",this.tables.blockTable,this.tables.blockTable.newIterator(),"BLOCK_RECORD"),t.endSection()},e.prototype.writeDxfBlocksSection=function(t){var n,i,o,a;t.startSection("BLOCKS");try{for(var s=xn(this.tables.blockTable.newIterator()),l=s.next();!l.done;l=s.next()){var c=l.value;if(c.dxfOutBlockBegin(t),!c.isModelSapce&&!c.isPaperSapce)try{for(var u=(o=void 0,xn(c.newIterator())),h=u.next();!h.done;h=u.next()){var d=h.value;this.writeDxfEntity(t,d)}}catch(p){o={error:p}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}c.dxfOutBlockEnd(t)}}catch(p){n={error:p}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}t.endSection()},e.prototype.writeDxfEntitiesSection=function(t){var n,i,o,a;t.startSection("ENTITIES");try{for(var s=xn(this.tables.blockTable.newIterator()),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(!c.isModelSapce&&!c.isPaperSapce))try{for(var u=(o=void 0,xn(c.newIterator())),h=u.next();!h.done;h=u.next()){var d=h.value;this.writeDxfEntity(t,d)}}catch(p){o={error:p}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}}}catch(p){n={error:p}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}t.endSection()},e.prototype.writeDxfObjectsSection=function(t){var n,i,o,a,s,l,c,u,h,d,p,f,m,g,y,b,v,x;if(t.capabilities.supportsObjectsSection){t.startSection("OBJECTS");var w=this.objects.dictionary;w.ownerId="0";var _=function(Re){t.writeStart("DICTIONARY"),Re.dxfOut(t,!0)},A=function(Re,Te){w.getAt(Re)!==Te&&w.setAt(Re,Te)},E=function(Re){w.getAt(Re)&&w.remove(Re)};A("ACAD_LAYOUT",this.objects.layout),this.objects.group.numEntries>0?A("ACAD_GROUP",this.objects.group):E("ACAD_GROUP"),this.objects.sortentsTable.numEntries>0?A("ACAD_SORTENTS",this.objects.sortentsTable):E("ACAD_SORTENTS"),this.objects.mleaderStyle.numEntries>0?A("ACAD_MLEADERSTYLE",this.objects.mleaderStyle):E("ACAD_MLEADERSTYLE"),this.objects.mlineStyle.numEntries>0?A("ACAD_MLINESTYLE",this.objects.mlineStyle):E("ACAD_MLINESTYLE"),this.objects.imageDefinition.numEntries>0?A("ISM_RASTER_IMAGE_DICT",this.objects.imageDefinition):E("ISM_RASTER_IMAGE_DICT"),this.objects.xrecord.numEntries>0?A("MLIGHT_XRECORD",this.objects.xrecord):E("MLIGHT_XRECORD"),_(w),_(this.objects.layout),this.objects.group.numEntries>0&&_(this.objects.group),this.objects.sortentsTable.numEntries>0&&_(this.objects.sortentsTable),this.objects.mleaderStyle.numEntries>0&&_(this.objects.mleaderStyle),this.objects.mlineStyle.numEntries>0&&_(this.objects.mlineStyle),this.objects.imageDefinition.numEntries>0&&_(this.objects.imageDefinition),this.objects.xrecord.numEntries>0&&_(this.objects.xrecord);try{for(var S=xn(this.objects.layout.entries()),M=S.next();!M.done;M=S.next()){var T=so(M.value,2),L=T[0],O=T[1];t.writeStart("LAYOUT"),O.dxfOut(t,!0)}}catch(Re){n={error:Re}}finally{try{M&&!M.done&&(i=S.return)&&i.call(S)}finally{if(n)throw n.error}}try{for(var D=xn(this.objects.group.entries()),z=D.next();!z.done;z=D.next()){var N=so(z.value,2),J=N[0],X=N[1];X.name||(X.name=J),t.writeStart("GROUP"),X.dxfOut(t,!0)}}catch(Re){o={error:Re}}finally{try{z&&!z.done&&(a=D.return)&&a.call(D)}finally{if(o)throw o.error}}try{for(var Q=xn(this.objects.sortentsTable.entries()),ce=Q.next();!ce.done;ce=Q.next()){var H=so(ce.value,2),L=H[0],de=H[1];t.writeStart("SORTENTSTABLE"),de.dxfOut(t,!0)}}catch(Re){s={error:Re}}finally{try{ce&&!ce.done&&(l=Q.return)&&l.call(Q)}finally{if(s)throw s.error}}try{for(var Se=xn(this.objects.imageDefinition.entries()),te=Se.next();!te.done;te=Se.next()){var ue=so(te.value,2),L=ue[0],ve=ue[1];t.writeStart("IMAGEDEF"),ve.dxfOut(t,!0)}}catch(Re){c={error:Re}}finally{try{te&&!te.done&&(u=Se.return)&&u.call(Se)}finally{if(c)throw c.error}}try{for(var se=xn(this.objects.layerFilter.entries()),we=se.next();!we.done;we=se.next()){var pe=so(we.value,2),L=pe[0],Ee=pe[1];t.writeStart("LAYER_FILTER"),Ee.dxfOut(t,!0)}}catch(Re){h={error:Re}}finally{try{we&&!we.done&&(d=se.return)&&d.call(se)}finally{if(h)throw h.error}}try{for(var Oe=xn(this.objects.layerIndex.entries()),Pe=Oe.next();!Pe.done;Pe=Oe.next()){var Xe=so(Pe.value,2),L=Xe[0],$=Xe[1];t.writeStart("LAYER_INDEX"),$.dxfOut(t,!0)}}catch(Re){p={error:Re}}finally{try{Pe&&!Pe.done&&(f=Oe.return)&&f.call(Oe)}finally{if(p)throw p.error}}try{for(var yt=xn(this.objects.mleaderStyle.entries()),C=yt.next();!C.done;C=yt.next()){var I=so(C.value,2),L=I[0],B=I[1];t.writeStart("MLEADERSTYLE"),B.dxfOut(t,!0)}}catch(Re){m={error:Re}}finally{try{C&&!C.done&&(g=yt.return)&&g.call(yt)}finally{if(m)throw m.error}}try{for(var K=xn(this.objects.mlineStyle.entries()),q=K.next();!q.done;q=K.next()){var F=so(q.value,2),L=F[0],R=F[1];t.writeStart("MLINESTYLE"),R.dxfOut(t,!0)}}catch(Re){y={error:Re}}finally{try{q&&!q.done&&(b=K.return)&&b.call(K)}finally{if(y)throw y.error}}try{for(var ee=xn(this.objects.xrecord.entries()),fe=ee.next();!fe.done;fe=ee.next()){var ge=so(fe.value,2),L=ge[0],ye=ge[1];t.writeStart("XRECORD"),ye.dxfOut(t,!0)}}catch(Re){v={error:Re}}finally{try{fe&&!fe.done&&(x=ee.return)&&x.call(ee)}finally{if(v)throw v.error}}this.writeAcLyLayerFilterObjects(t),t.endSection()}},e.prototype.writeAcLyLayerFilterObjects=function(t){var n,i,o,a,s,l,c,u,h,d,p=this,f,m=F0(this._layerFilters);if(m.nodes.length!==0){var g=[],y=[],b=this.tables.layerTable,v=(f=b.extensionDictionary)!==null&&f!==void 0?f:this.generateHandle();b.extensionDictionary=v;var x=this.generateHandle(),w=this.generateHandle(),_=[],A=[],E=function(pe,Ee,Oe){var Pe,Xe,$=p.generateHandle(),yt;if(pe.children.length>0){var C=p.generateHandle(),I=p.generateHandle(),B=[];try{for(var K=xn(pe.children),q=K.next();!q.done;q=K.next()){var F=q.value;B.push({name:F.key,id:E(F,I,!1)})}}catch(R){Pe={error:R}}finally{try{q&&!q.done&&(Xe=K.return)&&Xe.call(K)}finally{if(Pe)throw Pe.error}}g.push({handle:C,ownerId:$,entries:[{name:Au,id:I}]}),g.push({handle:I,ownerId:C,entries:B}),yt=C}return y.push({handle:$,ownerId:Ee,extensionDictionaryId:yt,data:pe.data}),Oe&&A.push({name:pe.key,id:$}),$};try{for(var S=xn(m.nodes),M=S.next();!M.done;M=S.next()){var T=M.value;_.push({name:T.key,id:E(T,x,!0)})}}catch(pe){n={error:pe}}finally{try{M&&!M.done&&(i=S.return)&&i.call(S)}finally{if(n)throw n.error}}var L=new Map,O=this.getObjectById(v);if(O instanceof Wt)try{for(var D=xn(O.entries()),z=D.next();!z.done;z=D.next()){var N=so(z.value,2),J=N[0],X=N[1];L.set(J,X.objectId)}}catch(pe){o={error:pe}}finally{try{z&&!z.done&&(a=D.return)&&a.call(D)}finally{if(o)throw o.error}}L.set(Au,x),L.set(Pp,w),g.unshift({handle:v,ownerId:b.objectId,entries:Array.from(L,function(pe){var Ee=so(pe,2),Oe=Ee[0],Pe=Ee[1];return{name:Oe,id:Pe}})},{handle:x,ownerId:v,entries:_},{handle:w,ownerId:v,entries:A});try{for(var Q=xn(g),ce=Q.next();!ce.done;ce=Q.next()){var H=ce.value;t.writeStart("DICTIONARY"),t.writeHandle(5,H.handle),t.writeObjectId(330,H.ownerId),t.writeSubclassMarker("AcDbDictionary"),t.writeInt16(280,1),t.writeInt16(281,1);try{for(var de=(c=void 0,xn(H.entries)),Se=de.next();!Se.done;Se=de.next()){var te=Se.value;t.writeString(3,te.name),t.writeObjectId(350,te.id)}}catch(pe){c={error:pe}}finally{try{Se&&!Se.done&&(u=de.return)&&u.call(de)}finally{if(c)throw c.error}}}}catch(pe){s={error:pe}}finally{try{ce&&!ce.done&&(l=Q.return)&&l.call(Q)}finally{if(s)throw s.error}}try{for(var ue=xn(y),ve=ue.next();!ve.done;ve=ue.next()){var se=ve.value,we=new Eu;we.objectId=se.handle,we.ownerId=se.ownerId,se.extensionDictionaryId&&(we.extensionDictionary=se.extensionDictionaryId),we.data=N0(se.data),t.writeStart("XRECORD"),we.dxfOut(t)}}catch(pe){h={error:pe}}finally{try{ve&&!ve.done&&(d=ue.return)&&d.call(ue)}finally{if(h)throw h.error}}}},e.prototype.writeDxfTable=function(t,n,i,o,a){var s,l,c=y3([],so(o),!1);t.startTable(n),i.dxfOut(t);try{for(var u=xn(c),h=u.next();!h.done;h=u.next()){var d=h.value;if(a==="BLOCK_RECORD"&&d instanceof rn){d.dxfOutBlockRecord(t);continue}t.writeStart(a),d.dxfOut(t,!0)}}catch(p){s={error:p}}finally{try{h&&!h.done&&(l=u.return)&&l.call(u)}finally{if(s)throw s.error}}t.endTable()},e.prototype.writeDxfEntity=function(t,n){if(n instanceof Dt&&!t.capabilities.supportsLwPolyline){t.writeStart("POLYLINE"),n.dxfOutAs2dPolyline(t,!0);return}t.writeStart(n.dxfTypeName),n.dxfOut(t,!0)},e.prototype.writeDxfThumbnailImageSection=function(t,n){n===void 0&&(n=!1);var i=this._thumbnailImage;if(!(!n||!i||i.length===0)&&t.capabilities.supportsObjectsSection){var o=127;t.startSection("THUMBNAILIMAGE"),t.writeInt32(90,i.length);for(var a=0;a<i.length;a+=o){var s=i.subarray(a,a+o);t.writeString(310,Xl(s))}t.endSection()}},e.prototype.clear=function(){this.transactionManager.clearUndoStack(),this._classes=[],this._tables.blockTable.removeAll(),this._tables.dimStyleTable.removeAll(),this._tables.linetypeTable.removeAll(),this._tables.textStyleTable.removeAll(),this._tables.ucsTable.removeAll(),this._tables.viewTable.removeAll(),this._tables.layerTable.removeAll(),this._tables.viewportTable.removeAll(),this._tables.appIdTable.removeAll(),this._objects.layout.removeAll(),this._objects.group.removeAll(),this._objects.imageDefinition.removeAll(),this._objects.layerFilter.removeAll(),this._objects.layerIndex.removeAll(),this._objects.mleaderStyle.removeAll(),this._objects.mlineStyle.removeAll(),this._objects.objectContextData.removeAll(),this._objects.scale.removeAll(),this._objects.dictionaryVar.removeAll(),this._objects.sortentsTable.removeAll(),this._objects.xrecord.removeAll(),this._cannoscale="1:1",this._annoallvisible=!0,this._layerFilters=new tc,this._currentSpace=void 0,this._extents.makeEmpty(),this.registerBootstrapHandles()},e.prototype.updateSysVar=function(t,n,i,o){gt.instance().applyVarMutation(t,n,i,this,function(){return o(i)})},e.prototype.normalizeLinetypeName=function(t){var n=t.trim();return n.toUpperCase()==="BYLAYER"?Vn:n.toUpperCase()==="BYBLOCK"?eo:n},e.prototype.triggerSysVarChangedEvent=function(t,n,i){var o=gt.instance(),a=t.toLowerCase(),s=o.getDescriptor(a);s!=null&&o.events.sysVarChanged.dispatch({database:this,name:a,oldVal:n,newVal:i})},e.prototype.getFileNameFromUri=function(t){try{var n=new URL(t),i=n.pathname.split("/");return i[i.length-1]||""}catch(o){return console.error("Invalid URI:",o),""}},e._unsavedDrawingSequence=0,e})(Kt)});var h2,w9=W(()=>{u2();h2=(function(){function r(){this.transactionStack=[]}return r.prototype.startTransaction=function(){var e=new Lh;return this.transactionStack.push(e),e},r.prototype.currentTransaction=function(){return this.transactionStack[this.transactionStack.length-1]},r.prototype.commitTransaction=function(){var e=this.transactionStack.pop();if(!e)throw new Error("No active transaction to commit.");e.commit()},r.prototype.abortTransaction=function(){var e=this.transactionStack.pop();if(!e)throw new Error("No active transaction to abort.");e.abort()},r.prototype.hasTransaction=function(){return this.transactionStack.length>0},r})()});var _9=W(()=>{c3();h3();d3();g3();u2();w9();p3()});var Rg=W(()=>{x9();ZO();$O();$l();FA();OO();JO();A0();jm();zA();QO();mg();e3();M0();a3();NA();ys();Yl();yp();Ql();_9();n3();P0();r3();sO();i3();lO();o3();C0()});var sue,v3,x3,d2,w3,vx,_3=W(()=>{tt();Li();Rg();Fn();Gn();En();dp();sue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),v3=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},x3=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},d2=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},w3=6,vx=(function(r){sue(e,r);function e(){var t=r.call(this)||this;return t._location=new k,t._text="",t._dimensionStyle="",t._normal=new G(0,0,1),t._direction=new G(1,0,0),t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"TOLERANCE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this._location},set:function(t){var n;this._location.set(t.x,t.y,(n=t.z)!==null&&n!==void 0?n:0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimensionStyle",{get:function(){return this._dimensionStyle},set:function(t){this._dimensionStyle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){var n;this._normal.set(t.x,t.y,(n=t.z)!==null&&n!==void 0?n:0),this._normal.lengthSq()>0&&this._normal.normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(t){var n;this._direction.set(t.x,t.y,(n=t.z)!==null&&n!==void 0?n:0),this._direction.lengthSq()>0&&this._direction.normalize()},enumerable:!1,configurable:!0}),e.prototype.setOrientation=function(t,n){return this.normal=t,this.direction=n,this},e.prototype.getBoundingPoints=function(){return this.getBoundingPolyline().slice(0,4)},e.prototype.getBoundingPolyline=function(){var t=this,n=this.resolveFrameLayout(),i=n.width,o=n.rowHeight,a=n.rowCount,s=o/2,l=s-o*a,c=[new k(0,s,0),new k(i,s,0),new k(i,l,0),new k(0,l,0),new k(0,s,0)];return c.map(function(u){return t.toFrameWcs(u.x,u.y)})},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t,n,i=new De;try{for(var o=v3(this.getBoundingPoints()),a=o.next();!a.done;a=o.next()){var s=a.value;i.expandByPoint(s)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i.isEmpty()&&i.expandByPoint(this._location),i},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return[this._location]},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this._location),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){t===ne.Insertion&&o.push(this._location)},e.prototype.transformBy=function(t){var n=this.resolveLocalBasis(),i=this._location.clone(),o=i.clone().add(n.xAxis),a=i.clone().add(n.yAxis);i.applyMatrix4(t),o.applyMatrix4(t),a.applyMatrix4(t);var s=new G(o).sub(i),l=new G(a).sub(i),c=new G().crossVectors(s,l);c.lengthSq()===0?c=this._normal.clone().transformDirection(t):c.normalize();var u=s.clone();return u.lengthSq()===0?u=this._direction.clone().transformDirection(t):u.normalize(),this._location.copy(i),this._normal.copy(c),this._direction.copy(u),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"tolerance",properties:[{name:"text",type:"string",editable:!0,accessor:{get:function(){return t.text},set:function(n){t.text=n}}},{name:"dimensionStyle",type:"string",editable:!0,accessor:{get:function(){return t.dimensionStyle},set:function(n){t.dimensionStyle=n}}},{name:"textHeight",type:"float",editable:!1,accessor:{get:function(){return t.textHeight}}}]},{groupName:"geometry",properties:[{name:"locationX",type:"float",editable:!0,accessor:{get:function(){return t.location.x},set:function(n){t.location.x=n}}},{name:"locationY",type:"float",editable:!0,accessor:{get:function(){return t.location.y},set:function(n){t.location.y=n}}},{name:"locationZ",type:"float",editable:!0,accessor:{get:function(){return t.location.z},set:function(n){t.location.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t,n){var i=this.collectFrameLineSegments(),o=i.map(function(s){var l=x3(s,2),c=l[0],u=l[1];return t.lines([c,u])}),a=this.drawToleranceText(t,n);return o.length>0&&a?t.group(d2(d2([],x3(o),!1),[a],!1)):o.length===1?o[0]:o.length>1?t.group(o):a},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbFcf"),this._dimensionStyle&&t.writeString(3,this._dimensionStyle),t.writePoint3d(10,this._location),t.writeString(1,this._text),this._normal.equals(G.Z_AXIS)||t.writeVector3d(210,this._normal),this._direction.equals(G.X_AXIS)||t.writeVector3d(11,this._direction),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbFcf");for(var n=this.location.x,i=this.location.y,o=this.location.z,a=this.normal.x,s=this.normal.y,l=this.normal.z,c=this.direction.x,u=this.direction.y,h=this.direction.z,d=!1,p=!1;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var f=t.readItem();if(!f)break;var m=Number(f.code),g=Number(f.value);switch(m){case 1:this.text=String(f.value);break;case 3:this.dimensionStyle=String(f.value);break;case 10:n=g;break;case 20:i=g;break;case 30:o=g;break;case 11:c=g,p=!0;break;case 21:u=g,p=!0;break;case 31:h=g,p=!0;break;case 210:a=g,d=!0;break;case 220:s=g,d=!0;break;case 230:l=g,d=!0;break;default:break}}return this.location={x:n,y:i,z:o},d&&(this.normal={x:a,y:s,z:l}),p&&(this.direction={x:c,y:u,z:h}),this},Object.defineProperty(e.prototype,"textHeight",{get:function(){var t,n,i=this.resolveDimensionStyle(),o=(t=i?.dimtxt)!==null&&t!==void 0?t:ri.DEFAULT_DIM_VALUES.dimtxt,a=(n=i?.dimscale)!==null&&n!==void 0?n:ri.DEFAULT_DIM_VALUES.dimscale;return o*a},enumerable:!1,configurable:!0}),e.prototype.drawToleranceText=function(t,n){var i,o=this.parseToleranceFrame(this._text);if(o.length!==0){for(var a=this.resolveFrameLayout(o),s=this.getTextStyle(),l=[],c=0;c<o.length;c++)for(var u=o[c],h=a.cellPadding,d=-a.rowHeight*c,p=0;p<u.cells.length;p++){var f=u.cells[p],m=(i=a.columnWidths[p])!==null&&i!==void 0?i:this.textHeight;if(f.trim()){var g=this.toFrameWcs(h+m/2,d),y={text:f,height:this.textHeight,width:1/0,position:g,directionVector:this._direction,attachmentPoint:ut.MiddleCenter,drawingDirection:Cr.LEFT_TO_RIGHT};l.push(t.mtext(y,s,n))}h+=m+a.columnGap}if(l.length!==0)return l.length===1?l[0]:t.group(l)}},e.prototype.collectFrameLineSegments=function(){var t,n,i=this.parseToleranceFrame(this._text),o=this.resolveFrameLayout(i),a=o.width,s=o.rowHeight,l=o.rowCount,c=o.columnDivisions;if(a<=0||s<=0||l<=0)return[];var u=s/2,h=u-s*l,d=[],p=function(v,x){d.push([v,x])};p(this.toFrameWcs(0,u),this.toFrameWcs(a,u)),p(this.toFrameWcs(a,u),this.toFrameWcs(a,h)),p(this.toFrameWcs(a,h),this.toFrameWcs(0,h)),p(this.toFrameWcs(0,h),this.toFrameWcs(0,u));try{for(var f=v3(c),m=f.next();!m.done;m=f.next()){var g=m.value;p(this.toFrameWcs(g,u),this.toFrameWcs(g,h))}}catch(v){t={error:v}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}for(var y=1;y<i.length;y++){var b=u-s*y;p(this.toFrameWcs(0,b),this.toFrameWcs(a,b))}return d},e.prototype.toFrameWcs=function(t,n){var i=this.resolveLocalBasis();return this._location.clone().addScaledVector(i.xAxis,t).addScaledVector(i.yAxis,n)},e.prototype.resolveFrameLayout=function(t){var n,i,o,a,s=t??this.parseToleranceFrame(this._text),l=this.textHeight,c=l*2,u=l/2,h=l;if(l<=0||s.length===0)return{width:0,totalHeight:0,rowHeight:0,columnWidths:[],columnDivisions:[],rowCount:0,cellPadding:0,columnGap:0};for(var d=Math.max.apply(Math,d2(d2([],x3(s.map(function(E){return E.cells.length})),!1),[0],!1)),p=[],f=0;f<d;f++){var m=l;try{for(var g=(n=void 0,v3(s)),y=g.next();!y.done;y=g.next()){var b=y.value,v=(o=b.cells[f])!==null&&o!==void 0?o:"";if(v.trim()){var x=f7(v,l);m=Math.max(m,x)}}}catch(E){n={error:E}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(n)throw n.error}}p.push(m)}for(var w=[0],_=u,f=0;f<p.length;f++)_+=p[f],_+=h,w.push(_-u);var A=(a=w[w.length-1])!==null&&a!==void 0?a:0;return{width:A,totalHeight:c*s.length,rowHeight:c,columnWidths:p,columnDivisions:w,rowCount:s.length,cellPadding:u,columnGap:h}},e.prototype.parseToleranceFrame=function(t){var n=this;if(!t)return[];var i=this.splitToleranceRows(t);if(i.length===0)return[];if(!t.includes("%%v"))return i.map(function(c){return{cells:n.parsePipeSeparatedCells(c)}});var o=i.map(function(c){for(var u=n.splitToleranceTokens(c,"%%v"),h=u.slice(0,w3);h.length<w3;)h.push("");return h}),a=[0,1];o.some(function(c){var u;return(u=c[2])===null||u===void 0?void 0:u.trim()})&&a.push(2);for(var s=function(c){o.some(function(u){var h;return(h=u[c])===null||h===void 0?void 0:h.trim()})&&a.push(c)},l=3;l<w3;l++)s(l);return o.map(function(c){return{cells:a.map(function(u){var h;return(h=c[u])!==null&&h!==void 0?h:""})}})},e.prototype.splitToleranceRows=function(t){var n=t.replace(/\^J/g,`
  13. `);return n.split(/\r\n|\r|\n|\\P/i).map(function(i){return i.trim()}).filter(function(i){return i.length>0})},e.prototype.splitToleranceTokens=function(t,n){if(!t)return[];for(var i=[],o="",a=0,s=0;s<t.length;){if(t.startsWith(n,s)&&a===0){i.push(o),o="",s+=n.length;continue}var l=t[s];l==="{"?a++:l==="}"&&(a=Math.max(0,a-1)),o+=l,s++}return i.push(o),i},e.prototype.parsePipeSeparatedCells=function(t){if(!t)return[];var n=this.splitToleranceTokens(t,"|");return n.filter(function(i){return i.length>0})},e.prototype.resolveLocalBasis=function(){var t=this._normal.clone();t.lengthSq()===0?t.set(0,0,1):t.normalize();var n=this._direction.clone();n.lengthSq()===0?n.set(1,0,0):n.normalize();var i=new G().crossVectors(t,n);return i.lengthSq()===0&&(n=G.X_AXIS.clone(),i=new G().crossVectors(t,n)),i.normalize(),n=new G().crossVectors(i,t).normalize(),{xAxis:n,yAxis:i,zAxis:t}},e.prototype.resolveDimensionStyle=function(){var t=this._dimensionStyle.trim(),n=this.tryGetDatabase();if(!(!t||!n))return n.tables.dimStyleTable.getAt(t)},e.prototype.tryGetDatabase=function(){try{return this.database}catch{return}},e.prototype.getTextStyle=function(){var t,n,i=this.resolveDimensionStyle(),o=(n=(t=i?.dimtxsty)!==null&&t!==void 0?t:ri.DEFAULT_DIM_VALUES.dimtxsty)!==null&&n!==void 0?n:"Standard",a=this.database.tables.textStyleTable.resolveAt(o);if(!a)throw new Error("No valid text style found in text style table.");return a.textStyle},e.typeName="Fcf",e})(bt)});function xx(r){var e,t,n=r.getXData(m2);if(!n)return!1;var i=n.toArray();try{for(var o=p2(i),a=o.next();!a.done;a=o.next()){var s=a.value;if(Number(s.code)===1070&&Number(s.value)===1)return!0}}catch(l){e={error:l}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return!1}function wx(r,e){var t,n;if(e){var i=S3(e),o=r.getObjectById(i);if(o instanceof Pu)return o;var a=r.objects.scale,s=a.getAt(e);if(s instanceof Pu)return s;try{for(var l=p2(a.entries()),c=l.next();!c.done;c=l.next()){var u=S9(c.value,2),h=u[1];if(h.scaleName===e)return h}}catch(d){t={error:d}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}}function _x(r){var e,t,n=r.database,i=r.extensionDictionary;if(!n||!i)return[];var o=n.getObjectById(S3(i));if(!(o instanceof Wt))return[];var a=o.getAt("AcDbContextDataManager");if(!(a instanceof Wt))return[];var s=a.getAt("ACDB_ANNOTATIONSCALES");if(!(s instanceof Wt))return[];var l=[];try{for(var c=p2(s.entries()),u=c.next();!u.done;u=c.next()){var h=S9(u.value,2),d=h[1],p=void 0,f=void 0,m=!1;d instanceof Cp?(p=d,f=d.scaleId,m=d.isDefault):f=d.objectId;var g=f?wx(n,f):void 0;g&&l.push({scale:g,contextData:p,isDefault:m})}}catch(y){e={error:y}}finally{try{u&&!u.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}return l}function Sx(r,e){var t;if(!(r>0)||e.length===0)return r;var n=(t=e.find(function(o){return o.isDefault}))!==null&&t!==void 0?t:e[0],i=n.scale.scaleFactor;return i>0?r/i:r}function Ax(r,e){return r>0?r*(e>0?e:1):r}function Mx(r,e,t){var n;if(r.length!==0){if(e){var i=r.find(function(a){return a.scale.scaleName===e});if(i)return i}if(t!=null&&t>0){var o=r.find(function(a){return Math.abs(a.scale.scaleFactor-t)<1e-9});if(o)return o}return(n=r.find(function(a){return a.isDefault}))!==null&&n!==void 0?n:r[0]}}function Px(r){var e,t,n,i,o=r.database,a=r.extensionDictionary;if(!(!o||!a)){var s=o.getObjectById(S3(a));if(s instanceof Wt){var l=s.getAt(f2);if(l){var c;if(l instanceof Eu){var u=(i=(n=l.data)===null||n===void 0?void 0:n.toArray())!==null&&i!==void 0?i:[];try{for(var h=p2(u),d=h.next();!d.done;d=h.next()){var p=d.value;if(Number(p.code)===340){c=String(p.value);break}}}catch(f){e={error:f}}finally{try{d&&!d.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}}else if(l instanceof Pu)return l;return wx(o,c)}}}}function Ex(r,e){return{drawnScaleFactor:e.scale.scaleFactor,drawnScaleName:e.scale.scaleName,supportedScaleFactors:r.map(function(t){return t.scale.scaleFactor}),supportedScaleNames:r.map(function(t){return t.scale.scaleName})}}var p2,S9,S3,f2,m2,g2=W(()=>{mu();qA();ZA();X0();p2=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},S9=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},S3=function(r){return r?r.trim().toUpperCase():""},f2="ASDK_XREC_ANNOTATION_SCALE_INFO",m2="AcadAnnotative"});var lue,Ro,Cx=W(()=>{tt();Li();g2();Fn();Gn();En();dp();lue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Ro=(function(r){lue(e,r);function e(){var t=r.call(this)||this;return t._normal=new G(0,0,1),t._annotationHeight=0,t._columnType=0,t._columnCount=0,t._columnFlowReversed=!1,t._columnAutoHeight=!1,t._columnWidth=0,t._columnGutter=0,t._contents="",t._height=0,t._width=0,t._extentsWidth=0,t._lineSpacingFactor=1,t._lineSpacingStyle=0,t._backgroundFill=!1,t._backgroundFillColor=13158600,t._backgroundFillTransparency=1,t._backgroundScaleFactor=1,t._rotation=0,t._styleName="",t._location=new k,t._attachmentPoint=ut.TopLeft,t._direction=new G(1,0,0),t._drawingDirection=Cr.LEFT_TO_RIGHT,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"MTEXT"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contents",{get:function(){return this._contents},set:function(t){this._contents=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extentsWidth",{get:function(){return this._extentsWidth},set:function(t){this._extentsWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineSpacingFactor",{get:function(){return this._lineSpacingFactor},set:function(t){this._lineSpacingFactor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineSpacingStyle",{get:function(){return this._lineSpacingStyle},set:function(t){this._lineSpacingStyle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundFill",{get:function(){return this._backgroundFill},set:function(t){this._backgroundFill=t,this._backgroundFillColor=13158600},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundFillColor",{get:function(){return this._backgroundFillColor},set:function(t){this._backgroundFillColor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundFillTransparency",{get:function(){return this._backgroundFillTransparency},set:function(t){this._backgroundFillTransparency=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundScaleFactor",{get:function(){return this._backgroundScaleFactor},set:function(t){this._backgroundScaleFactor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleName",{get:function(){return this._styleName},set:function(t){this._styleName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this._location},set:function(t){this._location.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachmentPoint",{get:function(){return this._attachmentPoint},set:function(t){this._attachmentPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(t){this._direction.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawingDirection",{get:function(){return this._drawingDirection},set:function(t){this._drawingDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"annotationHeight",{get:function(){return this._annotationHeight},set:function(t){this._annotationHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnType",{get:function(){return this._columnType},set:function(t){this._columnType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnCount",{get:function(){return this._columnCount},set:function(t){this._columnCount=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnFlowReversed",{get:function(){return this._columnFlowReversed},set:function(t){this._columnFlowReversed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnAutoHeight",{get:function(){return this._columnAutoHeight},set:function(t){this._columnAutoHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnWidth",{get:function(){return this._columnWidth},set:function(t){this._columnWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnGutter",{get:function(){return this._columnGutter},set:function(t){this._columnGutter=t},enumerable:!1,configurable:!0}),e.prototype.resolveAnnotativePresentation=function(){var t,n,i,o=_x(this),a=o.length>0||xx(this),s=this.height,l=this._location,c=this.direction,u=this.attachmentPoint,h=this.width,d=this.extentsWidth,p,f;if(a&&o.length>0){var m=Sx(this.height,o);p=(i=(n=Mx(o,(t=this.database)===null||t===void 0?void 0:t.cannoscale))!==null&&n!==void 0?n:o.find(function(y){return y.isDefault}))!==null&&i!==void 0?i:o[0],s=Ax(m,p.scale.scaleFactor);var g=p.contextData;g&&(l=g.insertionPoint,c=g.direction,u=g.attachmentPoint,g.definedWidth>0&&(h=g.definedWidth),g.extentsWidth>0&&(d=g.extentsWidth)),f=Ex(o,p)}return{height:s,width:h,extentsWidth:d,position:l,direction:c,attachmentPoint:u,preferred:p,annotationScale:f}},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=new De,n=this.resolveAnnotativePresentation(),i=n.extentsWidth>0?n.extentsWidth:n.width>0?n.width:oa(this.contents,n.height),o=RL(this.contents),a=BL(o,n.height,this.lineSpacingFactor,this.lineSpacingStyle);return CA(t,n.position,i,a,n.attachmentPoint,this.rotation,n.direction)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return[this.resolveAnnotativePresentation().position]},e.prototype.subMoveGripPointsAt=function(t,n){var i=this.resolveAnnotativePresentation().preferred,o=i?.contextData;return o?(Tr(t,n,o.insertionPoint),i?.isDefault&&Tr(t,n,this._location),this):(Tr(t,n,this._location),this)},e.prototype.subGetOsnapPoints=function(t,n,i,o){ne.Insertion===t&&o.push(this.resolveAnnotativePresentation().position)},e.prototype.transformBy=function(t){var n=this._location.clone(),i=this._direction.lengthSq()>0?this._direction.clone().normalize():new G(Math.cos(this._rotation),Math.sin(this._rotation),0),o=new G(-i.y,i.x,i.z);o.lengthSq()===0&&o.set(0,1,0),o.normalize();var a=n.clone().add(i),s=n.clone().add(o);n.applyMatrix4(t),a.applyMatrix4(t),s.applyMatrix4(t);var l=new G(a).sub(n),c=new G(s).sub(n),u=l.length(),h=c.length();return this._location.copy(n),u>0&&(this._direction.copy(l).normalize(),this._rotation=Math.atan2(this._direction.y,this._direction.x),this._width*=u,this._extentsWidth>0&&(this._extentsWidth*=u)),h>0&&(this._height*=h),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"text",properties:[{name:"contents",type:"string",editable:!0,accessor:{get:function(){return t.contents},set:function(n){t.contents=n}}},{name:"styleName",type:"string",editable:!0,accessor:{get:function(){return t.styleName},set:function(n){t.styleName=n}}},{name:"attachmentPoint",type:"enum",editable:!0,options:[{label:ut[1],value:1},{label:ut[2],value:2},{label:ut[3],value:3},{label:ut[4],value:4},{label:ut[5],value:5},{label:ut[6],value:6},{label:ut[7],value:7},{label:ut[8],value:8},{label:ut[9],value:9}],accessor:{get:function(){return t.attachmentPoint},set:function(n){t.attachmentPoint=n}}},{name:"drawingDirection",type:"enum",editable:!0,options:[{label:Cr[1],value:1},{label:Cr[2],value:2},{label:Cr[3],value:3},{label:Cr[4],value:4},{label:Cr[5],value:5}],accessor:{get:function(){return t.drawingDirection},set:function(n){t.drawingDirection=n}}},{name:"textHeight",type:"float",editable:!0,accessor:{get:function(){return t.height},set:function(n){t.height=n}}},{name:"rotation",type:"float",editable:!0,accessor:{get:function(){return t.rotation},set:function(n){t.rotation=n}}},{name:"lineSpacingFactor",type:"float",editable:!0,accessor:{get:function(){return t.lineSpacingFactor},set:function(n){t.lineSpacingFactor=n}}},{name:"definedWidth",type:"float",editable:!0,accessor:{get:function(){return t.width},set:function(n){t.width=n}}},{name:"directionX",type:"float",editable:!0,accessor:{get:function(){return t.direction.x},set:function(n){t.direction.x=n}}},{name:"directionY",type:"float",editable:!0,accessor:{get:function(){return t.direction.y},set:function(n){t.direction.y=n}}},{name:"directionZ",type:"float",editable:!0,accessor:{get:function(){return t.direction.z},set:function(n){t.direction.z=n}}}]},{groupName:"geometry",properties:[{name:"locationX",type:"float",editable:!0,accessor:{get:function(){return t.location.x},set:function(n){t.location.x=n}}},{name:"locationY",type:"float",editable:!0,accessor:{get:function(){return t.location.y},set:function(n){t.location.y=n}}},{name:"locationZ",type:"float",editable:!0,accessor:{get:function(){return t.location.z},set:function(n){t.location.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.getTextStyle=function(){var t=this.database.tables.textStyleTable.resolveAt(this.styleName);if(!t)throw new Error("No valid text style found in text style table.");return t.textStyle},e.prototype.subWorldDraw=function(t,n){var i=this.resolveAnnotativePresentation(),o=i.height,a=i.width,s=i.position,l=i.direction,c=i.attachmentPoint,u=i.annotationScale,h={text:this.contents,height:o,width:a,position:s,rotation:this.rotation,directionVector:l,attachmentPoint:c,drawingDirection:this.drawingDirection,lineSpaceFactor:this.lineSpacingFactor,lineSpaceStyle:this.lineSpacingStyle},d=t.mtext(h,this.getTextStyle(),n);if(d&&u){var p=d.userData;p.annotationScale=u}return d},e.prototype.encodeMTextContentsForDxf=function(t){return(t??"").replace(/\r\n|\r|\n/g,"\\P")},e.prototype.dxfOutFields=function(t){var n;return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbMText"),t.writePoint3d(10,this.location),t.writeDouble(40,this.height),t.writeDouble(41,this.width),this.extentsWidth>0&&t.writeDouble(42,this.extentsWidth),t.writeMTextContents(this.encodeMTextContentsForDxf((n=this.contents)!==null&&n!==void 0?n:"")),t.writeString(7,this.styleName),t.writeAngle(50,this.rotation),t.writeVector3d(11,this.direction),t.writeInt16(71,this.attachmentPoint),t.writeInt16(72,this.drawingDirection),t.writeInt16(73,this.lineSpacingStyle),t.writeDouble(44,this.lineSpacingFactor),this.backgroundFill&&(t.writeInt16(90,1),t.writeInt32(63,this.backgroundFillColor),t.writeInt32(441,this.backgroundFillTransparency),t.writeDouble(45,this.backgroundScaleFactor)),this.annotationHeight!==0&&t.writeDouble(46,this.annotationHeight),this.columnType!==0&&(t.writeInt16(75,this.columnType),t.writeInt16(76,this.columnCount),t.writeInt16(78,this.columnFlowReversed?1:0),t.writeInt16(79,this.columnAutoHeight?1:0),t.writeDouble(48,this.columnWidth),t.writeDouble(49,this.columnGutter)),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbMText");for(var n=this.location.x,i=this.location.y,o=this.location.z,a=this.direction.x,s=this.direction.y,l=this.direction.z,c=this.normal.x,u=this.normal.y,h=this.normal.z,d=!1,p=[];!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var f=t.readItem();if(!f)break;var m=Number(f.code),g=Number(f.value);switch(m){case 10:n=g;break;case 20:i=g;break;case 30:o=g;break;case 11:a=g,d=!0;break;case 21:s=g,d=!0;break;case 31:l=g,d=!0;break;case 1:case 3:p.push(String(f.value));break;case 7:this.styleName=String(f.value);break;case 40:this.height=g;break;case 41:this.width=g;break;case 42:g>0&&(this.extentsWidth=g);break;case 43:break;case 44:this.lineSpacingFactor=g;break;case 45:this.backgroundScaleFactor=g;break;case 46:this.annotationHeight=g;break;case 48:this.columnWidth=g;break;case 49:this.columnGutter=g;break;case 50:this.rotation=xe.degToRad(g);break;case 71:this.attachmentPoint=g;break;case 72:this.drawingDirection=g;break;case 73:this.lineSpacingStyle=g;break;case 75:this.columnType=g;break;case 76:this.columnCount=g;break;case 78:this.columnFlowReversed=g!==0;break;case 79:this.columnAutoHeight=g!==0;break;case 90:this.backgroundFill=g!==0;break;case 63:this.backgroundFillColor=g;break;case 441:this.backgroundFillTransparency=g;break;case 101:for(;!t.atEndOfObject&&!t.atEof&&t.readItem(););break;case 210:c=g;break;case 220:u=g;break;case 230:h=g;break;case 100:return t.pushBackItem(f),this.finishMTextDxfIn(p,n,i,o,a,s,l,d,c,u,h),this;default:break}}return this.finishMTextDxfIn(p,n,i,o,a,s,l,d,c,u,h),this},e.prototype.finishMTextDxfIn=function(t,n,i,o,a,s,l,c,u,h,d){t.length>0&&(this.contents=t.join("")),this.location={x:n,y:i,z:o},c&&(this.direction={x:a,y:s,z:l});var p=new G(u,h,d);p.lengthSq()>0&&this.normal.copy(p.normalize())},e.typeName="MText",e})(bt)});var cue,y2,Tx,A3,Np,kx,M3=W(()=>{tt();Rg();Op();Fn();no();En();Di();Cx();ro();ul();dp();cue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),y2=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Tx=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},A3=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.MText=0]="MText",r[r.Fcf=1]="Fcf",r[r.BlockReference=2]="BlockReference",r[r.NoAnnotation=3]="NoAnnotation"})(Np||(Np={}));kx=(function(r){cue(e,r);function e(){var t=r.call(this)||this;return t._isSplined=!1,t._updated=!1,t._hasArrowHead=!1,t._vertices=[],t._dimensionStyle="",t._hasHookLine=!1,t._isHookLineSameDirection=!1,t._annoType=Np.NoAnnotation,t._textHeight=0,t._textWidth=0,t._associatedAnnotation="",t._normal=new G(0,0,1),t._horizontalDirection=new G(1,0,0),t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"LEADER"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSplined",{get:function(){return this._isSplined},set:function(t){this._isSplined=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasArrowHead",{get:function(){return this._hasArrowHead},set:function(t){this._hasArrowHead=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasHookLine",{get:function(){return this._hasHookLine},set:function(t){this._hasHookLine=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHookLineSameDirection",{get:function(){return this._isHookLineSameDirection},set:function(t){this._isHookLineSameDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numVertices",{get:function(){return this._vertices.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertices",{get:function(){return this._vertices.map(function(t){return t.clone()})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimensionStyle",{get:function(){return this._dimensionStyle},set:function(t){this._dimensionStyle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"annoType",{get:function(){return this._annoType},set:function(t){this._annoType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this._textHeight},set:function(t){this._textHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textWidth",{get:function(){return this._textWidth},set:function(t){this._textWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"byBlockColor",{get:function(){return this._byBlockColor},set:function(t){this._byBlockColor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"associatedAnnotation",{get:function(){return this._associatedAnnotation},set:function(t){this._associatedAnnotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalDirection",{get:function(){return this._horizontalDirection},set:function(t){this._horizontalDirection.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetFromBlock",{get:function(){var t;return(t=this._offsetFromBlock)===null||t===void 0?void 0:t.clone()},set:function(t){this._offsetFromBlock=t?new G(t):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetFromAnnotation",{get:function(){var t;return(t=this._offsetFromAnnotation)===null||t===void 0?void 0:t.clone()},set:function(t){this._offsetFromAnnotation=t?new G(t):void 0},enumerable:!1,configurable:!0}),e.prototype.appendVertex=function(t){this._vertices.push(new k().copy(t)),this._updated=!0},e.prototype.setVertexAt=function(t,n){if(t<0||t>=this._vertices.length)throw new Error("The vertex index is out of range!");return this._vertices[t].copy(n),this._updated=!0,this},e.prototype.vertexAt=function(t){if(t<0||t>=this._vertices.length)throw new Error("The vertex index is out of range!");return this._vertices[t].clone()},e.prototype.subGetGripPoints=function(){return this._vertices.map(function(t){return t.clone()})},e.prototype.subMoveGripPointsAt=function(t,n){return fs(t,n,this._vertices),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){if(this.numVertices!==0){if(this.isSplined&&this.splineGeo){switch(t){case ne.EndPoint:o.push(this._vertices[0]),o.push(this._vertices[this.numVertices-1]);break;case ne.Nearest:o.push(this.splineGeo.nearestPoint(n));break;default:break}return}var a=this._vertices;switch(t){case ne.EndPoint:o.push.apply(o,Tx([],y2(a),!1));break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:{for(var s=[],l=0;l<a.length-1;l++){var c=[];Kl(a[l],a[l+1],t,n,c),s.push.apply(s,Tx([],y2(c),!1))}if(t===ne.MidPoint)o.push.apply(o,Tx([],y2(s),!1));else{var u=yr(n,s);u&&o.push(u)}break}default:break}}},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){if(this._isSplined&&this.splineGeo)return this.splineGeo.calculateBoundingBox();var t=new De;return t.setFromPoints(this.collectDrawPoints())},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return this.isSplined&&this.splineGeo?[{kind:"spline",spline:this.splineGeo.clone(),extendable:!1}]:or(this._vertices,!1)},Object.defineProperty(e.prototype,"closed",{get:function(){return!1},set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return 0},enumerable:!1,configurable:!0}),e.prototype.transformBy=function(t){return this._vertices.forEach(function(n){return n.applyMatrix4(t)}),this.transformVector(this._normal,t),this.transformVector(this._horizontalDirection,t),this._offsetFromBlock&&this.transformVector(this._offsetFromBlock,t),this._offsetFromAnnotation&&this.transformVector(this._offsetFromAnnotation,t),this._splineGeo?(this._splineGeo.transform(t),this._updated=!1):this._updated=!0,this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){return t.lines(this.collectDrawPoints(t))},e.prototype.collectDrawPoints=function(t){if(this.isSplined&&this.splineGeo)return this.splineGeo.tessellate(ao(t));var n=this._vertices.map(function(a){return a.clone()});if(n.length>0&&!this._isSplined){var i=n[n.length-1];if(this.shouldDrawHookLine(i)){var o=this.computeHookLineEndPoint(i);o&&n.push(o)}}return n},e.prototype.shouldDrawHookLine=function(t){var n;if(this.resolveHookLineLength(t)<=0)return!1;if(this._hasHookLine)return!0;var i=this.resolveAssociatedMText();if(i&&this.resolveHookSpanFromMText(i,t)>0)return!0;if(this._annoType!==Np.MText)return!1;var o=this.resolveDimensionStyle(),a=(n=o?.dimtad)!==null&&n!==void 0?n:ri.DEFAULT_DIM_VALUES.dimtad;return a!==Ch.Center},e.prototype.computeHookLineEndPoint=function(t){var n=this.resolveHookLineLength(t);if(n<=0)return null;var i=this.resolveHookAxis();return t.clone().addScaledVector(i,n)},e.prototype.resolveHookLineLength=function(t){var n,i,o=this.resolveDimensionStyle(),a=((n=o?.dimgap)!==null&&n!==void 0?n:ri.DEFAULT_DIM_VALUES.dimgap)*((i=o?.dimscale)!==null&&i!==void 0?i:ri.DEFAULT_DIM_VALUES.dimscale),s=this._textWidth+a,l=this.resolveAssociatedMText();if(l){var c=this.resolveHookSpanFromMText(l,t);if(c>0)s=Math.max(s,c);else{var u=this.resolveAnnotationWidth(l);u>0&&(s=Math.max(s,u))}}return s},e.prototype.resolveHookAxis=function(){var t=this._horizontalDirection.clone();t.lengthSq()===0?t.set(1,0,0):t.normalize();var n=this._isHookLineSameDirection?1:-1;return t.multiplyScalar(n),t},e.prototype.resolveHookSpanFromMText=function(t,n){var i,o,a=this.resolveHookAxis(),s=this.resolveMTextLayoutMetrics(t),l=0;try{for(var c=A3(g7(s)),u=c.next();!u.done;u=c.next()){var h=u.value,d=(h.x-n.x)*a.x+(h.y-n.y)*a.y+(h.z-n.z)*a.z;d>l&&(l=d)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return l},e.prototype.resolveAnnotationWidth=function(t){if(t.extentsWidth>0)return t.extentsWidth;var n=EA(t.contents).split(`
  14. `);return Math.max.apply(Math,Tx(Tx([],y2(n.map(function(i){return oa(i.trim(),t.height)})),!1),[0],!1))},e.prototype.resolveMTextLayoutMetrics=function(t){return m7({contents:t.contents,height:t.height,width:t.width,extentsWidth:t.extentsWidth,lineSpacingFactor:t.lineSpacingFactor,lineSpacingStyle:t.lineSpacingStyle,attachmentPoint:t.attachmentPoint,rotation:t.rotation,direction:t.direction,location:t.location})},e.prototype.scoreMTextAssociation=function(t,n){var i=this.resolveMTextLayoutMetrics(t),o=Math.max(t.height*2,1),a=Math.max(t.height,1),s=Math.max(i.height,t.height*4,10);return y7(n,i,{padX:o,padYAbove:a,padYBelow:s})},e.prototype.resolveDimensionStyle=function(){var t,n=(t=this._dimensionStyle)===null||t===void 0?void 0:t.trim(),i=this.tryGetDatabase();if(!(!n||!i))return i.tables.dimStyleTable.getAt(n)},e.prototype.resolveAssociatedMText=function(){var t,n,i=this.tryGetDatabase();if(i){if(this._associatedAnnotation){var o=i.getObjectById(this._associatedAnnotation);if(o instanceof Ro)return o}if(this._vertices.length!==0){var a=this.getAttrWithoutException("ownerId");if(a){var s=i.getObjectById(a);if(s instanceof rn){var l=this._vertices[this._vertices.length-1],c,u=Number.POSITIVE_INFINITY;try{for(var h=A3(s.newIterator()),d=h.next();!d.done;d=h.next()){var p=d.value;if(p instanceof Ro){var f=this.scoreMTextAssociation(p,l);f==null||f>=u||(u=f,c=p)}}}catch(m){t={error:m}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}return c}}}}},e.prototype.tryGetDatabase=function(){try{return this.database}catch{return}},Object.defineProperty(e.prototype,"splineGeo",{get:function(){return this.createSplineIfNeeded(),this._splineGeo},enumerable:!1,configurable:!0}),e.prototype.createSplineIfNeeded=function(){this.isSplined&&this.numVertices>=2&&(this._splineGeo==null||this._updated)&&(this._splineGeo=new mr(this._vertices,"Uniform"),this._updated=!1)},e.prototype.dxfOutFields=function(t){var n,i;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbLeader"),t.writeString(3,this.dimensionStyle),t.writeInt16(71,this.hasArrowHead?1:0),t.writeInt16(72,this.isSplined?1:0),t.writeInt16(73,this.annoType),t.writeInt16(74,this.isHookLineSameDirection?1:0),t.writeInt16(75,this.hasHookLine?1:0),t.writeInt16(76,this.numVertices),this.textHeight!==0&&t.writeDouble(40,this.textHeight),this.textWidth!==0&&t.writeDouble(41,this.textWidth),this.byBlockColor!=null&&t.writeInt16(77,this.byBlockColor),this.associatedAnnotation&&t.writeHandle(340,this.associatedAnnotation);try{for(var o=A3(this.vertices),a=o.next();!a.done;a=o.next()){var s=a.value;t.writePoint3d(10,s)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return t.writeVector3d(210,this.normal),t.writeVector3d(211,this.horizontalDirection),this._offsetFromBlock&&t.writeVector3d(212,this._offsetFromBlock),this._offsetFromAnnotation&&t.writeVector3d(213,this._offsetFromAnnotation),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbLeader"),this._vertices.length=0;for(var i=null,o=this.normal.x,a=this.normal.y,s=this.normal.z,l=this.horizontalDirection.x,c=this.horizontalDirection.y,u=this.horizontalDirection.z,h=0,d=0,p=0,f=0,m=0,g=0,y=!1,b=!1,v=function(){i&&(n.appendVertex(i),i=null)};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var x=t.readItem();if(!x)break;var w=Number(x.code),_=Number(x.value);switch(w){case 3:this.dimensionStyle=String(x.value);break;case 10:v(),i={x:_,y:0,z:0};break;case 20:i&&(i.y=_);break;case 30:i&&(i.z=_);break;case 40:this.textHeight=_;break;case 41:this.textWidth=_;break;case 71:this.hasArrowHead=_!==0;break;case 72:this.isSplined=_!==0;break;case 73:this.annoType=_;break;case 74:this.isHookLineSameDirection=_!==0;break;case 75:this.hasHookLine=_!==0;break;case 76:break;case 77:this.byBlockColor=_;break;case 210:o=_;break;case 220:a=_;break;case 230:s=_;break;case 211:l=_;break;case 221:c=_;break;case 231:u=_;break;case 212:h=_,y=!0;break;case 222:d=_,y=!0;break;case 232:p=_,y=!0;break;case 213:f=_,b=!0;break;case 223:m=_,b=!0;break;case 233:g=_,b=!0;break;case 340:this.associatedAnnotation=String(x.value);break;default:break}}return v(),this.normal={x:o,y:a,z:s},this.horizontalDirection={x:l,y:c,z:u},y&&(this.offsetFromBlock={x:h,y:d,z:p}),b&&(this.offsetFromAnnotation={x:f,y:m,z:g}),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.collectPath2d();return n.length<2?1:Dt.from2dPoints(n,!1).getOffsetSideAtPoint(t)},e.prototype.createOffsetCurve=function(t){return Cu(this.collectPath2d(),!1,t)},e.prototype.collectPath2d=function(){return this.isSplined&&this.splineGeo?this.splineGeo.getPoints(64).map(function(t){return new Z(t.x,t.y)}):this._vertices.map(function(t){return new Z(t.x,t.y)})},e.prototype.transformVector=function(t,n){var i=new k,o=new k(t.x,t.y,t.z);i.applyMatrix4(n),o.applyMatrix4(n),t.set(o.x-i.x,o.y-i.y,o.z-i.z)},e.typeName="Leader",e})(vn)});var uue,A9,M9,Bo,b2=W(()=>{tt();Fn();no();En();uue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),A9=new k,M9=new k,Bo=(function(r){uue(e,r);function e(t,n){var i=r.call(this)||this;return i._geoData=null,i._normal=null,i._thickness=0,t!==void 0&&n!==void 0&&(i._geo=new Yn(t,n)),i}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"LINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_geo",{get:function(){return this._geoData==null&&(this._geoData=new Yn(new k,new k)),this._geoData},set:function(t){this._geoData=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this._geo.startPoint},set:function(t){this._geo.startPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this._geo.endPoint},set:function(t){this._geo.endPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){var t=this._normal;return t==null&&(t=new G(0,0,1),this._normal=t),t},set:function(t){this.normal.copy(t).normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"midPoint",{get:function(){return this._geo.midPoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this._geo.box},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return[{kind:"line",line:this._geo.clone(),extent:"bounded"}]},Object.defineProperty(e.prototype,"closed",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"startX",type:"float",editable:!0,accessor:{get:function(){return t.startPoint.x},set:function(n){t.startPoint.x=n}}},{name:"startY",type:"float",editable:!0,accessor:{get:function(){return t.startPoint.y},set:function(n){t.startPoint.y=n}}},{name:"startZ",type:"float",editable:!0,accessor:{get:function(){return t.startPoint.z},set:function(n){t.startPoint.z=n}}},{name:"endX",type:"float",editable:!0,accessor:{get:function(){return t.endPoint.x},set:function(n){t.endPoint.x=n}}},{name:"endY",type:"float",editable:!0,accessor:{get:function(){return t.endPoint.y},set:function(n){t.endPoint.y=n}}},{name:"endZ",type:"float",editable:!0,accessor:{get:function(){return t.endPoint.z},set:function(n){t.endPoint.z=n}}},{name:"length",type:"float",editable:!1,accessor:{get:function(){return t._geo.length}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push(this.midPoint),t.push(this.startPoint),t.push(this.endPoint),t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){switch(o){case 0:i.transformBy(Ie.makeTranslation(n));break;case 1:i.startPoint.add(n);break;case 2:i.endPoint.add(n);break;default:break}}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=this.startPoint,s=this.endPoint;switch(t){case ne.EndPoint:o.push(a),o.push(s);break;case ne.MidPoint:o.push(this.midPoint);break;case ne.Nearest:{var l=this._geo.project(n);o.push(l)}break;case ne.Perpendicular:{var c=this._geo.perpPoint(n);o.push(c)}break;case ne.Tangent:break;default:break}},e.prototype.transformBy=function(t){return this._geo.transform(t),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=this.startPoint,i=this.endPoint,o=[new k(n.x,n.y,0),new k(i.x,i.y,0)];return t.lines(o)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbLine"),this.thickness!==0&&t.writeDouble(39,this.thickness),t.writePoint3d(10,this.startPoint),t.writePoint3d(11,this.endPoint),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbLine");for(var n=0,i=0,o=0,a=0,s=0,l=0,c=this.thickness,u=0,h=0,d=1;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var p=t.readItem();if(!p)break;var f=Number(p.code),m=Number(p.value);switch(f){case 10:n=m;break;case 20:i=m;break;case 30:o=m;break;case 11:a=m;break;case 21:s=m;break;case 31:l=m;break;case 39:c=m;break;case 210:u=m;break;case 220:h=m;break;case 230:d=m;break;default:break}}return(u!==0||h!==0||d!==1)&&u*u+h*h+d*d>0&&this.normal.set(u,h,d).normalize(),this.thickness=c,A9.set(n,i,o),M9.set(a,s,l),this._geo=new Yn(A9,M9),this},e.prototype.getOffsetCurves=function(t){var n=this._geo.offset(t);return[new e(n.startPoint,n.endPoint)]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.startPoint,i=this.endPoint;return(i.x-n.x)*(t.y-n.y)-(i.y-n.y)*(t.x-n.x)>=0?1:-1},e.typeName="Line",e})(vn)});var hue,E3,Fo,Da,P3,lo,fn,Bg,Ix,due,pue,fue,mue,gue,yue,bue,Lx,C3=W(()=>{tt();Li();bi();k0();Fn();LA();H0();Gn();En();Di();ro();hue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),E3=function(){return E3=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},E3.apply(this,arguments)},Fo=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Da=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},P3=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.InvisibleLeader=0]="InvisibleLeader",r[r.StraightLeader=1]="StraightLeader",r[r.SplineLeader=2]="SplineLeader"})(lo||(lo={}));(function(r){r[r.NoneContent=0]="NoneContent",r[r.BlockContent=1]="BlockContent",r[r.MTextContent=2]="MTextContent",r[r.ToleranceContent=3]="ToleranceContent"})(fn||(fn={}));(function(r){r[r.Horizontal=0]="Horizontal",r[r.Vertical=1]="Vertical"})(Bg||(Bg={}));(function(r){r[r.Unknown=0]="Unknown",r[r.Left=1]="Left",r[r.Right=2]="Right",r[r.Top=3]="Top",r[r.Bottom=4]="Bottom"})(Ix||(Ix={}));due=1,pue=2,fue=4,mue=8,gue=64,yue=128,bue=32768,Lx=(function(r){hue(e,r);function e(){var t=r.call(this)||this;return t._leaders=[],t._leaderLineType=lo.StraightLeader,t._contentType=fn.NoneContent,t._doglegEnabled=!1,t._doglegLength=0,t._doglegVector=new G(1,0,0),t._normal=new G(0,0,1),t._mleaderStyleId="",t._textHeight=2.5,t._textWidth=0,t._textRotation=0,t._textDirection=new G(1,0,0),t._textStyleName="",t._textAttachmentPoint=ut.MiddleLeft,t._textDrawingDirection=Cr.LEFT_TO_RIGHT,t._textLineSpacingFactor=1,t._textAttachmentDirection=Bg.Horizontal,t._arrowheadOverrides=[],t._blockAttributes=[],t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"MULTILEADER"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaders",{get:function(){var t=this;return this._leaders.map(function(n){return t.cloneLeader(n)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfLeaders",{get:function(){return this._leaders.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineType",{get:function(){return this._leaderLineType},set:function(t){this._leaderLineType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this._contentType},set:function(t){this._contentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doglegEnabled",{get:function(){return this._doglegEnabled},set:function(t){this._doglegEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doglegLength",{get:function(){return this._doglegLength},set:function(t){this._doglegLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doglegVector",{get:function(){return this._doglegVector},set:function(t){this._doglegVector.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"landingPoint",{get:function(){return this._landingPoint},set:function(t){this._landingPoint=t?this.createPoint(t):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mleaderStyleId",{get:function(){return this._mleaderStyleId},set:function(t){this._mleaderStyleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},set:function(t){this._version=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderStyleId",{get:function(){return this._leaderStyleId},set:function(t){this._leaderStyleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propertyOverrideFlag",{get:function(){return this._propertyOverrideFlag},set:function(t){this._propertyOverrideFlag=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineColor",{get:function(){return this._leaderLineColor},set:function(t){this._leaderLineColor=t?.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineTypeId",{get:function(){return this._leaderLineTypeId},set:function(t){this._leaderLineTypeId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLineWeight",{get:function(){return this._leaderLineWeight},set:function(t){this._leaderLineWeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"landingEnabled",{get:function(){return this._landingEnabled},set:function(t){this._landingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowheadId",{get:function(){return this._arrowheadId},set:function(t){this._arrowheadId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowheadSize",{get:function(){return this._arrowheadSize},set:function(t){this._arrowheadSize=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textStyleId",{get:function(){return this._textStyleId},set:function(t){this._textStyleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLeftAttachmentType",{get:function(){return this._textLeftAttachmentType},set:function(t){this._textLeftAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textRightAttachmentType",{get:function(){return this._textRightAttachmentType},set:function(t){this._textRightAttachmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAngleType",{get:function(){return this._textAngleType},set:function(t){this._textAngleType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAlignmentType",{get:function(){return this._textAlignmentType},set:function(t){this._textAlignmentType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._textColor},set:function(t){this._textColor=t?.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textFrameEnabled",{get:function(){return this._textFrameEnabled},set:function(t){this._textFrameEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"landingGap",{get:function(){return this._landingGap},set:function(t){this._landingGap=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAttachment",{get:function(){return this._textAttachment},set:function(t){this._textAttachment=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textFlowDirection",{get:function(){return this._textFlowDirection},set:function(t){this._textFlowDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentId",{get:function(){return this._blockContentId},set:function(t){this._blockContentId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentColor",{get:function(){return this._blockContentColor},set:function(t){this._blockContentColor=t?.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentScale",{get:function(){return this._blockContentScale},set:function(t){this._blockContentScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentRotation",{get:function(){return this._blockContentRotation},set:function(t){this._blockContentRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentConnectionType",{get:function(){return this._blockContentConnectionType},set:function(t){this._blockContentConnectionType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"annotativeScaleEnabled",{get:function(){return this._annotativeScaleEnabled},set:function(t){this._annotativeScaleEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowheadOverrides",{get:function(){return this._arrowheadOverrides},set:function(t){this._arrowheadOverrides=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockAttributes",{get:function(){return this._blockAttributes},set:function(t){this._blockAttributes=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textDirectionNegative",{get:function(){return this._textDirectionNegative},set:function(t){this._textDirectionNegative=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAlignInIPE",{get:function(){return this._textAlignInIPE},set:function(t){this._textAlignInIPE=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomTextAttachmentDirection",{get:function(){return this._bottomTextAttachmentDirection},set:function(t){this._bottomTextAttachmentDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topTextAttachmentDirection",{get:function(){return this._topTextAttachmentDirection},set:function(t){this._topTextAttachmentDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contentScale",{get:function(){return this._contentScale},set:function(t){this._contentScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contentBasePosition",{get:function(){return this._contentBasePosition},set:function(t){this._contentBasePosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAnchor",{get:function(){return this._textAnchor},set:function(t){this._textAnchor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLineSpacingStyle",{get:function(){return this._textLineSpacingStyle},set:function(t){this._textLineSpacingStyle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textBackgroundColor",{get:function(){return this._textBackgroundColor},set:function(t){this._textBackgroundColor=t?.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textBackgroundScaleFactor",{get:function(){return this._textBackgroundScaleFactor},set:function(t){this._textBackgroundScaleFactor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textBackgroundTransparency",{get:function(){return this._textBackgroundTransparency},set:function(t){this._textBackgroundTransparency=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textBackgroundColorOn",{get:function(){return this._textBackgroundColorOn},set:function(t){this._textBackgroundColorOn=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textFillOn",{get:function(){return this._textFillOn},set:function(t){this._textFillOn=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColumnType",{get:function(){return this._textColumnType},set:function(t){this._textColumnType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textUseAutoHeight",{get:function(){return this._textUseAutoHeight},set:function(t){this._textUseAutoHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColumnWidth",{get:function(){return this._textColumnWidth},set:function(t){this._textColumnWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColumnGutterWidth",{get:function(){return this._textColumnGutterWidth},set:function(t){this._textColumnGutterWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColumnFlowReversed",{get:function(){return this._textColumnFlowReversed},set:function(t){this._textColumnFlowReversed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColumnHeight",{get:function(){return this._textColumnHeight},set:function(t){this._textColumnHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textUseWordBreak",{get:function(){return this._textUseWordBreak},set:function(t){this._textUseWordBreak=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasMText",{get:function(){return this._hasMText},set:function(t){this._hasMText=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasBlock",{get:function(){return this._hasBlock},set:function(t){this._hasBlock=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"planeOrigin",{get:function(){return this._planeOrigin},set:function(t){this._planeOrigin=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"planeXAxisDirection",{get:function(){return this._planeXAxisDirection},set:function(t){this._planeXAxisDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"planeYAxisDirection",{get:function(){return this._planeYAxisDirection},set:function(t){this._planeYAxisDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"planeNormalReversed",{get:function(){return this._planeNormalReversed},set:function(t){this._planeNormalReversed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderSections",{get:function(){return this.leaders},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContentData",{get:function(){return this.blockContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mtextContent",{get:function(){return this._mtextContent?{text:this._mtextContent.text,anchorPoint:this._mtextContent.anchorPoint.clone()}:void 0},set:function(t){if(!t){this._mtextContent=void 0,this._contentType===fn.MTextContent&&(this._contentType=fn.NoneContent);return}this._mtextContent={text:t.text,anchorPoint:this.createPoint(t.anchorPoint)},this._contentType=fn.MTextContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contents",{get:function(){var t,n;return(n=(t=this._mtextContent)===null||t===void 0?void 0:t.text)!==null&&n!==void 0?n:""},set:function(t){this._mtextContent?this._mtextContent.text=t:this._mtextContent={text:t,anchorPoint:new k},this._contentType=fn.MTextContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLocation",{get:function(){var t;return(t=this._mtextContent)===null||t===void 0?void 0:t.anchorPoint},set:function(t){if(!t){this._mtextContent=void 0;return}this._mtextContent?this._mtextContent.anchorPoint.copy(t):this._mtextContent={text:"",anchorPoint:this.createPoint(t)},this._contentType=fn.MTextContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this._textHeight},set:function(t){this._textHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textWidth",{get:function(){return this._textWidth},set:function(t){this._textWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textRotation",{get:function(){return this._textRotation},set:function(t){this._textRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textDirection",{get:function(){return this._textDirection},set:function(t){this._textDirection.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textStyleName",{get:function(){return this._textStyleName},set:function(t){this._textStyleName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAttachmentPoint",{get:function(){return this._textAttachmentPoint},set:function(t){this._textAttachmentPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textDrawingDirection",{get:function(){return this._textDrawingDirection},set:function(t){this._textDrawingDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLineSpacingFactor",{get:function(){return this._textLineSpacingFactor},set:function(t){this._textLineSpacingFactor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textAttachmentDirection",{get:function(){return this._textAttachmentDirection},set:function(t){this._textAttachmentDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockContent",{get:function(){var t,n,i;return this._blockContent?{blockContentId:this._blockContent.blockContentId,blockHandle:this._blockContent.blockHandle,normal:(t=this._blockContent.normal)===null||t===void 0?void 0:t.clone(),position:(n=this._blockContent.position)===null||n===void 0?void 0:n.clone(),scale:this._blockContent.scale.clone(),rotation:this._blockContent.rotation,color:(i=this._blockContent.color)===null||i===void 0?void 0:i.clone(),transformationMatrix:Da([],Fo(this._blockContent.transformationMatrix),!1)}:void 0},set:function(t){var n,i,o,a;if(!t){this._blockContent=void 0,this._contentType===fn.BlockContent&&(this._contentType=fn.NoneContent);return}this._blockContent={blockContentId:(n=t.blockContentId)!==null&&n!==void 0?n:t.blockHandle,blockHandle:t.blockHandle,normal:t.normal?new G(t.normal):void 0,position:t.position?this.createPoint(t.position):void 0,scale:new G((i=t.scale)!==null&&i!==void 0?i:{x:1,y:1,z:1}),rotation:(o=t.rotation)!==null&&o!==void 0?o:0,color:(a=t.color)===null||a===void 0?void 0:a.clone(),transformationMatrix:t.transformationMatrix?Da([],Fo(t.transformationMatrix),!1):[]},this.blockContentId=this._blockContent.blockContentId,this._contentType=fn.BlockContent},enumerable:!1,configurable:!0}),e.prototype.addLeader=function(t){var n=this,i,o,a;t===void 0&&(t={});var s={lastLeaderLinePoint:t.lastLeaderLinePoint?this.createPoint(t.lastLeaderLinePoint):void 0,lastLeaderLinePointSet:t.lastLeaderLinePointSet,landingPoint:t.landingPoint?this.createPoint(t.landingPoint):void 0,doglegVector:t.doglegVector?new G(t.doglegVector):void 0,doglegVectorSet:t.doglegVectorSet,doglegLength:t.doglegLength,breaks:(o=(i=t.breaks)===null||i===void 0?void 0:i.map(function(l){return{index:l.index,start:n.createPoint(l.start),end:n.createPoint(l.end)}}))!==null&&o!==void 0?o:[],leaderBranchIndex:t.leaderBranchIndex,directionType:t.directionType,leaderLines:[]};return(a=t.leaderLines)===null||a===void 0||a.forEach(function(l){s.leaderLines.push(n.createLeaderLine(l))}),this._leaders.push(s),this._leaders.length-1},e.prototype.removeLeader=function(t){return this.checkLeaderIndex(t),this._leaders.splice(t,1),this},e.prototype.addLeaderLine=function(t,n){return n===void 0&&(n=[]),this.checkLeaderIndex(t),this._leaders[t].leaderLines.push(this.createLeaderLine({vertices:n})),this._leaders[t].leaderLines.length-1},e.prototype.appendVertex=function(t,n,i){return this.getMutableLeaderLine(t,n).vertices.push(this.createPoint(i)),this},e.prototype.setLeaderLineVertices=function(t,n,i){var o=this;return this.getMutableLeaderLine(t,n).vertices=i.map(function(a){return o.createPoint(a)}),this},e.prototype.getLeaderLineVertices=function(t,n){return this.getMutableLeaderLine(t,n).vertices.map(function(i){return i.clone()})},e.prototype.addBreak=function(t,n,i,o){return this.getMutableLeaderLine(t,n).breaks.push({start:this.createPoint(i),end:this.createPoint(o)}),this},e.prototype.setLandingPoint=function(t,n){return this.checkLeaderIndex(t),this._leaders[t].landingPoint=n?this.createPoint(n):void 0,this},e.prototype.setDoglegDirection=function(t,n){return this.checkLeaderIndex(t),this._leaders[t].doglegVector=new G(n),this},e.prototype.setDoglegLength=function(t,n){return this.checkLeaderIndex(t),this._leaders[t].doglegLength=n,this},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this.collectGeometryPoints();return t.length>0?new De().setFromPoints(t):new De},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t=[];return this._leaders.forEach(function(n){n.leaderLines.forEach(function(i){t.push.apply(t,Da([],Fo(or(i.vertices,!1)),!1))})}),t},e.prototype.subGetGripPoints=function(){return this.collectGeometryPoints().map(function(t){return t.clone()})},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){i.moveGeometryGripPointAt(o,n)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=this,s;if(t===ne.Insertion){this.contentBasePosition?o.push(this.contentBasePosition):this._mtextContent?o.push(this._mtextContent.anchorPoint):!((s=this._blockContent)===null||s===void 0)&&s.position&&o.push(this._blockContent.position);return}this._leaders.forEach(function(l){l.leaderLines.forEach(function(c){var u=a.getLeaderLineDrawPoints(l,c);if(u.length!==0)switch(t){case ne.EndPoint:o.push.apply(o,Da([],Fo(u),!1));break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:{for(var h=[],d=0;d<u.length-1;d++){var p=[];Kl(u[d],u[d+1],t,n,p),h.push.apply(h,Da([],Fo(p),!1))}if(t===ne.MidPoint)o.push.apply(o,Da([],Fo(h),!1));else{var f=yr(n,h);f&&o.push(f)}break}default:break}})})},e.prototype.transformBy=function(t){var n=this,i,o,a,s,l,c,u,h;return this._leaders.forEach(function(d){var p,f;(p=d.lastLeaderLinePoint)===null||p===void 0||p.applyMatrix4(t),(f=d.landingPoint)===null||f===void 0||f.applyMatrix4(t),d.doglegVector&&n.transformVector(d.doglegVector,t),d.breaks.forEach(function(m){m.start.applyMatrix4(t),m.end.applyMatrix4(t)}),d.leaderLines.forEach(function(m){m.vertices.forEach(function(g){return g.applyMatrix4(t)}),m.breaks.forEach(function(g){g.start.applyMatrix4(t),g.end.applyMatrix4(t)})})}),(i=this._landingPoint)===null||i===void 0||i.applyMatrix4(t),(o=this.contentBasePosition)===null||o===void 0||o.applyMatrix4(t),this.transformVector(this._doglegVector,t),this.transformVector(this._normal,t),(a=this.textAnchor)===null||a===void 0||a.applyMatrix4(t),(s=this._mtextContent)===null||s===void 0||s.anchorPoint.applyMatrix4(t),this.transformVector(this._textDirection,t),(c=(l=this._blockContent)===null||l===void 0?void 0:l.position)===null||c===void 0||c.applyMatrix4(t),!((u=this._blockContent)===null||u===void 0)&&u.normal&&this.transformVector(this._blockContent.normal,t),this.blockContentScale&&this.transformVector(this.blockContentScale,t),(h=this.planeOrigin)===null||h===void 0||h.applyMatrix4(t),this.planeXAxisDirection&&this.transformVector(this.planeXAxisDirection,t),this.planeYAxisDirection&&this.transformVector(this.planeYAxisDirection,t),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"leader",properties:[{name:"contentType",type:"enum",editable:!0,options:[{label:fn[fn.NoneContent],value:fn.NoneContent},{label:fn[fn.BlockContent],value:fn.BlockContent},{label:fn[fn.MTextContent],value:fn.MTextContent},{label:fn[fn.ToleranceContent],value:fn.ToleranceContent}],accessor:{get:function(){return t.contentType},set:function(n){t.contentType=n}}},{name:"leaderLineType",type:"enum",editable:!0,options:[{label:lo[lo.InvisibleLeader],value:lo.InvisibleLeader},{label:lo[lo.StraightLeader],value:lo.StraightLeader},{label:lo[lo.SplineLeader],value:lo.SplineLeader}],accessor:{get:function(){return t.leaderLineType},set:function(n){t.leaderLineType=n}}},{name:"doglegEnabled",type:"boolean",editable:!0,accessor:{get:function(){return t.doglegEnabled},set:function(n){t.doglegEnabled=n}}},{name:"doglegLength",type:"float",editable:!0,accessor:{get:function(){return t.doglegLength},set:function(n){t.doglegLength=n}}},{name:"leaderCount",type:"int",editable:!1,accessor:{get:function(){return t.numberOfLeaders}}}]},{groupName:"text",properties:[{name:"contents",type:"string",editable:!0,accessor:{get:function(){return t.contents},set:function(n){t.contents=n}}},{name:"textHeight",type:"float",editable:!0,accessor:{get:function(){return t.textHeight},set:function(n){t.textHeight=n}}},{name:"textWidth",type:"float",editable:!0,accessor:{get:function(){return t.textWidth},set:function(n){t.textWidth=n}}},{name:"textStyleName",type:"string",editable:!0,accessor:{get:function(){return t.textStyleName},set:function(n){t.textStyleName=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.resolveEffectiveProperties=function(){if(r.prototype.resolveEffectiveProperties.call(this),!this._mleaderStyleId){var t=this.getDefaultMLeaderStyle();t&&(this._mleaderStyleId=t.objectId)}},e.prototype.subWorldDraw=function(t,n){var i=this,o=[],a=t.subEntityTraits,s=a.color,l=a.lineType,c=a.lineWeight,u=this.getResolvedLeaderLineColor(),h=this.getResolvedLeaderLineStyle(),d=this.getResolvedLeaderLineWeight(),p=this.getResolvedTextColor();this.getResolvedLeaderLineType()!==lo.InvisibleLeader&&(this.applyColorTraits(a,u,s),this.applyLineTraits(a,h,d),this._leaders.forEach(function(b){b.leaderLines.forEach(function(x){var w=i.getLeaderLineDrawPoints(b,x);if(w.length>0){var _=i.drawLeaderLine(t,w);_&&o.push(_)}});var v=i.getDoglegPoints(b);v&&o.push(t.lines(v))}));var f=this.getRenderableMTextContent(),m=!!f&&(this.contentType===fn.MTextContent||this.contentType===fn.NoneContent||this.hasMText===!0);if(m&&f){this.applyColorTraits(a,p,s);var g=this.getResolvedTextHeight(),y={text:f.text,height:g,width:this.getMTextRenderWidth(f.text,g),position:f.anchorPoint,rotation:this.textRotation,directionVector:this.textDirection,attachmentPoint:this.textAttachmentPoint,drawingDirection:this.textDrawingDirection,lineSpaceFactor:this.textLineSpacingFactor,lineSpaceStyle:this.textLineSpacingStyle};o.push(t.mtext(y,this.getTextStyle(),n))}if(a.color=s,a.lineType=l,a.lineWeight=c,o.length!==0)return o.length===1?o[0]:t.group(o)},e.prototype.dxfOutFields=function(t){var n;return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbMLeader"),t.writeInt16(170,this.leaderLineType),t.writeBoolean(290,this.doglegEnabled),t.writeDouble(41,this.doglegLength),t.writeInt16(172,this.contentType),t.writeVector3d(210,this.normal),t.writeHandle(340,this.mleaderStyleId),this._landingPoint&&t.writePoint3d(10,this._landingPoint),t.writeVector3d(11,this.doglegVector),this._mtextContent&&(t.writeString(1,this._mtextContent.text),t.writePoint3d(12,this._mtextContent.anchorPoint),t.writeDouble(40,this.textHeight),t.writeDouble(42,this.textWidth),t.writeAngle(50,this.textRotation),t.writeString(7,this.textStyleName)),this._blockContent&&(t.writeHandle(341,(n=this._blockContent.blockContentId)!==null&&n!==void 0?n:""),this._blockContent.position&&t.writePoint3d(15,this._blockContent.position),t.writeVector3d(16,this._blockContent.scale),t.writeAngle(52,this._blockContent.rotation)),this._leaders.forEach(function(i){i.landingPoint&&t.writePoint3d(110,i.landingPoint),i.doglegVector&&t.writeVector3d(111,i.doglegVector),t.writeDouble(140,i.doglegLength),t.writeInt16(171,i.leaderLines.length),i.leaderLines.forEach(function(o){t.writeInt16(90,o.vertices.length),o.vertices.forEach(function(a){return t.writePoint3d(10,a)})})}),this},e.prototype.dxfInFields=function(t){var n=this,i,o,a,s,l,c,u,h,d,p,f,m,g,y,b,v,x;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbMLeader"),this._leaders.length=0;for(var w=(i=this._mtextContent)===null||i===void 0?void 0:i.text,_=(a=(o=this._mtextContent)===null||o===void 0?void 0:o.anchorPoint)===null||a===void 0?void 0:a.clone(),A=!!this._mtextContent,E=(s=this._blockContent)===null||s===void 0?void 0:s.blockContentId,S=(c=(l=this._blockContent)===null||l===void 0?void 0:l.position)===null||c===void 0?void 0:c.clone(),M=(h=(u=this._blockContent)===null||u===void 0?void 0:u.scale)===null||h===void 0?void 0:h.clone(),T=(d=this._blockContent)===null||d===void 0?void 0:d.rotation,L=(f=(p=this._blockContent)===null||p===void 0?void 0:p.normal)===null||f===void 0?void 0:f.clone(),O=(g=(m=this._blockContent)===null||m===void 0?void 0:m.color)===null||g===void 0?void 0:g.clone(),D=!((y=this._blockContent)===null||y===void 0)&&y.transformationMatrix?Da([],Fo(this._blockContent.transformationMatrix),!1):[],z=!!this._blockContent,N=!1,J=!1,X=!1,Q=(b=this._landingPoint)===null||b===void 0?void 0:b.clone(),ce=this._doglegVector.clone(),H=null,de=null,Se=!1,te,ue=function(){de&&H&&H.leaderLines.push(de),de=null},ve=function(){ue(),H&&n.addLeader(H),H=null};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var se=t.readItem();if(!se)break;var we=Number(se.code),pe=Number(se.value),Ee=String((v=se.value)!==null&&v!==void 0?v:"");switch(we){case 100:return t.pushBackItem(se),ve(),this.finishMLeaderDxfIn(w,_,A,E,S,M,T,L,O,D,z,N,Q,ce,te),this;case 300:if(Ee==="CONTEXT_DATA{"){J=!0;var Oe=this.dxfInContextData(t);Oe.hasArrowheadSize&&(X=!0),Oe.textContent!=null&&(w=Oe.textContent,A=!0),Oe.textAnchor&&(_=Oe.textAnchor,A=!0),Oe.hasMText!=null&&(this.hasMText=Oe.hasMText),Oe.hasBlock!=null&&(this.hasBlock=Oe.hasBlock),Oe.blockContentId&&(E=Oe.blockContentId,z=this.isValidMLeaderHandle(Oe.blockContentId)),Oe.blockPosition&&(S=Oe.blockPosition,z=!0),Oe.blockScale&&(M=Oe.blockScale,z=!0),Oe.blockRotation!=null&&(T=Oe.blockRotation,z=!0),Oe.blockNormal&&(L=Oe.blockNormal,z=!0),Oe.blockColor&&(O=Oe.blockColor,z=!0),Oe.blockMatrix.length>0&&(D=Oe.blockMatrix,z=!0),A&&!N&&(this.contentType=fn.MTextContent,N=!0)}break;case 270:J=!0,this.version=pe;break;case 340:this.leaderStyleId=Ee,this.mleaderStyleId=Ee;break;case 90:Se?(ue(),de={vertices:[],breakPointIndexes:[],breaks:[]}):this.propertyOverrideFlag=pe;break;case 170:this.leaderLineType=pe;break;case 91:this.leaderLineColor=sa(pe);break;case 341:J?this.leaderLineTypeId=Ee:this.isValidMLeaderHandle(Ee)?(E=Ee,z=!0):this.leaderLineTypeId=Ee;break;case 171:Se||(this.leaderLineWeight=pe);break;case 290:J?this.landingEnabled=this.readDxfBoolean(se):this.doglegEnabled=this.readDxfBoolean(se);break;case 291:this.doglegEnabled=this.readDxfBoolean(se);break;case 40:J?this.doglegLength=pe:this.textHeight=pe;break;case 41:this.doglegLength=pe;break;case 342:this.arrowheadId=Ee;break;case 42:J?X||(this.arrowheadSize=pe*((x=this.contentScale)!==null&&x!==void 0?x:1)):this.textWidth=pe;break;case 172:this.contentType=pe,N=!0;break;case 343:this.textStyleId=Ee;break;case 173:this.textLeftAttachmentType=pe;break;case 95:this.textRightAttachmentType=pe;break;case 174:this.textAngleType=pe;break;case 175:this.textAlignmentType=pe;break;case 92:this.textColor=sa(pe);break;case 292:this.textFrameEnabled=this.readDxfBoolean(se);break;case 344:this.isValidMLeaderHandle(Ee)&&(E=Ee,this.blockContentId=Ee,z=!0);break;case 93:this.blockContentColor=sa(pe);break;case 10:if(Se){t.pushBackItem(se);var Pe=t.readPoint3d(10);Pe&&de&&de.vertices.push(Pe)}else{t.pushBackItem(se);var Xe=t.readPoint3d(10);if(!Xe)break;J?(this.blockContentScale=new G(Xe),M=new G(Xe),z=!0):Q=Xe}break;case 43:this.blockContentRotation=pe,T=pe,z=!0;break;case 176:this.blockContentConnectionType=pe;break;case 293:this.annotativeScaleEnabled=this.readDxfBoolean(se);break;case 94:{this.arrowheadOverrides.push({index:pe});break}case 345:{var $=this.arrowheadOverrides[this.arrowheadOverrides.length-1];$?$.handle=Ee:this.arrowheadOverrides.push({index:0,handle:Ee});break}case 330:this.blockAttributes.push({id:Ee});break;case 177:{var yt=this.blockAttributes[this.blockAttributes.length-1];yt&&(yt.index=pe);break}case 44:{var yt=this.blockAttributes[this.blockAttributes.length-1];yt&&(yt.width=pe);break}case 302:{var yt=this.blockAttributes[this.blockAttributes.length-1];yt&&(yt.text=Ee);break}case 294:this.textDirectionNegative=this.readDxfBoolean(se);break;case 178:this.textAlignInIPE=pe;break;case 179:pe!==0&&(this.textAttachmentPoint=pe);break;case 271:this.textAttachmentDirection=pe;break;case 272:this.bottomTextAttachmentDirection=pe;break;case 273:this.topTextAttachmentDirection=pe;break;case 210:t.pushBackItem(se);{var C=t.readVector3d(210);C&&(this.normal=C)}break;case 110:ve(),Se=!0,t.pushBackItem(se);{var I=t.readPoint3d(110);H={landingPoint:I,doglegVector:new G(1,0,0),doglegLength:0,breaks:[],leaderLines:[]}}break;case 111:if(H){t.pushBackItem(se);var B=t.readVector3d(111);B&&(H.doglegVector=B)}break;case 140:H?H.doglegLength=pe:this.arrowheadSize=pe;break;case 1:w=Ee,A=!0;break;case 12:t.pushBackItem(se);{var K=t.readPoint3d(12);K&&(_=K,A=!0)}break;case 7:this.textStyleName=Ee;break;case 50:te=pe;break;case 15:t.pushBackItem(se);{var q=t.readPoint3d(15);q&&(S=q,z=!0)}break;case 16:t.pushBackItem(se);{var F=t.readVector3d(16);F&&(M=F,z=!0)}break;case 52:T=pe*Math.PI/180,z=!0;break;case 11:if(!Se&&!J){t.pushBackItem(se);var B=t.readVector3d(11);B&&(ce=B)}break;default:break}}return ve(),this.finishMLeaderDxfIn(w,_,A,E,S,M,T,L,O,D,z,N,Q,ce,te),this},e.prototype.finishMLeaderDxfIn=function(t,n,i,o,a,s,l,c,u,h,d,p,f,m,g){var y,b;if(f&&(this.landingPoint=f),this.doglegVector=m,g!=null&&(this.textRotation=g*Math.PI/180),!this.textStyleName&&this.textStyleId){var v=this.database.tables.textStyleTable.getIdAt(this.textStyleId);v?.name&&(this.textStyleName=v.name)}var x=(b=(y=n??this.textAnchor)!==null&&y!==void 0?y:this.contentBasePosition)!==null&&b!==void 0?b:f;(i||this.hasMText)&&t!=null&&x?(this.mtextContent={text:t,anchorPoint:x.clone()},this.textAnchor||(this.textAnchor=x.clone()),p||(this.contentType=fn.MTextContent)):(i||this.hasMText)&&t!=null&&!x&&(p||(this.contentType=fn.MTextContent)),d&&this.isValidMLeaderHandle(o)&&this.contentType!==fn.MTextContent&&!this.mtextContent&&(this.blockContent={blockContentId:o,position:a,scale:s??new G(1,1,1),rotation:l??0,normal:c,color:u,transformationMatrix:h},!p&&this.contentType===fn.NoneContent&&(this.contentType=fn.BlockContent))},e.prototype.dxfInContextData=function(t){for(var n,i={blockMatrix:[]};!t.atEof;){var o=t.readItem();if(!o)break;var a=Number(o.code),s=Number(o.value),l=String((n=o.value)!==null&&n!==void 0?n:"");if(a===301)break;if(a===0){t.pushBackItem(o);break}switch(a){case 10:t.pushBackItem(o),this.contentBasePosition=t.readPoint3d(10);break;case 11:t.pushBackItem(o);{var c=t.readVector3d(11);c&&(this.normal=c)}break;case 12:t.pushBackItem(o);{var u=t.readPoint3d(12);u&&(i.textAnchor=u,this.textAnchor=u.clone())}break;case 13:t.pushBackItem(o);{var h=t.readVector3d(13);h&&(this.textDirection=h)}break;case 14:t.pushBackItem(o),i.blockNormal=t.readVector3d(14);break;case 15:t.pushBackItem(o),i.blockPosition=t.readPoint3d(15);break;case 16:t.pushBackItem(o),i.blockScale=t.readVector3d(16);break;case 40:this.contentScale=s;break;case 41:s>0&&(this.textHeight=s);break;case 42:this.textRotation=s;break;case 43:s>0&&(this.textWidth=s);break;case 44:s>0&&(this.textHeight=s);break;case 45:this.textLineSpacingFactor=s;break;case 46:i.blockRotation=s;break;case 47:i.blockMatrix.push(s);break;case 90:this.textColor=sa(s);break;case 91:this.textBackgroundColor=sa(s);break;case 92:this.textBackgroundTransparency=s;break;case 93:i.blockColor=sa(s);break;case 110:t.pushBackItem(o),this.planeOrigin=t.readPoint3d(110);break;case 111:t.pushBackItem(o),this.planeXAxisDirection=t.readVector3d(111);break;case 112:t.pushBackItem(o),this.planeYAxisDirection=t.readVector3d(112);break;case 140:this.arrowheadSize=s,i.hasArrowheadSize=!0;break;case 141:this.textBackgroundScaleFactor=s;break;case 142:this.textColumnWidth=s;break;case 143:this.textColumnGutterWidth=s;break;case 144:this.textColumnHeight=s;break;case 145:this.landingGap=s;break;case 170:this.textLineSpacingStyle=s;break;case 171:this.textAttachment=s;break;case 172:this.textFlowDirection=s;break;case 173:this.textColumnType=s;break;case 290:i.hasMText=this.readDxfBoolean(o),this.hasMText=i.hasMText;break;case 291:this.textBackgroundColorOn=this.readDxfBoolean(o);break;case 292:this.textFillOn=this.readDxfBoolean(o);break;case 293:this.textUseAutoHeight=this.readDxfBoolean(o);break;case 294:this.textColumnFlowReversed=this.readDxfBoolean(o);break;case 295:this.textUseWordBreak=this.readDxfBoolean(o);break;case 296:i.hasBlock=this.readDxfBoolean(o),this.hasBlock=i.hasBlock;break;case 297:this.planeNormalReversed=this.readDxfBoolean(o);break;case 302:if(l==="LEADER{"){var d=this.dxfInLeaderSection(t);this.addLeader(d)}break;case 304:l!=="LEADER_LINE{"&&(i.textContent=l,this.hasMText=!0);break;case 340:this.textStyleId=l;break;case 341:i.blockContentId=l,this.isValidMLeaderHandle(l)&&(this.blockContentId=l);break;default:break}}return i},e.prototype.dxfInLeaderSection=function(t){for(var n,i={breaks:[],leaderLines:[]},o,a=function(){o&&(i.breaks.push(o),o=void 0)};!t.atEof;){var s=t.readItem();if(!s)break;var l=Number(s.code),c=Number(s.value),u=String((n=s.value)!==null&&n!==void 0?n:"");if(l===303){a();break}if(l===0||l===301){t.pushBackItem(s),a();break}switch(l){case 290:i.lastLeaderLinePointSet=this.readDxfBoolean(s);break;case 291:i.doglegVectorSet=this.readDxfBoolean(s);break;case 10:t.pushBackItem(s),i.lastLeaderLinePoint=t.readPoint3d(10);break;case 11:t.pushBackItem(s),i.doglegVector=t.readVector3d(11);break;case 12:t.pushBackItem(s);{var h=t.readPoint3d(12);h&&(o={start:h,end:h.clone()})}break;case 13:t.pushBackItem(s);{var d=t.readPoint3d(13);o&&d&&(o.end=d,a())}break;case 90:i.leaderBranchIndex=c;break;case 40:i.doglegLength=c;break;case 304:u==="LEADER_LINE{"&&i.leaderLines.push(this.dxfInLeaderLine(t));break;default:break}}return i},e.prototype.dxfInLeaderLine=function(t){for(var n,i,o={vertices:[],breakPointIndexes:[],breaks:[]},a,s=function(){a&&(o.breaks.push(a),a=void 0)};!t.atEof;){var l=t.readItem();if(!l)break;var c=Number(l.code),u=Number(l.value);if(c===305){s();break}if(c===0||c===303||c===301){t.pushBackItem(l),s();break}switch(c){case 10:t.pushBackItem(l);{var h=t.readPoint3d(10);h&&o.vertices.push(h)}break;case 11:t.pushBackItem(l);{var d=t.readPoint3d(11);d&&(a={index:a?.index,start:d,end:d.clone()})}break;case 12:t.pushBackItem(l);{var p=t.readPoint3d(12);a&&p&&(a.end=p,s())}break;case 90:o.breakPointIndexes.push(u),a={index:u,start:(n=a?.start)!==null&&n!==void 0?n:new k,end:(i=a?.end)!==null&&i!==void 0?i:new k};break;case 91:o.leaderLineIndex=u;break;default:break}}return o},e.prototype.readDxfBoolean=function(t){var n;if(typeof t.value=="boolean")return t.value;var i=Number(t.value);if(Number.isFinite(i))return i!==0;var o=String((n=t.value)!==null&&n!==void 0?n:"");return o!==""&&o!=="0"},e.prototype.isValidMLeaderHandle=function(t){return t!=null&&t!==""&&t!=="0"},e.prototype.createPoint=function(t){return new k().copy(t)},e.prototype.createLeaderLine=function(t){var n=this,i,o,a,s;return{vertices:(o=(i=t.vertices)===null||i===void 0?void 0:i.map(function(l){return n.createPoint(l)}))!==null&&o!==void 0?o:[],breakPointIndexes:t.breakPointIndexes?Da([],Fo(t.breakPointIndexes),!1):[],leaderLineIndex:t.leaderLineIndex,breaks:(s=(a=t.breaks)===null||a===void 0?void 0:a.map(function(l){return{index:l.index,start:n.createPoint(l.start),end:n.createPoint(l.end)}}))!==null&&s!==void 0?s:[]}},e.prototype.cloneLeader=function(t){var n,i,o;return{lastLeaderLinePoint:(n=t.lastLeaderLinePoint)===null||n===void 0?void 0:n.clone(),lastLeaderLinePointSet:t.lastLeaderLinePointSet,landingPoint:(i=t.landingPoint)===null||i===void 0?void 0:i.clone(),doglegVector:(o=t.doglegVector)===null||o===void 0?void 0:o.clone(),doglegVectorSet:t.doglegVectorSet,doglegLength:t.doglegLength,breaks:t.breaks.map(function(a){return{index:a.index,start:a.start.clone(),end:a.end.clone()}}),leaderBranchIndex:t.leaderBranchIndex,directionType:t.directionType,leaderLines:t.leaderLines.map(function(a){return{vertices:a.vertices.map(function(s){return s.clone()}),breakPointIndexes:Da([],Fo(a.breakPointIndexes),!1),leaderLineIndex:a.leaderLineIndex,breaks:a.breaks.map(function(s){return{index:s.index,start:s.start.clone(),end:s.end.clone()}})}})}},e.prototype.checkLeaderIndex=function(t){if(t<0||t>=this._leaders.length)throw new Error("The leader index is out of range!")},e.prototype.getMutableLeaderLine=function(t,n){this.checkLeaderIndex(t);var i=this._leaders[t].leaderLines[n];if(!i)throw new Error("The leader line index is out of range!");return i},e.prototype.collectGeometryPoints=function(){var t=this,n,i=[];return this._leaders.forEach(function(o){o.lastLeaderLinePoint&&i.push(o.lastLeaderLinePoint),o.landingPoint&&i.push(o.landingPoint),o.breaks.forEach(function(s){return i.push(s.start,s.end)}),o.leaderLines.forEach(function(s){i.push.apply(i,Da([],Fo(s.vertices),!1)),s.breaks.forEach(function(l){return i.push(l.start,l.end)})});var a=t.getDoglegPoints(o);a&&i.push.apply(i,Da([],Fo(a),!1)),o.leaderLines.forEach(function(s){var l=t.getArrowheadPoints(t.getLeaderLineDrawPoints(o,s));l&&i.push.apply(i,Da([],Fo(l),!1))})}),this._landingPoint&&i.push(this._landingPoint),this.contentBasePosition&&i.push(this.contentBasePosition),this.textAnchor&&i.push(this.textAnchor),this._mtextContent&&i.push(this._mtextContent.anchorPoint),!((n=this._blockContent)===null||n===void 0)&&n.position&&i.push(this._blockContent.position),this.planeOrigin&&i.push(this.planeOrigin),i},e.prototype.moveGeometryGripPointAt=function(t,n){var i=this,o,a=0,s=function(l,c){if(l){a===t&&l.add(n),a++;return}c&&(a===t&&c(),a++)};this._leaders.forEach(function(l){s(l.lastLeaderLinePoint),s(l.landingPoint),l.breaks.forEach(function(u){s(u.start),s(u.end)}),l.leaderLines.forEach(function(u){u.vertices.forEach(function(h){return s(h)}),u.breaks.forEach(function(h){s(h.start),s(h.end)})});var c=i.getDoglegPoints(l);c&&(s(c[0]),s(void 0,function(){var u,h,d=c[0],p=c[1];if(!(!d||!p)){var f=d.distanceTo({x:p.x+n.x,y:p.y+n.y,z:((u=p.z)!==null&&u!==void 0?u:0)+((h=n.z)!==null&&h!==void 0?h:0)});l.doglegLength!=null||l.doglegVectorSet?l.doglegLength=f:i._doglegLength=f}})),l.leaderLines.forEach(function(u){var h=i.getLeaderLineDrawPoints(l,u),d=i.getArrowheadPoints(h);d&&d.forEach(function(p,f){f===0||f===d.length-1?s(h[0]):s(void 0)})})}),s(this._landingPoint),s(this.contentBasePosition),s(this.textAnchor),this._mtextContent&&s(this._mtextContent.anchorPoint),!((o=this._blockContent)===null||o===void 0)&&o.position&&s(this._blockContent.position),s(this.planeOrigin)},e.prototype.getLeaderLineDrawPoints=function(t,n){var i,o,a;if(n.vertices.length>=2)return n.vertices;if(n.vertices.length===0)return[];var s=(a=(o=(i=t.lastLeaderLinePoint)!==null&&i!==void 0?i:t.landingPoint)!==null&&o!==void 0?o:this._landingPoint)!==null&&a!==void 0?a:this.contentBasePosition;return!s||n.vertices[0].equals(s)?n.vertices:[n.vertices[0],s]},e.prototype.getDoglegPoints=function(t){var n,i,o,a;if(this.getResolvedDoglegEnabled()){var s=(i=(n=t.lastLeaderLinePoint)!==null&&n!==void 0?n:t.landingPoint)!==null&&i!==void 0?i:this._landingPoint;if(s){var l=this.contentBasePosition;if(l&&!l.equals(s))return[s,l.clone()];var c=(o=t.doglegVector)!==null&&o!==void 0?o:this._doglegVector,u=(a=t.doglegLength)!==null&&a!==void 0?a:this.getResolvedDoglegLength();if(!(u==null||u===0||c.lengthSq()===0)){var h=s.clone().add(c.clone().normalize().multiplyScalar(u));return[s,h]}}}},e.prototype.getArrowheadPoints=function(t){if(!(!this.isArrowheadVisible()||t.length<2)){var n=this.getArrowheadFrame(t);if(n){var i=this.getResolvedArrowheadSize(),o=n.tip,a=n.unit,s=o.clone().add(a.clone().multiplyScalar(i)),l=i/6,c=new G(-a.y,a.x,0),u=s.clone().add(c.clone().multiplyScalar(l)),h=s.clone().add(c.clone().multiplyScalar(-l));return[o,u,h,o]}}},e.prototype.isArrowheadVisible=function(){var t=this.getResolvedArrowheadId();return t?.toUpperCase()==="_NONE"?!1:this.getResolvedArrowheadSize()>0},e.prototype.drawLeaderLine=function(t,n){var i=[],o=this.getLeaderLinePointsForDraw(n);o.length>=2&&i.push(t.lines(o));var a=this.drawArrowhead(t,n);if(a&&i.push(a),i.length!==0)return i.length===1?i[0]:t.group(i)},e.prototype.getLeaderLinePointsForDraw=function(t){var n=this.getArrowheadLeaderLineTrimDistance();return n<=0?t:this.trimPolylineStart(t,n)},e.prototype.getArrowheadLeaderLineTrimDistance=function(){var t,n,i;if(!this.isArrowheadVisible())return 0;var o=this.getResolvedArrowheadBlockTableRecord();if(!o)return 0;var a=this.getResolvedArrowheadSize();if(a<=0)return 0;var s=(i=o.origin)!==null&&i!==void 0?i:k.ORIGIN,l=s.x;try{for(var c=P3(o.newIterator()),u=c.next();!u.done;u=c.next()){var h=u.value,d=h.geometricExtents;d.isEmpty()||d.max.x>l&&(l=d.max.x)}}catch(p){t={error:p}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return Math.max(0,(l-s.x)*a)},e.prototype.trimPolylineStart=function(t,n){if(t.length<2||n<=0)return t;for(var i=n,o=0;o<t.length-1;o++){var a=t[o],s=t[o+1],l=s.distanceTo(a);if(!(l<=0)){if(i<l){var c=new G().subVectors(s,a),u=a.clone().add(c.multiplyScalar(i/l));return Da([u],Fo(t.slice(o+1)),!1)}i-=l}}return[t[t.length-1]]},e.prototype.drawArrowhead=function(t,n){if(this.isArrowheadVisible()){var i=this.drawArrowheadBlock(t,n);if(i)return i;var o=this.getArrowheadPoints(n);if(o){var a=new pr;a.add(new Ot(o,!0));var s=t.subEntityTraits,l=s.fillType;s.fillType={solidFill:!0,patternAngle:0,definitionLines:[]};var c=t.area(a);return s.fillType=l,c}}},e.prototype.drawArrowheadBlock=function(t,n){var i,o=this.getResolvedArrowheadBlockTableRecord();if(o){var a=this.getArrowheadFrame(n);if(a){var s=a.tip,l=a.unit,c=this.getResolvedArrowheadSize(),u=Math.atan2(l.y,l.x),h=(i=o.origin)!==null&&i!==void 0?i:k.ORIGIN,d=new Ie().makeTranslation(-h.x,-h.y,-h.z),p=new Ie().makeScale(c,c,c),f=new Ie().makeRotationZ(u),m=new Ie().makeTranslation(s.x,s.y,s.z),g=new Ie().multiplyMatrices(m,f).multiply(p).multiply(d);return Nr.instance.draw(t,o,this.resolvedColor,[],!0,g,new G(this.normal))}}},e.prototype.getArrowheadFrame=function(t){if(!(t.length<2)){var n=t[0],i=t.find(function(a){return!a.equals(n)});if(i){var o=new G().subVectors(i,n);if(o.lengthSq()!==0)return{tip:n,unit:o.normalize()}}}},e.prototype.getResolvedArrowheadId=function(){var t,n,i=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.arrowSymbolId;return(n=this.arrowheadId)!==null&&n!==void 0?n:i},e.prototype.getResolvedArrowheadBlockTableRecord=function(){var t=this.getResolvedArrowheadId();if(t)return this.database.tables.blockTable.getIdAt(t)},e.prototype.getResolvedArrowheadSize=function(){var t,n,i,o,a=this.getMLeaderStyle(),s=(t=a?.arrowSize)!==null&&t!==void 0?t:a?.scale;return(o=(i=(n=this.arrowheadSize)!==null&&n!==void 0?n:this.contentScale)!==null&&i!==void 0?i:s)!==null&&o!==void 0?o:this.getResolvedTextHeight()},e.prototype.getResolvedTextHeight=function(){var t,n=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.textHeight;return this.textHeight>0?this.textHeight:n!=null&&n>0?n:2.5},e.prototype.getRenderableMTextContent=function(){var t,n,i;if(this._mtextContent)return{text:this._mtextContent.text,anchorPoint:this._mtextContent.anchorPoint};var o=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.defaultMTextContents,a=(i=(n=this.textAnchor)!==null&&n!==void 0?n:this.contentBasePosition)!==null&&i!==void 0?i:this._landingPoint;if(!(!o||!a))return{text:o,anchorPoint:a}},e.prototype.getMTextRenderWidth=function(t,n){return this._textWidth>0?this._textWidth:0},e.prototype.transformVector=function(t,n){var i=new k,o=new k(t.x,t.y,t.z);i.applyMatrix4(n),o.applyMatrix4(n),t.set(o.x-i.x,o.y-i.y,o.z-i.z)},e.prototype.getMLeaderStyle=function(){var t,n,i,o,a=this.database.objects.mleaderStyle,s=(i=this.mleaderStyleId||this.leaderStyleId)===null||i===void 0?void 0:i.trim();if(s){var l=a.getIdAt(s);if(l)return l;var c=s.toUpperCase();try{for(var u=P3(a.entries()),h=u.next();!h.done;h=u.next()){var d=Fo(h.value,2),p=d[1];if(((o=p.objectId)===null||o===void 0?void 0:o.toUpperCase())===c)return p}}catch(m){t={error:m}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}var f=this.database.getObjectById(s);if(f instanceof Mu)return f}return this.getDefaultMLeaderStyle()},e.prototype.getDefaultMLeaderStyle=function(){var t=this.resolveMLeaderStyleByName(this.getDefaultMLeaderStyleName());return t||this.database.objects.mleaderStyle.newIterator().toArray()[0]},e.prototype.resolveMLeaderStyleByName=function(t){var n,i,o=t?.trim();if(o){var a=this.database.objects.mleaderStyle,s=a.getAt(o);if(s)return s;var l=a.getIdAt(o);if(l)return l;var c=o.toUpperCase();try{for(var u=P3(a.entries()),h=u.next();!h.done;h=u.next()){var d=Fo(h.value,2),p=d[0],f=d[1];if(p.toUpperCase()===c)return f}}catch(m){n={error:m}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}},e.prototype.getDefaultMLeaderStyleName=function(){try{return this.database.cmleaderstyle||Oo}catch{return Oo}},e.prototype.getResolvedTextStyleName=function(){var t,n,i,o=this.database.tables.textStyleTable,a=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.textStyleId,s=a?(n=o.getIdAt(a))===null||n===void 0?void 0:n.name:void 0,l=this.textStyleId?(i=o.getIdAt(this.textStyleId))===null||i===void 0?void 0:i.name:void 0;if(this.textStyleName){var c=o.getAt(this.textStyleName);if(c?.name)return c.name;var u=o.getIdAt(this.textStyleName);if(u?.name)return u.name}return l||s},e.prototype.getTextStyle=function(){var t=this.database.tables.textStyleTable.resolveAt(this.getResolvedTextStyleName());if(!t)throw new Error("No valid text style found in text style table.");return t.textStyle},e.prototype.getResolvedLeaderLineColor=function(){var t;return this.getResolvedComponentColor(this.leaderLineColor,(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.leaderLineColor,pue)},e.prototype.getResolvedLeaderLineType=function(){var t,n=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.leaderLineType;return this.getResolvedStyleDrivenValue(this.leaderLineType,n,due)},e.prototype.getResolvedLeaderLineTypeId=function(){var t;return this.getResolvedStyleDrivenValue(this.leaderLineTypeId,(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.leaderLineTypeId,fue)},e.prototype.getResolvedLeaderLineStyle=function(){var t=this.getResolvedLeaderLineTypeId();if(t){var n=this.database.tables.linetypeTable.getIdAt(t);if(n)return E3({type:"UserSpecified"},n.linetype)}},e.prototype.getResolvedLeaderLineWeight=function(){var t,n=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.leaderLineWeight,i=this.getResolvedStyleDrivenValue(this.leaderLineWeight,n,mue);if(i!=null)return i},e.prototype.getResolvedDoglegEnabled=function(){var t,n=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.doglegEnabled;return this.getResolvedStyleDrivenValue(this.doglegEnabled,n,gue)},e.prototype.getResolvedDoglegLength=function(){var t,n=(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.doglegLength;return this.getResolvedStyleDrivenValue(this.doglegLength,n,yue)},e.prototype.getResolvedTextColor=function(){var t;return this.getResolvedComponentColor(this.textColor,(t=this.getMLeaderStyle())===null||t===void 0?void 0:t.textColor,bue)},e.prototype.getResolvedComponentColor=function(t,n,i){if(!t)return n;if(!t.isByBlock&&!t.isByLayer)return t;var o=this.isPropertyOverrideEnabled(i);return o===!0?t:n??t},e.prototype.getResolvedStyleDrivenValue=function(t,n,i){var o=this.isPropertyOverrideEnabled(i);return o===!0?t??n:n??t},e.prototype.isPropertyOverrideEnabled=function(t){if(this.propertyOverrideFlag!=null)return(this.propertyOverrideFlag&t)!==0},e.prototype.applyColorTraits=function(t,n,i){t.color=i,n&&(t.color=n)},e.prototype.applyLineTraits=function(t,n,i){n&&(t.lineType=n),i!=null&&(t.lineWeight=i)},e.typeName="MLeader",e})(bt)});var vue,T3,qr,Zr,P9,No,bs,co,Oh,k3=W(()=>{tt();bi();Fn();Gn();En();Di();ro();vue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),T3=function(){return T3=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},T3.apply(this,arguments)},qr=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Zr=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},P9=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.Top=0]="Top",r[r.Zero=1]="Zero",r[r.Bottom=2]="Bottom"})(No||(No={}));(function(r){r[r.HasVertex=1]="HasVertex",r[r.Closed=2]="Closed",r[r.SuppressStartCaps=4]="SuppressStartCaps",r[r.SuppressEndCaps=8]="SuppressEndCaps"})(bs||(bs={}));(function(r){r[r.FillOn=1]="FillOn",r[r.DisplayMiters=2]="DisplayMiters",r[r.StartSquareCap=16]="StartSquareCap",r[r.StartInnerArcs=32]="StartInnerArcs",r[r.StartRoundCap=64]="StartRoundCap",r[r.EndSquareCap=256]="EndSquareCap",r[r.EndInnerArcs=512]="EndInnerArcs",r[r.EndRoundCap=1024]="EndRoundCap"})(co||(co={}));Oh=(function(r){vue(e,r);function e(){var t=r.call(this)||this;return t._styleName="",t._styleObjectHandle="",t._scale=1,t._justification=No.Zero,t._flags=0,t._styleCount=0,t._startPosition=new k,t._normal=new G(0,0,1),t._segments=[],t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"MLINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleName",{get:function(){return this._styleName||this.getDefaultStyleName()},set:function(t){this._styleName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleObjectHandle",{get:function(){return this._styleObjectHandle},set:function(t){this._styleObjectHandle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},set:function(t){this._scale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"justification",{get:function(){return this._justification},set:function(t){this._justification=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this._flags},set:function(t){this._flags=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleCount",{get:function(){return this._styleCount},set:function(t){this._styleCount=Math.max(0,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPosition",{get:function(){return this._startPosition},set:function(t){this._startPosition.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segments",{get:function(){var t=this;return this._segments.map(function(n){return t.cloneSegment(n)})},set:function(t){var n=this;this._segments=t.map(function(i){return n.createSegment(i)}),this.updateHasVertexFlag()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertexCount",{get:function(){return this._segments.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return(this._flags&bs.Closed)!==0},set:function(t){this.setFlag(bs.Closed,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suppressStartCaps",{get:function(){return(this._flags&bs.SuppressStartCaps)!==0},set:function(t){this.setFlag(bs.SuppressStartCaps,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suppressEndCaps",{get:function(){return(this._flags&bs.SuppressEndCaps)!==0},set:function(t){this.setFlag(bs.SuppressEndCaps,t)},enumerable:!1,configurable:!0}),e.prototype.appendSegment=function(t){this._segments.push(this.createSegment(t)),this.updateHasVertexFlag()},e.prototype.clearSegments=function(){this._segments=[],this.updateHasVertexFlag()},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this.collectGeometryPoints(),n=new De;return n.setFromPoints(t)},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t=[],n=this.getMLineStyle(),i=this.getRenderableElementCount(n);if(i<=0)return or(this.getReferencePath(),this.closed);for(var o=0;o<i;o++)t.push.apply(t,Zr([],qr(or(this.getElementPath(o,n),this.closed)),!1));return t},e.prototype.transformBy=function(t){var n=this;return this._startPosition.applyMatrix4(t),this._segments.forEach(function(i){i.position.applyMatrix4(t),n.transformVector(i.direction,t),n.transformVector(i.miterDirection,t)}),this.transformVector(this._normal,t),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"mline",properties:[{name:"styleName",type:"string",editable:!0,accessor:{get:function(){return t.styleName},set:function(n){t.styleName=n}}},{name:"scale",type:"float",editable:!0,accessor:{get:function(){return t.scale},set:function(n){t.scale=n}}},{name:"justification",type:"int",editable:!0,accessor:{get:function(){return t.justification},set:function(n){t.justification=n}}},{name:"closed",type:"boolean",editable:!0,accessor:{get:function(){return t.closed},set:function(n){t.closed=n}}},{name:"vertexCount",type:"int",editable:!1,accessor:{get:function(){return t.vertexCount}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push(this._startPosition.clone()),this._segments.forEach(function(n){return t.push(n.position.clone())}),t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this,o=Zr([this._startPosition],qr(this._segments.map(function(a){return a.position})),!1);return fs(t,n,o),un(t,function(a){i.updateReferencePathDirectionsAfterGripMove(a)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=Zr([this._startPosition],qr(this._segments.map(function(h){return h.position})),!1);if(a.length!==0)switch(t){case ne.EndPoint:o.push.apply(o,Zr([],qr(a),!1));break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:{for(var s=[],l=0;l<a.length-1;l++){var c=[];Kl(a[l],a[l+1],t,n,c),s.push.apply(s,Zr([],qr(c),!1))}if(t===ne.MidPoint)o.push.apply(o,Zr([],qr(s),!1));else{var u=yr(n,s);u&&o.push(u)}break}default:break}},e.prototype.subWorldDraw=function(t){if(this._segments.length!==0){var n=[],i=this.getMLineStyle(),o=this.getRenderableElementCount(i),a=t.subEntityTraits,s=a.color,l=a.lineType,c=a.fillType,u=a.drawOrder,h=this.createFillArea(i,o);if(h&&(a.color=s,this.applyFillTraits(i,a),a.fillType={solidFill:!0,patternAngle:0,definitionLines:[]},a.drawOrder=-1,n.push(t.area(h)),a.fillType=c,a.drawOrder=u),o<=0){var d=this.getReferencePath();d.length>=2&&n.push(t.lines(d))}else{for(var p=0;p<o;p++){a.color=s,a.lineType=l,this.applyStyleElementTraits(i,p,a);var f=this.getElementPath(p,i);f.length>=2&&n.push(t.lines(f))}this.appendStyleDrivenJointAndCapEntities(t,n,i,o,s,l)}if(a.color=s,a.lineType=l,a.fillType=c,a.drawOrder=u,n.length!==0)return n.length===1?n[0]:t.group(n)}},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbMline"),t.writeString(2,this.styleName),t.writeHandle(340,this._styleObjectHandle),t.writeDouble(40,this._scale),t.writeInt16(70,this._justification),t.writeInt16(71,this._flags),t.writeInt16(72,this.vertexCount),t.writeInt16(73,this._styleCount),t.writePoint3d(10,this._startPosition),t.writeVector3d(210,this._normal),this._segments.forEach(function(n){t.writePoint3d(11,n.position),t.writeVector3d(12,n.direction),t.writeVector3d(13,n.miterDirection),n.elements.forEach(function(i){t.writeInt16(74,i.parameterCount),i.parameters.forEach(function(o){return t.writeDouble(41,o)}),t.writeInt16(75,i.fillCount),i.fillParameters.forEach(function(o){return t.writeDouble(42,o)})})}),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbMline");for(var n=this._startPosition.x,i=this._startPosition.y,o=this._startPosition.z,a=this._normal.x,s=this._normal.y,l=this._normal.z,c=[],u=null,h=null,d=!1,p=!1,f=0,m=0,g=function(){h&&u&&u.elements.push(h),h=null,d=!1,p=!1,f=0,m=0},y=function(){g(),u&&c.push(u),u=null};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var b=t.readItem();if(!b)break;var v=Number(b.code),x=Number(b.value);switch(v){case 2:this.styleName=String(b.value);break;case 340:this.styleObjectHandle=String(b.value);break;case 40:this.scale=x;break;case 70:this.justification=x;break;case 71:this.flags=x;break;case 72:break;case 73:this.styleCount=x;break;case 10:n=x;break;case 20:i=x;break;case 30:o=x;break;case 210:a=x;break;case 220:s=x;break;case 230:l=x;break;case 11:y(),u={position:new k(x,0,0),direction:new G(1,0,0),miterDirection:new G(0,1,0),elements:[]};break;case 21:u&&(u.position.y=x);break;case 31:u&&(u.position.z=x);break;case 12:u&&(u.direction.x=x);break;case 22:u&&(u.direction.y=x);break;case 32:u&&(u.direction.z=x);break;case 13:u&&(u.miterDirection.x=x);break;case 23:u&&(u.miterDirection.y=x);break;case 33:u&&(u.miterDirection.z=x);break;case 74:g(),f=x,d=!0,p=!1,h={parameterCount:x,parameters:[],fillCount:0,fillParameters:[]};break;case 41:h&&d&&(h.parameters.push(x),f>0&&h.parameters.length>=f&&(d=!1));break;case 75:h&&(m=x,h.fillCount=x,p=!0,d=!1);break;case 42:h&&p&&(h.fillParameters.push(x),m>0&&h.fillParameters.length>=m&&(p=!1));break;default:break}}return y(),this.startPosition=new k(n,i,o),this.normal=new G(a,s,l),this.segments=c,this},e.prototype.setFlag=function(t,n){n?this._flags|=t:this._flags&=~t},e.prototype.updateHasVertexFlag=function(){this.setFlag(bs.HasVertex,this._segments.length>0)},e.prototype.updateReferencePathDirectionsAfterGripMove=function(t){var n=this,i=function(a){var s=n._segments[a];if(s){var l=a===0?n._startPosition:n._segments[a-1].position,c=new G().subVectors(s.position,l);c.lengthSq()>0&&s.direction.copy(c.normalize())}};if(t===0){this._segments.length>0&&i(0);return}var o=t-1;o<0||o>=this._segments.length||(i(o),o+1<this._segments.length&&i(o+1))},e.prototype.createSegment=function(t){var n=this,i,o;return{position:new k().copy(t.position),direction:new G().copy(t.direction),miterDirection:new G().copy(t.miterDirection),elements:(o=(i=t.elements)===null||i===void 0?void 0:i.map(function(a){return n.createElement(a)}))!==null&&o!==void 0?o:[]}},e.prototype.createElement=function(t){var n,i,o=t.parameters?Zr([],qr(t.parameters),!1):[],a=t.fillParameters?Zr([],qr(t.fillParameters),!1):[];return{parameterCount:(n=t.parameterCount)!==null&&n!==void 0?n:o.length,parameters:o,fillCount:(i=t.fillCount)!==null&&i!==void 0?i:a.length,fillParameters:a}},e.prototype.cloneSegment=function(t){return{position:t.position.clone(),direction:t.direction.clone(),miterDirection:t.miterDirection.clone(),elements:t.elements.map(function(n){return{parameterCount:n.parameterCount,parameters:Zr([],qr(n.parameters),!1),fillCount:n.fillCount,fillParameters:Zr([],qr(n.fillParameters),!1)}})}},e.prototype.collectGeometryPoints=function(){var t=[this._startPosition];if(this._segments.length===0)return t;var n=this.getMLineStyle(),i=this.getRenderableElementCount(n);if(i<=0)return this._segments.forEach(function(a){return t.push(a.position)}),t;for(var o=0;o<i;o++)t.push.apply(t,Zr([],qr(this.getElementPath(o,n)),!1));return t},e.prototype.getRenderableElementCount=function(t){var n,i=(n=t?.elementCount)!==null&&n!==void 0?n:0;return Math.max.apply(Math,Zr(Zr([this._styleCount,i],qr(this._segments.map(function(o){return o.elements.length})),!1),[0],!1))},e.prototype.getReferencePath=function(){var t=Zr([this._startPosition.clone()],qr(this._segments.map(function(n){return n.position.clone()})),!1);return this.closePathIfNeeded(t)},e.prototype.getElementPath=function(t,n){var i=this,o=[],a=this._segments[0];return o.push(this.getElementBoundaryPoint("start",a,t,n)),this._segments.forEach(function(s){o.push(i.offsetPoint(s.position,s.miterDirection,i.getElementMiterOffset(s,t,n)))}),o[o.length-1]=this.getElementBoundaryPoint("end",this._segments[this._segments.length-1],t,n),this.closePathIfNeeded(o)},e.prototype.getElementMiterOffset=function(t,n,i){var o,a=t.elements[n];return!((o=a?.parameters)===null||o===void 0)&&o.length?a.parameters[0]:this.getStyleElementOffset(n,i)},e.prototype.getElementBoundaryPoint=function(t,n,i,o){var a=this.getElementMiterOffset(n,i,o),s=t==="start"?this._startPosition:n.position,l=this.offsetPoint(s,n.miterDirection,a);if(!this.shouldApplyCapCutAtSide(t,o))return l;var c=t==="start"?o?.startAngle:o?.endAngle,u=this.computeCapCutDistance(a,c,t);if(u===0)return l;var h=t==="start"?this.getStartSegmentDirection():this.getEndSegmentDirection();return h.lengthSq()===0?l:l.add(h.multiplyScalar(u))},e.prototype.shouldApplyCapCutAtSide=function(t,n){return!n||this.closed?!1:t==="start"?this.suppressStartCaps?!1:(n.flags&(co.StartSquareCap|co.StartInnerArcs|co.StartRoundCap))!==0:this.suppressEndCaps?!1:(n.flags&(co.EndSquareCap|co.EndInnerArcs|co.EndRoundCap))!==0},e.prototype.computeCapCutDistance=function(t,n,i){var o=this.normalizeCapAngle(n),a=Math.tan(o);if(Math.abs(a)<1e-6)return 0;var s=t/a;return s},e.prototype.normalizeCapAngle=function(t){if(t==null||!Number.isFinite(t))return Math.PI/2;var n=t%180;return n<0&&(n+=180),(n<1||n>179)&&(n=90),n*Math.PI/180},e.prototype.getStartSegmentDirection=function(){var t=this._segments[0],n=new G;return t&&(n.subVectors(t.position,this._startPosition),n.lengthSq()===0&&n.copy(t.direction)),n.lengthSq()>0&&n.normalize(),n},e.prototype.getEndSegmentDirection=function(){var t=this._segments[this._segments.length-1];if(!t)return new G;var n=new G,i=this._segments.length>1?this._segments[this._segments.length-2].position:this._startPosition;return n.subVectors(t.position,i),n.lengthSq()===0&&n.copy(t.direction),n.lengthSq()>0&&n.normalize(),n},e.prototype.createFillArea=function(t,n){if(!(!t||(t.flags&co.FillOn)===0||n<2)){var i=this.getFillBoundaryElementIndices(n,t);if(i){var o=this.getElementPath(i.outerIndex,t),a=this.getElementPath(i.innerIndex,t),s=this.stripClosingPoint(o),l=this.stripClosingPoint(a);if(!(s.length<2||l.length<2)){var c=new pr;if(this.closed){if(s.length<3||l.length<3)return;c.add(new Ot(s.map(function(h){return{x:h.x,y:h.y}}),!0)),c.add(new Ot(l.map(function(h){return{x:h.x,y:h.y}}),!0))}else{var u=Zr(Zr([],qr(s),!1),qr(l.slice().reverse()),!1).map(function(h){return{x:h.x,y:h.y}});if(u.length<3)return;c.add(new Ot(u,!0))}return c}}}},e.prototype.getFillBoundaryElementIndices=function(t,n){for(var i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=-1,s=-1,l=0;l<t;l++){var c=this.getElementReferenceOffset(l,n);c<i&&(i=c,a=l),c>o&&(o=c,s=l)}if(!(a<0||s<0||a===s))return{outerIndex:s,innerIndex:a}},e.prototype.getElementReferenceOffset=function(t,n){var i,o=this._segments[0];if(o){var a=o.elements[t];if(!((i=a?.parameters)===null||i===void 0)&&i.length)return a.parameters[0]}return this.getStyleElementOffset(t,n)},e.prototype.getStyleElementOffset=function(t,n){var i=n?.elements[t];if(!i)return 0;var o=this.getStyleJustificationShift(n);return(i.offset+o)*this._scale},e.prototype.getStyleJustificationShift=function(t){var n,i,o,a=(o=t?.elements)!==null&&o!==void 0?o:[];if(a.length<=0)return 0;var s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;try{for(var c=P9(a),u=c.next();!u.done;u=c.next()){var h=u.value,d=h.offset;d<s&&(s=d),d>l&&(l=d)}}catch(p){n={error:p}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return this._justification===No.Top?-l:this._justification===No.Bottom?-s:0},e.prototype.stripClosingPoint=function(t){if(t.length<2)return t;var n=t[0],i=t[t.length-1],o=1e-9,a=Math.abs(n.x-i.x)<=o&&Math.abs(n.y-i.y)<=o&&Math.abs(n.z-i.z)<=o;return a?t.slice(0,-1):t},e.prototype.offsetPoint=function(t,n,i){if(i===0||n.lengthSq()===0)return t.clone();var o=n.clone().normalize().multiplyScalar(i);return t.clone().add(o)},e.prototype.closePathIfNeeded=function(t){if(!this.closed||t.length<2)return t;var n=t[0],i=t[t.length-1],o=1e-9,a=Math.abs(n.x-i.x)<=o&&Math.abs(n.y-i.y)<=o&&Math.abs(n.z-i.z)<=o;return a||t.push(n.clone()),t},e.prototype.appendStyleDrivenJointAndCapEntities=function(t,n,i,o,a,s){!i||o<2||(n.push.apply(n,Zr([],qr(this.drawMiterJointEntities(t,i,o,a,s)),!1)),n.push.apply(n,Zr([],qr(this.drawCapEntities(t,i,o,a,s)),!1)))},e.prototype.drawMiterJointEntities=function(t,n,i,o,a){var s=this;if(this.closed||this._segments.length<2||(n.flags&co.DisplayMiters)===0)return[];for(var l=[],c=t.subEntityTraits,u=function(p){for(var f=h._segments[p],m=Array.from({length:i},function(y,b){var v=s.getElementMiterOffset(f,b,n);return{elementIndex:b,offset:v,point:s.offsetPoint(f.position,f.miterDirection,v)}}).sort(function(y,b){return b.offset-y.offset}),g=0;g<m.length-1;g++)h.applyElementDrawTraits(c,o,a,n,m[g].elementIndex),l.push(t.lines([m[g].point,m[g+1].point]))},h=this,d=0;d<this._segments.length-1;d++)u(d);return l},e.prototype.drawCapEntities=function(t,n,i,o,a){if(this.closed||this._segments.length<=0)return[];var s=[];return s.push.apply(s,Zr([],qr(this.drawCapEntitiesForSide(t,"start",n,i,o,a)),!1)),s.push.apply(s,Zr([],qr(this.drawCapEntitiesForSide(t,"end",n,i,o,a)),!1)),s},e.prototype.drawCapEntitiesForSide=function(t,n,i,o,a,s){if(n==="start"&&this.suppressStartCaps)return[];if(n==="end"&&this.suppressEndCaps)return[];var l=i.flags,c=n==="start",u=c?(l&co.StartSquareCap)!==0:(l&co.EndSquareCap)!==0,h=c?(l&co.StartRoundCap)!==0:(l&co.EndRoundCap)!==0,d=c?(l&co.StartInnerArcs)!==0:(l&co.EndInnerArcs)!==0;if(!u&&!h&&!d)return[];var p=this.getCapElementPoints(n,o,i);if(p.length<2)return[];var f=[],m=t.subEntityTraits;if(u)for(var g=0;g<p.length-1;g++)this.applyElementDrawTraits(m,a,s,i,p[g].elementIndex),f.push(t.lines([p[g].point,p[g+1].point]));var y=c?this.getStartSegmentDirection().multiplyScalar(-1):this.getEndSegmentDirection().clone();if(h){var b=this.drawCapArcBetweenElements(t,n,p[0],p[p.length-1],y,m,a,s,i);b&&f.push(b)}if(d)for(var g=1;g<Math.floor(p.length/2);g++){var v=p[g],x=p[p.length-1-g];if(!(!v||!x||v===x)){var w=this.drawCapArcBetweenElements(t,n,v,x,y,m,a,s,i);w&&f.push(w)}}return f},e.prototype.getCapElementPoints=function(t,n,i){var o=this,a=t==="start"?this._segments[0]:this._segments[this._segments.length-1];return a?Array.from({length:n},function(s,l){return{elementIndex:l,offset:o.getElementMiterOffset(a,l,i),point:o.getElementBoundaryPoint(t,a,l,i)}}).sort(function(s,l){return l.offset-s.offset}):[]},e.prototype.drawCapArcBetweenElements=function(t,n,i,o,a,s,l,c,u){var h=n==="end"?o.point:i.point,d=n==="end"?i.point:o.point,p=h.distanceTo(d);if(!(p<=1e-9||a.lengthSq()===0)){var f=h.clone().add(new G().subVectors(d,h).multiplyScalar(.5)),m=f.add(a.clone().normalize().multiplyScalar(p/2)),g=Pn.createByThreePoints(h,d,m);if(g)return this.applyElementDrawTraits(s,l,c,u,n==="end"?o.elementIndex:i.elementIndex),t.circularArc(g)}},e.prototype.applyElementDrawTraits=function(t,n,i,o,a){t.color=n,t.lineType=i,this.applyStyleElementTraits(o,a,t)},e.prototype.transformVector=function(t,n){var i=new k,o=new k(t.x,t.y,t.z);i.applyMatrix4(n),o.applyMatrix4(n),t.set(o.x-i.x,o.y-i.y,o.z-i.z)},e.prototype.getMLineStyle=function(){var t,n,i,o=this.database.objects.mlineStyle,a=this.styleObjectHandle?o.getIdAt(this.styleObjectHandle):void 0;if(a)return a;var s=this.styleName?o.getAt(this.styleName):void 0;if(s)return s;var l=(i=this.styleName)===null||i===void 0?void 0:i.toUpperCase();if(l)try{for(var c=P9(o.entries()),u=c.next();!u.done;u=c.next()){var h=qr(u.value,2),d=h[0],p=h[1],f=(p.styleName||d).toUpperCase();if(d.toUpperCase()===l||f===l)return p}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}},e.prototype.applyStyleElementTraits=function(t,n,i){var o=t?.elements[n];if(o){var a=this.resolveStyleElementLineType(o.lineType);a&&(i.lineType=a),!(o.color.isByBlock||o.color.isByLayer)&&(i.color=o.color.clone())}},e.prototype.applyFillTraits=function(t,n){var i=t?.fillColor;!i||i.isByBlock||i.isByLayer||(n.color=i.clone())},e.prototype.resolveStyleElementLineType=function(t){var n,i=t?.trim();if(i){var o=i.toUpperCase(),a=Vn.toUpperCase(),s=eo.toUpperCase(),l="UserSpecified",c=i;if(o===a){l="ByLayer";var u=(n=this.database.tables.layerTable.getAt(this.layer))===null||n===void 0?void 0:n.linetype;c=u&&u.toUpperCase()!==a&&u.toUpperCase()!==s?u:ka}else o===s&&(l="ByBlock",c=ka);var h=this.database.tables.linetypeTable.getAt(c);return h?T3({type:l},h.linetype):{type:l,name:c,standardFlag:0,description:"",totalPatternLength:0}}},e.prototype.resolveEffectiveProperties=function(){r.prototype.resolveEffectiveProperties.call(this),this._styleName||(this._styleName=this.getDefaultStyleName())},e.prototype.getDefaultStyleName=function(){try{return this.database.cmlstyle||Lo}catch{return Lo}},e.typeName="MLine",e})(bt)});function v2(r,e){if(!(e.length<3)){var t=r.subEntityTraits,n=t.fillType,i=t.transparency;t.fillType={solidFill:!0,patternAngle:0,definitionLines:[]},t.transparency=new Mn(0);var o=new pr;o.add(new Ot(e,!0));var a=r.area(o);t.fillType=n,t.transparency=i;var s=r.lines(e);return a?s?r.group([a,s]):a:s}}var I3=W(()=>{zt();tt()});function Dx(r){if(!(!r||r.length<Fg)){for(var e=0;e<E9.length;e++)if(r[Fg+e]!==E9[e])return;if(!(Ox+wue>Fg)){var t=new DataView(r.buffer,r.byteOffset,r.byteLength),n=function(u){var h=t.getFloat64(u,!0),d=t.getFloat64(u+L3,!0),p=t.getFloat64(u+2*L3,!0);if([h,d,p].every(Number.isFinite))return{x:h,y:d,z:p}},i=n(Ox),o=n(Ox+x2),a=n(Ox+2*x2),s=n(Ox+3*x2);if(!(!i||!o||!a||!s)){var l=Math.abs(a.x-i.x),c=Math.abs(i.y-a.y);if(!(l<=0||c<=0))return{upperLeft:i,upperRight:o,lowerRight:a,lowerLeft:s}}}}}var E9,Fg,xue,L3,x2,Ox,wue,O3=W(()=>{E9=[208,207,17,224,161,177,26,225],Fg=128,xue=4,L3=8,x2=3*L3,Ox=2,wue=xue*x2});function Ng(r){return r===Iu||r===rc}function la(r){if(r.length<18)return!1;var e=new DataView(r.buffer,r.byteOffset,r.byteLength);return r.length>=40&&e.getUint32(0,!0)===T9?C9(r.subarray(22)):C9(r)}function Dh(r){return D3(r)>=0}function Rx(r){var e,t;if(la(r)){var n=new DataView(r.buffer,r.byteOffset,r.byteLength),i=0;if(n.getUint32(0,!0)===T9&&(i=22),!(i+18>r.length)){var o=n.getUint16(i+2,!0);if(!(o<9)){i+=o*2;for(var a=[],s=0;i+6<=r.length;){var l=n.getUint32(i,!0),c=l*2,u=n.getUint16(i+4,!0);if(l<3||c<6||i+c>r.length)break;if(u===Sue&&i+44<=i+c){var h=n.getUint16(i+6,!0);if(h===Aue){var d=n.getUint32(i+10,!0),p=n.getUint32(i+32,!0),f=n.getUint32(i+40,!0),m=p>0&&p===f||p>0?p:f,g=i+44;d===Mue&&m>0&&g+m<=i+c&&(a.push(r.subarray(g,g+m)),s+=m)}}if(u===0)break;i+=c}if(!(a.length===0||s<88)){var y=new Uint8Array(s),b=0;try{for(var v=_ue(a),x=v.next();!x.done;x=v.next()){var w=x.value;y.set(w,b),b+=w.length}}catch(_){e={error:_}}finally{try{x&&!x.done&&(t=v.return)&&t.call(v)}finally{if(e)throw e.error}}if(Bx(y,0))return y}}}}}function D3(r){for(var e=Math.min(r.length-44,4096),t=0;t<=e;t++)if(Bx(r,t))return t;return-1}function Bx(r,e){if(e+88>r.length)return!1;var t=new DataView(r.buffer,r.byteOffset+e,r.length-e);if(t.getUint32(0,!0)!==1)return!1;var n=t.getUint32(4,!0);if(n<88||e+n>r.length||r[e+40]!==32||r[e+41]!==69||r[e+42]!==77||r[e+43]!==70)return!1;var i=t.getUint32(48,!0),o=t.getUint32(52,!0);return!(i<n||e+i>r.length||o<2||o>1e7)}function C9(r){if(r.length<18)return!1;var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t=e.getUint16(0,!0),n=e.getUint16(2,!0),i=e.getUint16(4,!0),o=e.getUint32(6,!0);return!(t!==1&&t!==2||n<9||n>100||i!==256&&i!==768||(o<n||o*2>r.length+16)&&o<n)}var _ue,Iu,rc,T9,Sue,Aue,Mue,w2=W(()=>{_ue=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Iu="image/wmf",rc="image/emf",T9=2596720087;Sue=1574,Aue=15,Mue=1128680791});function zx(r){if(r?.length){var e=Tue(r);return e||z3(r)}}function Tue(r){var e,t,n,i,o,a,s,l,c=Nx(r,B3);if(!(c<0)){var u=r.subarray(c),h;try{h=zue(u)}catch{return}try{for(var d=zg(h.entries()),p=d.next();!p.done;p=d.next()){var f=p.value;if(f.type==="stream"&&I9(f.name)){var m=h.readStream(f.name);if(m?.length){var g=L9(m,{allowMetafile:!1});if(g)return g}}}}catch(T){e={error:T}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}var y=["CONTENTS","Ole10Native","Ole10Native","Package"];try{for(var b=zg(y),v=b.next();!v.done;v=b.next()){var x=v.value,m=h.readStream(x);if(m?.length){var w=A2(m);if(w)return w}}}catch(T){n={error:T}}finally{try{v&&!v.done&&(i=b.return)&&i.call(b)}finally{if(n)throw n.error}}try{for(var _=zg(h.entries()),A=_.next();!A.done;A=_.next()){var f=A.value;if(f.type==="stream"&&I9(f.name)){var m=h.readStream(f.name);if(m?.length){var g=L9(m,{allowMetafile:!0});if(g)return g;var E=z3(m);if(E)return E}}}}catch(T){o={error:T}}finally{try{A&&!A.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}try{for(var S=zg(h.entries()),M=S.next();!M.done;M=S.next()){var f=M.value;if(f.type==="stream"){var m=h.readStream(f.name);if(m?.length){var w=z3(m);if(w)return w}}}}catch(T){s={error:T}}finally{try{M&&!M.done&&(l=S.return)&&l.call(S)}finally{if(s)throw s.error}}}}function I9(r){return/olepres/i.test(r)||r.includes("OlePres")}function L9(r,e){if(e===void 0&&(e={}),!(r.length<28)){var t=e.allowMetafile!==!1,n=new DataView(r.buffer,r.byteOffset,r.byteLength),i=0,o=n.getUint32(i,!0);i+=4;var a=0;if(o===4294967295)a=n.getUint32(i,!0),i+=4;else if(o===4294967294){if(i+4>r.length)return;var s=n.getUint32(i,!0);i+=4+s}else if(o>0&&o<65535)i+=o;else return;if(!(i+4>r.length)){var l=n.getUint32(i,!0);if(i+=4,l>4&&(i+=l-4),i+=24,!(i+4>r.length)){var c=n.getUint32(i,!0);if(i+=4,!(c<=0||i+c>r.length)){var u=r.subarray(i,i+c);return kue(u,a,{allowMetafile:t})}}}}}function kue(r,e,t){t===void 0&&(t={});var n=t.allowMetafile!==!1,i=e===k9||e===F3;if(!(i&&!n)){if(e===Eue){var o=D9(r);if(o)return o}if(e===Pue){var a=A2(r);if(a)return a}if(n&&(e===k9||e===F3)){var s=N3(r,e);if(s)return s}if(n){var s=N3(r);if(s)return s}return A2(r)}}function N3(r,e){var t=r;if(e===F3&&r.length>30){var n=r.subarray(12);la(n)&&(t=n)}if(la(t)){var i=Rx(t);if(i)return new Blob([Fx(i)],{type:rc})}var o=D3(r);if(o>=0&&Bx(r,o)){var a=Iue(r,o);if(a)return new Blob([Fx(a)],{type:rc});var s=new DataView(r.buffer,r.byteOffset+o,r.length-o),l=s.getUint32(48,!0);if(l>88&&o+l<=r.length)return new Blob([Fx(r.subarray(o,o+l))],{type:rc})}if(la(t)){var c=Lue(t);return c?new Blob([Fx(c)],{type:Iu}):new Blob([Fx(t)],{type:Iu})}}function Fx(r){var e=new Uint8Array(r.length);return e.set(r),e}function Iue(r,e){if(Bx(r,e))for(var t=new DataView(r.buffer,r.byteOffset+e,r.length-e),n=t.getUint32(48,!0),i=t.getUint32(52,!0),o=0,a=0;a<i;a++){if(o+8>n)return;var s=t.getUint32(o,!0),l=t.getUint32(o+4,!0);if(l<8||o+l>n)return;if(o+=l,s===14)return r.subarray(e,e+o)}}function Lue(r){var e=0,t=new DataView(r.buffer,r.byteOffset,r.byteLength);if(r.length>=40&&t.getUint32(0,!0)===2596720087&&(e=22),!!la(r.subarray(e))){var n=new DataView(r.buffer,r.byteOffset+e,r.length-e),i=n.getUint16(2,!0),o=n.getUint32(6,!0),a=e+o*2;if(!(a>r.length))for(var s=e+i*2,l=a,c=0;s+6<=l&&c<5e5;){var u=t.getUint32(s,!0),h=t.getUint16(s+4,!0);if(u<3||s+u*2>l)return;if(s+=u*2,c++,h===0)return r.subarray(0,s)}}}function z3(r){var e=A2(r);if(e)return e;if(Dh(r)||la(r))return N3(r)}function A2(r){var e=Oue(r);if(e)return e;var t=Due(r);if(t)return t;var n=Rue(r);if(n)return n;var i=Bue(r);if(i)return i;var o=Fue(r);if(o)return o}function Oue(r){for(var e=0;e<r.length-14;e++)if(!(r[e]!==66||r[e+1]!==77)){var t=new DataView(r.buffer,r.byteOffset+e,r.length-e),n=t.getUint32(2,!0);if(!(n<14||n>r.length-e)){var i=t.getUint32(10,!0);if(!(i<14||i>=n))return new Blob([r.subarray(e,e+n)],{type:"image/bmp"})}}}function Due(r){var e=[137,80,78,71,13,10,26,10],t=Nx(r,e);if(!(t<0)){for(var n=t+8;n+12<=r.length;n++)if(r[n+4]===73&&r[n+5]===69&&r[n+6]===78&&r[n+7]===68){var i=n+12;return new Blob([r.subarray(t,i)],{type:"image/png"})}return new Blob([r.subarray(t)],{type:"image/png"})}}function Rue(r){var e=Nx(r,[255,216,255]);if(!(e<0)){for(var t=e+3;t+1<r.length;t++)if(r[t]===255&&r[t+1]===217)return new Blob([r.subarray(e,t+2)],{type:"image/jpeg"})}}function Bue(r){var e=Nx(r,[71,73,70,56,55,97]),t=Nx(r,[71,73,70,56,57,97]),n=e>=0?e:t;if(!(n<0)){for(var i=n+6;i<r.length;i++)if(r[i]===59)return new Blob([r.subarray(n,i+1)],{type:"image/gif"});return new Blob([r.subarray(n)],{type:"image/gif"})}}function Fue(r){for(var e=0;e+40<=r.length;e++){var t=new DataView(r.buffer,r.byteOffset+e,r.length-e),n=t.getUint32(0,!0);if(n===40){var i=t.getInt32(4,!0),o=t.getInt32(8,!0),a=t.getUint16(12,!0),s=t.getUint16(14,!0),l=t.getUint32(16,!0),c=t.getUint32(20,!0),u=t.getUint32(32,!0);if(!(i<=0||i>65536)&&!(o===0||Math.abs(o)>65536)&&a===1&&[1,4,8,16,24,32].includes(s)&&!(l!==0&&l!==3)){var h=O9(n,s,l,u),d=Math.abs(o),p=i*s+31>>5<<2,f=c>0?c:p*d,m=h+f;if(!(m<=40||e+m>r.length))return D9(r.subarray(e,e+m))}}}}function O9(r,e,t,n){var i=0;return e>8&&t===3&&(i+=12),n>0?i+=n*4:e<=8&&(i+=(1<<e)*4),r+i}function D9(r){if(!(r.length<40)){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t=e.getUint32(0,!0);if(!(t!==40&&t!==12)){var n=14+r.length,i=new Uint8Array(14),o=new DataView(i.buffer);i[0]=66,i[1]=77,o.setUint32(2,n,!0),o.setUint32(10,14+Nue(r),!0);var a=new Uint8Array(n);return a.set(i,0),a.set(r,14),new Blob([a],{type:"image/bmp"})}}}function Nue(r){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t=e.getUint32(0,!0);if(t===12){var n=e.getUint16(10,!0),i=n<=8?1<<n:0;return t+i*3}var o=e.getUint16(14,!0),a=e.getUint32(16,!0),s=e.getUint32(32,!0);return O9(t,o,a,s)}function Nx(r,e){e:for(var t=0;t<=r.length-e.length;t++){for(var n=0;n<e.length;n++)if(r[t+n]!==e[n])continue e;return t}return-1}function zue(r){if(r.length<512)throw new Error("CFB too small");for(var e=0;e<B3.length;e++)if(r[e]!==B3[e])throw new Error("Not a CFB document");var t=new DataView(r.buffer,r.byteOffset,r.byteLength),n=t.getUint16(30,!0),i=1<<n;if(i!==512&&i!==4096)throw new Error("Unsupported CFB sector size");for(var o=t.getUint32(44,!0),a=t.getUint32(48,!0),s=t.getUint32(56,!0),l=t.getUint32(60,!0),c=t.getUint32(64,!0),u=t.getUint32(68,!0),h=t.getUint32(72,!0),d=[],e=0;e<109;e++){var p=t.getUint32(76+e*4,!0);p<=4294967290&&d.push(p)}for(var f=u,m=0;m<h&&f<=4294967290;m++){var g=(f+1)*i;if(g+i>r.length)break;for(var y=i/4-1,e=0;e<y;e++){var p=t.getUint32(g+e*4,!0);p<=4294967290&&d.push(p)}f=t.getUint32(g+y*4,!0)}for(var b=[],e=0;e<Math.min(o,d.length);e++){var v=d[e],g=(v+1)*i;if(g+i>r.length)break;for(var x=i/4,w=0;w<x;w++)b.push(t.getUint32(g+w*4,!0))}for(var _=_2(b,a,4096),A=S2(r,_,i),E=[],S=Math.floor(A.length/R3),e=0;e<S;e++){var M=e*R3,T=new DataView(A.buffer,A.byteOffset+M,R3),L=T.getUint16(64,!0);if(!(L<2||L>64)){for(var O=Math.floor((L-2)/2),D="",z=0;z<O;z++)D+=String.fromCharCode(T.getUint16(z*2,!0));var N=T.getUint8(66),J=T.getUint32(116,!0),X=T.getUint32(120,!0),Q=T.getUint32(124,!0),ce=Q===0?X:X+Q*4294967296,H="unknown";N===5?H="root":N===1?H="storage":N===2&&(H="stream"),E.push({name:D,type:H,size:ce,startSector:J})}}var de=E.find(function(Ee){return Ee.type==="root"}),Se=[];if(c>0&&l<=4294967290)for(var te=_2(b,l,c),ue=S2(r,te,i),ve=new DataView(ue.buffer,ue.byteOffset,ue.byteLength),e=0;e+4<=ue.length;e+=4)Se.push(ve.getUint32(e,!0));var se;if(de&&de.size>0){var we=_2(b,de.startSector,65536);se=S2(r,we,i).subarray(0,de.size)}var pe=function(Ee){var Oe,Pe,Xe=E.find(function(ge){return ge.type==="stream"&&(ge.name===Ee||ge.name.toLowerCase()===Ee.toLowerCase())});if(!(!Xe||Xe.size<=0||Xe.size>Cue)){if(Xe.size<s&&se&&Se.length>0){var $=64,yt=R9(Se,Xe.startSector,65536),C=new Uint8Array(Xe.size),I=0;try{for(var B=zg(yt),K=B.next();!K.done;K=B.next()){var q=K.value;if(I>=Xe.size)break;var F=q*$,R=Math.min(F+$,se.length);if(F>=se.length)break;var ee=se.subarray(F,R);C.set(ee.subarray(0,Math.min(ee.length,Xe.size-I)),I),I+=ee.length}}catch(ge){Oe={error:ge}}finally{try{K&&!K.done&&(Pe=B.return)&&Pe.call(B)}finally{if(Oe)throw Oe.error}}return C.subarray(0,Math.min(I,Xe.size))}var fe=_2(b,Xe.startSector,65536);return S2(r,fe,i).subarray(0,Xe.size)}};return{entries:function(){return E},readStream:pe}}function _2(r,e,t){return R9(r,e,t)}function R9(r,e,t){for(var n=[],i=e,o=new Set;i<=4294967290&&n.length<t&&!(o.has(i)||(o.add(i),n.push(i),i>=r.length));)i=r[i];return n}function S2(r,e,t){var n,i,o=new Uint8Array(e.length*t),a=0;try{for(var s=zg(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=(c+1)*t,h=Math.min(u+t,r.length);if(u>=r.length)break;o.set(r.subarray(u,h),a),a+=t}}catch(d){n={error:d}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o}var zg,B3,Pue,F3,Eue,k9,R3,Cue,U3=W(()=>{w2();zg=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},B3=[208,207,17,224,161,177,26,225],Pue=2,F3=3,Eue=8,k9=14,R3=128,Cue=64*1024*1024});var Uue,Ux,j3=W(()=>{Gn();Uue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Ux=(function(r){Uue(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.typeName="Frame",e})(bt)});var jue,zp,M2=W(()=>{tt();wu();j3();jue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),zp=(function(r){jue(e,r);function e(){var t=r.call(this)||this;return t._oleVersion=0,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"OLEFRAME"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oleVersion",{get:function(){return this._oleVersion},set:function(t){this._oleVersion=t},enumerable:!1,configurable:!0}),e.prototype.getOleObject=function(){return this._oleObject?new Uint8Array(this._oleObject):void 0},e.prototype.setOleObject=function(t){t==null?this._oleObject=void 0:this._oleObject=t instanceof ArrayBuffer?new Uint8Array(t.slice(0)):new Uint8Array(t),this.onOleObjectChanged()},e.prototype.loadOleObjectFromDxf=function(t,n){n?.length?t!=null&&t>0&&t<n.length?this._oleObject=n.subarray(0,t):this._oleObject=new Uint8Array(n):this._oleObject=void 0,this.onOleObjectChanged()},Object.defineProperty(e.prototype,"oleObjectData",{get:function(){return this._oleObject},enumerable:!1,configurable:!0}),e.prototype.onOleObjectChanged=function(){},e.prototype.getOleProperties=function(){var t=this;return{groupName:"ole",properties:[{name:"oleVersion",type:"int",editable:!0,accessor:{get:function(){return t.oleVersion},set:function(n){t.oleVersion=n}}}]}},Object.defineProperty(e.prototype,"properties",{get:function(){return{type:this.type,groups:[this.getGeneralProperties(),this.getOleProperties()]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return new De},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){},e.prototype.dxfOutFields=function(t){var n;if(r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbOleFrame"),t.writeInt16(70,this._oleVersion),!((n=this._oleObject)===null||n===void 0)&&n.length){t.writeInt32(90,this._oleObject.length);for(var i=0;i<this._oleObject.length;){var o=this._oleObject.subarray(i,i+127);t.writeString(310,Xl(o)),i+=127}}return t.writeString(1,"OLE"),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbOleFrame");for(var i=[],o,a=function(){i.length>0&&n.loadOleObjectFromDxf(o,ds(i))};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var s=t.readItem();if(!s)break;var l=Number(s.code),c=Number(s.value);switch(l){case 1:break;case 70:this.oleVersion=c;break;case 90:o=c;break;case 310:s.value instanceof Uint8Array?i.push(s.value):i.push(String(s.value));break;default:break}}return a(),this},e.typeName="OleFrame",e})(Ux)});var Vue,B9,V3,zo,vs,jx,G3=W(()=>{tt();I3();O3();U3();Fn();wu();Gn();En();Di();M2();ro();Vue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),B9=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},V3=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};(function(r){r[r.Link=1]="Link",r[r.Embedded=2]="Embedded",r[r.Static=3]="Static"})(zo||(zo={}));(function(r){r[r.ModelSpace=0]="ModelSpace",r[r.PaperSpace=1]="PaperSpace"})(vs||(vs={}));jx=(function(r){Vue(e,r);function e(){var t=r.call(this)||this;return t._upperLeft=new k,t._lowerRight=new k,t._rotation=0,t._scaleWidth=1,t._scaleHeight=1,t._lockAspect=!1,t._outputQuality=0,t._autoOutputQuality=0,t._oleObjectType=zo.Embedded,t._tileMode=vs.ModelSpace,t._userType="",t._linkName="",t._linkPath="",t._oleClientItem=null,t._imageResolved=!1,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"OLE2FRAME"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"upperLeftCorner",{get:function(){return this._upperLeft},set:function(t){this._upperLeft.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lowerRightCorner",{get:function(){return this._lowerRight},set:function(t){this._lowerRight.copy(t)},enumerable:!1,configurable:!0}),e.prototype.getLocation=function(t){return t?t.copy(this._upperLeft):this._upperLeft.clone()},e.prototype.setLocation=function(t){var n,i=t.x-this._upperLeft.x,o=t.y-this._upperLeft.y,a=((n=t.z)!==null&&n!==void 0?n:0)-this._upperLeft.z;this._upperLeft.copy(t),this._lowerRight.x+=i,this._lowerRight.y+=o,this._lowerRight.z+=a},e.prototype.position=function(){return{upperLeft:this._upperLeft.clone(),upperRight:this.cornerUpperRight(),lowerLeft:this.cornerLowerLeft(),lowerRight:this._lowerRight.clone()}},e.prototype.setPosition=function(t){this._upperLeft.copy(t.upperLeft),this._lowerRight.copy(t.lowerRight)},e.prototype.wcsWidth=function(){return Math.abs(this._lowerRight.x-this._upperLeft.x)},e.prototype.setWcsWidth=function(t){var n=this._lowerRight.x>=this._upperLeft.x?1:-1;this._lowerRight.x=this._upperLeft.x+n*Math.abs(t),this._lockAspect&&this.syncHeightFromAspect()},e.prototype.wcsHeight=function(){return Math.abs(this._upperLeft.y-this._lowerRight.y)},e.prototype.setWcsHeight=function(t){var n=this._upperLeft.y>=this._lowerRight.y?1:-1;this._lowerRight.y=this._upperLeft.y-n*Math.abs(t),this._lockAspect&&this.syncWidthFromAspect()},e.prototype.scaleWidth=function(){return this._scaleWidth},e.prototype.setScaleWidth=function(t){this._scaleWidth=t},e.prototype.scaleHeight=function(){return this._scaleHeight},e.prototype.setScaleHeight=function(t){this._scaleHeight=t},e.prototype.rotation=function(){return this._rotation},e.prototype.setRotation=function(t){this._rotation=t},e.prototype.lockAspect=function(){return this._lockAspect},e.prototype.setLockAspect=function(t){this._lockAspect=!!t},e.prototype.outputQuality=function(){return this._outputQuality},e.prototype.setOutputQuality=function(t){this._outputQuality=t&255},e.prototype.autoOutputQuality=function(){return this._autoOutputQuality},e.prototype.setAutoOutputQuality=function(t){this._autoOutputQuality=t&255},e.prototype.getType=function(){return this._oleObjectType},e.prototype.setType=function(t){this._oleObjectType=t},Object.defineProperty(e.prototype,"oleObjectType",{get:function(){return this._oleObjectType},set:function(t){this._oleObjectType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileMode",{get:function(){return this._tileMode},set:function(t){this._tileMode=t},enumerable:!1,configurable:!0}),e.prototype.getUserType=function(){return this._userType},e.prototype.setUserType=function(t){this._userType=t},Object.defineProperty(e.prototype,"userType",{get:function(){return this._userType},set:function(t){this._userType=t},enumerable:!1,configurable:!0}),e.prototype.getLinkName=function(){return this._linkName},e.prototype.setLinkName=function(t){this._linkName=t},e.prototype.getLinkPath=function(){return this._linkPath},e.prototype.setLinkPath=function(t){this._linkPath=t},e.prototype.getOleClientItem=function(){return this._oleClientItem},e.prototype.setOleClientItem=function(t){this._oleClientItem=t??null},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:function(){return t.upperLeftCorner.x},set:function(n){t.setLocation({x:n,y:t.upperLeftCorner.y,z:t.upperLeftCorner.z})}}},{name:"positionY",type:"float",editable:!0,accessor:{get:function(){return t.upperLeftCorner.y},set:function(n){t.setLocation({x:t.upperLeftCorner.x,y:n,z:t.upperLeftCorner.z})}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:function(){return t.upperLeftCorner.z},set:function(n){t.setLocation({x:t.upperLeftCorner.x,y:t.upperLeftCorner.y,z:n})}}},{name:"rotation",type:"float",editable:!0,accessor:{get:function(){return t.rotation()},set:function(n){t.setRotation(n)}}},{name:"width",type:"float",editable:!0,accessor:{get:function(){return t.wcsWidth()},set:function(n){t.setWcsWidth(n)}}},{name:"height",type:"float",editable:!0,accessor:{get:function(){return t.wcsHeight()},set:function(n){t.setWcsHeight(n)}}},{name:"scaleWidth",type:"float",editable:!0,accessor:{get:function(){return t.scaleWidth()},set:function(n){t.setScaleWidth(n)}}},{name:"scaleHeight",type:"float",editable:!0,accessor:{get:function(){return t.scaleHeight()},set:function(n){t.setScaleHeight(n)}}},{name:"lockAspect",type:"boolean",editable:!0,accessor:{get:function(){return t.lockAspect()},set:function(n){t.setLockAspect(n)}}}]},{groupName:"ole",properties:V3(V3([],B9(this.getOleProperties().properties),!1),[{name:"userType",type:"string",editable:!0,accessor:{get:function(){return t.userType},set:function(n){t.userType=n}}},{name:"oleObjectType",type:"enum",editable:!0,options:[{label:zo[zo.Link],value:zo.Link},{label:zo[zo.Embedded],value:zo.Embedded},{label:zo[zo.Static],value:zo.Static}],accessor:{get:function(){return t.oleObjectType},set:function(n){t.oleObjectType=n}}},{name:"tileMode",type:"enum",editable:!0,options:[{label:vs[vs.ModelSpace],value:vs.ModelSpace},{label:vs[vs.PaperSpace],value:vs.PaperSpace}],accessor:{get:function(){return t.tileMode},set:function(n){t.tileMode=n}}},{name:"linkName",type:"string",editable:!0,accessor:{get:function(){return t.getLinkName()},set:function(n){t.setLinkName(n)}}},{name:"linkPath",type:"string",editable:!0,accessor:{get:function(){return t.getLinkPath()},set:function(n){t.setLinkPath(n)}}},{name:"outputQuality",type:"int",editable:!0,accessor:{get:function(){return t.outputQuality()},set:function(n){t.setOutputQuality(n)}}},{name:"autoOutputQuality",type:"int",editable:!0,accessor:{get:function(){return t.autoOutputQuality()},set:function(n){t.setAutoOutputQuality(n)}}}],!1)}]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return new De().setFromPoints(this.boundaryPath())},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return or(this.boundaryPath().slice(0,4),!0)},e.prototype.subGetGripPoints=function(){return this.boundaryPath().slice(0,4)},e.prototype.subMoveGripPointsAt=function(t,n){var i=this,o=this.boundaryPath().slice(0,4);return fs(t,n,o),un(t,function(a){a===0?i._upperLeft.copy(o[0]):a===2?i._lowerRight.copy(o[2]):a===1?(i._upperLeft.y=o[1].y,i._lowerRight.x=o[1].x,i._upperLeft.z=o[1].z,i._lowerRight.z=o[1].z):a===3&&(i._upperLeft.x=o[3].x,i._lowerRight.y=o[3].y,i._upperLeft.z=o[3].z,i._lowerRight.z=o[3].z)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){if(t===ne.Insertion){o.push(this._upperLeft.clone());return}var a=this.boundaryPath().slice(0,4);if(t===ne.EndPoint){o.push.apply(o,V3([],B9(a),!1));return}Mh(a,!0,t,n,o)},e.prototype.transformBy=function(t){var n=this._lowerRight.x-this._upperLeft.x,i=this._upperLeft.y-this._lowerRight.y,o=Math.cos(this._rotation),a=Math.sin(this._rotation),s=this._upperLeft.clone(),l=s.clone().add(new G(n*o,n*a,0)),c=s.clone().add(new G(i*a,-i*o,0));s.applyMatrix4(t),l.applyMatrix4(t),c.applyMatrix4(t);var u=new G().subVectors(l,s),h=new G().subVectors(c,s);return this._upperLeft.copy(s),this._rotation=Math.atan2(u.y,u.x),this._lowerRight.set(s.x+u.length(),s.y-h.length(),s.z),this},Object.defineProperty(e.prototype,"image",{get:function(){return this.resolveImage()},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=this.resolveImage(),i=this.imageBoundaryPath();return n?t.image(n,{boundary:i,roation:this._rotation}):v2(t,this.boundaryPath())},e.prototype.onOleObjectChanged=function(){this._image=void 0,this._imageResolved=!1,this.applyGeometryFromOleObjectData()},e.prototype.applyGeometryFromOleObjectData=function(){var t=Dx(this.oleObjectData);t&&(this._upperLeft.copy(t.upperLeft),this._lowerRight.copy(t.lowerRight))},e.prototype.resolveImage=function(){return this._imageResolved?this._image:(this._imageResolved=!0,this._image=zx(this.oleObjectData),this._image)},e.prototype.imageBoundaryPath=function(){var t=this.boundaryPath(),n=[t[3],t[2],t[1],t[0]];return n.push(n[0].clone()),n},e.prototype.dxfOutFields=function(t){bt.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbOle2Frame"),t.writeInt16(70,this.oleVersion),this._userType&&t.writeString(3,this._userType),t.writePoint3d(10,this._upperLeft),t.writePoint3d(11,this._lowerRight),t.writeInt16(71,this._oleObjectType),t.writeInt16(72,this._tileMode),this._outputQuality&&t.writeInt16(73,this._outputQuality);var n=this.getOleObject();if(n?.length){t.writeInt32(90,n.length);for(var i=0;i<n.length;){var o=n.subarray(i,i+127);t.writeString(310,Xl(o)),i+=127}}return t.writeString(1,"OLE"),this},e.prototype.dxfInFields=function(t){var n=this;bt.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbOle2Frame");for(var i=this._upperLeft.x,o=this._upperLeft.y,a=this._upperLeft.z,s=this._lowerRight.x,l=this._lowerRight.y,c=this._lowerRight.z,u=[],h,d=function(){n.upperLeftCorner=new k(i,o,a),n.lowerRightCorner=new k(s,l,c),u.length>0&&n.loadOleObjectFromDxf(h,ds(u))};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var p=t.readItem();if(!p)break;var f=Number(p.code),m=Number(p.value);switch(f){case 1:break;case 3:this.userType=String(p.value);break;case 10:i=m;break;case 20:o=m;break;case 30:a=m;break;case 11:s=m;break;case 21:l=m;break;case 31:c=m;break;case 70:this.oleVersion=m;break;case 71:this.oleObjectType=m;break;case 72:this.tileMode=m;break;case 73:this.setOutputQuality(m);break;case 90:h=m;break;case 310:p.value instanceof Uint8Array?u.push(p.value):u.push(String(p.value));break;default:break}}return d(),this},e.prototype.cornerUpperRight=function(){return new k(this._lowerRight.x,this._upperLeft.y,this._upperLeft.z)},e.prototype.cornerLowerLeft=function(){return new k(this._upperLeft.x,this._lowerRight.y,this._lowerRight.z)},e.prototype.boundaryPath=function(){var t=[this._upperLeft.clone(),this.cornerUpperRight(),this._lowerRight.clone(),this.cornerLowerLeft()];if(this._rotation!==0)for(var n=this._upperLeft,i=1;i<t.length;i++)t[i].sub(n).applyMatrix4(new Ie().makeRotationZ(this._rotation)),t[i].add(n);return t.push(t[0].clone()),t},e.prototype.syncHeightFromAspect=function(){var t=this.wcsWidth();if(!(t===0||this._scaleWidth===0)){var n=this._scaleHeight/this._scaleWidth,i=t*n,o=this._upperLeft.y>=this._lowerRight.y?1:-1;this._lowerRight.y=this._upperLeft.y-o*Math.abs(i)}},e.prototype.syncWidthFromAspect=function(){var t=this.wcsHeight();if(!(t===0||this._scaleHeight===0)){var n=this._scaleWidth/this._scaleHeight,i=t*n,o=this._lowerRight.x>=this._upperLeft.x?1:-1;this._lowerRight.x=this._upperLeft.x+o*Math.abs(i)}},e.typeName="Ole2Frame",e})(zp)});var Gue,Up,H3=W(()=>{tt();Fn();Gn();En();Gue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Up=(function(r){Gue(e,r);function e(){var t=r.call(this)||this;return t._thickness=0,t._normal=new G(0,0,1),t._ecsRotation=0,t._geo=new k,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"POINT"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._geo},set:function(t){this._geo.set(t.x,t.y,t.z||0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ecsRotation",{get:function(){return this._ecsRotation},set:function(t){this._ecsRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return new De().expandByPoint(this._geo)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return[this._geo]},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this._geo),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){t===ne.Node&&o.push(this._geo)},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:function(){return t.position.x},set:function(n){t.position.x=n}}},{name:"positionY",type:"float",editable:!0,accessor:{get:function(){return t.position.y},set:function(n){t.position.y=n}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:function(){return t.position.z},set:function(n){t.position.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.transformBy=function(t){return this._geo.applyMatrix4(t),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){var t,n,i=(n=(t=this.database)===null||t===void 0?void 0:t.pdmode)!==null&&n!==void 0?n:0;return i===0?"point":null},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){return t.point(this._geo,{displayMode:this.database.pdmode,displaySize:this.database.pdsize})},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbPoint"),this.thickness!==0&&t.writeDouble(39,this.thickness),t.writePoint3d(10,this.position),this.ecsRotation!==0&&t.writeAngle(50,this.ecsRotation),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbPoint");for(var n=this.position.x,i=this.position.y,o=this.position.z,a=this.thickness,s=this.ecsRotation*180/Math.PI,l=this.normal.x,c=this.normal.y,u=this.normal.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var h=t.readItem();if(!h)break;var d=Number(h.code),p=Number(h.value);switch(d){case 10:n=p;break;case 20:i=p;break;case 30:o=p;break;case 39:a=p;break;case 50:s=p;break;case 210:l=p;break;case 220:c=p;break;case 230:u=p;break;default:break}}var f=new G(l,c,u);return f.lengthSq()>0&&this.normal.copy(f.normalize()),this.thickness=a,this.ecsRotation=s*Math.PI/180,this.position=new k(n,i,o),this},e.typeName="Point",e})(bt)});var Hue,F9,N9,Vx,W3=W(()=>{tt();wu();Gn();En();Hue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),F9=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},N9=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Vx=(function(r){Hue(e,r);function e(){var t=r.apply(this,N9([],F9(arguments),!1))||this;return t._originalDxfName="",t._originalClassName="",t._applicationName="",t._proxyEntityClassId=498,t._applicationEntityClassId=0,t._objectDrawingFormat=0,t._originalDataFormat=0,t._entityOrigins=[],t._worldTransform=new Ie,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"ACAD_PROXY_ENTITY"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalDxfName",{get:function(){return this._originalDxfName},set:function(t){this._originalDxfName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalClassName",{get:function(){return this._originalClassName},set:function(t){this._originalClassName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"applicationName",{get:function(){return this._applicationName},set:function(t){this._applicationName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"proxyEntityClassId",{get:function(){return this._proxyEntityClassId},set:function(t){this._proxyEntityClassId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"applicationEntityClassId",{get:function(){return this._applicationEntityClassId},set:function(t){this._applicationEntityClassId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"objectDrawingFormat",{get:function(){return this._objectDrawingFormat},set:function(t){this._objectDrawingFormat=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"graphicsMetafileType",{get:function(){return this._objectDrawingFormat},set:function(t){this._objectDrawingFormat=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalDataFormat",{get:function(){return this._originalDataFormat},set:function(t){this._originalDataFormat=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"proxyGraphic",{get:function(){return this._proxyGraphic},enumerable:!1,configurable:!0}),e.prototype.setProxyGraphic=function(t){this._proxyGraphic=t?new Uint8Array(t):void 0},Object.defineProperty(e.prototype,"entityOrigins",{get:function(){return this._entityOrigins},enumerable:!1,configurable:!0}),e.prototype.setEntityOrigins=function(t){this._entityOrigins=t.map(function(n){return new k(n.x,n.y,n.z)})},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this._proxyGraphic;if(!t?.length)return new De;var n=new Mp(t,{database:this.database,defaultLayer:this.layer}),i=n.scanExtents();if(i){var o=new De().setFromPoints(i);return this._worldTransform.equals(new Ie)||o.applyMatrix4(this._worldTransform),o}return new De},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){if(this._entityOrigins.length>0)return N9([],F9(this._entityOrigins),!1);var t=this.geometricExtents;return t.isEmpty()?[]:[new k(t.min.x,t.min.y,t.min.z),new k(t.max.x,t.max.y,t.max.z)]},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;if(this._entityOrigins.length>0)return fs(t,n,this._entityOrigins),this;var o=this.geometricExtents;return o.isEmpty()?this:(un(t,function(a){a===0&&i.transformBy(Ie.makeTranslation(n))}),this)},e.prototype.transformBy=function(t){return this._entityOrigins.forEach(function(n){return n.applyMatrix4(t)}),this._worldTransform.premultiply(t),this},e.prototype.subWorldDraw=function(t){var n=this._proxyGraphic;if(n?.length){var i=new Mp(n,{database:this.database,defaultLayer:this.layer}),o=i.worldDraw(t);return o&&!this._worldTransform.equals(new Ie)&&o.applyMatrix(this._worldTransform),o}},e.prototype.dxfOutFields=function(t){var n;if(r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbProxyEntity"),this._originalDxfName&&t.writeString(1,this._originalDxfName),this._originalClassName&&t.writeString(3,this._originalClassName),t.writeInt32(90,this._proxyEntityClassId||498),this._applicationEntityClassId&&t.writeInt32(91,this._applicationEntityClassId),this._objectDrawingFormat&&t.writeInt32(95,this._objectDrawingFormat),t.writeInt16(70,this._originalDataFormat),!((n=this._proxyGraphic)===null||n===void 0)&&n.length){t.writeInt32(160,this._proxyGraphic.length);for(var i=0;i<this._proxyGraphic.length;){var o=this._proxyGraphic.subarray(i,i+127);t.writeString(310,Xl(o)),i+=127}}return this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbProxyEntity");for(var n=[],i;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var o=t.readItem();if(!o)break;var a=Number(o.code),s=Number(o.value);switch(a){case 1:this.originalDxfName=String(o.value);break;case 3:this.originalClassName=String(o.value);break;case 70:this.originalDataFormat=s;break;case 90:this.proxyEntityClassId=s;break;case 91:this.applicationEntityClassId=s;break;case 95:this.objectDrawingFormat=s;break;case 160:i=s;break;case 310:o.value instanceof Uint8Array?n.push(o.value):n.push(String(o.value));break;default:break}}return n.length>0&&this.loadProxyGraphicFromDxf(i,n),this},e.prototype.loadProxyGraphicFromDxf=function(t,n){var i=hO(t,n);i&&this.setProxyGraphic(i)},e.typeName="ProxyEntity",e})(bt)});var Wue,z9,U9,Xue,Ug,ic,hl,j9,P2,E2=W(()=>{tt();Li();bi();I3();Fn();Gn();En();Di();ro();dp();Wue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),z9=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},U9=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Xue=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.Invalid=0]="Invalid",r[r.Rect=1]="Rect",r[r.Poly=2]="Poly"})(Ug||(Ug={}));(function(r){r[r.Show=1]="Show",r[r.ShowUnAligned=2]="ShowUnAligned",r[r.Clip=4]="Clip",r[r.Transparent=8]="Transparent"})(ic||(ic={}));hl=(function(r){Wue(e,r);function e(){var t=r.call(this)||this;return t._classVersion=0,t._clipMode=0,t._brightness=50,t._contrast=50,t._fade=0,t._width=0,t._height=0,t._position=new k,t._scale=new Ut(1,1),t._rotation=0,t._imageSize=new Z,t._clipBoundaryType=Ug.Rect,t._clipBoundary=[],t._isClipped=!1,t._isShownClipped=!1,t._isImageShown=!0,t._isImageTransparent=!1,t._imageDefId="",t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"IMAGE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"brightness",{get:function(){return this._brightness},set:function(t){this._brightness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contrast",{get:function(){return this._contrast},set:function(t){this._contrast=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fade",{get:function(){return this._fade},set:function(t){this._fade=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(t){this._position=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},set:function(t){this._scale.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageSize",{get:function(){return this._imageSize},set:function(t){this._imageSize.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clipBoundaryType",{get:function(){return this._clipBoundaryType},set:function(t){this._clipBoundaryType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clipBoundary",{get:function(){return this._clipBoundary},set:function(t){var n;this._clipBoundary=[],(n=this._clipBoundary).push.apply(n,U9([],z9(t),!1))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClipped",{get:function(){return this._isClipped},set:function(t){this._isClipped=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isShownClipped",{get:function(){return this._isShownClipped},set:function(t){this._isShownClipped=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isImageShown",{get:function(){return this._isImageShown},set:function(t){this._isImageShown=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isImageTransparent",{get:function(){return this._isImageTransparent},set:function(t){this._isImageTransparent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classVersion",{get:function(){return this._classVersion},set:function(t){this._classVersion=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clipMode",{get:function(){return this._clipMode},set:function(t){this._clipMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return this._image},set:function(t){this._image=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageDefId",{get:function(){return this._imageDefId},set:function(t){this._imageDefId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageFileName",{get:function(){var t;if(this._imageDefId){var n=this.database.objects.imageDefinition,i=(t=n.getIdAt(this._imageDefId))!==null&&t!==void 0?t:n.getAt(this._imageDefId);if(i)return i.sourceFileName}return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageDisplayName",{get:function(){var t=this.imageFileName.trim();if(!t)return"";var n=t.replace(/\\/g,"/").split("/");return n[n.length-1]||t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"name",type:"string",editable:!1,accessor:{get:function(){return t.imageFileName||t.imageDisplayName}}},{name:"positionX",type:"float",editable:!0,accessor:{get:function(){return t.position.x},set:function(n){t.position.x=n}}},{name:"positionY",type:"float",editable:!0,accessor:{get:function(){return t.position.y},set:function(n){t.position.y=n}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:function(){return t.position.z},set:function(n){t.position.z=n}}},{name:"rotation",type:"float",editable:!0,accessor:{get:function(){return t.rotation},set:function(n){t.rotation=n}}},{name:"width",type:"float",editable:!0,accessor:{get:function(){return t.width},set:function(n){t.width=n}}},{name:"height",type:"float",editable:!0,accessor:{get:function(){return t.height},set:function(n){t.height=n}}}]},{groupName:"image",properties:[{name:"brightness",type:"int",editable:!0,accessor:{get:function(){return t.brightness},set:function(n){t.brightness=n}}},{name:"contrast",type:"int",editable:!0,accessor:{get:function(){return t.contrast},set:function(n){t.contrast=n}}},{name:"fade",type:"int",editable:!0,accessor:{get:function(){return t.fade},set:function(n){t.fade=n}}},{name:"isImageShown",type:"boolean",editable:!0,accessor:{get:function(){return t.isImageShown},set:function(n){t.isImageShown=n}}},{name:"isImageTransparent",type:"boolean",editable:!0,accessor:{get:function(){return t.isImageTransparent},set:function(n){t.isImageTransparent=n}}},{name:"isClipped",type:"boolean",editable:!0,accessor:{get:function(){return t.isClipped},set:function(n){t.isClipped=n}}},{name:"isShownClipped",type:"boolean",editable:!0,accessor:{get:function(){return t.isShownClipped},set:function(n){t.isShownClipped=n}}}]}]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=new De;return t.min.copy(this._position),t.max.set(this._position.x+this._width,this._position.y+this._height,0),t},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return or(this.boundaryPath(),!0)},e.prototype.subGetGripPoints=function(){return this.boundaryPath()},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){i.isClipped&&i._clipBoundary.length>3?i.moveClippedBoundaryGripAt(o,n):i.moveUnclippedGripAt(o,n)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){if(t===ne.Insertion){o.push(this._position);return}var a=this.boundaryPath();if(a.length!==0){var s=a;if(a.length>1){var l=a[0],c=a[a.length-1];l.x===c.x&&l.y===c.y&&(l.z||0)===(c.z||0)&&(s=a.slice(0,-1))}if(t===ne.EndPoint){o.push.apply(o,U9([],z9(s),!1));return}Mh(s,!0,t,n,o)}},e.prototype.subWorldDraw=function(t){var n=this.boundaryPath();if(this._image&&this.isImageShown)return t.image(this._image,{boundary:n,roation:this._rotation});var i=v2(t,n),o=this.drawMissingImageLabel(t,n);return o?i?t.group([i,o]):o:i},e.prototype.drawMissingImageLabel=function(t,n){if(!(this._image||n.length<3)){var i="";try{i=this.imageFileName.trim()}catch{return}if(i){var o=this.boundaryCenter(n),a=this.boundaryLocalSize(n),s=a.width,l=a.height,c=a.rotation;if(!(s<=0||l<=0)){var u=i.replace(/\\/g,"/"),h=this.fitLabelTextHeight(u,s,l);if(!(h<=0)){var d=p7(i),p=oa(u,h),f={text:d,height:h,width:Math.max(p,h),position:o,rotation:c,attachmentPoint:ut.MiddleCenter};try{return t.mtext(f,this.resolveLabelTextStyle())}catch{return}}}}}},e.prototype.resolveLabelTextStyle=function(){var t,n=this.database.tables.textStyleTable,i=(t=n.resolveAt(cn))!==null&&t!==void 0?t:n.resolveAt("STANDARD");return i?i.textStyle:{name:cn,standardFlag:0,fixedTextHeight:0,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:0,font:"txt",bigFont:""}},e.prototype.fitLabelTextHeight=function(t,n,i){var o=n*.85,a=i*.85;if(o<=0||a<=0||!t)return 0;for(var s=0,l=a,c=0;c<24;c++){var u=(s+l)/2,h=oa(t,u);h<=o&&u<=a?s=u:l=u}return s},e.prototype.boundaryCenter=function(t){var n=t.length;n>1&&t[0].x===t[n-1].x&&t[0].y===t[n-1].y&&(n-=1);for(var i=0,o=0,a=0,s=0;s<n;s++)i+=t[s].x,o+=t[s].y,a+=t[s].z;return new k(i/n,o/n,a/n)},e.prototype.boundaryLocalSize=function(t){var n=t.length;if(n>1&&t[0].x===t[n-1].x&&t[0].y===t[n-1].y&&(n-=1),n<2)return{width:this._width,height:this._height,rotation:this._rotation};var i=t[0],o=t[1],a=o.x-i.x,s=o.y-i.y,l=Math.hypot(a,s),c=Math.atan2(s,a);if(l<=0)return{width:this._width,height:this._height,rotation:this._rotation};for(var u=a/l,h=s/l,d=0,p=0,f=0;f<n;f++){var m=t[f].x-i.x,g=t[f].y-i.y,y=m*-h+g*u;d=Math.min(d,y),p=Math.max(p,y)}var b=Math.max(p-d,0);return{width:l>0?l:this._width,height:b>0?b:this._height,rotation:c}},e.prototype.transformBy=function(t){var n=this._width*this._scale.x,i=this._height*this._scale.y,o=new G(n*Math.cos(this._rotation),n*Math.sin(this._rotation),0),a=new G(-i*Math.sin(this._rotation),i*Math.cos(this._rotation),0),s=this._position.clone(),l=this._position.clone().add(o),c=this._position.clone().add(a);s.applyMatrix4(t),l.applyMatrix4(t),c.applyMatrix4(t);var u=new G(l).sub(s),h=new G(c).sub(s);return this._position.copy(s),this._rotation=Math.atan2(u.y,u.x),this._width=u.length(),this._height=h.length(),this._scale.set(1,1),this},e.prototype.moveUnclippedGripAt=function(t,n){var i=this._position.x,o=this._position.y,a=this._width,s=this._height;switch(t){case 0:this._position.add(n);break;case 1:{var l=i,c=o+s,u=i+a+n.x,h=o+n.y;this._position.x=l,this._position.y=h,this._width=u-l,this._height=c-h;break}case 2:{var u=i+a+n.x,h=o+s+n.y;this._width=u-i,this._height=h-o;break}case 3:{var l=i+a,c=o,u=i+n.x,h=o+s+n.y;this._position.x=u,this._position.y=c,this._width=l-u,this._height=h-c;break}default:break}},e.prototype.moveClippedBoundaryGripAt=function(t,n){if(!(t<0||t>=this._clipBoundary.length)){var i=this._width,o=this._height,a=new ct;a.setFromPoints(this._clipBoundary);var s=new Z;s.setX(this._position.x-a.min.x*i),s.setY(this._position.y-a.min.y*o);var l=this._clipBoundary[t],c=l.x*i+s.x+n.x,u=l.y*o+s.y+n.y;l.x=(c-s.x)/i,l.y=(u-s.y)/o}},e.prototype.boundaryPath=function(){var t=this,n=[];if(this.isClipped&&this._clipBoundary.length>3){var i=this._width,o=this._height,a=new ct;a.setFromPoints(this._clipBoundary);var s=new Z;s.setX(this._position.x-a.min.x*i),s.setY(this._position.y-a.min.y*o),this._clipBoundary.forEach(function(c){var u=c.x*i+s.x,h=c.y*o+s.y;n.push(new k(u,h,t._position.z))})}else{if(n.push(this._position),n.push(this._position.clone().setX(this._position.x+this._width)),n.push(this._position.clone().set(this._position.x+this._width,this._position.y+this._height,this._position.z)),n.push(this._position.clone().setY(this._position.y+this._height)),this._rotation>0){j9.copy(n[1]);for(var l=1;l<4;l++)P2.copy(n[l]),P2.rotateAround(j9,this._rotation),n[l].setX(P2.x),n[l].setY(P2.y)}n.push(n[0])}return n},e.prototype.dxfOutFields=function(t){var n,i;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbRasterImage"),t.writeInt32(90,this.classVersion),t.writePoint3d(10,this.position);var o=this.width*this.scale.x,a=this.height*this.scale.y,s=this._imageSize.x>0&&this._imageSize.y>0?this._imageSize:{x:o,y:a},l=s.x>0?o/s.x:o,c=s.y>0?a/s.y:a,u=Math.cos(this._rotation),h=Math.sin(this._rotation);t.writePoint3d(11,{x:l*u,y:l*h,z:0}),t.writePoint3d(12,{x:-c*h,y:c*u,z:0}),t.writePoint2d(13,s),t.writeObjectId(340,this.imageDefId);var d=(this.isImageShown?ic.Show:0)|(this.isShownClipped?ic.Clip:0)|(this.isImageTransparent?ic.Transparent:0);if(t.writeInt16(70,d),t.writeInt16(280,this.isClipped?1:0),t.writeInt16(281,this.brightness),t.writeInt16(282,this.contrast),t.writeInt16(283,this.fade),t.writeInt16(71,this.clipBoundaryType),this.isClipped){t.writeInt16(91,this.clipBoundary.length);try{for(var p=Xue(this.clipBoundary),f=p.next();!f.done;f=p.next()){var m=f.value;t.writePoint2d(14,m)}}catch(g){n={error:g}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}return t.writeInt16(290,this.clipMode),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbRasterImage");for(var n=this.position.x,i=this.position.y,o=this.position.z,a=1,s=0,l=0,c=0,u=1,h=0,d=this.imageSize.x,p=this.imageSize.y,f=[],m=null,g=function(){m&&(f.push(new Z(m.x,m.y)),m=null)};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var y=t.readItem();if(!y)break;var b=Number(y.code),v=Number(y.value);switch(b){case 10:n=v;break;case 20:i=v;break;case 30:o=v;break;case 11:a=v;break;case 21:s=v;break;case 31:l=v;break;case 12:c=v;break;case 22:u=v;break;case 32:h=v;break;case 13:d=v;break;case 23:p=v;break;case 14:g(),m={x:v,y:0};break;case 24:m&&(m.y=v);break;case 70:{this.isImageShown=(v&3)!==0,this.isShownClipped=(v&ic.Clip)!==0,this.isImageTransparent=(v&ic.Transparent)!==0;break}case 71:this.clipBoundaryType=v;break;case 90:this.classVersion=v;break;case 91:break;case 280:this.isClipped=v!==0;break;case 281:this.brightness=v;break;case 282:this.contrast=v;break;case 283:this.fade=v;break;case 290:this.clipMode=v;break;case 340:this.imageDefId=String(y.value);break;default:break}}return g(),this.applyRasterImageDxfIn(n,i,o,a,s,l,c,u,h,d,p,f),this},e.prototype.applyRasterImageDxfIn=function(t,n,i,o,a,s,l,c,u,h,d,p){this.position.copy({x:t,y:n,z:i}),this.imageSize.copy({x:h,y:d});var f=Math.hypot(o,a,s),m=Math.hypot(l,c,u);this.width=f*(h||1),this.height=m*(d||1),this.rotation=Math.atan2(a,o),p.length>0&&(this.clipBoundary=p)},e.typeName="RasterImage",e})(bt),j9=new Z,P2=new Z});var Yue,oc,X3=W(()=>{tt();Fn();no();En();Yue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),oc=(function(r){Yue(e,r);function e(){var t=r.call(this)||this;return t._basePoint=new k,t._unitDir=new G,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"RAY"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"basePoint",{get:function(){return this._basePoint},set:function(t){this._basePoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unitDir",{get:function(){return this._unitDir},set:function(t){this._unitDir.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=new De;return t.expandByPoint(this._unitDir.clone().multiplyScalar(10).add(this._basePoint)),t.expandByPoint(this._unitDir.clone().multiplyScalar(-10).add(this._basePoint)),t},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t=this._basePoint.clone().add(this._unitDir);return[{kind:"line",line:new Yn(this._basePoint,t),extent:"ray"}]},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"basePointX",type:"float",editable:!0,accessor:{get:function(){return t.basePoint.x},set:function(n){t.basePoint.x=n}}},{name:"basePointY",type:"float",editable:!0,accessor:{get:function(){return t.basePoint.y},set:function(n){t.basePoint.y=n}}},{name:"basePointZ",type:"float",editable:!0,accessor:{get:function(){return t.basePoint.z},set:function(n){t.basePoint.z=n}}},{name:"unitDirX",type:"float",editable:!0,accessor:{get:function(){return t.unitDir.x},set:function(n){t.unitDir.x=n}}},{name:"unitDirY",type:"float",editable:!0,accessor:{get:function(){return t.unitDir.y},set:function(n){t.unitDir.y=n}}},{name:"unitDirZ",type:"float",editable:!0,accessor:{get:function(){return t.unitDir.z},set:function(n){t.unitDir.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push(this.basePoint),t},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this.basePoint),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=this.basePoint;if(t===ne.EndPoint){o.push(a);return}var s=this.unitDir.clone();if(s.lengthSq()!==0){s.normalize();var l=new Yn(a,a.clone().add(s));switch(t){case ne.Nearest:{var c=l.project(n),u=new G(c).sub(a),h=u.dot(s);o.push(h<0?a:c);break}case ne.Perpendicular:o.push(l.perpPoint(n));break;default:break}}},e.prototype.transformBy=function(t){return this._basePoint.applyMatrix4(t),this._unitDir.transformDirection(t),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=[];return n.push(this.basePoint),n.push(this._unitDir.clone().multiplyScalar(1e6).add(this._basePoint)),t.lines(n)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbRay"),t.writePoint3d(10,this.basePoint),t.writeVector3d(11,this.unitDir),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbRay");for(var n=this.basePoint.x,i=this.basePoint.y,o=this.basePoint.z,a=this.unitDir.x,s=this.unitDir.y,l=this.unitDir.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var c=t.readItem();if(!c)break;var u=Number(c.code),h=Number(c.value);switch(u){case 10:n=h;break;case 20:i=h;break;case 30:o=h;break;case 11:a=h;break;case 21:s=h;break;case 31:l=h;break;default:break}}return this.basePoint=new k(n,i,o),this.unitDir=new G(a,s,l),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.basePoint,i=this.unitDir,o=Math.hypot(i.x,i.y);return o<=1e-9||(i.x*(t.y-n.y)-i.y*(t.x-n.x))/o>=0?1:-1},e.prototype.createOffsetCurve=function(t){var n=km(this.basePoint,this.unitDir,t);if(!n)return null;var i=new e;return i.basePoint=n,i.unitDir=this.unitDir.clone(),i},e.typeName="Ray",e})(vn)});var $ue,jg,Gx,Y3=W(()=>{tt();Fn();Gn();En();$ue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),jg=function(){return jg=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},jg.apply(this,arguments)},Gx=(function(r){$ue(e,r);function e(){var t=r.call(this)||this;return t._position=new k,t._size=1,t._name="",t._rotation=0,t._widthFactor=1,t._oblique=0,t._thickness=0,t._normal=new G(0,0,1),t._shapeNumber=0,t._styleName="",t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"SHAPE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(t){this._position.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(t){this._size=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"widthFactor",{get:function(){return this._widthFactor},set:function(t){this._widthFactor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oblique",{get:function(){return this._oblique},set:function(t){this._oblique=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shapeNumber",{get:function(){return this._shapeNumber},set:function(t){this._shapeNumber=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleId",{get:function(){var t,n,i,o,a=(i=(n=(t=this.database)===null||t===void 0?void 0:t.tables)===null||n===void 0?void 0:n.textStyleTable)===null||i===void 0?void 0:i.resolveAt(this._styleName);return(o=a?.objectId)!==null&&o!==void 0?o:""},set:function(t){var n,i,o,a=(o=(i=(n=this.database)===null||n===void 0?void 0:n.tables)===null||i===void 0?void 0:i.textStyleTable)===null||o===void 0?void 0:o.getIdAt(t);a&&(this._styleName=a.name)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleName",{get:function(){return this._styleName},set:function(t){this._styleName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPlanar",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=Math.abs(this._size)/2,n=new De;return n.expandByPoint(this._position),t>0&&(n.expandByPoint(new k(this._position.x-t,this._position.y-t,this._position.z)),n.expandByPoint(new k(this._position.x+t,this._position.y+t,this._position.z))),n},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return[this._position]},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this._position),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){t===ne.Insertion&&o.push(this._position)},e.prototype.transformBy=function(t){var n=new Ie().setFromExtrusionDirection(this._normal),i=new Ie().makeRotationZ(this._rotation),o=new Ie().multiplyMatrices(n,i),a=this._position.clone(),s=new k(this._widthFactor,0,0).applyMatrix4(o).add(a),l=new k(0,1,0).applyMatrix4(o).add(a),c=new k(0,0,1).applyMatrix4(o).add(a);a.applyMatrix4(t),s.applyMatrix4(t),l.applyMatrix4(t),c.applyMatrix4(t);var u=new G(s).sub(a),h=new G(l).sub(a),d=new G(c).sub(a),p=new G().crossVectors(u,h);p.lengthSq()===0?p=this._normal.clone().transformDirection(t):p.normalize();var f=new Ie().setFromExtrusionDirection(p),m=f.clone().invert(),g=u.clone().applyMatrix4(m),y=h.length(),b=u.length();this._position.copy(a),this._normal.copy(p),b>0&&(this._rotation=Math.atan2(g.y,g.x)),y>0&&(this._size*=y,b>0&&(this._widthFactor*=b/y));var v=d.length();return v>0&&(this._thickness*=v),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"shape",properties:[{name:"name",type:"string",editable:!0,accessor:{get:function(){return t.name},set:function(n){t.name=n}}},{name:"size",type:"float",editable:!0,accessor:{get:function(){return t.size},set:function(n){t.size=n}}},{name:"rotation",type:"float",editable:!0,accessor:{get:function(){return t.rotation},set:function(n){t.rotation=n}}},{name:"widthFactor",type:"float",editable:!0,accessor:{get:function(){return t.widthFactor},set:function(n){t.widthFactor=n}}},{name:"oblique",type:"float",editable:!0,accessor:{get:function(){return t.oblique},set:function(n){t.oblique=n}}},{name:"shapeNumber",type:"int",editable:!0,accessor:{get:function(){return t.shapeNumber},set:function(n){t.shapeNumber=n}}}]},{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:function(){return t.position.x},set:function(n){t.position.x=n}}},{name:"positionY",type:"float",editable:!0,accessor:{get:function(){return t.position.y},set:function(n){t.position.y=n}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:function(){return t.position.z},set:function(n){t.position.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t,n){var i=this.getTextStyle(),o=i?jg(jg({},i),{widthFactor:this.widthFactor,obliqueAngle:this.oblique*180/Math.PI}):void 0,a=jg(jg({},this.renderGlyphIdentity()),{size:this.size,position:this._position,rotation:this._rotation,directionVector:this._normal,widthFactor:this.widthFactor});return t.shape(a,o,n)},e.prototype.renderGlyphIdentity=function(){var t=this._name.trim(),n=Number(t);return t!==""&&Number.isInteger(n)&&n!==0&&String(n)===t?{shapeNumber:n}:{name:t||void 0,shapeNumber:this._shapeNumber!==0?this._shapeNumber:void 0}},e.prototype.getTextStyle=function(){var t=this.styleName.trim();if(t){var n=this.database.tables.textStyleTable.resolveAt(t);return n?.textStyle}},Object.defineProperty(e.prototype,"dxfShapeIdentity",{get:function(){var t=this._name.trim();return t||(this._shapeNumber!==0?String(this._shapeNumber):"")},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbShape"),t.writePoint3d(10,this.position),t.writeDouble(40,this.size);var n=this.dxfShapeIdentity;return n&&t.writeString(2,n),t.writeAngle(50,this.rotation),t.writeDouble(41,this.widthFactor),t.writeAngle(51,this.oblique),t.writeDouble(39,this.thickness),this._styleName&&t.writeString(3,this._styleName),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbShape");for(var n=this.position.x,i=this.position.y,o=this.position.z,a=this.normal.x,s=this.normal.y,l=this.normal.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var c=t.readItem();if(!c)break;var u=Number(c.code),h=Number(c.value);switch(u){case 10:n=h;break;case 20:i=h;break;case 30:o=h;break;case 2:{var d=String(c.value).trim(),p=Number(d);d!==""&&Number.isInteger(p)&&p!==0&&String(p)===d?(this.shapeNumber=p,this.name=""):this.name=d;break}case 3:this.styleName=String(c.value);break;case 39:this.thickness=h;break;case 40:this.size=h;break;case 41:this.widthFactor=h;break;case 50:this.rotation=xe.degToRad(h);break;case 51:this.oblique=xe.degToRad(h);break;case 210:a=h;break;case 220:s=h;break;case 230:l=h;break;default:break}}return this.position={x:n,y:i,z:o},this.normal={x:a,y:s,z:l},this},e.typeName="Shape",e})(bt)});var Kue,que,Zue,jp,C2=W(()=>{tt();no();En();Di();ro();ul();Kue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),que=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Zue=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},jp=(function(r){Kue(e,r);function e(){var t=r.call(this)||this;return t._normal=new G(0,0,1),t._elevation=0,t._thickness=0,t._vertices=[new k,new k,new k,new k],t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"TRACE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elevation",{get:function(){return this._elevation},set:function(t){this._elevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){var t=new Ot(e.boundaryPointsFromVertices(this._vertices),!0);return t.area},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),e.prototype.getPointAt=function(t){return t<0?this._vertices[0]:t>3?this._vertices[3]:this._vertices[t]},e.prototype.setPointAt=function(t,n){if(t<0&&this._vertices[0].copy(n),t>3)return this._vertices[3].copy(n);this._vertices[t].copy(n)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return new De().setFromPoints(this._vertices)},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t=this._vertices[0],n=this._vertices[1],i=this._vertices[2],o=this._vertices[3];return or([t,n,o,i],!0)},e.prototype.subGetGripPoints=function(){var t=new Array;return t.push.apply(t,Zue([],que(this._vertices),!1)),t},e.prototype.subMoveGripPointsAt=function(t,n){return fs(t,n,this._vertices),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=[this._vertices[0],this._vertices[1],this._vertices[3],this._vertices[2]];Mh(a,!0,t,n,o)},e.prototype.transformBy=function(t){return this._vertices.forEach(function(n){return n.applyMatrix4(t)}),this._elevation=this._vertices[0].z,this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"area"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=new Ot(e.boundaryPointsFromVertices(this._vertices),!0),i=new pr;i.add(n);var o=t.subEntityTraits;return o.fillType={solidFill:!0,patternAngle:0,definitionLines:[]},t.area(i)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbTrace"),this.thickness!==0&&t.writeDouble(39,this.thickness),t.writePoint3d(10,dr(this.getPointAt(0),this.normal)),t.writePoint3d(11,dr(this.getPointAt(1),this.normal)),t.writePoint3d(12,dr(this.getPointAt(2),this.normal)),t.writePoint3d(13,dr(this.getPointAt(3),this.normal)),t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbTrace");for(var i=[{x:this.getPointAt(0).x,y:this.getPointAt(0).y,z:this.getPointAt(0).z},{x:this.getPointAt(1).x,y:this.getPointAt(1).y,z:this.getPointAt(1).z},{x:this.getPointAt(2).x,y:this.getPointAt(2).y,z:this.getPointAt(2).z},{x:this.getPointAt(3).x,y:this.getPointAt(3).y,z:this.getPointAt(3).z}],o=this.normal.x,a=this.normal.y,s=this.normal.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var l=t.readItem();if(!l)break;var c=Number(l.code),u=Number(l.value);switch(c){case 10:case 11:case 12:case 13:i[c-10].x=u;break;case 20:case 21:case 22:case 23:i[c-20].y=u;break;case 30:case 31:case 32:case 33:i[c-30].z=u;break;case 39:this.thickness=u;break;case 210:o=u;break;case 220:a=u;break;case 230:s=u;break;default:break}}var h=new G(o,a,s);return h.lengthSq()>0&&this.normal.copy(h.normalize()),i.forEach(function(d,p){return n.setPointAt(p,Er(d,n.normal))}),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.collectBoundary2d();return n.length<2?1:Dt.from2dPoints(n,!0).getOffsetSideAtPoint(t)},e.prototype.createOffsetCurve=function(t){return Cu(this.collectBoundary2d(),!0,t)},e.prototype.collectBoundary2d=function(){return e.boundaryPointsFromVertices(this._vertices)},e.boundaryPointsFromVertices=function(t){var n=t[0],i=t[1],o=t[2],a=t[3];return[new Z(n.x,n.y),new Z(i.x,i.y),new Z(a.x,a.y),new Z(o.x,o.y)]},e.typeName="Trace",e})(vn)});var Jue,Hx,$3=W(()=>{C2();Jue=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Hx=(function(r){Jue(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"SOLID"},enumerable:!1,configurable:!0}),e.typeName="Solid",e})(jp)});function ehe(r){return r&2048?"SqrtChord":r&1024?"Chord":"Uniform"}function V9(r,e){try{return new Ra(r.controlPoints,r.knots,the(r.weights,r.controlPoints.length),r.degree,e)}catch{return null}}function the(r,e){if(!(!r||r.length!==e))return r}var Que,Wx,Ra,K3=W(()=>{zt();tt();Op();Fn();no();ul();Que=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Wx=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Ra=(function(r){Que(e,r);function e(t,n,i,o,a){var s=r.call(this)||this;return s._geoData=null,s._knotTolerance=1e-6,s._controlTolerance=1e-6,s._fitTolerance=1e-9,s._normal=new G(0,0,1),t===void 0||s.rebuild(t,n,i,o,a),s}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"SPLINE"},enumerable:!1,configurable:!0}),e.fromControlPoints=function(t,n,i,o,a){var s=mr.fromControlPoints(t,n,i,o,a);return s?V9(s,a):null},e.fromFitPoints=function(t,n,i,o,a,s){var l=mr.fromFitPoints(t,n,i,o,a,s);return l?V9(l,o):null},e.fromDwgSpline=function(t){var n,i,o,a=!!(t.flag&1),s=ehe(t.flag),l=t.numberOfControlPoints||((n=t.controlPoints)===null||n===void 0?void 0:n.length)||0,c=t.numberOfKnots||((i=t.knots)===null||i===void 0?void 0:i.length)||0,u=t.numberOfFitPoints||((o=t.fitPoints)===null||o===void 0?void 0:o.length)||0;if(l>0&&c>0){var h=e.fromControlPoints(t.controlPoints,t.knots,t.weights,t.degree,a);if(h)return h}return u>0?e.fromFitPoints(t.fitPoints,s,t.degree,a,t.startTangent,t.endTangent):null},Object.defineProperty(e.prototype,"_geo",{get:function(){var t;if(this._geoData==null){var n=[{x:0,y:0,z:0},{x:1,y:0,z:0},{x:2,y:0,z:0},{x:3,y:0,z:0}],i=[0,0,0,0,1,1,1,1];this._geoData=(t=mr.fromControlPoints(n,i,void 0,3,!1))!==null&&t!==void 0?t:new mr(n,i,void 0,3,!1)}return this._geoData},set:function(t){this._geoData=t},enumerable:!1,configurable:!0}),e.prototype.rebuild=function(t,n,i,o,a){var s=+(t!==void 0)+ +(n!==void 0)+ +(i!==void 0)+ +(o!==void 0)+ +(a!==void 0);if(s<2||s>5)throw Qn.ILLEGAL_PARAMETERS;var l=!Array.isArray(n);l?this._geo=new mr(t,n,i,o):this._geo=new mr(t,n,i,o,a)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this._geo.box},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){return[{kind:"spline",spline:this._geo.clone(),extendable:!1}]},Object.defineProperty(e.prototype,"closed",{get:function(){return this._geo.closed},set:function(t){this._geo.closed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this._geo.area},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"knotTolerance",{get:function(){return this._knotTolerance},set:function(t){this._knotTolerance=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlTolerance",{get:function(){return this._controlTolerance},set:function(t){this._controlTolerance=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fitTolerance",{get:function(){return this._fitTolerance},set:function(t){this._fitTolerance=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){return this._geo.getGripPoints()},e.prototype.subMoveGripPointsAt=function(t,n){return this._geo.moveGripPointsAt(t,n),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a,s;switch(t){case ne.EndPoint:o.push(this._geo.startPoint),o.push(this._geo.endPoint);break;case ne.Node:{var l=new Set;try{for(var c=Wx(this._geo.knots),u=c.next();!u.done;u=c.next()){var h=u.value;l.has(h)||(l.add(h),o.push(this._geo.evaluateAt(h)))}}catch(d){a={error:d}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}break}case ne.Nearest:o.push(this._geo.nearestPoint(n));break;default:break}},e.prototype.transformBy=function(t){return this._geo.transform(t),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=this._geo.tessellate(ao(t));return t.lines(n)},e.prototype.dxfOutFields=function(t){var n,i,o,a,s,l,c,u,h,d,p,f=this._geo;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbSpline"),t.writeInt16(70,this.closed?1:0),t.writeInt16(71,f.degree),t.writeInt16(72,f.knots.length),t.writeInt16(73,f.controlPoints.length),t.writeInt16(74,(d=(h=f.fitPoints)===null||h===void 0?void 0:h.length)!==null&&d!==void 0?d:0),t.writeDouble(42,this.knotTolerance),t.writeDouble(43,this.controlTolerance),t.writeDouble(44,this.fitTolerance);try{for(var m=Wx(f.knots),g=m.next();!g.done;g=m.next()){var y=g.value;t.writeDouble(40,y)}}catch(M){n={error:M}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}try{for(var b=Wx(f.weights),v=b.next();!v.done;v=b.next()){var x=v.value;t.writeDouble(41,x)}}catch(M){o={error:M}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}try{for(var w=Wx(f.controlPoints),_=w.next();!_.done;_=w.next()){var A=_.value;t.writePoint3d(10,A)}}catch(M){s={error:M}}finally{try{_&&!_.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}try{for(var E=Wx((p=f.fitPoints)!==null&&p!==void 0?p:[]),S=E.next();!S.done;S=E.next()){var A=S.value;t.writePoint3d(11,A)}}catch(M){c={error:M}}finally{try{S&&!S.done&&(u=E.return)&&u.call(E)}finally{if(c)throw c.error}}return t.writeVector3d(210,this.normal),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbSpline");for(var n=this.closed?1:0,i=3,o=0,a=0,s=0,l=[],c=[],u=[],h=[],d=null,p=null,f=this.knotTolerance,m=this.controlTolerance,g=this.fitTolerance,y=this.normal.x,b=this.normal.y,v=this.normal.z,x=null,w=null,_=null,A=null,E=function(){x&&(u.push(x),x=null)},S=function(){w&&(h.push(w),w=null)};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var M=t.readItem();if(!M)break;var T=Number(M.code),L=Number(M.value);switch(T){case 70:n=L;break;case 71:i=L;break;case 72:o=L;break;case 73:a=L;break;case 74:s=L;break;case 42:f=L;break;case 43:m=L;break;case 44:g=L;break;case 40:l.push(L);break;case 41:c.push(L);break;case 10:E(),x={x:L,y:0,z:0};break;case 20:x&&(x.y=L);break;case 30:x&&(x.z=L);break;case 11:S(),w={x:L,y:0,z:0};break;case 21:w&&(w.y=L);break;case 31:w&&(w.z=L);break;case 12:_={x:L,y:0,z:0};break;case 22:_&&(_.y=L);break;case 32:_&&(_.z=L,d=_,_=null);break;case 13:A={x:L,y:0,z:0};break;case 23:A&&(A.y=L);break;case 33:A&&(A.z=L,p=A,A=null);break;case 210:y=L;break;case 220:b=L;break;case 230:v=L;break;default:break}}E(),S(),this.knotTolerance=f,this.controlTolerance=m,this.fitTolerance=g;var O=new G(y,b,v);return O.lengthSq()>0&&this.normal.copy(O.normalize()),this.applyDxfInSpline({flag:n,degree:i,numberOfControlPoints:a||u.length,numberOfKnots:o||l.length,numberOfFitPoints:s||h.length,controlPoints:u,knots:l,weights:c.length>0?c:void 0,fitPoints:h,startTangent:d,endTangent:p}),this},e.prototype.applyDxfInSpline=function(t){var n=e.fromDwgSpline(t);n&&(this._geo=n._geo,this.closed=n.closed)},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.collectPath2d(1);return n.length<2?1:Dt.from2dPoints(n,this.closed).getOffsetSideAtPoint(t)},e.prototype.createOffsetCurve=function(t){var n=this._geo.getOffsetSamplePath2d(t),i=n.points,o=n.tangents,a=US(i,this.closed,t,o);return a?Dt.fromGePolyline(a):null},e.prototype.collectPath2d=function(t){return this._geo.getOffsetSamplePath2d(t).points},e.typeName="Spline",e})(vn)});function G9(r){return r==null?Br.latest.capabilities:typeof r=="object"&&"supportsHandles"in r?r:r instanceof Br?r.capabilities:new Br(r).capabilities}var H9=W(()=>{jm()});var nhe,Lu,rhe,Xx,Vg,W9,q3=W(()=>{zt();tt();Li();H9();gu();nhe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Lu=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rhe=new G,Xx=(function(r){nhe(e,r);function e(t,n,i){var o=r.call(this,t??"")||this;return o._attachmentPoint=ut.TopLeft,o._numColumns=i,o._numRows=n,o._columnWidth=new Array(i),o._rowHeight=new Array(n),o._cells=new Array(n*i),o}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"ACAD_TABLE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockTableRecord",{get:function(){var t=this.blockName;if(t){var n=this.database.tables.blockTable.getAt(t);if(n)return n}var i=this.owningBlockRecordId;if(i)return this.database.tables.blockTable.getIdAt(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachmentPoint",{get:function(){return this._attachmentPoint},set:function(t){this._attachmentPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numRows",{get:function(){return this._numRows},set:function(t){this._numRows=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numColumns",{get:function(){return this._numColumns},set:function(t){this._numColumns=t},enumerable:!1,configurable:!0}),e.prototype.numContents=function(t,n){return 1},e.prototype.rowHeight=function(t){return this._rowHeight[t]},e.prototype.setRowHeight=function(t,n){this._rowHeight[t]=n},e.prototype.setUniformRowHeight=function(t){this._rowHeight.fill(t)},e.prototype.columnWidth=function(t){return this._columnWidth[t]},e.prototype.setUniformColumnWidth=function(t){this._columnWidth.fill(t)},e.prototype.setColumnWidth=function(t,n){this._columnWidth[t]=n},e.prototype.resizeGrid=function(t,n){var i=Math.max(0,t),o=Math.max(0,n);this._numRows=i,this._numColumns=o,this._rowHeight=new Array(i).fill(0),this._columnWidth=new Array(o).fill(0),this._cells=new Array(i*o)},e.prototype.cell=function(t){if(!(t<0||t>=this._cells.length))return this._cells[t]},e.prototype.setCell=function(t,n){this._cells[t]=n},e.prototype.textString=function(t,n,i){var o,a=t*this._numColumns+n;return(o=this._cells[a])===null||o===void 0?void 0:o.text},e.prototype.setTextString=function(t,n,i){var o=t*this._numColumns+n;if(!this._cells[o]){this._cells[o]={text:i,attachmentPoint:this._attachmentPoint,cellType:1,textHeight:0};return}this._cells[o].text=i},e.prototype.isEmpty=function(t,n){var i,o=t*this._numColumns+n;return!(!((i=this._cells[o])===null||i===void 0)&&i.text)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t,n,i,o,a;try{a=this.blockTableRecord}catch{a=void 0}if(a&&a.newIterator().count>0){var s=new De;try{for(var l=Lu(a.newIterator()),c=l.next();!c.done;c=l.next()){var u=c.value;s.union(u.geometricExtents)}}catch(v){t={error:v}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return s.applyMatrix4(this.blockTransform),s}var h=this._columnWidth.reduce(function(v,x){return v+x},0),d=this._rowHeight.reduce(function(v,x){return v+x},0),p=new De;if(h===0&&d===0)return p.expandByPoint(this.position),p;var f=new Ma;f.setFromAxisAngle(G.Z_AXIS,this.rotation),Vg.compose(this.position,f,this.scaleFactors);var m=[new k(0,0,0),new k(h,0,0),new k(h,-d,0),new k(0,-d,0)];try{for(var g=Lu(m),y=g.next();!y.done;y=g.next()){var b=y.value;p.expandByPoint(b.applyMatrix4(Vg))}}catch(v){i={error:v}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}return p},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"table",properties:[{name:"numRows",type:"string",editable:!0,accessor:{get:function(){return t.numRows},set:function(n){t.numRows=n}}},{name:"numColumns",type:"float",editable:!0,accessor:{get:function(){return t.numColumns},set:function(n){t.numColumns=n}}},{name:"tableWidth",type:"float",editable:!1,accessor:{get:function(){return t._columnWidth.reduce(function(n,i){return n+i},0)}}},{name:"tableHeight",type:"float",editable:!1,accessor:{get:function(){return t._rowHeight.reduce(function(n,i){return n+i},0)}}}]},{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:function(){return t.position.x},set:function(n){t.position.x=n}}},{name:"positionY",type:"float",editable:!0,accessor:{get:function(){return t.position.y},set:function(n){t.position.y=n}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:function(){return t.position.z},set:function(n){t.position.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n,i,o=this.blockTableRecord;if(o&&o.newIterator().count>0){var a=this.drawAnonymousTableBlock(t,o);if(a)return a}for(var s=0,l=0,c=new Uint16Array(this.numColumns*this.numRows*8),u=new Float32Array((this.numColumns+1)*(this.numRows+1)*3),h=0,d=0;d<=this.numRows;d++){s-=d>0?this.rowHeight(d-1):0,l=0;for(var p=0;p<=this.numColumns;p++)l+=p>0?this.columnWidth(p-1):0,u[h++]=l,u[h++]=s,u[h++]=0}var f=[],m=new Array(this.numRows*this.numColumns).fill(!1);l=0,h=0;for(var g=0,d=0;d<this.numColumns;d++){l+=d>0?this.columnWidth(d-1):0,s=0;for(var p=0;p<this.numRows;p++){s+=p>0?this.rowHeight(p-1):0;var y=this.cell(p*this.numColumns+d);if(g=p*this.numColumns+d,y&&!m[g]){var b=(n=y.borderWidth)!==null&&n!==void 0?n:1,v=(i=y.borderHeight)!==null&&i!==void 0?i:1;this.fillVisited(m,g,this.numColumns,b,v),c[h++]=d+p*(this.numColumns+1),c[h++]=d+p*(this.numColumns+1)+b;var x=u[c[h-1]*3]-l,w=d+(p+v)*(this.numColumns+1)+b;d+b==this.numColumns&&(c[h++]=d+p*(this.numColumns+1)+b,c[h++]=w);var _=-u[w*3+1]-s;if(p+v==this.numRows&&(c[h++]=d+(p+v)*(this.numColumns+1)+v,c[h++]=d+(p+v)*(this.numColumns+1)),c[h++]=d+(p+v)*(this.numColumns+1),c[h++]=d+p*(this.numColumns+1),y.text){var A=y.attachmentPoint||this.attachmentPoint||ut.MiddleCenter,E=this.getTableTextOffset(A,x,_),S={text:y.text,height:this.getCellTextHeight(y,_),width:x,position:rhe.set(l,-s,0).clone().add(E),rotation:this.rotation,attachmentPoint:A},M=this.getTextStyle(y);f.push(t.mtext(S,M))}}}}f.push(t.lineSegments(u,3,c));var T=t.group(f),L=new Ma;return L.setFromAxisAngle(G.Z_AXIS,this.rotation),Vg.compose(this.position,L,this.scaleFactors),T.applyMatrix(Vg),T},e.prototype.drawAnonymousTableBlock=function(t,n){var i,o,a=[],s=n.newIterator();try{for(var l=Lu(s),c=l.next();!c.done;c=l.next()){var u=c.value,h=void 0;if(u.color.isByBlock){W9.copy(u.color);var d=this.resolvedColor;d.isForeground?u.color.setForeground():d.RGB!=null&&u.color.setRGBValue(d.RGB),h=u.worldDraw(t),u.color.copy(W9)}else h=u.worldDraw(t);h&&(h.objectId=this.objectId,h.ownerId=this.ownerId,h.layerName=this.layer,h.visible=this.visibility&&u.visibility,a.push(h))}}catch(m){i={error:m}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}var p=t.group(a);p.applyMatrix(this.blockTransform);var f=this.normal;return f&&(f.x!==0||f.y!==0||f.z!==1)&&(Vg.setFromExtrusionDirection(f),p.applyMatrix(Vg)),p},e.prototype.fillVisited=function(t,n,i,o,a){if(a==1&&o==1)t[n]=!0;else for(var s=0;s<o;++s)for(var l=0;l<a;++l)t[n+s+l*i]=!0},e.prototype.getTextStyle=function(t){var n=this.database.tables.textStyleTable.resolveAt(t.textStyle);if(!n)throw new Error("No valid text style found in text style table.");return n.textStyle},e.prototype.getTableTextOffset=function(t,n,i){var o=new G;switch(t){case 1:break;case 2:o.setX(n/2);break;case 3:o.setX(n);break;case 4:o.setY(-i/2);break;case 5:o.set(n/2,-i/2,0);break;case 6:o.set(n,-i/2,0);break;case 7:o.setY(-i);break;case 8:o.set(n/2,-i,0);break;case 9:o.set(n,-i,0);break}return o},e.prototype.getCellTextHeight=function(t,n){return t.textHeight&&t.textHeight>0?t.textHeight:Math.max(n/2,1)},e.prototype.dxfOutFields=function(t){var n,i,o,a,s,l,c,u,h,d,p,f,m,g,y,b,v,x,w,_,A,E,S,M,T;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbTable");var L=(y=(m=t.version)!==null&&m!==void 0?m:(g=t.database)===null||g===void 0?void 0:g.version)!==null&&y!==void 0?y:(b=this.database)===null||b===void 0?void 0:b.version,O=G9(L).supportsUtf8CodePage;t.writeInt16(280,this.tableDataVersion),t.writeObjectId(342,this.tableStyleId),t.writeObjectId(343,this.owningBlockRecordId),t.writeVector3d(11,this.horizontalDirection),t.writeUInt32(90,this.tableValueFlag),t.writeUInt32(93,this.tableOverrideFlag),t.writeUInt32(94,this.borderColorOverrideFlag),t.writeUInt32(95,this.borderLineweightOverrideFlag),t.writeUInt32(96,this.borderVisibilityOverrideFlag),t.writeInt16(71,this.attachmentPoint),t.writeInt32(91,this.numRows),t.writeInt32(92,this.numColumns);for(var D=0;D<this.numRows;++D)t.writeDouble(141,this.rowHeight(D));for(var D=0;D<this.numColumns;++D)t.writeDouble(142,this.columnWidth(D));for(var z=this._cells.length>0?this._cells.length:this.numRows*this.numColumns,D=0;D<z;D++){var N=this._cells[D],J=(v=N?.cellType)!==null&&v!==void 0?v:N?.blockTableRecordId?2:1;if(t.writeInt16(171,J),t.writeInt16(172,(x=N?.flagValue)!==null&&x!==void 0?x:0),t.writeInt16(173,(w=N?.mergedValue)!==null&&w!==void 0?w:0),t.writeBoolean(174,N?.autoFit),t.writeInt16(175,N?.borderWidth),t.writeInt16(176,N?.borderHeight),N?.overrideFlag!=null&&(O?t.writeInt32(91,N.overrideFlag):t.writeInt16(177,N.overrideFlag)),t.writeInt16(178,N?.virtualEdgeFlag),t.writeAngle(145,N?.rotation),O&&t.writeInt16(92,N?.extendedCellFlags),J===1)N?.fieldObjetId?t.writeObjectId(344,N.fieldObjetId):this.writeCellText(t,(_=N?.text)!==null&&_!==void 0?_:"",O,N?.cellValueBlockBegin);else if(J===2){if(t.writeObjectId(340,N?.blockTableRecordId),t.writeDouble(144,N?.blockScale),t.writeInt16(179,N?.blockAttrNum),!((A=N?.attrDefineId)===null||A===void 0)&&A.length)try{for(var X=(n=void 0,Lu(N.attrDefineId)),Q=X.next();!Q.done;Q=X.next()){var ce=Q.value;t.writeObjectId(331,ce)}}catch(K){n={error:K}}finally{try{Q&&!Q.done&&(i=X.return)&&i.call(X)}finally{if(n)throw n.error}}if(N?.attrText!=null)if(Array.isArray(N.attrText))try{for(var H=(o=void 0,Lu(N.attrText)),de=H.next();!de.done;de=H.next()){var Se=de.value;t.writeString(300,Se)}}catch(K){o={error:K}}finally{try{de&&!de.done&&(a=H.return)&&a.call(H)}finally{if(o)throw o.error}}else t.writeString(300,N.attrText)}N?.textStyle&&t.writeString(7,N.textStyle),N?.textHeight!=null&&t.writeDouble(140,N.textHeight),N?.attachmentPoint!=null&&t.writeInt16(170,N.attachmentPoint),N?.topBorderVisibility!=null&&t.writeInt16(289,N.topBorderVisibility?1:0),N?.rightBorderVisibility!=null&&t.writeInt16(285,N.rightBorderVisibility?1:0),N?.bottomBorderVisibility!=null&&t.writeInt16(286,N.bottomBorderVisibility?1:0),N?.leftBorderVisibility!=null&&t.writeInt16(288,N.leftBorderVisibility?1:0)}if(t.writeInt16(70,this.flowDirection),t.writeDouble(40,this.horizontalCellMargin),t.writeDouble(41,this.verticalCellMargin),this.suppressTitle!=null&&t.writeInt16(280,this.suppressTitle?1:0),this.suppressHeader!=null&&t.writeInt16(281,this.suppressHeader?1:0),!((E=this.cellTypeOverrides)===null||E===void 0)&&E.length)try{for(var te=Lu(this.cellTypeOverrides),ue=te.next();!ue.done;ue=te.next()){var ve=ue.value;t.writeString(7,ve.textStyle),t.writeDouble(140,ve.textHeight),t.writeInt16(170,ve.alignment),t.writeInt16(63,ve.backgroundColor),t.writeInt16(64,ve.contentColor),ve.backgroundColorEnabled!=null&&t.writeInt16(283,ve.backgroundColorEnabled?1:0);var se=ve.borderLineweights;se&&(t.writeInt16(274,se.top),t.writeInt16(275,se.right),t.writeInt16(276,se.bottom),t.writeInt16(277,se.left),t.writeInt16(278,se.insideHorizontal),t.writeInt16(279,se.insideVertical));var we=ve.borderVisibility;we&&(t.writeInt16(284,we.top?1:0),t.writeInt16(285,we.right?1:0),t.writeInt16(286,we.bottom?1:0),t.writeInt16(287,we.left?1:0),t.writeInt16(288,we.insideHorizontal?1:0),t.writeInt16(289,we.insideVertical?1:0))}}catch(B){s={error:B}}finally{try{ue&&!ue.done&&(l=te.return)&&l.call(te)}finally{if(s)throw s.error}}if(this.tableBorderColors&&(t.writeInt16(63,this.tableBorderColors.left),t.writeInt16(64,this.tableBorderColors.top),t.writeInt16(65,this.tableBorderColors.insideHorizontal),t.writeInt16(66,this.tableBorderColors.bottom),t.writeInt16(68,this.tableBorderColors.insideVertical),t.writeInt16(69,this.tableBorderColors.right)),!((S=this.rowDataTypes)===null||S===void 0)&&S.length)try{for(var pe=Lu(this.rowDataTypes),Ee=pe.next();!Ee.done;Ee=pe.next()){var Oe=Ee.value;t.writeInt16(97,Oe)}}catch(B){c={error:B}}finally{try{Ee&&!Ee.done&&(u=pe.return)&&u.call(pe)}finally{if(c)throw c.error}}if(!((M=this.rowUnitTypes)===null||M===void 0)&&M.length)try{for(var Pe=Lu(this.rowUnitTypes),Xe=Pe.next();!Xe.done;Xe=Pe.next()){var $=Xe.value;t.writeInt16(98,$)}}catch(B){h={error:B}}finally{try{Xe&&!Xe.done&&(d=Pe.return)&&d.call(Pe)}finally{if(h)throw h.error}}if(!((T=this.rowFormats)===null||T===void 0)&&T.length)try{for(var yt=Lu(this.rowFormats),C=yt.next();!C.done;C=yt.next()){var I=C.value;t.writeString(4,I)}}catch(B){p={error:B}}finally{try{C&&!C.done&&(f=yt.return)&&f.call(yt)}finally{if(p)throw p.error}}return this},e.prototype.dxfInFields=function(t){var n=this,i,o,a,s,l,c;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbTable");for(var u=this._numRows,h=this._numColumns,d=!1,p=[],f=[],m=0,g=null,y=[],b=(o=(i=this.horizontalDirection)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:1,v=(s=(a=this.horizontalDirection)===null||a===void 0?void 0:a.y)!==null&&s!==void 0?s:0,x=(c=(l=this.horizontalDirection)===null||l===void 0?void 0:l.z)!==null&&c!==void 0?c:0,w=function(){u>0&&h>0&&(!d||n._numRows!==u||n._numColumns!==h)&&(n.resizeGrid(u,h),d=!0)},_=function(){g&&(y.length>0&&(g.text=y.join(""),y=[]),w(),m<n._cells.length&&n.setCell(m,g),m+=1,g=null)};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var A=t.readItem();if(!A)break;var E=Number(A.code),S=Number(A.value);switch(E){case 280:g||(this.tableDataVersion=S);break;case 342:this.tableStyleId=String(A.value);break;case 343:this.owningBlockRecordId=String(A.value);break;case 11:b=S;break;case 21:v=S;break;case 31:x=S;break;case 90:g||(this.tableValueFlag=S);break;case 93:g||(this.tableOverrideFlag=S);break;case 94:g||(this.borderColorOverrideFlag=S);break;case 95:g||(this.borderLineweightOverrideFlag=S);break;case 96:g||(this.borderVisibilityOverrideFlag=S);break;case 71:this.attachmentPoint=S;break;case 170:g?g.attachmentPoint=S:this.attachmentPoint=S;break;case 91:g?g&&(g.overrideFlag=S):(u=S,w());break;case 92:g?g&&(g.extendedCellFlags=S):(h=S,w());break;case 141:p.push(S);break;case 142:f.push(S);break;case 171:_(),g={text:"",attachmentPoint:ut.MiddleCenter,cellType:S,textHeight:0};break;case 172:g&&(g.flagValue=S);break;case 173:g&&(g.mergedValue=S);break;case 174:g&&(g.autoFit=!!A.value||S!==0);break;case 175:g&&(g.borderWidth=S);break;case 176:g&&(g.borderHeight=S);break;case 177:g&&(g.overrideFlag=S);break;case 178:g&&(g.virtualEdgeFlag=S);break;case 145:g&&(g.rotation=S*Math.PI/180);break;case 1:case 2:case 302:case 303:y.push(String(A.value));break;case 300:if(g){var M=g.attrText;Array.isArray(M)?M.push(String(A.value)):M!=null&&M!==""?g.attrText=[String(M),String(A.value)]:g.attrText=String(A.value)}break;case 301:g&&(g.cellValueBlockBegin=String(A.value));break;case 304:break;case 7:g&&(g.textStyle=String(A.value));break;case 140:g&&(g.textHeight=S);break;case 340:g&&(g.blockTableRecordId=String(A.value));break;case 344:case 345:g&&(g.fieldObjetId=String(A.value));break;case 144:case 146:g&&(g.blockScale=S);break;case 179:g&&(g.blockAttrNum=S);break;case 70:this.flowDirection=S;break;case 40:this.horizontalCellMargin=S;break;case 41:this.verticalCellMargin=S;break;case 281:this.suppressHeader=S!==0;break;case 310:break;default:break}}return _(),this.horizontalDirection=new G(b,v,x),p.forEach(function(T,L){return n.setRowHeight(L,T)}),f.forEach(function(T,L){return n.setColumnWidth(L,T)}),this},e.prototype.writeCellText=function(t,n,i,o){var a=250;if(!i){if(n.length<=a){t.writeString(1,n);return}for(var s=Math.ceil(n.length/a),l=0;l<s;l++){var c=l*a,u=c+a,h=n.slice(c,u);l===s-1?t.writeString(1,h):t.writeString(2,h)}return}if(t.writeString(301,o??"CELL_VALUE"),n.length<=a){t.writeString(302,n),t.writeString(304,"ACVALUE_END");return}for(var d=Math.ceil(n.length/a),l=0;l<d;l++){var c=l*a,u=c+a,h=n.slice(c,u);l===d-1?t.writeString(302,h):t.writeString(303,h)}t.writeString(304,"ACVALUE_END")},e.typeName="Table",e})(pn),Vg=new Ie,W9=new je});var ihe,X9,Y9,Z3,Ba,J3=W(()=>{tt();Li();g2();Gn();En();Di();ihe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),X9=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Y9=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Z3=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ba=(function(r){ihe(e,r);function e(){var t=r.call(this)||this;return t._snapBase=new k,t._snapSpacing=new k(1,1,0),t._gridSpacing=new k(1,1,0),t._perspectiveLensLength=50,t._frontClipZ=0,t._backClipZ=0,t._snapAngle=0,t._status=0,t._ucsPerViewport=0,t._circleZoomPercent=1e3,t._statusBitFlags=0,t._ucsOrigin=new k,t._ucsXAxis=new G(1,0,0),t._ucsYAxis=new G(0,1,0),t._elevation=0,t._frozenLayerIds=[],t._sheetName="",t._iconFlag=0,t._orthographicType=0,t._majorGridFrequency=0,t._ambientLightColorIndex=0,t._brightness=0,t._contrast=0,t._shadePlotMode=0,t._renderMode=0,t._defaultLightingType=0,t._isDefaultLighting=!1,t._clippingBoundaryId="",t._backgroundId="",t._shadePlotId="",t._ucsId="",t._ucsBaseId="",t._visualStyleId="",t._sunId="",t._ambientLightColorInstance=0,t._ambientLightColorName="",t._softPointers=[],t._centerPoint=new k,t._height=0,t._width=0,t._viewCenter=new k,t._viewTarget=new k,t._viewDirection=new G(0,0,1),t._viewTwistAngle=0,t._viewHeight=0,t._number=-1,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"VIEWPORT"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"number",{get:function(){return this._number},set:function(t){this._number=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerPoint",{get:function(){return this._centerPoint},set:function(t){this._centerPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewCenter",{get:function(){return this._viewCenter},set:function(t){this._viewCenter=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewTarget",{get:function(){return this._viewTarget},set:function(t){this._viewTarget=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewDirection",{get:function(){return this._viewDirection},set:function(t){this._viewDirection.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapBase",{get:function(){return this._snapBase},set:function(t){this._snapBase.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapSpacing",{get:function(){return this._snapSpacing},set:function(t){this._snapSpacing.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridSpacing",{get:function(){return this._gridSpacing},set:function(t){this._gridSpacing.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"perspectiveLensLength",{get:function(){return this._perspectiveLensLength},set:function(t){this._perspectiveLensLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontClipZ",{get:function(){return this._frontClipZ},set:function(t){this._frontClipZ=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backClipZ",{get:function(){return this._backClipZ},set:function(t){this._backClipZ=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapAngle",{get:function(){return this._snapAngle},set:function(t){this._snapAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},set:function(t){this._status=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsPerViewport",{get:function(){return this._ucsPerViewport},set:function(t){this._ucsPerViewport=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"circleZoomPercent",{get:function(){return this._circleZoomPercent},set:function(t){this._circleZoomPercent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statusBitFlags",{get:function(){return this._statusBitFlags},set:function(t){this._statusBitFlags=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsOrigin",{get:function(){return this._ucsOrigin},set:function(t){this._ucsOrigin.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elevation",{get:function(){return this._elevation},set:function(t){this._elevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frozenLayerIds",{get:function(){return this._frozenLayerIds},set:function(t){this._frozenLayerIds=Y9([],X9(t),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsXAxis",{get:function(){return this._ucsXAxis},set:function(t){this._ucsXAxis.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsYAxis",{get:function(){return this._ucsYAxis},set:function(t){this._ucsYAxis.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sheetName",{get:function(){return this._sheetName},set:function(t){this._sheetName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconFlag",{get:function(){return this._iconFlag},set:function(t){this._iconFlag=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orthographicType",{get:function(){return this._orthographicType},set:function(t){this._orthographicType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"majorGridFrequency",{get:function(){return this._majorGridFrequency},set:function(t){this._majorGridFrequency=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ambientLightColorIndex",{get:function(){return this._ambientLightColorIndex},set:function(t){this._ambientLightColorIndex=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportBrightness",{get:function(){return this._brightness},set:function(t){this._brightness=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportContrast",{get:function(){return this._contrast},set:function(t){this._contrast=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadePlotMode",{get:function(){return this._shadePlotMode},set:function(t){this._shadePlotMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderMode",{get:function(){return this._renderMode},set:function(t){this._renderMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultLightingType",{get:function(){return this._defaultLightingType},set:function(t){this._defaultLightingType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDefaultLighting",{get:function(){return this._isDefaultLighting},set:function(t){this._isDefaultLighting=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clippingBoundaryId",{get:function(){return this._clippingBoundaryId},set:function(t){this._clippingBoundaryId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundId",{get:function(){return this._backgroundId},set:function(t){this._backgroundId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadePlotId",{get:function(){return this._shadePlotId},set:function(t){this._shadePlotId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsId",{get:function(){return this._ucsId},set:function(t){this._ucsId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ucsBaseId",{get:function(){return this._ucsBaseId},set:function(t){this._ucsBaseId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visualStyleId",{get:function(){return this._visualStyleId},set:function(t){this._visualStyleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sunId",{get:function(){return this._sunId},set:function(t){this._sunId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ambientLightColorInstance",{get:function(){return this._ambientLightColorInstance},set:function(t){this._ambientLightColorInstance=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ambientLightColorName",{get:function(){return this._ambientLightColorName},set:function(t){this._ambientLightColorName=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"softPointers",{get:function(){return this._softPointers},set:function(t){this._softPointers=Y9([],X9(t),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewTwistAngle",{get:function(){return this._viewTwistAngle},set:function(t){this._viewTwistAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewHeight",{get:function(){return this._viewHeight},set:function(t){this._viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this._width/2,n=this._height/2,i=new De;return i.expandByPoint(new k(this._centerPoint.x-t,this._centerPoint.y-n,this._centerPoint.z)),i.expandByPoint(new k(this._centerPoint.x+t,this._centerPoint.y+n,this._centerPoint.z)),i},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t=this._width/2,n=this._height/2,i=this._centerPoint.z,o=[new k(this._centerPoint.x-t,this._centerPoint.y-n,i),new k(this._centerPoint.x+t,this._centerPoint.y-n,i),new k(this._centerPoint.x+t,this._centerPoint.y+n,i),new k(this._centerPoint.x-t,this._centerPoint.y+n,i)];return or(o,!0)},e.prototype.subGetGripPoints=function(){var t=new Array,n=this._width/2,i=this._height/2,o=this._centerPoint.z;return t.push(this._centerPoint),(n>0||i>0)&&t.push(new k(this._centerPoint.x-n,this._centerPoint.y-i,o),new k(this._centerPoint.x+n,this._centerPoint.y-i,o),new k(this._centerPoint.x+n,this._centerPoint.y+i,o),new k(this._centerPoint.x-n,this._centerPoint.y+i,o)),t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){i.moveGripAt(o,n)}),this},e.prototype.transformBy=function(t){var n=this._centerPoint.clone(),i=this._centerPoint.clone().add(new G(this._width,0,0)),o=this._centerPoint.clone().add(new G(0,this._height,0));n.applyMatrix4(t),i.applyMatrix4(t),o.applyMatrix4(t);var a=new G(i).sub(n),s=new G(o).sub(n),l=this._height!==0?s.length()/this._height:1;return this._centerPoint.copy(n),this._width=a.length(),this._height=s.length(),this._viewHeight*=l,this},e.prototype.subWorldDraw=function(t){if(this._number>1&&this.ownerId!=this.database.tables.blockTable.modelSpace.objectId){var n=this.toGiViewport(),i=t.group(this.createViewportRect(n,t));return i}},e.prototype.toGiViewport=function(){var t,n,i,o=new qv;o.id=this.objectId,o.groupId=this.ownerId,o.number=this.number,o.centerPoint=this.centerPoint,o.width=this.width,o.height=this.height,o.viewHeight=this.viewHeight,o.viewCenter=this.viewCenter,o.viewTarget=this.viewTarget,o.viewTwistAngle=this.viewTwistAngle,o.frozenLayerIds=this.frozenLayerIds;var a=[],s=(i=this.database)===null||i===void 0?void 0:i.tables.layerTable;if(s)try{for(var l=Z3(this.frozenLayerIds),c=l.next();!c.done;c=l.next()){var u=c.value,h=s.getIdAt(u);h&&a.push(h.name)}}catch(p){t={error:p}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}o.frozenLayers=a;var d=Px(this);return d&&(o.annotationScaleName=d.scaleName,o.annotationScaleFactor=d.scaleFactor),o},e.prototype.createViewportRect=function(t,n){var i=[];return i.push(n.lines([new k(t.centerPoint.x-t.width/2,t.centerPoint.y-t.height/2,0),new k(t.centerPoint.x+t.width/2,t.centerPoint.y-t.height/2,0)])),i.push(n.lines([new k(t.centerPoint.x+t.width/2,t.centerPoint.y-t.height/2,0),new k(t.centerPoint.x+t.width/2,t.centerPoint.y+t.height/2,0)])),i.push(n.lines([new k(t.centerPoint.x+t.width/2,t.centerPoint.y+t.height/2,0),new k(t.centerPoint.x-t.width/2,t.centerPoint.y+t.height/2,0)])),i.push(n.lines([new k(t.centerPoint.x-t.width/2,t.centerPoint.y+t.height/2,0),new k(t.centerPoint.x-t.width/2,t.centerPoint.y-t.height/2,0)])),i},e.prototype.dxfOutFields=function(t){var n,i,o,a;r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbViewport"),t.writePoint3d(10,this.centerPoint),t.writeDouble(40,this.width),t.writeDouble(41,this.height),t.writePoint3d(12,this.viewCenter),t.writePoint3d(13,this.snapBase),t.writePoint3d(14,this.snapSpacing),t.writePoint3d(15,this.gridSpacing),t.writeVector3d(16,this.viewDirection),t.writePoint3d(17,this.viewTarget),t.writeDouble(42,this.perspectiveLensLength),t.writeDouble(43,this.frontClipZ),t.writeDouble(44,this.backClipZ),t.writeDouble(45,this.viewHeight),t.writeAngle(50,this.snapAngle),t.writeAngle(51,this.viewTwistAngle),t.writeInt16(68,this.status),t.writeInt32(69,this.number),t.writeInt16(71,this.ucsPerViewport),t.writeInt16(72,this.circleZoomPercent),t.writeInt32(90,this.statusBitFlags);try{for(var s=Z3(this.frozenLayerIds),l=s.next();!l.done;l=s.next()){var c=l.value;t.writeObjectId(331,c)}}catch(d){n={error:d}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}t.writePoint3d(110,this.ucsOrigin),t.writeVector3d(111,this.ucsXAxis),t.writeVector3d(112,this.ucsYAxis),t.writeDouble(146,this.elevation),this.sheetName&&t.writeString(1,this.sheetName),t.writeInt16(61,this.majorGridFrequency),t.writeInt16(63,this.ambientLightColorIndex),t.writeInt16(74,this.iconFlag),t.writeInt16(79,this.orthographicType);try{for(var u=Z3(this.softPointers),h=u.next();!h.done;h=u.next()){var c=h.value;t.writeObjectId(91,c)}}catch(d){o={error:d}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}return t.writeDouble(141,this.viewportBrightness),t.writeDouble(142,this.viewportContrast),t.writeInt16(170,this.shadePlotMode),t.writeInt16(281,this.renderMode),t.writeInt16(282,this.defaultLightingType),t.writeInt16(292,this.isDefaultLighting?1:0),this.clippingBoundaryId&&t.writeObjectId(340,this.clippingBoundaryId),this.backgroundId&&t.writeObjectId(332,this.backgroundId),this.shadePlotId&&t.writeObjectId(333,this.shadePlotId),this.ucsId&&t.writeObjectId(345,this.ucsId),this.ucsBaseId&&t.writeObjectId(346,this.ucsBaseId),this.visualStyleId&&t.writeObjectId(348,this.visualStyleId),this.sunId&&t.writeObjectId(361,this.sunId),this.ambientLightColorInstance&&t.writeInt32(421,this.ambientLightColorInstance),this.ambientLightColorName&&t.writeString(431,this.ambientLightColorName),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbViewport");for(var n=this.centerPoint.x,i=this.centerPoint.y,o=this.centerPoint.z,a=this.viewCenter.x,s=this.viewCenter.y,l=this.viewCenter.z,c=this.viewTarget.x,u=this.viewTarget.y,h=this.viewTarget.z,d=this.viewDirection.x,p=this.viewDirection.y,f=this.viewDirection.z,m=this.snapBase.x,g=this.snapBase.y,y=this.snapBase.z,b=this.snapSpacing.x,v=this.snapSpacing.y,x=this.snapSpacing.z,w=this.gridSpacing.x,_=this.gridSpacing.y,A=this.gridSpacing.z,E=this.ucsOrigin.x,S=this.ucsOrigin.y,M=this.ucsOrigin.z,T=this.ucsXAxis.x,L=this.ucsXAxis.y,O=this.ucsXAxis.z,D=this.ucsYAxis.x,z=this.ucsYAxis.y,N=this.ucsYAxis.z,J=[],X=[];!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var Q=t.readItem();if(!Q)break;var ce=Number(Q.code),H=Number(Q.value);switch(ce){case 1:this.sheetName=String(Q.value);break;case 10:n=H;break;case 20:i=H;break;case 30:o=H;break;case 12:a=H;break;case 22:s=H;break;case 32:l=H;break;case 13:m=H;break;case 23:g=H;break;case 33:y=H;break;case 14:b=H;break;case 24:v=H;break;case 34:x=H;break;case 15:w=H;break;case 25:_=H;break;case 35:A=H;break;case 16:d=H;break;case 26:p=H;break;case 36:f=H;break;case 17:c=H;break;case 27:u=H;break;case 37:h=H;break;case 40:this.width=H;break;case 41:this.height=H;break;case 42:this.perspectiveLensLength=H;break;case 43:this.frontClipZ=H;break;case 44:this.backClipZ=H;break;case 45:this.viewHeight=H;break;case 50:this.snapAngle=xe.degToRad(H);break;case 51:this.viewTwistAngle=xe.degToRad(H);break;case 61:this.majorGridFrequency=H;break;case 63:this.ambientLightColorIndex=H;break;case 68:this.status=H;break;case 69:this.number=H;break;case 71:this.ucsPerViewport=H;break;case 72:this.circleZoomPercent=H;break;case 74:this.iconFlag=H;break;case 79:this.orthographicType=H;break;case 90:this.statusBitFlags=H;break;case 91:case 335:case 343:case 344:X.push(String(Q.value));break;case 110:E=H;break;case 120:S=H;break;case 130:M=H;break;case 111:T=H;break;case 121:L=H;break;case 131:O=H;break;case 112:D=H;break;case 122:z=H;break;case 132:N=H;break;case 141:this.viewportBrightness=H;break;case 142:this.viewportContrast=H;break;case 146:this.elevation=H;break;case 170:this.shadePlotMode=H;break;case 281:this.renderMode=H;break;case 282:this.defaultLightingType=H;break;case 292:this.isDefaultLighting=H!==0;break;case 331:J.push(String(Q.value));break;case 332:this.backgroundId=String(Q.value);break;case 333:this.shadePlotId=String(Q.value);break;case 340:this.clippingBoundaryId=String(Q.value);break;case 345:this.ucsId=String(Q.value);break;case 346:this.ucsBaseId=String(Q.value);break;case 348:this.visualStyleId=String(Q.value);break;case 361:this.sunId=String(Q.value);break;case 421:this.ambientLightColorInstance=H;break;case 431:this.ambientLightColorName=String(Q.value);break;default:break}}return this.applyViewportDxfIn(n,i,o,a,s,l,c,u,h),this._viewDirection.copy({x:d,y:p,z:f}),this._snapBase.copy({x:m,y:g,z:y}),this._snapSpacing.copy({x:b,y:v,z:x}),this._gridSpacing.copy({x:w,y:_,z:A}),this._ucsOrigin.copy({x:E,y:S,z:M}),this._ucsXAxis.copy({x:T,y:L,z:O}),this._ucsYAxis.copy({x:D,y:z,z:N}),this.frozenLayerIds=J,this.softPointers=X,this},e.prototype.applyViewportDxfIn=function(t,n,i,o,a,s,l,c,u){this.centerPoint.copy({x:t,y:n,z:i}),this.viewCenter.copy({x:o,y:a,z:s}),this.viewTarget.copy({x:l,y:c,z:u});var h=1e-6,d=Math.abs(t)<h&&Math.abs(n)<h,p=Math.abs(l)<h&&Math.abs(c)<h,f=Number.isFinite(this.height)&&Number.isFinite(this.viewHeight)&&Math.abs(this.viewHeight-this.height)<h;d&&p&&f&&this.centerPoint.copy(this.viewCenter)},e.prototype.moveGripAt=function(t,n){var i,o;switch(t){case 0:this._centerPoint.add(n);break;case 1:case 2:case 3:case 4:{var a=this.width/2,s=this.height/2,l=this._centerPoint.x,c=this._centerPoint.y,u={1:{x:l-a,y:c-s},2:{x:l+a,y:c-s},3:{x:l+a,y:c+s},4:{x:l-a,y:c+s}},h=t===1?3:t===2?4:t===3?1:2,d=u[t],p=u[h];d.x+=n.x,d.y+=n.y,this._centerPoint.x=(d.x+p.x)/2,this._centerPoint.y=(d.y+p.y)/2,this._centerPoint.z=((i=this._centerPoint.z)!==null&&i!==void 0?i:0)+((o=n.z)!==null&&o!==void 0?o:0),this.width=Math.abs(p.x-d.x),this.height=Math.abs(p.y-d.y);break}default:break}},e.typeName="Viewport",e})(bt)});var ohe,Yx,Q3=W(()=>{tt();E2();ohe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Yx=(function(r){ohe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"WIPEOUT"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){t.subEntityTraits.isBackgroundFill=!0;var n=this.boundaryPath(),i=new pr;return i.add(new Ot(n)),t.area(i)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),this},e.typeName="Wipeout",e})(hl)});var ahe,Rh,eD=W(()=>{tt();Fn();no();En();ahe=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Rh=(function(r){ahe(e,r);function e(){var t=r.call(this)||this;return t._basePoint=new k,t._unitDir=new G,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"XLINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"basePoint",{get:function(){return this._basePoint},set:function(t){this._basePoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unitDir",{get:function(){return this._unitDir},set:function(t){this._unitDir.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=new De;return t.expandByPoint(this._unitDir.clone().multiplyScalar(10).add(this._basePoint)),t.expandByPoint(this._unitDir.clone().multiplyScalar(-10).add(this._basePoint)),t},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t=this._basePoint.clone().add(this._unitDir);return[{kind:"line",line:new Yn(this._basePoint,t),extent:"unbounded"}]},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"basePointX",type:"float",editable:!0,accessor:{get:function(){return t.basePoint.x},set:function(n){t.basePoint.x=n}}},{name:"basePointY",type:"float",editable:!0,accessor:{get:function(){return t.basePoint.y},set:function(n){t.basePoint.y=n}}},{name:"basePointZ",type:"float",editable:!0,accessor:{get:function(){return t.basePoint.z},set:function(n){t.basePoint.z=n}}},{name:"unitDirX",type:"float",editable:!0,accessor:{get:function(){return t.unitDir.x},set:function(n){t.unitDir.x=n}}},{name:"unitDirY",type:"float",editable:!0,accessor:{get:function(){return t.unitDir.y},set:function(n){t.unitDir.y=n}}},{name:"unitDirZ",type:"float",editable:!0,accessor:{get:function(){return t.unitDir.z},set:function(n){t.unitDir.z=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push(this.basePoint),t},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this.basePoint),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=this.basePoint;if(t===ne.EndPoint){o.push(a);return}var s=this.unitDir.clone();if(s.lengthSq()!==0){s.normalize();var l=new Yn(a,a.clone().add(s));switch(t){case ne.Nearest:o.push(l.project(n));break;case ne.Perpendicular:o.push(l.perpPoint(n));break;default:break}}},e.prototype.transformBy=function(t){return this._basePoint.applyMatrix4(t),this._unitDir.transformDirection(t),this},Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=[];return n.push(this._unitDir.clone().multiplyScalar(-1e6).add(this._basePoint)),n.push(this._unitDir.clone().multiplyScalar(1e6).add(this._basePoint)),t.lines(n)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbXline"),t.writePoint3d(10,this.basePoint),t.writeVector3d(11,this.unitDir),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbXline");for(var n=this.basePoint.x,i=this.basePoint.y,o=this.basePoint.z,a=this.unitDir.x,s=this.unitDir.y,l=this.unitDir.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var c=t.readItem();if(!c)break;var u=Number(c.code),h=Number(c.value);switch(u){case 10:n=h;break;case 20:i=h;break;case 30:o=h;break;case 11:a=h;break;case 21:s=h;break;case 31:l=h;break;default:break}}return this.basePoint=new k(n,i,o),this.unitDir=new G(a,s,l),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.basePoint,i=this.unitDir,o=Math.hypot(i.x,i.y);return o<=1e-9||(i.x*(t.y-n.y)-i.y*(t.x-n.x))/o>=0?1:-1},e.prototype.createOffsetCurve=function(t){var n=km(this.basePoint,this.unitDir,t);if(!n)return null;var i=new e;return i.basePoint=n,i.unitDir=this.unitDir.clone(),i},e.typeName="Xline",e})(vn)});var $x,$9=W(()=>{(function(r){r.ClosedFilled="",r.Dot="_DOT",r.DotSmall="_DOTSMALL",r.DotBlank="_DOTBLANK",r.Origin="_ORIGIN",r.Origin2="_ORIGIN2",r.Open="_OPEN",r.Open90="_OPEN90",r.Open30="_OPEN30",r.Closed="_CLOSED",r.Small="_SMALL",r.None="_NONE",r.Oblique="_OBLIQUE",r.BoxFilled="_BOXFILLED",r.Box="_BOXBLANK",r.ClosedBlank="_CLOSEDBLANK",r.DatumBlank="_DATUMBLANK",r.DatumFilled="_DATUMFILLED",r.Integral="_INTEGRAL",r.ArchTick="_ARCHTICK"})($x||($x={}))});function ac(r,e){var t=r.get(e);return t||(t={bytes:0,count:0},r.set(e,t)),t}function xs(r,e,t,n){if(n===void 0&&(n=0),!(t<=0&&n===0)){var i=ac(r.byCategory,e);i.bytes+=t,i.count+=n}}function phe(r){var e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function fhe(r){return ArrayBuffer.isView(r)}function mhe(r){return typeof r.addEventListener=="function"&&typeof r.dispatch=="function"&&"listeners"in r}function ghe(r,e,t){return eG.has(e)?!0:!r.includeEventManagers&&(e==="events"||t==="events")?e==="events":!r.includeTransactionManager&&(e==="transactionManager"||t==="transaction")?e==="transactionManager":!1}function Z9(r,e,t){return e==="_xDataMap"||e==="_importedXData"||r==="xdata"?"xdata":e==="_tables"||r==="tables"?t instanceof bt?"entities":"tables":e==="_entities"||r==="entities"?"entities":e==="_objects"||r==="objects"?"objects":e==="_handleRegistry"||r==="handleRegistry"?"handleRegistry":e==="transactionManager"||r==="transaction"?"transaction":e==="events"||r==="events"?"events":r==="sysvars"||dhe.has(e)?"sysvars":t instanceof bt?"entities":r==="other"?"other":r}function yhe(r){for(var e,t,n=new Set,i=r;i&&i!==Object.prototype;){try{for(var o=(e=void 0,sc(Object.getOwnPropertyNames(i))),a=o.next();!a.done;a=o.next()){var s=a.value;if(!eG.has(s)){var l=Object.getOwnPropertyDescriptor(i,s);l&&typeof l.value=="function"||l&&(l.get||l.set)&&l.value===void 0||n.add(s)}}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}if(i=Object.getPrototypeOf(i),i===Object.prototype||i===null||i===Array.prototype||i===Map.prototype||i===Set.prototype)break}return she([],Wg(n),!1)}function tG(r){var e;if(r==null)return 0;switch(typeof r){case"number":return che;case"boolean":return uhe;case"string":return iD+r.length*2;case"bigint":return 16;case"symbol":return iD+String((e=r.description)!==null&&e!==void 0?e:"").length*2;default:return 0}}function bhe(r,e){var t,n;if(r.visited.has(e))return 0;r.visited.add(e),r.objectCount+=1;var i=J9+e.size*Q9;try{for(var o=sc(e.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;i+=tG(s)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return xs(r,"handleRegistry",i,1),i}function Hg(r,e,t,n){var i,o,a,s,l,c,u,h;if(e==null)return 0;var d=typeof e;if(d==="function")return 0;if(d!=="object"){var p=tG(e);if(xs(r,t,p),n){var f=ac(r.byEntityType,n);f.bytes+=p}return p}var m=e;if(typeof m.nodeType=="number"||r.visited.has(m))return 0;if(r.visited.add(m),r.objectCount+=1,!r.includeEventManagers&&mhe(m))return xs(r,t,Gg,1),Gg;var g=n,y=t,b=!1;if(m instanceof bt){b=!0,y="entities",g=m.type,r.entityCount+=1;var v=ac(r.byEntityType,g);v.count+=1}if(typeof m.then=="function")return xs(r,y,Gg,1),Gg;if(m instanceof ArrayBuffer){var x=q9+m.byteLength;return xs(r,y,x,1),g&&(ac(r.byEntityType,g).bytes+=x),x}if(fhe(m)){var w=q9+m.byteLength;return m.buffer&&!r.visited.has(m.buffer)&&r.visited.add(m.buffer),xs(r,y,w,1),g&&(ac(r.byEntityType,g).bytes+=w),w}if(typeof Blob<"u"&&m instanceof Blob){var _=hhe+m.size;return xs(r,y,_,1),g&&(ac(r.byEntityType,g).bytes+=_),_}if(m instanceof Date){var A=Gg+8;return xs(r,y,A,1),A}if(m instanceof Map){var E=y==="handleRegistry",S=J9+m.size*Q9,M=S;xs(r,y,S,1),g&&(ac(r.byEntityType,g).bytes+=S);try{for(var T=sc(m),L=T.next();!L.done;L=T.next()){var O=Wg(L.value,2),D=O[0],z=O[1];M+=Hg(r,D,y,g),E||(M+=Hg(r,z,y,g))}}catch(Oe){i={error:Oe}}finally{try{L&&!L.done&&(o=T.return)&&o.call(T)}finally{if(i)throw i.error}}return M}if(m instanceof Set){var N=tD+m.size*nD;try{for(var J=sc(m),X=J.next();!X.done;X=J.next()){var Q=X.value;N+=Hg(r,Q,y,g)}}catch(Oe){a={error:Oe}}finally{try{X&&!X.done&&(s=J.return)&&s.call(J)}finally{if(a)throw a.error}}return xs(r,y,tD+m.size*nD,1),g&&(ac(r.byEntityType,g).bytes+=tD+m.size*nD),N}if(Array.isArray(m)){var ce=lhe+m.length*K9;xs(r,y,ce,1),g&&(ac(r.byEntityType,g).bytes+=ce);for(var H=0;H<m.length;H++){var de=m[H],Se=Z9(y,String(H),de);ce+=Hg(r,de,Se,g)}return ce}var te=Gg,ue=phe(m)?Object.getOwnPropertyNames(m):yhe(m);try{for(var ve=sc(ue),se=ve.next();!se.done;se=ve.next()){var we=se.value;te+=K9,te+=Math.min(iD+we.length*2,64)}}catch(Oe){l={error:Oe}}finally{try{se&&!se.done&&(c=ve.return)&&c.call(ve)}finally{if(l)throw l.error}}xs(r,y,te,1),g&&(ac(r.byEntityType,g).bytes+=te);try{for(var pe=sc(ue),Ee=pe.next();!Ee.done;Ee=pe.next()){var we=Ee.value;if(!ghe(r,we,y)&&!(we==="_database"||we==="database")){var de=void 0;try{de=m[we]}catch{continue}if(typeof de!="function"){if(we==="_handleRegistry"&&de instanceof Map){te+=bhe(r,de);continue}var Se=Z9(y,we,de);!r.includeTransactionManager&&Se==="transaction"||!r.includeEventManagers&&Se==="events"||(te+=Hg(r,de,Se,g))}}}}catch(Oe){u={error:Oe}}finally{try{Ee&&!Ee.done&&(h=pe.return)&&h.call(pe)}finally{if(u)throw u.error}}return te}function T2(r,e){var t,n,i,o,a={visited:new WeakSet,objectCount:0,entityCount:0,byCategory:new Map,byEntityType:new Map,includeTransactionManager:e?.includeTransactionManager===!0,includeEventManagers:e?.includeEventManagers===!0};Hg(a,r,"sysvars",null);var s=0,l={};try{for(var c=sc(a.byCategory),u=c.next();!u.done;u=c.next()){var h=Wg(u.value,2),d=h[0],p=h[1];l[d]={bytes:p.bytes,count:p.count},s+=p.bytes}}catch(b){t={error:b}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}var f={};try{for(var m=sc(a.byEntityType),g=m.next();!g.done;g=m.next()){var y=Wg(g.value,2),d=y[0],p=y[1];f[d]={bytes:p.bytes,count:p.count}}}catch(b){i={error:b}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}return{totalBytes:s,objectCount:a.objectCount,entityCount:a.entityCount,byCategory:l,byEntityType:f}}function rD(r){return r<1024?"".concat(r," B"):r<1024*1024?"".concat((r/1024).toFixed(2)," KiB"):"".concat((r/(1024*1024)).toFixed(2)," MiB")}function oD(r){var e,t,n,i,o=["AcDbDatabase memory estimate: ".concat(rD(r.totalBytes)," (").concat(r.totalBytes," bytes)"),"Objects: ".concat(r.objectCount,", Entities: ").concat(r.entityCount),"By category:"],a=Object.entries(r.byCategory).sort(function(y,b){return b[1].bytes-y[1].bytes});try{for(var s=sc(a),l=s.next();!l.done;l=s.next()){var c=Wg(l.value,2),u=c[0],h=c[1];o.push(" ".concat(u,": ").concat(rD(h.bytes)," (").concat(h.bytes," bytes), count=").concat(h.count))}}catch(y){e={error:y}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}var d=Object.entries(r.byEntityType).sort(function(y,b){return b[1].bytes-y[1].bytes});if(d.length>0){o.push("By entity type:");try{for(var p=sc(d),f=p.next();!f.done;f=p.next()){var m=Wg(f.value,2),g=m[0],h=m[1];o.push(" ".concat(g,": ").concat(rD(h.bytes)," (").concat(h.bytes," bytes), count=").concat(h.count))}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}return o.join(`
  15. `)}var sc,Wg,she,Gg,K9,lhe,J9,Q9,tD,nD,iD,che,uhe,q9,hhe,dhe,eG,nG=W(()=>{Gn();sc=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wg=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},she=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Gg=48,K9=8,lhe=48,J9=80,Q9=32,tD=80,nD=24,iD=40,che=8,uhe=4,q9=64,hhe=64,dhe=new Set(["_version","_angbase","_angdir","_aunits","_auprec","_lunits","_luprec","_celtscale","_cecolor","_celtype","_celweight","_cetransparency","_clayer","_cmlstyle","_cmlscale","_cmleaderstyle","_hpbackgroundcolor","_hpcolor","_hplayer","_hptransparency","_textstyle","_dimstyle","_dimstyle","_dimstyle","_extents","_insunits","_unitmode","_measurement","_ltscale","_lwdisplay","_pdmode","_pdsize","_osmode","_orthomode","_maxHandle","_drawNoPlotLayers","_drawCircleSides","_dwgname","_currentSpace","_formatter","_eventBatchDepth","_pendingEntityAppended","_pendingEntityErased","_pendingDictObjectSet","_pendingDictObjectErased","_lastOpenError"]),eG=new Set(["constructor","prototype","__proto__","caller","callee","arguments"])});function vhe(r,e,t){let n=i=>i.toString(16).padStart(2,"0");return`#${n(r&255)}${n(e&255)}${n(t&255)}`}function lc(r,e){let t=r.getUint8(e),n=r.getUint8(e+1),i=r.getUint8(e+2);return vhe(t,n,i)}function ws(r){let e=(r>>>24&255)/255,t=r>>>16&255,n=r>>>8&255,i=r&255;return`rgba(${t},${n},${i},${e.toFixed(3)})`}function pG(r,e,t){let n=Math.min(1,Math.max(0,t)),i=(h,d)=>Math.round(h+(d-h)*n),o=r>>>24&255,a=e>>>24&255,s=i(r>>>16&255,e>>>16&255),l=i(r>>>8&255,e>>>8&255),c=i(r&255,e&255),u=i(o,a)/255;return`rgba(${s},${l},${c},${u.toFixed(3)})`}function xhe(r){let e=/^#([0-9a-f]{6})$/i.exec(r);if(e)return`#${(16777215^parseInt(e[1],16)).toString(16).padStart(6,"0")}`;let t=/^#([0-9a-f]{3})$/i.exec(r);if(t){let[i,o,a]=t[1].split("").map(l=>parseInt(l+l,16)),s=l=>(255-l).toString(16).padStart(2,"0");return`#${s(i)}${s(o)}${s(a)}`}let n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)$/i.exec(r);if(n){let i=255-Math.min(255,parseInt(n[1],10)),o=255-Math.min(255,parseInt(n[2],10)),a=255-Math.min(255,parseInt(n[3],10));return n[4]!==void 0?`rgba(${i},${o},${a},${n[4]})`:`rgb(${i},${o},${a})`}return r}function AG(r,e,t,n,i=vD,o=uD){let a=Math.max(1,Math.min(i,4)),s=Math.round(r*a),l=Math.round(e*a),c=a,u=a;if(t&&s>t){let f=t/s;s=t,l=Math.round(l*f),c*=f,u*=f}if(n&&l>n){let f=n/l;s=Math.round(s*f),l=n,c*=f,u*=f}let h=Math.max(1,Math.floor(o)),d=Math.max(1,Math.min(s,h)),p=Math.max(1,Math.min(l,h));(d!==s||p!==l)&&console.warn(`[emf-converter] Canvas size clamped from ${s}\xD7${l} to ${d}\xD7${p}. Output may lose detail.`),s=d,l=p;try{if(typeof OffscreenCanvas<"u"){St(`createCanvas: using OffscreenCanvas ${s}\xD7${l}, scale=(${c.toFixed(3)},${u.toFixed(3)})`);let g=new OffscreenCanvas(s,l),y=g.getContext("2d");return y?{canvas:g,ctx:y,scaleX:c,scaleY:u}:(cc('createCanvas: OffscreenCanvas.getContext("2d") returned null'),null)}if(typeof document>"u")return cc("createCanvas: no OffscreenCanvas and no document \u2014 cannot create canvas"),null;St(`createCanvas: using HTMLCanvasElement ${s}\xD7${l}, scale=(${c.toFixed(3)},${u.toFixed(3)})`);let f=document.createElement("canvas");f.width=s,f.height=l;let m=f.getContext("2d");return m?{canvas:f,ctx:m,scaleX:c,scaleY:u}:(cc('createCanvas: HTMLCanvasElement.getContext("2d") returned null'),null)}catch{return null}}function MG(r,e){if(r<=0||e<=0)return null;if(r=Math.max(1,Math.min(Math.floor(r),uD)),e=Math.max(1,Math.min(Math.floor(e),uD)),typeof OffscreenCanvas<"u"){let t=new OffscreenCanvas(r,e),n=t.getContext("2d");return n?{canvas:t,ctx:n}:null}if(typeof document<"u"){let t=document.createElement("canvas");t.width=r,t.height=e;let n=t.getContext("2d");return n?{canvas:t,ctx:n}:null}return null}function PG(r){switch(r){case Bhe:return{gco:"source-over",colorTransform:"black",exact:!0};case qhe:return{gco:"source-over",colorTransform:"white",exact:!0};case Xhe:return{gco:"source-over",colorTransform:"skip",exact:!0};case zhe:return{gco:"source-over",colorTransform:"invert",exact:!0};case jhe:return{gco:"difference",colorTransform:"white",exact:!0};case Vhe:case Uhe:return{gco:"difference",colorTransform:"none",exact:!1};case Whe:return{gco:"difference",colorTransform:"invert",exact:!1};case Hhe:return{gco:"darken",colorTransform:"none",exact:!1};case Nhe:case Fhe:return{gco:"darken",colorTransform:"invert",exact:!1};case Khe:case $he:return{gco:"lighten",colorTransform:"none",exact:!1};case Yhe:case Ghe:return{gco:"lighten",colorTransform:"invert",exact:!1};default:return{gco:"source-over",colorTransform:"none",exact:!0}}}function EG(r,e){switch(e){case"invert":return xhe(r);case"black":return"#000000";case"white":return"#ffffff";case"skip":return"rgba(0,0,0,0)";default:return r}}function Jr(r,e){let t=PG(e.rop2);if(r.globalCompositeOperation=t.gco,e.penStyle===5){r.strokeStyle="rgba(0,0,0,0)",r.lineWidth=0;return}switch(r.strokeStyle=EG(e.penColor,t.colorTransform),r.lineWidth=Math.max(e.penWidth,1),e.penStyle){case 1:r.setLineDash([8,4]);break;case 2:r.setLineDash([2,2]);break;case 3:r.setLineDash([8,4,2,4]);break;case 4:r.setLineDash([8,4,2,4,2,4]);break;default:r.setLineDash([]);break}}function uo(r,e){let t=PG(e.rop2);if(r.globalCompositeOperation=t.gco,e.brushStyle===1){r.fillStyle="rgba(0,0,0,0)";return}r.fillStyle=EG(e.brushColor,t.colorTransform)}function ufe(r){if(!r||r===400)return"";let e=Math.round(r/100)*100;return e===700?"bold":e>=100&&e<=900?String(e):r>=700?"bold":""}function pD(r,e){let t=e?.[r.toLowerCase().trim()]??r;return/[\s,]/.test(t)&&!/^["']/.test(t)?`"${t}"`:t}function xD(r,e=1){return Math.max(Math.abs(r.fontHeight)*Math.abs(e||1),8)}function fD(r,e,t=1){let n=e.fontItalic?"italic ":"",i=ufe(e.fontWeight),o=i?`${i} `:"",a=xD(e,t),s=pD(e.fontFamily,e.fontFamilyMap);r.font=`${n}${o}${a}px ${s}`}function hfe(r,e,t,n,i,o=1){if(!e.fontUnderline&&!e.fontStrikeOut)return;let a=xD(e,o),s=Math.max(1,Math.round(a/14)),l=r.fillStyle;r.fillStyle=e.textColor,e.fontUnderline&&r.fillRect(t,n+Math.round(a*.12),i,s),e.fontStrikeOut&&r.fillRect(t,n-Math.round(a*.3),i,s),r.fillStyle=l}function qx(r,e,t){if(t<=0)return"";let n=r.byteLength-e;if(n<=0)return"";let i=Math.min(t,Math.floor(n/2));if(i<=0)return"";let o;try{let s=new Uint8Array(r.buffer,r.byteOffset+e,i*2);o=new TextDecoder("utf-16le").decode(s)}catch{let s=[];for(let l=0;l<i;l++){let c=r.getUint16(e+l*2,!0);if(c===0)return s.join("");s.push(String.fromCharCode(c))}return s.join("")}let a=o.indexOf("\0");return a===-1?o:o.slice(0,a)}function dfe(r){switch(r){case 0:return{kind:"brush",style:0,color:"#ffffff"};case 1:return{kind:"brush",style:0,color:"#c0c0c0"};case 2:return{kind:"brush",style:0,color:"#808080"};case 3:return{kind:"brush",style:0,color:"#404040"};case 4:return{kind:"brush",style:0,color:"#000000"};case 5:return{kind:"brush",style:1,color:"#000000"};case 6:return{kind:"pen",style:0,widthX:1,color:"#ffffff"};case 7:return{kind:"pen",style:0,widthX:1,color:"#000000"};case 8:return{kind:"pen",style:5,widthX:0,color:"#000000"};case 10:case 11:return{kind:"font",height:12,weight:400,italic:!1,underline:!1,strikeOut:!1,family:"monospace"};case 12:case 13:case 14:case 17:return{kind:"font",height:12,weight:400,italic:!1,underline:!1,strikeOut:!1,family:"sans-serif"};default:return null}}async function pfe(r){return new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(n.error),n.readAsDataURL(r)})}async function CG(r){if(typeof OffscreenCanvas<"u"&&r instanceof OffscreenCanvas){St(`exportCanvasToPngDataUrl: using OffscreenCanvas.convertToBlob (${r.width}\xD7${r.height})`);let e=await r.convertToBlob({type:"image/png"});return St(`exportCanvasToPngDataUrl: blob size=${e.size} bytes, type=${e.type}`),pfe(e)}return typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement?(St(`exportCanvasToPngDataUrl: using HTMLCanvasElement.toDataURL (${r.width}\xD7${r.height})`),r.toDataURL("image/png")):null}function ffe(r){if(St("parseEmfHeader: byteLength =",r.byteLength),r.byteLength<88||r.getUint32(0,!0)!==fG)return null;let t=r.getInt32(8,!0),n=r.getInt32(12,!0),i=r.getInt32(16,!0),o=r.getInt32(20,!0),a=r.getInt32(24,!0),s=r.getInt32(28,!0),l=r.getInt32(32,!0),c=r.getInt32(36,!0),u=l-a,h=c-s;return{bounds:{left:t,top:n,right:i,bottom:o},frameW:u,frameH:h}}function mfe(r){let e=r.bounds.right-r.bounds.left,t=r.bounds.bottom-r.bounds.top;return e>0&&t>0?r.bounds:r.frameW>0&&r.frameH>0?(St(`getRenderableEmfBounds: bounds invalid (${e}\xD7${t}), falling back to frame ${r.frameW}\xD7${r.frameH}`),{left:0,top:0,right:r.frameW,bottom:r.frameH}):null}function gfe(r){if(r.byteLength<22)return null;let e=r.getUint32(0,!0),t=0,n=0,i=0,o=800,a=600,s=96;if(e===2596720087&&(n=r.getInt16(6,!0),i=r.getInt16(8,!0),o=r.getInt16(10,!0),a=r.getInt16(12,!0),s=r.getUint16(14,!0)||96,t=22),t+18>r.byteLength)return null;let l=r.getUint16(t,!0);if(l!==1&&l!==2)return null;let c=r.getUint16(t+2,!0)*2,u=r.getUint32(t+8,!0)*2;return{headerSize:t+c,maxRecordSize:u,boundsLeft:n,boundsTop:i,boundsRight:o,boundsBottom:a,unitsPerInch:s}}function mn(r,e){let t=r.state.worldTransform,n=t[0]*e+t[4];return r.useMappingMode?(n-r.windowOrg.x)/(r.windowExt.cx||1)*(r.viewportExt.cx||1)+r.viewportOrg.x:(n-r.bounds.left)*r.sx}function gn(r,e){let t=r.state.worldTransform,n=t[3]*e+t[5];return r.useMappingMode?(n-r.windowOrg.y)/(r.windowExt.cy||1)*(r.viewportExt.cy||1)+r.viewportOrg.y:(n-r.bounds.top)*r.sy}function _s(r,e){let t=r.state.worldTransform[0]*e;return r.useMappingMode?t/(r.windowExt.cx||1)*(r.viewportExt.cx||1):t*r.sx}function Fa(r,e){let t=r.state.worldTransform[3]*e;return r.useMappingMode?t/(r.windowExt.cy||1)*(r.viewportExt.cy||1):t*r.sy}function Vp(r){r.useMappingMode=!0}function yfe(r,e,t){let{ctx:n,view:i}=r;if(t>=20){let o=i.getInt32(e,!0),a=i.getInt32(e+4,!0),s=lc(i,e+8);n.fillStyle=s,n.fillRect(mn(r,o),gn(r,a),1,1)}return!0}function bfe(r,e,t){let{ctx:n,view:i,state:o,inPath:a}=r;return t>=16&&(o.curX=i.getInt32(e,!0),o.curY=i.getInt32(e+4,!0),a&&n.moveTo(mn(r,o.curX),gn(r,o.curY))),!0}function vfe(r,e,t){let{ctx:n,view:i,state:o,inPath:a}=r;if(t>=16){let s=i.getInt32(e,!0),l=i.getInt32(e+4,!0);a?n.lineTo(mn(r,s),gn(r,l)):(Jr(n,o),n.beginPath(),n.moveTo(mn(r,o.curX),gn(r,o.curY)),n.lineTo(mn(r,s),gn(r,l)),n.stroke()),o.curX=s,o.curY=l}return!0}function xfe(r,e,t){let{ctx:n,view:i,state:o,inPath:a}=r;if(t>=24){let s=i.getInt32(e,!0),l=i.getInt32(e+4,!0),c=i.getInt32(e+8,!0),u=i.getInt32(e+12,!0);a?n.rect(mn(r,s),gn(r,l),_s(r,c-s),Fa(r,u-l)):(uo(n,o),n.fillRect(mn(r,s),gn(r,l),_s(r,c-s),Fa(r,u-l)),Jr(n,o),n.strokeRect(mn(r,s),gn(r,l),_s(r,c-s),Fa(r,u-l)))}return!0}function wfe(r,e,t){let{ctx:n,view:i,state:o,inPath:a}=r;if(t>=32){let s=i.getInt32(e,!0),l=i.getInt32(e+4,!0),c=i.getInt32(e+8,!0),u=i.getInt32(e+12,!0),h=Math.abs(_s(r,i.getInt32(e+16,!0)))/2,d=Math.abs(Fa(r,i.getInt32(e+20,!0)))/2,p=mn(r,s),f=gn(r,l),m=_s(r,c-s),g=Fa(r,u-l),y=()=>{let b=Math.min(h,d,m/2,g/2);n.moveTo(p+b,f),n.lineTo(p+m-b,f),n.arcTo(p+m,f,p+m,f+b,b),n.lineTo(p+m,f+g-b),n.arcTo(p+m,f+g,p+m-b,f+g,b),n.lineTo(p+b,f+g),n.arcTo(p,f+g,p,f+g-b,b),n.lineTo(p,f+b),n.arcTo(p,f,p+b,f,b),n.closePath()};a?y():(n.beginPath(),y(),uo(n,o),n.fill(),Jr(n,o),n.stroke())}return!0}function _fe(r,e,t){let{ctx:n,view:i,state:o,inPath:a}=r;if(t>=24){let s=i.getInt32(e,!0),l=i.getInt32(e+4,!0),c=i.getInt32(e+8,!0),u=i.getInt32(e+12,!0),h=mn(r,(s+c)/2),d=gn(r,(l+u)/2),p=Math.abs(_s(r,c-s))/2,f=Math.abs(Fa(r,u-l))/2;a?n.ellipse(h,d,p,f,0,0,Math.PI*2):(n.beginPath(),n.ellipse(h,d,p,f,0,0,Math.PI*2),uo(n,o),n.fill(),Jr(n,o),n.stroke())}return!0}function Sfe(r,e,t,n){let{ctx:i,view:o,state:a,inPath:s}=r;if(n>=40){let l=o.getInt32(t,!0),c=o.getInt32(t+4,!0),u=o.getInt32(t+8,!0),h=o.getInt32(t+12,!0),d=o.getInt32(t+16,!0),p=o.getInt32(t+20,!0),f=o.getInt32(t+24,!0),m=o.getInt32(t+28,!0),g=(l+u)/2,y=(c+h)/2,b=Math.abs(u-l)/2,v=Math.abs(h-c)/2,x=Math.atan2((p-y)/(v||1),(d-g)/(b||1)),w=Math.atan2((m-y)/(v||1),(f-g)/(b||1)),_=mn(r,g),A=gn(r,y),E=Math.abs(_s(r,b)),S=Math.abs(Fa(r,v)),M=e===xG,T=e===R2||e===hD;s||i.beginPath(),e===R2&&i.moveTo(_,A),M&&i.lineTo(_+E*Math.cos(x),A+S*Math.sin(x)),i.ellipse(_,A,E,S,0,x,w,!1),(e===R2||e===hD)&&i.closePath(),s||(T&&(uo(i,a),i.fill()),Jr(i,a),i.stroke()),M&&(a.curX=f,a.curY=m)}return!0}function Afe(r,e,t,n){switch(e){case khe:return yfe(r,t,n);case ede:return bfe(r,t,n);case bde:return vfe(r,t,n);case mde:return xfe(r,t,n);case gde:return wfe(r,t,n);case fde:return _fe(r,t,n);case yde:case xG:case hD:case R2:return Sfe(r,e,t,n);default:return!1}}function Mfe(r,e,t,n){return{cmds:[{op:"rect",x:r,y:e,w:t,h:n}],fillRule:"nonzero",simple:!0}}function Pfe(r){return{cmds:r.map(e=>({op:"rect",x:e.x,y:e.y,w:e.w,h:e.h})),fillRule:"nonzero",simple:!0}}function Xg(){return{cmds:[{op:"rect",x:0,y:0,w:0,h:0}],fillRule:"nonzero",simple:!0}}function Efe(r,e,t){return{...r,cmds:r.cmds.map(n=>{switch(n.op){case"rect":return{...n,x:n.x+e,y:n.y+t};case"moveTo":case"lineTo":return{...n,x:n.x+e,y:n.y+t};case"bezierCurveTo":return{...n,cp1x:n.cp1x+e,cp1y:n.cp1y+t,cp2x:n.cp2x+e,cp2y:n.cp2y+t,x:n.x+e,y:n.y+t};case"closePath":return n}})}}function TG(r,e,t){return r?r.map(n=>Efe(n,e,t)):null}function Bh(r){return r.simple&&r.fillRule==="nonzero"}function L2(r){return{cmds:[{op:"rect",x:-I2,y:-I2,w:2*I2,h:2*I2},...r.cmds],fillRule:"evenodd",simple:!1}}function Kx(r,e,t){switch(t){case"replace":return{region:[e],exact:!0};case"intersect":return{region:r?[...r,e]:[e],exact:!0};case"exclude":{if(!Bh(e))return{region:r?[...r,e]:[e],exact:!1};let n=L2(e);return{region:r?[...r,n]:[n],exact:!0}}case"union":return r?r.length===1&&Bh(r[0])&&Bh(e)?{region:[{cmds:[...r[0].cmds,...e.cmds],fillRule:"nonzero",simple:!1}],exact:!1}:{region:r,exact:!1}:{region:null,exact:!0};case"xor":return r?r.length===1&&Bh(r[0])&&Bh(e)?{region:[{cmds:[...r[0].cmds,...e.cmds],fillRule:"evenodd",simple:!1}],exact:!0}:Bh(e)?{region:[...r,L2(e)],exact:!1}:{region:[...r,e],exact:!1}:Bh(e)?{region:[L2(e)],exact:!0}:{region:[e],exact:!1};case"complement":return r?r.length===1&&Bh(r[0])?{region:[e,L2(r[0])],exact:!0}:{region:[e],exact:!1}:{region:[Xg()],exact:!0}}}function kG(r,e,t){if(t==="replace")return{region:e,exact:!0};if(e&&e.length===1)return Kx(r,e[0],t);if(!e)switch(t){case"intersect":return{region:r,exact:!0};case"union":return{region:null,exact:!0};case"exclude":return{region:[Xg()],exact:!0};case"xor":case"complement":return r?r.length===1?Kx(null,r[0],"exclude"):{region:r,exact:!1}:{region:[Xg()],exact:!0}}switch(t){case"intersect":return{region:r?[...r,...e]:e,exact:!0};case"union":return{region:r,exact:!1};case"xor":return{region:r??e,exact:!1};case"exclude":return{region:r,exact:!1};case"complement":return r?r.length===1?Kx(e,r[0],"exclude"):{region:e,exact:!1}:{region:[Xg()],exact:!0}}}function Cfe(r,e){for(let t of e)switch(t.op){case"rect":r.rect(t.x,t.y,t.w,t.h);break;case"moveTo":r.moveTo(t.x,t.y);break;case"lineTo":r.lineTo(t.x,t.y);break;case"bezierCurveTo":r.bezierCurveTo(t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.x,t.y);break;case"closePath":r.closePath();break}}function mD(r,e){for(let t of e){r.beginPath(),Cfe(r,t.cmds);try{r.clip(t.fillRule)}catch{}}}function Yg(r,e,t=!1){let{ctx:n}=r;for(;r.clipSaveDepth>0;)n.restore(),r.clipSaveDepth--;e&&(n.save(),r.clipSaveDepth=1,t&&n.setTransform(1,0,0,1,0,0),mD(n,e))}function Tfe(r,e,t,n,i,o,a,s,l,c){let u=0,h=i-1,d=e,p=e+t;for(;d+1<p&&h>=0;){let f=r.getUint8(d),m=r.getUint8(d+1);if(d+=2,f===0)if(m===0)u=0,h--;else{if(m===1)break;if(m===2){if(d+1>=p)break;u+=r.getUint8(d),h-=r.getUint8(d+1),d+=2}else{let g=m;if(a){let y=Math.ceil(g/2),b=0;for(let v=0;v<y&&d<p;v++){let x=r.getUint8(d++);for(let w=0;w<2&&b<g;w++){let _=w===0?x>>4&15:x&15;_<s.length&&u<n&&c(u,i-1-h,s[_][0],s[_][1],s[_][2],255),u++,b++}}y&1&&d++}else{for(let y=0;y<g&&d<p&&u<n;y++){let b=r.getUint8(d++);b<s.length&&c(u,i-1-h,s[b][0],s[b][1],s[b][2],255),u++}g&1&&d++}}}else if(a){let g=m>>4&15,y=m&15;for(let b=0;b<f&&u<n;b++){let v=(b&1)===0?g:y;v<s.length&&c(u,i-1-h,s[v][0],s[v][1],s[v][2],255),u++}}else{let g=m,y=g<s.length?s[g]:[0,0,0];for(let b=0;b<f&&u<n;b++)c(u,i-1-h,y[0],y[1],y[2],255),u++}}return new ImageData(new Uint8ClampedArray(l.buffer,l.byteOffset,l.byteLength),n,i)}function lD(r){if(r===0)return 0;let e=0,t=r;for(;(t&1)===0;)t>>>=1,e++;return e}function Ife(r,e,t,n,i){let o=0,a=0,s=0,l=0,c=0,u=0,h=1,d=1,p=1;if(n===kfe){let f=e+t;if(f+12>r.byteLength)return null;o=r.getUint32(f,!0),a=r.getUint32(f+4,!0),s=r.getUint32(f+8,!0),l=lD(o),c=lD(a),u=lD(s),h=o>>>l||1,d=a>>>c||1,p=s>>>u||1}else i===16&&(o=31744,a=992,s=31,l=10,c=5,u=0,h=31,d=31,p=31);return{rMask:o,gMask:a,bMask:s,rShift:l,gShift:c,bShift:u,rMax:h,gMax:d,bMax:p}}function Lfe(r,e,t,n,i,o,a,s,l){let c=Math.floor((o*t+31)/32)*4,{rMask:u,gMask:h,bMask:d,rShift:p,gShift:f,bShift:m,rMax:g,gMax:y,bMax:b}=s;for(let v=0;v<n;v++){let x=i?v:n-1-v,w=e+x*c;if(!(w+c>r.byteLength))for(let _=0;_<t;_++){let A=(v*t+_)*4;if(o===1){let E=w+(_>>3),S=r.getUint8(E)>>7-(_&7)&1;S<a.length&&(l[A]=a[S][0],l[A+1]=a[S][1],l[A+2]=a[S][2]),l[A+3]=255}else if(o===4){let E=w+(_>>1),S=(_&1)===0?r.getUint8(E)>>4&15:r.getUint8(E)&15;S<a.length&&(l[A]=a[S][0],l[A+1]=a[S][1],l[A+2]=a[S][2]),l[A+3]=255}else if(o===8){let E=r.getUint8(w+_);E<a.length&&(l[A]=a[E][0],l[A+1]=a[E][1],l[A+2]=a[E][2]),l[A+3]=255}else if(o===16){let E=r.getUint16(w+_*2,!0);l[A]=Math.round(((E&u)>>>p)*255/g),l[A+1]=Math.round(((E&h)>>>f)*255/y),l[A+2]=Math.round(((E&d)>>>m)*255/b),l[A+3]=255}else if(o===24){let E=w+_*3;l[A]=r.getUint8(E+2),l[A+1]=r.getUint8(E+1),l[A+2]=r.getUint8(E),l[A+3]=255}else{let E=w+_*4,S=r.getUint8(E),M=r.getUint8(E+1),T=r.getUint8(E+2),L=r.getUint8(E+3);l[A]=T,l[A+1]=M,l[A+2]=S,l[A+3]=L===0?255:L}}}}function IG(r,e,t,n){if(e<0||t<0||e+40>r.byteLength||t+n>r.byteLength)return null;let i=r.getUint32(e,!0);if(i<40||e+i>r.byteLength)return null;let o=r.getInt32(e+4,!0),a=r.getInt32(e+8,!0),s=r.getUint16(e+12,!0),l=r.getUint16(e+14,!0),c=r.getUint32(e+16,!0);if(s!==1||o<=0||a===0||o>8192||Math.abs(a)>8192)return null;let u=0,h=1,d=2,p=3;if(l!==1&&l!==4&&l!==8&&l!==16&&l!==24&&l!==32||c===h&&l!==8||c===d&&l!==4||c===p&&l!==16&&l!==32||c!==u&&c!==h&&c!==d&&c!==p)return null;let f=Math.abs(a),m=a<0,g=[];if(l<=8){let v=1<<l,x=r.getUint32(e+32,!0)||v,w=Math.min(x,v),_=e+i;if(_+w*4>r.byteLength)return null;for(let A=0;A<w;A++){let E=r.getUint8(_+A*4),S=r.getUint8(_+A*4+1),M=r.getUint8(_+A*4+2);g.push([M,S,E])}}let y=Ife(r,e,i,c,l);if(!y)return null;let b=new Uint8ClampedArray(o*f*4);return c===h||c===d?Tfe(r,t,n,o,f,m,c===d,g,b,(x,w,_,A,E,S)=>{let M=(w*o+x)*4;b[M]=_,b[M+1]=A,b[M+2]=E,b[M+3]=S}):(Lfe(r,t,o,f,m,l,g,y,b),new ImageData(b,o,f))}function Ofe(r,e,t,n){let{ctx:i,view:o,state:a}=r;if(n>=76){let s=o.getInt32(t+28,!0),l=o.getInt32(t+32,!0),c=o.getUint32(t+36,!0),u=o.getUint32(t+40,!0),h=o.byteLength;if(c>0&&u>0&&e+u+c*2<=h){let d=qx(o,e+u,c);if(d.length>0){let p=Math.abs(Fa(r,1));fD(i,a,p),i.fillStyle=a.textColor;let f=a.textAlign&24,m=f===24?"alphabetic":f===8?"bottom":"top",g="left";if(a.textAlign&6&&(g="center"),a.textAlign&2&&(g="right"),i.textBaseline=m,i.textAlign=g,a.bkMode===2){let y=i.measureText(d),b=xD(a,p);i.fillStyle=a.bkColor,i.fillRect(mn(r,s),gn(r,l)-b,y.width,b),i.fillStyle=a.textColor}if(i.fillText(d,mn(r,s),gn(r,l)),a.fontUnderline||a.fontStrikeOut){let y=i.measureText(d).width,b=mn(r,s),v=g==="center"?b-y/2:g==="right"?b-y:b;hfe(i,a,v,gn(r,l),y,p)}}}}return!0}function Bfe(r,e,t,n){let{ctx:i,view:o,state:a}=r;if(n>=96){let s=o.getInt32(t+16,!0),l=o.getInt32(t+20,!0),c=o.getInt32(t+24,!0),u=o.getInt32(t+28,!0),h=o.getUint32(t+32,!0),d=o.getUint32(t+76,!0),p=o.getUint32(t+80,!0),f=o.getUint32(t+84,!0),m=o.getUint32(t+88,!0);if(d===0&&h===Dfe){let g=i.fillStyle;return a.brushStyle!==Rfe&&(i.fillStyle=a.brushColor,i.fillRect(mn(r,s),gn(r,l),_s(r,c),Fa(r,u))),i.fillStyle=g,!0}if(d>0&&p>0&&f>0&&m>0){let g=IG(o,e+d,e+f,m);if(g){let y=MG(g.width,g.height);y&&(y.ctx.putImageData(g,0,0),i.drawImage(y.canvas,mn(r,s),gn(r,l),_s(r,c),Fa(r,u)))}}}return!0}function Ffe(r,e,t,n){let{ctx:i,view:o}=r;if(n>=80){let a=o.getInt32(t+16,!0),s=o.getInt32(t+20,!0),l=o.getInt32(t+64,!0),c=o.getInt32(t+68,!0),u=o.getUint32(t+40,!0),h=o.getUint32(t+44,!0),d=o.getUint32(t+48,!0),p=o.getUint32(t+52,!0);if(u>0&&h>0&&d>0&&p>0){let f=IG(o,e+u,e+d,p);if(f){let m=MG(f.width,f.height);m&&(m.ctx.putImageData(f,0,0),i.drawImage(m.canvas,mn(r,a),gn(r,s),_s(r,l),Fa(r,c)))}}}return!0}function wD(r,e,t){let{ctx:n}=r;if(r.clipUntracked&&t!=="replace")switch(t){case"intersect":case"complement":{n.save(),r.clipSaveDepth++,mD(n,[e]);return}case"exclude":case"xor":{let o=Kx(null,e,"exclude");n.save(),r.clipSaveDepth++,mD(n,o.region??[e]);return}case"union":return}let i=Kx(t==="replace"?null:r.clipRegion??null,e,t);i.exact,r.clipRegion=i.region,r.clipUntracked=!1,Yg(r,i.region)}function LG(r,e){let{view:t}=r,n=t.getInt32(e,!0),i=t.getInt32(e+4,!0),o=t.getInt32(e+8,!0),a=t.getInt32(e+12,!0);return Mfe(mn(r,n),gn(r,i),_s(r,o-n),Fa(r,a-i))}function Nfe(r,e,t){return t>=24&&wD(r,LG(r,e),"intersect"),!0}function zfe(r,e,t){return t>=24&&wD(r,LG(r,e),"exclude"),!0}function jfe(r,e,t){let{view:n}=r;if(t<16)return!0;let i=n.getUint32(e,!0),o=n.getUint32(e+4,!0),a=Ufe[o];if(!a)return!0;if(i===0)return a==="replace"&&(r.clipRegion=null,r.clipUntracked=!1,Yg(r,null)),!0;let s=e+8;if(i<32)return!0;let l=n.getUint32(s+8,!0);if(l===0)return!0;let c=[],u=s+32;for(let h=0;h<l;h++){let d=u+h*16;if(d+16>e+8+i)break;let p=n.getInt32(d,!0),f=n.getInt32(d+4,!0),m=n.getInt32(d+8,!0),g=n.getInt32(d+12,!0);c.push({x:(p-r.bounds.left)*r.sx,y:(f-r.bounds.top)*r.sy,w:(m-p)*r.sx,h:(g-f)*r.sy})}return c.length===0||wD(r,Pfe(c),a),!0}function Vfe(r,e,t){if(t>=16){let n=r.view.getInt32(e,!0),i=r.view.getInt32(e+4,!0);if(r.clipUntracked)return!0;r.clipRegion&&(r.clipRegion=TG(r.clipRegion,_s(r,n),Fa(r,i)),Yg(r,r.clipRegion))}return!0}function Gfe(r,e,t,n,i){switch(e){case Lde:return Ofe(r,t,n,i);case Tde:return Bfe(r,t,n,i);case kde:return Ffe(r,t,n,i);case rde:return Nfe(r,n,i);case Cde:return jfe(r,n,i);case nde:return zfe(r,n,i);case Qhe:return Vfe(r,n,i);default:return!1}}function Hfe(r,e,t,n,i){return Afe(r,e,n,i)||Gfe(r,e,t,n,i)}function Wfe(r,e,t,n){let{ctx:i,view:o,state:a,inPath:s}=r,l=o.getUint32(t+16,!0),c=o.getUint32(t+20,!0);if(l===0||l>=1e4||c>=1e5)return;let u=t+24,h=u+l*4;if(h+c*8>e+n)return;s||i.beginPath();let d=0;for(let p=0;p<l;p++){let f=o.getUint32(u+p*4,!0);for(let m=0;m<f&&d<c;m++){let g=o.getInt32(h+d*8,!0),y=o.getInt32(h+d*8+4,!0);m===0?i.moveTo(mn(r,g),gn(r,y)):i.lineTo(mn(r,g),gn(r,y)),d++}i.closePath()}s||(uo(i,a),i.fill(a.polyFillMode===2?"nonzero":"evenodd"),Jr(i,a),i.stroke())}function Xfe(r,e,t,n){let{ctx:i,view:o,state:a,inPath:s}=r,l=o.getUint32(t+16,!0),c=o.getUint32(t+20,!0);if(l===0||l>=1e4||c>=1e5)return;let u=t+24,h=u+l*4;if(h+c*8>e+n)return;s||i.beginPath();let d=0;for(let p=0;p<l;p++){let f=o.getUint32(u+p*4,!0);for(let m=0;m<f&&d<c;m++){let g=o.getInt32(h+d*8,!0),y=o.getInt32(h+d*8+4,!0);m===0?i.moveTo(mn(r,g),gn(r,y)):i.lineTo(mn(r,g),gn(r,y)),d++}}s||(Jr(i,a),i.stroke())}function Yfe(r,e,t,n){let{ctx:i,view:o,state:a,inPath:s}=r,l=o.getUint32(t+16,!0),c=o.getUint32(t+20,!0);if(l===0||l>=1e4||c>=1e5)return;let u=t+24,h=u+l*4;if(h+c*4>e+n)return;s||i.beginPath();let d=0;for(let p=0;p<l;p++){let f=o.getUint32(u+p*4,!0);for(let m=0;m<f&&d<c;m++){let g=o.getInt16(h+d*4,!0),y=o.getInt16(h+d*4+2,!0);m===0?i.moveTo(mn(r,g),gn(r,y)):i.lineTo(mn(r,g),gn(r,y)),d++}i.closePath()}s||(uo(i,a),i.fill(a.polyFillMode===2?"nonzero":"evenodd"),Jr(i,a),i.stroke())}function $fe(r,e,t,n,i){let{ctx:o,view:a,state:s,inPath:l}=r;if(i<28)return!0;let c=a.getUint32(n+16,!0),u=n+20;if(c===0||u+c*8>t+i)return!0;let h=e===gG,d=e===mG||e===cD,p=e===cD||e===yG;l||o.beginPath(),p||o.moveTo(mn(r,a.getInt32(u,!0)),gn(r,a.getInt32(u+4,!0)));let f=p?0:1;if(d)for(;f+2<c;)o.bezierCurveTo(mn(r,a.getInt32(u+f*8,!0)),gn(r,a.getInt32(u+f*8+4,!0)),mn(r,a.getInt32(u+(f+1)*8,!0)),gn(r,a.getInt32(u+(f+1)*8+4,!0)),mn(r,a.getInt32(u+(f+2)*8,!0)),gn(r,a.getInt32(u+(f+2)*8+4,!0))),f+=3;else for(;f<c;f++)o.lineTo(mn(r,a.getInt32(u+f*8,!0)),gn(r,a.getInt32(u+f*8+4,!0)));if(h&&o.closePath(),l||(h&&(uo(o,s),o.fill(s.polyFillMode===2?"nonzero":"evenodd")),Jr(o,s),o.stroke()),c>0){let m=c-1;s.curX=a.getInt32(u+m*8,!0),s.curY=a.getInt32(u+m*8+4,!0)}return!0}function Kfe(r,e,t,n,i){let{ctx:o,view:a,state:s,inPath:l}=r;if(i<28)return!0;let c=a.getUint32(n+16,!0),u=n+20;if(c===0||u+c*4>t+i)return!0;let h=e===_G,d=e===wG||e===dD,p=e===dD||e===SG;l||o.beginPath(),p||o.moveTo(mn(r,a.getInt16(u,!0)),gn(r,a.getInt16(u+2,!0)));let f=p?0:1;if(d)for(;f+2<c;)o.bezierCurveTo(mn(r,a.getInt16(u+f*4,!0)),gn(r,a.getInt16(u+f*4+2,!0)),mn(r,a.getInt16(u+(f+1)*4,!0)),gn(r,a.getInt16(u+(f+1)*4+2,!0)),mn(r,a.getInt16(u+(f+2)*4,!0)),gn(r,a.getInt16(u+(f+2)*4+2,!0))),f+=3;else for(;f<c;f++)o.lineTo(mn(r,a.getInt16(u+f*4,!0)),gn(r,a.getInt16(u+f*4+2,!0)));if(h&&o.closePath(),l||(h&&(uo(o,s),o.fill(s.polyFillMode===2?"nonzero":"evenodd")),Jr(o,s),o.stroke()),c>0){let m=c-1;s.curX=a.getInt16(u+m*4,!0),s.curY=a.getInt16(u+m*4+2,!0)}return!0}function qfe(r,e,t,n,i){let{ctx:o,state:a}=r;switch(e){case whe:case gG:case mG:case cD:case yG:return $fe(r,e,t,n,i);case Ode:case _G:case wG:case dD:case SG:return Kfe(r,e,t,n,i);case _he:return i>=28&&Xfe(r,t,n,i),!0;case She:return i>=28&&Wfe(r,t,n,i),!0;case Dde:return i>=28&&Yfe(r,t,n,i),!0;case xde:return r.inPath=!0,o.beginPath(),!0;case wde:return r.inPath=!1,!0;case _de:return o.closePath(),!0;case Sde:return uo(o,a),o.fill(a.polyFillMode===2?"nonzero":"evenodd"),!0;case Ade:return uo(o,a),o.fill(a.polyFillMode===2?"nonzero":"evenodd"),Jr(o,a),o.stroke(),!0;case Mde:return Jr(o,a),o.stroke(),!0;case Pde:{let s=i>=12?r.view.getUint32(n,!0):5;try{if(s===5)for(;r.clipSaveDepth>0;)o.restore(),r.clipSaveDepth--;o.save(),r.clipSaveDepth++,o.clip(a.polyFillMode===2?"nonzero":"evenodd"),r.clipRegion=null,r.clipUntracked=!0}catch{}return!0}default:return!1}}function Zfe(r,e,t,n){let{view:i,state:o}=r;switch(e){case hde:{if(n>=28){let a=i.getUint32(t,!0),s=i.getUint32(t+4,!0),l=i.getInt32(t+8,!0),c=lc(i,t+16);r.objectTable.set(a,{kind:"pen",style:s&255,widthX:l,color:c})}return!0}case Rde:{if(n>=52){let a=i.getUint32(t,!0),s=i.getUint32(t+12,!0),l=i.getInt32(t+16,!0),c=lc(i,t+24);r.objectTable.set(a,{kind:"pen",style:s&255,widthX:l,color:c})}return!0}case dde:{if(n>=24){let a=i.getUint32(t,!0),s=i.getUint32(t+4,!0),l=lc(i,t+8);r.objectTable.set(a,{kind:"brush",style:s,color:l})}return!0}case Ide:{if(n>=332){let a=i.getUint32(t,!0),s=i.getInt32(t+4,!0),l=i.getInt32(t+20,!0),c=i.getUint8(t+24),u=i.getUint8(t+25),h=i.getUint8(t+26),d=qx(i,t+32,32)||"sans-serif";r.objectTable.set(a,{kind:"font",height:Math.abs(s),weight:l,italic:c!==0,underline:u!==0,strikeOut:h!==0,family:d})}return!0}case ude:{if(n>=12){let a=i.getUint32(t,!0),s=a>=iG?dfe(a-iG):r.objectTable.get(a)??null;if(s)switch(s.kind){case"pen":o.penStyle=s.style,o.penWidth=s.widthX,o.penColor=s.color;break;case"brush":o.brushStyle=s.style,o.brushColor=s.color;break;case"font":o.fontHeight=s.height,o.fontWeight=s.weight,o.fontItalic=s.italic,o.fontUnderline=s.underline,o.fontStrikeOut=s.strikeOut,o.fontFamily=s.family;break}}return!0}case pde:return n>=12&&r.objectTable.delete(i.getUint32(t,!0)),!0;default:return!1}}function Jfe(r,e,t,n){let{view:i}=r;switch(e){case Ahe:return n>=16&&(r.windowExt.cx=i.getInt32(t,!0),r.windowExt.cy=i.getInt32(t+4,!0),Vp(r)),!0;case Mhe:return n>=16&&(r.windowOrg.x=i.getInt32(t,!0),r.windowOrg.y=i.getInt32(t+4,!0),Vp(r)),!0;case Phe:return n>=16&&(r.viewportExt.cx=i.getInt32(t,!0),r.viewportExt.cy=i.getInt32(t+4,!0),Vp(r)),!0;case Ehe:return n>=16&&(r.viewportOrg.x=i.getInt32(t,!0),r.viewportOrg.y=i.getInt32(t+4,!0),Vp(r)),!0;case Ihe:{if(n>=12){let o=i.getUint32(t,!0);(o===8||o===7)&&Vp(r)}return!0}case ide:{if(n>=24){let o=i.getInt32(t,!0),a=i.getInt32(t+4,!0),s=i.getInt32(t+8,!0),l=i.getInt32(t+12,!0);a!==0&&(r.viewportExt.cx=Math.round(r.viewportExt.cx*o/a)),l!==0&&(r.viewportExt.cy=Math.round(r.viewportExt.cy*s/l)),Vp(r)}return!0}case ode:{if(n>=24){let o=i.getInt32(t,!0),a=i.getInt32(t+4,!0),s=i.getInt32(t+8,!0),l=i.getInt32(t+12,!0);a!==0&&(r.windowExt.cx=Math.round(r.windowExt.cx*o/a)),l!==0&&(r.windowExt.cy=Math.round(r.windowExt.cy*s/l)),Vp(r)}return!0}default:return!1}}function Qfe(r,e,t,n){let{view:i,state:o}=r;switch(e){case lde:return n>=32&&(o.worldTransform=[i.getFloat32(t,!0),i.getFloat32(t+4,!0),i.getFloat32(t+8,!0),i.getFloat32(t+12,!0),i.getFloat32(t+16,!0),i.getFloat32(t+20,!0)]),!0;case cde:{if(n>=36){let a=i.getUint32(t+24,!0);if(a===1)o.worldTransform=[1,0,0,1,0,0];else if(a===2||a===3){let s=[i.getFloat32(t,!0),i.getFloat32(t+4,!0),i.getFloat32(t+8,!0),i.getFloat32(t+12,!0),i.getFloat32(t+16,!0),i.getFloat32(t+20,!0)],[l,c,u,h,d,p]=o.worldTransform;a===2?o.worldTransform=[s[0]*l+s[1]*u,s[0]*c+s[1]*h,s[2]*l+s[3]*u,s[2]*c+s[3]*h,s[4]*l+s[5]*u+d,s[4]*c+s[5]*h+p]:o.worldTransform=[l*s[0]+c*s[2],l*s[1]+c*s[3],u*s[0]+h*s[2],u*s[1]+h*s[3],d*s[0]+p*s[2]+s[4],d*s[1]+p*s[3]+s[5]]}}return!0}default:return!1}}function eme(r,e,t,n){return Jfe(r,e,t,n)||Qfe(r,e,t,n)}function OG(){return{penColor:"#000000",penWidth:1,penStyle:0,brushColor:"#ffffff",brushStyle:0,textColor:"#000000",bkColor:"#ffffff",bkMode:1,fontHeight:12,fontWeight:400,fontItalic:!1,fontFamily:"sans-serif",fontUnderline:!1,fontStrikeOut:!1,rop2:13,curX:0,curY:0,polyFillMode:1,textAlign:0,worldTransform:[1,0,0,1,0,0]}}function DG(r){return{...r,worldTransform:[...r.worldTransform]}}function RG(){return{objectTable:new Map,worldTransform:[1,0,0,1,0,0],saveStack:[],saveIdMap:new Map,clipRegion:null,clipSaveDepth:0}}function tme(r,e,t,n,i){if(eme(r,e,n,i)||Zfe(r,e,n,i))return!0;let{ctx:o,view:a,state:s}=r;switch(e){case ade:{for(;r.clipSaveDepth>0;)o.restore(),r.clipSaveDepth--;return r.clipStack??(r.clipStack=[]),r.clipStack.push({region:r.clipRegion??null,untracked:r.clipUntracked??!1}),r.stateStack.push(DG(s)),o.save(),r.clipUntracked?(r.clipUntracked=!1,r.clipRegion=null):r.clipRegion&&Yg(r,r.clipRegion),!0}case sde:{if(i>=12){for(;r.clipSaveDepth>0;)o.restore(),r.clipSaveDepth--;let l=a.getInt32(n,!0);for(l<0&&(l=r.stateStack.length+l+1);r.stateStack.length>l&&r.stateStack.length>0;)r.stateStack.pop(),r.clipStack?.pop(),o.restore();let c=r.stateStack.pop();if(c){let u=r.clipStack?.pop();Object.assign(s,c),o.restore(),r.clipRegion=u?.region??null,r.clipUntracked=!1,r.clipRegion&&Yg(r,r.clipRegion)}}return!0}case Zhe:return i>=12&&(s.textColor=lc(a,n)),!0;case Jhe:return i>=12&&(s.bkColor=lc(a,n)),!0;case Lhe:return i>=12&&(s.bkMode=a.getUint32(n,!0)),!0;case Ohe:return i>=12&&(s.polyFillMode=a.getUint32(n,!0)),!0;case Dhe:return i>=12&&(s.rop2=a.getUint32(n,!0)),!0;case Rhe:case vde:case rG:return e===rG&&i>=12&&(s.textAlign=a.getUint32(n,!0)),!0;default:return!1}}function oG(r,e,t){return t?{x:r.getInt16(e,!0),y:r.getInt16(e+2,!0),w:r.getInt16(e+4,!0),h:r.getInt16(e+6,!0)}:{x:r.getFloat32(e,!0),y:r.getFloat32(e+4,!0),w:r.getFloat32(e+8,!0),h:r.getFloat32(e+12,!0)}}function aG(r,e,t){return t?{x:r.getInt16(e,!0),y:r.getInt16(e+2,!0)}:{x:r.getFloat32(e,!0),y:r.getFloat32(e+4,!0)}}function _D(r,e,t){if(t<12)return null;r.getUint32(e,!0);let n=r.getUint32(e+4,!0),i=r.getUint32(e+8,!0);if(n===0||n>1e5)return null;let o=(i&16384)!==0;if(12+(n*(o?4:8)+n)>t)return null;let u=[],h=e+12;for(let f=0;f<n;f++)o?(u.push({x:r.getInt16(h,!0),y:r.getInt16(h+2,!0)}),h+=4):(u.push({x:r.getFloat32(h,!0),y:r.getFloat32(h+4,!0)}),h+=8);let d=h+3&-4,p=new Uint8Array(r.buffer,r.byteOffset+d,n);return{kind:"plus-path",points:u,types:new Uint8Array(p)}}function BG(r,e){let t=(l,c)=>e[0]*l+e[2]*c+e[4],n=(l,c)=>e[1]*l+e[3]*c+e[5],i=[],o=r.points,a=r.types,s=0;for(;s<o.length;){let l=a[s]&15,c=(a[s]&128)!==0;if(l===0)i.push({op:"moveTo",x:t(o[s].x,o[s].y),y:n(o[s].x,o[s].y)}),s++;else if(l===3){if(s+2<o.length){i.push({op:"bezierCurveTo",cp1x:t(o[s].x,o[s].y),cp1y:n(o[s].x,o[s].y),cp2x:t(o[s+1].x,o[s+1].y),cp2y:n(o[s+1].x,o[s+1].y),x:t(o[s+2].x,o[s+2].y),y:n(o[s+2].x,o[s+2].y)}),(a[s+2]&128)!==0&&i.push({op:"closePath"}),s+=3;continue}break}else i.push({op:"lineTo",x:t(o[s].x,o[s].y),y:n(o[s].x,o[s].y)}),s++;c&&i.push({op:"closePath"})}return i}function sG(r,e){r.beginPath();let t=e.points,n=e.types,i=0;for(;i<t.length;){let o=n[i]&15,a=(n[i]&128)!==0;if(o===0)r.moveTo(t[i].x,t[i].y),i++;else if(o===1)r.lineTo(t[i].x,t[i].y),i++;else if(o===3)if(i+2<t.length){r.bezierCurveTo(t[i].x,t[i].y,t[i+1].x,t[i+1].y,t[i+2].x,t[i+2].y),(n[i+2]&128)!==0&&r.closePath(),i+=3;continue}else break;else r.lineTo(t[i].x,t[i].y),i++;a&&r.closePath()}}function Fh(r,e){return[r[0]*e[0]+r[1]*e[2],r[0]*e[1]+r[1]*e[3],r[2]*e[0]+r[3]*e[2],r[2]*e[1]+r[3]*e[3],r[4]*e[0]+r[5]*e[2]+e[4],r[4]*e[1]+r[5]*e[3]+e[5]]}function nme(r,e){let t=r.ctx;try{let n=null;if(e.type==="linear"&&typeof t.createLinearGradient=="function"){if(e.x1===e.x2&&e.y1===e.y2)return null;n=t.createLinearGradient(e.x1,e.y1,e.x2,e.y2)}else if(e.type==="radial"&&typeof t.createRadialGradient=="function"){if(!(e.r>0))return null;n=t.createRadialGradient(e.cx,e.cy,0,e.cx,e.cy,e.r)}if(!n)return null;for(let i of e.stops)n.addColorStop(i.offset,i.color);return n}catch{return null}}function Gp(r,e,t){if(e&32768)return ws(t);let n=r.objectTable.get(t&255);if(n&&n.kind==="plus-brush"){if(n.gradient){let i=nme(r,n.gradient);if(i)return i}return n.color}return"rgba(0,0,0,1)"}function B2(r,e){let n;switch(r){case 3:n=96/72;break;case 4:n=96;break;case 5:n=96/300;break;case 6:n=96/25.4;break;default:n=1;break}return n*e}function dl(r){let e=r.worldTransform,t=B2(r.pageUnit,r.pageScale),n=r.dpiScale;r.ctx.setTransform(e[0]*t*n,e[1]*t*n,e[2]*t*n,e[3]*t*n,e[4]*t*n,e[5]*t*n)}function lG(r,e){r.saveStack.push({transform:[...r.worldTransform]}),r.saveIdMap.set(e,r.saveStack.length-1)}function cG(r,e){let t=r.saveIdMap.get(e);if(t!==void 0&&t<r.saveStack.length){r.worldTransform=[...r.saveStack[t].transform],r.saveStack.length=t;let n=new Map;for(let[i,o]of r.saveIdMap)o<t&&n.set(i,o);r.saveIdMap=n}}function O2(r){let e=r.worldTransform,t=B2(r.pageUnit,r.pageScale)*r.dpiScale;return[e[0]*t,e[1]*t,e[2]*t,e[3]*t,e[4]*t,e[5]*t]}function FG(r,e,t,n,i){let o=(l,c)=>i[0]*l+i[2]*c+i[4],a=(l,c)=>i[1]*l+i[3]*c+i[5];return{cmds:[{op:"moveTo",x:o(r,e),y:a(r,e)},{op:"lineTo",x:o(r+t,e),y:a(r+t,e)},{op:"lineTo",x:o(r+t,e+n),y:a(r+t,e+n)},{op:"lineTo",x:o(r,e+n),y:a(r,e+n)},{op:"closePath"}],fillRule:"nonzero",simple:!0}}function rme(r,e){return{cmds:BG(r.path,e),fillRule:"nonzero",simple:!0}}function gD(r,e,t=0){if(t>ome)return{region:[Xg()],exact:!1};switch(r.type){case"rect":return{region:[FG(r.x,r.y,r.width,r.height,e)],exact:!0};case"path":return{region:[rme(r,e)],exact:!0};case"infinite":return{region:null,exact:!0};case"empty":return{region:[Xg()],exact:!0};case"combine":{let n=gD(r.left,e,t+1),i=gD(r.right,e,t+1),o=ime[r.combineMode]??"intersect",a=kG(n.region,i.region,o);return{region:a.region,exact:a.exact&&n.exact&&i.exact}}}}function yD(r){Yg(r,r.clipRegion??null,!0)}function NG(r,e,t,n){let i=ame[t],o=kG(r.clipRegion??null,e,i??"intersect");o.exact,r.clipRegion=o.region,yD(r)}function uG(r,e,t,n){NG(r,[e],t)}function sme(r,e,t,n,i){let{view:o}=r;switch(e){case dpe:return i>=24&&(r.worldTransform=[o.getFloat32(n,!0),o.getFloat32(n+4,!0),o.getFloat32(n+8,!0),o.getFloat32(n+12,!0),o.getFloat32(n+16,!0),o.getFloat32(n+20,!0)]),!0;case ppe:return r.worldTransform=[1,0,0,1,0,0],!0;case fpe:{if(i>=24){let a=[o.getFloat32(n,!0),o.getFloat32(n+4,!0),o.getFloat32(n+8,!0),o.getFloat32(n+12,!0),o.getFloat32(n+16,!0),o.getFloat32(n+20,!0)];t&8192?r.worldTransform=Fh(r.worldTransform,a):r.worldTransform=Fh(a,r.worldTransform)}return!0}case mpe:{if(i>=8){let a=o.getFloat32(n,!0),s=o.getFloat32(n+4,!0),l=[1,0,0,1,a,s];t&8192?r.worldTransform=Fh(r.worldTransform,l):r.worldTransform=Fh(l,r.worldTransform)}return!0}case gpe:{if(i>=8){let a=o.getFloat32(n,!0),s=o.getFloat32(n+4,!0),l=[a,0,0,s,0,0];t&8192?r.worldTransform=Fh(r.worldTransform,l):r.worldTransform=Fh(l,r.worldTransform)}return!0}case ype:{if(i>=4){let a=o.getFloat32(n,!0)*Math.PI/180,s=Math.cos(a),l=Math.sin(a),c=[s,l,-l,s,0,0];t&8192?r.worldTransform=Fh(r.worldTransform,c):r.worldTransform=Fh(c,r.worldTransform)}return!0}case lpe:return i>=4&&lG(r,o.getUint32(n,!0)),!0;case cpe:return i>=4&&cG(r,o.getUint32(n,!0)),!0;case xpe:{if(i>=16){let a=t>>8&15,s=o.getFloat32(n,!0),l=o.getFloat32(n+4,!0),c=o.getFloat32(n+8,!0),u=o.getFloat32(n+12,!0),h=FG(s,l,c,u,O2(r));uG(r,h,a)}return!0}case vpe:return r.clipRegion=null,yD(r),!0;case _pe:{let a=t&255,s=t>>8&15,l=r.objectTable.get(a);if(l&&l.kind==="plus-region"&&l.nodes.length>0){let c=gD(l.nodes[0],O2(r));c.exact,NG(r,c.region,s)}return!0}case wpe:{let a=t&255,s=t>>8&15,l=r.objectTable.get(a);if(l&&l.kind==="plus-path"){let c={cmds:BG(l,O2(r)),fillRule:"nonzero",simple:!0};uG(r,c,s)}return!0}case Ape:{if(i>=8){let a=o.getFloat32(n,!0),s=o.getFloat32(n+4,!0);if(r.clipRegion){let l=O2(r),c=l[0]*a+l[2]*s,u=l[1]*a+l[3]*s;r.clipRegion=TG(r.clipRegion,c,u),yD(r)}}return!0}case upe:return i>=4&&lG(r,o.getUint32(n,!0)),!0;case hpe:return i>=4&&cG(r,o.getUint32(n,!0)),!0;case bpe:{let a=t&255,s=i>=4?o.getFloat32(n,!0):1;return r.pageUnit=a,r.pageScale=s,!0}case rpe:case ipe:case ope:case ape:case spe:return!0;default:return!1}}function D2(r,e){r.strokeStyle=e.color,r.lineWidth=e.width;let t=e.width||1;switch(e.dashStyle){case 1:r.setLineDash([t*3,Number(t)]);break;case 2:r.setLineDash([Number(t),Number(t)]);break;case 3:r.setLineDash([t*3,Number(t),Number(t),Number(t)]);break;case 4:r.setLineDash([t*3,Number(t),Number(t),Number(t),Number(t),Number(t)]);break;default:r.setLineDash([]);break}}function lme(r,e,t,n,i){let{ctx:o,view:a,objectTable:s}=r;switch(e){case Hde:{if(i>=8){let l=a.getUint32(n,!0),c=a.getUint32(n+4,!0),u=(t&16384)!==0,h=u?8:16;o.fillStyle=Gp(r,t,l),dl(r);let d=n+8;for(let p=0;p<c&&d+h<=n+i;p++){let{x:f,y:m,w:g,h:y}=oG(a,d,u);o.fillRect(f,m,g,y),d+=h}}return!0}case Wde:{if(i>=4){let l=t&255,c=s.get(l),u=a.getUint32(n,!0),h=(t&16384)!==0,d=h?8:16;c&&c.kind==="plus-pen"&&D2(o,c),dl(r);let p=n+4;for(let f=0;f<u&&p+d<=n+i;f++){let{x:m,y:g,w:y,h:b}=oG(a,p,h);o.strokeRect(m,g,y,b),p+=d}}return!0}case $de:{if(i>=12){let l=a.getUint32(n,!0),c=(t&16384)!==0,u,h,d,p;if(c)u=a.getInt16(n+4,!0),h=a.getInt16(n+6,!0),d=a.getInt16(n+8,!0),p=a.getInt16(n+10,!0);else{if(i<20)return!0;u=a.getFloat32(n+4,!0),h=a.getFloat32(n+8,!0),d=a.getFloat32(n+12,!0),p=a.getFloat32(n+16,!0)}o.fillStyle=Gp(r,t,l),dl(r),o.beginPath(),o.ellipse(u+d/2,h+p/2,Math.abs(d)/2,Math.abs(p)/2,0,0,Math.PI*2),o.fill()}return!0}case Kde:{let l=t&255,c=s.get(l),u=(t&16384)!==0,h,d,p,f;if(u&&i>=8)h=a.getInt16(n,!0),d=a.getInt16(n+2,!0),p=a.getInt16(n+4,!0),f=a.getInt16(n+6,!0);else if(!u&&i>=16)h=a.getFloat32(n,!0),d=a.getFloat32(n+4,!0),p=a.getFloat32(n+8,!0),f=a.getFloat32(n+12,!0);else return!0;return c&&c.kind==="plus-pen"&&D2(o,c),dl(r),o.beginPath(),o.ellipse(h+p/2,d+f/2,Math.abs(p)/2,Math.abs(f)/2,0,0,Math.PI*2),o.stroke(),!0}case aD:case qde:case Zde:{let l=e===aD;if(i<(l?12:8))return!0;let u=n;if(l){let _=a.getUint32(u,!0);o.fillStyle=Gp(r,t,_),u+=4}let h=a.getFloat32(u,!0)*Math.PI/180,d=a.getFloat32(u+4,!0)*Math.PI/180;u+=8;let p=(t&16384)!==0,f,m,g,y;if(p&&u+8<=n+i)f=a.getInt16(u,!0),m=a.getInt16(u+2,!0),g=a.getInt16(u+4,!0),y=a.getInt16(u+6,!0);else if(!p&&u+16<=n+i)f=a.getFloat32(u,!0),m=a.getFloat32(u+4,!0),g=a.getFloat32(u+8,!0),y=a.getFloat32(u+12,!0);else return!0;if(e!==aD){let _=t&255,A=s.get(_);A&&A.kind==="plus-pen"&&D2(o,A)}dl(r),o.beginPath();let b=f+g/2,v=m+y/2,x=Math.abs(g)/2,w=Math.abs(y)/2;return l&&o.moveTo(b,v),o.ellipse(b,v,x,w,0,h,h+d,d<0),l?(o.closePath(),o.fill()):o.stroke(),!0}case Yde:{if(i>=4){let l=t&255,c=s.get(l),u=a.getUint32(n,!0),h=(t&16384)!==0,d=h?4:8;c&&c.kind==="plus-pen"&&D2(o,c),dl(r),o.beginPath();let p=n+4;for(let f=0;f<u&&p+d<=n+i;f++){let m=aG(a,p,h);f===0?o.moveTo(m.x,m.y):o.lineTo(m.x,m.y),p+=d}t&8192&&o.closePath(),o.stroke()}return!0}case Xde:{if(i>=8){let l=a.getUint32(n,!0),c=a.getUint32(n+4,!0),u=(t&16384)!==0,h=u?4:8;o.fillStyle=Gp(r,t,l),dl(r),o.beginPath();let d=n+8;for(let p=0;p<c&&d+h<=n+i;p++){let f=aG(a,d,u);p===0?o.moveTo(f.x,f.y):o.lineTo(f.x,f.y),d+=h}o.closePath(),o.fill()}return!0}default:return!1}}function VG(r){return r>>>12===900097}function GG(r,e){return[r.getFloat32(e,!0),r.getFloat32(e+4,!0),r.getFloat32(e+8,!0),r.getFloat32(e+12,!0),r.getFloat32(e+16,!0),r.getFloat32(e+20,!0)]}function N2(r,e,t){return{x:r[0]*e+r[2]*t+r[4],y:r[1]*e+r[3]*t+r[5]}}function ume(r){return Number.isFinite(r)?Math.min(1,Math.max(0,r)):0}function HG(r){return r.map(e=>({offset:ume(e.offset),color:e.color})).sort((e,t)=>e.offset-t.offset)}function WG(r,e,t){if(e+4>t)return null;let n=r.getUint32(e,!0);if(n===0||n>F2)return null;let i=e+4,o=i+n*4,a=o+n*4;if(a>t)return null;let s=[];for(let l=0;l<n;l++)s.push({offset:r.getFloat32(i+l*4,!0),color:ws(r.getUint32(o+l*4,!0))});return{stops:s,next:a}}function XG(r,e,t){if(e+4>t)return null;let n=r.getUint32(e,!0);if(n===0||n>F2)return null;let i=e+4,o=i+n*4,a=o+n*4;if(a>t)return null;let s=[];for(let l=0;l<n;l++)s.push({pos:r.getFloat32(i+l*4,!0),factor:r.getFloat32(o+l*4,!0)});return{entries:s,next:a}}function hme(r,e,t){if(e+40>t)return null;let n=r.getUint32(e,!0),i=r.getFloat32(e+8,!0),o=r.getFloat32(e+12,!0),a=r.getFloat32(e+16,!0),s=r.getFloat32(e+20,!0),l=r.getUint32(e+24,!0),c=r.getUint32(e+28,!0),u=e+40,h=null;n&zG&&u+24<=t&&(h=GG(r,u),u+=24);let d=[{offset:0,color:ws(l)},{offset:1,color:ws(c)}];if(n&UG){let m=WG(r,u,t);m&&(d=m.stops)}else if(n&jG){let m=XG(r,u,t);m&&(d=m.entries.map(g=>({offset:g.pos,color:pG(l,c,g.factor)})))}let p={x:i,y:o+s/2},f={x:i+a,y:o+s/2};return h&&(p=N2(h,p.x,p.y),f=N2(h,f.x,f.y)),St(`parseEmfPlusBrushObject: linear gradient (${p.x.toFixed(1)},${p.y.toFixed(1)})\u2192(${f.x.toFixed(1)},${f.y.toFixed(1)}), ${d.length} stop(s)`),{kind:"plus-brush",color:ws(l),gradient:{type:"linear",x1:p.x,y1:p.y,x2:f.x,y2:f.y,stops:HG(d)}}}function dme(r,e,t){if(e+24>t)return null;let n=r.getUint32(e,!0),i=r.getUint32(e+8,!0),o=r.getFloat32(e+12,!0),a=r.getFloat32(e+16,!0),s=r.getUint32(e+20,!0);if(s>F2)return{kind:"plus-brush",color:ws(i)};let l=[],c=e+24;for(let m=0;m<s&&c+4<=t;m++)l.push(r.getUint32(c,!0)),c+=4;let u=[];if(n&cme){if(c+4<=t){let m=r.getInt32(c,!0);if(c+=4,m>0&&c+m<=t){let g=_D(r,c,m);g&&(u=g.points),c+=m}}}else if(c+4<=t){let m=r.getUint32(c,!0);if(c+=4,m>0&&m<=F2&&c+m*8<=t){for(let g=0;g<m;g++)u.push({x:r.getFloat32(c+g*8,!0),y:r.getFloat32(c+g*8+4,!0)});c+=m*8}}let h=null;n&zG&&c+24<=t&&(h=GG(r,c),c+=24),h&&({x:o,y:a}=N2(h,o,a),u=u.map(m=>N2(h,m.x,m.y)));let d=l.length>0?l[0]:i,p=[{offset:0,color:ws(i)},{offset:1,color:ws(d)}];if(n&UG){let m=WG(r,c,t);m&&(p=m.stops.map(g=>({offset:1-g.offset,color:g.color})))}else if(n&jG){let m=XG(r,c,t);m&&(p=m.entries.map(g=>({offset:1-g.pos,color:pG(d,i,g.factor)})))}let f=0;for(let m of u){let g=Math.hypot(m.x-o,m.y-a);g>f&&(f=g)}return f>0?(St(`parseEmfPlusBrushObject: path gradient centre=(${o.toFixed(1)},${a.toFixed(1)}), r=${f.toFixed(1)}, ${p.length} stop(s)`),{kind:"plus-brush",color:ws(i),gradient:{type:"radial",cx:o,cy:a,r:f,stops:HG(p)}}):{kind:"plus-brush",color:ws(i)}}function YG(r,e,t){if(t<8)return null;let n=e+t,i=VG(r.getUint32(e,!0)),o=e+(i?4:0);if(o+8>n)return null;let a=r.getUint32(o,!0),s=o+4;switch(a){case Ope:return{kind:"plus-brush",color:ws(r.getUint32(s,!0))};case Dpe:return s+8<=n?{kind:"plus-brush",color:ws(r.getUint32(s+4,!0))}:{kind:"plus-brush",color:"rgba(0,0,0,1)"};case Bpe:return hme(r,s,n)??{kind:"plus-brush",color:"rgba(0,0,0,1)"};case Rpe:return dme(r,s,n)??{kind:"plus-brush",color:"rgba(0,0,0,1)"};default:return{kind:"plus-brush",color:"rgba(0,0,0,1)"}}}function gme(r,e,t,n,i,o){let a=Math.abs(i),s=i>0,c=t*4+3&-4,u=c*n,h=new Uint8Array(u);for(let b=0;b<n;b++){let v=s?b:n-1-b,x=e+v*a,w=(n-1-b)*c;switch(o){case mme:case hG:{for(let _=0;_<t;_++){let A=x+_*4;if(A+3>=r.byteLength)break;let E=r.getUint8(A),S=r.getUint8(A+1),M=r.getUint8(A+2),T=r.getUint8(A+3);o===hG&&T>0&&T<255&&(M=Math.min(255,Math.round(M*255/T)),S=Math.min(255,Math.round(S*255/T)),E=Math.min(255,Math.round(E*255/T)));let L=w+_*4;h[L]=E,h[L+1]=S,h[L+2]=M,h[L+3]=T}break}case fme:{for(let _=0;_<t;_++){let A=x+_*4;if(A+3>=r.byteLength)break;let E=w+_*4;h[E]=r.getUint8(A),h[E+1]=r.getUint8(A+1),h[E+2]=r.getUint8(A+2),h[E+3]=255}break}case pme:{for(let _=0;_<t;_++){let A=x+_*3;if(A+2>=r.byteLength)break;let E=w+_*4;h[E]=r.getUint8(A),h[E+1]=r.getUint8(A+1),h[E+2]=r.getUint8(A+2),h[E+3]=255}break}default:return null}}let d=14,p=108,f=d+p+u,m=new ArrayBuffer(f),g=new DataView(m),y=new Uint8Array(m);return g.setUint8(0,66),g.setUint8(1,77),g.setUint32(2,f,!0),g.setUint32(6,0,!0),g.setUint32(10,d+p,!0),g.setUint32(14,p,!0),g.setInt32(18,t,!0),g.setInt32(22,n,!0),g.setUint16(26,1,!0),g.setUint16(28,32,!0),g.setUint32(30,3,!0),g.setUint32(34,u,!0),g.setInt32(38,2835,!0),g.setInt32(42,2835,!0),g.setUint32(46,0,!0),g.setUint32(50,0,!0),g.setUint32(54,16711680,!0),g.setUint32(58,65280,!0),g.setUint32(62,255,!0),g.setUint32(66,4278190080,!0),g.setUint32(70,1934772034,!0),y.set(h,d+p),m}function yme(r,e,t){if(t<20)return null;let n=VG(r.getUint32(e,!0)),i=r.getUint32(e+(n?8:4),!0),o=r.getFloat32(e+16,!0),a=e+20,s=[[1,4],[2,4],[4,4],[8,4],[16,4],[32,4],[64,4],[128,4]],l=0;for(let[u,h]of s)i&u&&(u===1?a+=24:(u===32&&a+4<=e+t&&(l=r.getUint32(a,!0)),a+=h));if(i&256&&a+4<=e+t){let u=r.getUint32(a,!0);a+=4+u*4}if(i&512&&a+4<=e+t){let u=r.getUint32(a,!0);a+=4+u*4}if(i&1024&&a+4<=e+t){let u=r.getUint32(a,!0);a+=4+u}if(i&2048&&a+4<=e+t){let u=r.getUint32(a,!0);a+=4+u}let c="rgba(0,0,0,1)";if(a+8<=e+t){let u=YG(r,a,e+t-a);u&&(c=u.color)}return{kind:"plus-pen",color:c,width:o||1,dashStyle:l}}function bme(r,e,t,n){let i=null,o=r.getUint32(e+4,!0);if(o===1&&t>=28){let a=r.getUint32(e+24,!0);if(a===1){let s=r.getInt32(e+8,!0),l=r.getInt32(e+12,!0),c=r.getInt32(e+16,!0),u=r.getUint32(e+20,!0);St(` Bitmap(Pixel): ${s}\xD7${l}, stride=${c}, pixelFormat=0x${u.toString(16).padStart(8,"0")}`);let h=e+28,d=Math.abs(c);if(s>0&&l>0&&s<=8192&&l<=8192&&h+d*l<=r.byteLength){let p=gme(r,h,s,l,c,u);p&&(St(` Bitmap(Pixel): decoded successfully, size=${p.byteLength} bytes`),i=p)}}else if(a===2){let s=e+28,l=t-28;if(St(` Bitmap(Compressed): imgLen=${l}, imgStart=0x${s.toString(16)}`),l>0&&s+l<=r.byteLength&&(i=r.buffer.slice(r.byteOffset+s,r.byteOffset+s+l),i.byteLength>=4)){let c=new Uint8Array(i,0,4);St(` Bitmap(Compressed): first 4 bytes = [${Array.from(c).map(u=>u.toString(16).padStart(2,"0")).join(" ")}]`)}}}else if(o===2&&t>=12){r.getUint32(e+8,!0);let a=r.getUint32(e+12,!0),s=e+16;a>0&&s+a<=r.byteLength?(i=r.buffer.slice(r.byteOffset+s,r.byteOffset+s+a),i.byteLength>=4&&new DataView(i).getUint32(0,!0)):cc(` Metafile: out of bounds or empty (mfStart=0x${s.toString(16)}, mfDataSize=${a}, viewLen=${r.byteLength})`)}return{data:i,type:o}}function vme(r,e,t){if(t<28)return null;let n=r.getFloat32(e+4,!0),i=r.getInt32(e+12,!0),o=r.getUint32(e+20,!0),a="sans-serif";return o>0&&e+24+o*2<=e+t&&(a=qx(r,e+24,o)||"sans-serif"),{kind:"plus-font",emSize:n||12,flags:i,family:a}}function dG(r,e,t,n){let{view:i,objectTable:o}=r,a=e&255;switch(e>>8&127){case Mpe:{let l=YG(i,t,n);l&&o.set(a,l);break}case Ppe:{let l=yme(i,t,n);l&&o.set(a,l);break}case Epe:{let l=_D(i,t,n);l&&o.set(a,l);break}case kpe:{let l=vme(i,t,n);l&&o.set(a,l);break}case Ipe:{if(n>=16){let l=i.getUint32(t+4,!0),c=i.getUint32(t+12,!0),u=i.getUint32(t+16,!0);o.set(a,{kind:"plus-stringformat",flags:l,alignment:c??0,lineAlignment:u??0})}break}case Tpe:{if(n<8)break;let l=bme(i,t,n);o.set(a,{kind:"plus-image",data:l.data,type:l.type}),r.totalImageObjects++;break}case Cpe:{o.set(a,{kind:"plus-imageattributes"});break}case Lpe:{let l=wme(i,t,n);l&&o.set(a,l);break}}}function bD(r,e,t,n=0){if(e+4>t||n>xme)return null;let i=r.getUint32(e,!0),o=e+4;if(i<=5){let a=bD(r,o,t,n+1);if(!a)return null;o+=a.bytesRead;let s=bD(r,o,t,n+1);return s?(o+=s.bytesRead,{node:{type:"combine",combineMode:i,left:a.node,right:s.node},bytesRead:o-e}):null}if(i===268435456){if(o+16>t)return null;let a=r.getFloat32(o,!0),s=r.getFloat32(o+4,!0),l=r.getFloat32(o+8,!0),c=r.getFloat32(o+12,!0);return{node:{type:"rect",x:a,y:s,width:l,height:c},bytesRead:o+16-e}}if(i===268435457){if(o+4>t)return null;let a=r.getInt32(o,!0);if(o+=4,a<=0||o+a>t)return null;let s=_D(r,o,a);return{node:s?{type:"path",path:s}:{type:"empty"},bytesRead:o+a-e}}return i===268435458?{node:{type:"empty"},bytesRead:4}:i===268435459?{node:{type:"infinite"},bytesRead:4}:(cc(`parseRegionNode: unknown node type 0x${i.toString(16)}`),{node:{type:"empty"},bytesRead:4})}function wme(r,e,t){if(t<8)return null;r.getUint32(e,!0);let n=r.getUint32(e+4,!0);if(n===0||n>1e5)return null;let i=e+t,o=bD(r,e+8,i);return o?{kind:"plus-region",nodes:[o.node]}:null}function _me(r,e,t,n,i){let{ctx:o,view:a,objectTable:s}=r;switch(e){case Jde:{if(i>=4){let l=a.getUint32(n,!0),c=t&255,u=s.get(c);u&&u.kind==="plus-path"&&(o.fillStyle=Gp(r,t,l),dl(r),sG(o,u),o.fill())}return!0}case Qde:{if(i>=4){let l=a.getUint32(n,!0),c=t&255,u=s.get(c),h=s.get(l&255);u&&u.kind==="plus-path"&&(h&&h.kind==="plus-pen"&&(o.strokeStyle=h.color,o.lineWidth=h.width),dl(r),sG(o,u),o.stroke())}return!0}case npe:{if(i>=28){let l=a.getUint32(n,!0),c=a.getUint32(n+4,!0),u=a.getUint32(n+8,!0),h=a.getFloat32(n+12,!0),d=a.getFloat32(n+16,!0);a.getFloat32(n+20,!0),a.getFloat32(n+24,!0);let p=t&255,f=s.get(p);if(u>0&&n+28+u*2<=n+i){let m=qx(a,n+28,u);if(m.length>0&&f&&f.kind==="plus-font"){let g=f.flags&1?"bold ":"",y=f.flags&2?"italic ":"",b=pD(f.family,r.fontFamilyMap);o.font=`${y}${g}${f.emSize}px ${b}`,o.fillStyle=Gp(r,t,l),o.textBaseline="top";let v=s.get(c);if(v&&v.kind==="plus-stringformat")switch(v.alignment){case 1:o.textAlign="center";break;case 2:o.textAlign="right";break;default:o.textAlign="left"}else o.textAlign="left";dl(r),o.fillText(m,h,d)}}}return!0}case Spe:{if(i>=16){let l=a.getUint32(n,!0),c=a.getUint32(n+12,!0),u=t&255,h=s.get(u),d=n+16,f=d+c*2+3&-4;if(c>0&&c<1e5&&f+c*8<=n+i&&h&&h.kind==="plus-font"){let m=qx(a,d,c);if(m.length>0){let g=h.flags&1?"bold ":"",y=h.flags&2?"italic ":"",b=pD(h.family,r.fontFamilyMap);o.font=`${y}${g}${h.emSize}px ${b}`,o.fillStyle=Gp(r,t,l),o.textBaseline="alphabetic",o.textAlign="left",dl(r);let v=a.getFloat32(f,!0),x=a.getFloat32(f+4,!0);o.fillText(m,v,x)}}}return!0}case epe:{if(i>=24){let l=t&255,c=s.get(l),u=(t&16384)!==0,h=n+24,d,p,f,m;if(u&&h+8<=n+i)d=a.getInt16(h,!0),p=a.getInt16(h+2,!0),f=a.getInt16(h+4,!0),m=a.getInt16(h+6,!0);else if(!u&&h+16<=n+i)d=a.getFloat32(h,!0),p=a.getFloat32(h+4,!0),f=a.getFloat32(h+8,!0),m=a.getFloat32(h+12,!0);else return!0;r.totalDrawImageCalls++;let g=c&&c.kind==="plus-image"&&c.data;if(St(`DrawImage: imgId=${l}, dest=(${d},${p},${f},${m}), compressed=${u}, hasObj=${!!c}, objKind=${c?.kind}, hasData=${!!g}, dataLen=${g?c.data.byteLength:0}, isMetafile=${c?.kind==="plus-image"?c.type===2:"N/A"}`),St(`DrawImage: worldTransform=[${r.worldTransform.map(y=>y.toFixed(3)).join(", ")}]`),c&&c.kind==="plus-image"&&c.data){let y=r.worldTransform,b=B2(r.pageUnit,r.pageScale)*r.dpiScale;r.deferredImages.push({imageData:c.data,dx:d,dy:p,dw:f,dh:m,transform:[y[0]*b,y[1]*b,y[2]*b,y[3]*b,y[4]*b,y[5]*b],isMetafile:c.type===2}),St(`DrawImage: queued deferred image (total=${r.deferredImages.length})`)}}return!0}case tpe:{if(i>=28){let l=t&255,c=s.get(l),u=a.getUint32(n+24,!0),h=(t&16384)!==0,d=n+28;if(u>=3&&c&&c.kind==="plus-image"&&c.data){let p,f,m,g,y,b;if(h&&d+12<=n+i)p=a.getInt16(d,!0),f=a.getInt16(d+2,!0),m=a.getInt16(d+4,!0),g=a.getInt16(d+6,!0),y=a.getInt16(d+8,!0),b=a.getInt16(d+10,!0);else if(!h&&d+24<=n+i)p=a.getFloat32(d,!0),f=a.getFloat32(d+4,!0),m=a.getFloat32(d+8,!0),g=a.getFloat32(d+12,!0),y=a.getFloat32(d+16,!0),b=a.getFloat32(d+20,!0);else return!0;let v=p,x=f,w=Math.sqrt((m-p)**2+(g-f)**2),_=Math.sqrt((y-p)**2+(b-f)**2);r.totalDrawImageCalls++,St(`DrawImagePoints: imgId=${l}, points=[(${p},${f}),(${m},${g}),(${y},${b})], dest=(${v.toFixed(1)},${x.toFixed(1)},${w.toFixed(1)},${_.toFixed(1)})`),St(`DrawImagePoints: worldTransform=[${r.worldTransform.map(S=>S.toFixed(3)).join(", ")}]`);let A=r.worldTransform,E=B2(r.pageUnit,r.pageScale)*r.dpiScale;r.deferredImages.push({imageData:c.data,dx:v,dy:x,dw:w,dh:_,transform:[A[0]*E,A[1]*E,A[2]*E,A[3]*E,A[4]*E,A[5]*E],isMetafile:c.type===2}),St(`DrawImagePoints: queued deferred image (total=${r.deferredImages.length})`)}else c&&c.kind==="plus-image"&&c.data}return!0}default:return!1}}function Ame(r,e,t,n,i,o,a,s=1,l=vG,c){let u=a??RG(),h={ctx:n,view:r,objectTable:u.objectTable,worldTransform:u.worldTransform,deferredImages:[],saveStack:u.saveStack,saveIdMap:u.saveIdMap,totalImageObjects:0,totalDrawImageCalls:0,clipSaveDepth:u.clipSaveDepth,clipRegion:u.clipRegion,pageUnit:2,pageScale:1,continuationBuffer:null,continuationObjectId:-1,continuationObjectType:0,continuationTotalSize:0,continuationOffset:0,dpiScale:s,fontFamilyMap:c},d=e+t,p=0,f=new Map;for(St(`replayEmfPlusRecords: offset=0x${e.toString(16)}, length=${t}`);e+12<=d&&p<l;){let g=r.getUint16(e,!0),y=r.getUint16(e+2,!0),b=r.getUint32(e+4,!0),v=r.getUint32(e+8,!0);if(b<12||e+b>d)break;p++,f.set(g,(f.get(g)??0)+1);let x=e+12;switch(g){case Ude:{v>=16&&(r.getFloat32(x+8,!0),r.getFloat32(x+12,!0));break}case jde:e=d;continue;case Vde:break;case Gde:{let w=(y&32768)!==0,_=y&255;if(w)if(h.continuationBuffer===null){if(v>=4){let A=r.getUint32(x,!0),E=y>>8&127,S=64*1024*1024,M=r.byteLength-x;if(!(!Number.isFinite(A)||A<=0||A>S||A>M||v-4<0)){h.continuationTotalSize=A,h.continuationObjectId=_,h.continuationObjectType=E,h.continuationBuffer=new Uint8Array(A);let T=v-4,L=new Uint8Array(r.buffer,r.byteOffset+x+4,Math.min(T,A));h.continuationBuffer.set(L,0),h.continuationOffset=L.length}}}else{let A=h.continuationTotalSize-h.continuationOffset,E=new Uint8Array(r.buffer,r.byteOffset+x,Math.min(v,A));h.continuationBuffer.set(E,h.continuationOffset),h.continuationOffset+=E.length}else if(h.continuationBuffer!==null&&_===h.continuationObjectId){let A=h.continuationTotalSize-h.continuationOffset,E=new Uint8Array(r.buffer,r.byteOffset+x,Math.min(v,A));h.continuationBuffer.set(E,h.continuationOffset);let S=new DataView(h.continuationBuffer.buffer,h.continuationBuffer.byteOffset,h.continuationBuffer.byteLength),M=h.continuationObjectType<<8|_;dG({...h,view:S},M,0,h.continuationTotalSize),h.continuationBuffer=null,h.continuationObjectId=-1,h.continuationObjectType=0,h.continuationTotalSize=0,h.continuationOffset=0}else dG(h,y,x,v);break}default:{lme(h,g,y,x,v)||_me(h,g,y,x,v)||sme(h,g,y,x,v)||console.warn(`[emf-converter] Unhandled EMF+ record type: 0x${g.toString(16)}`);break}}e+=b}p>=l&&console.warn(`[emf-converter] EMF+ record limit reached (${l}). Output may be incomplete.`);let m=[];for(let[g,y]of f)m.push(`${Sme[g]??`0x${g.toString(16)}`}:${y}`);return St(`replayEmfPlusRecords: totalImageObjects=${h.totalImageObjects}, totalDrawImageCalls=${h.totalDrawImageCalls}, deferredImages=${h.deferredImages.length}`),St(`replayEmfPlusRecords: object table has ${h.objectTable.size} entries: [${Array.from(h.objectTable.entries()).map(([g,y])=>`${g}:${y.kind}`).join(", ")}]`),a&&(a.worldTransform=h.worldTransform,a.saveIdMap=h.saveIdMap,a.clipRegion=h.clipRegion??null,a.clipSaveDepth=h.clipSaveDepth),n.setTransform(1,0,0,1,0,0),h.deferredImages}function Pme(r,e,t,n,i,o=1,a={}){St(`replayEmfRecords: bounds=(${t.left},${t.top})\u2192(${t.right},${t.bottom}), canvas=${n}\xD7${i}`);let s=[],l=RG(),c=a.maxRecords??bG,u=a.maxRecordsEmfPlus??vG,h=t.right-t.left||1,d=t.bottom-t.top||1,p=n/h,f=i/d;St(`replayEmfRecords: logical=${h}\xD7${d}, scale=(${p.toFixed(4)},${f.toFixed(4)})`);let m={ctx:e,view:r,objectTable:new Map,state:{...OG(),fontFamilyMap:a.fontFamilyMap},stateStack:[],inPath:!1,windowOrg:{x:t.left,y:t.top},windowExt:{cx:h,cy:d},viewportOrg:{x:0,y:0},viewportExt:{cx:n,cy:i},useMappingMode:!1,clipSaveDepth:0,bounds:t,canvasW:n,canvasH:i,sx:p,sy:f},g=0,y=r.byteLength,b=0,v=0,x=new Map;for(;g+8<=y&&b<c;){let w=r.getUint32(g,!0),_=r.getUint32(g+4,!0);if(_<8||g+_>y)break;b++;let A=g+8;if(x.set(w,(x.get(w)??0)+1),w===Ede){if(_>=16){let S=r.getUint32(A,!0),M=r.getUint32(A+4,!0);if(M===Nde&&S>4){v++,St(`replayEmfRecords: EMF+ comment #${v} at offset 0x${g.toString(16)}, dataSize=${S}`);let T=Ame(r,A+8,S-4,e,n,i,l,o,u,a.fontFamilyMap);St(`replayEmfRecords: EMF+ comment #${v} returned ${T.length} deferred images`),s.push(...T)}else St(M===zde?`replayEmfRecords: EMR_COMMENT_PUBLIC at offset 0x${g.toString(16)}, size=${S}`:`replayEmfRecords: EMR_COMMENT (sig=0x${M.toString(16).padStart(8,"0")}) at offset 0x${g.toString(16)}, size=${S}`)}g+=_;continue}if(w===The){let S=[];for(let[M,T]of x)S.push(`${Mme[M]??`0x${M.toString(16)}`}:${T}`);St(`replayEmfRecords: total deferred images = ${s.length}, EMF+ object table size = ${l.objectTable.size}`);break}if(w===Che||w===tde||w===Bde||w===Fde||w===fG){g+=_;continue}tme(m,w,g,A,_)||Hfe(m,w,g,A,_)||qfe(m,w,g,A,_)||console.warn(`[emf-converter] Unhandled EMR record type: ${w}`),g+=_}return b>=c&&console.warn(`[emf-converter] EMF record limit reached (${c}). Output may be incomplete.`),s}function Eme(r,e,t,n,i){let{ctx:o,view:a,state:s,coord:l}=r,{mx:c,my:u,mw:h,mh:d}=l;switch(e){case Xpe:return i>=10&&(s.curY=a.getInt16(n,!0),s.curX=a.getInt16(n+2,!0)),!0;case Ype:if(i>=10){let p=a.getInt16(n,!0),f=a.getInt16(n+2,!0);Jr(o,s),o.beginPath(),o.moveTo(c(s.curX),u(s.curY)),o.lineTo(c(f),u(p)),o.stroke(),s.curX=f,s.curY=p}return!0;case $pe:if(i>=14){let p=a.getInt16(n,!0),f=a.getInt16(n+2,!0),m=a.getInt16(n+4,!0),g=a.getInt16(n+6,!0);uo(o,s),o.fillRect(c(g),u(m),h(f-g),d(p-m)),Jr(o,s),o.strokeRect(c(g),u(m),h(f-g),d(p-m))}return!0;case Kpe:if(i>=18){let p=Math.abs(d(a.getInt16(n,!0)))/2,f=Math.abs(h(a.getInt16(n+2,!0)))/2,m=a.getInt16(n+4,!0),g=a.getInt16(n+6,!0),y=a.getInt16(n+8,!0),b=a.getInt16(n+10,!0),v=c(b),x=u(y),w=h(g-b),_=d(m-y),A=Math.min(f,p,w/2,_/2);o.beginPath(),o.moveTo(v+A,x),o.lineTo(v+w-A,x),o.arcTo(v+w,x,v+w,x+A,A),o.lineTo(v+w,x+_-A),o.arcTo(v+w,x+_,v+w-A,x+_,A),o.lineTo(v+A,x+_),o.arcTo(v,x+_,v,x+_-A,A),o.lineTo(v,x+A),o.arcTo(v,x,v+A,x,A),o.closePath(),uo(o,s),o.fill(),Jr(o,s),o.stroke()}return!0;case qpe:if(i>=14){let p=a.getInt16(n,!0),f=a.getInt16(n+2,!0),m=a.getInt16(n+4,!0),g=a.getInt16(n+6,!0);o.beginPath(),o.ellipse(c((g+f)/2),u((m+p)/2),Math.abs(h(f-g))/2,Math.abs(d(p-m))/2,0,0,Math.PI*2),uo(o,s),o.fill(),Jr(o,s),o.stroke()}return!0;case Zpe:case k2:case sD:if(i>=22){let p=a.getInt16(n,!0),f=a.getInt16(n+2,!0),m=a.getInt16(n+4,!0),g=a.getInt16(n+6,!0),y=a.getInt16(n+8,!0),b=a.getInt16(n+10,!0),v=a.getInt16(n+12,!0),x=a.getInt16(n+14,!0),w=(x+b)/2,_=(v+y)/2,A=Math.abs(b-x)/2,E=Math.abs(y-v)/2,S=Math.atan2((m-_)/(E||1),(g-w)/(A||1)),M=Math.atan2((p-_)/(E||1),(f-w)/(A||1));o.beginPath(),e===k2&&o.moveTo(c(w),u(_)),o.ellipse(c(w),u(_),Math.abs(h(A)),Math.abs(d(E)),0,S,M,!1),(e===k2||e===sD)&&o.closePath(),(e===k2||e===sD)&&(uo(o,s),o.fill()),Jr(o,s),o.stroke()}return!0;case Jpe:if(i>=10){let p=a.getInt16(n,!0);if(p>0&&n+2+p*4<=t+i){o.beginPath();for(let f=0;f<p;f++){let m=a.getInt16(n+2+f*4,!0),g=a.getInt16(n+4+f*4,!0);f===0?o.moveTo(c(m),u(g)):o.lineTo(c(m),u(g))}o.closePath(),uo(o,s),o.fill(s.polyFillMode===2?"nonzero":"evenodd"),Jr(o,s),o.stroke()}}return!0;case Qpe:if(i>=10){let p=a.getInt16(n,!0);if(p>0&&n+2+p*4<=t+i){o.beginPath();for(let f=0;f<p;f++){let m=a.getInt16(n+2+f*4,!0),g=a.getInt16(n+4+f*4,!0);f===0?o.moveTo(c(m),u(g)):o.lineTo(c(m),u(g))}Jr(o,s),o.stroke()}}return!0;case cfe:if(i>=10){let p=a.getUint16(n,!0),f=n+2,m=[];for(let g=0;g<p&&f+2<=t+i;g++)m.push(a.getInt16(f,!0)),f+=2;o.beginPath();for(let g of m)if(g>0&&f+g*4<=t+i){for(let y=0;y<g;y++){let b=a.getInt16(f+y*4,!0),v=a.getInt16(f+y*4+2,!0);y===0?o.moveTo(c(b),u(v)):o.lineTo(c(b),u(v))}o.closePath(),f+=g*4}uo(o,s),o.fill(s.polyFillMode===2?"nonzero":"evenodd"),Jr(o,s),o.stroke()}return!0;case ofe:if(i>=12){let p=a.getInt16(n,!0);if(p>0&&n+2+p<=t+i){let f="";for(let y=0;y<p;y++){let b=a.getUint8(n+2+y);if(b===0)break;f+=String.fromCharCode(b)}let m=p+p%2,g=n+2+m;if(g+4<=t+i){let y=a.getInt16(g,!0),b=a.getInt16(g+2,!0);fD(o,s,Math.abs(d(1))),o.fillStyle=s.textColor,o.fillText(f,c(b),u(y))}}}return!0;case afe:if(i>=14){let p=a.getInt16(n,!0),f=a.getInt16(n+2,!0),m=a.getInt16(n+4,!0),g=(a.getUint16(n+6,!0)&4)!==0,y=n+8+(g?8:0);if(m>0&&y+m<=t+i){let b="";for(let v=0;v<m;v++){let x=a.getUint8(y+v);if(x===0)break;b+=String.fromCharCode(x)}fD(o,s,Math.abs(d(1))),o.fillStyle=s.textColor,o.fillText(b,c(f),u(p))}}return!0;default:return!1}}function Cme(r,e,t,n){return{mx:i=>(i-r.x)/(e.cx||1)*t,my:i=>(i-r.y)/(e.cy||1)*n,mw:i=>i/(e.cx||1)*t,mh:i=>i/(e.cy||1)*n}}function Tme(r,e,t,n,i,o={}){let a=t.boundsRight-t.boundsLeft||1,s=t.boundsBottom-t.boundsTop||1,l={x:t.boundsLeft,y:t.boundsTop},c={cx:a,cy:s},u=Cme(l,c,n,i),h=new Map,d=()=>{let x=0;for(;h.has(x);)x++;return x},p={...OG(),fontFamilyMap:o.fontFamilyMap},f=[],m={view:r,ctx:e,state:p,coord:u},g=t.headerSize,y=r.byteLength,b=o.maxRecords??bG,v=0;for(;g+6<=y&&v<b;){let x=r.getUint32(g,!0),w=r.getUint16(g+4,!0),_=x*2;if(_<6||g+_>y||w===Fpe)break;v++;let A=g+6;if(Eme(m,w,g,A,_)){g+=_;continue}switch(w){case Hpe:_>=10&&(l.y=r.getInt16(A,!0),l.x=r.getInt16(A+2,!0));break;case Wpe:_>=10&&(c.cy=r.getInt16(A,!0),c.cx=r.getInt16(A+2,!0));break;case sfe:f.push(DG(p));break;case lfe:{let E=f.pop();E&&Object.assign(p,E);break}case Vpe:_>=10&&(p.textColor=lc(r,A));break;case Npe:_>=10&&(p.bkColor=lc(r,A));break;case zpe:_>=8&&(p.bkMode=r.getUint16(A,!0));break;case Upe:_>=8&&(p.rop2=r.getUint16(A,!0));break;case jpe:_>=8&&(p.polyFillMode=r.getUint16(A,!0));break;case Gpe:_>=8&&(p.textAlign=r.getUint16(A,!0));break;case nfe:if(_>=16){let E=d();h.set(E,{kind:"pen",style:r.getUint16(A,!0)&255,widthX:r.getInt16(A+2,!0),color:lc(r,A+6)})}break;case rfe:if(_>=14){let E=d();h.set(E,{kind:"brush",style:r.getUint16(A,!0),color:lc(r,A+2)})}break;case ife:if(_>=24){let E="";for(let M=0;M<32&&A+14+M<g+_;M++){let T=r.getUint8(A+14+M);if(T===0)break;E+=String.fromCharCode(T)}let S=d();h.set(S,{kind:"font",height:Math.abs(r.getInt16(A,!0)),weight:r.getInt16(A+8,!0),italic:r.getUint8(A+10)!==0,underline:r.getUint8(A+11)!==0,strikeOut:r.getUint8(A+12)!==0,family:E||"sans-serif"})}break;case efe:if(_>=8){let E=h.get(r.getUint16(A,!0));if(E)switch(E.kind){case"pen":p.penStyle=E.style,p.penWidth=E.widthX,p.penColor=E.color;break;case"brush":p.brushStyle=E.style,p.brushColor=E.color;break;case"font":p.fontHeight=E.height,p.fontWeight=E.weight,p.fontItalic=E.italic,p.fontUnderline=E.underline,p.fontStrikeOut=E.strikeOut,p.fontFamily=E.family;break}}break;case tfe:_>=8&&h.delete(r.getUint16(A,!0));break}g+=_}v>=b&&console.warn(`[emf-converter] WMF record limit reached (${b}). Output may be incomplete.`)}async function kme(r,e,t=0){St(`processDeferredImages: processing ${e.length} deferred images (recursionDepth=${t})...`);for(let n=0;n<e.length;n++){let i=e[n];St(` Deferred image [${n}]: isMetafile=${i.isMetafile}, dataLen=${i.imageData.byteLength}, dest=(${i.dx.toFixed(1)},${i.dy.toFixed(1)},${i.dw.toFixed(1)},${i.dh.toFixed(1)}), transform=[${i.transform.map(o=>o.toFixed(3)).join(",")}]`);try{let o=new ArrayBuffer(i.imageData.byteLength);if(new Uint8Array(o).set(new Uint8Array(i.imageData)),r.setTransform(i.transform[0],i.transform[1],i.transform[2],i.transform[3],i.transform[4],i.transform[5]),i.isMetafile){if(t>=z2){cc(` Deferred image [${n}]: skipping embedded metafile \u2014 recursion depth ${t} >= ${z2}`);continue}St(` Deferred image [${n}]: recursively converting embedded metafile...`);let s=await U2(o,void 0,t+1)??await j2(o,void 0,t+1);if(s){St(` Deferred image [${n}]: metafile converted, dataUrl length=${s.length}`);let l=atob(s.split(",")[1]),c=s.match(/data:([^;]+)/),u=c?c[1]:"image/png",h=new ArrayBuffer(l.length),d=new Uint8Array(h);for(let m=0;m<l.length;m++)d[m]=l.charCodeAt(m);let p=new Blob([h],{type:u});St(` Deferred image [${n}]: creating ImageBitmap from ${p.size} byte blob (${u})...`);let f=await createImageBitmap(p);St(` Deferred image [${n}]: ImageBitmap created ${f.width}\xD7${f.height}`),r.drawImage(f,i.dx,i.dy,i.dw,i.dh),f.close()}else cc(` Deferred image [${n}]: metafile conversion returned null`)}else{St(` Deferred image [${n}]: creating ImageBitmap from ${o.byteLength} byte blob...`);let s=new Blob([o]),l=await createImageBitmap(s);St(` Deferred image [${n}]: ImageBitmap created ${l.width}\xD7${l.height}`),r.drawImage(l,i.dx,i.dy,i.dw,i.dh),l.close()}}catch(o){o instanceof Error?o.message:String(o),console.warn("[emf-converter] Deferred image draw failed:",o instanceof Error?o.message:o,`(isMetafile=${i.isMetafile}, dataLen=${i.imageData.byteLength})`)}}r.setTransform(1,0,0,1,0,0)}async function U2(r,e,t=0){if(t>z2)return null;let n=e??{},i=n.dpiScale??vD,o=n.maxWidth,a=n.maxHeight,s={maxRecords:n.maxRecords,maxRecordsEmfPlus:n.maxRecords,fontFamilyMap:n.fontFamilyMap};try{if(St("=== convertEmfToDataUrl START ==="),St(`Input buffer: ${r.byteLength} bytes, maxWidth=${o}, maxHeight=${a}, dpiScale=${i}`),r.byteLength>=16){let b=new Uint8Array(r,0,16);St(`First 16 bytes: [${Array.from(b).map(v=>v.toString(16).padStart(2,"0")).join(" ")}]`)}let l=new DataView(r),c=ffe(l);if(!c)return St("convertEmfToDataUrl: parseEmfHeader returned null \u2014 returning null"),null;let u=mfe(c);if(!u)return St("convertEmfToDataUrl: getRenderableEmfBounds returned null \u2014 returning null"),null;let h=u.right-u.left,d=u.bottom-u.top;St(`convertEmfToDataUrl: logicalSize=${h}\xD7${d}`);let p=AG(h,d,o,a,i,n.maxCanvasDimension);if(!p)return St("convertEmfToDataUrl: createCanvas returned null \u2014 returning null"),null;let{canvas:f,ctx:m}=p;St(`convertEmfToDataUrl: canvas created ${f.width}\xD7${f.height} (dpiScale=${i})`),m.save(),St("convertEmfToDataUrl: starting replayEmfRecords...");let g=Pme(l,m,u,f.width,f.height,i,s);St(`convertEmfToDataUrl: replayEmfRecords returned ${g.length} deferred images`),m.restore(),await kme(m,g),St("convertEmfToDataUrl: exporting canvas to PNG data URL...");let y=await CG(f);return y?St(`convertEmfToDataUrl: SUCCESS \u2014 data URL length=${y.length}`):cc("convertEmfToDataUrl: exportCanvasToPngDataUrl returned null"),St("=== convertEmfToDataUrl END ==="),y}catch(l){return cc("convertEmfToDataUrl: EXCEPTION:",l instanceof Error?l.message:l),console.warn("[pptx-editor] EMF conversion failed:",l instanceof Error?l.message:l),null}}async function j2(r,e,t=0){if(t>z2)return null;let n=e??{},i=n.dpiScale??vD,o=n.maxWidth,a=n.maxHeight,s={maxRecords:n.maxRecords,fontFamilyMap:n.fontFamilyMap};try{St("=== convertWmfToDataUrl START ===",`buffer=${r.byteLength} bytes, dpiScale=${i}`);let l=new DataView(r),c=gfe(l);if(!c)return St("convertWmfToDataUrl: parseWmfHeader returned null"),null;let u=c.boundsRight-c.boundsLeft,h=c.boundsBottom-c.boundsTop;if(St(`convertWmfToDataUrl: logicalSize=${u}\xD7${h}`),u<=0||h<=0)return St("convertWmfToDataUrl: invalid dimensions \u2014 returning null"),null;let d=AG(u,h,o,a,i,n.maxCanvasDimension);if(!d)return null;let{canvas:p,ctx:f}=d;f.save(),Tme(l,f,c,p.width,p.height,s),f.restore();let m=await CG(p);return St(`convertWmfToDataUrl: result=${m?`dataUrl len=${m.length}`:"null"}`),St("=== convertWmfToDataUrl END ==="),m}catch(l){return cc("convertWmfToDataUrl: EXCEPTION:",l instanceof Error?l.message:l),console.warn("[pptx-editor] WMF conversion failed:",l instanceof Error?l.message:l),null}}var fG,mG,gG,whe,cD,yG,_he,She,Ahe,Mhe,Phe,Ehe,Che,The,khe,Ihe,Lhe,Ohe,Dhe,Rhe,Bhe,Fhe,Nhe,zhe,Uhe,jhe,Vhe,Ghe,Hhe,Whe,Xhe,Yhe,$he,Khe,qhe,uD,bG,vG,rG,Zhe,Jhe,Qhe,ede,tde,nde,rde,ide,ode,ade,sde,lde,cde,ude,hde,dde,pde,fde,mde,gde,yde,hD,R2,bde,xG,vde,xde,wde,_de,Sde,Ade,Mde,Pde,Ede,Cde,Tde,kde,Ide,Lde,wG,_G,Ode,dD,SG,Dde,Rde,Bde,Fde,iG,Nde,zde,Ude,jde,Vde,Gde,Hde,Wde,Xde,Yde,$de,Kde,aD,qde,Zde,Jde,Qde,epe,tpe,npe,rpe,ipe,ope,ape,spe,lpe,cpe,upe,hpe,dpe,ppe,fpe,mpe,gpe,ype,bpe,vpe,xpe,wpe,_pe,Spe,Ape,Mpe,Ppe,Epe,Cpe,Tpe,kpe,Ipe,Lpe,Ope,Dpe,Rpe,Bpe,Fpe,Npe,zpe,Upe,jpe,Vpe,Gpe,Hpe,Wpe,Xpe,Ype,$pe,Kpe,qpe,Zpe,k2,sD,Jpe,Qpe,efe,tfe,nfe,rfe,ife,ofe,afe,sfe,lfe,cfe,St,cc,vD,I2,kfe,Dfe,Rfe,Ufe,ime,ome,ame,cme,zG,UG,jG,F2,pme,fme,mme,hG,xme,Sme,Mme,z2,$G=W(()=>{fG=1,mG=2,gG=3,whe=4,cD=5,yG=6,_he=7,She=8,Ahe=9,Mhe=10,Phe=11,Ehe=12,Che=13,The=14,khe=15,Ihe=17,Lhe=18,Ohe=19,Dhe=20,Rhe=21,Bhe=1,Fhe=2,Nhe=3,zhe=4,Uhe=5,jhe=6,Vhe=7,Ghe=8,Hhe=9,Whe=10,Xhe=11,Yhe=12,$he=14,Khe=15,qhe=16,uD=8192,bG=2e5,vG=5e5,rG=22,Zhe=24,Jhe=25,Qhe=26,ede=27,tde=28,nde=29,rde=30,ide=31,ode=32,ade=33,sde=34,lde=35,cde=36,ude=37,hde=38,dde=39,pde=40,fde=42,mde=43,gde=44,yde=45,hD=46,R2=47,bde=54,xG=55,vde=58,xde=59,wde=60,_de=61,Sde=62,Ade=63,Mde=64,Pde=67,Ede=70,Cde=75,Tde=76,kde=81,Ide=82,Lde=84,wG=85,_G=86,Ode=87,dD=88,SG=89,Dde=91,Rde=95,Bde=98,Fde=115,iG=2147483648,Nde=726027589,zde=1128875079,Ude=16385,jde=16386,Vde=16388,Gde=16392,Hde=16394,Wde=16395,Xde=16396,Yde=16397,$de=16398,Kde=16399,aD=16400,qde=16401,Zde=16402,Jde=16404,Qde=16405,epe=16410,tpe=16411,npe=16412,rpe=16414,ipe=16415,ope=16417,ape=16418,spe=16420,lpe=16421,cpe=16422,upe=16424,hpe=16425,dpe=16426,ppe=16427,fpe=16428,mpe=16429,gpe=16430,ype=16431,bpe=16432,vpe=16433,xpe=16434,wpe=16435,_pe=16436,Spe=16438,Ape=16437,Mpe=1,Ppe=2,Epe=3,Cpe=4,Tpe=5,kpe=6,Ipe=7,Lpe=8,Ope=0,Dpe=1,Rpe=3,Bpe=4,Fpe=0,Npe=513,zpe=258,Upe=260,jpe=262,Vpe=521,Gpe=302,Hpe=523,Wpe=524,Xpe=532,Ype=531,$pe=1051,Kpe=1564,qpe=1048,Zpe=2071,k2=2074,sD=2096,Jpe=804,Qpe=805,efe=301,tfe=496,nfe=762,rfe=764,ife=763,ofe=1313,afe=2610,sfe=30,lfe=295,cfe=1336,St=(...r)=>{},cc=(...r)=>{},vD=1;I2=1<<24;kfe=3;Dfe=15728673,Rfe=1;Ufe={1:"intersect",2:"union",3:"xor",4:"exclude",5:"replace"};ime={0:"intersect",1:"intersect",2:"union",3:"xor",4:"exclude",5:"complement"},ome=64;ame={0:"replace",1:"intersect",2:"union",3:"xor",4:"exclude",5:"complement"};cme=1,zG=2,UG=4,jG=8,F2=4096;pme=137224,fme=139273,mme=2498570,hG=925707;xme=64;Sme={16385:"Header",16386:"EndOfFile",16388:"GetDC",16392:"Object",16394:"FillRects",16395:"DrawRects",16396:"FillPolygon",16397:"DrawLines",16398:"FillEllipse",16399:"DrawEllipse",16404:"FillPath",16405:"DrawPath",16410:"DrawImage",16411:"DrawImagePoints",16412:"DrawString",16438:"DrawDriverString",16414:"SetAntiAliasMode",16426:"SetWorldTransform",16427:"ResetWorldTransform",16428:"MultiplyWorldTransform",16432:"SetPageTransform",16433:"ResetClip",16434:"SetClipRect",16435:"SetClipPath",16436:"SetClipRegion",16437:"OffsetClip",16421:"Save",16422:"Restore",16424:"BeginContainerNoParams",16425:"EndContainer"};Mme={1:"EMR_HEADER",2:"EMR_POLYBEZIER",3:"EMR_POLYGON",4:"EMR_POLYLINE",5:"EMR_POLYBEZIERTO",6:"EMR_POLYLINETO",14:"EMR_EOF",27:"EMR_MOVETOEX",37:"EMR_SELECTOBJECT",38:"EMR_CREATEPEN",39:"EMR_CREATEBRUSHINDIRECT",40:"EMR_DELETEOBJECT",42:"EMR_ELLIPSE",43:"EMR_RECTANGLE",54:"EMR_LINETO",59:"EMR_BEGINPATH",60:"EMR_ENDPATH",62:"EMR_FILLPATH",63:"EMR_STROKEANDFILLPATH",64:"EMR_STROKEPATH",70:"EMR_COMMENT",76:"EMR_BITBLT",81:"EMR_STRETCHDIBITS",84:"EMR_EXTTEXTOUTW",85:"EMR_POLYBEZIER16",86:"EMR_POLYGON16",87:"EMR_POLYLINE16",88:"EMR_POLYBEZIERTO16",91:"EMR_POLYPOLYGON16"};z2=3});function Zx(r){return SD(this,arguments,void 0,function(e,t){var n,i,o,a,s,l,c,u,h;return t===void 0&&(t={}),AD(this,function(d){switch(d.label){case 0:return e instanceof Uint8Array?(i=e,[3,3]):[3,1];case 1:return o=Uint8Array.bind,[4,e.arrayBuffer()];case 2:i=new(o.apply(Uint8Array,[void 0,d.sent()])),d.label=3;case 3:return n=i,n.length?(a=e instanceof Blob&&Ng(e.type)?e.type:void 0,s={maxWidth:t.maxWidth,maxHeight:t.maxHeight,dpiScale:(h=t.dpiScale)!==null&&h!==void 0?h:1,maxCanvasDimension:t.maxCanvasDimension,fontFamilyMap:G2(G2({},Ime),t.fontFamilyMap)},l=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),c=a===rc||a==null&&Dh(n)&&!la(n),u=null,c?[4,U2(l,s)]:[3,7]):[2,void 0];case 4:return u=d.sent(),!u&&la(n)?[4,j2(l,s)]:[3,6];case 5:u=d.sent(),d.label=6;case 6:return[3,11];case 7:return a===Iu||la(n)?[4,j2(l,s)]:[3,9];case 8:u=d.sent(),d.label=9;case 9:return!u&&Dh(n)?[4,U2(l,s)]:[3,11];case 10:u=d.sent(),d.label=11;case 11:return u?[2,Lme(u)]:[2,void 0]}})})}function Jx(r){return Ng(r.type)}function V2(r){var e=r.indexOf(",");if(!(!r.startsWith("data:")||e<0)){var t=r.slice(5,e),n=r.slice(e+1),i=t.split(";"),o=i[0]||"image/png",a=i.includes("base64");if(a){for(var s=atob(n),l=new Uint8Array(s.length),c=0;c<s.length;c++)l[c]=s.charCodeAt(c);return new Blob([l],{type:o})}var u=decodeURIComponent(n);return new Blob([u],{type:o})}}function Lme(r){return SD(this,void 0,void 0,function(){var e,t,n,i,o,a,s,l;return AD(this,function(c){switch(c.label){case 0:if(e=Ome(),!e)return[2,V2(r)];c.label=1;case 1:return c.trys.push([1,7,,8]),[4,e.decodeImage(r)];case 2:return t=c.sent(),n=Math.max(1,t.width),i=Math.max(1,t.height),o=e.createCanvas(n,i),a=o.getContext("2d"),a?(a.fillStyle="#ffffff",a.fillRect(0,0,n,i),a.drawImage(t,0,0),o instanceof OffscreenCanvas?[4,o.convertToBlob({type:"image/png"})]:[3,4]):[2,V2(r)];case 3:return[2,c.sent()];case 4:return s=o,typeof s.toBlob!="function"?[3,6]:[4,new Promise(function(u){s.toBlob(function(h){return u(h||void 0)},"image/png")})];case 5:return[2,c.sent()];case 6:return typeof s.toDataURL=="function"?[2,V2(s.toDataURL("image/png"))]:[3,8];case 7:return l=c.sent(),[3,8];case 8:return[2,V2(r)]}})})}function Ome(){var r=this;if(typeof OffscreenCanvas<"u")return{createCanvas:function(e,t){return new OffscreenCanvas(e,t)},decodeImage:function(e){return SD(r,void 0,void 0,function(){var t,n;return AD(this,function(i){switch(i.label){case 0:return[4,fetch(e)];case 1:return t=i.sent(),[4,t.blob()];case 2:return n=i.sent(),[2,createImageBitmap(n)]}})})}};if(typeof document<"u"&&document.createElement)return{createCanvas:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},decodeImage:function(e){return new Promise(function(t,n){var i=new Image;i.onload=function(){return t(i)},i.onerror=function(){return n(new Error("Failed to decode PNG"))},i.src=e})}}}var G2,SD,AD,Ime,KG=W(()=>{$G();w2();G2=function(){return G2=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},G2.apply(this,arguments)},SD=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},AD=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Ime={\u5B8B\u4F53:'"SimSun", "NSimSun", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif',simsun:'"SimSun", "NSimSun", "Microsoft YaHei", "Noto Sans SC", sans-serif',nsimsun:'"NSimSun", "SimSun", "Microsoft YaHei", sans-serif',\u9ED1\u4F53:'"SimHei", "Microsoft YaHei", "Noto Sans SC", sans-serif',simhei:'"SimHei", "Microsoft YaHei", sans-serif',\u5FAE\u8F6F\u96C5\u9ED1:'"Microsoft YaHei", "Noto Sans SC", sans-serif',"microsoft yahei":'"Microsoft YaHei", "Noto Sans SC", sans-serif'}});var Dme,H2,qG=W(()=>{Dme=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},H2=(function(){function r(){}return r.prototype.parse=function(e){var t=this,n=this.normalizeLineEndings(e),i=n.split(`
  16. `),o=[],a=[],s=null;return i.forEach(function(l,c){var u=c+1,h=t.stripInlineComment(l).trim();if(h){if(h.startsWith("*")){t.flushCurrentPattern(s,o,a);var d=t.parseHeader(h.slice(1));if(!d){a.push({line:u,message:"Invalid pattern header.",source:l}),s=null;return}s={pattern:{name:d.name,description:d.description,lines:[]},headerLine:u};return}if(!s){a.push({line:u,message:"Line descriptor appears before any pattern header.",source:l});return}var p=t.parseLineDescriptor(h,u);if(!p){a.push({line:u,message:"Invalid line descriptor. Expect: angle,x-origin,y-origin,delta-x,delta-y[,dash-1,...].",source:l});return}s.pattern.lines.push(p)}}),this.flushCurrentPattern(s,o,a),{patterns:o,issues:a}},r.parse=function(e){return new r().parse(e)},r.prototype.normalizeLineEndings=function(e){return e.replace(/\r\n/g,`
  17. `).replace(/\r/g,`
  18. `)},r.prototype.stripInlineComment=function(e){var t=e.indexOf(";");return t<0?e:e.slice(0,t)},r.prototype.parseHeader=function(e){var t=e.indexOf(",");if(t<0){var n=e.trim();return n?{name:n,description:""}:null}var i=e.slice(0,t).trim(),o=e.slice(t+1).trim();return i?{name:i,description:o}:null},r.prototype.parseNumber=function(e){var t=Number(e.trim());return Number.isFinite(t)?t:null},r.prototype.parseLineDescriptor=function(e,t){var n,i,o=e.split(",").map(function(y){return y.trim()}).filter(function(y){return y.length>0});if(o.length<5)return null;var a=this.parseNumber(o[0]),s=this.parseNumber(o[1]),l=this.parseNumber(o[2]),c=this.parseNumber(o[3]),u=this.parseNumber(o[4]);if(a==null||s==null||l==null||c==null||u==null)return null;var h=o.slice(5),d=[];try{for(var p=Dme(h),f=p.next();!f.done;f=p.next()){var m=f.value,g=this.parseNumber(m);if(g==null)return null;d.push(g)}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}return{angle:a,originX:s,originY:l,deltaX:c,deltaY:u,dashes:d,sourceLine:t}},r.prototype.flushCurrentPattern=function(e,t,n){e&&(e.pattern.lines.length===0&&n.push({line:e.headerLine,message:'Pattern "'.concat(e.pattern.name,'" has no line descriptor.'),source:""}),t.push(e.pattern))},r})()});var $g,W2,X2,ZG=W(()=>{tt();bi();$g=function(){return $g=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},$g.apply(this,arguments)},W2=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},X2=(function(){function r(){}return r.nextGradientId=function(e){return r.gradientIdCounter+=1,"acdb-pat-gradient-".concat(e.toLowerCase(),"-").concat(r.gradientIdCounter)},r.packedRgbToCss=function(e){return"#".concat((e&16777215).toString(16).padStart(6,"0"))},r.gradientColorToCss=function(e,t){return typeof e=="number"?r.packedRgbToCss(e):e??t},r.applyShadeTint=function(e,t){var n=xe.clamp(t,0,1),i=n<.5?0:16777215,o=n<.5?1-n*2:n*2-1,a=e>>16&255,s=e>>8&255,l=e&255,c=i>>16&255,u=i>>8&255,h=i&255;return Math.round(a+(c-a)*o)*65536+Math.round(s+(u-s)*o)*256+Math.round(l+(h-l)*o)},r.resolveGradientColors=function(e){var t,n,i="#2563eb",o="#f8fafc",a=r.gradientColorToCss(e.startColor,i);if(e.oneColorMode&&e.endColor==null){if(typeof e.startColor=="number"){var s=r.applyShadeTint(e.startColor,(t=e.shadeTintValue)!==null&&t!==void 0?t:.5);return{start:a,end:r.packedRgbToCss(s)}}return{start:a,end:((n=e.shadeTintValue)!==null&&n!==void 0?n:.5)<.5?"#000000":"#ffffff"}}return{start:a,end:r.gradientColorToCss(e.endColor,o)}},r.renderGradientStops=function(e){return e.map(function(t){var n=xe.clamp(t.offset,0,1)*100;return'<stop offset="'.concat(n.toFixed(2),'%" stop-color="').concat(t.color,'" />')}).join("")},r.getGradientVector=function(e){return{x:Math.cos(e),y:-Math.sin(e)}},r.isSolidPattern=function(e){return ru(e.name)},r.renderBackground=function(e,t,n){return'<rect x="'.concat(-e/2,'" y="').concat(-t/2,'" width="').concat(e,'" height="').concat(t,'" fill="').concat(n,'" />')},r.estimateUnitScale=function(e){var t,n,i,o,a=[];try{for(var s=W2(e.lines),l=s.next();!l.done;l=s.next()){var c=l.value;a.push(Math.abs(c.deltaX),Math.abs(c.deltaY));try{for(var u=(i=void 0,W2(c.dashes)),h=u.next();!h.done;h=u.next()){var d=h.value;a.push(Math.abs(d))}}catch(m){i={error:m}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}}catch(m){t={error:m}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var p=a.filter(function(m){return m>r.EPSILON});if(p.length===0)return 1;var f=p.sort(function(m,g){return m-g});return f[Math.floor(f.length/2)]||1},r.segmentToSvgPath=function(e){return"M ".concat(e.x1.toFixed(2)," ").concat((-e.y1).toFixed(2)," L ").concat(e.x2.toFixed(2)," ").concat((-e.y2).toFixed(2))},r.buildDashSegments=function(e,t,n,i,o,a,s){var l,c,u=e.dashes;if(u.length===0)return[{x1:i+a*t,y1:o+s*t,x2:i+a*n,y2:o+s*n}];var h=u.reduce(function(S,M){return S+Math.abs(M)},0);if(h<=r.EPSILON)return[{x1:i+a*t,y1:o+s*t,x2:i+a*n,y2:o+s*n}];for(var d=[],p=Math.ceil((n-t)/h)+2,f=t-h,m=0;m<p;m++){var g=f;try{for(var y=(l=void 0,W2(u)),b=y.next();!b.done;b=y.next()){var v=b.value,x=Math.abs(v),w=g+x;if(v>0||v===0){var _=xe.clamp(g,t,n),A=xe.clamp(w,t,n);if(A>_)d.push({x1:i+a*_,y1:o+s*_,x2:i+a*A,y2:o+s*A});else if(v===0&&_>=t&&_<=n){var E=.35;d.push({x1:i+a*(_-E),y1:o+s*(_-E),x2:i+a*(_+E),y2:o+s*(_+E)})}}g=w}}catch(S){l={error:S}}finally{try{b&&!b.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}f+=h}return d},r.renderFamily=function(e,t){for(var n,i,o=xe.degToRad(e.angle),a=Math.cos(o),s=Math.sin(o),l=-s,c=a,u=a*e.deltaX+l*e.deltaY,h=s*e.deltaX+c*e.deltaY,d=Math.hypot(u,h),p=d<=r.EPSILON?1:Math.max(1,Math.ceil(t*2/d)+1),f=Math.floor(p/2),m=-t*1.5,g=t*1.5,y=[],b=-f;b<=f;b++){var v=e.originX+u*b,x=e.originY+h*b,w=r.buildDashSegments(e,m,g,v,x,a,s);try{for(var _=(n=void 0,W2(w)),A=_.next();!A.done;A=_.next()){var E=A.value;y.push(r.segmentToSvgPath(E))}}catch(S){n={error:S}}finally{try{A&&!A.done&&(i=_.return)&&i.call(_)}finally{if(n)throw n.error}}}return'<path d="'.concat(y.join(" "),'" fill="none" />')},r.renderLinearGradientDef=function(e,t,n,i,o){var a=r.getGradientVector(t),s=xe.clamp(n,-1,1)*i*.5,l=a.x*s,c=a.y*s;return['<linearGradient id="'.concat(e,'" gradientUnits="userSpaceOnUse"'),' x1="'.concat((-a.x*i+l).toFixed(2),'"'),' y1="'.concat((-a.y*i+c).toFixed(2),'"'),' x2="'.concat((a.x*i+l).toFixed(2),'"'),' y2="'.concat((a.y*i+c).toFixed(2),'">'),r.renderGradientStops(o),"</linearGradient>"].join("")},r.renderRadialGradientDef=function(e,t,n,i,o){return['<radialGradient id="'.concat(e,'" gradientUnits="userSpaceOnUse"'),' cx="'.concat(t.toFixed(2),'" cy="').concat(n.toFixed(2),'" r="').concat(i.toFixed(2),'"'),' fx="'.concat(t.toFixed(2),'" fy="').concat(n.toFixed(2),'">'),r.renderGradientStops(o),"</radialGradient>"].join("")},r.renderGradientDef=function(e,t,n,i,o,a,s){var l=t.toUpperCase(),c=l.startsWith("INV"),u=l.replace(/^INV/,""),h=c?n.end:n.start,d=c?n.start:n.end,p=Math.hypot(a,s)/2,f=r.getGradientVector(i),m=xe.clamp(o,-1,1),g=f.x*m*a*.25,y=f.y*m*s*.25;switch(u){case"CYLINDER":{var b=xe.clamp(.5+m*.45,.05,.95);return r.renderLinearGradientDef(e,i,0,p,[{offset:0,color:h},{offset:b,color:d},{offset:1,color:h}])}case"SPHERICAL":return r.renderRadialGradientDef(e,g,y,p,[{offset:0,color:d},{offset:1,color:h}]);case"HEMISPHERICAL":return r.renderRadialGradientDef(e,g+f.x*a*.18,y+f.y*s*.18,p*.92,[{offset:0,color:d},{offset:.72,color:h},{offset:1,color:h}]);case"CURVED":return r.renderRadialGradientDef(e,-f.x*a*.95+g,-f.y*s*.95+y,p*1.65,[{offset:0,color:h},{offset:.55,color:h},{offset:1,color:d}]);default:return r.renderLinearGradientDef(e,i,o,p,[{offset:0,color:h},{offset:1,color:d}])}},r.prototype.renderPattern=function(e,t){var n,i,o,a,s;t===void 0&&(t={});var l=(n=t.width)!==null&&n!==void 0?n:260,c=(i=t.height)!==null&&i!==void 0?i:160,u=(o=t.stroke)!==null&&o!==void 0?o:"#1f2937",h=(a=t.strokeWidth)!==null&&a!==void 0?a:1.3,d=(s=t.background)!==null&&s!==void 0?s:"#ffffff",p="".concat(-l/2," ").concat(-c/2," ").concat(l," ").concat(c);if(r.isSolidPattern(e))return['<svg xmlns="http://www.w3.org/2000/svg" viewBox="'.concat(p,'" width="').concat(l,'" height="').concat(c,'">'),r.renderBackground(l,c,d),'<rect x="'.concat(-l/2,'" y="').concat(-c/2,'" width="').concat(l,'" height="').concat(c,'" fill="').concat(u,'" />'),"</svg>"].join("");var f=r.estimateUnitScale(e),m=Math.min(l,c)*.18,g=m/Math.max(f,r.EPSILON),y=$g($g({},e),{lines:e.lines.map(function(x){return $g($g({},x),{originX:x.originX*g,originY:x.originY*g,deltaX:x.deltaX*g,deltaY:x.deltaY*g,dashes:x.dashes.map(function(w){return w*g})})})}),b=Math.hypot(l,c)*.75,v=y.lines.map(function(x){return r.renderFamily(x,b)}).join("");return['<svg xmlns="http://www.w3.org/2000/svg" viewBox="'.concat(p,'" width="').concat(l,'" height="').concat(c,'">'),r.renderBackground(l,c,d),'<g stroke="'.concat(u,'" stroke-width="').concat(h.toFixed(2),'" stroke-linecap="round">'),v,"</g>","</svg>"].join("")},r.prototype.renderGradient=function(e,t){var n,i,o,a,s;t===void 0&&(t={});var l=(n=t.width)!==null&&n!==void 0?n:260,c=(i=t.height)!==null&&i!==void 0?i:160,u=(o=t.background)!==null&&o!==void 0?o:"#ffffff",h=(a=t.angle)!==null&&a!==void 0?a:0,d=(s=t.shift)!==null&&s!==void 0?s:0,p="".concat(-l/2," ").concat(-c/2," ").concat(l," ").concat(c),f=r.nextGradientId(e),m=r.resolveGradientColors(t),g=r.renderGradientDef(f,e,m,h,d,l,c);return['<svg xmlns="http://www.w3.org/2000/svg" viewBox="'.concat(p,'" width="').concat(l,'" height="').concat(c,'">'),r.renderBackground(l,c,u),"<defs>",g,"</defs>",'<rect x="'.concat(-l/2,'" y="').concat(-c/2,'" width="').concat(l,'" height="').concat(c,'" fill="url(#').concat(f,')" />'),"</svg>"].join("")},r.EPSILON=1e-9,r.gradientIdCounter=0,r})()});var JG=W(()=>{qG();UO();ZG()});function Kg(r){if(!(!r||r.length===0)){var e=Rme(r);if(e)return MD(e,"image/bmp")}}function PD(r){if(!(!r||r.length===0))return r.length>=8&&r[0]===137&&r[1]===80&&r[2]===78&&r[3]===71?MD(r,"image/png"):r.length>=3&&r[0]===255&&r[1]===216&&r[2]===255?MD(r,"image/jpeg"):Kg(r)}function MD(r,e){for(var t="",n=0;n<r.length;n++)t+=String.fromCharCode(r[n]);return"data:".concat(e,";base64,").concat(btoa(t))}function Rme(r){if(r.length>=14&&r[0]===66&&r[1]===77)return r;if(!(r.length<40)){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t=e.getUint32(0,!0);if(!(t<12||t>r.length)){var n=e.getUint16(14,!0),i=e.getUint32(32,!0),o=n<=8?i>0?i:1<<n:i>0?i:0,a=t===12?o*3:o*4,s=14+t+a;if(!(s>14+r.length)){var l=14+r.length,c=new Uint8Array(14),u=new DataView(c.buffer);c[0]=66,c[1]=77,u.setUint32(2,l,!0),u.setUint32(6,0,!0),u.setUint32(10,s,!0);var h=new Uint8Array(l);return h.set(c,0),h.set(r,14),h}}}}var QG=W(()=>{});function Ou(r){return String(r??"").trim().toUpperCase()}function CD(r,e){var t,n,i,o,a,s,l,c,u,h,d,p,f=eH([],ED((d=e.representationData)!==null&&d!==void 0?d:[]),!1);try{for(var m=Qx(f),g=m.next();!g.done;g=m.next()){var y=g.value,b=Ou(y.handle),v=Ou(y.blockHandle);if(!(!b||!v)){var x=r.getObjectById(b);x instanceof f0||(x=new f0,x.objectId=b,y.ownerHandle&&(x.ownerId=Ou(y.ownerHandle)),x.database=r,r.commitObjectHandle(x)),x.blockId=v}}}catch(ue){t={error:ue}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}var w=eH([],ED((p=e.dictionaries)!==null&&p!==void 0?p:[]),!1),_=new Set(r.getRootDictionaries()),A=new Map;try{for(var E=Qx(w),S=E.next();!S.done;S=E.next()){var y=S.value,b=Ou(y.handle);if(b){var M=r.getObjectById(b);M instanceof Wt&&_.has(M)||(M instanceof Wt||(M=new Wt(r),M.objectId=b,y.ownerHandle&&(M.ownerId=Ou(y.ownerHandle)),r.commitObjectHandle(M)),A.set(b,M))}}}catch(ue){i={error:ue}}finally{try{S&&!S.done&&(o=E.return)&&o.call(E)}finally{if(i)throw i.error}}try{for(var T=Qx(w),L=T.next();!L.done;L=T.next()){var y=L.value,b=Ou(y.handle),M=A.get(b);if(!(!M||_.has(M)))try{for(var O=(l=void 0,Qx(y.entries)),D=O.next();!D.done;D=O.next()){var z=D.value,N=z.name,J=Ou(z.handle);if(!(!N||!J)){var X=!1;try{for(var Q=(u=void 0,Qx(M.entries())),ce=Q.next();!ce.done;ce=Q.next()){var H=ED(ce.value,2),de=H[1];if(Ou(de.objectId)===J){X=!0;break}}}catch(we){u={error:we}}finally{try{ce&&!ce.done&&(h=Q.return)&&h.call(Q)}finally{if(u)throw u.error}}if(!X){var Se=r.getObjectById(J);if(!Se)if(N===cl||N===fu||N===fp){var te=new Kt;te.objectId=J,te.database=r,r.commitObjectHandle(te),Se=te}else continue;M.setAt(N,Se)}}}}catch(we){l={error:we}}finally{try{D&&!D.done&&(c=O.return)&&c.call(O)}finally{if(l)throw l.error}}}}catch(ue){a={error:ue}}finally{try{L&&!L.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}}function TD(r){if(!(r==null||r===!1||r===!0)){var e=Ou(String(r));if(!(!e||e==="0"))return e}}var ED,eH,Qx,tH=W(()=>{gr();$L();mu();p0();ED=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},eH=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Qx=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});var kD=W(()=>{v0();g2();YO();x0();LA();HI();bi();VO();$9();k0();Op();nG();Qm();hL();O3();U3();w2();KG();Fn();w0();JG();wu();wu();QG();p0();tH()});var Bme,Y2,$2,ew,Na,ho,Nh=W(()=>{tt();Li();Rg();kD();gu();Gn();En();Di();Bme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Y2=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$2=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},ew=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};(function(r){r[r.AtLeast=1]="AtLeast",r[r.Exactly=2]="Exactly"})(Na||(Na={}));ho=(function(r){Bme(e,r);function e(){var t=r.call(this)||this;return t._dimBlockId=null,t._dimBlockPosition=new k,t._dxfDefinitionPoint=new k,t._dimensionStyleName=null,t._dimensionText=null,t._textLineSpacingFactor=1,t._textLineSpacingStyle=Na.AtLeast,t._textPosition=new k,t._textRotation=0,t._horizontalRotation=0,t._dimensionType=0,t._attachmentPoint=ut.MiddleCenter,t._dxfVersion=0,t._normal=new G(0,0,1),t._dimBlockRotation=0,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"DIMENSION"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimBlockId",{get:function(){return this._dimBlockId},set:function(t){this._dimBlockId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimBlockPosition",{get:function(){return this._dimBlockPosition},set:function(t){this._dimBlockPosition.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimensionStyleName",{get:function(){return this._dimensionStyleName},set:function(t){this._dimensionStyleName=t,this._dimStyle=void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimensionStyle",{get:function(){if(this._dimStyle==null){var t=void 0;this.dimensionStyleName&&(t=this.database.tables.dimStyleTable.getAt(this.dimensionStyleName)),t==null&&(t=new ri),this._dimStyle=t}return this._dimStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimensionText",{get:function(){return this._dimensionText},set:function(t){this._dimensionText=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"measurement",{get:function(){return this._measurement},set:function(t){this._measurement=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLineSpacingFactor",{get:function(){return this._textLineSpacingFactor},set:function(t){this._textLineSpacingFactor=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLineSpacingStyle",{get:function(){return this._textLineSpacingStyle},set:function(t){this._textLineSpacingStyle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textPosition",{get:function(){return this._textPosition},set:function(t){this._textPosition.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textRotation",{get:function(){return this._textRotation},set:function(t){this._textRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalRotation",{get:function(){return this._horizontalRotation},set:function(t){this._horizontalRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimensionType",{get:function(){return this._dimensionType},set:function(t){this._dimensionType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachmentPoint",{get:function(){return this._attachmentPoint},set:function(t){this._attachmentPoint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dxfVersion",{get:function(){return this._dxfVersion},set:function(t){this._dxfVersion=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t).normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this.getBaseProperties()},enumerable:!1,configurable:!0}),e.prototype.getBaseProperties=function(){return{type:this.type,groups:[this.getGeneralProperties(),this.getDimensionProperties()]}},e.prototype.transformBy=function(t){var n=this._textPosition.clone(),i=this._textPosition.clone().add(new G(Math.cos(this._textRotation),Math.sin(this._textRotation),0));this._dimBlockPosition.applyMatrix4(t),this._textPosition.applyMatrix4(t),this._normal.transformDirection(t);var o=new G(1,0,0).transformDirection(t);o.lengthSq()>0&&(this._dimBlockRotation+=Math.atan2(o.y,o.x)),n.applyMatrix4(t),i.applyMatrix4(t);var a=new G(i).sub(n);return a.lengthSq()>0&&(this._textRotation=Math.atan2(a.y,a.x)),this.subTransformBy(t),this},e.prototype.subGetOsnapPoints=function(t,n,i,o,a){var s,l,c=this.getDimBlockTableRecord();if(c){var u=this.getFullDimBlockTransform(),h=new k(n).applyMatrix4(u.clone().invert()),d=new k(i).applyMatrix4(u.clone().invert()),p=function(b,v){var x=[];b.subGetOsnapPoints(t,h,d,x,v,u),b instanceof pn?x.forEach(function(w){return o.push(w.clone())}):x.forEach(function(w){return o.push(new k(w).applyMatrix4(u))})};if(a){var f=c.getIdAt(a);if(f&&(p(f,a),o.length>0))return}try{for(var m=Y2(c.newIterator()),g=m.next();!g.done;g=m.next()){var y=g.value;p(y)}}catch(b){s={error:b}}finally{try{g&&!g.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}}},e.prototype.subWorldDraw=function(t){var n=this.getDimBlockTableRecord();if(n){var i=this.computeDimBlockTransform(),o=Nr.instance.draw(t,n,this.resolvedColor,[],!1,i,this._normal);return o}var a=t.group([]);return a},e.prototype.subGetIntersectCurves=function(){var t,n,i=this.getDimBlockTableRecord();if(!i)return[];var o=this.getFullDimBlockTransform(),a=[];try{for(var s=Y2(i.newIterator()),l=s.next();!l.done;l=s.next()){var c=l.value;a.push.apply(a,ew([],$2(DA(c.subGetIntersectCurves(),o)),!1))}}catch(u){t={error:u}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},e.prototype.getDimBlockGeometricExtents=function(){var t,n,i=new De,o=this.getDimBlockTableRecord();if(!o)return i;try{for(var a=Y2(o.newIterator()),s=a.next();!s.done;s=a.next()){var l=s.value;i.union(l.geometricExtents)}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i.applyMatrix4(this.getFullDimBlockTransform()),i},e.prototype.getGeometricExtentsFromDimBlockOrPoints=function(t){var n,i,o=this.getDimBlockGeometricExtents();if(!o.isEmpty())return o;var a=new De;try{for(var s=Y2(t),l=s.next();!l.done;l=s.next()){var c=l.value;a.expandByPoint(c)}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return this.hasExplicitTextPosition()&&a.expandByPoint(this.textPosition),a},e.prototype.hasExplicitTextPosition=function(){var t=this.textPosition,n=t.x,i=t.y,o=t.z;return n!==0||i!==0||o!==0},e.prototype.collectDimensionDefinitionGripPoints=function(){return[]},e.prototype.subGetGripPoints=function(){return this.collectDimensionDefinitionGripPoints().concat([this.textPosition])},e.prototype.subMoveGripPointsAt=function(t,n){var i=this,o=this.collectDimensionDefinitionGripPoints();return un(t,function(a){a>=0&&a<o.length?o[a].add(n):a===o.length&&i.textPosition.add(n)}),this},e.prototype.getDimBlockTableRecord=function(){return this.dimBlockId?this.database.tables.blockTable.getAt(this.dimBlockId):void 0},e.prototype.getDimensionProperties=function(){var t=this;return{groupName:"dimension",properties:ew(ew(ew(ew([this.createProperty("dimensionStyleName","string",function(){var n;return(n=t.dimensionStyleName)!==null&&n!==void 0?n:""},function(n){t.dimensionStyleName=n.trim()===""?null:n}),this.createProperty("dimensionText","string",function(){var n;return(n=t.dimensionText)!==null&&n!==void 0?n:""},function(n){t.dimensionText=n}),this.createProperty("measurement","float",function(){return t.getMeasurementPropertyValue()}),this.createProperty("dimBlockId","string",function(){var n;return(n=t.dimBlockId)!==null&&n!==void 0?n:""})],$2(this.createPoint3dProperties("dimBlockPosition",function(){return t.dimBlockPosition})),!1),$2(this.createPoint3dProperties("textPosition",function(){return t.textPosition})),!1),[this.createProperty("textRotation","float",function(){return t.textRotation},function(n){t.textRotation=n}),this.createProperty("textLineSpacingFactor","float",function(){return t.textLineSpacingFactor},function(n){t.textLineSpacingFactor=n}),this.createProperty("textLineSpacingStyle","enum",function(){return t.textLineSpacingStyle},function(n){t.textLineSpacingStyle=n},[{label:Na[Na.AtLeast],value:Na.AtLeast},{label:Na[Na.Exactly],value:Na.Exactly}])],!1),$2(this.createPoint3dProperties("normal",function(){return t.normal})),!1)}},e.prototype.createProperty=function(t,n,i,o,a){return{name:t,type:n,editable:o!=null,options:a,accessor:o?{get:i,set:o}:{get:i}}},e.prototype.createPoint3dProperties=function(t,n){return[this.createProperty("".concat(t,"X"),"float",function(){return n().x},function(i){n().x=i}),this.createProperty("".concat(t,"Y"),"float",function(){return n().y},function(i){n().y=i}),this.createProperty("".concat(t,"Z"),"float",function(){return n().z},function(i){n().z=i})]},e.prototype.getMeasurementPropertyValue=function(){return this.measurement},e.prototype.getFullDimBlockTransform=function(){var t=this.computeDimBlockTransform();if(this._normal.x===0&&this._normal.y===0&&this._normal.z===1)return t;var n=new Ie().setFromExtrusionDirection(this._normal);return new Ie().multiplyMatrices(n,t)},Object.defineProperty(e.prototype,"arrowScaleFactor",{get:function(){var t=this.dimensionStyle;return t.dimasz},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstArrowStyle",{get:function(){return{type:this.firstArrowType,scale:this.arrowScaleFactor,appended:this.isAppendArrow,visible:this.dimensionStyle.dimse1==0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"secondArrowStyle",{get:function(){return{type:this.secondArrowType,scale:this.arrowScaleFactor,appended:this.isAppendArrow,visible:this.dimensionStyle.dimse2==0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAppendArrow",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstArrowTypeBtrId",{get:function(){var t=this.dimensionStyle;return t.dimsah==0?t.dimblk:t.dimblk1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstArrowType",{get:function(){var t=this.firstArrowTypeBtrId;return this.getArrowName(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"secondArrowTypeBtrId",{get:function(){var t=this.dimensionStyle;return t.dimsah==0?t.dimblk:t.dimblk2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"secondArrowType",{get:function(){var t=this.secondArrowTypeBtrId;return this.getArrowName(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowLineCount",{get:function(){return 1},enumerable:!1,configurable:!0}),e.prototype.findPointOnLine1=function(t,n,i){var o=new k().subVectors(n,t).normalize(),a=new k(n).addScaledVector(o,i);return a},e.prototype.findPointOnLine2=function(t,n,i){var o=t.x+i*Math.cos(n),a=t.y+i*Math.sin(n);return{x:o,y:a}},e.prototype.adjustExtensionLine=function(t){var n=this.dimensionStyle;t.extend(n.dimexe),t.extend(-n.dimexo,!0)},e.prototype.getArrowName=function(t){var n=this.database.tables.blockTable.getIdAt(t);return n?n.name.toUpperCase():ep.Closed},e.prototype.computeDimBlockTransform=function(){var t,n=this.dimBlockId?this.database.tables.blockTable.getAt(this.dimBlockId):void 0,i=(t=n?.origin)!==null&&t!==void 0?t:k.ORIGIN,o=new Ie().makeTranslation(-i.x,-i.y,-i.z),a=new Ie().makeTranslation(this._dimBlockPosition.x,this._dimBlockPosition.y,this._dimBlockPosition.z),s=new Ie().makeRotationZ(this._dimBlockRotation);return new Ie().multiplyMatrices(a,new Ie().multiplyMatrices(s,o))},e.prototype.subTransformBy=function(t){},e.prototype.dxfOutFields=function(t){var n,i,o;r.prototype.dxfOutFields.call(this,t);var a=this.dimensionStyleName!=null?this.database.tables.dimStyleTable.getAt(this.dimensionStyleName):void 0;return t.writeSubclassMarker("AcDbDimension"),t.writeInt16(280,this.dxfVersion),t.writeString(2,(n=this.dimBlockId)!==null&&n!==void 0?n:void 0),t.writeString(3,(i=this.dimensionStyleName)!==null&&i!==void 0?i:this.dimensionStyle.name),t.writePoint3d(10,this._dxfDefinitionPoint),t.writeString(1,(o=this.dimensionText)!==null&&o!==void 0?o:""),t.writeAngle(53,this.textRotation),this.horizontalRotation!==0&&t.writeAngle(51,this.horizontalRotation),t.writePoint3d(11,this.textPosition),t.writePoint3d(12,this.dimBlockPosition),t.writeInt16(70,this.dimensionType),t.writeInt16(71,this.attachmentPoint),t.writeInt16(72,this.textLineSpacingStyle),t.writeDouble(41,this.textLineSpacingFactor),t.writeDouble(42,this.measurement),t.writeVector3d(210,this.normal),t.writeObjectId(340,a?.objectId),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbDimension");for(var n=this._dxfDefinitionPoint.x,i=this._dxfDefinitionPoint.y,o=this._dxfDefinitionPoint.z,a=this.textPosition.x,s=this.textPosition.y,l=this.textPosition.z,c=this._dimBlockPosition.x,u=this._dimBlockPosition.y,h=this._dimBlockPosition.z,d=!1,p=this.textRotation*180/Math.PI,f=this.normal.x,m=this.normal.y,g=this.normal.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var y=t.readItem();if(!y)break;var b=Number(y.code),v=Number(y.value);if(b===100){t.pushBackItem(y);break}switch(b){case 1:this.dimensionText=String(y.value);break;case 2:this.dimBlockId=String(y.value);break;case 3:this.dimensionStyleName=String(y.value);break;case 10:n=v;break;case 20:i=v;break;case 30:o=v;break;case 11:a=v;break;case 21:s=v;break;case 31:l=v;break;case 12:c=v,d=!0;break;case 22:u=v,d=!0;break;case 32:h=v,d=!0;break;case 41:this.textLineSpacingFactor=v;break;case 42:this.measurement=v;break;case 53:p=v;break;case 51:this.horizontalRotation=xe.degToRad(v);break;case 70:this.dimensionType=v;break;case 71:this.attachmentPoint=v;break;case 72:this.textLineSpacingStyle=v;break;case 210:f=v;break;case 220:m=v;break;case 230:g=v;break;case 280:this.dxfVersion=v;break;case 340:break;default:break}}return this._dxfDefinitionPoint.set(n,i,o),this.textPosition.copy(new k(a,s,l)),d&&(this.dimBlockPosition={x:c,y:u,z:h}),this.textRotation=p*Math.PI/180,this.normal.copy(new G(f,m,g)),this},e.typeName="Dimension",e})(bt)});function Nme(r,e,t,n){var i=e.x-r.x,o=e.y-r.y,a=n.x-t.x,s=n.y-t.y,l=i*s-o*a;if(Math.abs(l)<1e-12)return null;var c=((t.x-r.x)*s-(t.y-r.y)*a)/l;return{x:r.x+c*i,y:r.y+c*o}}var Fme,tw,qg,Zg,ID=W(()=>{tt();Nh();Fme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),tw=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},qg=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Zg=(function(r){Fme(e,r);function e(t,n,i,o,a,s){a===void 0&&(a=null),s===void 0&&(s=null);var l=r.call(this)||this;return l._centerPoint=new k().copy(t),l._xLine1Point=new k().copy(n),l._xLine2Point=new k().copy(i),l._arcPoint=new k().copy(o),l.dimensionText=a,l.dimensionStyleName=s,l}return Object.defineProperty(e.prototype,"arcPoint",{get:function(){return this._arcPoint},set:function(t){this._arcPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerPoint",{get:function(){return this._centerPoint},set:function(t){this._centerPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xLine1Point",{get:function(){return this._xLine1Point},set:function(t){this._xLine1Point.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xLine2Point",{get:function(){return this._xLine2Point},set:function(t){this._xLine2Point.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this,n=this.getBaseProperties();return{type:this.type,groups:qg(qg([],tw(n.groups),!1),[{groupName:"geometry",properties:qg(qg(qg(qg([],tw(this.createPoint3dProperties("centerPoint",function(){return t.centerPoint})),!1),tw(this.createPoint3dProperties("xLine1Point",function(){return t.xLine1Point})),!1),tw(this.createPoint3dProperties("xLine2Point",function(){return t.xLine2Point})),!1),tw(this.createPoint3dProperties("arcPoint",function(){return t.arcPoint})),!1)}],!1)}},enumerable:!1,configurable:!0}),e.prototype.collectDimensionDefinitionGripPoints=function(){return[this.centerPoint,this.xLine1Point,this.xLine2Point,this.arcPoint]},e.prototype.subTransformBy=function(t){this._arcPoint.applyMatrix4(t),this._centerPoint.applyMatrix4(t),this._xLine1Point.applyMatrix4(t),this._xLine2Point.applyMatrix4(t)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this.getGeometricExtentsFromDimBlockOrPoints([this.xLine1Point,this.xLine2Point,this.centerPoint,this.arcPoint])},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDb3PointAngularDimension"),t.writePoint3d(13,this.xLine1Point),t.writePoint3d(14,this.xLine2Point),t.writePoint3d(15,this.centerPoint),t.writePoint3d(16,this.arcPoint),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t);var i=t.peekItem(),o=!1;if(i&&Number(i.code)===100){var a=String(i.value);a==="AcDb2LineAngularDimension"?(o=!0,t.atSubclassData("AcDb2LineAngularDimension")):a==="AcDb3PointAngularDimension"&&t.atSubclassData("AcDb3PointAngularDimension")}for(var s=this.xLine1Point.x,l=this.xLine1Point.y,c=this.xLine1Point.z,u=this.xLine2Point.x,h=this.xLine2Point.y,d=this.xLine2Point.z,p=this.centerPoint.x,f=this.centerPoint.y,m=this.centerPoint.z,g=this.arcPoint.x,y=this.arcPoint.y,b=this.arcPoint.z,v=!1,x=s,w=l,_=c,A=u,E=h,S=d,M=function(){if(o){n.xLine1Point=new k(s,l,c),n.xLine2Point=new k(p,f,m);var D=Nme({x:s,y:l},{x,y:w},{x:p,y:f},{x:A,y:E});D?n.centerPoint=new k(D.x,D.y,(c+S)/2):n.centerPoint=new k(x,w,_),n.arcPoint=new k(n._dxfDefinitionPoint.x,n._dxfDefinitionPoint.y,n._dxfDefinitionPoint.z);return}n.xLine1Point=new k(s,l,c),n.xLine2Point=new k(u,h,d),n.centerPoint=new k(p,f,m),v?n.arcPoint=new k(g,y,b):n.arcPoint=new k(n._dxfDefinitionPoint.x,n._dxfDefinitionPoint.y,n._dxfDefinitionPoint.z)};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var T=t.readItem();if(!T)break;var L=Number(T.code),O=Number(T.value);switch(L){case 13:s=O;break;case 23:l=O;break;case 33:c=O;break;case 14:o?x=O:u=O;break;case 24:o?w=O:h=O;break;case 34:o?_=O:d=O;break;case 15:p=O;break;case 25:f=O;break;case 35:m=O;break;case 16:o?A=O:(g=O,v=!0);break;case 26:o?E=O:(y=O,v=!0);break;case 36:o?S=O:(b=O,v=!0);break;default:break}}return M(),this},e.typeName="3PointAngularDimension",e})(ho)});var zme,q2,K2,Jg,Ss,Z2=W(()=>{zt();tt();Rg();gu();b2();Cx();Nh();zme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),q2=function(){return q2=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},q2.apply(this,arguments)},K2=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Jg=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},Ss=(function(r){zme(e,r);function e(t,n,i,o,a){o===void 0&&(o=null),a===void 0&&(a=null);var s=r.call(this)||this;return s._dimLinePoint=new k().copy(i),s._xLine1Point=new k().copy(t),s._xLine2Point=new k().copy(n),s._oblique=0,s._rotation=0,s.calculateRotation(),o?s.dimensionText=o:s.dimensionText=s._xLine1Point.distanceTo(s._xLine2Point).toFixed(3),s.dimensionStyleName=a,s}return Object.defineProperty(e.prototype,"dimLinePoint",{get:function(){return this._dimLinePoint},set:function(t){this._dimLinePoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xLine1Point",{get:function(){return this._xLine1Point},set:function(t){this._xLine1Point.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xLine2Point",{get:function(){return this._xLine2Point},set:function(t){this._xLine2Point.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oblique",{get:function(){return this._oblique},set:function(t){this._oblique=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this,n=this.getBaseProperties();return{type:this.type,groups:Jg(Jg([],K2(n.groups),!1),[{groupName:"geometry",properties:Jg(Jg(Jg(Jg([],K2(this.createPoint3dProperties("xLine1Point",function(){return t.xLine1Point})),!1),K2(this.createPoint3dProperties("xLine2Point",function(){return t.xLine2Point})),!1),K2(this.createPoint3dProperties("dimLinePoint",function(){return t.dimLinePoint})),!1),[this.createProperty("rotation","float",function(){return t.rotation},function(i){t.rotation=i}),this.createProperty("oblique","float",function(){return t.oblique},function(i){t.oblique=i})],!1)}],!1)}},enumerable:!1,configurable:!0}),e.prototype.collectDimensionDefinitionGripPoints=function(){return[this.xLine1Point,this.xLine2Point,this.dimLinePoint]},e.prototype.subMoveGripPointsAt=function(t,n){return r.prototype.subMoveGripPointsAt.call(this,t,n),this.calculateRotation(),this},e.prototype.subTransformBy=function(t){this._dimLinePoint.applyMatrix4(t),this._xLine1Point.applyMatrix4(t),this._xLine2Point.applyMatrix4(t),this.calculateRotation()},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this.getGeometricExtentsFromDimBlockOrPoints([this.xLine1Point,this.xLine2Point,this.dimLinePoint])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAppendArrow",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.createDimBlock=function(t){var n=new rn;n.name=t;var i=this.createLines();i.forEach(function(l){return n.appendEntity(new Bo(l.startPoint,l.endPoint))});var o=this.createArrows(i[0]);o.forEach(function(l){return n.appendEntity(l)});var a=i[0].midPoint,s=this.createMText(a,this._rotation);return s&&n.appendEntity(s),n},e.prototype.createMText=function(t,n){var i,o=function(s){return{x:Math.cos(s),y:Math.sin(s),z:0}};if(this.dimensionText){var a=new Ro;return a.attachmentPoint=this.attachmentPoint,a.layer="0",a.color=new je(Be.ByBlock),a.location=t,a.contents=(i=this.dimensionText)!==null&&i!==void 0?i:"",a.height=10,a.direction=o(n),a.styleName=this.dimensionStyle.dimtxsty,a}},e.prototype.createArrows=function(t){var n=[];return n.push(this.createArrow(t.startPoint,this.rotation+Math.PI,10)),n.push(this.createArrow(t.endPoint,this.rotation,10)),n},e.prototype.createArrow=function(t,n,i){var o="_CAXARROW",a=new pn(o);return a.position=t,a.rotation=n,a.scaleFactors={x:i,y:i,z:i},a},e.prototype.createLines=function(){var t=[],n=this.createExtensionLine(this._xLine1Point),i=this.createExtensionLine(this._xLine2Point),o=this.findIntersectionPoint(n,this._dimLinePoint),a=this.findIntersectionPoint(i,this._dimLinePoint),s=new Yn(o,a);return t.push(s),n.endPoint=o,this.adjustExtensionLine(n),t.push(n),i.endPoint=a,this.adjustExtensionLine(i),t.push(i),t},e.prototype.createExtensionLine=function(t){var n=this.rotation+Math.PI/2,i=this.findPointOnLine2(t,n,100);return new Yn(t,q2(q2({},i),{z:t.z}))},e.prototype.findIntersectionPoint=function(t,n){var i=t.startPoint,o=t.endPoint,a=new G().subVectors(o,i).normalize(),s=new G().subVectors(n,i),l=s.dot(a),c=new G().copy(a).multiplyScalar(l),u=new G().addVectors(i,c);return u},e.prototype.calculateRotation=function(){var t=this._xLine1Point,n=this._xLine2Point,i=n.x-t.x,o=n.y-t.y;this._rotation=Math.atan2(o,i)},Object.defineProperty(e.prototype,"dxfSubclassMarker",{get:function(){return"AcDbAlignedDimension"},enumerable:!1,configurable:!0}),e.prototype.getMeasurementPropertyValue=function(){var t;return(t=this.measurement)!==null&&t!==void 0?t:this.xLine1Point.distanceTo(this.xLine2Point)},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker(this.dxfSubclassMarker),t.writePoint3d(13,this.xLine1Point),t.writePoint3d(14,this.xLine2Point),t.writePoint3d(15,this.dimLinePoint),t.writeAngle(50,this.rotation),t.writeAngle(52,this.oblique),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData(this.dxfSubclassMarker);for(var n=this.xLine1Point.x,i=this.xLine1Point.y,o=this.xLine1Point.z,a=this.xLine2Point.x,s=this.xLine2Point.y,l=this.xLine2Point.z,c=this.dimLinePoint.x,u=this.dimLinePoint.y,h=this.dimLinePoint.z,d=this.rotation*180/Math.PI,p=this.oblique*180/Math.PI,f=this.dimBlockPosition.x,m=this.dimBlockPosition.y,g=this.dimBlockPosition.z,y=!1,b=!1;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var v=t.readItem();if(!v)break;var x=Number(v.code),w=Number(v.value);switch(x){case 12:f=w,y=!0;break;case 22:m=w,y=!0;break;case 32:g=w,y=!0;break;case 13:n=w;break;case 23:i=w;break;case 33:o=w;break;case 14:a=w;break;case 24:s=w;break;case 34:l=w;break;case 15:c=w,b=!0;break;case 25:u=w,b=!0;break;case 35:h=w,b=!0;break;case 50:d=w;break;case 52:p=w;break;case 100:return t.pushBackItem(v),this.finishAlignedDxfIn(n,i,o,a,s,l,c,u,h,d,p,f,m,g,y,b),this;default:break}}return this.finishAlignedDxfIn(n,i,o,a,s,l,c,u,h,d,p,f,m,g,y,b),this},e.prototype.finishAlignedDxfIn=function(t,n,i,o,a,s,l,c,u,h,d,p,f,m,g,y){this.xLine1Point={x:t,y:n,z:i},this.xLine2Point={x:o,y:a,z:s},y?this.dimLinePoint={x:l,y:c,z:u}:this.dimLinePoint={x:this._dxfDefinitionPoint.x,y:this._dxfDefinitionPoint.y,z:this._dxfDefinitionPoint.z},this.rotation=h*Math.PI/180,this.oblique=d*Math.PI/180,g&&(this.dimBlockPosition={x:p,y:f,z:m})},e.typeName="AlignedDimension",e})(ho)});var Ume,nw,Qg,ey,LD=W(()=>{tt();Nh();Ume=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),nw=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Qg=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ey=(function(r){Ume(e,r);function e(t,n,i,o,a,s){a===void 0&&(a=null),s===void 0&&(s=null);var l=r.call(this)||this;return l._arcPoint=new k().copy(o),l._xLine1Point=new k().copy(n),l._xLine2Point=new k().copy(i),l._centerPoint=new k().copy(t),l.dimensionText=a,l.dimensionStyleName=s,l}return Object.defineProperty(e.prototype,"arcPoint",{get:function(){return this._arcPoint},set:function(t){this._arcPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerPoint",{get:function(){return this._centerPoint},set:function(t){this._centerPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xLine1Point",{get:function(){return this._xLine1Point},set:function(t){this._xLine1Point.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xLine2Point",{get:function(){return this._xLine2Point},set:function(t){this._xLine2Point.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this,n=this.getBaseProperties();return{type:this.type,groups:Qg(Qg([],nw(n.groups),!1),[{groupName:"geometry",properties:Qg(Qg(Qg(Qg([],nw(this.createPoint3dProperties("centerPoint",function(){return t.centerPoint})),!1),nw(this.createPoint3dProperties("xLine1Point",function(){return t.xLine1Point})),!1),nw(this.createPoint3dProperties("xLine2Point",function(){return t.xLine2Point})),!1),nw(this.createPoint3dProperties("arcPoint",function(){return t.arcPoint})),!1)}],!1)}},enumerable:!1,configurable:!0}),e.prototype.collectDimensionDefinitionGripPoints=function(){return[this.centerPoint,this.xLine1Point,this.xLine2Point,this.arcPoint]},e.prototype.subTransformBy=function(t){this._arcPoint.applyMatrix4(t),this._centerPoint.applyMatrix4(t),this._xLine1Point.applyMatrix4(t),this._xLine2Point.applyMatrix4(t)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this.getGeometricExtentsFromDimBlockOrPoints([this.xLine1Point,this.xLine2Point,this.centerPoint,this.arcPoint])},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbArcDimension"),t.writePoint3d(13,this.xLine1Point),t.writePoint3d(14,this.xLine2Point),t.writePoint3d(15,this.centerPoint),t.writePoint3d(16,this.arcPoint),this},e.prototype.dxfInFields=function(t){r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbArcDimension");for(var n=this.xLine1Point.x,i=this.xLine1Point.y,o=this.xLine1Point.z,a=this.xLine2Point.x,s=this.xLine2Point.y,l=this.xLine2Point.z,c=this.centerPoint.x,u=this.centerPoint.y,h=this.centerPoint.z,d=this.arcPoint.x,p=this.arcPoint.y,f=this.arcPoint.z;!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var m=t.readItem();if(!m)break;var g=Number(m.code),y=Number(m.value);switch(g){case 13:n=y;break;case 23:i=y;break;case 33:o=y;break;case 14:a=y;break;case 24:s=y;break;case 34:l=y;break;case 15:c=y;break;case 25:u=y;break;case 35:h=y;break;case 16:d=y;break;case 26:p=y;break;case 36:f=y;break;default:break}}return this.xLine1Point=new k(n,i,o),this.xLine2Point=new k(a,s,l),this.centerPoint=new k(c,u,h),this.arcPoint=new k(d,p,f),this},e.typeName="ArcDimension",e})(ho)});var jme,OD,rw,ty,DD=W(()=>{tt();Nh();jme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),OD=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},rw=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ty=(function(r){jme(e,r);function e(t,n,i,o,a){i===void 0&&(i=0),o===void 0&&(o=null),a===void 0&&(a=null);var s=r.call(this)||this;return s._chordPoint=new k().copy(t),s._farChordPoint=new k().copy(n),s._extArcStartAngle=0,s._extArcEndAngle=0,s._leaderLength=i,s.dimensionText=o,s.dimensionStyleName=a,s}return Object.defineProperty(e.prototype,"chordPoint",{get:function(){return this._chordPoint},set:function(t){this._chordPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"farChordPoint",{get:function(){return this._farChordPoint},set:function(t){this._farChordPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extArcStartAngle",{get:function(){return this._extArcStartAngle},set:function(t){this._extArcStartAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extArcEndAngle",{get:function(){return this._extArcEndAngle},set:function(t){this._extArcEndAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLength",{get:function(){return this._leaderLength},set:function(t){this._leaderLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this,n=this.getBaseProperties();return{type:this.type,groups:rw(rw([],OD(n.groups),!1),[{groupName:"geometry",properties:rw(rw(rw([],OD(this.createPoint3dProperties("chordPoint",function(){return t.chordPoint})),!1),OD(this.createPoint3dProperties("farChordPoint",function(){return t.farChordPoint})),!1),[this.createProperty("leaderLength","float",function(){return t.leaderLength},function(i){t.leaderLength=i}),this.createProperty("extArcStartAngle","float",function(){return t.extArcStartAngle},function(i){t.extArcStartAngle=i}),this.createProperty("extArcEndAngle","float",function(){return t.extArcEndAngle},function(i){t.extArcEndAngle=i})],!1)}],!1)}},enumerable:!1,configurable:!0}),e.prototype.collectDimensionDefinitionGripPoints=function(){return[this.chordPoint,this.farChordPoint]},e.prototype.subTransformBy=function(t){this._chordPoint.applyMatrix4(t),this._farChordPoint.applyMatrix4(t)},e.prototype.getMeasurementPropertyValue=function(){var t;return(t=this.measurement)!==null&&t!==void 0?t:this.chordPoint.distanceTo(this.farChordPoint)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=[this.chordPoint,this.farChordPoint];if(this.leaderLength>0){var n=this.farChordPoint.clone().sub(this.chordPoint);n.lengthSq()>0&&(n.normalize().multiplyScalar(this.leaderLength),t.push(this.farChordPoint.clone().add(n)))}return this.getGeometricExtentsFromDimBlockOrPoints(t)},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbDiametricDimension"),t.writePoint3d(15,this.chordPoint),t.writePoint3d(16,this.farChordPoint),t.writeDouble(40,this.leaderLength),t.writeAngle(52,this.extArcStartAngle),t.writeAngle(53,this.extArcEndAngle),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbDiametricDimension");for(var i=this._dxfDefinitionPoint.x,o=this._dxfDefinitionPoint.y,a=this._dxfDefinitionPoint.z,s=this.farChordPoint.x,l=this.farChordPoint.y,c=this.farChordPoint.z,u=!1,h=!1,d=this.extArcStartAngle*180/Math.PI,p=this.extArcEndAngle*180/Math.PI,f=function(){h?(n.chordPoint=new k(i,o,a),n.farChordPoint=new k(s,l,c)):u&&(n.chordPoint=new k(n._dxfDefinitionPoint.x,n._dxfDefinitionPoint.y,n._dxfDefinitionPoint.z),n.farChordPoint=new k(i,o,a)),n.extArcStartAngle=d*Math.PI/180,n.extArcEndAngle=p*Math.PI/180};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var m=t.readItem();if(!m)break;var g=Number(m.code),y=Number(m.value);switch(g){case 15:i=y,u=!0;break;case 25:o=y,u=!0;break;case 35:a=y,u=!0;break;case 16:s=y,h=!0;break;case 26:l=y,h=!0;break;case 36:c=y,h=!0;break;case 40:this.leaderLength=y;break;case 52:d=y;break;case 53:p=y;break;default:break}}return f(),this},e.typeName="DiametricDimension",e})(ho)});var Vme,RD,J2,ny,BD=W(()=>{tt();Nh();Vme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),RD=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},J2=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ny=(function(r){Vme(e,r);function e(t,n,i,o){i===void 0&&(i=null),o===void 0&&(o=null);var a=r.call(this)||this;return a._definingPoint=new k().copy(t),a._leaderEndPoint=new k().copy(n),a.dimensionText=i,a.dimensionStyleName=o,a}return Object.defineProperty(e.prototype,"definingPoint",{get:function(){return this._definingPoint},set:function(t){this._definingPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderEndPoint",{get:function(){return this._leaderEndPoint},set:function(t){this._leaderEndPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this,n=this.getBaseProperties();return{type:this.type,groups:J2(J2([],RD(n.groups),!1),[{groupName:"geometry",properties:J2(J2([],RD(this.createPoint3dProperties("definingPoint",function(){return t.definingPoint})),!1),RD(this.createPoint3dProperties("leaderEndPoint",function(){return t.leaderEndPoint})),!1)}],!1)}},enumerable:!1,configurable:!0}),e.prototype.collectDimensionDefinitionGripPoints=function(){return[this.definingPoint,this.leaderEndPoint]},e.prototype.subTransformBy=function(t){this._definingPoint.applyMatrix4(t),this._leaderEndPoint.applyMatrix4(t)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return this.getGeometricExtentsFromDimBlockOrPoints([this.definingPoint,this.leaderEndPoint])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowLineCount",{get:function(){return 0},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbOrdinateDimension"),t.writePoint3d(13,this.definingPoint),t.writePoint3d(14,this.leaderEndPoint),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbOrdinateDimension");for(var i=this.definingPoint.x,o=this.definingPoint.y,a=this.definingPoint.z,s=this.leaderEndPoint.x,l=this.leaderEndPoint.y,c=this.leaderEndPoint.z,u=function(){n.definingPoint=new k(i,o,a),n.leaderEndPoint=new k(s,l,c)};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var h=t.readItem();if(!h)break;var d=Number(h.code),p=Number(h.value);switch(d){case 13:i=p;break;case 23:o=p;break;case 33:a=p;break;case 14:s=p;break;case 24:l=p;break;case 34:c=p;break;default:break}}return u(),this},e.typeName="OrdinateDimension",e})(ho)});var Gme,FD,iw,ry,ND=W(()=>{tt();Nh();Gme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),FD=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},iw=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ry=(function(r){Gme(e,r);function e(t,n,i,o,a){o===void 0&&(o=null),a===void 0&&(a=null);var s=r.call(this)||this;return s._center=new k().copy(t),s._chordPoint=new k().copy(n),s._leaderLength=i,s._extArcStartAngle=0,s._extArcEndAngle=0,s.dimensionText=o,s.dimensionStyleName=a,s}return Object.defineProperty(e.prototype,"center",{get:function(){return this._center},set:function(t){this._center.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"chordPoint",{get:function(){return this._chordPoint},set:function(t){this._chordPoint.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extArcStartAngle",{get:function(){return this._extArcStartAngle},set:function(t){this._extArcStartAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extArcEndAngle",{get:function(){return this._extArcEndAngle},set:function(t){this._extArcEndAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLength",{get:function(){return this._leaderLength},set:function(t){this._leaderLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderLenght",{set:function(t){this._leaderLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){var t=this,n=this.getBaseProperties();return{type:this.type,groups:iw(iw([],FD(n.groups),!1),[{groupName:"geometry",properties:iw(iw(iw([],FD(this.createPoint3dProperties("center",function(){return t.center})),!1),FD(this.createPoint3dProperties("chordPoint",function(){return t.chordPoint})),!1),[this.createProperty("leaderLength","float",function(){return t.leaderLength},function(i){t.leaderLength=i}),this.createProperty("extArcStartAngle","float",function(){return t.extArcStartAngle},function(i){t.extArcStartAngle=i}),this.createProperty("extArcEndAngle","float",function(){return t.extArcEndAngle},function(i){t.extArcEndAngle=i})],!1)}],!1)}},enumerable:!1,configurable:!0}),e.prototype.collectDimensionDefinitionGripPoints=function(){return[this.center,this.chordPoint]},e.prototype.subTransformBy=function(t){this._center.applyMatrix4(t),this._chordPoint.applyMatrix4(t)},e.prototype.getMeasurementPropertyValue=function(){var t;return(t=this.measurement)!==null&&t!==void 0?t:this.center.distanceTo(this.chordPoint)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=[this.center,this.chordPoint];if(this.leaderLength>0){var n=this.chordPoint.clone().sub(this.center);n.lengthSq()>0&&(n.normalize().multiplyScalar(this.leaderLength),t.push(this.chordPoint.clone().add(n)))}return this.getGeometricExtentsFromDimBlockOrPoints(t)},enumerable:!1,configurable:!0}),e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbRadialDimension"),t.writePoint3d(15,this.center),t.writePoint3d(13,this.chordPoint),t.writeDouble(40,this.leaderLength),t.writeAngle(52,this.extArcStartAngle),t.writeAngle(53,this.extArcEndAngle),this},e.prototype.dxfInFields=function(t){var n=this;r.prototype.dxfInFields.call(this,t),t.atSubclassData("AcDbRadialDimension");for(var i=this._dxfDefinitionPoint.x,o=this._dxfDefinitionPoint.y,a=this._dxfDefinitionPoint.z,s=this.chordPoint.x,l=this.chordPoint.y,c=this.chordPoint.z,u=!1,h=this.extArcStartAngle*180/Math.PI,d=this.extArcEndAngle*180/Math.PI,p=function(){n.center=new k(i,o,a),n.chordPoint=new k(s,l,c),n.extArcStartAngle=h*Math.PI/180,n.extArcEndAngle=d*Math.PI/180};!t.atEndOfObject&&!t.atEof&&!t.atExtendedData;){var f=t.readItem();if(!f)break;var m=Number(f.code),g=Number(f.value);switch(m){case 15:s=g,u=!0;break;case 25:l=g,u=!0;break;case 35:c=g,u=!0;break;case 13:u||(s=g);break;case 23:u||(l=g);break;case 33:u||(c=g);break;case 40:this.leaderLength=g;break;case 52:h=g;break;case 53:d=g;break;default:break}}return p(),this},e.typeName="RadialDimension",e})(ho)});var Hme,iy,zD=W(()=>{Z2();Hme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),iy=(function(r){Hme(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"dxfSubclassMarker",{get:function(){return"AcDbRotatedDimension"},enumerable:!1,configurable:!0}),e.typeName="RotatedDimension",e})(Ss)});function ow(r){var e=Number(r.code),t=r.value,n=Qs(e);return n==="comment"?{code:e,type:"string",value:String(t??"")}:n==="bool"?{code:e,type:"bool",value:!!t}:n==="binary"?t instanceof Uint8Array?{code:e,type:"binary",value:t}:{code:e,type:"string",value:String(t??"")}:n==="handle"?{code:e,type:"handle",value:String(t??"")}:n==="int"||n==="long"?{code:e,type:n==="long"?"long":"int",value:Number(t)}:n==="double"?{code:e,type:"double",value:Number(t)}:{code:e,type:"string",value:String(t??"")}}function nH(r){for(var e=[];!r.atEndOfObject&&!r.atEof&&!r.atExtendedData;){var t=r.readItem();if(!t)break;e.push(ow(t))}return e}var Q2,UD=W(()=>{Ov();Q2=(function(){function r(e){this._pairs=e,this.kind="ascii",this._index=0}return r.prototype.next=function(){if(!(this._index>=this._pairs.length))return this._pairs[this._index++]},r.prototype.peek=function(){if(!(this._index>=this._pairs.length))return this._pairs[this._index]},r.prototype.position=function(){return{byteOffset:this._index}},r})()});function iH(r){var e=Xme(r),t=Yme(e),n=$me(t,e);if(!n)return null;var i=el.forReading(new Q2(e),{database:r.database});return n.dxfIn(i),n}function Xme(r){for(var e=nH(r);!r.atEndOfObject&&!r.atEof;){var t=r.readItem();if(!t)break;if(Number(t.code)===0){r.pushBackItem(t);break}e.push(ow(t))}return e}function Yme(r){var e,t,n,i,o="";try{for(var a=rH(r),s=a.next();!s.done;s=a.next()){var l=s.value;l.code===100&&typeof l.value=="string"&&Wme.has(l.value)&&(o=l.value)}}catch(d){e={error:d}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}if(o)return o;try{for(var c=rH(r),u=c.next();!u.done;u=c.next()){var l=u.value;if(l.code===70&&typeof l.value=="number"){var h=l.value&15;switch(h){case 0:return"AcDbRotatedDimension";case 1:return"AcDbAlignedDimension";case 2:return"AcDb2LineAngularDimension";case 3:return"AcDbDiametricDimension";case 4:return"AcDbRadialDimension";case 5:return"AcDb3PointAngularDimension";case 6:return"AcDbOrdinateDimension";case 8:return"AcDbArcDimension";default:break}}}}catch(d){n={error:d}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return"AcDbAlignedDimension"}function $me(r,e){var t=new k;switch(r){case"AcDbRotatedDimension":return new iy(t,t,t);case"AcDbAlignedDimension":return new Ss(t,t,t);case"AcDb3PointAngularDimension":case"AcDb2LineAngularDimension":return new Zg(t,t,t,t);case"AcDbOrdinateDimension":return new ny(t,t);case"AcDbRadialDimension":return new ry(t,t,0);case"AcDbDiametricDimension":return new ty(t,t,0);case"AcDbArcDimension":return new ey(t,t,t,t);default:return new Ss(t,t,t)}}var rH,Wme,oH=W(()=>{tt();Hm();ID();Z2();LD();DD();BD();ND();zD();UD();rH=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wme=new Set(["AcDbAlignedDimension","AcDbRotatedDimension","AcDb3PointAngularDimension","AcDb2LineAngularDimension","AcDbOrdinateDimension","AcDbRadialDimension","AcDbDiametricDimension","AcDbArcDimension"])});var Kme,qme,Zme,Jme,za,zh,jD=W(()=>{tt();Op();Fn();no();En();Di();ro();ul();Kme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),qme=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zme=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},Jme=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};(function(r){r[r.SimplePoly=0]="SimplePoly",r[r.FitCurvePoly=1]="FitCurvePoly",r[r.QuadSplinePoly=2]="QuadSplinePoly",r[r.CubicSplinePoly=3]="CubicSplinePoly"})(za||(za={}));zh=(function(r){Kme(e,r);function e(t,n,i,o,a,s,l){i===void 0&&(i=0),o===void 0&&(o=!1),a===void 0&&(a=0),s===void 0&&(s=0),l===void 0&&(l=null);var c=r.call(this)||this;c._normal=new G(0,0,1),c._polyType=t,c._elevation=i;var u=l&&l?.length===n.length,h=n.map(function(d,p){return{x:d.x,y:d.y,bulge:u?l[p]:void 0}});return c._geo=new Ot(h,o),c}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"POLYLINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"polyType",{get:function(){return this._polyType},set:function(t){this._polyType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elevation",{get:function(){return this._elevation},set:function(t){this._elevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},set:function(t){this._normal.copy(t),this._normal.lengthSq()>0&&this._normal.normalize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return this._geo.closed},set:function(t){this._geo.closed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this._geo.area},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfVertices",{get:function(){return this._geo.numberOfVertices},enumerable:!1,configurable:!0}),e.prototype.getPointAt=function(t){return this._geo.getPointAt(t)},e.prototype.getBulgeAt=function(t){var n=this._geo.vertices[t];return n?.bulge||0},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this._geo.box;return t.isEmpty()?new De:new De().setFromPoints([this.ocsPointToWcs(t.min.x,t.min.y),this.ocsPointToWcs(t.max.x,t.min.y),this.ocsPointToWcs(t.max.x,t.max.y),this.ocsPointToWcs(t.min.x,t.max.y)])},enumerable:!1,configurable:!0}),e.prototype.ocsPointToWcs=function(t,n){return Er({x:t,y:n,z:this._elevation},this._normal)},e.prototype.subGetIntersectCurves=function(){return m0(this._geo.vertices,this.closed,this._elevation,this._normal)},e.prototype.subGetGripPoints=function(){for(var t=new Array,n=0;n<this._geo.numberOfVertices;++n){var i=this._geo.getPointAt(n);t.push(this.ocsPointToWcs(i.x,i.y))}return t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this,o=dr(n,this._normal);return un(t,function(a){Sh(i._geo.vertices,a,o)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a,s,l,c=this._geo,u=this._elevation,h=c.numberOfVertices;if(h!==0)switch(t){case ne.EndPoint:for(var d=0;d<h;d++){var p=c.getPointAt(d);o.push(this.ocsPointToWcs(p.x,p.y))}break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:case ne.Tangent:{for(var f=this.closed?h:h-1,m=[],d=0;d<f;d++){var g=[];Ah(c.getPointAt(d),c.getPointAt((d+1)%h),(l=c.vertices[d])===null||l===void 0?void 0:l.bulge,u,t,n,g);try{for(var y=(a=void 0,qme(g)),b=y.next();!b.done;b=y.next()){var v=b.value;m.push(this.ocsPointToWcs(v.x,v.y))}}catch(_){a={error:_}}finally{try{b&&!b.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}}if(t===ne.MidPoint)o.push.apply(o,Jme([],Zme(m),!1));else{var x=yr(n,m);x&&o.push(x)}break}default:break}},e.prototype.transformBy=function(t){var n=this,i=t.determinant()<0,o=this._elevation;return this._geo.vertices.forEach(function(a){var s=new k(a.x,a.y,n._elevation).applyMatrix4(t);a.x=s.x,a.y=s.y,o=s.z,i&&a.bulge!=null&&(a.bulge=-a.bulge)}),this._elevation=o,this._normal.transformDirection(t),this._normal.lengthSq()>0&&this._normal.normalize(),this._geo._boundingBoxNeedsUpdate=!0,this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"vertices",type:"array",editable:!1,itemSchema:{properties:[{name:"x",type:"float",editable:!0},{name:"y",type:"float",editable:!0}]},accessor:{get:function(){return t._geo.vertices}}},{name:"elevation",type:"float",editable:!0,accessor:{get:function(){return t.elevation},set:function(n){t.elevation=n}}},{name:"length",type:"float",editable:!1,accessor:{get:function(){return t._geo.length}}}]},{groupName:"others",properties:[{name:"closed",type:"float",editable:!0,accessor:{get:function(){return t.closed},set:function(n){t.closed=n}}}]}]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=this,i=[],o=this._geo.tessellate(ao(t));return o.forEach(function(a){return i.push(n.ocsPointToWcs(a.x,a.y))}),t.lines(i)},e.prototype.dxfOut=function(t,n){n===void 0&&(n=!1),r.prototype.dxfOut.call(this,t,n);for(var i=0;i<this.numberOfVertices;++i)t.writeStart("VERTEX"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDb2dVertex"),t.writePoint3d(10,{x:this.getPointAt(i).x,y:this.getPointAt(i).y,z:this.elevation}),t.writeDouble(42,this.getBulgeAt(i)),t.writeInt16(70,0);return t.writeStart("SEQEND"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),this},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDb2dPolyline");var n=this.closed?1:0;return this.polyType===za.FitCurvePoly&&(n|=2),this.polyType===za.QuadSplinePoly&&(n|=4),this.polyType===za.CubicSplinePoly&&(n|=8),t.writeInt16(66,this.numberOfVertices>0?1:0),t.writeInt16(70,n),t.writeDouble(10,0),t.writeDouble(20,0),t.writeDouble(30,this.elevation),t.writeVector3d(210,this.normal),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.collectPath2d();return n.length<2?1:Dt.from2dPoints(n,this.closed).getOffsetSideAtPoint(t)},e.prototype.createOffsetCurve=function(t){var n=this._geo.offset(t);return n.length===0?null:Dt.fromGePolyline(n[0])},e.prototype.collectPath2d=function(){var t=Math.max(32,this.numberOfVertices*4);return this._geo.getPoints(t)},e.typeName="2dPolyline",e})(vn)});var Qme,VD,GD,pl,aw,HD=W(()=>{tt();Fn();no();En();Di();ro();ul();Qme=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),VD=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},GD=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))};(function(r){r[r.SimplePoly=0]="SimplePoly",r[r.QuadSplinePoly=1]="QuadSplinePoly",r[r.CubicSplinePoly=2]="CubicSplinePoly"})(pl||(pl={}));aw=(function(r){Qme(e,r);function e(t,n,i){i===void 0&&(i=!1);var o=r.call(this)||this;return o._polyType=t,o._geo=new Ot(n,i),o}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"POLYLINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"polyType",{get:function(){return this._polyType},set:function(t){this._polyType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return this._geo.closed},set:function(t){this._geo.closed=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfVertices",{get:function(){return this._geo.numberOfVertices},enumerable:!1,configurable:!0}),e.prototype.getPointAt=function(t){var n=this._geo.vertices[t];return new k(n.x,n.y,n.z||0)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){var t=this._geo.vertices.map(function(n){return new k(n.x,n.y,n.z||0)});return new De().setFromPoints(t)},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){for(var t=[],n=0;n<this.numberOfVertices;n++)t.push(this.getPointAt(n));return or(t,this.closed)},e.prototype.subGetGripPoints=function(){for(var t=new Array,n=0;n<this._geo.numberOfVertices;++n)t.push(this.getPointAt(n));return t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){i.moveVertexAt(o,n)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){var a=this,s=Array.from({length:this._geo.numberOfVertices},function(d,p){return a.getPointAt(p)});if(s.length!==0)switch(t){case ne.EndPoint:o.push.apply(o,GD([],VD(s),!1));break;case ne.MidPoint:case ne.Nearest:case ne.Perpendicular:{for(var l=[],c=0;c<s.length-1;c++){var u=[];Kl(s[c],s[c+1],t,n,u),l.push.apply(l,GD([],VD(u),!1))}if(t===ne.MidPoint)o.push.apply(o,GD([],VD(l),!1));else{var h=yr(n,l);h&&o.push(h)}break}default:break}},e.prototype.transformBy=function(t){return this._geo.vertices.forEach(function(n){var i=new k(n.x,n.y,n.z||0).applyMatrix4(t);n.x=i.x,n.y=i.y,n.z=i.z}),this._geo._boundingBoxNeedsUpdate=!0,this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"vertices",type:"array",editable:!1,itemSchema:{properties:[{name:"x",type:"float",editable:!0},{name:"y",type:"float",editable:!0},{name:"z",type:"float",editable:!0}]},accessor:{get:function(){return t._geo.vertices}}},{name:"length",type:"float",editable:!1,accessor:{get:function(){return t._geo.length}}}]},{groupName:"others",properties:[{name:"closed",type:"float",editable:!0,accessor:{get:function(){return t.closed},set:function(n){t.closed=n}}}]}]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"directBatchPrimitive",{get:function(){return"lineStrip"},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=this._geo.vertices.map(function(i){return new k(i.x,i.y,i.z||0)});return t.lines(n)},e.prototype.dxfOut=function(t,n){n===void 0&&(n=!1),r.prototype.dxfOut.call(this,t,n);for(var i=0;i<this.numberOfVertices;++i){var o=this.getPointAt(i);t.writeStart("VERTEX"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDb3dPolylineVertex"),t.writePoint3d(10,{x:o.x,y:o.y,z:o.z}),t.writeInt16(70,32)}return t.writeStart("SEQEND"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),this},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDb3dPolyline");var n=this.closed?1:0;return n|=8,this.polyType===pl.QuadSplinePoly&&(n|=16),this.polyType===pl.CubicSplinePoly&&(n|=32),t.writeInt16(66,this.numberOfVertices>0?1:0),t.writeInt16(70,n),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.collectPath2d();return n.length<2?1:Dt.from2dPoints(n,this.closed).getOffsetSideAtPoint(t)},e.prototype.createOffsetCurve=function(t){var n=this._geo.offset(t);if(n.length===0)return null;for(var i=n[0],o=[],a=0;a<i.numberOfVertices;a++){var s=i.getPointAt(a);o.push(new k(s.x,s.y,this.interpolateZ(s.x,s.y)))}return new e(this.polyType,o,this.closed)},e.prototype.collectPath2d=function(){var t=Math.max(32,this.numberOfVertices*4);return this._geo.getPoints(t)},e.prototype.interpolateZ=function(t,n){var i=this.numberOfVertices;if(i<=0)return 0;for(var o=1/0,a=this.getPointAt(0).z,s=this.closed?i:i-1,l=0;l<s;l++){var c=this.getPointAt(l),u=this.getPointAt((l+1)%i),h=u.x-c.x,d=u.y-c.y,p=h*h+d*d;if(p!==0){var f=Math.max(0,Math.min(1,((t-c.x)*h+(n-c.y)*d)/p)),m=c.x+h*f,g=c.y+d*f,y=Math.pow(t-m,2)+Math.pow(n-g,2);y<o&&(o=y,a=c.z+(u.z-c.z)*f)}}return a},e.prototype.moveVertexAt=function(t,n){var i,o,a=this._geo.vertices[t];if(a){a.x+=n.x,a.y+=n.y;var s=a;s.z=((i=s.z)!==null&&i!==void 0?i:0)+((o=n.z)!==null&&o!==void 0?o:0)}},e.typeName="3dPolyline",e})(vn)});var ege,tge,nge,rge,eM,tM,sw,WD=W(()=>{tt();Fn();no();En();Di();ul();ege=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),tge=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},nge=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},rge=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eM=(function(){function r(e){this.position=new k(e.x,e.y,e.z||0)}return r})(),tM=(function(){function r(e){this.vertexIndices=e}return r})(),sw=(function(r){ege(e,r);function e(t,n){var i=r.call(this)||this;return i._vertices=t.map(function(o){return new eM(o)}),i._faces=n.map(function(o){return new tM(o)}),i}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"POLYLINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfVertices",{get:function(){return this._vertices.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfFaces",{get:function(){return this._faces.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return!1},set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return 0},enumerable:!1,configurable:!0}),e.prototype.getVertexAt=function(t){if(t<0||t>=this._vertices.length)throw new Error("Vertex index out of bounds");return this._vertices[t]},e.prototype.getFaceAt=function(t){if(t<0||t>=this._faces.length)throw new Error("Face index out of bounds");return this._faces[t]},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){if(this._vertices.length===0)return new De(new k(0,0,0),new k(0,0,0));var t=Number.MAX_VALUE,n=Number.MAX_VALUE,i=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=-Number.MAX_VALUE,s=-Number.MAX_VALUE;return this._vertices.forEach(function(l){t=Math.min(t,l.position.x),n=Math.min(n,l.position.y),i=Math.min(i,l.position.z),o=Math.max(o,l.position.x),a=Math.max(a,l.position.y),s=Math.max(s,l.position.z)}),new De(new k(t,n,i),new k(o,a,s))},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){var t=this,n=[];return this._faces.forEach(function(i){var o=[];i.vertexIndices.forEach(function(a){var s=Math.abs(a)-1;s>=0&&s<t._vertices.length&&o.push(t._vertices[s].position)}),o.length>=2&&n.push.apply(n,nge([],tge(or(o,!0)),!1))}),n},e.prototype.subGetGripPoints=function(){var t=new Array;return this._vertices.forEach(function(n){t.push(n.position)}),t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){var a=i._vertices[o];a&&a.position.add(n)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){t===ne.EndPoint&&this._vertices.forEach(function(a){o.push(a.position)})},e.prototype.transformBy=function(t){return this._vertices.forEach(function(n){n.position.applyMatrix4(t)}),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"vertices",type:"array",editable:!1,itemSchema:{properties:[{name:"x",type:"float",editable:!0},{name:"y",type:"float",editable:!0},{name:"z",type:"float",editable:!0}]},accessor:{get:function(){return t._vertices.map(function(n){return{x:n.position.x,y:n.position.y,z:n.position.z}})}}},{name:"faces",type:"array",editable:!1,itemSchema:{properties:[{name:"vertexIndices",type:"array",editable:!1,itemSchema:{properties:[{name:"index",type:"int",editable:!1}]}}]},accessor:{get:function(){return t._faces.map(function(n){return{vertexIndices:n.vertexIndices}})}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){var n=this,i=[];return this._faces.forEach(function(o){var a=[];if(o.vertexIndices.forEach(function(u){var h=Math.abs(u)-1;h>=0&&h<n._vertices.length&&a.push(n._vertices[h].position)}),a.length>=3)for(var s=0;s<a.length;s++){var l=a[s],c=a[(s+1)%a.length];i.push(l),i.push(c)}}),t.lines(i)},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbPolyFaceMesh");var n=64;return t.writeInt16(66,1),t.writeInt16(70,n),this},e.prototype.dxfOut=function(t,n){n===void 0&&(n=!1),r.prototype.dxfOut.call(this,t,n);for(var i=0;i<this.numberOfVertices;i++){var o=this.getVertexAt(i);t.writeStart("VERTEX"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDbPolyFaceMeshVertex"),t.writePoint3d(10,o.position),t.writeInt16(70,64)}for(var i=0;i<this.numberOfFaces;i++){var a=this.getFaceAt(i);t.writeStart("VERTEX"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDbPolyFaceMeshVertex"),t.writeInt16(70,128),a.vertexIndices.forEach(function(l,c){t.writeInt32(10+c,l)})}return t.writeStart("SEQEND"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.collectLargestFaceBoundary2d();return n.length<2?1:Dt.from2dPoints(n,!0).getOffsetSideAtPoint(t)},e.prototype.createOffsetCurve=function(t){return Cu(this.collectLargestFaceBoundary2d(),!0,t)},e.prototype.collectLargestFaceBoundary2d=function(){var t,n,i=this,o=[];try{for(var a=rge(this._faces),s=a.next();!s.done;s=a.next()){var l=s.value,c=l.vertexIndices.filter(function(u){return u>=0});c.length>o.length&&(o=c)}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o.length<2?this._vertices.map(function(u){return new Z(u.position.x,u.position.y)}):o.map(function(u){var h=i.getVertexAt(u).position;return new Z(h.x,h.y)})},e.typeName="PolyFaceMesh",e})(vn)});var ige,aH,sH,nM,lw,XD=W(()=>{tt();Fn();no();En();Di();ul();ige=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),aH=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},sH=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},nM=(function(){function r(e){this.position=new k(e.x,e.y,e.z||0)}return r})(),lw=(function(r){ige(e,r);function e(t,n,i,o,a){o===void 0&&(o=!1),a===void 0&&(a=!1);var s=r.call(this)||this;return s._mCount=t,s._nCount=n,s._closedM=o,s._closedN=a,s._vertices=i.map(function(l){return new nM(l)}),s}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"POLYLINE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mCount",{get:function(){return this._mCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nCount",{get:function(){return this._nCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closedM",{get:function(){return this._closedM},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closedN",{get:function(){return this._closedN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"closed",{get:function(){return this._closedM},set:function(t){this._closedM=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numberOfVertices",{get:function(){return this._vertices.length},enumerable:!1,configurable:!0}),e.prototype.getVertexAt=function(t){if(t<0||t>=this._vertices.length)throw new Error("Vertex index out of bounds");return this._vertices[t]},e.prototype.getVertexAtMN=function(t,n){var i=t*this._nCount+n;return this.getVertexAt(i)},Object.defineProperty(e.prototype,"geometricExtents",{get:function(){if(this._vertices.length===0)return new De(new k(0,0,0),new k(0,0,0));var t=Number.MAX_VALUE,n=Number.MAX_VALUE,i=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=-Number.MAX_VALUE,s=-Number.MAX_VALUE;return this._vertices.forEach(function(l){t=Math.min(t,l.position.x),n=Math.min(n,l.position.y),i=Math.min(i,l.position.z),o=Math.max(o,l.position.x),a=Math.max(a,l.position.y),s=Math.max(s,l.position.z)}),new De(new k(t,n,i),new k(o,a,s))},enumerable:!1,configurable:!0}),e.prototype.subGetIntersectCurves=function(){for(var t=[],n=0;n<this._mCount;n++)for(var i=0;i<this._nCount;i++){var o=this.getVertexAtMN(n,i),a=i+1;if(a>=this._nCount)if(this._closedN)a=0;else continue;t.push.apply(t,sH([],aH(or([o.position,this.getVertexAtMN(n,a).position],!1,!1)),!1))}for(var i=0;i<this._nCount;i++)for(var n=0;n<this._mCount;n++){var o=this.getVertexAtMN(n,i),s=n+1;if(s>=this._mCount)if(this._closedM)s=0;else continue;t.push.apply(t,sH([],aH(or([o.position,this.getVertexAtMN(s,i).position],!1,!1)),!1))}return t},e.prototype.subGetGripPoints=function(){var t=new Array;return this._vertices.forEach(function(n){t.push(n.position)}),t},e.prototype.subMoveGripPointsAt=function(t,n){var i=this;return un(t,function(o){var a=i._vertices[o];a&&a.position.add(n)}),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){t===ne.EndPoint&&this._vertices.forEach(function(a){o.push(a.position)})},e.prototype.transformBy=function(t){return this._vertices.forEach(function(n){n.position.applyMatrix4(t)}),this},Object.defineProperty(e.prototype,"properties",{get:function(){var t=this;return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"mCount",type:"float",editable:!1,accessor:{get:function(){return t._mCount}}},{name:"nCount",type:"float",editable:!1,accessor:{get:function(){return t._nCount}}},{name:"vertices",type:"array",editable:!1,itemSchema:{properties:[{name:"x",type:"float",editable:!0},{name:"y",type:"float",editable:!0},{name:"z",type:"float",editable:!0}]},accessor:{get:function(){return t._vertices.map(function(n){return{x:n.position.x,y:n.position.y,z:n.position.z}})}}}]},{groupName:"others",properties:[{name:"closedM",type:"boolean",editable:!0,accessor:{get:function(){return t._closedM},set:function(n){t._closedM=n}}},{name:"closedN",type:"boolean",editable:!0,accessor:{get:function(){return t._closedN},set:function(n){t._closedN=n}}}]}]}},enumerable:!1,configurable:!0}),e.prototype.subWorldDraw=function(t){for(var n=[],i=0;i<this._mCount;i++)for(var o=0;o<this._nCount;o++){var a=this.getVertexAtMN(i,o),s=o+1;if(s>=this._nCount)if(this._closedN)s=0;else continue;var l=this.getVertexAtMN(i,s);n.push(a.position),n.push(l.position)}for(var o=0;o<this._nCount;o++)for(var i=0;i<this._mCount;i++){var a=this.getVertexAtMN(i,o),c=i+1;if(c>=this._mCount)if(this._closedM)c=0;else continue;var l=this.getVertexAtMN(c,o);n.push(a.position),n.push(l.position)}return t.lines(n)},e.prototype.dxfOutFields=function(t){r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbPolygonMesh");var n=16;return this._closedM&&(n|=1),this._closedN&&(n|=32),t.writeInt16(66,1),t.writeInt16(70,n),t.writeInt32(71,this._mCount),t.writeInt32(72,this._nCount),this},e.prototype.dxfOut=function(t,n){n===void 0&&(n=!1),r.prototype.dxfOut.call(this,t,n);for(var i=0;i<this.numberOfVertices;i++){var o=this.getVertexAt(i);t.writeStart("VERTEX"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDbPolygonMeshVertex"),t.writePoint3d(10,o.position),t.writeInt16(70,16)}return t.writeStart("SEQEND"),t.writeHandle(5,this.database.generateHandle()),t.writeObjectId(330,this.objectId),t.writeSubclassMarker("AcDbEntity"),this},e.prototype.getOffsetCurves=function(t){var n=this.createOffsetCurve(t);return n?[n]:[]},e.prototype.getOffsetSideAtPoint=function(t){var n=this.collectBoundary2d();return n.length<2?1:Dt.from2dPoints(n,this.isBoundaryClosed()).getOffsetSideAtPoint(t)},e.prototype.createOffsetCurve=function(t){return Cu(this.collectBoundary2d(),this.isBoundaryClosed(),t)},e.prototype.isBoundaryClosed=function(){return this._closedM&&this._closedN&&this._mCount>1&&this._nCount>1},e.prototype.collectBoundary2d=function(){var t=this,n=this._mCount,i=this._nCount;if(n<1||i<1)return[];var o=[],a=function(c,u){var h=t.getVertexAtMN(c,u).position;o.push(new Z(h.x,h.y))};if(n===1){for(var s=0;s<i;s++)a(0,s);return o}if(i===1){for(var l=0;l<n;l++)a(l,0);return o}for(var s=0;s<i;s++)a(0,s);for(var l=1;l<n;l++)a(l,i-1);for(var s=i-2;s>=0;s--)a(n-1,s);for(var l=n-2;l>=1;l--)a(l,0);return o},e.typeName="PolygonMesh",e})(vn)});function dH(r){var e=hge(r),t=cge(r),n=dge(r),i=fge(e,n);return i&&t.length>0&&uge(i,t,r),i}function cge(r){for(var e=[];!r.atEndOfObject&&!r.atEof;){var t=r.peekItem();if(!t)break;var n=Number(t.code);if(n===0||n<1e3||n>1071)break;var i=r.readItem();if(!i)break;e.push(ow(i))}return e}function uge(r,e,t){var n=el.forReading(new Q2(e),{database:t.database});r.dxfIn(n)}function hge(r){for(var e={layer:"0",lineType:"ByLayer",flag:0,elevation:0,startWidth:0,endWidth:0,meshM:0,meshN:0,smoothType:0};!r.atEndOfObject&&!r.atEof&&!r.atExtendedData;){var t=r.readItem();if(!t)break;var n=Number(t.code),i=Number(t.value);switch(n){case 5:e.objectId=String(t.value);break;case 330:e.ownerId=String(t.value);break;case 8:e.layer=String(t.value);break;case 6:e.lineType=String(t.value);break;case 62:e.colorIndex=i;break;case 420:e.trueColor=i;break;case 70:e.flag=i;break;case 10:case 20:break;case 30:e.elevation=i;break;case 40:e.startWidth=i;break;case 41:e.endWidth=i;break;case 71:e.meshM=i;break;case 72:e.meshN=i;break;case 75:e.smoothType=i;break;case 100:break;default:break}}return e}function dge(r){for(var e=[];!r.atEof;){var t=r.peekItem();if(!t||Number(t.code)!==0)break;var n=String(t.value).toUpperCase();if(n==="SEQEND"){r.readItem(),r.skipToEndOfObject();break}if(n==="ENDSEC"||n==="ENDBLK"||n==="EOF"||n!=="VERTEX")break;r.readItem(),e.push(pge(r))}return e}function pge(r){for(var e={x:0,y:0,z:0,bulge:0,flag:0,faces:[]},t=[],n=[];!r.atEndOfObject&&!r.atEof&&!r.atExtendedData;){var i=r.readItem();if(!i)break;var o=Number(i.code),a=Number(i.value);switch(o){case 10:e.x=a,n[0]=Math.trunc(a);break;case 20:e.y=a;break;case 30:e.z=a;break;case 11:n[1]=Math.trunc(a);break;case 12:n[2]=Math.trunc(a);break;case 13:n[3]=Math.trunc(a);break;case 42:e.bulge=a;break;case 70:e.flag=a;break;case 71:t[0]=Math.trunc(a);break;case 72:t[1]=Math.trunc(a);break;case 73:t[2]=Math.trunc(a);break;case 74:t[3]=Math.trunc(a);break;default:break}}var s=!!(e.flag&uH)&&!(e.flag&hH);if(s){var l=t.length>0?t:n;e.faces=l.filter(function(c){return c!==0&&c!=null})}return e}function fge(r,e){var t,n,i=!!(r.flag&1),o=!!(r.flag&8),a=!!(r.flag&16),s=!!(r.flag&64),l=!!(r.flag&32),c=[],u=[],h=[];try{for(var d=oge(e),p=d.next();!p.done;p=d.next()){var f=p.value;f.flag&lge||(s&&f.flag&uH?f.flag&hH?(c.push({x:f.x,y:f.y,z:f.z}),u.push(f.bulge)):f.faces.length>=3&&h.push(sge([],age(f.faces),!1)):(c.push({x:f.x,y:f.y,z:f.z}),u.push(f.bulge)))}}catch(y){t={error:y}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}var m;if(a)m=new lw(r.meshM,r.meshN,c,i,l);else if(s)m=new sw(c,h);else if(o){var g=pl.SimplePoly;r.flag&4&&(r.smoothType===cH?g=pl.CubicSplinePoly:r.smoothType===lH&&(g=pl.QuadSplinePoly)),m=new aw(g,c,i)}else{var g=za.SimplePoly;r.flag&2?g=za.FitCurvePoly:r.flag&4&&(r.smoothType===cH?g=za.CubicSplinePoly:r.smoothType===lH&&(g=za.QuadSplinePoly)),m=new zh(g,c,r.elevation,i,r.startWidth,r.endWidth,u)}return mge(m,r),m}function mge(r,e){e.objectId&&(r.objectId=e.objectId),e.ownerId&&(r.ownerId=e.ownerId),r.layer=e.layer,r.lineType=e.lineType,e.colorIndex!=null&&(r.color.colorIndex=e.colorIndex),e.trueColor!=null&&r.color.setRGBValue(e.trueColor)}var oge,age,sge,lge,uH,hH,lH,cH,pH=W(()=>{Hm();jD();HD();WD();XD();UD();oge=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},age=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},sge=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},lge=16,uH=128,hH=64,lH=5,cH=6});function rM(r){var e=r.toUpperCase();switch(e){case"LINE":return new Bo;case"CIRCLE":return new Do;case"ARC":return new ms;case"POINT":return new Up;case"RAY":return new oc;case"XLINE":return new Rh;case"ELLIPSE":return new Jl;case"SOLID":return new Hx;case"TRACE":return new jp;case"3DFACE":return new b0;case"LWPOLYLINE":return new Dt;case"INSERT":return new pn("");case"TEXT":return new pu;case"ARCALIGNEDTEXT":return new c0;case"MTEXT":return new Ro;case"SPLINE":return new Ra;case"ATTDEF":return new h0;case"ATTRIB":return new Zl;case"SHAPE":return new Gx;case"TOLERANCE":return new vx;case"LEADER":return new kx;case"VIEWPORT":return new Ba;case"IMAGE":return new hl;case"WIPEOUT":return new Yx;case"ACAD_PROXY_ENTITY":return new Vx;case"OLEFRAME":return new zp;case"OLE2FRAME":return new jx;case"HATCH":return new Tu;case"MLINE":return new Oh;case"MULTILEADER":case"MLEADER":return new Lx;case"ACAD_TABLE":return new Xx("",1,1);case"3DSOLID":return new hp("");default:return null}}function vg(r,e){var t=e;if(t==null){var n=r.readItem();if(!n||Number(n.code)!==0)return n&&r.pushBackItem(n),null;t=String(n.value)}var i=t.toUpperCase();if(i==="POLYLINE")return dH(r);if(i==="DIMENSION")return iH(r);var o=rM(t);return o?(o.dxfIn(r),o):null}var TO=W(()=>{MA();OL();VL();kA();TA();gu();KL();qL();ZL();_3();i2();M3();b2();C3();k3();Cx();G3();M2();H3();ul();W3();E2();X3();Y3();$3();K3();q3();u0();C2();J3();Q3();eD();oH();pH()});var fH=W(()=>{TO();CO();dO();LO();EO()});function aM(r){return new uw(r)}var YD,$D,iM,oM,cw,uw,mH=W(()=>{YD=function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(h){a(h)}}function l(u){try{c(n.throw(u))}catch(h){a(h)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(r,e||[])).next())})},$D=function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},iM=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},oM=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},cw=(function(){function r(e){var t,n;this.taskId=0,this.workers=new Map,this.pendingTasks=new Map,this.config={workerUrl:e.workerUrl,timeout:(t=e.timeout)!==null&&t!==void 0?t:3e4,maxConcurrentWorkers:(n=e.maxConcurrentWorkers)!==null&&n!==void 0?n:4}}return r.prototype.execute=function(e,t){return YD(this,void 0,void 0,function(){var n,i,o,a,s;return $D(this,function(l){switch(l.label){case 0:n=Date.now(),i=this.generateTaskId(),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.executeInWorker(i,e,t||this.config.workerUrl)];case 2:return[2,l.sent()];case 3:return o=l.sent(),a=Date.now()-n,s=o instanceof Error?o.message:String(o),[2,{success:!1,error:s,errorCode:s.toLowerCase().includes("timed out")?"worker_timeout":void 0,duration:a}];case 4:return[2]}})})},r.prototype.executeInWorker=function(e,t,n){return YD(this,void 0,void 0,function(){var i,o=this;return $D(this,function(a){return i=Date.now(),[2,new Promise(function(s,l){var c=o.getAvailableWorker(n),u=setTimeout(function(){o.cleanupTask(e),o.releaseWorker(c),l(new Error("Worker operation timed out after ".concat(o.config.timeout,"ms")))},o.config.timeout);o.pendingTasks.set(e,{resolve:function(f){clearTimeout(u),o.releaseWorker(c),s(f)},reject:function(f){clearTimeout(u),o.releaseWorker(c),l(f)},timeout:u});var h=function(f){var m=f.data,g=m.id,y=m.success,b=m.data,v=m.error,x=m.errorCode;if(g===e){o.cleanupTask(e);var w=Date.now()-i;s(y?{success:!0,data:b,duration:w}:{success:!1,error:v,errorCode:x,duration:w})}},d=function(f){o.cleanupTask(e),l(new Error("Worker error: ".concat(f.message)))};c.addEventListener("message",h),c.addEventListener("error",d);var p={id:e,input:t};t instanceof ArrayBuffer?c.postMessage(p,[t]):c.postMessage(p)})]})})},r.prototype.cleanupTask=function(e){var t=this.pendingTasks.get(e);t&&(clearTimeout(t.timeout),this.pendingTasks.delete(e))},r.prototype.generateTaskId=function(){return"task_".concat(++this.taskId,"_").concat(Date.now())},r.prototype.detectWorkerSupport=function(){return typeof Worker<"u"},r.prototype.getAvailableWorker=function(e){var t,n;try{for(var i=iM(this.workers),o=i.next();!o.done;o=i.next()){var a=oM(o.value,2),s=a[0],l=a[1];if(!l.isBusy)return l.isBusy=!0,l.worker}}catch(d){t={error:d}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}if(this.workers.size<this.config.maxConcurrentWorkers){var c=new Worker(e,{type:"module"}),u=this.generateWorkerId(),l={worker:c,isBusy:!0,id:u,createdAt:new Date};return this.workers.set(u,l),c}var h=Array.from(this.workers.values()).sort(function(d,p){return d.createdAt.getTime()-p.createdAt.getTime()})[0];return h.isBusy=!0,h.worker},r.prototype.releaseWorker=function(e){var t,n;try{for(var i=iM(this.workers),o=i.next();!o.done;o=i.next()){var a=oM(o.value,2),s=a[0],l=a[1];if(l.worker===e){l.isBusy=!1;break}}}catch(c){t={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},r.prototype.generateWorkerId=function(){return"worker_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9))},r.prototype.getStats=function(){return{totalWorkers:this.workers.size,busyWorkers:Array.from(this.workers.values()).filter(function(e){return e.isBusy}).length,pendingTasks:this.pendingTasks.size,config:this.config}},r.prototype.destroy=function(){var e,t,n,i;try{for(var o=iM(this.pendingTasks),a=o.next();!a.done;a=o.next()){var s=oM(a.value,2),l=s[0],c=s[1];clearTimeout(c.timeout),c.reject(new Error("Framework destroyed"))}}catch(m){e={error:m}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.pendingTasks.clear();try{for(var u=iM(this.workers),h=u.next();!h.done;h=u.next()){var d=oM(h.value,2),p=d[0],f=d[1];f.worker.terminate()}}catch(m){n={error:m}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}this.workers.clear()},r})(),uw=(function(){function r(e){this.framework=new cw(e)}return r.prototype.execute=function(e,t){return YD(this,void 0,void 0,function(){return $D(this,function(n){return[2,this.framework.execute(e,t)]})})},r.prototype.getStats=function(){return this.framework.getStats()},r.prototype.destroy=function(){this.framework.destroy()},r})()});var gH=W(()=>{mH();qO()});var yH=W(()=>{nO();oO();gH()});var gge,oy,KD,bH=W(()=>{tt();Fn();Gn();En();gge=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();(function(r){r[r.Vertex=0]="Vertex",r[r.CurveFitVertex=1]="CurveFitVertex",r[r.SplineFitVertex=8]="SplineFitVertex",r[r.SplineCtlVertex=9]="SplineCtlVertex"})(oy||(oy={}));KD=(function(r){gge(e,r);function e(){var t=r.call(this)||this;return t._position=new k,t._bulge=0,t._startWidth=0,t._endWidth=0,t._vertexType=oy.Vertex,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"VERTEX"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(t){this._position.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bulge",{get:function(){return this._bulge},set:function(t){this._bulge=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startWidth",{get:function(){return this._startWidth},set:function(t){this._startWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endWidth",{get:function(){return this._endWidth},set:function(t){this._endWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertexType",{get:function(){return this._vertexType},set:function(t){this._vertexType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return new De().expandByPoint(this._position)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push(this._position),t},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this._position),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){(t===ne.EndPoint||t===ne.Node)&&o.push(this._position)},e.prototype.transformBy=function(t){return this._position.applyMatrix4(t),this},e.prototype.subWorldDraw=function(t){},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDb2dVertex"),t.writePoint2d(10,this.position),t.writeDouble(40,this.startWidth),t.writeDouble(41,this.endWidth),t.writeDouble(42,this.bulge),t.writeInt16(70,this.vertexType),this},e.typeName="2dVertex",e})(bt)});var yge,ay,qD,vH=W(()=>{tt();Fn();Gn();En();yge=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();(function(r){r[r.SimpleVertex=0]="SimpleVertex",r[r.ControlVertex=1]="ControlVertex",r[r.FitVertex=2]="FitVertex"})(ay||(ay={}));qD=(function(r){yge(e,r);function e(){var t=r.call(this)||this;return t._position=new k,t._vertexType=ay.SimpleVertex,t}return Object.defineProperty(e.prototype,"dxfTypeName",{get:function(){return"VERTEX"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(t){this._position.copy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertexType",{get:function(){return this._vertexType},set:function(t){this._vertexType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometricExtents",{get:function(){return new De().expandByPoint(this._position)},enumerable:!1,configurable:!0}),e.prototype.subGetGripPoints=function(){var t=new Array;return t.push(this._position),t},e.prototype.subMoveGripPointsAt=function(t,n){return Tr(t,n,this._position),this},e.prototype.subGetOsnapPoints=function(t,n,i,o){(t===ne.EndPoint||t===ne.Node)&&o.push(this._position)},e.prototype.transformBy=function(t){return this._position.applyMatrix4(t),this},e.prototype.subWorldDraw=function(t){},e.prototype.dxfOutFields=function(t){return r.prototype.dxfOutFields.call(this,t),t.writeSubclassMarker("AcDbVertex"),t.writeSubclassMarker("AcDb3dPolylineVertex"),t.writePoint3d(10,this.position),t.writeInt16(70,this.vertexType|32),this},e.typeName="3dVertex",e})(bt)});var xH=W(()=>{ID();Z2();LD();DD();Nh();BD();ND();zD()});var wH=W(()=>{jD();bH();HD();MA();vH();OL();VL();kA();TA();gu();KL();no();qL();Gn();ZL();_3();i2();M3();b2();k3();C3();Cx();j3();M2();G3();K3();q3();u0();C2();$3();ul();W3();H3();E2();X3();Y3();J3();Q3();eD();XD();WD();xH()});var _H=W(()=>{rg();s3();mL();fL()});var hw,bge,vge,ZD,SH=W(()=>{Kb();gu();p0();mu();OA();hw=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bge=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},vge=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ZD=(function(){function r(e){this._btr=e}return r.prototype.isDynamicBlock=function(){var e,t;if(this.hasEnhancedBlockDictionary())return!0;var n=this.normalizeId(this._btr.objectId);if(!n||!this._btr.database)return!1;try{for(var i=hw(this._btr.database.tables.blockTable.newIterator()),o=i.next();!o.done;o=i.next()){var a=o.value;if(Eh(a.name)&&this.definitionIdFromBTag(a)===n)return!0}}catch(s){e={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return!1},r.prototype.getAnonymousBlockIds=function(){var e,t,n=this._btr.database;if(!n)return[];var i=this.normalizeId(this._btr.objectId);if(!i)return[];var o=new Set;try{for(var a=hw(n.tables.blockTable.newIterator()),s=a.next();!s.done;s=a.next()){var l=s.value;Eh(l.name)&&this.definitionIdFromBTag(l)===i&&o.add(l.objectId)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this.collectAnonymousIdsFromInserts(n,i,o),vge([],bge(o),!1)},r.prototype.hasEnhancedBlockDictionary=function(){var e=this._btr.extensionDictionary;if(!e||!this._btr.database)return!1;var t=this._btr.database.getObjectById(e);return t instanceof Wt?t.getAt(cl)!=null||t.has(cl):!1},r.prototype.definitionIdFromBTag=function(e){var t,n,i,o=e.getXData(mp);if(o)try{for(var a=hw(o),s=a.next();!s.done;s=a.next()){var l=s.value;if(Number(l.code)===Ki.ExtendedDataHandle){var c=String((i=l.value)!==null&&i!==void 0?i:"").trim();if(c)return this.normalizeId(c)}}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},r.prototype.collectAnonymousIdsFromInserts=function(e,t,n){var i,o,a,s,l;try{for(var c=hw(e.tables.blockTable.newIterator()),u=c.next();!u.done;u=c.next()){var h=u.value;if(!(!h.isModelSapce&&!h.isPaperSapce))try{for(var d=(a=void 0,hw(h.newIterator())),p=d.next();!p.done;p=d.next()){var f=p.value;if(f instanceof pn){var m=new gp(f);if(this.normalizeId((l=m.dynamicBlockTableRecord())!==null&&l!==void 0?l:"")===t){var g=m.anonymousBlockTableRecord();g&&n.add(g)}}}}catch(y){a={error:y}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}}}catch(y){i={error:y}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}},r.prototype.normalizeId=function(e){return String(e??"").trim().toUpperCase()},r})()});var AH=W(()=>{_H();mu();yO();OA();SH();vO();bO();wO();xO();AO();H0();KA();qA();MO();ZA();PO();X0()});var MH=W(()=>{pO();D0();$A();HA();fO()});var PH={};bre(PH,{ACAD_APPID:()=>Xm,ACAD_LAYERFILTERS_NAME:()=>Pp,ACCM_DEFAULT_UI_YIELD_BUDGET_MS:()=>Kc,ACDB_ANNOTATIVE_XDATA_APP:()=>m2,ACDB_COMPAREHATCH_DEFAULT:()=>yh,ACDB_COMPAREHATCH_MAX:()=>ou,ACDB_COMPAREHATCH_MIN:()=>iu,ACDB_COMPAREPROPS_COLOR:()=>iA,ACDB_COMPAREPROPS_DEFAULT:()=>r0,ACDB_COMPAREPROPS_LAYER:()=>oA,ACDB_COMPAREPROPS_LINETYPE:()=>aA,ACDB_COMPAREPROPS_LINETYPESCALE:()=>sA,ACDB_COMPAREPROPS_LINEWEIGHT:()=>lA,ACDB_COMPAREPROPS_MAX:()=>o0,ACDB_COMPAREPROPS_MIN:()=>i0,ACDB_COMPAREPROPS_THICKNESS:()=>uA,ACDB_COMPAREPROPS_TRANSPARENCY:()=>cA,ACDB_COMPARERCMARGIN_DEFAULT:()=>bh,ACDB_COMPARERCMARGIN_MAX:()=>su,ACDB_COMPARERCMARGIN_MIN:()=>au,ACDB_COMPARETEXT_DEFAULT:()=>vh,ACDB_COMPARETEXT_MAX:()=>cu,ACDB_COMPARETEXT_MIN:()=>lu,ACDB_COMPARETOLERANCE_DEFAULT:()=>xh,ACDB_COMPARETOLERANCE_MAX:()=>hu,ACDB_COMPARETOLERANCE_MIN:()=>uu,ACDB_DRAW_CIRCLE_SIDES_DRAFT:()=>xg,ACDB_DRAW_CIRCLE_SIDES_HIGH:()=>RO,ACDB_DRAW_CIRCLE_SIDES_STANDARD:()=>DO,ACDB_DXF_MTEXT_CHUNK_CHARS:()=>Zd,ACDB_DXF_XDATA_BINARY_MAX_BYTES:()=>Bv,ACDB_DXF_XDATA_STRING_MAX_BYTES:()=>Vm,ACDB_DYN_BLOCK_ENHANCED_BLOCK:()=>cl,ACDB_DYN_BLOCK_GUID_APP:()=>YL,ACDB_DYN_BLOCK_REPRESENTATION_DICT:()=>fu,ACDB_DYN_BLOCK_REP_BTAG_APP:()=>mp,ACDB_DYN_BLOCK_REP_DATA:()=>fp,ACDB_DYN_BLOCK_REP_ETAG_APP:()=>WL,ACDB_DYN_BLOCK_TRUE_NAME_APP:()=>XL,ACDB_GRIPCOLOR_DEFAULT:()=>e0,ACDB_GRIPCOLOR_MAX:()=>$m,ACDB_GRIPCOLOR_MIN:()=>Ym,ACDB_GRIPHOT_DEFAULT:()=>t0,ACDB_GRIPHOT_MAX:()=>qm,ACDB_GRIPHOT_MIN:()=>Km,ACDB_GRIPOBJLIMIT_MAX:()=>lL,ACDB_GRIPOBJLIMIT_MIN:()=>sL,ACDB_GRIPSIZE_DEFAULT:()=>n0,ACDB_GRIPSIZE_MAX:()=>Jm,ACDB_GRIPSIZE_MIN:()=>Zm,ACDB_GRIPS_MAX:()=>uL,ACDB_GRIPS_MIN:()=>cL,ACDB_OLE2FRAME_GEOMETRY_HEADER_SIZE:()=>Fg,ACDB_OLE_METAFILE_EMF_MIME:()=>rc,ACDB_OLE_METAFILE_WMF_MIME:()=>Iu,ACDB_PROXY_GRAPHIC_CHUNK_SIZE:()=>VA,ACDB_VIEWPORT_ANNOTATION_SCALE_XREC:()=>f2,ACGI_DARK_THEME_FOREGROUND:()=>tu,ACGI_LIGHT_THEME_FOREGROUND:()=>nu,ACGI_MODEL_SPACE_BACKGROUND:()=>cs,ACGI_PAPER_SPACE_BACKGROUND:()=>Hl,ACLY_DICTIONARY_NAME:()=>Au,ACTIVE_VPORT_NAME:()=>rl,AC_DB_SYSTEM_VARIABLE_NAMES:()=>JL,AcCmColor:()=>je,AcCmColorMethod:()=>Be,AcCmColorUtil:()=>qi,AcCmEntityColor:()=>Wk,AcCmErrors:()=>Qn,AcCmEventDispatcher:()=>Xk,AcCmEventManager:()=>wt,AcCmLoader:()=>uS,AcCmLoadingManager:()=>ev,AcCmObject:()=>pm,AcCmPerformanceCollector:()=>$c,AcCmTask:()=>Jb,AcCmTaskScheduler:()=>Qb,AcCmTransparency:()=>Mn,AcCmTransparencyMethod:()=>Pr,AcCmUiYieldGate:()=>$s,AcDb2dPolyline:()=>zh,AcDb2dVertex:()=>KD,AcDb2dVertexType:()=>oy,AcDb3PointAngularDimension:()=>Zg,AcDb3dPolyline:()=>aw,AcDb3dSolid:()=>hp,AcDb3dVertex:()=>qD,AcDb3dVertexType:()=>ay,AcDbAbstractViewTableRecord:()=>xp,AcDbAlignedDimension:()=>Ss,AcDbAngleUnits:()=>ar,AcDbArc:()=>ms,AcDbArcAlignedText:()=>c0,AcDbArcDimension:()=>ey,AcDbArcTextAlignment:()=>du,AcDbArcTextDirection:()=>Ph,AcDbArcTextPosition:()=>pp,AcDbAttribute:()=>Zl,AcDbAttributeDefinition:()=>h0,AcDbAttributeFlags:()=>on,AcDbAttributeMTextFlag:()=>kr,AcDbBaseWorker:()=>c2,AcDbBatchProcessing:()=>_0,AcDbBlockReference:()=>pn,AcDbBlockScaling:()=>tg,AcDbBlockTable:()=>ix,AcDbBlockTableRecord:()=>rn,AcDbBlockTableRecordFlag:()=>Kr,AcDbChangeApplier:()=>kg,AcDbChangeRecorder:()=>Ig,AcDbCircle:()=>Do,AcDbCodePage:()=>qd,AcDbCurve:()=>vn,AcDbDataGenerator:()=>Bp,AcDbDatabase:()=>ku,AcDbDatabaseConverter:()=>bp,AcDbDatabaseConverterManager:()=>J0,AcDbDatabaseTransaction:()=>Lg,AcDbDatabaseTransactionManager:()=>Dg,AcDbDiametricDimension:()=>ty,AcDbDictionary:()=>Wt,AcDbDictionaryVar:()=>yg,AcDbDimArrowType:()=>$x,AcDbDimStyleTable:()=>ax,AcDbDimStyleTableRecord:()=>ri,AcDbDimTextHorizontal:()=>dg,AcDbDimTextVertical:()=>Ch,AcDbDimVerticalJustification:()=>fg,AcDbDimZeroSuppression:()=>bu,AcDbDimZeroSuppressionAngular:()=>pg,AcDbDimension:()=>ho,AcDbDuplicateRecordCloning:()=>kp,AcDbDwgVersion:()=>Br,AcDbDxfCode:()=>Ki,AcDbDxfDocumentReader:()=>$0,AcDbDxfFiler:()=>el,AcDbDxfFilerStatus:()=>na,AcDbDxfObjectsReader:()=>Y0,AcDbDynBlockReference:()=>gp,AcDbDynBlockTableRecord:()=>ZD,AcDbEllipse:()=>Jl,AcDbEntity:()=>bt,AcDbFace:()=>b0,AcDbFcf:()=>vx,AcDbFileType:()=>Ri,AcDbFilter:()=>U0,AcDbFormatter:()=>rx,AcDbFrame:()=>Ux,AcDbGradientPatternType:()=>Ag,AcDbGroup:()=>z0,AcDbHatch:()=>Tu,AcDbHatchObjectType:()=>Ih,AcDbHatchPatternType:()=>Oa,AcDbHatchStyle:()=>zr,AcDbHostApplicationServices:()=>fA,AcDbIndex:()=>V0,AcDbIntersect:()=>il,AcDbLayerFilter:()=>j0,AcDbLayerIndex:()=>G0,AcDbLayerTable:()=>sx,AcDbLayerTableRecord:()=>aa,AcDbLayout:()=>ia,AcDbLayoutDictionary:()=>Tg,AcDbLayoutManager:()=>ig,AcDbLeader:()=>kx,AcDbLeaderAnnotationType:()=>Np,AcDbLine:()=>Bo,AcDbLineSpacingStyle:()=>Na,AcDbLinearUnits:()=>Cn,AcDbLinetypeTable:()=>lx,AcDbLinetypeTableRecord:()=>La,AcDbMLeader:()=>Lx,AcDbMLeaderContentType:()=>fn,AcDbMLeaderDirectionType:()=>Ix,AcDbMLeaderLineType:()=>lo,AcDbMLeaderStyle:()=>Mu,AcDbMLeaderTextAttachmentDirection:()=>Bg,AcDbMLine:()=>Oh,AcDbMLineFlags:()=>bs,AcDbMLineJustification:()=>No,AcDbMText:()=>Ro,AcDbMTextObjectContextData:()=>Cp,AcDbMlineStyle:()=>Ep,AcDbNativeDxfConverter:()=>Z0,AcDbObject:()=>Kt,AcDbObjectIterator:()=>hs,AcDbOle2Frame:()=>jx,AcDbOleFrame:()=>zp,AcDbOleObjectType:()=>zo,AcDbOleTileMode:()=>vs,AcDbOpenDatabaseError:()=>nc,AcDbOpenMode:()=>sl,AcDbOrdinateDimension:()=>ny,AcDbOsnapMode:()=>ne,AcDbPatParser:()=>H2,AcDbPatSvgRenderer:()=>X2,AcDbPlotPaperUnits:()=>op,AcDbPlotRotation:()=>ap,AcDbPlotSettings:()=>ng,AcDbPlotShadePlotResLevel:()=>lp,AcDbPlotShadePlotType:()=>al,AcDbPlotStdScaleType:()=>Ht,AcDbPlotType:()=>sp,AcDbPoint:()=>Up,AcDbPoly2dType:()=>za,AcDbPoly3dType:()=>pl,AcDbPolyFaceMesh:()=>sw,AcDbPolyFaceMeshFace:()=>tM,AcDbPolyFaceMeshVertex:()=>eM,AcDbPolygonMesh:()=>lw,AcDbPolygonMeshVertex:()=>nM,AcDbPolyline:()=>Dt,AcDbPredefinedAcadIsoPat:()=>Sg,AcDbPredefinedAcadPat:()=>r2,AcDbProxyEntity:()=>Vx,AcDbProxyGraphic:()=>Mp,AcDbProxyGraphicBitStream:()=>eg,AcDbProxyGraphicByteStream:()=>to,AcDbProxyGraphicEndOfBufferError:()=>ol,AcDbProxyGraphicType:()=>hn,AcDbRadialDimension:()=>ry,AcDbRasterImage:()=>hl,AcDbRasterImageClipBoundaryType:()=>Ug,AcDbRasterImageDef:()=>Tp,AcDbRasterImageImageDisplayOpt:()=>ic,AcDbRay:()=>oc,AcDbRegAppTable:()=>px,AcDbRegAppTableRecord:()=>Th,AcDbRegenerator:()=>S0,AcDbRenderingCache:()=>Nr,AcDbResultBuffer:()=>tl,AcDbRotatedDimension:()=>iy,AcDbScale:()=>Pu,AcDbShape:()=>Gx,AcDbSolid:()=>Hx,AcDbSortentsTable:()=>W0,AcDbSpline:()=>Ra,AcDbSymbolTable:()=>vr,AcDbSymbolTableRecord:()=>ni,AcDbSysVarManager:()=>gt,AcDbSystemVariables:()=>oe,AcDbTable:()=>Xx,AcDbText:()=>pu,AcDbTextHorizontalMode:()=>Oi,AcDbTextStyleTable:()=>cx,AcDbTextStyleTableRecord:()=>vu,AcDbTextVerticalMode:()=>ql,AcDbTrace:()=>jp,AcDbTransaction:()=>Lh,AcDbTransactionManager:()=>h2,AcDbUcsTable:()=>ux,AcDbUcsTableRecord:()=>E0,AcDbUndoStack:()=>Og,AcDbUnitsValue:()=>Ft,AcDbViewTable:()=>hx,AcDbViewTableRecord:()=>T0,AcDbViewport:()=>Ba,AcDbViewportTable:()=>dx,AcDbViewportTableRecord:()=>xu,AcDbWipeout:()=>Yx,AcDbWorkerApi:()=>uw,AcDbWorkerManager:()=>cw,AcDbXline:()=>Rh,AcDbXrecord:()=>Eu,AcGeArea2d:()=>pr,AcGeBox2d:()=>ct,AcGeBox3d:()=>De,AcGeCatmullRomCurve3d:()=>Om,AcGeCircArc2d:()=>Ke,AcGeCircArc3d:()=>Pn,AcGeCurve2d:()=>ea,AcGeEllipseArc2d:()=>ko,AcGeEllipseArc3d:()=>yi,AcGeEuler:()=>mS,AcGeGeometryUtil:()=>Rn,AcGeLine2d:()=>fr,AcGeLine3d:()=>Yn,AcGeLoop2d:()=>ta,AcGeMathUtil:()=>xe,AcGeMatrix2d:()=>Ks,AcGeMatrix3d:()=>Ie,AcGeNurbsCurve:()=>Qi,AcGePlane:()=>jl,AcGePoint2d:()=>Z,AcGePoint3d:()=>k,AcGePolyline2d:()=>Ot,AcGeQuaternion:()=>Ma,AcGeShape2d:()=>mh,AcGeSpline3d:()=>mr,AcGeTol:()=>Ce,AcGeVector2d:()=>Ut,AcGeVector3d:()=>G,AcGiArrowType:()=>ep,AcGiContext:()=>Gl,AcGiDefaultLightingType:()=>rp,AcGiLineWeight:()=>$r,AcGiMTextAttachmentPoint:()=>ut,AcGiMTextFlowDirection:()=>Cr,AcGiOrthographicType:()=>np,AcGiRenderMode:()=>tp,AcGiViewport:()=>qv,AcLyBoolExpr:()=>O0,AcLyLayerFilter:()=>_u,AcLyLayerFilterDialogResult:()=>gg,AcLyLayerFilterTree:()=>tc,AcLyLayerGroup:()=>R0,AcTrStringUtil:()=>Zk,ByBlock:()=>eo,ByLayer:()=>Vn,DEBUG_MODE:()=>lS,DEFAULT_ACGI_CONTEXT:()=>eL,DEFAULT_GRADIENT_HATCH_NAME:()=>Qv,DEFAULT_HATCH_PATTERN_IMPERIAL:()=>tL,DEFAULT_HATCH_PATTERN_METRIC:()=>Zv,DEFAULT_LINE_TYPE:()=>ka,DEFAULT_MLEADER_STYLE:()=>Oo,DEFAULT_MLINE_STYLE:()=>Lo,DEFAULT_TEXT_STYLE:()=>cn,DEFAULT_TOL:()=>Ji,DEG2RAD:()=>mm,DefaultLoadingManager:()=>fm,FLOAT_TOL:()=>Pt,HATCH_PATTERN_SOLID:()=>us,HATCH_PATTERN_USER:()=>Jv,MLIGHTCAD_APPID:()=>Wm,ORIGIN_POINT_2D:()=>hS,ORIGIN_POINT_3D:()=>hh,RAD2DEG:()=>gm,RAW_COLOR_TYPE_ACI:()=>Sp,RAW_COLOR_TYPE_BY_BLOCK:()=>kh,RAW_COLOR_TYPE_BY_LAYER:()=>wp,RAW_COLOR_TYPE_RGB:()=>_p,RAW_COLOR_TYPE_WINDOW_BG:()=>UA,TAU:()=>Ge,TEMP_OBJECT_ID_PREFIX:()=>nl,VPORT_FALLBACK_CENTER_2D:()=>nL,VPORT_FALLBACK_LLC:()=>rL,VPORT_FALLBACK_URC:()=>iL,VPORT_FALLBACK_VIEW_DIR:()=>oL,VPORT_FALLBACK_VIEW_TARGET:()=>aL,accmYieldForPaint:()=>zl,accmYieldToUi:()=>os,acdbAnnotativeModelHeight:()=>Ax,acdbAnnotativePaperHeight:()=>Sx,acdbAssignWorkingDatabase:()=>Yv,acdbBuildAnnotationScaleDrawInfo:()=>Ex,acdbChunkBinaryByMaxBytes:()=>zv,acdbChunkDxfMTextContents:()=>Fv,acdbChunkUtf8ByMaxBytes:()=>Nv,acdbCoerceIntegerSysVar:()=>ra,acdbCollectChangeEntities:()=>Fp,acdbCreateDxfPairReader:()=>Gv,acdbCreateEntityForDxfIn:()=>rM,acdbCreateWorkerApi:()=>aM,acdbDecodeMLeaderStyleRawColor:()=>sa,acdbDrawCircleSides:()=>t2,acdbDrawTessellateOptions:()=>ao,acdbDwgCodePageToEncoding:()=>Dv,acdbDxfInEntity:()=>vg,acdbDxfInHeader:()=>L0,acdbDxfValueType:()=>Qs,acdbEstimateDatabaseMemory:()=>T2,acdbExtractOleImageBlob:()=>zx,acdbFindScale:()=>wx,acdbFormatMemoryEstimate:()=>oD,acdbGetAnnotationScaleContexts:()=>_x,acdbGetViewportAnnotationScale:()=>Px,acdbGetWorkingDatabase:()=>$v,acdbHasOsnapMode:()=>cg,acdbHexStringsToBytes:()=>ip,acdbHostApplicationServices:()=>Fr,acdbImportDynBlockMetadata:()=>CD,acdbIntegerSysVarIfInRange:()=>wh,acdbIsAnnotativeObject:()=>xx,acdbIsAnonymousUserBlockName:()=>Eh,acdbIsBinaryDxf:()=>JS,acdbIsOleMetafileMimeType:()=>Ng,acdbIsSolidHatchPatternName:()=>ru,acdbLayerGroupsToResultBuffer:()=>N0,acdbLooksLikeEmf:()=>Dh,acdbLooksLikeWmf:()=>la,acdbMakeAsciiDxfPairReader:()=>jv,acdbMakeBinaryDxfPairReader:()=>Vv,acdbMakeUtf8AsciiDxfPairReader:()=>ZI,acdbMaskToOsnapModes:()=>lg,acdbMatchAnnotationScaleContext:()=>Mx,acdbNormalizeExtensionDictionaryId:()=>TD,acdbNormalizeTextEncoding:()=>Rv,acdbOleBlobNeedsMetafileRasterization:()=>Jx,acdbOsnapModesToMask:()=>l0,acdbParseArcAlignedNumber:()=>jL,acdbParseFilterXRecordData:()=>XA,acdbParseOle2FrameGeometryHeader:()=>Dx,acdbPeekDxfHeaderInfo:()=>QS,acdbPreviewIconToDataUrl:()=>Kg,acdbRasterizeOleMetafile:()=>Zx,acdbReadLayerFilterTree:()=>B0,acdbReassembleEmfFromWmfEscapes:()=>Rx,acdbResolveCircleSides:()=>BO,acdbResultBufferToLayerGroups:()=>gO,acdbSerializeLayerFilterTree:()=>F0,acdbSetHostApplicationServicesProvider:()=>Xv,acdbSetLayoutManagerFactory:()=>gL,acdbThumbnailImageToDataUrl:()=>PD,acdbToggleOsnapMode:()=>LL,acdbWriteFilterXRecordData:()=>YA,acgeBasisFunction:()=>Zs,acgeCalculateCurveLength:()=>Am,acgeCeilPowerOfTwo:()=>mv,acgeClamp:()=>ti,acgeComputeParameterValues:()=>Sv,acgeDamp:()=>iv,acgeDegToRad:()=>dv,acgeEuclideanModulo:()=>ym,acgeEvaluateNurbsPoint:()=>ph,acgeFloorPowerOfTwo:()=>gv,acgeGenerateAveragedKnots:()=>Av,acgeGenerateChordKnots:()=>vS,acgeGenerateSqrtChordKnots:()=>xS,acgeGenerateUUID:()=>tv,acgeGenerateUniformKnots:()=>bS,acgeGetOcsAngle:()=>To,acgeGetOcsReferenceVector:()=>Ea,acgeIntPartLength:()=>vm,acgeInterpolateControlPoints:()=>SS,acgeInterpolateNurbsCurve:()=>Hd,acgeInverseLerp:()=>rv,acgeIsAngleOnCcwSweep:()=>vv,acgeIsBetterDistanceAlign:()=>Cm,acgeIsBetween:()=>yv,acgeIsBetweenAngle:()=>bv,acgeIsPowerOfTwo:()=>fv,acgeLerp:()=>bm,acgeMapLinear:()=>nv,acgeNormalizeAngle:()=>Ul,acgePingpong:()=>ov,acgePointLiesOnCircle2d:()=>Pm,acgeRadToDeg:()=>pv,acgeRandFloat:()=>cv,acgeRandFloatSpread:()=>uv,acgeRandInt:()=>lv,acgeRelativeEps:()=>xv,acgeSameCircle2d:()=>Em,acgeSeededRandom:()=>hv,acgeSmootherstep:()=>sv,acgeSmoothstep:()=>av,acgeTransformOcsPointToWcs:()=>Er,acgeTransformWcsPointToOcs:()=>dr,acgiContrastingForegroundColor:()=>rA,acgiForegroundColorForBackground:()=>Ta,acgiIsLightBackground:()=>Wl,acgiResolveSubEntityTraitsRgbFromBackground:()=>Kv,clone:()=>Yc,deepClone:()=>Xc,defaults:()=>er,has:()=>qb,isEmpty:()=>Zb,isEqual:()=>is,log:()=>kt,setLogLevel:()=>qk});var sM=W(()=>{bL();fH();yH();Rg();wH();kD();AH();MH();zt();tt();Li()});sM();sM();var Ha={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},xl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},hW=0,OR=1,dW=2;var DR=1,pW=2,mc=3,ua=0,zi=1,Si=2,Yu=0,qp=1,RR=2,BR=3,FR=4,fW=5,Xh=100,mW=101,gW=102,yW=103,bW=104,vW=200,xW=201,wW=202,_W=203,zM=204,UM=205,SW=206,AW=207,MW=208,PW=209,EW=210,CW=211,TW=212,kW=213,IW=214,gP=0,yP=1,bP=2,Zp=3,vP=4,xP=5,wP=6,_P=7,NR=0,LW=1,OW=2,$u=0,DW=1,RW=2,BW=3,FW=4,NW=5,zW=6,UW=7;var zR=300,sf=301,lf=302,SP=303,AP=304,Zw=306,jM=1e3,bl=1001,VM=1002,Ur=1003,jW=1004;var Jw=1005;var xi=1006,MP=1007;var td=1008;var pa=1009,UR=1010,jR=1011,By=1012,PP=1013,nd=1014,Wa=1015,Fy=1016,EP=1017,CP=1018,cf=1020,VR=35902,GR=1021,HR=1022,oi=1023,WR=1024,XR=1025,Kp=1026,Jp=1027,TP=1028,kP=1029,YR=1030,IP=1031;var LP=1033,Qw=33776,e_=33777,t_=33778,n_=33779,OP=35840,DP=35841,RP=35842,BP=35843,FP=36196,NP=37492,zP=37496,UP=37808,jP=37809,VP=37810,GP=37811,HP=37812,WP=37813,XP=37814,YP=37815,$P=37816,KP=37817,qP=37818,ZP=37819,JP=37820,QP=37821,r_=36492,eE=36494,tE=36495,$R=36283,nE=36284,rE=36285,iE=36286;var Pw=2300,GM=2301,NM=2302,SR=2400,AR=2401,MR=2402;var VW=3200,GW=3201;var HW=0,WW=1,Es="",jo="srgb",Qp="srgb-linear",Ew="linear",zn="srgb";var $p=7680;var PR=519,XW=512,YW=513,$W=514,KR=515,KW=516,qW=517,ZW=518,JW=519,HM=35044,oE=35048;var qR="300 es",uc=2e3,Cw=2001,pc=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let i=this._listeners[e];if(i!==void 0){let o=i.indexOf(t);o!==-1&&i.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let n=this._listeners[e.type];if(n!==void 0){e.target=this;let i=n.slice(0);for(let o=0,a=i.length;o<a;o++)i[o].call(this,e);e.target=null}}},po=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],EH=1234567,_w=Math.PI/180,Py=180/Math.PI;function hc(){let r=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(po[r&255]+po[r>>8&255]+po[r>>16&255]+po[r>>24&255]+"-"+po[e&255]+po[e>>8&255]+"-"+po[e>>16&15|64]+po[e>>24&255]+"-"+po[t&63|128]+po[t>>8&255]+"-"+po[t>>16&255]+po[t>>24&255]+po[n&255]+po[n>>8&255]+po[n>>16&255]+po[n>>24&255]).toLowerCase()}function qt(r,e,t){return Math.max(e,Math.min(t,r))}function ZR(r,e){return(r%e+e)%e}function xge(r,e,t,n,i){return n+(r-e)*(i-n)/(t-e)}function wge(r,e,t){return r!==e?(t-r)/(e-r):0}function Sw(r,e,t){return(1-t)*r+t*e}function _ge(r,e,t,n){return Sw(r,e,1-Math.exp(-t*n))}function Sge(r,e=1){return e-Math.abs(ZR(r,e*2)-e)}function Age(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function Mge(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function Pge(r,e){return r+Math.floor(Math.random()*(e-r+1))}function Ege(r,e){return r+Math.random()*(e-r)}function Cge(r){return r*(.5-Math.random())}function Tge(r){r!==void 0&&(EH=r);let e=EH+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function kge(r){return r*_w}function Ige(r){return r*Py}function Lge(r){return(r&r-1)===0&&r!==0}function Oge(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function Dge(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function Rge(r,e,t,n,i){let o=Math.cos,a=Math.sin,s=o(t/2),l=a(t/2),c=o((e+n)/2),u=a((e+n)/2),h=o((e-n)/2),d=a((e-n)/2),p=o((n-e)/2),f=a((n-e)/2);switch(i){case"XYX":r.set(s*u,l*h,l*d,s*c);break;case"YZY":r.set(l*d,s*u,l*h,s*c);break;case"ZXZ":r.set(l*h,l*d,s*u,s*c);break;case"XZX":r.set(s*u,l*f,l*p,s*c);break;case"YXY":r.set(l*p,s*u,l*f,s*c);break;case"ZYZ":r.set(l*f,l*p,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function yl(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Nn(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var uf={DEG2RAD:_w,RAD2DEG:Py,generateUUID:hc,clamp:qt,euclideanModulo:ZR,mapLinear:xge,inverseLerp:wge,lerp:Sw,damp:_ge,pingpong:Sge,smoothstep:Age,smootherstep:Mge,randInt:Pge,randFloat:Ege,randFloatSpread:Cge,seededRandom:Tge,degToRad:kge,radToDeg:Ige,isPowerOfTwo:Lge,ceilPowerOfTwo:Oge,floorPowerOfTwo:Dge,setQuaternionFromProperEuler:Rge,normalize:Nn,denormalize:yl},Le=class r{constructor(e=0,t=0){r.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=qt(this.x,e.x,t.x),this.y=qt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=qt(this.x,e,t),this.y=qt(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(qt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(qt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),i=Math.sin(t),o=this.x-e.x,a=this.y-e.y;return this.x=o*n-a*i+e.x,this.y=o*i+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Xt=class r{constructor(e,t,n,i,o,a,s,l,c){r.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,o,a,s,l,c)}set(e,t,n,i,o,a,s,l,c){let u=this.elements;return u[0]=e,u[1]=i,u[2]=s,u[3]=t,u[4]=o,u[5]=l,u[6]=n,u[7]=a,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,o=this.elements,a=n[0],s=n[3],l=n[6],c=n[1],u=n[4],h=n[7],d=n[2],p=n[5],f=n[8],m=i[0],g=i[3],y=i[6],b=i[1],v=i[4],x=i[7],w=i[2],_=i[5],A=i[8];return o[0]=a*m+s*b+l*w,o[3]=a*g+s*v+l*_,o[6]=a*y+s*x+l*A,o[1]=c*m+u*b+h*w,o[4]=c*g+u*v+h*_,o[7]=c*y+u*x+h*A,o[2]=d*m+p*b+f*w,o[5]=d*g+p*v+f*_,o[8]=d*y+p*x+f*A,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8];return t*a*u-t*s*c-n*o*u+n*s*l+i*o*c-i*a*l}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=u*a-s*c,d=s*l-u*o,p=c*o-a*l,f=t*h+n*d+i*p;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/f;return e[0]=h*m,e[1]=(i*c-u*n)*m,e[2]=(s*n-i*a)*m,e[3]=d*m,e[4]=(u*t-i*l)*m,e[5]=(i*o-s*t)*m,e[6]=p*m,e[7]=(n*l-c*t)*m,e[8]=(a*t-n*o)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,o,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+e,-i*c,i*l,-i*(-c*a+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(JD.makeScale(e,t)),this}rotate(e){return this.premultiply(JD.makeRotation(-e)),this}translate(e,t){return this.premultiply(JD.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},JD=new Xt;function JR(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function Ey(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function QW(){let r=Ey("canvas");return r.style.display="block",r}var CH={};function hf(r){r in CH||(CH[r]=!0,console.warn(r))}function eX(r,e,t){return new Promise(function(n,i){function o(){switch(r.clientWaitSync(e,r.SYNC_FLUSH_COMMANDS_BIT,0)){case r.WAIT_FAILED:i();break;case r.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}function tX(r){let e=r.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function nX(r){let e=r.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}var TH=new Xt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),kH=new Xt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Bge(){let r={enabled:!0,workingColorSpace:Qp,spaces:{},convert:function(i,o,a){return this.enabled===!1||o===a||!o||!a||(this.spaces[o].transfer===zn&&(i.r=ju(i.r),i.g=ju(i.g),i.b=ju(i.b)),this.spaces[o].primaries!==this.spaces[a].primaries&&(i.applyMatrix3(this.spaces[o].toXYZ),i.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===zn&&(i.r=My(i.r),i.g=My(i.g),i.b=My(i.b))),i},fromWorkingColorSpace:function(i,o){return this.convert(i,this.workingColorSpace,o)},toWorkingColorSpace:function(i,o){return this.convert(i,o,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Es?Ew:this.spaces[i].transfer},getLuminanceCoefficients:function(i,o=this.workingColorSpace){return i.fromArray(this.spaces[o].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,o,a){return i.copy(this.spaces[o].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return r.define({[Qp]:{primaries:e,whitePoint:n,transfer:Ew,toXYZ:TH,fromXYZ:kH,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:jo},outputColorSpaceConfig:{drawingBufferColorSpace:jo}},[jo]:{primaries:e,whitePoint:n,transfer:zn,toXYZ:TH,fromXYZ:kH,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:jo}}}),r}var wn=Bge();function ju(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function My(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var sy,WM=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{sy===void 0&&(sy=Ey("canvas")),sy.width=e.width,sy.height=e.height;let n=sy.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=sy}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=Ey("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let i=n.getImageData(0,0,e.width,e.height),o=i.data;for(let a=0;a<o.length;a++)o[a]=ju(o[a]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(ju(t[n]/255)*255):t[n]=ju(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},Fge=0,Tw=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Fge++}),this.uuid=hc(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let o;if(Array.isArray(i)){o=[];for(let a=0,s=i.length;a<s;a++)i[a].isDataTexture?o.push(QD(i[a].image)):o.push(QD(i[a]))}else o=QD(i);n.url=o}return t||(e.images[this.uuid]=n),n}};function QD(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?WM.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Nge=0,wi=class r extends pc{constructor(e=r.DEFAULT_IMAGE,t=r.DEFAULT_MAPPING,n=bl,i=bl,o=xi,a=td,s=oi,l=pa,c=r.DEFAULT_ANISOTROPY,u=Es){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Nge++}),this.uuid=hc(),this.name="",this.source=new Tw(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=o,this.minFilter=a,this.anisotropy=c,this.format=s,this.internalFormat=null,this.type=l,this.offset=new Le(0,0),this.repeat=new Le(1,1),this.center=new Le(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Xt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==zR)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case jM:e.x=e.x-Math.floor(e.x);break;case bl:e.x=e.x<0?0:1;break;case VM:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case jM:e.y=e.y-Math.floor(e.y);break;case bl:e.y=e.y<0?0:1;break;case VM:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};wi.DEFAULT_IMAGE=null;wi.DEFAULT_MAPPING=zR;wi.DEFAULT_ANISOTROPY=1;var yn=class r{constructor(e=0,t=0,n=0,i=1){r.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,o=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*o,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*o,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*o,this.w=a[3]*t+a[7]*n+a[11]*i+a[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,o,l=e.elements,c=l[0],u=l[4],h=l[8],d=l[1],p=l[5],f=l[9],m=l[2],g=l[6],y=l[10];if(Math.abs(u-d)<.01&&Math.abs(h-m)<.01&&Math.abs(f-g)<.01){if(Math.abs(u+d)<.1&&Math.abs(h+m)<.1&&Math.abs(f+g)<.1&&Math.abs(c+p+y-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let v=(c+1)/2,x=(p+1)/2,w=(y+1)/2,_=(u+d)/4,A=(h+m)/4,E=(f+g)/4;return v>x&&v>w?v<.01?(n=0,i=.707106781,o=.707106781):(n=Math.sqrt(v),i=_/n,o=A/n):x>w?x<.01?(n=.707106781,i=0,o=.707106781):(i=Math.sqrt(x),n=_/i,o=E/i):w<.01?(n=.707106781,i=.707106781,o=0):(o=Math.sqrt(w),n=A/o,i=E/o),this.set(n,i,o,t),this}let b=Math.sqrt((g-f)*(g-f)+(h-m)*(h-m)+(d-u)*(d-u));return Math.abs(b)<.001&&(b=1),this.x=(g-f)/b,this.y=(h-m)/b,this.z=(d-u)/b,this.w=Math.acos((c+p+y-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=qt(this.x,e.x,t.x),this.y=qt(this.y,e.y,t.y),this.z=qt(this.z,e.z,t.z),this.w=qt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=qt(this.x,e,t),this.y=qt(this.y,e,t),this.z=qt(this.z,e,t),this.w=qt(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(qt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},XM=class extends pc{constructor(e=1,t=1,n={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new yn(0,0,e,t),this.scissorTest=!1,this.viewport=new yn(0,0,e,t);let i={width:e,height:t,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:xi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let o=new wi(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);o.flipY=!1,o.generateMipmaps=n.generateMipmaps,o.internalFormat=n.internalFormat,this.textures=[];let a=n.count;for(let s=0;s<a;s++)this.textures[s]=o.clone(),this.textures[s].isRenderTargetTexture=!0,this.textures[s].renderTarget=this;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,o=this.textures.length;i<o;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let n=0,i=e.textures.length;n<i;n++)this.textures[n]=e.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0,this.textures[n].renderTarget=this;let t=Object.assign({},e.texture.image);return this.texture.source=new Tw(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Go=class extends XM{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},kw=class extends wi{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=Ur,this.minFilter=Ur,this.wrapR=bl,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var YM=class extends wi{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=Ur,this.minFilter=Ur,this.wrapR=bl,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var ha=class{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,o,a,s){let l=n[i+0],c=n[i+1],u=n[i+2],h=n[i+3],d=o[a+0],p=o[a+1],f=o[a+2],m=o[a+3];if(s===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h;return}if(s===1){e[t+0]=d,e[t+1]=p,e[t+2]=f,e[t+3]=m;return}if(h!==m||l!==d||c!==p||u!==f){let g=1-s,y=l*d+c*p+u*f+h*m,b=y>=0?1:-1,v=1-y*y;if(v>Number.EPSILON){let w=Math.sqrt(v),_=Math.atan2(w,y*b);g=Math.sin(g*_)/w,s=Math.sin(s*_)/w}let x=s*b;if(l=l*g+d*x,c=c*g+p*x,u=u*g+f*x,h=h*g+m*x,g===1-s){let w=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=w,c*=w,u*=w,h*=w}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,i,o,a){let s=n[i],l=n[i+1],c=n[i+2],u=n[i+3],h=o[a],d=o[a+1],p=o[a+2],f=o[a+3];return e[t]=s*f+u*h+l*p-c*d,e[t+1]=l*f+u*d+c*h-s*p,e[t+2]=c*f+u*p+s*d-l*h,e[t+3]=u*f-s*h-l*d-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,i=e._y,o=e._z,a=e._order,s=Math.cos,l=Math.sin,c=s(n/2),u=s(i/2),h=s(o/2),d=l(n/2),p=l(i/2),f=l(o/2);switch(a){case"XYZ":this._x=d*u*h+c*p*f,this._y=c*p*h-d*u*f,this._z=c*u*f+d*p*h,this._w=c*u*h-d*p*f;break;case"YXZ":this._x=d*u*h+c*p*f,this._y=c*p*h-d*u*f,this._z=c*u*f-d*p*h,this._w=c*u*h+d*p*f;break;case"ZXY":this._x=d*u*h-c*p*f,this._y=c*p*h+d*u*f,this._z=c*u*f+d*p*h,this._w=c*u*h-d*p*f;break;case"ZYX":this._x=d*u*h-c*p*f,this._y=c*p*h+d*u*f,this._z=c*u*f-d*p*h,this._w=c*u*h+d*p*f;break;case"YZX":this._x=d*u*h+c*p*f,this._y=c*p*h+d*u*f,this._z=c*u*f-d*p*h,this._w=c*u*h-d*p*f;break;case"XZY":this._x=d*u*h-c*p*f,this._y=c*p*h-d*u*f,this._z=c*u*f+d*p*h,this._w=c*u*h+d*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],i=t[4],o=t[8],a=t[1],s=t[5],l=t[9],c=t[2],u=t[6],h=t[10],d=n+s+h;if(d>0){let p=.5/Math.sqrt(d+1);this._w=.25/p,this._x=(u-l)*p,this._y=(o-c)*p,this._z=(a-i)*p}else if(n>s&&n>h){let p=2*Math.sqrt(1+n-s-h);this._w=(u-l)/p,this._x=.25*p,this._y=(i+a)/p,this._z=(o+c)/p}else if(s>h){let p=2*Math.sqrt(1+s-n-h);this._w=(o-c)/p,this._x=(i+a)/p,this._y=.25*p,this._z=(l+u)/p}else{let p=2*Math.sqrt(1+h-n-s);this._w=(a-i)/p,this._x=(o+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(qt(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,i=e._y,o=e._z,a=e._w,s=t._x,l=t._y,c=t._z,u=t._w;return this._x=n*u+a*s+i*c-o*l,this._y=i*u+a*l+o*s-n*c,this._z=o*u+a*c+n*l-i*s,this._w=a*u-n*s-i*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let n=this._x,i=this._y,o=this._z,a=this._w,s=a*e._w+n*e._x+i*e._y+o*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=n,this._y=i,this._z=o,this;let l=1-s*s;if(l<=Number.EPSILON){let p=1-t;return this._w=p*a+t*this._w,this._x=p*n+t*this._x,this._y=p*i+t*this._y,this._z=p*o+t*this._z,this.normalize(),this}let c=Math.sqrt(l),u=Math.atan2(c,s),h=Math.sin((1-t)*u)/c,d=Math.sin(t*u)/c;return this._w=a*h+this._w*d,this._x=n*h+this._x*d,this._y=i*h+this._y*d,this._z=o*h+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},U=class r{constructor(e=0,t=0,n=0){r.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(IH.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(IH.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*i,this.y=o[1]*t+o[4]*n+o[7]*i,this.z=o[2]*t+o[5]*n+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,o=e.elements,a=1/(o[3]*t+o[7]*n+o[11]*i+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*i+o[12])*a,this.y=(o[1]*t+o[5]*n+o[9]*i+o[13])*a,this.z=(o[2]*t+o[6]*n+o[10]*i+o[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,i=this.z,o=e.x,a=e.y,s=e.z,l=e.w,c=2*(a*i-s*n),u=2*(s*t-o*i),h=2*(o*n-a*t);return this.x=t+l*c+a*h-s*u,this.y=n+l*u+s*c-o*h,this.z=i+l*h+o*u-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,i=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i,this.y=o[1]*t+o[5]*n+o[9]*i,this.z=o[2]*t+o[6]*n+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=qt(this.x,e.x,t.x),this.y=qt(this.y,e.y,t.y),this.z=qt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=qt(this.x,e,t),this.y=qt(this.y,e,t),this.z=qt(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(qt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,i=e.y,o=e.z,a=t.x,s=t.y,l=t.z;return this.x=i*l-o*s,this.y=o*a-n*l,this.z=n*s-i*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return eR.copy(this).projectOnVector(e),this.sub(eR)}reflect(e){return this.sub(eR.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(qt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},eR=new U,IH=new ha,Ne=class{constructor(e=new U(1/0,1/0,1/0),t=new U(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(fl.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(fl.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=fl.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let a=0,s=o.count;a<s;a++)e.isMesh===!0?e.getVertexPosition(a,fl):fl.fromBufferAttribute(o,a),fl.applyMatrix4(e.matrixWorld),this.expandByPoint(fl);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),lM.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),lM.copy(n.boundingBox)),lM.applyMatrix4(e.matrixWorld),this.union(lM)}let i=e.children;for(let o=0,a=i.length;o<a;o++)this.expandByObject(i[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,fl),fl.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(dw),cM.subVectors(this.max,dw),ly.subVectors(e.a,dw),cy.subVectors(e.b,dw),uy.subVectors(e.c,dw),Uh.subVectors(cy,ly),jh.subVectors(uy,cy),Hp.subVectors(ly,uy);let t=[0,-Uh.z,Uh.y,0,-jh.z,jh.y,0,-Hp.z,Hp.y,Uh.z,0,-Uh.x,jh.z,0,-jh.x,Hp.z,0,-Hp.x,-Uh.y,Uh.x,0,-jh.y,jh.x,0,-Hp.y,Hp.x,0];return!tR(t,ly,cy,uy,cM)||(t=[1,0,0,0,1,0,0,0,1],!tR(t,ly,cy,uy,cM))?!1:(uM.crossVectors(Uh,jh),t=[uM.x,uM.y,uM.z],tR(t,ly,cy,uy,cM))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fl).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(fl).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Du[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Du[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Du[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Du[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Du[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Du[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Du[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Du[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Du),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},Du=[new U,new U,new U,new U,new U,new U,new U,new U],fl=new U,lM=new Ne,ly=new U,cy=new U,uy=new U,Uh=new U,jh=new U,Hp=new U,dw=new U,cM=new U,uM=new U,Wp=new U;function tR(r,e,t,n,i){for(let o=0,a=r.length-3;o<=a;o+=3){Wp.fromArray(r,o);let s=i.x*Math.abs(Wp.x)+i.y*Math.abs(Wp.y)+i.z*Math.abs(Wp.z),l=e.dot(Wp),c=t.dot(Wp),u=n.dot(Wp);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>s)return!1}return!0}var zge=new Ne,pw=new U,nR=new U,Lr=class{constructor(e=new U,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):zge.setFromPoints(e).getCenter(n);let i=0;for(let o=0,a=e.length;o<a;o++)i=Math.max(i,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;pw.subVectors(e,this.center);let t=pw.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(pw,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(nR.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(pw.copy(e.center).add(nR)),this.expandByPoint(pw.copy(e.center).sub(nR))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}},Ru=new U,rR=new U,hM=new U,Vh=new U,iR=new U,dM=new U,oR=new U,Vu=class{constructor(e=new U,t=new U(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Ru)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Ru.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ru.copy(this.origin).addScaledVector(this.direction,t),Ru.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){rR.copy(e).add(t).multiplyScalar(.5),hM.copy(t).sub(e).normalize(),Vh.copy(this.origin).sub(rR);let o=e.distanceTo(t)*.5,a=-this.direction.dot(hM),s=Vh.dot(this.direction),l=-Vh.dot(hM),c=Vh.lengthSq(),u=Math.abs(1-a*a),h,d,p,f;if(u>0)if(h=a*l-s,d=a*s-l,f=o*u,h>=0)if(d>=-f)if(d<=f){let m=1/u;h*=m,d*=m,p=h*(h+a*d+2*s)+d*(a*h+d+2*l)+c}else d=o,h=Math.max(0,-(a*d+s)),p=-h*h+d*(d+2*l)+c;else d=-o,h=Math.max(0,-(a*d+s)),p=-h*h+d*(d+2*l)+c;else d<=-f?(h=Math.max(0,-(-a*o+s)),d=h>0?-o:Math.min(Math.max(-o,-l),o),p=-h*h+d*(d+2*l)+c):d<=f?(h=0,d=Math.min(Math.max(-o,-l),o),p=d*(d+2*l)+c):(h=Math.max(0,-(a*o+s)),d=h>0?o:Math.min(Math.max(-o,-l),o),p=-h*h+d*(d+2*l)+c);else d=a>0?-o:o,h=Math.max(0,-(a*d+s)),p=-h*h+d*(d+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(rR).addScaledVector(hM,d),p}intersectSphere(e,t){Ru.subVectors(e.center,this.origin);let n=Ru.dot(this.direction),i=Ru.dot(Ru)-n*n,o=e.radius*e.radius;if(i>o)return null;let a=Math.sqrt(o-i),s=n-a,l=n+a;return l<0?null:s<0?this.at(l,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,o,a,s,l,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,i=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,i=(e.min.x-d.x)*c),u>=0?(o=(e.min.y-d.y)*u,a=(e.max.y-d.y)*u):(o=(e.max.y-d.y)*u,a=(e.min.y-d.y)*u),n>a||o>i||((o>n||isNaN(n))&&(n=o),(a<i||isNaN(i))&&(i=a),h>=0?(s=(e.min.z-d.z)*h,l=(e.max.z-d.z)*h):(s=(e.max.z-d.z)*h,l=(e.min.z-d.z)*h),n>l||s>i)||((s>n||n!==n)&&(n=s),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,Ru)!==null}intersectTriangle(e,t,n,i,o){iR.subVectors(t,e),dM.subVectors(n,e),oR.crossVectors(iR,dM);let a=this.direction.dot(oR),s;if(a>0){if(i)return null;s=1}else if(a<0)s=-1,a=-a;else return null;Vh.subVectors(this.origin,e);let l=s*this.direction.dot(dM.crossVectors(Vh,dM));if(l<0)return null;let c=s*this.direction.dot(iR.cross(Vh));if(c<0||l+c>a)return null;let u=-s*Vh.dot(oR);return u<0?null:this.at(u/a,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},vt=class r{constructor(e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g){r.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g)}set(e,t,n,i,o,a,s,l,c,u,h,d,p,f,m,g){let y=this.elements;return y[0]=e,y[4]=t,y[8]=n,y[12]=i,y[1]=o,y[5]=a,y[9]=s,y[13]=l,y[2]=c,y[6]=u,y[10]=h,y[14]=d,y[3]=p,y[7]=f,y[11]=m,y[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new r().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,i=1/hy.setFromMatrixColumn(e,0).length(),o=1/hy.setFromMatrixColumn(e,1).length(),a=1/hy.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,i=e.y,o=e.z,a=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),h=Math.sin(o);if(e.order==="XYZ"){let d=a*u,p=a*h,f=s*u,m=s*h;t[0]=l*u,t[4]=-l*h,t[8]=c,t[1]=p+f*c,t[5]=d-m*c,t[9]=-s*l,t[2]=m-d*c,t[6]=f+p*c,t[10]=a*l}else if(e.order==="YXZ"){let d=l*u,p=l*h,f=c*u,m=c*h;t[0]=d+m*s,t[4]=f*s-p,t[8]=a*c,t[1]=a*h,t[5]=a*u,t[9]=-s,t[2]=p*s-f,t[6]=m+d*s,t[10]=a*l}else if(e.order==="ZXY"){let d=l*u,p=l*h,f=c*u,m=c*h;t[0]=d-m*s,t[4]=-a*h,t[8]=f+p*s,t[1]=p+f*s,t[5]=a*u,t[9]=m-d*s,t[2]=-a*c,t[6]=s,t[10]=a*l}else if(e.order==="ZYX"){let d=a*u,p=a*h,f=s*u,m=s*h;t[0]=l*u,t[4]=f*c-p,t[8]=d*c+m,t[1]=l*h,t[5]=m*c+d,t[9]=p*c-f,t[2]=-c,t[6]=s*l,t[10]=a*l}else if(e.order==="YZX"){let d=a*l,p=a*c,f=s*l,m=s*c;t[0]=l*u,t[4]=m-d*h,t[8]=f*h+p,t[1]=h,t[5]=a*u,t[9]=-s*u,t[2]=-c*u,t[6]=p*h+f,t[10]=d-m*h}else if(e.order==="XZY"){let d=a*l,p=a*c,f=s*l,m=s*c;t[0]=l*u,t[4]=-h,t[8]=c*u,t[1]=d*h+m,t[5]=a*u,t[9]=p*h-f,t[2]=f*h-p,t[6]=s*u,t[10]=m*h+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Uge,e,jge)}lookAt(e,t,n){let i=this.elements;return Ua.subVectors(e,t),Ua.lengthSq()===0&&(Ua.z=1),Ua.normalize(),Gh.crossVectors(n,Ua),Gh.lengthSq()===0&&(Math.abs(n.z)===1?Ua.x+=1e-4:Ua.z+=1e-4,Ua.normalize(),Gh.crossVectors(n,Ua)),Gh.normalize(),pM.crossVectors(Ua,Gh),i[0]=Gh.x,i[4]=pM.x,i[8]=Ua.x,i[1]=Gh.y,i[5]=pM.y,i[9]=Ua.y,i[2]=Gh.z,i[6]=pM.z,i[10]=Ua.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,o=this.elements,a=n[0],s=n[4],l=n[8],c=n[12],u=n[1],h=n[5],d=n[9],p=n[13],f=n[2],m=n[6],g=n[10],y=n[14],b=n[3],v=n[7],x=n[11],w=n[15],_=i[0],A=i[4],E=i[8],S=i[12],M=i[1],T=i[5],L=i[9],O=i[13],D=i[2],z=i[6],N=i[10],J=i[14],X=i[3],Q=i[7],ce=i[11],H=i[15];return o[0]=a*_+s*M+l*D+c*X,o[4]=a*A+s*T+l*z+c*Q,o[8]=a*E+s*L+l*N+c*ce,o[12]=a*S+s*O+l*J+c*H,o[1]=u*_+h*M+d*D+p*X,o[5]=u*A+h*T+d*z+p*Q,o[9]=u*E+h*L+d*N+p*ce,o[13]=u*S+h*O+d*J+p*H,o[2]=f*_+m*M+g*D+y*X,o[6]=f*A+m*T+g*z+y*Q,o[10]=f*E+m*L+g*N+y*ce,o[14]=f*S+m*O+g*J+y*H,o[3]=b*_+v*M+x*D+w*X,o[7]=b*A+v*T+x*z+w*Q,o[11]=b*E+v*L+x*N+w*ce,o[15]=b*S+v*O+x*J+w*H,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],i=e[8],o=e[12],a=e[1],s=e[5],l=e[9],c=e[13],u=e[2],h=e[6],d=e[10],p=e[14],f=e[3],m=e[7],g=e[11],y=e[15];return f*(+o*l*h-i*c*h-o*s*d+n*c*d+i*s*p-n*l*p)+m*(+t*l*p-t*c*d+o*a*d-i*a*p+i*c*u-o*l*u)+g*(+t*c*h-t*s*p-o*a*h+n*a*p+o*s*u-n*c*u)+y*(-i*s*u-t*l*h+t*s*d+i*a*h-n*a*d+n*l*u)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],p=e[11],f=e[12],m=e[13],g=e[14],y=e[15],b=h*g*c-m*d*c+m*l*p-s*g*p-h*l*y+s*d*y,v=f*d*c-u*g*c-f*l*p+a*g*p+u*l*y-a*d*y,x=u*m*c-f*h*c+f*s*p-a*m*p-u*s*y+a*h*y,w=f*h*l-u*m*l-f*s*d+a*m*d+u*s*g-a*h*g,_=t*b+n*v+i*x+o*w;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let A=1/_;return e[0]=b*A,e[1]=(m*d*o-h*g*o-m*i*p+n*g*p+h*i*y-n*d*y)*A,e[2]=(s*g*o-m*l*o+m*i*c-n*g*c-s*i*y+n*l*y)*A,e[3]=(h*l*o-s*d*o-h*i*c+n*d*c+s*i*p-n*l*p)*A,e[4]=v*A,e[5]=(u*g*o-f*d*o+f*i*p-t*g*p-u*i*y+t*d*y)*A,e[6]=(f*l*o-a*g*o-f*i*c+t*g*c+a*i*y-t*l*y)*A,e[7]=(a*d*o-u*l*o+u*i*c-t*d*c-a*i*p+t*l*p)*A,e[8]=x*A,e[9]=(f*h*o-u*m*o-f*n*p+t*m*p+u*n*y-t*h*y)*A,e[10]=(a*m*o-f*s*o+f*n*c-t*m*c-a*n*y+t*s*y)*A,e[11]=(u*s*o-a*h*o-u*n*c+t*h*c+a*n*p-t*s*p)*A,e[12]=w*A,e[13]=(u*m*i-f*h*i+f*n*d-t*m*d-u*n*g+t*h*g)*A,e[14]=(f*s*i-a*m*i-f*n*l+t*m*l+a*n*g-t*s*g)*A,e[15]=(a*h*i-u*s*i+u*n*l-t*h*l-a*n*d+t*s*d)*A,this}scale(e){let t=this.elements,n=e.x,i=e.y,o=e.z;return t[0]*=n,t[4]*=i,t[8]*=o,t[1]*=n,t[5]*=i,t[9]*=o,t[2]*=n,t[6]*=i,t[10]*=o,t[3]*=n,t[7]*=i,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),i=Math.sin(t),o=1-n,a=e.x,s=e.y,l=e.z,c=o*a,u=o*s;return this.set(c*a+n,c*s-i*l,c*l+i*s,0,c*s+i*l,u*s+n,u*l-i*a,0,c*l-i*s,u*l+i*a,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,o,a){return this.set(1,n,o,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){let i=this.elements,o=t._x,a=t._y,s=t._z,l=t._w,c=o+o,u=a+a,h=s+s,d=o*c,p=o*u,f=o*h,m=a*u,g=a*h,y=s*h,b=l*c,v=l*u,x=l*h,w=n.x,_=n.y,A=n.z;return i[0]=(1-(m+y))*w,i[1]=(p+x)*w,i[2]=(f-v)*w,i[3]=0,i[4]=(p-x)*_,i[5]=(1-(d+y))*_,i[6]=(g+b)*_,i[7]=0,i[8]=(f+v)*A,i[9]=(g-b)*A,i[10]=(1-(d+m))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){let i=this.elements,o=hy.set(i[0],i[1],i[2]).length(),a=hy.set(i[4],i[5],i[6]).length(),s=hy.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],ml.copy(this);let c=1/o,u=1/a,h=1/s;return ml.elements[0]*=c,ml.elements[1]*=c,ml.elements[2]*=c,ml.elements[4]*=u,ml.elements[5]*=u,ml.elements[6]*=u,ml.elements[8]*=h,ml.elements[9]*=h,ml.elements[10]*=h,t.setFromRotationMatrix(ml),n.x=o,n.y=a,n.z=s,this}makePerspective(e,t,n,i,o,a,s=uc){let l=this.elements,c=2*o/(t-e),u=2*o/(n-i),h=(t+e)/(t-e),d=(n+i)/(n-i),p,f;if(s===uc)p=-(a+o)/(a-o),f=-2*a*o/(a-o);else if(s===Cw)p=-a/(a-o),f=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=f,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,o,a,s=uc){let l=this.elements,c=1/(t-e),u=1/(n-i),h=1/(a-o),d=(t+e)*c,p=(n+i)*u,f,m;if(s===uc)f=(a+o)*h,m=-2*h;else if(s===Cw)f=o*h,m=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=m,l[14]=-f,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},hy=new U,ml=new vt,Uge=new U(0,0,0),jge=new U(1,1,1),Gh=new U,pM=new U,Ua=new U,LH=new vt,OH=new ha,da=class r{constructor(e=0,t=0,n=0,i=r.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],c=i[5],u=i[9],h=i[2],d=i[6],p=i[10];switch(t){case"XYZ":this._y=Math.asin(qt(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-qt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(qt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-qt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(qt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,p));break;case"XZY":this._z=Math.asin(-qt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return LH.makeRotationFromQuaternion(e),this.setFromRotationMatrix(LH,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return OH.setFromEuler(this),this.setFromQuaternion(OH,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};da.DEFAULT_ORDER="XYZ";var Cy=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},Vge=0,DH=new U,dy=new ha,Bu=new vt,fM=new U,fw=new U,Gge=new U,Hge=new ha,RH=new U(1,0,0),BH=new U(0,1,0),FH=new U(0,0,1),NH={type:"added"},Wge={type:"removed"},py={type:"childadded",child:null},aR={type:"childremoved",child:null},$n=class r extends pc{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Vge++}),this.uuid=hc(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let e=new U,t=new da,n=new ha,i=new U(1,1,1);function o(){n.setFromEuler(t,!1)}function a(){t.setFromQuaternion(n,void 0,!1)}t._onChange(o),n._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new vt},normalMatrix:{value:new Xt}}),this.matrix=new vt,this.matrixWorld=new vt,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Cy,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return dy.setFromAxisAngle(e,t),this.quaternion.multiply(dy),this}rotateOnWorldAxis(e,t){return dy.setFromAxisAngle(e,t),this.quaternion.premultiply(dy),this}rotateX(e){return this.rotateOnAxis(RH,e)}rotateY(e){return this.rotateOnAxis(BH,e)}rotateZ(e){return this.rotateOnAxis(FH,e)}translateOnAxis(e,t){return DH.copy(e).applyQuaternion(this.quaternion),this.position.add(DH.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(RH,e)}translateY(e){return this.translateOnAxis(BH,e)}translateZ(e){return this.translateOnAxis(FH,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Bu.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?fM.copy(e):fM.set(e,t,n);let i=this.parent;this.updateWorldMatrix(!0,!1),fw.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Bu.lookAt(fw,fM,this.up):Bu.lookAt(fM,fw,this.up),this.quaternion.setFromRotationMatrix(Bu),i&&(Bu.extractRotation(i.matrixWorld),dy.setFromRotationMatrix(Bu),this.quaternion.premultiply(dy.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(NH),py.child=e,this.dispatchEvent(py),py.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Wge),aR.child=e,this.dispatchEvent(aR),aR.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Bu.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Bu.multiply(e.parent.matrixWorld)),e.applyMatrix4(Bu),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(NH),py.child=e,this.dispatchEvent(py),py.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){let a=this.children[n].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);let i=this.children;for(let o=0,a=i.length;o<a;o++)i[o].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fw,e,Gge),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fw,Hge,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){let t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){let n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){let i=this.children;for(let o=0,a=i.length;o<a;o++)i[o].updateWorldMatrix(!1,!0)}}toJSON(e){let t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(s=>({boxInitialized:s.boxInitialized,boxMin:s.box.min.toArray(),boxMax:s.box.max.toArray(),sphereInitialized:s.sphereInitialized,sphereRadius:s.sphere.radius,sphereCenter:s.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function o(s,l){return s[l.uuid]===void 0&&(s[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);let s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){let l=s.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){let h=l[c];o(e.shapes,h)}else o(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let s=[];for(let l=0,c=this.material.length;l<c;l++)s.push(o(e.materials,this.material[l]));i.material=s}else i.material=o(e.materials,this.material);if(this.children.length>0){i.children=[];for(let s=0;s<this.children.length;s++)i.children.push(this.children[s].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let s=0;s<this.animations.length;s++){let l=this.animations[s];i.animations.push(o(e.animations,l))}}if(t){let s=a(e.geometries),l=a(e.materials),c=a(e.textures),u=a(e.images),h=a(e.shapes),d=a(e.skeletons),p=a(e.animations),f=a(e.nodes);s.length>0&&(n.geometries=s),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),h.length>0&&(n.shapes=h),d.length>0&&(n.skeletons=d),p.length>0&&(n.animations=p),f.length>0&&(n.nodes=f)}return n.object=i,n;function a(s){let l=[];for(let c in s){let u=s[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){let i=e.children[n];this.add(i.clone())}return this}};$n.DEFAULT_UP=new U(0,1,0);$n.DEFAULT_MATRIX_AUTO_UPDATE=!0;$n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var gl=new U,Fu=new U,sR=new U,Nu=new U,fy=new U,my=new U,zH=new U,lR=new U,cR=new U,uR=new U,hR=new yn,dR=new yn,pR=new yn,Uu=class r{constructor(e=new U,t=new U,n=new U){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),gl.subVectors(e,t),i.cross(gl);let o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,t,n,i,o){gl.subVectors(i,t),Fu.subVectors(n,t),sR.subVectors(e,t);let a=gl.dot(gl),s=gl.dot(Fu),l=gl.dot(sR),c=Fu.dot(Fu),u=Fu.dot(sR),h=a*c-s*s;if(h===0)return o.set(0,0,0),null;let d=1/h,p=(c*l-s*u)*d,f=(a*u-s*l)*d;return o.set(1-p-f,f,p)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Nu)===null?!1:Nu.x>=0&&Nu.y>=0&&Nu.x+Nu.y<=1}static getInterpolation(e,t,n,i,o,a,s,l){return this.getBarycoord(e,t,n,i,Nu)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,Nu.x),l.addScaledVector(a,Nu.y),l.addScaledVector(s,Nu.z),l)}static getInterpolatedAttribute(e,t,n,i,o,a){return hR.setScalar(0),dR.setScalar(0),pR.setScalar(0),hR.fromBufferAttribute(e,t),dR.fromBufferAttribute(e,n),pR.fromBufferAttribute(e,i),a.setScalar(0),a.addScaledVector(hR,o.x),a.addScaledVector(dR,o.y),a.addScaledVector(pR,o.z),a}static isFrontFacing(e,t,n,i){return gl.subVectors(n,t),Fu.subVectors(e,t),gl.cross(Fu).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return gl.subVectors(this.c,this.b),Fu.subVectors(this.a,this.b),gl.cross(Fu).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return r.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return r.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,o){return r.getInterpolation(e,this.a,this.b,this.c,t,n,i,o)}containsPoint(e){return r.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return r.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,i=this.b,o=this.c,a,s;fy.subVectors(i,n),my.subVectors(o,n),lR.subVectors(e,n);let l=fy.dot(lR),c=my.dot(lR);if(l<=0&&c<=0)return t.copy(n);cR.subVectors(e,i);let u=fy.dot(cR),h=my.dot(cR);if(u>=0&&h<=u)return t.copy(i);let d=l*h-u*c;if(d<=0&&l>=0&&u<=0)return a=l/(l-u),t.copy(n).addScaledVector(fy,a);uR.subVectors(e,o);let p=fy.dot(uR),f=my.dot(uR);if(f>=0&&p<=f)return t.copy(o);let m=p*c-l*f;if(m<=0&&c>=0&&f<=0)return s=c/(c-f),t.copy(n).addScaledVector(my,s);let g=u*f-p*h;if(g<=0&&h-u>=0&&p-f>=0)return zH.subVectors(o,i),s=(h-u)/(h-u+(p-f)),t.copy(i).addScaledVector(zH,s);let y=1/(g+m+d);return a=m*y,s=d*y,t.copy(n).addScaledVector(fy,a).addScaledVector(my,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},rX={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},Hh={h:0,s:0,l:0},mM={h:0,s:0,l:0};function fR(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}var $e=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=jo){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,wn.toWorkingColorSpace(this,t),this}setRGB(e,t,n,i=wn.workingColorSpace){return this.r=e,this.g=t,this.b=n,wn.toWorkingColorSpace(this,i),this}setHSL(e,t,n,i=wn.workingColorSpace){if(e=ZR(e,1),t=qt(t,0,1),n=qt(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,a=2*n-o;this.r=fR(a,o,e+1/3),this.g=fR(a,o,e),this.b=fR(a,o,e-1/3)}return wn.toWorkingColorSpace(this,i),this}setStyle(e,t=jo){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,a=i[1],s=i[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=i[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(o,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=jo){let n=rX[e.toLowerCase()];return n!==void 0?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ju(e.r),this.g=ju(e.g),this.b=ju(e.b),this}copyLinearToSRGB(e){return this.r=My(e.r),this.g=My(e.g),this.b=My(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jo){return wn.fromWorkingColorSpace(fo.copy(this),e),Math.round(qt(fo.r*255,0,255))*65536+Math.round(qt(fo.g*255,0,255))*256+Math.round(qt(fo.b*255,0,255))}getHexString(e=jo){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=wn.workingColorSpace){wn.fromWorkingColorSpace(fo.copy(this),t);let n=fo.r,i=fo.g,o=fo.b,a=Math.max(n,i,o),s=Math.min(n,i,o),l,c,u=(s+a)/2;if(s===a)l=0,c=0;else{let h=a-s;switch(c=u<=.5?h/(a+s):h/(2-a-s),a){case n:l=(i-o)/h+(i<o?6:0);break;case i:l=(o-n)/h+2;break;case o:l=(n-i)/h+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=wn.workingColorSpace){return wn.fromWorkingColorSpace(fo.copy(this),t),e.r=fo.r,e.g=fo.g,e.b=fo.b,e}getStyle(e=jo){wn.fromWorkingColorSpace(fo.copy(this),e);let t=fo.r,n=fo.g,i=fo.b;return e!==jo?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(Hh),this.setHSL(Hh.h+e,Hh.s+t,Hh.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Hh),e.getHSL(mM);let n=Sw(Hh.h,mM.h,t),i=Sw(Hh.s,mM.s,t),o=Sw(Hh.l,mM.l,t);return this.setHSL(n,i,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,i=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*i,this.g=o[1]*t+o[4]*n+o[7]*i,this.b=o[2]*t+o[5]*n+o[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},fo=new $e;$e.NAMES=rX;var Xge=0,mo=class extends pc{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Xge++}),this.uuid=hc(),this.name="",this.type="Material",this.blending=qp,this.side=ua,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=zM,this.blendDst=UM,this.blendEquation=Xh,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new $e(0,0,0),this.blendAlpha=0,this.depthFunc=Zp,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=PR,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=$p,this.stencilZFail=$p,this.stencilZPass=$p,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}let i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==qp&&(n.blending=this.blending),this.side!==ua&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==zM&&(n.blendSrc=this.blendSrc),this.blendDst!==UM&&(n.blendDst=this.blendDst),this.blendEquation!==Xh&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Zp&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==PR&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==$p&&(n.stencilFail=this.stencilFail),this.stencilZFail!==$p&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==$p&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(t){let o=i(e.textures),a=i(e.images);o.length>0&&(n.textures=o),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let i=t.length;n=new Array(i);for(let o=0;o!==i;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}},_i=class extends mo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new $e(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new da,this.combine=NR,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Qr=new U,gM=new Le,Et=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=HM,this.updateRanges=[],this.gpuType=Wa,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,o=this.itemSize;i<o;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)gM.fromBufferAttribute(this,t),gM.applyMatrix3(e),this.setXY(t,gM.x,gM.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Qr.fromBufferAttribute(this,t),Qr.applyMatrix3(e),this.setXYZ(t,Qr.x,Qr.y,Qr.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Qr.fromBufferAttribute(this,t),Qr.applyMatrix4(e),this.setXYZ(t,Qr.x,Qr.y,Qr.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Qr.fromBufferAttribute(this,t),Qr.applyNormalMatrix(e),this.setXYZ(t,Qr.x,Qr.y,Qr.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Qr.fromBufferAttribute(this,t),Qr.transformDirection(e),this.setXYZ(t,Qr.x,Qr.y,Qr.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=yl(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Nn(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=yl(t,this.array)),t}setX(e,t){return this.normalized&&(t=Nn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=yl(t,this.array)),t}setY(e,t){return this.normalized&&(t=Nn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=yl(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Nn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=yl(t,this.array)),t}setW(e,t){return this.normalized&&(t=Nn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Nn(t,this.array),n=Nn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=Nn(t,this.array),n=Nn(n,this.array),i=Nn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,o){return e*=this.itemSize,this.normalized&&(t=Nn(t,this.array),n=Nn(n,this.array),i=Nn(i,this.array),o=Nn(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==HM&&(e.usage=this.usage),e}};var Gu=class extends Et{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var ef=class extends Et{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Jt=class extends Et{constructor(e,t,n){super(new Float32Array(e),t,n)}},Yge=0,As=new vt,mR=new $n,gy=new U,ja=new Ne,mw=new Ne,vi=new U,ot=class r extends pc{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Yge++}),this.uuid=hc(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(JR(e)?ef:Gu)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new Xt().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return As.makeRotationFromQuaternion(e),this.applyMatrix4(As),this}rotateX(e){return As.makeRotationX(e),this.applyMatrix4(As),this}rotateY(e){return As.makeRotationY(e),this.applyMatrix4(As),this}rotateZ(e){return As.makeRotationZ(e),this.applyMatrix4(As),this}translate(e,t,n){return As.makeTranslation(e,t,n),this.applyMatrix4(As),this}scale(e,t,n){return As.makeScale(e,t,n),this.applyMatrix4(As),this}lookAt(e){return mR.lookAt(e),mR.updateMatrix(),this.applyMatrix4(mR.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(gy).negate(),this.translate(gy.x,gy.y,gy.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let i=0,o=e.length;i<o;i++){let a=e[i];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new Jt(n,3))}else{let n=Math.min(e.length,t.count);for(let i=0;i<n;i++){let o=e[i];t.setXYZ(i,o.x,o.y,o.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ne);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new U(-1/0,-1/0,-1/0),new U(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){let o=t[n];ja.setFromBufferAttribute(o),this.morphTargetsRelative?(vi.addVectors(this.boundingBox.min,ja.min),this.boundingBox.expandByPoint(vi),vi.addVectors(this.boundingBox.max,ja.max),this.boundingBox.expandByPoint(vi)):(this.boundingBox.expandByPoint(ja.min),this.boundingBox.expandByPoint(ja.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Lr);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new U,1/0);return}if(e){let n=this.boundingSphere.center;if(ja.setFromBufferAttribute(e),t)for(let o=0,a=t.length;o<a;o++){let s=t[o];mw.setFromBufferAttribute(s),this.morphTargetsRelative?(vi.addVectors(ja.min,mw.min),ja.expandByPoint(vi),vi.addVectors(ja.max,mw.max),ja.expandByPoint(vi)):(ja.expandByPoint(mw.min),ja.expandByPoint(mw.max))}ja.getCenter(n);let i=0;for(let o=0,a=e.count;o<a;o++)vi.fromBufferAttribute(e,o),i=Math.max(i,n.distanceToSquared(vi));if(t)for(let o=0,a=t.length;o<a;o++){let s=t[o],l=this.morphTargetsRelative;for(let c=0,u=s.count;c<u;c++)vi.fromBufferAttribute(s,c),l&&(gy.fromBufferAttribute(e,c),vi.add(gy)),i=Math.max(i,n.distanceToSquared(vi))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,i=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Et(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),s=[],l=[];for(let E=0;E<n.count;E++)s[E]=new U,l[E]=new U;let c=new U,u=new U,h=new U,d=new Le,p=new Le,f=new Le,m=new U,g=new U;function y(E,S,M){c.fromBufferAttribute(n,E),u.fromBufferAttribute(n,S),h.fromBufferAttribute(n,M),d.fromBufferAttribute(o,E),p.fromBufferAttribute(o,S),f.fromBufferAttribute(o,M),u.sub(c),h.sub(c),p.sub(d),f.sub(d);let T=1/(p.x*f.y-f.x*p.y);isFinite(T)&&(m.copy(u).multiplyScalar(f.y).addScaledVector(h,-p.y).multiplyScalar(T),g.copy(h).multiplyScalar(p.x).addScaledVector(u,-f.x).multiplyScalar(T),s[E].add(m),s[S].add(m),s[M].add(m),l[E].add(g),l[S].add(g),l[M].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let E=0,S=b.length;E<S;++E){let M=b[E],T=M.start,L=M.count;for(let O=T,D=T+L;O<D;O+=3)y(e.getX(O+0),e.getX(O+1),e.getX(O+2))}let v=new U,x=new U,w=new U,_=new U;function A(E){w.fromBufferAttribute(i,E),_.copy(w);let S=s[E];v.copy(S),v.sub(w.multiplyScalar(w.dot(S))).normalize(),x.crossVectors(_,S);let T=x.dot(l[E])<0?-1:1;a.setXYZW(E,v.x,v.y,v.z,T)}for(let E=0,S=b.length;E<S;++E){let M=b[E],T=M.start,L=M.count;for(let O=T,D=T+L;O<D;O+=3)A(e.getX(O+0)),A(e.getX(O+1)),A(e.getX(O+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Et(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let d=0,p=n.count;d<p;d++)n.setXYZ(d,0,0,0);let i=new U,o=new U,a=new U,s=new U,l=new U,c=new U,u=new U,h=new U;if(e)for(let d=0,p=e.count;d<p;d+=3){let f=e.getX(d+0),m=e.getX(d+1),g=e.getX(d+2);i.fromBufferAttribute(t,f),o.fromBufferAttribute(t,m),a.fromBufferAttribute(t,g),u.subVectors(a,o),h.subVectors(i,o),u.cross(h),s.fromBufferAttribute(n,f),l.fromBufferAttribute(n,m),c.fromBufferAttribute(n,g),s.add(u),l.add(u),c.add(u),n.setXYZ(f,s.x,s.y,s.z),n.setXYZ(m,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let d=0,p=t.count;d<p;d+=3)i.fromBufferAttribute(t,d+0),o.fromBufferAttribute(t,d+1),a.fromBufferAttribute(t,d+2),u.subVectors(a,o),h.subVectors(i,o),u.cross(h),n.setXYZ(d+0,u.x,u.y,u.z),n.setXYZ(d+1,u.x,u.y,u.z),n.setXYZ(d+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)vi.fromBufferAttribute(e,t),vi.normalize(),e.setXYZ(t,vi.x,vi.y,vi.z)}toNonIndexed(){function e(s,l){let c=s.array,u=s.itemSize,h=s.normalized,d=new c.constructor(l.length*u),p=0,f=0;for(let m=0,g=l.length;m<g;m++){s.isInterleavedBufferAttribute?p=l[m]*s.data.stride+s.offset:p=l[m]*u;for(let y=0;y<u;y++)d[f++]=c[p++]}return new Et(d,u,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new r,n=this.index.array,i=this.attributes;for(let s in i){let l=i[s],c=e(l,n);t.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let u=0,h=c.length;u<h;u++){let d=c[u],p=e(d,n);l.push(p)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let i={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let h=0,d=c.length;h<d;h++){let p=c[h];u.push(p.toJSON(e.data))}u.length>0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone(t));let i=e.attributes;for(let c in i){let u=i[c];this.setAttribute(c,u.clone(t))}let o=e.morphAttributes;for(let c in o){let u=[],h=o[c];for(let d=0,p=h.length;d<p;d++)u.push(h[d].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let c=0,u=a.length;c<u;c++){let h=a[c];this.addGroup(h.start,h.count,h.materialIndex)}let s=e.boundingBox;s!==null&&(this.boundingBox=s.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},UH=new vt,Xp=new Vu,yM=new Lr,jH=new U,bM=new U,vM=new U,xM=new U,gR=new U,wM=new U,VH=new U,_M=new U,jt=class extends $n{constructor(e=new ot,t=new _i){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}getVertexPosition(e,t){let n=this.geometry,i=n.attributes.position,o=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(i,e);let s=this.morphTargetInfluences;if(o&&s){wM.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let u=s[l],h=o[l];u!==0&&(gR.fromBufferAttribute(h,e),a?wM.addScaledVector(gR,u):wM.addScaledVector(gR.sub(t),u))}t.add(wM)}return t}raycast(e,t){let n=this.geometry,i=this.material,o=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),yM.copy(n.boundingSphere),yM.applyMatrix4(o),Xp.copy(e.ray).recast(e.near),!(yM.containsPoint(Xp.origin)===!1&&(Xp.intersectSphere(yM,jH)===null||Xp.origin.distanceToSquared(jH)>(e.far-e.near)**2))&&(UH.copy(o).invert(),Xp.copy(e.ray).applyMatrix4(UH),!(n.boundingBox!==null&&Xp.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Xp)))}_computeIntersections(e,t,n){let i,o=this.geometry,a=this.material,s=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,h=o.attributes.normal,d=o.groups,p=o.drawRange;if(s!==null)if(Array.isArray(a))for(let f=0,m=d.length;f<m;f++){let g=d[f],y=a[g.materialIndex],b=Math.max(g.start,p.start),v=Math.min(s.count,Math.min(g.start+g.count,p.start+p.count));for(let x=b,w=v;x<w;x+=3){let _=s.getX(x),A=s.getX(x+1),E=s.getX(x+2);i=SM(this,y,e,n,c,u,h,_,A,E),i&&(i.faceIndex=Math.floor(x/3),i.face.materialIndex=g.materialIndex,t.push(i))}}else{let f=Math.max(0,p.start),m=Math.min(s.count,p.start+p.count);for(let g=f,y=m;g<y;g+=3){let b=s.getX(g),v=s.getX(g+1),x=s.getX(g+2);i=SM(this,a,e,n,c,u,h,b,v,x),i&&(i.faceIndex=Math.floor(g/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(a))for(let f=0,m=d.length;f<m;f++){let g=d[f],y=a[g.materialIndex],b=Math.max(g.start,p.start),v=Math.min(l.count,Math.min(g.start+g.count,p.start+p.count));for(let x=b,w=v;x<w;x+=3){let _=x,A=x+1,E=x+2;i=SM(this,y,e,n,c,u,h,_,A,E),i&&(i.faceIndex=Math.floor(x/3),i.face.materialIndex=g.materialIndex,t.push(i))}}else{let f=Math.max(0,p.start),m=Math.min(l.count,p.start+p.count);for(let g=f,y=m;g<y;g+=3){let b=g,v=g+1,x=g+2;i=SM(this,a,e,n,c,u,h,b,v,x),i&&(i.faceIndex=Math.floor(g/3),t.push(i))}}}};function $ge(r,e,t,n,i,o,a,s){let l;if(e.side===zi?l=n.intersectTriangle(a,o,i,!0,s):l=n.intersectTriangle(i,o,a,e.side===ua,s),l===null)return null;_M.copy(s),_M.applyMatrix4(r.matrixWorld);let c=t.ray.origin.distanceTo(_M);return c<t.near||c>t.far?null:{distance:c,point:_M.clone(),object:r}}function SM(r,e,t,n,i,o,a,s,l,c){r.getVertexPosition(s,bM),r.getVertexPosition(l,vM),r.getVertexPosition(c,xM);let u=$ge(r,e,t,n,bM,vM,xM,VH);if(u){let h=new U;Uu.getBarycoord(VH,bM,vM,xM,h),i&&(u.uv=Uu.getInterpolatedAttribute(i,s,l,c,h,new Le)),o&&(u.uv1=Uu.getInterpolatedAttribute(o,s,l,c,h,new Le)),a&&(u.normal=Uu.getInterpolatedAttribute(a,s,l,c,h,new U),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));let d={a:s,b:l,c,normal:new U,materialIndex:0};Uu.getNormal(bM,vM,xM,d.normal),u.face=d,u.barycoord=h}return u}var Ty=class r extends ot{constructor(e=1,t=1,n=1,i=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:o,depthSegments:a};let s=this;i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],u=[],h=[],d=0,p=0;f("z","y","x",-1,-1,n,t,e,a,o,0),f("z","y","x",1,-1,n,t,-e,a,o,1),f("x","z","y",1,1,e,n,t,i,a,2),f("x","z","y",1,-1,e,n,-t,i,a,3),f("x","y","z",1,-1,e,t,n,i,o,4),f("x","y","z",-1,-1,e,t,-n,i,o,5),this.setIndex(l),this.setAttribute("position",new Jt(c,3)),this.setAttribute("normal",new Jt(u,3)),this.setAttribute("uv",new Jt(h,2));function f(m,g,y,b,v,x,w,_,A,E,S){let M=x/A,T=w/E,L=x/2,O=w/2,D=_/2,z=A+1,N=E+1,J=0,X=0,Q=new U;for(let ce=0;ce<N;ce++){let H=ce*T-O;for(let de=0;de<z;de++){let Se=de*M-L;Q[m]=Se*b,Q[g]=H*v,Q[y]=D,c.push(Q.x,Q.y,Q.z),Q[m]=0,Q[g]=0,Q[y]=_>0?1:-1,u.push(Q.x,Q.y,Q.z),h.push(de/A),h.push(1-ce/E),J+=1}}for(let ce=0;ce<E;ce++)for(let H=0;H<A;H++){let de=d+H+z*ce,Se=d+H+z*(ce+1),te=d+(H+1)+z*(ce+1),ue=d+(H+1)+z*ce;l.push(de,Se,ue),l.push(Se,te,ue),X+=6}s.addGroup(p,X,S),p+=X,d+=J}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new r(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function df(r){let e={};for(let t in r){e[t]={};for(let n in r[t]){let i=r[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function yo(r){let e={};for(let t=0;t<r.length;t++){let n=df(r[t]);for(let i in n)e[i]=n[i]}return e}function Kge(r){let e=[];for(let t=0;t<r.length;t++)e.push(r[t].clone());return e}function QR(r){let e=r.getRenderTarget();return e===null?r.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:wn.workingColorSpace}var pf={clone:df,merge:yo},qge=`void main() {
  19. gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
  20. }`,Zge=`void main() {
  21. gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
  22. }`,Kn=class extends mo{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=qge,this.fragmentShader=Zge,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=df(e.uniforms),this.uniformsGroups=Kge(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let i in this.uniforms){let a=this.uniforms[i].value;a&&a.isTexture?t.uniforms[i]={type:"t",value:a.toJSON(e).uuid}:a&&a.isColor?t.uniforms[i]={type:"c",value:a.getHex()}:a&&a.isVector2?t.uniforms[i]={type:"v2",value:a.toArray()}:a&&a.isVector3?t.uniforms[i]={type:"v3",value:a.toArray()}:a&&a.isVector4?t.uniforms[i]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?t.uniforms[i]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?t.uniforms[i]={type:"m4",value:a.toArray()}:t.uniforms[i]={value:a}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},Iw=class extends $n{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new vt,this.projectionMatrix=new vt,this.projectionMatrixInverse=new vt,this.coordinateSystem=uc}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},Wh=new U,GH=new Le,HH=new Le,ca=class extends Iw{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Py*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(_w*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Py*2*Math.atan(Math.tan(_w*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Wh.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Wh.x,Wh.y).multiplyScalar(-e/Wh.z),Wh.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Wh.x,Wh.y).multiplyScalar(-e/Wh.z)}getViewSize(e,t){return this.getViewBounds(e,GH,HH),t.subVectors(HH,GH)}setViewOffset(e,t,n,i,o,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(_w*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,o=-.5*i,a=this.view;if(this.view!==null&&this.view.enabled){let l=a.fullWidth,c=a.fullHeight;o+=a.offsetX*i/l,t-=a.offsetY*n/c,i*=a.width/l,n*=a.height/c}let s=this.filmOffset;s!==0&&(o+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},yy=-90,by=1,$M=class extends $n{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let i=new ca(yy,by,e,t);i.layers=this.layers,this.add(i);let o=new ca(yy,by,e,t);o.layers=this.layers,this.add(o);let a=new ca(yy,by,e,t);a.layers=this.layers,this.add(a);let s=new ca(yy,by,e,t);s.layers=this.layers,this.add(s);let l=new ca(yy,by,e,t);l.layers=this.layers,this.add(l);let c=new ca(yy,by,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,i,o,a,s,l]=t;for(let c of t)this.remove(c);if(e===uc)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Cw)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[o,a,s,l,c,u]=this.children,h=e.getRenderTarget(),d=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),f=e.xr.enabled;e.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,o),e.setRenderTarget(n,1,i),e.render(t,a),e.setRenderTarget(n,2,i),e.render(t,s),e.setRenderTarget(n,3,i),e.render(t,l),e.setRenderTarget(n,4,i),e.render(t,c),n.texture.generateMipmaps=m,e.setRenderTarget(n,5,i),e.render(t,u),e.setRenderTarget(h,d,p),e.xr.enabled=f,n.texture.needsPMREMUpdate=!0}},Lw=class extends wi{constructor(e,t,n,i,o,a,s,l,c,u){e=e!==void 0?e:[],t=t!==void 0?t:sf,super(e,t,n,i,o,a,s,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},KM=class extends Go{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new Lw(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:xi}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`
  23. varying vec3 vWorldDirection;
  24. vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
  25. return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
  26. }
  27. void main() {
  28. vWorldDirection = transformDirection( position, modelMatrix );
  29. #include <begin_vertex>
  30. #include <project_vertex>
  31. }
  32. `,fragmentShader:`
  33. uniform sampler2D tEquirect;
  34. varying vec3 vWorldDirection;
  35. #include <common>
  36. void main() {
  37. vec3 direction = normalize( vWorldDirection );
  38. vec2 sampleUV = equirectUv( direction );
  39. gl_FragColor = texture2D( tEquirect, sampleUV );
  40. }
  41. `},i=new Ty(5,5,5),o=new Kn({name:"CubemapFromEquirect",uniforms:df(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:zi,blending:Yu});o.uniforms.tEquirect.value=t;let a=new jt(i,o),s=t.minFilter;return t.minFilter===td&&(t.minFilter=xi),new $M(1,10,this).update(e,a),t.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,i){let o=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,i);e.setRenderTarget(o)}};var Yh=class extends $n{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new da,this.environmentIntensity=1,this.environmentRotation=new da,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},ky=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=HM,this.updateRanges=[],this.version=0,this.uuid=hc()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,o=this.stride;i<o;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=hc()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=hc()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}},Uo=new U,sr=class r{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Uo.fromBufferAttribute(this,t),Uo.applyMatrix4(e),this.setXYZ(t,Uo.x,Uo.y,Uo.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Uo.fromBufferAttribute(this,t),Uo.applyNormalMatrix(e),this.setXYZ(t,Uo.x,Uo.y,Uo.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Uo.fromBufferAttribute(this,t),Uo.transformDirection(e),this.setXYZ(t,Uo.x,Uo.y,Uo.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=yl(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Nn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=Nn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Nn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Nn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Nn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=yl(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=yl(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=yl(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=yl(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Nn(t,this.array),n=Nn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Nn(t,this.array),n=Nn(n,this.array),i=Nn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,o){return e=e*this.data.stride+this.offset,this.normalized&&(t=Nn(t,this.array),n=Nn(n,this.array),i=Nn(i,this.array),o=Nn(o,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=o,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");let t=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[i+o])}return new Et(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new r(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");let t=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[i+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}},Iy=class extends mo{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new $e(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},vy,gw=new U,xy=new U,wy=new U,_y=new Le,yw=new Le,iX=new vt,AM=new U,bw=new U,MM=new U,WH=new Le,yR=new Le,XH=new Le,Ow=class extends $n{constructor(e=new Iy){if(super(),this.isSprite=!0,this.type="Sprite",vy===void 0){vy=new ot;let t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new ky(t,5);vy.setIndex([0,1,2,0,2,3]),vy.setAttribute("position",new sr(n,3,0,!1)),vy.setAttribute("uv",new sr(n,2,3,!1))}this.geometry=vy,this.material=e,this.center=new Le(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),xy.setFromMatrixScale(this.matrixWorld),iX.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),wy.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&xy.multiplyScalar(-wy.z);let n=this.material.rotation,i,o;n!==0&&(o=Math.cos(n),i=Math.sin(n));let a=this.center;PM(AM.set(-.5,-.5,0),wy,a,xy,i,o),PM(bw.set(.5,-.5,0),wy,a,xy,i,o),PM(MM.set(.5,.5,0),wy,a,xy,i,o),WH.set(0,0),yR.set(1,0),XH.set(1,1);let s=e.ray.intersectTriangle(AM,bw,MM,!1,gw);if(s===null&&(PM(bw.set(-.5,.5,0),wy,a,xy,i,o),yR.set(0,1),s=e.ray.intersectTriangle(AM,MM,bw,!1,gw),s===null))return;let l=e.ray.origin.distanceTo(gw);l<e.near||l>e.far||t.push({distance:l,point:gw.clone(),uv:Uu.getInterpolation(gw,AM,bw,MM,WH,yR,XH,new Le),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function PM(r,e,t,n,i,o){_y.subVectors(r,t).addScalar(.5).multiply(n),i!==void 0?(yw.x=o*_y.x-i*_y.y,yw.y=i*_y.x+o*_y.y):yw.copy(_y),r.copy(e),r.x+=yw.x,r.y+=yw.y,r.applyMatrix4(iX)}var $h=class extends wi{constructor(e=null,t=1,n=1,i,o,a,s,l,c=Ur,u=Ur,h,d){super(null,a,s,l,c,u,i,o,h,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var fc=class extends Et{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}},Sy=new vt,YH=new vt,EM=[],$H=new Ne,Jge=new vt,vw=new jt,xw=new Lr,Dw=class extends jt{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new fc(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,Jge)}computeBoundingBox(){let e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Ne),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Sy),$H.copy(e.boundingBox).applyMatrix4(Sy),this.boundingBox.union($H)}computeBoundingSphere(){let e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Lr),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Sy),xw.copy(e.boundingSphere).applyMatrix4(Sy),this.boundingSphere.union(xw)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){let n=t.morphTargetInfluences,i=this.morphTexture.source.data.data,o=n.length+1,a=e*o+1;for(let s=0;s<n.length;s++)n[s]=i[a+s]}raycast(e,t){let n=this.matrixWorld,i=this.count;if(vw.geometry=this.geometry,vw.material=this.material,vw.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),xw.copy(this.boundingSphere),xw.applyMatrix4(n),e.ray.intersectsSphere(xw)!==!1))for(let o=0;o<i;o++){this.getMatrixAt(o,Sy),YH.multiplyMatrices(n,Sy),vw.matrixWorld=YH,vw.raycast(e,EM);for(let a=0,s=EM.length;a<s;a++){let l=EM[a];l.instanceId=o,l.object=this,t.push(l)}EM.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new fc(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){let n=t.morphTargetInfluences,i=n.length+1;this.morphTexture===null&&(this.morphTexture=new $h(new Float32Array(i*this.count),i,this.count,TP,Wa));let o=this.morphTexture.source.data.data,a=0;for(let c=0;c<n.length;c++)a+=n[c];let s=this.geometry.morphTargetsRelative?1:1-a,l=i*e;o[l]=s,o.set(n,l+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}},bR=new U,Qge=new U,eye=new Xt,Ms=class{constructor(e=new U(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let i=bR.subVectors(n,t).cross(Qge.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){let n=e.delta(bR),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:t.copy(e.start).addScaledVector(n,o)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||eye.getNormalMatrix(e),i=this.coplanarPoint(bR).applyMatrix4(e),o=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},Yp=new Lr,CM=new U,Rw=class{constructor(e=new Ms,t=new Ms,n=new Ms,i=new Ms,o=new Ms,a=new Ms){this.planes=[e,t,n,i,o,a]}set(e,t,n,i,o,a){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(i),s[4].copy(o),s[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=uc){let n=this.planes,i=e.elements,o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],h=i[6],d=i[7],p=i[8],f=i[9],m=i[10],g=i[11],y=i[12],b=i[13],v=i[14],x=i[15];if(n[0].setComponents(l-o,d-c,g-p,x-y).normalize(),n[1].setComponents(l+o,d+c,g+p,x+y).normalize(),n[2].setComponents(l+a,d+u,g+f,x+b).normalize(),n[3].setComponents(l-a,d-u,g-f,x-b).normalize(),n[4].setComponents(l-s,d-h,g-m,x-v).normalize(),t===uc)n[5].setComponents(l+s,d+h,g+m,x+v).normalize();else if(t===Cw)n[5].setComponents(s,h,m,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Yp.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Yp.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Yp)}intersectsSprite(e){return Yp.center.set(0,0,0),Yp.radius=.7071067811865476,Yp.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yp)}intersectsSphere(e){let t=this.planes,n=e.center,i=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){let t=this.planes;for(let n=0;n<6;n++){let i=t[n];if(CM.x=i.normal.x>0?e.max.x:e.min.x,CM.y=i.normal.y>0?e.max.y:e.min.y,CM.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(CM)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};var Fi=class extends mo{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new $e(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}},qM=new U,ZM=new U,KH=new vt,ww=new Vu,TM=new Lr,vR=new U,qH=new U,Ni=class extends $n{constructor(e=new ot,t=new Fi){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[0];for(let i=1,o=t.count;i<o;i++)qM.fromBufferAttribute(t,i-1),ZM.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=qM.distanceTo(ZM);e.setAttribute("lineDistance",new Jt(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){let n=this.geometry,i=this.matrixWorld,o=e.params.Line.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),TM.copy(n.boundingSphere),TM.applyMatrix4(i),TM.radius+=o,e.ray.intersectsSphere(TM)===!1)return;KH.copy(i).invert(),ww.copy(e.ray).applyMatrix4(KH);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,c=this.isLineSegments?2:1,u=n.index,d=n.attributes.position;if(u!==null){let p=Math.max(0,a.start),f=Math.min(u.count,a.start+a.count);for(let m=p,g=f-1;m<g;m+=c){let y=u.getX(m),b=u.getX(m+1),v=kM(this,e,ww,l,y,b);v&&t.push(v)}if(this.isLineLoop){let m=u.getX(f-1),g=u.getX(p),y=kM(this,e,ww,l,m,g);y&&t.push(y)}}else{let p=Math.max(0,a.start),f=Math.min(d.count,a.start+a.count);for(let m=p,g=f-1;m<g;m+=c){let y=kM(this,e,ww,l,m,m+1);y&&t.push(y)}if(this.isLineLoop){let m=kM(this,e,ww,l,f-1,p);m&&t.push(m)}}}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}};function kM(r,e,t,n,i,o){let a=r.geometry.attributes.position;if(qM.fromBufferAttribute(a,i),ZM.fromBufferAttribute(a,o),t.distanceSqToSegment(qM,ZM,vR,qH)>n)return;vR.applyMatrix4(r.matrixWorld);let l=e.ray.origin.distanceTo(vR);if(!(l<e.near||l>e.far))return{distance:l,point:qH.clone().applyMatrix4(r.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:r}}var ZH=new U,JH=new U,qn=class extends Ni{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[];for(let i=0,o=t.count;i<o;i+=2)ZH.fromBufferAttribute(t,i),JH.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ZH.distanceTo(JH);e.setAttribute("lineDistance",new Jt(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}},Ly=class extends Ni{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}},tf=class extends mo{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new $e(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},QH=new vt,ER=new Vu,IM=new Lr,LM=new U,go=class extends $n{constructor(e=new ot,t=new tf){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){let n=this.geometry,i=this.matrixWorld,o=e.params.Points.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),IM.copy(n.boundingSphere),IM.applyMatrix4(i),IM.radius+=o,e.ray.intersectsSphere(IM)===!1)return;QH.copy(i).invert(),ER.copy(e.ray).applyMatrix4(QH);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,c=n.index,h=n.attributes.position;if(c!==null){let d=Math.max(0,a.start),p=Math.min(c.count,a.start+a.count);for(let f=d,m=p;f<m;f++){let g=c.getX(f);LM.fromBufferAttribute(h,g),eW(LM,g,l,i,e,t,this)}}else{let d=Math.max(0,a.start),p=Math.min(h.count,a.start+a.count);for(let f=d,m=p;f<m;f++)LM.fromBufferAttribute(h,f),eW(LM,f,l,i,e,t,this)}}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}};function eW(r,e,t,n,i,o,a){let s=ER.distanceSqToPoint(r);if(s<t){let l=new U;ER.closestPointToPoint(r,l),l.applyMatrix4(n);let c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:a})}}var Zn=class extends $n{constructor(){super(),this.isGroup=!0,this.type="Group"}};var Bw=class extends wi{constructor(e,t,n,i,o,a,s,l,c){super(e,t,n,i,o,a,s,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}},Fw=class extends wi{constructor(e,t,n,i,o,a,s,l,c,u=Kp){if(u!==Kp&&u!==Jp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&u===Kp&&(n=nd),n===void 0&&u===Jp&&(n=cf),super(null,i,o,a,s,l,u,n,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=s!==void 0?s:Ur,this.minFilter=l!==void 0?l:Ur,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},Va=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){let n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){let t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){let t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){let e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let t=[],n,i=this.getPoint(0),o=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),o+=n.distanceTo(i),t.push(o),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){let n=this.getLengths(),i=0,o=n.length,a;t?a=t:a=e*n[o-1];let s=0,l=o-1,c;for(;s<=l;)if(i=Math.floor(s+(l-s)/2),c=n[i]-a,c<0)s=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===a)return i/(o-1);let u=n[i],d=n[i+1]-u,p=(a-u)/d;return(i+p)/(o-1)}getTangent(e,t){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);let a=this.getPoint(i),s=this.getPoint(o),l=t||(a.isVector2?new Le:new U);return l.copy(s).sub(a).normalize(),l}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){let n=new U,i=[],o=[],a=[],s=new U,l=new vt;for(let p=0;p<=e;p++){let f=p/e;i[p]=this.getTangentAt(f,new U)}o[0]=new U,a[0]=new U;let c=Number.MAX_VALUE,u=Math.abs(i[0].x),h=Math.abs(i[0].y),d=Math.abs(i[0].z);u<=c&&(c=u,n.set(1,0,0)),h<=c&&(c=h,n.set(0,1,0)),d<=c&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),o[0].crossVectors(i[0],s),a[0].crossVectors(i[0],o[0]);for(let p=1;p<=e;p++){if(o[p]=o[p-1].clone(),a[p]=a[p-1].clone(),s.crossVectors(i[p-1],i[p]),s.length()>Number.EPSILON){s.normalize();let f=Math.acos(qt(i[p-1].dot(i[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(s,f))}a[p].crossVectors(i[p],o[p])}if(t===!0){let p=Math.acos(qt(o[0].dot(o[e]),-1,1));p/=e,i[0].dot(s.crossVectors(o[0],o[e]))>0&&(p=-p);for(let f=1;f<=e;f++)o[f].applyMatrix4(l.makeRotationAxis(i[f],p*f)),a[f].crossVectors(i[f],o[f])}return{tangents:i,normals:o,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},Hu=class extends Va{constructor(e=0,t=0,n=1,i=1,o=0,a=Math.PI*2,s=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=a,this.aClockwise=s,this.aRotation=l}getPoint(e,t=new Le){let n=t,i=Math.PI*2,o=this.aEndAngle-this.aStartAngle,a=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=i;for(;o>i;)o-=i;o<Number.EPSILON&&(a?o=0:o=i),this.aClockwise===!0&&!a&&(o===i?o=-i:o=o-i);let s=this.aStartAngle+e*o,l=this.aX+this.xRadius*Math.cos(s),c=this.aY+this.yRadius*Math.sin(s);if(this.aRotation!==0){let u=Math.cos(this.aRotation),h=Math.sin(this.aRotation),d=l-this.aX,p=c-this.aY;l=d*u-p*h+this.aX,c=d*h+p*u+this.aY}return n.set(l,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){let e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}},JM=class extends Hu{constructor(e,t,n,i,o,a){super(e,t,n,n,i,o,a),this.isArcCurve=!0,this.type="ArcCurve"}};function e4(){let r=0,e=0,t=0,n=0;function i(o,a,s,l){r=o,e=s,t=-3*o+3*a-2*s-l,n=2*o-2*a+s+l}return{initCatmullRom:function(o,a,s,l,c){i(a,s,c*(s-o),c*(l-a))},initNonuniformCatmullRom:function(o,a,s,l,c,u,h){let d=(a-o)/c-(s-o)/(c+u)+(s-a)/u,p=(s-a)/u-(l-a)/(u+h)+(l-s)/h;d*=u,p*=u,i(a,s,d,p)},calc:function(o){let a=o*o,s=a*o;return r+e*o+t*a+n*s}}}var OM=new U,xR=new e4,wR=new e4,_R=new e4,QM=class extends Va{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new U){let n=t,i=this.points,o=i.length,a=(o-(this.closed?0:1))*e,s=Math.floor(a),l=a-s;this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/o)+1)*o:l===0&&s===o-1&&(s=o-2,l=1);let c,u;this.closed||s>0?c=i[(s-1)%o]:(OM.subVectors(i[0],i[1]).add(i[0]),c=OM);let h=i[s%o],d=i[(s+1)%o];if(this.closed||s+2<o?u=i[(s+2)%o]:(OM.subVectors(i[o-1],i[o-2]).add(i[o-1]),u=OM),this.curveType==="centripetal"||this.curveType==="chordal"){let p=this.curveType==="chordal"?.5:.25,f=Math.pow(c.distanceToSquared(h),p),m=Math.pow(h.distanceToSquared(d),p),g=Math.pow(d.distanceToSquared(u),p);m<1e-4&&(m=1),f<1e-4&&(f=m),g<1e-4&&(g=m),xR.initNonuniformCatmullRom(c.x,h.x,d.x,u.x,f,m,g),wR.initNonuniformCatmullRom(c.y,h.y,d.y,u.y,f,m,g),_R.initNonuniformCatmullRom(c.z,h.z,d.z,u.z,f,m,g)}else this.curveType==="catmullrom"&&(xR.initCatmullRom(c.x,h.x,d.x,u.x,this.tension),wR.initCatmullRom(c.y,h.y,d.y,u.y,this.tension),_R.initCatmullRom(c.z,h.z,d.z,u.z,this.tension));return n.set(xR.calc(l),wR.calc(l),_R.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){let i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){let e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){let i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){let i=e.points[t];this.points.push(new U().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}};function tW(r,e,t,n,i){let o=(n-e)*.5,a=(i-t)*.5,s=r*r,l=r*s;return(2*t-2*n+o+a)*l+(-3*t+3*n-2*o-a)*s+o*r+t}function tye(r,e){let t=1-r;return t*t*e}function nye(r,e){return 2*(1-r)*r*e}function rye(r,e){return r*r*e}function Aw(r,e,t,n){return tye(r,e)+nye(r,t)+rye(r,n)}function iye(r,e){let t=1-r;return t*t*t*e}function oye(r,e){let t=1-r;return 3*t*t*r*e}function aye(r,e){return 3*(1-r)*r*r*e}function sye(r,e){return r*r*r*e}function Mw(r,e,t,n,i){return iye(r,e)+oye(r,t)+aye(r,n)+sye(r,i)}var Kh=class extends Va{constructor(e=new Le,t=new Le,n=new Le,i=new Le){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Le){let n=t,i=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(Mw(e,i.x,o.x,a.x,s.x),Mw(e,i.y,o.y,a.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}},eP=class extends Va{constructor(e=new U,t=new U,n=new U,i=new U){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new U){let n=t,i=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(Mw(e,i.x,o.x,a.x,s.x),Mw(e,i.y,o.y,a.y,s.y),Mw(e,i.z,o.z,a.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}},Wu=class extends Va{constructor(e=new Le,t=new Le){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Le){let n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Le){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},tP=class extends Va{constructor(e=new U,t=new U){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new U){let n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new U){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},qh=class extends Va{constructor(e=new Le,t=new Le,n=new Le){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Le){let n=t,i=this.v0,o=this.v1,a=this.v2;return n.set(Aw(e,i.x,o.x,a.x),Aw(e,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},nP=class extends Va{constructor(e=new U,t=new U,n=new U){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new U){let n=t,i=this.v0,o=this.v1,a=this.v2;return n.set(Aw(e,i.x,o.x,a.x),Aw(e,i.y,o.y,a.y),Aw(e,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},Nw=class extends Va{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Le){let n=t,i=this.points,o=(i.length-1)*e,a=Math.floor(o),s=o-a,l=i[a===0?a:a-1],c=i[a],u=i[a>i.length-2?i.length-1:a+1],h=i[a>i.length-3?i.length-1:a+2];return n.set(tW(s,l.x,c.x,u.x,h.x),tW(s,l.y,c.y,u.y,h.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){let i=e.points[t];this.points.push(i.clone())}return this}toJSON(){let e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){let i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){let i=e.points[t];this.points.push(new Le().fromArray(i))}return this}},nW=Object.freeze({__proto__:null,ArcCurve:JM,CatmullRomCurve3:QM,CubicBezierCurve:Kh,CubicBezierCurve3:eP,EllipseCurve:Hu,LineCurve:Wu,LineCurve3:tP,QuadraticBezierCurve:qh,QuadraticBezierCurve3:nP,SplineCurve:Nw}),rP=class extends Va{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){let e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){let n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new nW[n](t,e))}return this}getPoint(e,t){let n=e*this.getLength(),i=this.getCurveLengths(),o=0;for(;o<i.length;){if(i[o]>=n){let a=i[o]-n,s=this.curves[o],l=s.getLength(),c=l===0?0:1-a/l;return s.getPointAt(c,t)}o++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,i=this.curves.length;n<i;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){let t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){let t=[],n;for(let i=0,o=this.curves;i<o.length;i++){let a=o[i],s=a.isEllipseCurve?e*2:a.isLineCurve||a.isLineCurve3?1:a.isSplineCurve?e*a.points.length:e,l=a.getPoints(s);for(let c=0;c<l.length;c++){let u=l[c];n&&n.equals(u)||(t.push(u),n=u)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){let i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){let e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){let i=this.curves[t];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){let i=e.curves[t];this.curves.push(new nW[i.type]().fromJSON(i))}return this}},Zh=class extends rP{constructor(e){super(),this.type="Path",this.currentPoint=new Le,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){let n=new Wu(this.currentPoint.clone(),new Le(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){let o=new qh(this.currentPoint.clone(),new Le(e,t),new Le(n,i));return this.curves.push(o),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,o,a){let s=new Kh(this.currentPoint.clone(),new Le(e,t),new Le(n,i),new Le(o,a));return this.curves.push(s),this.currentPoint.set(o,a),this}splineThru(e){let t=[this.currentPoint.clone()].concat(e),n=new Nw(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,o,a){let s=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+s,t+l,n,i,o,a),this}absarc(e,t,n,i,o,a){return this.absellipse(e,t,n,n,i,o,a),this}ellipse(e,t,n,i,o,a,s,l){let c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+c,t+u,n,i,o,a,s,l),this}absellipse(e,t,n,i,o,a,s,l){let c=new Hu(e,t,n,i,o,a,s,l);if(this.curves.length>0){let h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);let u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}};var Vo=class extends Zh{constructor(e){super(e),this.uuid=hc(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){let i=e.holes[t];this.holes.push(i.clone())}return this}toJSON(){let e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){let i=this.holes[t];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){let i=e.holes[t];this.holes.push(new Zh().fromJSON(i))}return this}},lye={triangulate:function(r,e,t=2){let n=e&&e.length,i=n?e[0]*t:r.length,o=oX(r,0,i,t,!0),a=[];if(!o||o.next===o.prev)return a;let s,l,c,u,h,d,p;if(n&&(o=pye(r,e,o,t)),r.length>80*t){s=c=r[0],l=u=r[1];for(let f=t;f<i;f+=t)h=r[f],d=r[f+1],h<s&&(s=h),d<l&&(l=d),h>c&&(c=h),d>u&&(u=d);p=Math.max(c-s,u-l),p=p!==0?32767/p:0}return zw(o,a,t,s,l,p,0),a}};function oX(r,e,t,n,i){let o,a;if(i===Aye(r,e,t,n)>0)for(o=e;o<t;o+=n)a=rW(o,r[o],r[o+1],a);else for(o=t-n;o>=e;o-=n)a=rW(o,r[o],r[o+1],a);return a&&aE(a,a.next)&&(jw(a),a=a.next),a}function nf(r,e){if(!r)return r;e||(e=r);let t=r,n;do if(n=!1,!t.steiner&&(aE(t,t.next)||xr(t.prev,t,t.next)===0)){if(jw(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function zw(r,e,t,n,i,o,a){if(!r)return;!a&&o&&bye(r,n,i,o);let s=r,l,c;for(;r.prev!==r.next;){if(l=r.prev,c=r.next,o?uye(r,n,i,o):cye(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),jw(r),r=c.next,s=c.next;continue}if(r=c,r===s){a?a===1?(r=hye(nf(r),e,t),zw(r,e,t,n,i,o,2)):a===2&&dye(r,e,t,n,i,o):zw(nf(r),e,t,n,i,o,1);break}}}function cye(r){let e=r.prev,t=r,n=r.next;if(xr(e,t,n)>=0)return!1;let i=e.x,o=t.x,a=n.x,s=e.y,l=t.y,c=n.y,u=i<o?i<a?i:a:o<a?o:a,h=s<l?s<c?s:c:l<c?l:c,d=i>o?i>a?i:a:o>a?o:a,p=s>l?s>c?s:c:l>c?l:c,f=n.next;for(;f!==e;){if(f.x>=u&&f.x<=d&&f.y>=h&&f.y<=p&&Ay(i,s,o,l,a,c,f.x,f.y)&&xr(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function uye(r,e,t,n){let i=r.prev,o=r,a=r.next;if(xr(i,o,a)>=0)return!1;let s=i.x,l=o.x,c=a.x,u=i.y,h=o.y,d=a.y,p=s<l?s<c?s:c:l<c?l:c,f=u<h?u<d?u:d:h<d?h:d,m=s>l?s>c?s:c:l>c?l:c,g=u>h?u>d?u:d:h>d?h:d,y=CR(p,f,e,t,n),b=CR(m,g,e,t,n),v=r.prevZ,x=r.nextZ;for(;v&&v.z>=y&&x&&x.z<=b;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==a&&Ay(s,u,l,h,c,d,v.x,v.y)&&xr(v.prev,v,v.next)>=0||(v=v.prevZ,x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==a&&Ay(s,u,l,h,c,d,x.x,x.y)&&xr(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;v&&v.z>=y;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==i&&v!==a&&Ay(s,u,l,h,c,d,v.x,v.y)&&xr(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;x&&x.z<=b;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==a&&Ay(s,u,l,h,c,d,x.x,x.y)&&xr(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function hye(r,e,t){let n=r;do{let i=n.prev,o=n.next.next;!aE(i,o)&&aX(i,n,n.next,o)&&Uw(i,o)&&Uw(o,i)&&(e.push(i.i/t|0),e.push(n.i/t|0),e.push(o.i/t|0),jw(n),jw(n.next),n=r=o),n=n.next}while(n!==r);return nf(n)}function dye(r,e,t,n,i,o){let a=r;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&wye(a,s)){let l=sX(a,s);a=nf(a,a.next),l=nf(l,l.next),zw(a,e,t,n,i,o,0),zw(l,e,t,n,i,o,0);return}s=s.next}a=a.next}while(a!==r)}function pye(r,e,t,n){let i=[],o,a,s,l,c;for(o=0,a=e.length;o<a;o++)s=e[o]*n,l=o<a-1?e[o+1]*n:r.length,c=oX(r,s,l,n,!1),c===c.next&&(c.steiner=!0),i.push(xye(c));for(i.sort(fye),o=0;o<i.length;o++)t=mye(i[o],t);return t}function fye(r,e){return r.x-e.x}function mye(r,e){let t=gye(r,e);if(!t)return e;let n=sX(t,r);return nf(n,n.next),nf(t,t.next)}function gye(r,e){let t=e,n=-1/0,i,o=r.x,a=r.y;do{if(a<=t.y&&a>=t.next.y&&t.next.y!==t.y){let d=t.x+(a-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(d<=o&&d>n&&(n=d,i=t.x<t.next.x?t:t.next,d===o))return i}t=t.next}while(t!==e);if(!i)return null;let s=i,l=i.x,c=i.y,u=1/0,h;t=i;do o>=t.x&&t.x>=l&&o!==t.x&&Ay(a<c?o:n,a,l,c,a<c?n:o,a,t.x,t.y)&&(h=Math.abs(a-t.y)/(o-t.x),Uw(t,r)&&(h<u||h===u&&(t.x>i.x||t.x===i.x&&yye(i,t)))&&(i=t,u=h)),t=t.next;while(t!==s);return i}function yye(r,e){return xr(r.prev,r,e.prev)<0&&xr(e.next,r,r.next)<0}function bye(r,e,t,n){let i=r;do i.z===0&&(i.z=CR(i.x,i.y,e,t,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,vye(i)}function vye(r){let e,t,n,i,o,a,s,l,c=1;do{for(t=r,r=null,o=null,a=0;t;){for(a++,n=t,s=0,e=0;e<c&&(s++,n=n.nextZ,!!n);e++);for(l=c;s>0||l>0&&n;)s!==0&&(l===0||!n||t.z<=n.z)?(i=t,t=t.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:r=i,i.prevZ=o,o=i;t=n}o.nextZ=null,c*=2}while(a>1);return r}function CR(r,e,t,n,i){return r=(r-t)*i|0,e=(e-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function xye(r){let e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function Ay(r,e,t,n,i,o,a,s){return(i-a)*(e-s)>=(r-a)*(o-s)&&(r-a)*(n-s)>=(t-a)*(e-s)&&(t-a)*(o-s)>=(i-a)*(n-s)}function wye(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!_ye(r,e)&&(Uw(r,e)&&Uw(e,r)&&Sye(r,e)&&(xr(r.prev,r,e.prev)||xr(r,e.prev,e))||aE(r,e)&&xr(r.prev,r,r.next)>0&&xr(e.prev,e,e.next)>0)}function xr(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function aE(r,e){return r.x===e.x&&r.y===e.y}function aX(r,e,t,n){let i=RM(xr(r,e,t)),o=RM(xr(r,e,n)),a=RM(xr(t,n,r)),s=RM(xr(t,n,e));return!!(i!==o&&a!==s||i===0&&DM(r,t,e)||o===0&&DM(r,n,e)||a===0&&DM(t,r,n)||s===0&&DM(t,e,n))}function DM(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function RM(r){return r>0?1:r<0?-1:0}function _ye(r,e){let t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&aX(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function Uw(r,e){return xr(r.prev,r,r.next)<0?xr(r,e,r.next)>=0&&xr(r,r.prev,e)>=0:xr(r,e,r.prev)<0||xr(r,r.next,e)<0}function Sye(r,e){let t=r,n=!1,i=(r.x+e.x)/2,o=(r.y+e.y)/2;do t.y>o!=t.next.y>o&&t.next.y!==t.y&&i<(t.next.x-t.x)*(o-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==r);return n}function sX(r,e){let t=new TR(r.i,r.x,r.y),n=new TR(e.i,e.x,e.y),i=r.next,o=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function rW(r,e,t,n){let i=new TR(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function jw(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function TR(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Aye(r,e,t,n){let i=0;for(let o=e,a=t-n;o<t;o+=n)i+=(r[a]-r[o])*(r[o+1]+r[a+1]),a=o;return i}var dc=class r{static area(e){let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++)n+=e[i].x*e[o].y-e[o].x*e[i].y;return n*.5}static isClockWise(e){return r.area(e)<0}static triangulateShape(e,t){let n=[],i=[],o=[];iW(e),oW(n,e);let a=e.length;t.forEach(iW);for(let l=0;l<t.length;l++)i.push(a),a+=t[l].length,oW(n,t[l]);let s=lye.triangulate(n,i);for(let l=0;l<s.length;l+=3)o.push(s.slice(l,l+3));return o}};function iW(r){let e=r.length;e>2&&r[e-1].equals(r[0])&&r.pop()}function oW(r,e){for(let t=0;t<e.length;t++)r.push(e[t].x),r.push(e[t].y)}var Xu=class r extends ot{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};let o=e/2,a=t/2,s=Math.floor(n),l=Math.floor(i),c=s+1,u=l+1,h=e/s,d=t/l,p=[],f=[],m=[],g=[];for(let y=0;y<u;y++){let b=y*d-a;for(let v=0;v<c;v++){let x=v*h-o;f.push(x,-b,0),m.push(0,0,1),g.push(v/s),g.push(1-y/l)}}for(let y=0;y<l;y++)for(let b=0;b<s;b++){let v=b+c*y,x=b+c*(y+1),w=b+1+c*(y+1),_=b+1+c*y;p.push(v,x,_),p.push(x,w,_)}this.setIndex(p),this.setAttribute("position",new Jt(f,3)),this.setAttribute("normal",new Jt(m,3)),this.setAttribute("uv",new Jt(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new r(e.width,e.height,e.widthSegments,e.heightSegments)}};var Jh=class r extends ot{constructor(e=new Vo([new Le(0,.5),new Le(-.5,-.5),new Le(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};let n=[],i=[],o=[],a=[],s=0,l=0;if(Array.isArray(e)===!1)c(e);else for(let u=0;u<e.length;u++)c(e[u]),this.addGroup(s,l,u),s+=l,l=0;this.setIndex(n),this.setAttribute("position",new Jt(i,3)),this.setAttribute("normal",new Jt(o,3)),this.setAttribute("uv",new Jt(a,2));function c(u){let h=i.length/3,d=u.extractPoints(t),p=d.shape,f=d.holes;dc.isClockWise(p)===!1&&(p=p.reverse());for(let g=0,y=f.length;g<y;g++){let b=f[g];dc.isClockWise(b)===!0&&(f[g]=b.reverse())}let m=dc.triangulateShape(p,f);for(let g=0,y=f.length;g<y;g++){let b=f[g];p=p.concat(b)}for(let g=0,y=p.length;g<y;g++){let b=p[g];i.push(b.x,b.y,0),o.push(0,0,1),a.push(b.x,b.y)}for(let g=0,y=m.length;g<y;g++){let b=m[g],v=b[0]+h,x=b[1]+h,w=b[2]+h;n.push(v,x,w),l+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){let e=super.toJSON(),t=this.parameters.shapes;return Mye(t,e)}static fromJSON(e,t){let n=[];for(let i=0,o=e.shapes.length;i<o;i++){let a=t[e.shapes[i]];n.push(a)}return new r(n,e.curveSegments)}};function Mye(r,e){if(e.shapes=[],Array.isArray(r))for(let t=0,n=r.length;t<n;t++){let i=r[t];e.shapes.push(i.uuid)}else e.shapes.push(r.uuid);return e}var Vw=class extends ot{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){let t=[],n=new Set,i=new U,o=new U;if(e.index!==null){let a=e.attributes.position,s=e.index,l=e.groups;l.length===0&&(l=[{start:0,count:s.count,materialIndex:0}]);for(let c=0,u=l.length;c<u;++c){let h=l[c],d=h.start,p=h.count;for(let f=d,m=d+p;f<m;f+=3)for(let g=0;g<3;g++){let y=s.getX(f+g),b=s.getX(f+(g+1)%3);i.fromBufferAttribute(a,y),o.fromBufferAttribute(a,b),aW(i,o,n)===!0&&(t.push(i.x,i.y,i.z),t.push(o.x,o.y,o.z))}}}else{let a=e.attributes.position;for(let s=0,l=a.count/3;s<l;s++)for(let c=0;c<3;c++){let u=3*s+c,h=3*s+(c+1)%3;i.fromBufferAttribute(a,u),o.fromBufferAttribute(a,h),aW(i,o,n)===!0&&(t.push(i.x,i.y,i.z),t.push(o.x,o.y,o.z))}}this.setAttribute("position",new Jt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}};function aW(r,e,t){let n=`${r.x},${r.y},${r.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${r.x},${r.y},${r.z}`;return t.has(n)===!0||t.has(i)===!0?!1:(t.add(n),t.add(i),!0)}var iP=class extends mo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=VW,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},oP=class extends mo{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};var Gw=class extends Fi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};function BM(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)}function Pye(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var rf=class{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,i=t[n],o=t[n-1];e:{t:{let a;n:{r:if(!(e<i)){for(let s=n+2;;){if(i===void 0){if(e<o)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===s)break;if(o=i,i=t[++n],e<i)break t}a=t.length;break n}if(!(e>=o)){let s=t[1];e<s&&(n=2,o=s);for(let l=n-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=o,o=t[--n-1],e>=o)break t}a=n,n=0;break n}break e}for(;n<a;){let s=n+a>>>1;e<t[s]?a=s:n=s+1}if(i=t[n],o=t[n-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,o,i)}return this.interpolate_(n,o,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,o=e*i;for(let a=0;a!==i;++a)t[a]=n[o+a];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}},aP=class extends rf{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:SR,endingEnd:SR}}intervalChanged_(e,t,n){let i=this.parameterPositions,o=e-2,a=e+1,s=i[o],l=i[a];if(s===void 0)switch(this.getSettings_().endingStart){case AR:o=e,s=2*t-n;break;case MR:o=i.length-2,s=t+i[o]-i[o+1];break;default:o=e,s=n}if(l===void 0)switch(this.getSettings_().endingEnd){case AR:a=e,l=2*n-t;break;case MR:a=1,l=n+i[1]-i[0];break;default:a=e-1,l=t}let c=(n-t)*.5,u=this.valueSize;this._weightPrev=c/(t-s),this._weightNext=c/(l-n),this._offsetPrev=o*u,this._offsetNext=a*u}interpolate_(e,t,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=e*s,c=l-s,u=this._offsetPrev,h=this._offsetNext,d=this._weightPrev,p=this._weightNext,f=(n-t)/(i-t),m=f*f,g=m*f,y=-d*g+2*d*m-d*f,b=(1+d)*g+(-1.5-2*d)*m+(-.5+d)*f+1,v=(-1-p)*g+(1.5+p)*m+.5*f,x=p*g-p*m;for(let w=0;w!==s;++w)o[w]=y*a[u+w]+b*a[c+w]+v*a[l+w]+x*a[h+w];return o}},sP=class extends rf{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=e*s,c=l-s,u=(n-t)/(i-t),h=1-u;for(let d=0;d!==s;++d)o[d]=a[c+d]*h+a[l+d]*u;return o}},lP=class extends rf{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}},Ps=class{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=BM(t,this.TimeBufferType),this.values=BM(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){let t=e.constructor,n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:BM(e.times,Array),values:BM(e.values,Array)};let i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new lP(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new sP(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new aP(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Pw:t=this.InterpolantFactoryMethodDiscrete;break;case GM:t=this.InterpolantFactoryMethodLinear;break;case NM:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Pw;case this.InterpolantFactoryMethodLinear:return GM;case this.InterpolantFactoryMethodSmooth:return NM}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){let t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){let t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){let n=this.times,i=n.length,o=0,a=i-1;for(;o!==i&&n[o]<e;)++o;for(;a!==-1&&n[a]>t;)--a;if(++a,o!==0||a!==i){o>=a&&(a=Math.max(a,1),o=a-1);let s=this.getValueSize();this.times=n.slice(o,a),this.values=this.values.slice(o*s,a*s)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,i=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let s=0;s!==o;s++){let l=n[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),e=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,a),e=!1;break}a=l}if(i!==void 0&&Pye(i))for(let s=0,l=i.length;s!==l;++s){let c=i[s];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,c),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===NM,o=e.length-1,a=1;for(let s=1;s<o;++s){let l=!1,c=e[s],u=e[s+1];if(c!==u&&(s!==1||c!==e[0]))if(i)l=!0;else{let h=s*n,d=h-n,p=h+n;for(let f=0;f!==n;++f){let m=t[h+f];if(m!==t[d+f]||m!==t[p+f]){l=!0;break}}}if(l){if(s!==a){e[a]=e[s];let h=s*n,d=a*n;for(let p=0;p!==n;++p)t[d+p]=t[h+p]}++a}}if(o>0){e[a]=e[o];for(let s=o*n,l=a*n,c=0;c!==n;++c)t[l+c]=t[s+c];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}};Ps.prototype.TimeBufferType=Float32Array;Ps.prototype.ValueBufferType=Float32Array;Ps.prototype.DefaultInterpolation=GM;var Qh=class extends Ps{constructor(e,t,n){super(e,t,n)}};Qh.prototype.ValueTypeName="bool";Qh.prototype.ValueBufferType=Array;Qh.prototype.DefaultInterpolation=Pw;Qh.prototype.InterpolantFactoryMethodLinear=void 0;Qh.prototype.InterpolantFactoryMethodSmooth=void 0;var cP=class extends Ps{};cP.prototype.ValueTypeName="color";var uP=class extends Ps{};uP.prototype.ValueTypeName="number";var hP=class extends rf{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=(n-t)/(i-t),c=e*s;for(let u=c+s;c!==u;c+=4)ha.slerpFlat(o,0,a,c-s,a,c,l);return o}},Hw=class extends Ps{InterpolantFactoryMethodLinear(e){return new hP(this.times,this.values,this.getValueSize(),e)}};Hw.prototype.ValueTypeName="quaternion";Hw.prototype.InterpolantFactoryMethodSmooth=void 0;var ed=class extends Ps{constructor(e,t,n){super(e,t,n)}};ed.prototype.ValueTypeName="string";ed.prototype.ValueBufferType=Array;ed.prototype.DefaultInterpolation=Pw;ed.prototype.InterpolantFactoryMethodLinear=void 0;ed.prototype.InterpolantFactoryMethodSmooth=void 0;var dP=class extends Ps{};dP.prototype.ValueTypeName="vector";var Ww={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}},pP=class{constructor(e,t,n){let i=this,o=!1,a=0,s=0,l,c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(u){s++,o===!1&&i.onStart!==void 0&&i.onStart(u,a,s),o=!0},this.itemEnd=function(u){a++,i.onProgress!==void 0&&i.onProgress(u,a,s),a===s&&(o=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(u){i.onError!==void 0&&i.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,h){return c.push(u,h),this},this.removeHandler=function(u){let h=c.indexOf(u);return h!==-1&&c.splice(h,2),this},this.getHandler=function(u){for(let h=0,d=c.length;h<d;h+=2){let p=c[h],f=c[h+1];if(p.global&&(p.lastIndex=0),p.test(u))return f}return null}}},lX=new pP,of=class{constructor(e){this.manager=e!==void 0?e:lX,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){let n=this;return new Promise(function(i,o){n.load(e,i,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}};of.DEFAULT_MATERIAL_NAME="__DEFAULT";var zu={},kR=class extends Error{constructor(e,t){super(e),this.response=t}},Xw=class extends of{constructor(e){super(e)}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let o=Ww.get(e);if(o!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(o),this.manager.itemEnd(e)},0),o;if(zu[e]!==void 0){zu[e].push({onLoad:t,onProgress:n,onError:i});return}zu[e]=[],zu[e].push({onLoad:t,onProgress:n,onError:i});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;let u=zu[e],h=c.body.getReader(),d=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),p=d?parseInt(d):0,f=p!==0,m=0,g=new ReadableStream({start(y){b();function b(){h.read().then(({done:v,value:x})=>{if(v)y.close();else{m+=x.byteLength;let w=new ProgressEvent("progress",{lengthComputable:f,loaded:m,total:p});for(let _=0,A=u.length;_<A;_++){let E=u[_];E.onProgress&&E.onProgress(w)}y.enqueue(x),b()}},v=>{y.error(v)})}}});return new Response(g)}else throw new kR(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,s));case"json":return c.json();default:if(s===void 0)return c.text();{let h=/charset="?([^;"\s]*)"?/i.exec(s),d=h&&h[1]?h[1].toLowerCase():void 0,p=new TextDecoder(d);return c.arrayBuffer().then(f=>p.decode(f))}}}).then(c=>{Ww.add(e,c);let u=zu[e];delete zu[e];for(let h=0,d=u.length;h<d;h++){let p=u[h];p.onLoad&&p.onLoad(c)}}).catch(c=>{let u=zu[e];if(u===void 0)throw this.manager.itemError(e),c;delete zu[e];for(let h=0,d=u.length;h<d;h++){let p=u[h];p.onError&&p.onError(c)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}};var fP=class extends of{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let o=this,a=Ww.get(e);if(a!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(a),o.manager.itemEnd(e)},0),a;let s=Ey("img");function l(){u(),Ww.add(e,this),t&&t(this),o.manager.itemEnd(e)}function c(h){u(),i&&i(h),o.manager.itemError(e),o.manager.itemEnd(e)}function u(){s.removeEventListener("load",l,!1),s.removeEventListener("error",c,!1)}return s.addEventListener("load",l,!1),s.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(s.crossOrigin=this.crossOrigin),o.manager.itemStart(e),s.src=e,s}};var Yw=class extends of{constructor(e){super(e)}load(e,t,n,i){let o=new wi,a=new fP(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(s){o.image=s,o.needsUpdate=!0,t!==void 0&&t(o)},n,i),o}};var Ga=class extends Iw{constructor(e=-1,t=1,n=1,i=-1,o=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=o,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,o,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,o=n-e,a=n+e,s=i+t,l=i-t;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,a=o+c*this.view.width,s-=u*this.view.offsetY,l=s-u*this.view.height}this.projectionMatrix.makeOrthographic(o,a,s,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};var $w=class extends ot{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}};var mP=class extends ca{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}};var t4="\\[\\]\\.:\\/",Eye=new RegExp("["+t4+"]","g"),n4="[^"+t4+"]",Cye="[^"+t4.replace("\\.","")+"]",Tye=/((?:WC+[\/:])*)/.source.replace("WC",n4),kye=/(WCOD+)?/.source.replace("WCOD",Cye),Iye=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",n4),Lye=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",n4),Oye=new RegExp("^"+Tye+kye+Iye+Lye+"$"),Dye=["material","materials","bones","map"],IR=class{constructor(e,t,n){let i=n||nr.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=n.length;i!==o;++i)n[i].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},nr=class r{constructor(e,t,n){this.path=t,this.parsedPath=n||r.parseTrackName(t),this.node=r.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new r.Composite(e,t,n):new r(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Eye,"")}static parseTrackName(e){let t=Oye.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let o=n.nodeName.substring(i+1);Dye.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(o){for(let a=0;a<o.length;a++){let s=o[a];if(s.name===t||s.uuid===t)return s;let l=n(s.children);if(l)return l}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node,t=this.parsedPath,n=t.objectName,i=t.propertyName,o=t.propertyIndex;if(e||(e=r.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let c=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let u=0;u<e.length;u++)if(e[u].name===c){c=u;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(c!==void 0){if(e[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[c]}}let a=e[i];if(a===void 0){let c=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",e);return}let s=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?s=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(s=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(o!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}l=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=o}else a.fromArray!==void 0&&a.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(l=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};nr.Composite=IR;nr.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};nr.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};nr.prototype.GetterByBindingType=[nr.prototype._getValue_direct,nr.prototype._getValue_array,nr.prototype._getValue_arrayElement,nr.prototype._getValue_toArray];nr.prototype.SetterByBindingTypeAndVersioning=[[nr.prototype._setValue_direct,nr.prototype._setValue_direct_setNeedsUpdate,nr.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[nr.prototype._setValue_array,nr.prototype._setValue_array_setNeedsUpdate,nr.prototype._setValue_array_setMatrixWorldNeedsUpdate],[nr.prototype._setValue_arrayElement,nr.prototype._setValue_arrayElement_setNeedsUpdate,nr.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[nr.prototype._setValue_fromArray,nr.prototype._setValue_fromArray_setNeedsUpdate,nr.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var Hnt=new Float32Array(1);var vl=class extends ky{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){let t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){let t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}};var sW=new vt,af=class{constructor(e,t,n=0,i=1/0){this.ray=new Vu(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Cy,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}setFromXRController(e){return sW.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(sW),this}intersectObject(e,t=!0,n=[]){return LR(e,this,n,t),n.sort(lW),n}intersectObjects(e,t=!0,n=[]){for(let i=0,o=e.length;i<o;i++)LR(e[i],this,n,t);return n.sort(lW),n}};function lW(r,e){return r.distance-e.distance}function LR(r,e,t,n){let i=!0;if(r.layers.test(e.layers)&&r.raycast(e,t)===!1&&(i=!1),i===!0&&n===!0){let o=r.children;for(let a=0,s=o.length;a<s;a++)LR(o[a],e,t,!0)}}var Oy=class{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=qt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(qt(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}};var cW=new Le,Dy=class{constructor(e=new Le(1/0,1/0),t=new Le(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=cW.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,cW).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},uW=new U,FM=new U,Kw=class{constructor(e=new U,t=new U){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){uW.subVectors(e,this.start),FM.subVectors(this.end,this.start);let n=FM.dot(FM),o=FM.dot(uW)/n;return t&&(o=qt(o,0,1)),o}closestPointToPoint(e,t,n){let i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}};var Ry=class{constructor(){this.type="ShapePath",this.color=new $e,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Zh,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,o,a){return this.currentPath.bezierCurveTo(e,t,n,i,o,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(y){let b=[];for(let v=0,x=y.length;v<x;v++){let w=y[v],_=new Vo;_.curves=w.curves,b.push(_)}return b}function n(y,b){let v=b.length,x=!1;for(let w=v-1,_=0;_<v;w=_++){let A=b[w],E=b[_],S=E.x-A.x,M=E.y-A.y;if(Math.abs(M)>Number.EPSILON){if(M<0&&(A=b[_],S=-S,E=b[w],M=-M),y.y<A.y||y.y>E.y)continue;if(y.y===A.y){if(y.x===A.x)return!0}else{let T=M*(y.x-A.x)-S*(y.y-A.y);if(T===0)return!0;if(T<0)continue;x=!x}}else{if(y.y!==A.y)continue;if(E.x<=y.x&&y.x<=A.x||A.x<=y.x&&y.x<=E.x)return!0}}return x}let i=dc.isClockWise,o=this.subPaths;if(o.length===0)return[];let a,s,l,c=[];if(o.length===1)return s=o[0],l=new Vo,l.curves=s.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;let h=[],d=[],p=[],f=0,m;d[f]=void 0,p[f]=[];for(let y=0,b=o.length;y<b;y++)s=o[y],m=s.getPoints(),a=i(m),a=e?!a:a,a?(!u&&d[f]&&f++,d[f]={s:new Vo,p:m},d[f].s.curves=s.curves,u&&f++,p[f]=[]):p[f].push({h:s,p:m[0]});if(!d[0])return t(o);if(d.length>1){let y=!1,b=0;for(let v=0,x=d.length;v<x;v++)h[v]=[];for(let v=0,x=d.length;v<x;v++){let w=p[v];for(let _=0;_<w.length;_++){let A=w[_],E=!0;for(let S=0;S<d.length;S++)n(A.p,d[S].p)&&(v!==S&&b++,E?(E=!1,h[S].push(A)):y=!0);E&&h[v].push(A)}}b>0&&y===!1&&(p=h)}let g;for(let y=0,b=d.length;y<b;y++){l=d[y].s,c.push(l),g=p[y];for(let v=0,x=g.length;v<x;v++)l.holes.push(g[v].h)}return c}},qw=class extends pc{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(){}disconnect(){}dispose(){}update(){}};function r4(r,e,t,n){let i=Rye(n);switch(t){case GR:return r*e;case WR:return r*e;case XR:return r*e*2;case TP:return r*e/i.components*i.byteLength;case kP:return r*e/i.components*i.byteLength;case YR:return r*e*2/i.components*i.byteLength;case IP:return r*e*2/i.components*i.byteLength;case HR:return r*e*3/i.components*i.byteLength;case oi:return r*e*4/i.components*i.byteLength;case LP:return r*e*4/i.components*i.byteLength;case Qw:case e_:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*8;case t_:case n_:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case DP:case BP:return Math.max(r,16)*Math.max(e,8)/4;case OP:case RP:return Math.max(r,8)*Math.max(e,8)/2;case FP:case NP:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*8;case zP:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case UP:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case jP:return Math.floor((r+4)/5)*Math.floor((e+3)/4)*16;case VP:return Math.floor((r+4)/5)*Math.floor((e+4)/5)*16;case GP:return Math.floor((r+5)/6)*Math.floor((e+4)/5)*16;case HP:return Math.floor((r+5)/6)*Math.floor((e+5)/6)*16;case WP:return Math.floor((r+7)/8)*Math.floor((e+4)/5)*16;case XP:return Math.floor((r+7)/8)*Math.floor((e+5)/6)*16;case YP:return Math.floor((r+7)/8)*Math.floor((e+7)/8)*16;case $P:return Math.floor((r+9)/10)*Math.floor((e+4)/5)*16;case KP:return Math.floor((r+9)/10)*Math.floor((e+5)/6)*16;case qP:return Math.floor((r+9)/10)*Math.floor((e+7)/8)*16;case ZP:return Math.floor((r+9)/10)*Math.floor((e+9)/10)*16;case JP:return Math.floor((r+11)/12)*Math.floor((e+9)/10)*16;case QP:return Math.floor((r+11)/12)*Math.floor((e+11)/12)*16;case r_:case eE:case tE:return Math.ceil(r/4)*Math.ceil(e/4)*16;case $R:case nE:return Math.ceil(r/4)*Math.ceil(e/4)*8;case rE:case iE:return Math.ceil(r/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function Rye(r){switch(r){case pa:case UR:return{byteLength:1,components:1};case By:case jR:case Fy:return{byteLength:2,components:1};case EP:case CP:return{byteLength:2,components:4};case nd:case PP:case Wa:return{byteLength:4,components:1};case VR:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${r}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"172"}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="172");function LX(){let r=null,e=!1,t=null,n=null;function i(o,a){t(o,a),n=r.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(n=r.requestAnimationFrame(i),e=!0)},stop:function(){r.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(o){t=o},setContext:function(o){r=o}}}function Uye(r){let e=new WeakMap;function t(s,l){let c=s.array,u=s.usage,h=c.byteLength,d=r.createBuffer();r.bindBuffer(l,d),r.bufferData(l,c,u),s.onUploadCallback();let p;if(c instanceof Float32Array)p=r.FLOAT;else if(c instanceof Uint16Array)s.isFloat16BufferAttribute?p=r.HALF_FLOAT:p=r.UNSIGNED_SHORT;else if(c instanceof Int16Array)p=r.SHORT;else if(c instanceof Uint32Array)p=r.UNSIGNED_INT;else if(c instanceof Int32Array)p=r.INT;else if(c instanceof Int8Array)p=r.BYTE;else if(c instanceof Uint8Array)p=r.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)p=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:d,type:p,bytesPerElement:c.BYTES_PER_ELEMENT,version:s.version,size:h}}function n(s,l,c){let u=l.array,h=l.updateRanges;if(r.bindBuffer(c,s),h.length===0)r.bufferSubData(c,0,u);else{h.sort((p,f)=>p.start-f.start);let d=0;for(let p=1;p<h.length;p++){let f=h[d],m=h[p];m.start<=f.start+f.count+1?f.count=Math.max(f.count,m.start+m.count-f.start):(++d,h[d]=m)}h.length=d+1;for(let p=0,f=h.length;p<f;p++){let m=h[p];r.bufferSubData(c,m.start*u.BYTES_PER_ELEMENT,u,m.start,m.count)}l.clearUpdateRanges()}l.onUploadCallback()}function i(s){return s.isInterleavedBufferAttribute&&(s=s.data),e.get(s)}function o(s){s.isInterleavedBufferAttribute&&(s=s.data);let l=e.get(s);l&&(r.deleteBuffer(l.buffer),e.delete(s))}function a(s,l){if(s.isInterleavedBufferAttribute&&(s=s.data),s.isGLBufferAttribute){let u=e.get(s);(!u||u.version<s.version)&&e.set(s,{buffer:s.buffer,type:s.type,bytesPerElement:s.elementSize,version:s.version});return}let c=e.get(s);if(c===void 0)e.set(s,t(s,l));else if(c.version<s.version){if(c.size!==s.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(c.buffer,s,l),c.version=s.version}}return{get:i,remove:o,update:a}}var jye=`#ifdef USE_ALPHAHASH
  42. if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
  43. #endif`,Vye=`#ifdef USE_ALPHAHASH
  44. const float ALPHA_HASH_SCALE = 0.05;
  45. float hash2D( vec2 value ) {
  46. return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
  47. }
  48. float hash3D( vec3 value ) {
  49. return hash2D( vec2( hash2D( value.xy ), value.z ) );
  50. }
  51. float getAlphaHashThreshold( vec3 position ) {
  52. float maxDeriv = max(
  53. length( dFdx( position.xyz ) ),
  54. length( dFdy( position.xyz ) )
  55. );
  56. float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
  57. vec2 pixScales = vec2(
  58. exp2( floor( log2( pixScale ) ) ),
  59. exp2( ceil( log2( pixScale ) ) )
  60. );
  61. vec2 alpha = vec2(
  62. hash3D( floor( pixScales.x * position.xyz ) ),
  63. hash3D( floor( pixScales.y * position.xyz ) )
  64. );
  65. float lerpFactor = fract( log2( pixScale ) );
  66. float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
  67. float a = min( lerpFactor, 1.0 - lerpFactor );
  68. vec3 cases = vec3(
  69. x * x / ( 2.0 * a * ( 1.0 - a ) ),
  70. ( x - 0.5 * a ) / ( 1.0 - a ),
  71. 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
  72. );
  73. float threshold = ( x < ( 1.0 - a ) )
  74. ? ( ( x < a ) ? cases.x : cases.y )
  75. : cases.z;
  76. return clamp( threshold , 1.0e-6, 1.0 );
  77. }
  78. #endif`,Gye=`#ifdef USE_ALPHAMAP
  79. diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
  80. #endif`,Hye=`#ifdef USE_ALPHAMAP
  81. uniform sampler2D alphaMap;
  82. #endif`,Wye=`#ifdef USE_ALPHATEST
  83. #ifdef ALPHA_TO_COVERAGE
  84. diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
  85. if ( diffuseColor.a == 0.0 ) discard;
  86. #else
  87. if ( diffuseColor.a < alphaTest ) discard;
  88. #endif
  89. #endif`,Xye=`#ifdef USE_ALPHATEST
  90. uniform float alphaTest;
  91. #endif`,Yye=`#ifdef USE_AOMAP
  92. float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
  93. reflectedLight.indirectDiffuse *= ambientOcclusion;
  94. #if defined( USE_CLEARCOAT )
  95. clearcoatSpecularIndirect *= ambientOcclusion;
  96. #endif
  97. #if defined( USE_SHEEN )
  98. sheenSpecularIndirect *= ambientOcclusion;
  99. #endif
  100. #if defined( USE_ENVMAP ) && defined( STANDARD )
  101. float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
  102. reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
  103. #endif
  104. #endif`,$ye=`#ifdef USE_AOMAP
  105. uniform sampler2D aoMap;
  106. uniform float aoMapIntensity;
  107. #endif`,Kye=`#ifdef USE_BATCHING
  108. #if ! defined( GL_ANGLE_multi_draw )
  109. #define gl_DrawID _gl_DrawID
  110. uniform int _gl_DrawID;
  111. #endif
  112. uniform highp sampler2D batchingTexture;
  113. uniform highp usampler2D batchingIdTexture;
  114. mat4 getBatchingMatrix( const in float i ) {
  115. int size = textureSize( batchingTexture, 0 ).x;
  116. int j = int( i ) * 4;
  117. int x = j % size;
  118. int y = j / size;
  119. vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
  120. vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
  121. vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
  122. vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
  123. return mat4( v1, v2, v3, v4 );
  124. }
  125. float getIndirectIndex( const in int i ) {
  126. int size = textureSize( batchingIdTexture, 0 ).x;
  127. int x = i % size;
  128. int y = i / size;
  129. return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
  130. }
  131. #endif
  132. #ifdef USE_BATCHING_COLOR
  133. uniform sampler2D batchingColorTexture;
  134. vec3 getBatchingColor( const in float i ) {
  135. int size = textureSize( batchingColorTexture, 0 ).x;
  136. int j = int( i );
  137. int x = j % size;
  138. int y = j / size;
  139. return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
  140. }
  141. #endif`,qye=`#ifdef USE_BATCHING
  142. mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
  143. #endif`,Zye=`vec3 transformed = vec3( position );
  144. #ifdef USE_ALPHAHASH
  145. vPosition = vec3( position );
  146. #endif`,Jye=`vec3 objectNormal = vec3( normal );
  147. #ifdef USE_TANGENT
  148. vec3 objectTangent = vec3( tangent.xyz );
  149. #endif`,Qye=`float G_BlinnPhong_Implicit( ) {
  150. return 0.25;
  151. }
  152. float D_BlinnPhong( const in float shininess, const in float dotNH ) {
  153. return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
  154. }
  155. vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
  156. vec3 halfDir = normalize( lightDir + viewDir );
  157. float dotNH = saturate( dot( normal, halfDir ) );
  158. float dotVH = saturate( dot( viewDir, halfDir ) );
  159. vec3 F = F_Schlick( specularColor, 1.0, dotVH );
  160. float G = G_BlinnPhong_Implicit( );
  161. float D = D_BlinnPhong( shininess, dotNH );
  162. return F * ( G * D );
  163. } // validated`,ebe=`#ifdef USE_IRIDESCENCE
  164. const mat3 XYZ_TO_REC709 = mat3(
  165. 3.2404542, -0.9692660, 0.0556434,
  166. -1.5371385, 1.8760108, -0.2040259,
  167. -0.4985314, 0.0415560, 1.0572252
  168. );
  169. vec3 Fresnel0ToIor( vec3 fresnel0 ) {
  170. vec3 sqrtF0 = sqrt( fresnel0 );
  171. return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
  172. }
  173. vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
  174. return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
  175. }
  176. float IorToFresnel0( float transmittedIor, float incidentIor ) {
  177. return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
  178. }
  179. vec3 evalSensitivity( float OPD, vec3 shift ) {
  180. float phase = 2.0 * PI * OPD * 1.0e-9;
  181. vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
  182. vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
  183. vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
  184. vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
  185. xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );
  186. xyz /= 1.0685e-7;
  187. vec3 rgb = XYZ_TO_REC709 * xyz;
  188. return rgb;
  189. }
  190. vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
  191. vec3 I;
  192. float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
  193. float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
  194. float cosTheta2Sq = 1.0 - sinTheta2Sq;
  195. if ( cosTheta2Sq < 0.0 ) {
  196. return vec3( 1.0 );
  197. }
  198. float cosTheta2 = sqrt( cosTheta2Sq );
  199. float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
  200. float R12 = F_Schlick( R0, 1.0, cosTheta1 );
  201. float T121 = 1.0 - R12;
  202. float phi12 = 0.0;
  203. if ( iridescenceIOR < outsideIOR ) phi12 = PI;
  204. float phi21 = PI - phi12;
  205. vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
  206. vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
  207. vec3 phi23 = vec3( 0.0 );
  208. if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
  209. if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
  210. if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
  211. float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
  212. vec3 phi = vec3( phi21 ) + phi23;
  213. vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
  214. vec3 r123 = sqrt( R123 );
  215. vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
  216. vec3 C0 = R12 + Rs;
  217. I = C0;
  218. vec3 Cm = Rs - T121;
  219. for ( int m = 1; m <= 2; ++ m ) {
  220. Cm *= r123;
  221. vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
  222. I += Cm * Sm;
  223. }
  224. return max( I, vec3( 0.0 ) );
  225. }
  226. #endif`,tbe=`#ifdef USE_BUMPMAP
  227. uniform sampler2D bumpMap;
  228. uniform float bumpScale;
  229. vec2 dHdxy_fwd() {
  230. vec2 dSTdx = dFdx( vBumpMapUv );
  231. vec2 dSTdy = dFdy( vBumpMapUv );
  232. float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
  233. float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
  234. float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
  235. return vec2( dBx, dBy );
  236. }
  237. vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
  238. vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
  239. vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
  240. vec3 vN = surf_norm;
  241. vec3 R1 = cross( vSigmaY, vN );
  242. vec3 R2 = cross( vN, vSigmaX );
  243. float fDet = dot( vSigmaX, R1 ) * faceDirection;
  244. vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
  245. return normalize( abs( fDet ) * surf_norm - vGrad );
  246. }
  247. #endif`,nbe=`#if NUM_CLIPPING_PLANES > 0
  248. vec4 plane;
  249. #ifdef ALPHA_TO_COVERAGE
  250. float distanceToPlane, distanceGradient;
  251. float clipOpacity = 1.0;
  252. #pragma unroll_loop_start
  253. for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
  254. plane = clippingPlanes[ i ];
  255. distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
  256. distanceGradient = fwidth( distanceToPlane ) / 2.0;
  257. clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
  258. if ( clipOpacity == 0.0 ) discard;
  259. }
  260. #pragma unroll_loop_end
  261. #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
  262. float unionClipOpacity = 1.0;
  263. #pragma unroll_loop_start
  264. for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
  265. plane = clippingPlanes[ i ];
  266. distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
  267. distanceGradient = fwidth( distanceToPlane ) / 2.0;
  268. unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
  269. }
  270. #pragma unroll_loop_end
  271. clipOpacity *= 1.0 - unionClipOpacity;
  272. #endif
  273. diffuseColor.a *= clipOpacity;
  274. if ( diffuseColor.a == 0.0 ) discard;
  275. #else
  276. #pragma unroll_loop_start
  277. for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
  278. plane = clippingPlanes[ i ];
  279. if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
  280. }
  281. #pragma unroll_loop_end
  282. #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
  283. bool clipped = true;
  284. #pragma unroll_loop_start
  285. for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
  286. plane = clippingPlanes[ i ];
  287. clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
  288. }
  289. #pragma unroll_loop_end
  290. if ( clipped ) discard;
  291. #endif
  292. #endif
  293. #endif`,rbe=`#if NUM_CLIPPING_PLANES > 0
  294. varying vec3 vClipPosition;
  295. uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
  296. #endif`,ibe=`#if NUM_CLIPPING_PLANES > 0
  297. varying vec3 vClipPosition;
  298. #endif`,obe=`#if NUM_CLIPPING_PLANES > 0
  299. vClipPosition = - mvPosition.xyz;
  300. #endif`,abe=`#if defined( USE_COLOR_ALPHA )
  301. diffuseColor *= vColor;
  302. #elif defined( USE_COLOR )
  303. diffuseColor.rgb *= vColor;
  304. #endif`,sbe=`#if defined( USE_COLOR_ALPHA )
  305. varying vec4 vColor;
  306. #elif defined( USE_COLOR )
  307. varying vec3 vColor;
  308. #endif`,lbe=`#if defined( USE_COLOR_ALPHA )
  309. varying vec4 vColor;
  310. #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
  311. varying vec3 vColor;
  312. #endif`,cbe=`#if defined( USE_COLOR_ALPHA )
  313. vColor = vec4( 1.0 );
  314. #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
  315. vColor = vec3( 1.0 );
  316. #endif
  317. #ifdef USE_COLOR
  318. vColor *= color;
  319. #endif
  320. #ifdef USE_INSTANCING_COLOR
  321. vColor.xyz *= instanceColor.xyz;
  322. #endif
  323. #ifdef USE_BATCHING_COLOR
  324. vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
  325. vColor.xyz *= batchingColor.xyz;
  326. #endif`,ube=`#define PI 3.141592653589793
  327. #define PI2 6.283185307179586
  328. #define PI_HALF 1.5707963267948966
  329. #define RECIPROCAL_PI 0.3183098861837907
  330. #define RECIPROCAL_PI2 0.15915494309189535
  331. #define EPSILON 1e-6
  332. #ifndef saturate
  333. #define saturate( a ) clamp( a, 0.0, 1.0 )
  334. #endif
  335. #define whiteComplement( a ) ( 1.0 - saturate( a ) )
  336. float pow2( const in float x ) { return x*x; }
  337. vec3 pow2( const in vec3 x ) { return x*x; }
  338. float pow3( const in float x ) { return x*x*x; }
  339. float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
  340. float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
  341. float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
  342. highp float rand( const in vec2 uv ) {
  343. const highp float a = 12.9898, b = 78.233, c = 43758.5453;
  344. highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
  345. return fract( sin( sn ) * c );
  346. }
  347. #ifdef HIGH_PRECISION
  348. float precisionSafeLength( vec3 v ) { return length( v ); }
  349. #else
  350. float precisionSafeLength( vec3 v ) {
  351. float maxComponent = max3( abs( v ) );
  352. return length( v / maxComponent ) * maxComponent;
  353. }
  354. #endif
  355. struct IncidentLight {
  356. vec3 color;
  357. vec3 direction;
  358. bool visible;
  359. };
  360. struct ReflectedLight {
  361. vec3 directDiffuse;
  362. vec3 directSpecular;
  363. vec3 indirectDiffuse;
  364. vec3 indirectSpecular;
  365. };
  366. #ifdef USE_ALPHAHASH
  367. varying vec3 vPosition;
  368. #endif
  369. vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
  370. return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
  371. }
  372. vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
  373. return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
  374. }
  375. mat3 transposeMat3( const in mat3 m ) {
  376. mat3 tmp;
  377. tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
  378. tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
  379. tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
  380. return tmp;
  381. }
  382. bool isPerspectiveMatrix( mat4 m ) {
  383. return m[ 2 ][ 3 ] == - 1.0;
  384. }
  385. vec2 equirectUv( in vec3 dir ) {
  386. float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
  387. float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
  388. return vec2( u, v );
  389. }
  390. vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
  391. return RECIPROCAL_PI * diffuseColor;
  392. }
  393. vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
  394. float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
  395. return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
  396. }
  397. float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
  398. float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
  399. return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
  400. } // validated`,hbe=`#ifdef ENVMAP_TYPE_CUBE_UV
  401. #define cubeUV_minMipLevel 4.0
  402. #define cubeUV_minTileSize 16.0
  403. float getFace( vec3 direction ) {
  404. vec3 absDirection = abs( direction );
  405. float face = - 1.0;
  406. if ( absDirection.x > absDirection.z ) {
  407. if ( absDirection.x > absDirection.y )
  408. face = direction.x > 0.0 ? 0.0 : 3.0;
  409. else
  410. face = direction.y > 0.0 ? 1.0 : 4.0;
  411. } else {
  412. if ( absDirection.z > absDirection.y )
  413. face = direction.z > 0.0 ? 2.0 : 5.0;
  414. else
  415. face = direction.y > 0.0 ? 1.0 : 4.0;
  416. }
  417. return face;
  418. }
  419. vec2 getUV( vec3 direction, float face ) {
  420. vec2 uv;
  421. if ( face == 0.0 ) {
  422. uv = vec2( direction.z, direction.y ) / abs( direction.x );
  423. } else if ( face == 1.0 ) {
  424. uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
  425. } else if ( face == 2.0 ) {
  426. uv = vec2( - direction.x, direction.y ) / abs( direction.z );
  427. } else if ( face == 3.0 ) {
  428. uv = vec2( - direction.z, direction.y ) / abs( direction.x );
  429. } else if ( face == 4.0 ) {
  430. uv = vec2( - direction.x, direction.z ) / abs( direction.y );
  431. } else {
  432. uv = vec2( direction.x, direction.y ) / abs( direction.z );
  433. }
  434. return 0.5 * ( uv + 1.0 );
  435. }
  436. vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
  437. float face = getFace( direction );
  438. float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
  439. mipInt = max( mipInt, cubeUV_minMipLevel );
  440. float faceSize = exp2( mipInt );
  441. highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
  442. if ( face > 2.0 ) {
  443. uv.y += faceSize;
  444. face -= 3.0;
  445. }
  446. uv.x += face * faceSize;
  447. uv.x += filterInt * 3.0 * cubeUV_minTileSize;
  448. uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
  449. uv.x *= CUBEUV_TEXEL_WIDTH;
  450. uv.y *= CUBEUV_TEXEL_HEIGHT;
  451. #ifdef texture2DGradEXT
  452. return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
  453. #else
  454. return texture2D( envMap, uv ).rgb;
  455. #endif
  456. }
  457. #define cubeUV_r0 1.0
  458. #define cubeUV_m0 - 2.0
  459. #define cubeUV_r1 0.8
  460. #define cubeUV_m1 - 1.0
  461. #define cubeUV_r4 0.4
  462. #define cubeUV_m4 2.0
  463. #define cubeUV_r5 0.305
  464. #define cubeUV_m5 3.0
  465. #define cubeUV_r6 0.21
  466. #define cubeUV_m6 4.0
  467. float roughnessToMip( float roughness ) {
  468. float mip = 0.0;
  469. if ( roughness >= cubeUV_r1 ) {
  470. mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
  471. } else if ( roughness >= cubeUV_r4 ) {
  472. mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
  473. } else if ( roughness >= cubeUV_r5 ) {
  474. mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
  475. } else if ( roughness >= cubeUV_r6 ) {
  476. mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
  477. } else {
  478. mip = - 2.0 * log2( 1.16 * roughness ); }
  479. return mip;
  480. }
  481. vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
  482. float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
  483. float mipF = fract( mip );
  484. float mipInt = floor( mip );
  485. vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
  486. if ( mipF == 0.0 ) {
  487. return vec4( color0, 1.0 );
  488. } else {
  489. vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
  490. return vec4( mix( color0, color1, mipF ), 1.0 );
  491. }
  492. }
  493. #endif`,dbe=`vec3 transformedNormal = objectNormal;
  494. #ifdef USE_TANGENT
  495. vec3 transformedTangent = objectTangent;
  496. #endif
  497. #ifdef USE_BATCHING
  498. mat3 bm = mat3( batchingMatrix );
  499. transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
  500. transformedNormal = bm * transformedNormal;
  501. #ifdef USE_TANGENT
  502. transformedTangent = bm * transformedTangent;
  503. #endif
  504. #endif
  505. #ifdef USE_INSTANCING
  506. mat3 im = mat3( instanceMatrix );
  507. transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
  508. transformedNormal = im * transformedNormal;
  509. #ifdef USE_TANGENT
  510. transformedTangent = im * transformedTangent;
  511. #endif
  512. #endif
  513. transformedNormal = normalMatrix * transformedNormal;
  514. #ifdef FLIP_SIDED
  515. transformedNormal = - transformedNormal;
  516. #endif
  517. #ifdef USE_TANGENT
  518. transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
  519. #ifdef FLIP_SIDED
  520. transformedTangent = - transformedTangent;
  521. #endif
  522. #endif`,pbe=`#ifdef USE_DISPLACEMENTMAP
  523. uniform sampler2D displacementMap;
  524. uniform float displacementScale;
  525. uniform float displacementBias;
  526. #endif`,fbe=`#ifdef USE_DISPLACEMENTMAP
  527. transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
  528. #endif`,mbe=`#ifdef USE_EMISSIVEMAP
  529. vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
  530. #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
  531. emissiveColor = sRGBTransferEOTF( emissiveColor );
  532. #endif
  533. totalEmissiveRadiance *= emissiveColor.rgb;
  534. #endif`,gbe=`#ifdef USE_EMISSIVEMAP
  535. uniform sampler2D emissiveMap;
  536. #endif`,ybe="gl_FragColor = linearToOutputTexel( gl_FragColor );",bbe=`vec4 LinearTransferOETF( in vec4 value ) {
  537. return value;
  538. }
  539. vec4 sRGBTransferEOTF( in vec4 value ) {
  540. return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
  541. }
  542. vec4 sRGBTransferOETF( in vec4 value ) {
  543. return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
  544. }`,vbe=`#ifdef USE_ENVMAP
  545. #ifdef ENV_WORLDPOS
  546. vec3 cameraToFrag;
  547. if ( isOrthographic ) {
  548. cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
  549. } else {
  550. cameraToFrag = normalize( vWorldPosition - cameraPosition );
  551. }
  552. vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
  553. #ifdef ENVMAP_MODE_REFLECTION
  554. vec3 reflectVec = reflect( cameraToFrag, worldNormal );
  555. #else
  556. vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
  557. #endif
  558. #else
  559. vec3 reflectVec = vReflect;
  560. #endif
  561. #ifdef ENVMAP_TYPE_CUBE
  562. vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
  563. #else
  564. vec4 envColor = vec4( 0.0 );
  565. #endif
  566. #ifdef ENVMAP_BLENDING_MULTIPLY
  567. outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
  568. #elif defined( ENVMAP_BLENDING_MIX )
  569. outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
  570. #elif defined( ENVMAP_BLENDING_ADD )
  571. outgoingLight += envColor.xyz * specularStrength * reflectivity;
  572. #endif
  573. #endif`,xbe=`#ifdef USE_ENVMAP
  574. uniform float envMapIntensity;
  575. uniform float flipEnvMap;
  576. uniform mat3 envMapRotation;
  577. #ifdef ENVMAP_TYPE_CUBE
  578. uniform samplerCube envMap;
  579. #else
  580. uniform sampler2D envMap;
  581. #endif
  582. #endif`,wbe=`#ifdef USE_ENVMAP
  583. uniform float reflectivity;
  584. #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
  585. #define ENV_WORLDPOS
  586. #endif
  587. #ifdef ENV_WORLDPOS
  588. varying vec3 vWorldPosition;
  589. uniform float refractionRatio;
  590. #else
  591. varying vec3 vReflect;
  592. #endif
  593. #endif`,_be=`#ifdef USE_ENVMAP
  594. #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
  595. #define ENV_WORLDPOS
  596. #endif
  597. #ifdef ENV_WORLDPOS
  598. varying vec3 vWorldPosition;
  599. #else
  600. varying vec3 vReflect;
  601. uniform float refractionRatio;
  602. #endif
  603. #endif`,Sbe=`#ifdef USE_ENVMAP
  604. #ifdef ENV_WORLDPOS
  605. vWorldPosition = worldPosition.xyz;
  606. #else
  607. vec3 cameraToVertex;
  608. if ( isOrthographic ) {
  609. cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
  610. } else {
  611. cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
  612. }
  613. vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
  614. #ifdef ENVMAP_MODE_REFLECTION
  615. vReflect = reflect( cameraToVertex, worldNormal );
  616. #else
  617. vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
  618. #endif
  619. #endif
  620. #endif`,Abe=`#ifdef USE_FOG
  621. vFogDepth = - mvPosition.z;
  622. #endif`,Mbe=`#ifdef USE_FOG
  623. varying float vFogDepth;
  624. #endif`,Pbe=`#ifdef USE_FOG
  625. #ifdef FOG_EXP2
  626. float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
  627. #else
  628. float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
  629. #endif
  630. gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
  631. #endif`,Ebe=`#ifdef USE_FOG
  632. uniform vec3 fogColor;
  633. varying float vFogDepth;
  634. #ifdef FOG_EXP2
  635. uniform float fogDensity;
  636. #else
  637. uniform float fogNear;
  638. uniform float fogFar;
  639. #endif
  640. #endif`,Cbe=`#ifdef USE_GRADIENTMAP
  641. uniform sampler2D gradientMap;
  642. #endif
  643. vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
  644. float dotNL = dot( normal, lightDirection );
  645. vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
  646. #ifdef USE_GRADIENTMAP
  647. return vec3( texture2D( gradientMap, coord ).r );
  648. #else
  649. vec2 fw = fwidth( coord ) * 0.5;
  650. return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
  651. #endif
  652. }`,Tbe=`#ifdef USE_LIGHTMAP
  653. uniform sampler2D lightMap;
  654. uniform float lightMapIntensity;
  655. #endif`,kbe=`LambertMaterial material;
  656. material.diffuseColor = diffuseColor.rgb;
  657. material.specularStrength = specularStrength;`,Ibe=`varying vec3 vViewPosition;
  658. struct LambertMaterial {
  659. vec3 diffuseColor;
  660. float specularStrength;
  661. };
  662. void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
  663. float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
  664. vec3 irradiance = dotNL * directLight.color;
  665. reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  666. }
  667. void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
  668. reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  669. }
  670. #define RE_Direct RE_Direct_Lambert
  671. #define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Lbe=`uniform bool receiveShadow;
  672. uniform vec3 ambientLightColor;
  673. #if defined( USE_LIGHT_PROBES )
  674. uniform vec3 lightProbe[ 9 ];
  675. #endif
  676. vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
  677. float x = normal.x, y = normal.y, z = normal.z;
  678. vec3 result = shCoefficients[ 0 ] * 0.886227;
  679. result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
  680. result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
  681. result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
  682. result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
  683. result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
  684. result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
  685. result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
  686. result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
  687. return result;
  688. }
  689. vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
  690. vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
  691. vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
  692. return irradiance;
  693. }
  694. vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
  695. vec3 irradiance = ambientLightColor;
  696. return irradiance;
  697. }
  698. float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
  699. float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
  700. if ( cutoffDistance > 0.0 ) {
  701. distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
  702. }
  703. return distanceFalloff;
  704. }
  705. float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
  706. return smoothstep( coneCosine, penumbraCosine, angleCosine );
  707. }
  708. #if NUM_DIR_LIGHTS > 0
  709. struct DirectionalLight {
  710. vec3 direction;
  711. vec3 color;
  712. };
  713. uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
  714. void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
  715. light.color = directionalLight.color;
  716. light.direction = directionalLight.direction;
  717. light.visible = true;
  718. }
  719. #endif
  720. #if NUM_POINT_LIGHTS > 0
  721. struct PointLight {
  722. vec3 position;
  723. vec3 color;
  724. float distance;
  725. float decay;
  726. };
  727. uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
  728. void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
  729. vec3 lVector = pointLight.position - geometryPosition;
  730. light.direction = normalize( lVector );
  731. float lightDistance = length( lVector );
  732. light.color = pointLight.color;
  733. light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
  734. light.visible = ( light.color != vec3( 0.0 ) );
  735. }
  736. #endif
  737. #if NUM_SPOT_LIGHTS > 0
  738. struct SpotLight {
  739. vec3 position;
  740. vec3 direction;
  741. vec3 color;
  742. float distance;
  743. float decay;
  744. float coneCos;
  745. float penumbraCos;
  746. };
  747. uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
  748. void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
  749. vec3 lVector = spotLight.position - geometryPosition;
  750. light.direction = normalize( lVector );
  751. float angleCos = dot( light.direction, spotLight.direction );
  752. float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
  753. if ( spotAttenuation > 0.0 ) {
  754. float lightDistance = length( lVector );
  755. light.color = spotLight.color * spotAttenuation;
  756. light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
  757. light.visible = ( light.color != vec3( 0.0 ) );
  758. } else {
  759. light.color = vec3( 0.0 );
  760. light.visible = false;
  761. }
  762. }
  763. #endif
  764. #if NUM_RECT_AREA_LIGHTS > 0
  765. struct RectAreaLight {
  766. vec3 color;
  767. vec3 position;
  768. vec3 halfWidth;
  769. vec3 halfHeight;
  770. };
  771. uniform sampler2D ltc_1; uniform sampler2D ltc_2;
  772. uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
  773. #endif
  774. #if NUM_HEMI_LIGHTS > 0
  775. struct HemisphereLight {
  776. vec3 direction;
  777. vec3 skyColor;
  778. vec3 groundColor;
  779. };
  780. uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
  781. vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
  782. float dotNL = dot( normal, hemiLight.direction );
  783. float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
  784. vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
  785. return irradiance;
  786. }
  787. #endif`,Obe=`#ifdef USE_ENVMAP
  788. vec3 getIBLIrradiance( const in vec3 normal ) {
  789. #ifdef ENVMAP_TYPE_CUBE_UV
  790. vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
  791. vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
  792. return PI * envMapColor.rgb * envMapIntensity;
  793. #else
  794. return vec3( 0.0 );
  795. #endif
  796. }
  797. vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
  798. #ifdef ENVMAP_TYPE_CUBE_UV
  799. vec3 reflectVec = reflect( - viewDir, normal );
  800. reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
  801. reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
  802. vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
  803. return envMapColor.rgb * envMapIntensity;
  804. #else
  805. return vec3( 0.0 );
  806. #endif
  807. }
  808. #ifdef USE_ANISOTROPY
  809. vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
  810. #ifdef ENVMAP_TYPE_CUBE_UV
  811. vec3 bentNormal = cross( bitangent, viewDir );
  812. bentNormal = normalize( cross( bentNormal, bitangent ) );
  813. bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
  814. return getIBLRadiance( viewDir, bentNormal, roughness );
  815. #else
  816. return vec3( 0.0 );
  817. #endif
  818. }
  819. #endif
  820. #endif`,Dbe=`ToonMaterial material;
  821. material.diffuseColor = diffuseColor.rgb;`,Rbe=`varying vec3 vViewPosition;
  822. struct ToonMaterial {
  823. vec3 diffuseColor;
  824. };
  825. void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
  826. vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
  827. reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  828. }
  829. void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
  830. reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  831. }
  832. #define RE_Direct RE_Direct_Toon
  833. #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Bbe=`BlinnPhongMaterial material;
  834. material.diffuseColor = diffuseColor.rgb;
  835. material.specularColor = specular;
  836. material.specularShininess = shininess;
  837. material.specularStrength = specularStrength;`,Fbe=`varying vec3 vViewPosition;
  838. struct BlinnPhongMaterial {
  839. vec3 diffuseColor;
  840. vec3 specularColor;
  841. float specularShininess;
  842. float specularStrength;
  843. };
  844. void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
  845. float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
  846. vec3 irradiance = dotNL * directLight.color;
  847. reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  848. reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
  849. }
  850. void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
  851. reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  852. }
  853. #define RE_Direct RE_Direct_BlinnPhong
  854. #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Nbe=`PhysicalMaterial material;
  855. material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
  856. vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
  857. float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
  858. material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
  859. material.roughness = min( material.roughness, 1.0 );
  860. #ifdef IOR
  861. material.ior = ior;
  862. #ifdef USE_SPECULAR
  863. float specularIntensityFactor = specularIntensity;
  864. vec3 specularColorFactor = specularColor;
  865. #ifdef USE_SPECULAR_COLORMAP
  866. specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
  867. #endif
  868. #ifdef USE_SPECULAR_INTENSITYMAP
  869. specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
  870. #endif
  871. material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
  872. #else
  873. float specularIntensityFactor = 1.0;
  874. vec3 specularColorFactor = vec3( 1.0 );
  875. material.specularF90 = 1.0;
  876. #endif
  877. material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
  878. #else
  879. material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
  880. material.specularF90 = 1.0;
  881. #endif
  882. #ifdef USE_CLEARCOAT
  883. material.clearcoat = clearcoat;
  884. material.clearcoatRoughness = clearcoatRoughness;
  885. material.clearcoatF0 = vec3( 0.04 );
  886. material.clearcoatF90 = 1.0;
  887. #ifdef USE_CLEARCOATMAP
  888. material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
  889. #endif
  890. #ifdef USE_CLEARCOAT_ROUGHNESSMAP
  891. material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
  892. #endif
  893. material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
  894. material.clearcoatRoughness += geometryRoughness;
  895. material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
  896. #endif
  897. #ifdef USE_DISPERSION
  898. material.dispersion = dispersion;
  899. #endif
  900. #ifdef USE_IRIDESCENCE
  901. material.iridescence = iridescence;
  902. material.iridescenceIOR = iridescenceIOR;
  903. #ifdef USE_IRIDESCENCEMAP
  904. material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
  905. #endif
  906. #ifdef USE_IRIDESCENCE_THICKNESSMAP
  907. material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
  908. #else
  909. material.iridescenceThickness = iridescenceThicknessMaximum;
  910. #endif
  911. #endif
  912. #ifdef USE_SHEEN
  913. material.sheenColor = sheenColor;
  914. #ifdef USE_SHEEN_COLORMAP
  915. material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
  916. #endif
  917. material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
  918. #ifdef USE_SHEEN_ROUGHNESSMAP
  919. material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
  920. #endif
  921. #endif
  922. #ifdef USE_ANISOTROPY
  923. #ifdef USE_ANISOTROPYMAP
  924. mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
  925. vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
  926. vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
  927. #else
  928. vec2 anisotropyV = anisotropyVector;
  929. #endif
  930. material.anisotropy = length( anisotropyV );
  931. if( material.anisotropy == 0.0 ) {
  932. anisotropyV = vec2( 1.0, 0.0 );
  933. } else {
  934. anisotropyV /= material.anisotropy;
  935. material.anisotropy = saturate( material.anisotropy );
  936. }
  937. material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
  938. material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
  939. material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
  940. #endif`,zbe=`struct PhysicalMaterial {
  941. vec3 diffuseColor;
  942. float roughness;
  943. vec3 specularColor;
  944. float specularF90;
  945. float dispersion;
  946. #ifdef USE_CLEARCOAT
  947. float clearcoat;
  948. float clearcoatRoughness;
  949. vec3 clearcoatF0;
  950. float clearcoatF90;
  951. #endif
  952. #ifdef USE_IRIDESCENCE
  953. float iridescence;
  954. float iridescenceIOR;
  955. float iridescenceThickness;
  956. vec3 iridescenceFresnel;
  957. vec3 iridescenceF0;
  958. #endif
  959. #ifdef USE_SHEEN
  960. vec3 sheenColor;
  961. float sheenRoughness;
  962. #endif
  963. #ifdef IOR
  964. float ior;
  965. #endif
  966. #ifdef USE_TRANSMISSION
  967. float transmission;
  968. float transmissionAlpha;
  969. float thickness;
  970. float attenuationDistance;
  971. vec3 attenuationColor;
  972. #endif
  973. #ifdef USE_ANISOTROPY
  974. float anisotropy;
  975. float alphaT;
  976. vec3 anisotropyT;
  977. vec3 anisotropyB;
  978. #endif
  979. };
  980. vec3 clearcoatSpecularDirect = vec3( 0.0 );
  981. vec3 clearcoatSpecularIndirect = vec3( 0.0 );
  982. vec3 sheenSpecularDirect = vec3( 0.0 );
  983. vec3 sheenSpecularIndirect = vec3(0.0 );
  984. vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
  985. float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
  986. float x2 = x * x;
  987. float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
  988. return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
  989. }
  990. float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
  991. float a2 = pow2( alpha );
  992. float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
  993. float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
  994. return 0.5 / max( gv + gl, EPSILON );
  995. }
  996. float D_GGX( const in float alpha, const in float dotNH ) {
  997. float a2 = pow2( alpha );
  998. float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
  999. return RECIPROCAL_PI * a2 / pow2( denom );
  1000. }
  1001. #ifdef USE_ANISOTROPY
  1002. float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {
  1003. float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
  1004. float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
  1005. float v = 0.5 / ( gv + gl );
  1006. return saturate(v);
  1007. }
  1008. float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
  1009. float a2 = alphaT * alphaB;
  1010. highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
  1011. highp float v2 = dot( v, v );
  1012. float w2 = a2 / v2;
  1013. return RECIPROCAL_PI * a2 * pow2 ( w2 );
  1014. }
  1015. #endif
  1016. #ifdef USE_CLEARCOAT
  1017. vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
  1018. vec3 f0 = material.clearcoatF0;
  1019. float f90 = material.clearcoatF90;
  1020. float roughness = material.clearcoatRoughness;
  1021. float alpha = pow2( roughness );
  1022. vec3 halfDir = normalize( lightDir + viewDir );
  1023. float dotNL = saturate( dot( normal, lightDir ) );
  1024. float dotNV = saturate( dot( normal, viewDir ) );
  1025. float dotNH = saturate( dot( normal, halfDir ) );
  1026. float dotVH = saturate( dot( viewDir, halfDir ) );
  1027. vec3 F = F_Schlick( f0, f90, dotVH );
  1028. float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
  1029. float D = D_GGX( alpha, dotNH );
  1030. return F * ( V * D );
  1031. }
  1032. #endif
  1033. vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
  1034. vec3 f0 = material.specularColor;
  1035. float f90 = material.specularF90;
  1036. float roughness = material.roughness;
  1037. float alpha = pow2( roughness );
  1038. vec3 halfDir = normalize( lightDir + viewDir );
  1039. float dotNL = saturate( dot( normal, lightDir ) );
  1040. float dotNV = saturate( dot( normal, viewDir ) );
  1041. float dotNH = saturate( dot( normal, halfDir ) );
  1042. float dotVH = saturate( dot( viewDir, halfDir ) );
  1043. vec3 F = F_Schlick( f0, f90, dotVH );
  1044. #ifdef USE_IRIDESCENCE
  1045. F = mix( F, material.iridescenceFresnel, material.iridescence );
  1046. #endif
  1047. #ifdef USE_ANISOTROPY
  1048. float dotTL = dot( material.anisotropyT, lightDir );
  1049. float dotTV = dot( material.anisotropyT, viewDir );
  1050. float dotTH = dot( material.anisotropyT, halfDir );
  1051. float dotBL = dot( material.anisotropyB, lightDir );
  1052. float dotBV = dot( material.anisotropyB, viewDir );
  1053. float dotBH = dot( material.anisotropyB, halfDir );
  1054. float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
  1055. float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
  1056. #else
  1057. float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
  1058. float D = D_GGX( alpha, dotNH );
  1059. #endif
  1060. return F * ( V * D );
  1061. }
  1062. vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
  1063. const float LUT_SIZE = 64.0;
  1064. const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
  1065. const float LUT_BIAS = 0.5 / LUT_SIZE;
  1066. float dotNV = saturate( dot( N, V ) );
  1067. vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
  1068. uv = uv * LUT_SCALE + LUT_BIAS;
  1069. return uv;
  1070. }
  1071. float LTC_ClippedSphereFormFactor( const in vec3 f ) {
  1072. float l = length( f );
  1073. return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
  1074. }
  1075. vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
  1076. float x = dot( v1, v2 );
  1077. float y = abs( x );
  1078. float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
  1079. float b = 3.4175940 + ( 4.1616724 + y ) * y;
  1080. float v = a / b;
  1081. float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
  1082. return cross( v1, v2 ) * theta_sintheta;
  1083. }
  1084. vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
  1085. vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
  1086. vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
  1087. vec3 lightNormal = cross( v1, v2 );
  1088. if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
  1089. vec3 T1, T2;
  1090. T1 = normalize( V - N * dot( V, N ) );
  1091. T2 = - cross( N, T1 );
  1092. mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
  1093. vec3 coords[ 4 ];
  1094. coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
  1095. coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
  1096. coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
  1097. coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
  1098. coords[ 0 ] = normalize( coords[ 0 ] );
  1099. coords[ 1 ] = normalize( coords[ 1 ] );
  1100. coords[ 2 ] = normalize( coords[ 2 ] );
  1101. coords[ 3 ] = normalize( coords[ 3 ] );
  1102. vec3 vectorFormFactor = vec3( 0.0 );
  1103. vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
  1104. vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
  1105. vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
  1106. vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
  1107. float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
  1108. return vec3( result );
  1109. }
  1110. #if defined( USE_SHEEN )
  1111. float D_Charlie( float roughness, float dotNH ) {
  1112. float alpha = pow2( roughness );
  1113. float invAlpha = 1.0 / alpha;
  1114. float cos2h = dotNH * dotNH;
  1115. float sin2h = max( 1.0 - cos2h, 0.0078125 );
  1116. return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
  1117. }
  1118. float V_Neubelt( float dotNV, float dotNL ) {
  1119. return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
  1120. }
  1121. vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
  1122. vec3 halfDir = normalize( lightDir + viewDir );
  1123. float dotNL = saturate( dot( normal, lightDir ) );
  1124. float dotNV = saturate( dot( normal, viewDir ) );
  1125. float dotNH = saturate( dot( normal, halfDir ) );
  1126. float D = D_Charlie( sheenRoughness, dotNH );
  1127. float V = V_Neubelt( dotNV, dotNL );
  1128. return sheenColor * ( D * V );
  1129. }
  1130. #endif
  1131. float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
  1132. float dotNV = saturate( dot( normal, viewDir ) );
  1133. float r2 = roughness * roughness;
  1134. float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
  1135. float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
  1136. float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
  1137. return saturate( DG * RECIPROCAL_PI );
  1138. }
  1139. vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
  1140. float dotNV = saturate( dot( normal, viewDir ) );
  1141. const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
  1142. const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
  1143. vec4 r = roughness * c0 + c1;
  1144. float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
  1145. vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
  1146. return fab;
  1147. }
  1148. vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
  1149. vec2 fab = DFGApprox( normal, viewDir, roughness );
  1150. return specularColor * fab.x + specularF90 * fab.y;
  1151. }
  1152. #ifdef USE_IRIDESCENCE
  1153. void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
  1154. #else
  1155. void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
  1156. #endif
  1157. vec2 fab = DFGApprox( normal, viewDir, roughness );
  1158. #ifdef USE_IRIDESCENCE
  1159. vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
  1160. #else
  1161. vec3 Fr = specularColor;
  1162. #endif
  1163. vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
  1164. float Ess = fab.x + fab.y;
  1165. float Ems = 1.0 - Ess;
  1166. vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
  1167. singleScatter += FssEss;
  1168. multiScatter += Fms * Ems;
  1169. }
  1170. #if NUM_RECT_AREA_LIGHTS > 0
  1171. void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
  1172. vec3 normal = geometryNormal;
  1173. vec3 viewDir = geometryViewDir;
  1174. vec3 position = geometryPosition;
  1175. vec3 lightPos = rectAreaLight.position;
  1176. vec3 halfWidth = rectAreaLight.halfWidth;
  1177. vec3 halfHeight = rectAreaLight.halfHeight;
  1178. vec3 lightColor = rectAreaLight.color;
  1179. float roughness = material.roughness;
  1180. vec3 rectCoords[ 4 ];
  1181. rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
  1182. rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
  1183. rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
  1184. vec2 uv = LTC_Uv( normal, viewDir, roughness );
  1185. vec4 t1 = texture2D( ltc_1, uv );
  1186. vec4 t2 = texture2D( ltc_2, uv );
  1187. mat3 mInv = mat3(
  1188. vec3( t1.x, 0, t1.y ),
  1189. vec3( 0, 1, 0 ),
  1190. vec3( t1.z, 0, t1.w )
  1191. );
  1192. vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
  1193. reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
  1194. reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
  1195. }
  1196. #endif
  1197. void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
  1198. float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
  1199. vec3 irradiance = dotNL * directLight.color;
  1200. #ifdef USE_CLEARCOAT
  1201. float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
  1202. vec3 ccIrradiance = dotNLcc * directLight.color;
  1203. clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
  1204. #endif
  1205. #ifdef USE_SHEEN
  1206. sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
  1207. #endif
  1208. reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
  1209. reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  1210. }
  1211. void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
  1212. reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
  1213. }
  1214. void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
  1215. #ifdef USE_CLEARCOAT
  1216. clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
  1217. #endif
  1218. #ifdef USE_SHEEN
  1219. sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
  1220. #endif
  1221. vec3 singleScattering = vec3( 0.0 );
  1222. vec3 multiScattering = vec3( 0.0 );
  1223. vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
  1224. #ifdef USE_IRIDESCENCE
  1225. computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
  1226. #else
  1227. computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
  1228. #endif
  1229. vec3 totalScattering = singleScattering + multiScattering;
  1230. vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
  1231. reflectedLight.indirectSpecular += radiance * singleScattering;
  1232. reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
  1233. reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
  1234. }
  1235. #define RE_Direct RE_Direct_Physical
  1236. #define RE_Direct_RectArea RE_Direct_RectArea_Physical
  1237. #define RE_IndirectDiffuse RE_IndirectDiffuse_Physical
  1238. #define RE_IndirectSpecular RE_IndirectSpecular_Physical
  1239. float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
  1240. return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
  1241. }`,Ube=`
  1242. vec3 geometryPosition = - vViewPosition;
  1243. vec3 geometryNormal = normal;
  1244. vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
  1245. vec3 geometryClearcoatNormal = vec3( 0.0 );
  1246. #ifdef USE_CLEARCOAT
  1247. geometryClearcoatNormal = clearcoatNormal;
  1248. #endif
  1249. #ifdef USE_IRIDESCENCE
  1250. float dotNVi = saturate( dot( normal, geometryViewDir ) );
  1251. if ( material.iridescenceThickness == 0.0 ) {
  1252. material.iridescence = 0.0;
  1253. } else {
  1254. material.iridescence = saturate( material.iridescence );
  1255. }
  1256. if ( material.iridescence > 0.0 ) {
  1257. material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
  1258. material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
  1259. }
  1260. #endif
  1261. IncidentLight directLight;
  1262. #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
  1263. PointLight pointLight;
  1264. #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
  1265. PointLightShadow pointLightShadow;
  1266. #endif
  1267. #pragma unroll_loop_start
  1268. for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
  1269. pointLight = pointLights[ i ];
  1270. getPointLightInfo( pointLight, geometryPosition, directLight );
  1271. #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
  1272. pointLightShadow = pointLightShadows[ i ];
  1273. directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
  1274. #endif
  1275. RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
  1276. }
  1277. #pragma unroll_loop_end
  1278. #endif
  1279. #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
  1280. SpotLight spotLight;
  1281. vec4 spotColor;
  1282. vec3 spotLightCoord;
  1283. bool inSpotLightMap;
  1284. #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
  1285. SpotLightShadow spotLightShadow;
  1286. #endif
  1287. #pragma unroll_loop_start
  1288. for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
  1289. spotLight = spotLights[ i ];
  1290. getSpotLightInfo( spotLight, geometryPosition, directLight );
  1291. #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
  1292. #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
  1293. #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
  1294. #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
  1295. #else
  1296. #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
  1297. #endif
  1298. #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
  1299. spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
  1300. inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
  1301. spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
  1302. directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
  1303. #endif
  1304. #undef SPOT_LIGHT_MAP_INDEX
  1305. #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
  1306. spotLightShadow = spotLightShadows[ i ];
  1307. directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
  1308. #endif
  1309. RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
  1310. }
  1311. #pragma unroll_loop_end
  1312. #endif
  1313. #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
  1314. DirectionalLight directionalLight;
  1315. #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
  1316. DirectionalLightShadow directionalLightShadow;
  1317. #endif
  1318. #pragma unroll_loop_start
  1319. for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
  1320. directionalLight = directionalLights[ i ];
  1321. getDirectionalLightInfo( directionalLight, directLight );
  1322. #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
  1323. directionalLightShadow = directionalLightShadows[ i ];
  1324. directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
  1325. #endif
  1326. RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
  1327. }
  1328. #pragma unroll_loop_end
  1329. #endif
  1330. #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
  1331. RectAreaLight rectAreaLight;
  1332. #pragma unroll_loop_start
  1333. for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
  1334. rectAreaLight = rectAreaLights[ i ];
  1335. RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
  1336. }
  1337. #pragma unroll_loop_end
  1338. #endif
  1339. #if defined( RE_IndirectDiffuse )
  1340. vec3 iblIrradiance = vec3( 0.0 );
  1341. vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
  1342. #if defined( USE_LIGHT_PROBES )
  1343. irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
  1344. #endif
  1345. #if ( NUM_HEMI_LIGHTS > 0 )
  1346. #pragma unroll_loop_start
  1347. for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
  1348. irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
  1349. }
  1350. #pragma unroll_loop_end
  1351. #endif
  1352. #endif
  1353. #if defined( RE_IndirectSpecular )
  1354. vec3 radiance = vec3( 0.0 );
  1355. vec3 clearcoatRadiance = vec3( 0.0 );
  1356. #endif`,jbe=`#if defined( RE_IndirectDiffuse )
  1357. #ifdef USE_LIGHTMAP
  1358. vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
  1359. vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
  1360. irradiance += lightMapIrradiance;
  1361. #endif
  1362. #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
  1363. iblIrradiance += getIBLIrradiance( geometryNormal );
  1364. #endif
  1365. #endif
  1366. #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
  1367. #ifdef USE_ANISOTROPY
  1368. radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
  1369. #else
  1370. radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
  1371. #endif
  1372. #ifdef USE_CLEARCOAT
  1373. clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
  1374. #endif
  1375. #endif`,Vbe=`#if defined( RE_IndirectDiffuse )
  1376. RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
  1377. #endif
  1378. #if defined( RE_IndirectSpecular )
  1379. RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
  1380. #endif`,Gbe=`#if defined( USE_LOGDEPTHBUF )
  1381. gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
  1382. #endif`,Hbe=`#if defined( USE_LOGDEPTHBUF )
  1383. uniform float logDepthBufFC;
  1384. varying float vFragDepth;
  1385. varying float vIsPerspective;
  1386. #endif`,Wbe=`#ifdef USE_LOGDEPTHBUF
  1387. varying float vFragDepth;
  1388. varying float vIsPerspective;
  1389. #endif`,Xbe=`#ifdef USE_LOGDEPTHBUF
  1390. vFragDepth = 1.0 + gl_Position.w;
  1391. vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
  1392. #endif`,Ybe=`#ifdef USE_MAP
  1393. vec4 sampledDiffuseColor = texture2D( map, vMapUv );
  1394. #ifdef DECODE_VIDEO_TEXTURE
  1395. sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
  1396. #endif
  1397. diffuseColor *= sampledDiffuseColor;
  1398. #endif`,$be=`#ifdef USE_MAP
  1399. uniform sampler2D map;
  1400. #endif`,Kbe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
  1401. #if defined( USE_POINTS_UV )
  1402. vec2 uv = vUv;
  1403. #else
  1404. vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
  1405. #endif
  1406. #endif
  1407. #ifdef USE_MAP
  1408. diffuseColor *= texture2D( map, uv );
  1409. #endif
  1410. #ifdef USE_ALPHAMAP
  1411. diffuseColor.a *= texture2D( alphaMap, uv ).g;
  1412. #endif`,qbe=`#if defined( USE_POINTS_UV )
  1413. varying vec2 vUv;
  1414. #else
  1415. #if defined( USE_MAP ) || defined( USE_ALPHAMAP )
  1416. uniform mat3 uvTransform;
  1417. #endif
  1418. #endif
  1419. #ifdef USE_MAP
  1420. uniform sampler2D map;
  1421. #endif
  1422. #ifdef USE_ALPHAMAP
  1423. uniform sampler2D alphaMap;
  1424. #endif`,Zbe=`float metalnessFactor = metalness;
  1425. #ifdef USE_METALNESSMAP
  1426. vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
  1427. metalnessFactor *= texelMetalness.b;
  1428. #endif`,Jbe=`#ifdef USE_METALNESSMAP
  1429. uniform sampler2D metalnessMap;
  1430. #endif`,Qbe=`#ifdef USE_INSTANCING_MORPH
  1431. float morphTargetInfluences[ MORPHTARGETS_COUNT ];
  1432. float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
  1433. for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
  1434. morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
  1435. }
  1436. #endif`,eve=`#if defined( USE_MORPHCOLORS )
  1437. vColor *= morphTargetBaseInfluence;
  1438. for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
  1439. #if defined( USE_COLOR_ALPHA )
  1440. if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
  1441. #elif defined( USE_COLOR )
  1442. if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
  1443. #endif
  1444. }
  1445. #endif`,tve=`#ifdef USE_MORPHNORMALS
  1446. objectNormal *= morphTargetBaseInfluence;
  1447. for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
  1448. if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
  1449. }
  1450. #endif`,nve=`#ifdef USE_MORPHTARGETS
  1451. #ifndef USE_INSTANCING_MORPH
  1452. uniform float morphTargetBaseInfluence;
  1453. uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
  1454. #endif
  1455. uniform sampler2DArray morphTargetsTexture;
  1456. uniform ivec2 morphTargetsTextureSize;
  1457. vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
  1458. int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
  1459. int y = texelIndex / morphTargetsTextureSize.x;
  1460. int x = texelIndex - y * morphTargetsTextureSize.x;
  1461. ivec3 morphUV = ivec3( x, y, morphTargetIndex );
  1462. return texelFetch( morphTargetsTexture, morphUV, 0 );
  1463. }
  1464. #endif`,rve=`#ifdef USE_MORPHTARGETS
  1465. transformed *= morphTargetBaseInfluence;
  1466. for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
  1467. if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
  1468. }
  1469. #endif`,ive=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
  1470. #ifdef FLAT_SHADED
  1471. vec3 fdx = dFdx( vViewPosition );
  1472. vec3 fdy = dFdy( vViewPosition );
  1473. vec3 normal = normalize( cross( fdx, fdy ) );
  1474. #else
  1475. vec3 normal = normalize( vNormal );
  1476. #ifdef DOUBLE_SIDED
  1477. normal *= faceDirection;
  1478. #endif
  1479. #endif
  1480. #if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
  1481. #ifdef USE_TANGENT
  1482. mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
  1483. #else
  1484. mat3 tbn = getTangentFrame( - vViewPosition, normal,
  1485. #if defined( USE_NORMALMAP )
  1486. vNormalMapUv
  1487. #elif defined( USE_CLEARCOAT_NORMALMAP )
  1488. vClearcoatNormalMapUv
  1489. #else
  1490. vUv
  1491. #endif
  1492. );
  1493. #endif
  1494. #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
  1495. tbn[0] *= faceDirection;
  1496. tbn[1] *= faceDirection;
  1497. #endif
  1498. #endif
  1499. #ifdef USE_CLEARCOAT_NORMALMAP
  1500. #ifdef USE_TANGENT
  1501. mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
  1502. #else
  1503. mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
  1504. #endif
  1505. #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
  1506. tbn2[0] *= faceDirection;
  1507. tbn2[1] *= faceDirection;
  1508. #endif
  1509. #endif
  1510. vec3 nonPerturbedNormal = normal;`,ove=`#ifdef USE_NORMALMAP_OBJECTSPACE
  1511. normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
  1512. #ifdef FLIP_SIDED
  1513. normal = - normal;
  1514. #endif
  1515. #ifdef DOUBLE_SIDED
  1516. normal = normal * faceDirection;
  1517. #endif
  1518. normal = normalize( normalMatrix * normal );
  1519. #elif defined( USE_NORMALMAP_TANGENTSPACE )
  1520. vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
  1521. mapN.xy *= normalScale;
  1522. normal = normalize( tbn * mapN );
  1523. #elif defined( USE_BUMPMAP )
  1524. normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
  1525. #endif`,ave=`#ifndef FLAT_SHADED
  1526. varying vec3 vNormal;
  1527. #ifdef USE_TANGENT
  1528. varying vec3 vTangent;
  1529. varying vec3 vBitangent;
  1530. #endif
  1531. #endif`,sve=`#ifndef FLAT_SHADED
  1532. varying vec3 vNormal;
  1533. #ifdef USE_TANGENT
  1534. varying vec3 vTangent;
  1535. varying vec3 vBitangent;
  1536. #endif
  1537. #endif`,lve=`#ifndef FLAT_SHADED
  1538. vNormal = normalize( transformedNormal );
  1539. #ifdef USE_TANGENT
  1540. vTangent = normalize( transformedTangent );
  1541. vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
  1542. #endif
  1543. #endif`,cve=`#ifdef USE_NORMALMAP
  1544. uniform sampler2D normalMap;
  1545. uniform vec2 normalScale;
  1546. #endif
  1547. #ifdef USE_NORMALMAP_OBJECTSPACE
  1548. uniform mat3 normalMatrix;
  1549. #endif
  1550. #if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
  1551. mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
  1552. vec3 q0 = dFdx( eye_pos.xyz );
  1553. vec3 q1 = dFdy( eye_pos.xyz );
  1554. vec2 st0 = dFdx( uv.st );
  1555. vec2 st1 = dFdy( uv.st );
  1556. vec3 N = surf_norm;
  1557. vec3 q1perp = cross( q1, N );
  1558. vec3 q0perp = cross( N, q0 );
  1559. vec3 T = q1perp * st0.x + q0perp * st1.x;
  1560. vec3 B = q1perp * st0.y + q0perp * st1.y;
  1561. float det = max( dot( T, T ), dot( B, B ) );
  1562. float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
  1563. return mat3( T * scale, B * scale, N );
  1564. }
  1565. #endif`,uve=`#ifdef USE_CLEARCOAT
  1566. vec3 clearcoatNormal = nonPerturbedNormal;
  1567. #endif`,hve=`#ifdef USE_CLEARCOAT_NORMALMAP
  1568. vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
  1569. clearcoatMapN.xy *= clearcoatNormalScale;
  1570. clearcoatNormal = normalize( tbn2 * clearcoatMapN );
  1571. #endif`,dve=`#ifdef USE_CLEARCOATMAP
  1572. uniform sampler2D clearcoatMap;
  1573. #endif
  1574. #ifdef USE_CLEARCOAT_NORMALMAP
  1575. uniform sampler2D clearcoatNormalMap;
  1576. uniform vec2 clearcoatNormalScale;
  1577. #endif
  1578. #ifdef USE_CLEARCOAT_ROUGHNESSMAP
  1579. uniform sampler2D clearcoatRoughnessMap;
  1580. #endif`,pve=`#ifdef USE_IRIDESCENCEMAP
  1581. uniform sampler2D iridescenceMap;
  1582. #endif
  1583. #ifdef USE_IRIDESCENCE_THICKNESSMAP
  1584. uniform sampler2D iridescenceThicknessMap;
  1585. #endif`,fve=`#ifdef OPAQUE
  1586. diffuseColor.a = 1.0;
  1587. #endif
  1588. #ifdef USE_TRANSMISSION
  1589. diffuseColor.a *= material.transmissionAlpha;
  1590. #endif
  1591. gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,mve=`vec3 packNormalToRGB( const in vec3 normal ) {
  1592. return normalize( normal ) * 0.5 + 0.5;
  1593. }
  1594. vec3 unpackRGBToNormal( const in vec3 rgb ) {
  1595. return 2.0 * rgb.xyz - 1.0;
  1596. }
  1597. const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
  1598. const float Inv255 = 1. / 255.;
  1599. const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
  1600. const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
  1601. const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
  1602. const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
  1603. vec4 packDepthToRGBA( const in float v ) {
  1604. if( v <= 0.0 )
  1605. return vec4( 0., 0., 0., 0. );
  1606. if( v >= 1.0 )
  1607. return vec4( 1., 1., 1., 1. );
  1608. float vuf;
  1609. float af = modf( v * PackFactors.a, vuf );
  1610. float bf = modf( vuf * ShiftRight8, vuf );
  1611. float gf = modf( vuf * ShiftRight8, vuf );
  1612. return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
  1613. }
  1614. vec3 packDepthToRGB( const in float v ) {
  1615. if( v <= 0.0 )
  1616. return vec3( 0., 0., 0. );
  1617. if( v >= 1.0 )
  1618. return vec3( 1., 1., 1. );
  1619. float vuf;
  1620. float bf = modf( v * PackFactors.b, vuf );
  1621. float gf = modf( vuf * ShiftRight8, vuf );
  1622. return vec3( vuf * Inv255, gf * PackUpscale, bf );
  1623. }
  1624. vec2 packDepthToRG( const in float v ) {
  1625. if( v <= 0.0 )
  1626. return vec2( 0., 0. );
  1627. if( v >= 1.0 )
  1628. return vec2( 1., 1. );
  1629. float vuf;
  1630. float gf = modf( v * 256., vuf );
  1631. return vec2( vuf * Inv255, gf );
  1632. }
  1633. float unpackRGBAToDepth( const in vec4 v ) {
  1634. return dot( v, UnpackFactors4 );
  1635. }
  1636. float unpackRGBToDepth( const in vec3 v ) {
  1637. return dot( v, UnpackFactors3 );
  1638. }
  1639. float unpackRGToDepth( const in vec2 v ) {
  1640. return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
  1641. }
  1642. vec4 pack2HalfToRGBA( const in vec2 v ) {
  1643. vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
  1644. return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
  1645. }
  1646. vec2 unpackRGBATo2Half( const in vec4 v ) {
  1647. return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
  1648. }
  1649. float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
  1650. return ( viewZ + near ) / ( near - far );
  1651. }
  1652. float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
  1653. return depth * ( near - far ) - near;
  1654. }
  1655. float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
  1656. return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
  1657. }
  1658. float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
  1659. return ( near * far ) / ( ( far - near ) * depth - far );
  1660. }`,gve=`#ifdef PREMULTIPLIED_ALPHA
  1661. gl_FragColor.rgb *= gl_FragColor.a;
  1662. #endif`,yve=`vec4 mvPosition = vec4( transformed, 1.0 );
  1663. #ifdef USE_BATCHING
  1664. mvPosition = batchingMatrix * mvPosition;
  1665. #endif
  1666. #ifdef USE_INSTANCING
  1667. mvPosition = instanceMatrix * mvPosition;
  1668. #endif
  1669. mvPosition = modelViewMatrix * mvPosition;
  1670. gl_Position = projectionMatrix * mvPosition;`,bve=`#ifdef DITHERING
  1671. gl_FragColor.rgb = dithering( gl_FragColor.rgb );
  1672. #endif`,vve=`#ifdef DITHERING
  1673. vec3 dithering( vec3 color ) {
  1674. float grid_position = rand( gl_FragCoord.xy );
  1675. vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
  1676. dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
  1677. return color + dither_shift_RGB;
  1678. }
  1679. #endif`,xve=`float roughnessFactor = roughness;
  1680. #ifdef USE_ROUGHNESSMAP
  1681. vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
  1682. roughnessFactor *= texelRoughness.g;
  1683. #endif`,wve=`#ifdef USE_ROUGHNESSMAP
  1684. uniform sampler2D roughnessMap;
  1685. #endif`,_ve=`#if NUM_SPOT_LIGHT_COORDS > 0
  1686. varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
  1687. #endif
  1688. #if NUM_SPOT_LIGHT_MAPS > 0
  1689. uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
  1690. #endif
  1691. #ifdef USE_SHADOWMAP
  1692. #if NUM_DIR_LIGHT_SHADOWS > 0
  1693. uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
  1694. varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
  1695. struct DirectionalLightShadow {
  1696. float shadowIntensity;
  1697. float shadowBias;
  1698. float shadowNormalBias;
  1699. float shadowRadius;
  1700. vec2 shadowMapSize;
  1701. };
  1702. uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
  1703. #endif
  1704. #if NUM_SPOT_LIGHT_SHADOWS > 0
  1705. uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
  1706. struct SpotLightShadow {
  1707. float shadowIntensity;
  1708. float shadowBias;
  1709. float shadowNormalBias;
  1710. float shadowRadius;
  1711. vec2 shadowMapSize;
  1712. };
  1713. uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
  1714. #endif
  1715. #if NUM_POINT_LIGHT_SHADOWS > 0
  1716. uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
  1717. varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
  1718. struct PointLightShadow {
  1719. float shadowIntensity;
  1720. float shadowBias;
  1721. float shadowNormalBias;
  1722. float shadowRadius;
  1723. vec2 shadowMapSize;
  1724. float shadowCameraNear;
  1725. float shadowCameraFar;
  1726. };
  1727. uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
  1728. #endif
  1729. float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
  1730. return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
  1731. }
  1732. vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
  1733. return unpackRGBATo2Half( texture2D( shadow, uv ) );
  1734. }
  1735. float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
  1736. float occlusion = 1.0;
  1737. vec2 distribution = texture2DDistribution( shadow, uv );
  1738. float hard_shadow = step( compare , distribution.x );
  1739. if (hard_shadow != 1.0 ) {
  1740. float distance = compare - distribution.x ;
  1741. float variance = max( 0.00000, distribution.y * distribution.y );
  1742. float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
  1743. }
  1744. return occlusion;
  1745. }
  1746. float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
  1747. float shadow = 1.0;
  1748. shadowCoord.xyz /= shadowCoord.w;
  1749. shadowCoord.z += shadowBias;
  1750. bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
  1751. bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
  1752. if ( frustumTest ) {
  1753. #if defined( SHADOWMAP_TYPE_PCF )
  1754. vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
  1755. float dx0 = - texelSize.x * shadowRadius;
  1756. float dy0 = - texelSize.y * shadowRadius;
  1757. float dx1 = + texelSize.x * shadowRadius;
  1758. float dy1 = + texelSize.y * shadowRadius;
  1759. float dx2 = dx0 / 2.0;
  1760. float dy2 = dy0 / 2.0;
  1761. float dx3 = dx1 / 2.0;
  1762. float dy3 = dy1 / 2.0;
  1763. shadow = (
  1764. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
  1765. texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
  1766. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
  1767. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
  1768. texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
  1769. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
  1770. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
  1771. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
  1772. texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
  1773. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
  1774. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
  1775. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
  1776. texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
  1777. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
  1778. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
  1779. texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
  1780. texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
  1781. ) * ( 1.0 / 17.0 );
  1782. #elif defined( SHADOWMAP_TYPE_PCF_SOFT )
  1783. vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
  1784. float dx = texelSize.x;
  1785. float dy = texelSize.y;
  1786. vec2 uv = shadowCoord.xy;
  1787. vec2 f = fract( uv * shadowMapSize + 0.5 );
  1788. uv -= f * texelSize;
  1789. shadow = (
  1790. texture2DCompare( shadowMap, uv, shadowCoord.z ) +
  1791. texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
  1792. texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
  1793. texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
  1794. mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
  1795. texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
  1796. f.x ) +
  1797. mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
  1798. texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
  1799. f.x ) +
  1800. mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
  1801. texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
  1802. f.y ) +
  1803. mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
  1804. texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
  1805. f.y ) +
  1806. mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
  1807. texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
  1808. f.x ),
  1809. mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
  1810. texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
  1811. f.x ),
  1812. f.y )
  1813. ) * ( 1.0 / 9.0 );
  1814. #elif defined( SHADOWMAP_TYPE_VSM )
  1815. shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
  1816. #else
  1817. shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
  1818. #endif
  1819. }
  1820. return mix( 1.0, shadow, shadowIntensity );
  1821. }
  1822. vec2 cubeToUV( vec3 v, float texelSizeY ) {
  1823. vec3 absV = abs( v );
  1824. float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
  1825. absV *= scaleToCube;
  1826. v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
  1827. vec2 planar = v.xy;
  1828. float almostATexel = 1.5 * texelSizeY;
  1829. float almostOne = 1.0 - almostATexel;
  1830. if ( absV.z >= almostOne ) {
  1831. if ( v.z > 0.0 )
  1832. planar.x = 4.0 - v.x;
  1833. } else if ( absV.x >= almostOne ) {
  1834. float signX = sign( v.x );
  1835. planar.x = v.z * signX + 2.0 * signX;
  1836. } else if ( absV.y >= almostOne ) {
  1837. float signY = sign( v.y );
  1838. planar.x = v.x + 2.0 * signY + 2.0;
  1839. planar.y = v.z * signY - 2.0;
  1840. }
  1841. return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
  1842. }
  1843. float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
  1844. float shadow = 1.0;
  1845. vec3 lightToPosition = shadowCoord.xyz;
  1846. float lightToPositionLength = length( lightToPosition );
  1847. if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
  1848. float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;
  1849. vec3 bd3D = normalize( lightToPosition );
  1850. vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
  1851. #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
  1852. vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
  1853. shadow = (
  1854. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
  1855. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
  1856. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
  1857. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
  1858. texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
  1859. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
  1860. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
  1861. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
  1862. texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
  1863. ) * ( 1.0 / 9.0 );
  1864. #else
  1865. shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
  1866. #endif
  1867. }
  1868. return mix( 1.0, shadow, shadowIntensity );
  1869. }
  1870. #endif`,Sve=`#if NUM_SPOT_LIGHT_COORDS > 0
  1871. uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
  1872. varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
  1873. #endif
  1874. #ifdef USE_SHADOWMAP
  1875. #if NUM_DIR_LIGHT_SHADOWS > 0
  1876. uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
  1877. varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
  1878. struct DirectionalLightShadow {
  1879. float shadowIntensity;
  1880. float shadowBias;
  1881. float shadowNormalBias;
  1882. float shadowRadius;
  1883. vec2 shadowMapSize;
  1884. };
  1885. uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
  1886. #endif
  1887. #if NUM_SPOT_LIGHT_SHADOWS > 0
  1888. struct SpotLightShadow {
  1889. float shadowIntensity;
  1890. float shadowBias;
  1891. float shadowNormalBias;
  1892. float shadowRadius;
  1893. vec2 shadowMapSize;
  1894. };
  1895. uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
  1896. #endif
  1897. #if NUM_POINT_LIGHT_SHADOWS > 0
  1898. uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
  1899. varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
  1900. struct PointLightShadow {
  1901. float shadowIntensity;
  1902. float shadowBias;
  1903. float shadowNormalBias;
  1904. float shadowRadius;
  1905. vec2 shadowMapSize;
  1906. float shadowCameraNear;
  1907. float shadowCameraFar;
  1908. };
  1909. uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
  1910. #endif
  1911. #endif`,Ave=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
  1912. vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
  1913. vec4 shadowWorldPosition;
  1914. #endif
  1915. #if defined( USE_SHADOWMAP )
  1916. #if NUM_DIR_LIGHT_SHADOWS > 0
  1917. #pragma unroll_loop_start
  1918. for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
  1919. shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
  1920. vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
  1921. }
  1922. #pragma unroll_loop_end
  1923. #endif
  1924. #if NUM_POINT_LIGHT_SHADOWS > 0
  1925. #pragma unroll_loop_start
  1926. for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
  1927. shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
  1928. vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
  1929. }
  1930. #pragma unroll_loop_end
  1931. #endif
  1932. #endif
  1933. #if NUM_SPOT_LIGHT_COORDS > 0
  1934. #pragma unroll_loop_start
  1935. for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
  1936. shadowWorldPosition = worldPosition;
  1937. #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
  1938. shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
  1939. #endif
  1940. vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
  1941. }
  1942. #pragma unroll_loop_end
  1943. #endif`,Mve=`float getShadowMask() {
  1944. float shadow = 1.0;
  1945. #ifdef USE_SHADOWMAP
  1946. #if NUM_DIR_LIGHT_SHADOWS > 0
  1947. DirectionalLightShadow directionalLight;
  1948. #pragma unroll_loop_start
  1949. for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
  1950. directionalLight = directionalLightShadows[ i ];
  1951. shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
  1952. }
  1953. #pragma unroll_loop_end
  1954. #endif
  1955. #if NUM_SPOT_LIGHT_SHADOWS > 0
  1956. SpotLightShadow spotLight;
  1957. #pragma unroll_loop_start
  1958. for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
  1959. spotLight = spotLightShadows[ i ];
  1960. shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
  1961. }
  1962. #pragma unroll_loop_end
  1963. #endif
  1964. #if NUM_POINT_LIGHT_SHADOWS > 0
  1965. PointLightShadow pointLight;
  1966. #pragma unroll_loop_start
  1967. for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
  1968. pointLight = pointLightShadows[ i ];
  1969. shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
  1970. }
  1971. #pragma unroll_loop_end
  1972. #endif
  1973. #endif
  1974. return shadow;
  1975. }`,Pve=`#ifdef USE_SKINNING
  1976. mat4 boneMatX = getBoneMatrix( skinIndex.x );
  1977. mat4 boneMatY = getBoneMatrix( skinIndex.y );
  1978. mat4 boneMatZ = getBoneMatrix( skinIndex.z );
  1979. mat4 boneMatW = getBoneMatrix( skinIndex.w );
  1980. #endif`,Eve=`#ifdef USE_SKINNING
  1981. uniform mat4 bindMatrix;
  1982. uniform mat4 bindMatrixInverse;
  1983. uniform highp sampler2D boneTexture;
  1984. mat4 getBoneMatrix( const in float i ) {
  1985. int size = textureSize( boneTexture, 0 ).x;
  1986. int j = int( i ) * 4;
  1987. int x = j % size;
  1988. int y = j / size;
  1989. vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
  1990. vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
  1991. vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
  1992. vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
  1993. return mat4( v1, v2, v3, v4 );
  1994. }
  1995. #endif`,Cve=`#ifdef USE_SKINNING
  1996. vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
  1997. vec4 skinned = vec4( 0.0 );
  1998. skinned += boneMatX * skinVertex * skinWeight.x;
  1999. skinned += boneMatY * skinVertex * skinWeight.y;
  2000. skinned += boneMatZ * skinVertex * skinWeight.z;
  2001. skinned += boneMatW * skinVertex * skinWeight.w;
  2002. transformed = ( bindMatrixInverse * skinned ).xyz;
  2003. #endif`,Tve=`#ifdef USE_SKINNING
  2004. mat4 skinMatrix = mat4( 0.0 );
  2005. skinMatrix += skinWeight.x * boneMatX;
  2006. skinMatrix += skinWeight.y * boneMatY;
  2007. skinMatrix += skinWeight.z * boneMatZ;
  2008. skinMatrix += skinWeight.w * boneMatW;
  2009. skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
  2010. objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
  2011. #ifdef USE_TANGENT
  2012. objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
  2013. #endif
  2014. #endif`,kve=`float specularStrength;
  2015. #ifdef USE_SPECULARMAP
  2016. vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
  2017. specularStrength = texelSpecular.r;
  2018. #else
  2019. specularStrength = 1.0;
  2020. #endif`,Ive=`#ifdef USE_SPECULARMAP
  2021. uniform sampler2D specularMap;
  2022. #endif`,Lve=`#if defined( TONE_MAPPING )
  2023. gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
  2024. #endif`,Ove=`#ifndef saturate
  2025. #define saturate( a ) clamp( a, 0.0, 1.0 )
  2026. #endif
  2027. uniform float toneMappingExposure;
  2028. vec3 LinearToneMapping( vec3 color ) {
  2029. return saturate( toneMappingExposure * color );
  2030. }
  2031. vec3 ReinhardToneMapping( vec3 color ) {
  2032. color *= toneMappingExposure;
  2033. return saturate( color / ( vec3( 1.0 ) + color ) );
  2034. }
  2035. vec3 CineonToneMapping( vec3 color ) {
  2036. color *= toneMappingExposure;
  2037. color = max( vec3( 0.0 ), color - 0.004 );
  2038. return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
  2039. }
  2040. vec3 RRTAndODTFit( vec3 v ) {
  2041. vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
  2042. vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
  2043. return a / b;
  2044. }
  2045. vec3 ACESFilmicToneMapping( vec3 color ) {
  2046. const mat3 ACESInputMat = mat3(
  2047. vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),
  2048. vec3( 0.04823, 0.01566, 0.83777 )
  2049. );
  2050. const mat3 ACESOutputMat = mat3(
  2051. vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),
  2052. vec3( -0.07367, -0.00605, 1.07602 )
  2053. );
  2054. color *= toneMappingExposure / 0.6;
  2055. color = ACESInputMat * color;
  2056. color = RRTAndODTFit( color );
  2057. color = ACESOutputMat * color;
  2058. return saturate( color );
  2059. }
  2060. const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
  2061. vec3( 1.6605, - 0.1246, - 0.0182 ),
  2062. vec3( - 0.5876, 1.1329, - 0.1006 ),
  2063. vec3( - 0.0728, - 0.0083, 1.1187 )
  2064. );
  2065. const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
  2066. vec3( 0.6274, 0.0691, 0.0164 ),
  2067. vec3( 0.3293, 0.9195, 0.0880 ),
  2068. vec3( 0.0433, 0.0113, 0.8956 )
  2069. );
  2070. vec3 agxDefaultContrastApprox( vec3 x ) {
  2071. vec3 x2 = x * x;
  2072. vec3 x4 = x2 * x2;
  2073. return + 15.5 * x4 * x2
  2074. - 40.14 * x4 * x
  2075. + 31.96 * x4
  2076. - 6.868 * x2 * x
  2077. + 0.4298 * x2
  2078. + 0.1191 * x
  2079. - 0.00232;
  2080. }
  2081. vec3 AgXToneMapping( vec3 color ) {
  2082. const mat3 AgXInsetMatrix = mat3(
  2083. vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
  2084. vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
  2085. vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
  2086. );
  2087. const mat3 AgXOutsetMatrix = mat3(
  2088. vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
  2089. vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
  2090. vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
  2091. );
  2092. const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;
  2093. color *= toneMappingExposure;
  2094. color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
  2095. color = AgXInsetMatrix * color;
  2096. color = max( color, 1e-10 ); color = log2( color );
  2097. color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
  2098. color = clamp( color, 0.0, 1.0 );
  2099. color = agxDefaultContrastApprox( color );
  2100. color = AgXOutsetMatrix * color;
  2101. color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
  2102. color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
  2103. color = clamp( color, 0.0, 1.0 );
  2104. return color;
  2105. }
  2106. vec3 NeutralToneMapping( vec3 color ) {
  2107. const float StartCompression = 0.8 - 0.04;
  2108. const float Desaturation = 0.15;
  2109. color *= toneMappingExposure;
  2110. float x = min( color.r, min( color.g, color.b ) );
  2111. float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
  2112. color -= offset;
  2113. float peak = max( color.r, max( color.g, color.b ) );
  2114. if ( peak < StartCompression ) return color;
  2115. float d = 1. - StartCompression;
  2116. float newPeak = 1. - d * d / ( peak + d - StartCompression );
  2117. color *= newPeak / peak;
  2118. float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
  2119. return mix( color, vec3( newPeak ), g );
  2120. }
  2121. vec3 CustomToneMapping( vec3 color ) { return color; }`,Dve=`#ifdef USE_TRANSMISSION
  2122. material.transmission = transmission;
  2123. material.transmissionAlpha = 1.0;
  2124. material.thickness = thickness;
  2125. material.attenuationDistance = attenuationDistance;
  2126. material.attenuationColor = attenuationColor;
  2127. #ifdef USE_TRANSMISSIONMAP
  2128. material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
  2129. #endif
  2130. #ifdef USE_THICKNESSMAP
  2131. material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
  2132. #endif
  2133. vec3 pos = vWorldPosition;
  2134. vec3 v = normalize( cameraPosition - pos );
  2135. vec3 n = inverseTransformDirection( normal, viewMatrix );
  2136. vec4 transmitted = getIBLVolumeRefraction(
  2137. n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
  2138. pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
  2139. material.attenuationColor, material.attenuationDistance );
  2140. material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
  2141. totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
  2142. #endif`,Rve=`#ifdef USE_TRANSMISSION
  2143. uniform float transmission;
  2144. uniform float thickness;
  2145. uniform float attenuationDistance;
  2146. uniform vec3 attenuationColor;
  2147. #ifdef USE_TRANSMISSIONMAP
  2148. uniform sampler2D transmissionMap;
  2149. #endif
  2150. #ifdef USE_THICKNESSMAP
  2151. uniform sampler2D thicknessMap;
  2152. #endif
  2153. uniform vec2 transmissionSamplerSize;
  2154. uniform sampler2D transmissionSamplerMap;
  2155. uniform mat4 modelMatrix;
  2156. uniform mat4 projectionMatrix;
  2157. varying vec3 vWorldPosition;
  2158. float w0( float a ) {
  2159. return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
  2160. }
  2161. float w1( float a ) {
  2162. return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );
  2163. }
  2164. float w2( float a ){
  2165. return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
  2166. }
  2167. float w3( float a ) {
  2168. return ( 1.0 / 6.0 ) * ( a * a * a );
  2169. }
  2170. float g0( float a ) {
  2171. return w0( a ) + w1( a );
  2172. }
  2173. float g1( float a ) {
  2174. return w2( a ) + w3( a );
  2175. }
  2176. float h0( float a ) {
  2177. return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
  2178. }
  2179. float h1( float a ) {
  2180. return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
  2181. }
  2182. vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
  2183. uv = uv * texelSize.zw + 0.5;
  2184. vec2 iuv = floor( uv );
  2185. vec2 fuv = fract( uv );
  2186. float g0x = g0( fuv.x );
  2187. float g1x = g1( fuv.x );
  2188. float h0x = h0( fuv.x );
  2189. float h1x = h1( fuv.x );
  2190. float h0y = h0( fuv.y );
  2191. float h1y = h1( fuv.y );
  2192. vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
  2193. vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
  2194. vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
  2195. vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
  2196. return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
  2197. g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
  2198. }
  2199. vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
  2200. vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
  2201. vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
  2202. vec2 fLodSizeInv = 1.0 / fLodSize;
  2203. vec2 cLodSizeInv = 1.0 / cLodSize;
  2204. vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
  2205. vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
  2206. return mix( fSample, cSample, fract( lod ) );
  2207. }
  2208. vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
  2209. vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
  2210. vec3 modelScale;
  2211. modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
  2212. modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
  2213. modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
  2214. return normalize( refractionVector ) * thickness * modelScale;
  2215. }
  2216. float applyIorToRoughness( const in float roughness, const in float ior ) {
  2217. return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
  2218. }
  2219. vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
  2220. float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
  2221. return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
  2222. }
  2223. vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
  2224. if ( isinf( attenuationDistance ) ) {
  2225. return vec3( 1.0 );
  2226. } else {
  2227. vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
  2228. vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;
  2229. }
  2230. }
  2231. vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
  2232. const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
  2233. const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
  2234. const in vec3 attenuationColor, const in float attenuationDistance ) {
  2235. vec4 transmittedLight;
  2236. vec3 transmittance;
  2237. #ifdef USE_DISPERSION
  2238. float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
  2239. vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
  2240. for ( int i = 0; i < 3; i ++ ) {
  2241. vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
  2242. vec3 refractedRayExit = position + transmissionRay;
  2243. vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
  2244. vec2 refractionCoords = ndcPos.xy / ndcPos.w;
  2245. refractionCoords += 1.0;
  2246. refractionCoords /= 2.0;
  2247. vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
  2248. transmittedLight[ i ] = transmissionSample[ i ];
  2249. transmittedLight.a += transmissionSample.a;
  2250. transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
  2251. }
  2252. transmittedLight.a /= 3.0;
  2253. #else
  2254. vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
  2255. vec3 refractedRayExit = position + transmissionRay;
  2256. vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
  2257. vec2 refractionCoords = ndcPos.xy / ndcPos.w;
  2258. refractionCoords += 1.0;
  2259. refractionCoords /= 2.0;
  2260. transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
  2261. transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
  2262. #endif
  2263. vec3 attenuatedColor = transmittance * transmittedLight.rgb;
  2264. vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
  2265. float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
  2266. return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
  2267. }
  2268. #endif`,Bve=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
  2269. varying vec2 vUv;
  2270. #endif
  2271. #ifdef USE_MAP
  2272. varying vec2 vMapUv;
  2273. #endif
  2274. #ifdef USE_ALPHAMAP
  2275. varying vec2 vAlphaMapUv;
  2276. #endif
  2277. #ifdef USE_LIGHTMAP
  2278. varying vec2 vLightMapUv;
  2279. #endif
  2280. #ifdef USE_AOMAP
  2281. varying vec2 vAoMapUv;
  2282. #endif
  2283. #ifdef USE_BUMPMAP
  2284. varying vec2 vBumpMapUv;
  2285. #endif
  2286. #ifdef USE_NORMALMAP
  2287. varying vec2 vNormalMapUv;
  2288. #endif
  2289. #ifdef USE_EMISSIVEMAP
  2290. varying vec2 vEmissiveMapUv;
  2291. #endif
  2292. #ifdef USE_METALNESSMAP
  2293. varying vec2 vMetalnessMapUv;
  2294. #endif
  2295. #ifdef USE_ROUGHNESSMAP
  2296. varying vec2 vRoughnessMapUv;
  2297. #endif
  2298. #ifdef USE_ANISOTROPYMAP
  2299. varying vec2 vAnisotropyMapUv;
  2300. #endif
  2301. #ifdef USE_CLEARCOATMAP
  2302. varying vec2 vClearcoatMapUv;
  2303. #endif
  2304. #ifdef USE_CLEARCOAT_NORMALMAP
  2305. varying vec2 vClearcoatNormalMapUv;
  2306. #endif
  2307. #ifdef USE_CLEARCOAT_ROUGHNESSMAP
  2308. varying vec2 vClearcoatRoughnessMapUv;
  2309. #endif
  2310. #ifdef USE_IRIDESCENCEMAP
  2311. varying vec2 vIridescenceMapUv;
  2312. #endif
  2313. #ifdef USE_IRIDESCENCE_THICKNESSMAP
  2314. varying vec2 vIridescenceThicknessMapUv;
  2315. #endif
  2316. #ifdef USE_SHEEN_COLORMAP
  2317. varying vec2 vSheenColorMapUv;
  2318. #endif
  2319. #ifdef USE_SHEEN_ROUGHNESSMAP
  2320. varying vec2 vSheenRoughnessMapUv;
  2321. #endif
  2322. #ifdef USE_SPECULARMAP
  2323. varying vec2 vSpecularMapUv;
  2324. #endif
  2325. #ifdef USE_SPECULAR_COLORMAP
  2326. varying vec2 vSpecularColorMapUv;
  2327. #endif
  2328. #ifdef USE_SPECULAR_INTENSITYMAP
  2329. varying vec2 vSpecularIntensityMapUv;
  2330. #endif
  2331. #ifdef USE_TRANSMISSIONMAP
  2332. uniform mat3 transmissionMapTransform;
  2333. varying vec2 vTransmissionMapUv;
  2334. #endif
  2335. #ifdef USE_THICKNESSMAP
  2336. uniform mat3 thicknessMapTransform;
  2337. varying vec2 vThicknessMapUv;
  2338. #endif`,Fve=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
  2339. varying vec2 vUv;
  2340. #endif
  2341. #ifdef USE_MAP
  2342. uniform mat3 mapTransform;
  2343. varying vec2 vMapUv;
  2344. #endif
  2345. #ifdef USE_ALPHAMAP
  2346. uniform mat3 alphaMapTransform;
  2347. varying vec2 vAlphaMapUv;
  2348. #endif
  2349. #ifdef USE_LIGHTMAP
  2350. uniform mat3 lightMapTransform;
  2351. varying vec2 vLightMapUv;
  2352. #endif
  2353. #ifdef USE_AOMAP
  2354. uniform mat3 aoMapTransform;
  2355. varying vec2 vAoMapUv;
  2356. #endif
  2357. #ifdef USE_BUMPMAP
  2358. uniform mat3 bumpMapTransform;
  2359. varying vec2 vBumpMapUv;
  2360. #endif
  2361. #ifdef USE_NORMALMAP
  2362. uniform mat3 normalMapTransform;
  2363. varying vec2 vNormalMapUv;
  2364. #endif
  2365. #ifdef USE_DISPLACEMENTMAP
  2366. uniform mat3 displacementMapTransform;
  2367. varying vec2 vDisplacementMapUv;
  2368. #endif
  2369. #ifdef USE_EMISSIVEMAP
  2370. uniform mat3 emissiveMapTransform;
  2371. varying vec2 vEmissiveMapUv;
  2372. #endif
  2373. #ifdef USE_METALNESSMAP
  2374. uniform mat3 metalnessMapTransform;
  2375. varying vec2 vMetalnessMapUv;
  2376. #endif
  2377. #ifdef USE_ROUGHNESSMAP
  2378. uniform mat3 roughnessMapTransform;
  2379. varying vec2 vRoughnessMapUv;
  2380. #endif
  2381. #ifdef USE_ANISOTROPYMAP
  2382. uniform mat3 anisotropyMapTransform;
  2383. varying vec2 vAnisotropyMapUv;
  2384. #endif
  2385. #ifdef USE_CLEARCOATMAP
  2386. uniform mat3 clearcoatMapTransform;
  2387. varying vec2 vClearcoatMapUv;
  2388. #endif
  2389. #ifdef USE_CLEARCOAT_NORMALMAP
  2390. uniform mat3 clearcoatNormalMapTransform;
  2391. varying vec2 vClearcoatNormalMapUv;
  2392. #endif
  2393. #ifdef USE_CLEARCOAT_ROUGHNESSMAP
  2394. uniform mat3 clearcoatRoughnessMapTransform;
  2395. varying vec2 vClearcoatRoughnessMapUv;
  2396. #endif
  2397. #ifdef USE_SHEEN_COLORMAP
  2398. uniform mat3 sheenColorMapTransform;
  2399. varying vec2 vSheenColorMapUv;
  2400. #endif
  2401. #ifdef USE_SHEEN_ROUGHNESSMAP
  2402. uniform mat3 sheenRoughnessMapTransform;
  2403. varying vec2 vSheenRoughnessMapUv;
  2404. #endif
  2405. #ifdef USE_IRIDESCENCEMAP
  2406. uniform mat3 iridescenceMapTransform;
  2407. varying vec2 vIridescenceMapUv;
  2408. #endif
  2409. #ifdef USE_IRIDESCENCE_THICKNESSMAP
  2410. uniform mat3 iridescenceThicknessMapTransform;
  2411. varying vec2 vIridescenceThicknessMapUv;
  2412. #endif
  2413. #ifdef USE_SPECULARMAP
  2414. uniform mat3 specularMapTransform;
  2415. varying vec2 vSpecularMapUv;
  2416. #endif
  2417. #ifdef USE_SPECULAR_COLORMAP
  2418. uniform mat3 specularColorMapTransform;
  2419. varying vec2 vSpecularColorMapUv;
  2420. #endif
  2421. #ifdef USE_SPECULAR_INTENSITYMAP
  2422. uniform mat3 specularIntensityMapTransform;
  2423. varying vec2 vSpecularIntensityMapUv;
  2424. #endif
  2425. #ifdef USE_TRANSMISSIONMAP
  2426. uniform mat3 transmissionMapTransform;
  2427. varying vec2 vTransmissionMapUv;
  2428. #endif
  2429. #ifdef USE_THICKNESSMAP
  2430. uniform mat3 thicknessMapTransform;
  2431. varying vec2 vThicknessMapUv;
  2432. #endif`,Nve=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
  2433. vUv = vec3( uv, 1 ).xy;
  2434. #endif
  2435. #ifdef USE_MAP
  2436. vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
  2437. #endif
  2438. #ifdef USE_ALPHAMAP
  2439. vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
  2440. #endif
  2441. #ifdef USE_LIGHTMAP
  2442. vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
  2443. #endif
  2444. #ifdef USE_AOMAP
  2445. vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
  2446. #endif
  2447. #ifdef USE_BUMPMAP
  2448. vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
  2449. #endif
  2450. #ifdef USE_NORMALMAP
  2451. vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
  2452. #endif
  2453. #ifdef USE_DISPLACEMENTMAP
  2454. vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
  2455. #endif
  2456. #ifdef USE_EMISSIVEMAP
  2457. vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
  2458. #endif
  2459. #ifdef USE_METALNESSMAP
  2460. vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
  2461. #endif
  2462. #ifdef USE_ROUGHNESSMAP
  2463. vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
  2464. #endif
  2465. #ifdef USE_ANISOTROPYMAP
  2466. vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
  2467. #endif
  2468. #ifdef USE_CLEARCOATMAP
  2469. vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
  2470. #endif
  2471. #ifdef USE_CLEARCOAT_NORMALMAP
  2472. vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
  2473. #endif
  2474. #ifdef USE_CLEARCOAT_ROUGHNESSMAP
  2475. vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
  2476. #endif
  2477. #ifdef USE_IRIDESCENCEMAP
  2478. vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
  2479. #endif
  2480. #ifdef USE_IRIDESCENCE_THICKNESSMAP
  2481. vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
  2482. #endif
  2483. #ifdef USE_SHEEN_COLORMAP
  2484. vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
  2485. #endif
  2486. #ifdef USE_SHEEN_ROUGHNESSMAP
  2487. vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
  2488. #endif
  2489. #ifdef USE_SPECULARMAP
  2490. vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
  2491. #endif
  2492. #ifdef USE_SPECULAR_COLORMAP
  2493. vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
  2494. #endif
  2495. #ifdef USE_SPECULAR_INTENSITYMAP
  2496. vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
  2497. #endif
  2498. #ifdef USE_TRANSMISSIONMAP
  2499. vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
  2500. #endif
  2501. #ifdef USE_THICKNESSMAP
  2502. vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
  2503. #endif`,zve=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
  2504. vec4 worldPosition = vec4( transformed, 1.0 );
  2505. #ifdef USE_BATCHING
  2506. worldPosition = batchingMatrix * worldPosition;
  2507. #endif
  2508. #ifdef USE_INSTANCING
  2509. worldPosition = instanceMatrix * worldPosition;
  2510. #endif
  2511. worldPosition = modelMatrix * worldPosition;
  2512. #endif`,Uve=`varying vec2 vUv;
  2513. uniform mat3 uvTransform;
  2514. void main() {
  2515. vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
  2516. gl_Position = vec4( position.xy, 1.0, 1.0 );
  2517. }`,jve=`uniform sampler2D t2D;
  2518. uniform float backgroundIntensity;
  2519. varying vec2 vUv;
  2520. void main() {
  2521. vec4 texColor = texture2D( t2D, vUv );
  2522. #ifdef DECODE_VIDEO_TEXTURE
  2523. texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
  2524. #endif
  2525. texColor.rgb *= backgroundIntensity;
  2526. gl_FragColor = texColor;
  2527. #include <tonemapping_fragment>
  2528. #include <colorspace_fragment>
  2529. }`,Vve=`varying vec3 vWorldDirection;
  2530. #include <common>
  2531. void main() {
  2532. vWorldDirection = transformDirection( position, modelMatrix );
  2533. #include <begin_vertex>
  2534. #include <project_vertex>
  2535. gl_Position.z = gl_Position.w;
  2536. }`,Gve=`#ifdef ENVMAP_TYPE_CUBE
  2537. uniform samplerCube envMap;
  2538. #elif defined( ENVMAP_TYPE_CUBE_UV )
  2539. uniform sampler2D envMap;
  2540. #endif
  2541. uniform float flipEnvMap;
  2542. uniform float backgroundBlurriness;
  2543. uniform float backgroundIntensity;
  2544. uniform mat3 backgroundRotation;
  2545. varying vec3 vWorldDirection;
  2546. #include <cube_uv_reflection_fragment>
  2547. void main() {
  2548. #ifdef ENVMAP_TYPE_CUBE
  2549. vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
  2550. #elif defined( ENVMAP_TYPE_CUBE_UV )
  2551. vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
  2552. #else
  2553. vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
  2554. #endif
  2555. texColor.rgb *= backgroundIntensity;
  2556. gl_FragColor = texColor;
  2557. #include <tonemapping_fragment>
  2558. #include <colorspace_fragment>
  2559. }`,Hve=`varying vec3 vWorldDirection;
  2560. #include <common>
  2561. void main() {
  2562. vWorldDirection = transformDirection( position, modelMatrix );
  2563. #include <begin_vertex>
  2564. #include <project_vertex>
  2565. gl_Position.z = gl_Position.w;
  2566. }`,Wve=`uniform samplerCube tCube;
  2567. uniform float tFlip;
  2568. uniform float opacity;
  2569. varying vec3 vWorldDirection;
  2570. void main() {
  2571. vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
  2572. gl_FragColor = texColor;
  2573. gl_FragColor.a *= opacity;
  2574. #include <tonemapping_fragment>
  2575. #include <colorspace_fragment>
  2576. }`,Xve=`#include <common>
  2577. #include <batching_pars_vertex>
  2578. #include <uv_pars_vertex>
  2579. #include <displacementmap_pars_vertex>
  2580. #include <morphtarget_pars_vertex>
  2581. #include <skinning_pars_vertex>
  2582. #include <logdepthbuf_pars_vertex>
  2583. #include <clipping_planes_pars_vertex>
  2584. varying vec2 vHighPrecisionZW;
  2585. void main() {
  2586. #include <uv_vertex>
  2587. #include <batching_vertex>
  2588. #include <skinbase_vertex>
  2589. #include <morphinstance_vertex>
  2590. #ifdef USE_DISPLACEMENTMAP
  2591. #include <beginnormal_vertex>
  2592. #include <morphnormal_vertex>
  2593. #include <skinnormal_vertex>
  2594. #endif
  2595. #include <begin_vertex>
  2596. #include <morphtarget_vertex>
  2597. #include <skinning_vertex>
  2598. #include <displacementmap_vertex>
  2599. #include <project_vertex>
  2600. #include <logdepthbuf_vertex>
  2601. #include <clipping_planes_vertex>
  2602. vHighPrecisionZW = gl_Position.zw;
  2603. }`,Yve=`#if DEPTH_PACKING == 3200
  2604. uniform float opacity;
  2605. #endif
  2606. #include <common>
  2607. #include <packing>
  2608. #include <uv_pars_fragment>
  2609. #include <map_pars_fragment>
  2610. #include <alphamap_pars_fragment>
  2611. #include <alphatest_pars_fragment>
  2612. #include <alphahash_pars_fragment>
  2613. #include <logdepthbuf_pars_fragment>
  2614. #include <clipping_planes_pars_fragment>
  2615. varying vec2 vHighPrecisionZW;
  2616. void main() {
  2617. vec4 diffuseColor = vec4( 1.0 );
  2618. #include <clipping_planes_fragment>
  2619. #if DEPTH_PACKING == 3200
  2620. diffuseColor.a = opacity;
  2621. #endif
  2622. #include <map_fragment>
  2623. #include <alphamap_fragment>
  2624. #include <alphatest_fragment>
  2625. #include <alphahash_fragment>
  2626. #include <logdepthbuf_fragment>
  2627. float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
  2628. #if DEPTH_PACKING == 3200
  2629. gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
  2630. #elif DEPTH_PACKING == 3201
  2631. gl_FragColor = packDepthToRGBA( fragCoordZ );
  2632. #elif DEPTH_PACKING == 3202
  2633. gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
  2634. #elif DEPTH_PACKING == 3203
  2635. gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
  2636. #endif
  2637. }`,$ve=`#define DISTANCE
  2638. varying vec3 vWorldPosition;
  2639. #include <common>
  2640. #include <batching_pars_vertex>
  2641. #include <uv_pars_vertex>
  2642. #include <displacementmap_pars_vertex>
  2643. #include <morphtarget_pars_vertex>
  2644. #include <skinning_pars_vertex>
  2645. #include <clipping_planes_pars_vertex>
  2646. void main() {
  2647. #include <uv_vertex>
  2648. #include <batching_vertex>
  2649. #include <skinbase_vertex>
  2650. #include <morphinstance_vertex>
  2651. #ifdef USE_DISPLACEMENTMAP
  2652. #include <beginnormal_vertex>
  2653. #include <morphnormal_vertex>
  2654. #include <skinnormal_vertex>
  2655. #endif
  2656. #include <begin_vertex>
  2657. #include <morphtarget_vertex>
  2658. #include <skinning_vertex>
  2659. #include <displacementmap_vertex>
  2660. #include <project_vertex>
  2661. #include <worldpos_vertex>
  2662. #include <clipping_planes_vertex>
  2663. vWorldPosition = worldPosition.xyz;
  2664. }`,Kve=`#define DISTANCE
  2665. uniform vec3 referencePosition;
  2666. uniform float nearDistance;
  2667. uniform float farDistance;
  2668. varying vec3 vWorldPosition;
  2669. #include <common>
  2670. #include <packing>
  2671. #include <uv_pars_fragment>
  2672. #include <map_pars_fragment>
  2673. #include <alphamap_pars_fragment>
  2674. #include <alphatest_pars_fragment>
  2675. #include <alphahash_pars_fragment>
  2676. #include <clipping_planes_pars_fragment>
  2677. void main () {
  2678. vec4 diffuseColor = vec4( 1.0 );
  2679. #include <clipping_planes_fragment>
  2680. #include <map_fragment>
  2681. #include <alphamap_fragment>
  2682. #include <alphatest_fragment>
  2683. #include <alphahash_fragment>
  2684. float dist = length( vWorldPosition - referencePosition );
  2685. dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
  2686. dist = saturate( dist );
  2687. gl_FragColor = packDepthToRGBA( dist );
  2688. }`,qve=`varying vec3 vWorldDirection;
  2689. #include <common>
  2690. void main() {
  2691. vWorldDirection = transformDirection( position, modelMatrix );
  2692. #include <begin_vertex>
  2693. #include <project_vertex>
  2694. }`,Zve=`uniform sampler2D tEquirect;
  2695. varying vec3 vWorldDirection;
  2696. #include <common>
  2697. void main() {
  2698. vec3 direction = normalize( vWorldDirection );
  2699. vec2 sampleUV = equirectUv( direction );
  2700. gl_FragColor = texture2D( tEquirect, sampleUV );
  2701. #include <tonemapping_fragment>
  2702. #include <colorspace_fragment>
  2703. }`,Jve=`uniform float scale;
  2704. attribute float lineDistance;
  2705. varying float vLineDistance;
  2706. #include <common>
  2707. #include <uv_pars_vertex>
  2708. #include <color_pars_vertex>
  2709. #include <fog_pars_vertex>
  2710. #include <morphtarget_pars_vertex>
  2711. #include <logdepthbuf_pars_vertex>
  2712. #include <clipping_planes_pars_vertex>
  2713. void main() {
  2714. vLineDistance = scale * lineDistance;
  2715. #include <uv_vertex>
  2716. #include <color_vertex>
  2717. #include <morphinstance_vertex>
  2718. #include <morphcolor_vertex>
  2719. #include <begin_vertex>
  2720. #include <morphtarget_vertex>
  2721. #include <project_vertex>
  2722. #include <logdepthbuf_vertex>
  2723. #include <clipping_planes_vertex>
  2724. #include <fog_vertex>
  2725. }`,Qve=`uniform vec3 diffuse;
  2726. uniform float opacity;
  2727. uniform float dashSize;
  2728. uniform float totalSize;
  2729. varying float vLineDistance;
  2730. #include <common>
  2731. #include <color_pars_fragment>
  2732. #include <uv_pars_fragment>
  2733. #include <map_pars_fragment>
  2734. #include <fog_pars_fragment>
  2735. #include <logdepthbuf_pars_fragment>
  2736. #include <clipping_planes_pars_fragment>
  2737. void main() {
  2738. vec4 diffuseColor = vec4( diffuse, opacity );
  2739. #include <clipping_planes_fragment>
  2740. if ( mod( vLineDistance, totalSize ) > dashSize ) {
  2741. discard;
  2742. }
  2743. vec3 outgoingLight = vec3( 0.0 );
  2744. #include <logdepthbuf_fragment>
  2745. #include <map_fragment>
  2746. #include <color_fragment>
  2747. outgoingLight = diffuseColor.rgb;
  2748. #include <opaque_fragment>
  2749. #include <tonemapping_fragment>
  2750. #include <colorspace_fragment>
  2751. #include <fog_fragment>
  2752. #include <premultiplied_alpha_fragment>
  2753. }`,e0e=`#include <common>
  2754. #include <batching_pars_vertex>
  2755. #include <uv_pars_vertex>
  2756. #include <envmap_pars_vertex>
  2757. #include <color_pars_vertex>
  2758. #include <fog_pars_vertex>
  2759. #include <morphtarget_pars_vertex>
  2760. #include <skinning_pars_vertex>
  2761. #include <logdepthbuf_pars_vertex>
  2762. #include <clipping_planes_pars_vertex>
  2763. void main() {
  2764. #include <uv_vertex>
  2765. #include <color_vertex>
  2766. #include <morphinstance_vertex>
  2767. #include <morphcolor_vertex>
  2768. #include <batching_vertex>
  2769. #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
  2770. #include <beginnormal_vertex>
  2771. #include <morphnormal_vertex>
  2772. #include <skinbase_vertex>
  2773. #include <skinnormal_vertex>
  2774. #include <defaultnormal_vertex>
  2775. #endif
  2776. #include <begin_vertex>
  2777. #include <morphtarget_vertex>
  2778. #include <skinning_vertex>
  2779. #include <project_vertex>
  2780. #include <logdepthbuf_vertex>
  2781. #include <clipping_planes_vertex>
  2782. #include <worldpos_vertex>
  2783. #include <envmap_vertex>
  2784. #include <fog_vertex>
  2785. }`,t0e=`uniform vec3 diffuse;
  2786. uniform float opacity;
  2787. #ifndef FLAT_SHADED
  2788. varying vec3 vNormal;
  2789. #endif
  2790. #include <common>
  2791. #include <dithering_pars_fragment>
  2792. #include <color_pars_fragment>
  2793. #include <uv_pars_fragment>
  2794. #include <map_pars_fragment>
  2795. #include <alphamap_pars_fragment>
  2796. #include <alphatest_pars_fragment>
  2797. #include <alphahash_pars_fragment>
  2798. #include <aomap_pars_fragment>
  2799. #include <lightmap_pars_fragment>
  2800. #include <envmap_common_pars_fragment>
  2801. #include <envmap_pars_fragment>
  2802. #include <fog_pars_fragment>
  2803. #include <specularmap_pars_fragment>
  2804. #include <logdepthbuf_pars_fragment>
  2805. #include <clipping_planes_pars_fragment>
  2806. void main() {
  2807. vec4 diffuseColor = vec4( diffuse, opacity );
  2808. #include <clipping_planes_fragment>
  2809. #include <logdepthbuf_fragment>
  2810. #include <map_fragment>
  2811. #include <color_fragment>
  2812. #include <alphamap_fragment>
  2813. #include <alphatest_fragment>
  2814. #include <alphahash_fragment>
  2815. #include <specularmap_fragment>
  2816. ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
  2817. #ifdef USE_LIGHTMAP
  2818. vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
  2819. reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
  2820. #else
  2821. reflectedLight.indirectDiffuse += vec3( 1.0 );
  2822. #endif
  2823. #include <aomap_fragment>
  2824. reflectedLight.indirectDiffuse *= diffuseColor.rgb;
  2825. vec3 outgoingLight = reflectedLight.indirectDiffuse;
  2826. #include <envmap_fragment>
  2827. #include <opaque_fragment>
  2828. #include <tonemapping_fragment>
  2829. #include <colorspace_fragment>
  2830. #include <fog_fragment>
  2831. #include <premultiplied_alpha_fragment>
  2832. #include <dithering_fragment>
  2833. }`,n0e=`#define LAMBERT
  2834. varying vec3 vViewPosition;
  2835. #include <common>
  2836. #include <batching_pars_vertex>
  2837. #include <uv_pars_vertex>
  2838. #include <displacementmap_pars_vertex>
  2839. #include <envmap_pars_vertex>
  2840. #include <color_pars_vertex>
  2841. #include <fog_pars_vertex>
  2842. #include <normal_pars_vertex>
  2843. #include <morphtarget_pars_vertex>
  2844. #include <skinning_pars_vertex>
  2845. #include <shadowmap_pars_vertex>
  2846. #include <logdepthbuf_pars_vertex>
  2847. #include <clipping_planes_pars_vertex>
  2848. void main() {
  2849. #include <uv_vertex>
  2850. #include <color_vertex>
  2851. #include <morphinstance_vertex>
  2852. #include <morphcolor_vertex>
  2853. #include <batching_vertex>
  2854. #include <beginnormal_vertex>
  2855. #include <morphnormal_vertex>
  2856. #include <skinbase_vertex>
  2857. #include <skinnormal_vertex>
  2858. #include <defaultnormal_vertex>
  2859. #include <normal_vertex>
  2860. #include <begin_vertex>
  2861. #include <morphtarget_vertex>
  2862. #include <skinning_vertex>
  2863. #include <displacementmap_vertex>
  2864. #include <project_vertex>
  2865. #include <logdepthbuf_vertex>
  2866. #include <clipping_planes_vertex>
  2867. vViewPosition = - mvPosition.xyz;
  2868. #include <worldpos_vertex>
  2869. #include <envmap_vertex>
  2870. #include <shadowmap_vertex>
  2871. #include <fog_vertex>
  2872. }`,r0e=`#define LAMBERT
  2873. uniform vec3 diffuse;
  2874. uniform vec3 emissive;
  2875. uniform float opacity;
  2876. #include <common>
  2877. #include <packing>
  2878. #include <dithering_pars_fragment>
  2879. #include <color_pars_fragment>
  2880. #include <uv_pars_fragment>
  2881. #include <map_pars_fragment>
  2882. #include <alphamap_pars_fragment>
  2883. #include <alphatest_pars_fragment>
  2884. #include <alphahash_pars_fragment>
  2885. #include <aomap_pars_fragment>
  2886. #include <lightmap_pars_fragment>
  2887. #include <emissivemap_pars_fragment>
  2888. #include <envmap_common_pars_fragment>
  2889. #include <envmap_pars_fragment>
  2890. #include <fog_pars_fragment>
  2891. #include <bsdfs>
  2892. #include <lights_pars_begin>
  2893. #include <normal_pars_fragment>
  2894. #include <lights_lambert_pars_fragment>
  2895. #include <shadowmap_pars_fragment>
  2896. #include <bumpmap_pars_fragment>
  2897. #include <normalmap_pars_fragment>
  2898. #include <specularmap_pars_fragment>
  2899. #include <logdepthbuf_pars_fragment>
  2900. #include <clipping_planes_pars_fragment>
  2901. void main() {
  2902. vec4 diffuseColor = vec4( diffuse, opacity );
  2903. #include <clipping_planes_fragment>
  2904. ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
  2905. vec3 totalEmissiveRadiance = emissive;
  2906. #include <logdepthbuf_fragment>
  2907. #include <map_fragment>
  2908. #include <color_fragment>
  2909. #include <alphamap_fragment>
  2910. #include <alphatest_fragment>
  2911. #include <alphahash_fragment>
  2912. #include <specularmap_fragment>
  2913. #include <normal_fragment_begin>
  2914. #include <normal_fragment_maps>
  2915. #include <emissivemap_fragment>
  2916. #include <lights_lambert_fragment>
  2917. #include <lights_fragment_begin>
  2918. #include <lights_fragment_maps>
  2919. #include <lights_fragment_end>
  2920. #include <aomap_fragment>
  2921. vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
  2922. #include <envmap_fragment>
  2923. #include <opaque_fragment>
  2924. #include <tonemapping_fragment>
  2925. #include <colorspace_fragment>
  2926. #include <fog_fragment>
  2927. #include <premultiplied_alpha_fragment>
  2928. #include <dithering_fragment>
  2929. }`,i0e=`#define MATCAP
  2930. varying vec3 vViewPosition;
  2931. #include <common>
  2932. #include <batching_pars_vertex>
  2933. #include <uv_pars_vertex>
  2934. #include <color_pars_vertex>
  2935. #include <displacementmap_pars_vertex>
  2936. #include <fog_pars_vertex>
  2937. #include <normal_pars_vertex>
  2938. #include <morphtarget_pars_vertex>
  2939. #include <skinning_pars_vertex>
  2940. #include <logdepthbuf_pars_vertex>
  2941. #include <clipping_planes_pars_vertex>
  2942. void main() {
  2943. #include <uv_vertex>
  2944. #include <color_vertex>
  2945. #include <morphinstance_vertex>
  2946. #include <morphcolor_vertex>
  2947. #include <batching_vertex>
  2948. #include <beginnormal_vertex>
  2949. #include <morphnormal_vertex>
  2950. #include <skinbase_vertex>
  2951. #include <skinnormal_vertex>
  2952. #include <defaultnormal_vertex>
  2953. #include <normal_vertex>
  2954. #include <begin_vertex>
  2955. #include <morphtarget_vertex>
  2956. #include <skinning_vertex>
  2957. #include <displacementmap_vertex>
  2958. #include <project_vertex>
  2959. #include <logdepthbuf_vertex>
  2960. #include <clipping_planes_vertex>
  2961. #include <fog_vertex>
  2962. vViewPosition = - mvPosition.xyz;
  2963. }`,o0e=`#define MATCAP
  2964. uniform vec3 diffuse;
  2965. uniform float opacity;
  2966. uniform sampler2D matcap;
  2967. varying vec3 vViewPosition;
  2968. #include <common>
  2969. #include <dithering_pars_fragment>
  2970. #include <color_pars_fragment>
  2971. #include <uv_pars_fragment>
  2972. #include <map_pars_fragment>
  2973. #include <alphamap_pars_fragment>
  2974. #include <alphatest_pars_fragment>
  2975. #include <alphahash_pars_fragment>
  2976. #include <fog_pars_fragment>
  2977. #include <normal_pars_fragment>
  2978. #include <bumpmap_pars_fragment>
  2979. #include <normalmap_pars_fragment>
  2980. #include <logdepthbuf_pars_fragment>
  2981. #include <clipping_planes_pars_fragment>
  2982. void main() {
  2983. vec4 diffuseColor = vec4( diffuse, opacity );
  2984. #include <clipping_planes_fragment>
  2985. #include <logdepthbuf_fragment>
  2986. #include <map_fragment>
  2987. #include <color_fragment>
  2988. #include <alphamap_fragment>
  2989. #include <alphatest_fragment>
  2990. #include <alphahash_fragment>
  2991. #include <normal_fragment_begin>
  2992. #include <normal_fragment_maps>
  2993. vec3 viewDir = normalize( vViewPosition );
  2994. vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
  2995. vec3 y = cross( viewDir, x );
  2996. vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
  2997. #ifdef USE_MATCAP
  2998. vec4 matcapColor = texture2D( matcap, uv );
  2999. #else
  3000. vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
  3001. #endif
  3002. vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
  3003. #include <opaque_fragment>
  3004. #include <tonemapping_fragment>
  3005. #include <colorspace_fragment>
  3006. #include <fog_fragment>
  3007. #include <premultiplied_alpha_fragment>
  3008. #include <dithering_fragment>
  3009. }`,a0e=`#define NORMAL
  3010. #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
  3011. varying vec3 vViewPosition;
  3012. #endif
  3013. #include <common>
  3014. #include <batching_pars_vertex>
  3015. #include <uv_pars_vertex>
  3016. #include <displacementmap_pars_vertex>
  3017. #include <normal_pars_vertex>
  3018. #include <morphtarget_pars_vertex>
  3019. #include <skinning_pars_vertex>
  3020. #include <logdepthbuf_pars_vertex>
  3021. #include <clipping_planes_pars_vertex>
  3022. void main() {
  3023. #include <uv_vertex>
  3024. #include <batching_vertex>
  3025. #include <beginnormal_vertex>
  3026. #include <morphinstance_vertex>
  3027. #include <morphnormal_vertex>
  3028. #include <skinbase_vertex>
  3029. #include <skinnormal_vertex>
  3030. #include <defaultnormal_vertex>
  3031. #include <normal_vertex>
  3032. #include <begin_vertex>
  3033. #include <morphtarget_vertex>
  3034. #include <skinning_vertex>
  3035. #include <displacementmap_vertex>
  3036. #include <project_vertex>
  3037. #include <logdepthbuf_vertex>
  3038. #include <clipping_planes_vertex>
  3039. #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
  3040. vViewPosition = - mvPosition.xyz;
  3041. #endif
  3042. }`,s0e=`#define NORMAL
  3043. uniform float opacity;
  3044. #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
  3045. varying vec3 vViewPosition;
  3046. #endif
  3047. #include <packing>
  3048. #include <uv_pars_fragment>
  3049. #include <normal_pars_fragment>
  3050. #include <bumpmap_pars_fragment>
  3051. #include <normalmap_pars_fragment>
  3052. #include <logdepthbuf_pars_fragment>
  3053. #include <clipping_planes_pars_fragment>
  3054. void main() {
  3055. vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
  3056. #include <clipping_planes_fragment>
  3057. #include <logdepthbuf_fragment>
  3058. #include <normal_fragment_begin>
  3059. #include <normal_fragment_maps>
  3060. gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
  3061. #ifdef OPAQUE
  3062. gl_FragColor.a = 1.0;
  3063. #endif
  3064. }`,l0e=`#define PHONG
  3065. varying vec3 vViewPosition;
  3066. #include <common>
  3067. #include <batching_pars_vertex>
  3068. #include <uv_pars_vertex>
  3069. #include <displacementmap_pars_vertex>
  3070. #include <envmap_pars_vertex>
  3071. #include <color_pars_vertex>
  3072. #include <fog_pars_vertex>
  3073. #include <normal_pars_vertex>
  3074. #include <morphtarget_pars_vertex>
  3075. #include <skinning_pars_vertex>
  3076. #include <shadowmap_pars_vertex>
  3077. #include <logdepthbuf_pars_vertex>
  3078. #include <clipping_planes_pars_vertex>
  3079. void main() {
  3080. #include <uv_vertex>
  3081. #include <color_vertex>
  3082. #include <morphcolor_vertex>
  3083. #include <batching_vertex>
  3084. #include <beginnormal_vertex>
  3085. #include <morphinstance_vertex>
  3086. #include <morphnormal_vertex>
  3087. #include <skinbase_vertex>
  3088. #include <skinnormal_vertex>
  3089. #include <defaultnormal_vertex>
  3090. #include <normal_vertex>
  3091. #include <begin_vertex>
  3092. #include <morphtarget_vertex>
  3093. #include <skinning_vertex>
  3094. #include <displacementmap_vertex>
  3095. #include <project_vertex>
  3096. #include <logdepthbuf_vertex>
  3097. #include <clipping_planes_vertex>
  3098. vViewPosition = - mvPosition.xyz;
  3099. #include <worldpos_vertex>
  3100. #include <envmap_vertex>
  3101. #include <shadowmap_vertex>
  3102. #include <fog_vertex>
  3103. }`,c0e=`#define PHONG
  3104. uniform vec3 diffuse;
  3105. uniform vec3 emissive;
  3106. uniform vec3 specular;
  3107. uniform float shininess;
  3108. uniform float opacity;
  3109. #include <common>
  3110. #include <packing>
  3111. #include <dithering_pars_fragment>
  3112. #include <color_pars_fragment>
  3113. #include <uv_pars_fragment>
  3114. #include <map_pars_fragment>
  3115. #include <alphamap_pars_fragment>
  3116. #include <alphatest_pars_fragment>
  3117. #include <alphahash_pars_fragment>
  3118. #include <aomap_pars_fragment>
  3119. #include <lightmap_pars_fragment>
  3120. #include <emissivemap_pars_fragment>
  3121. #include <envmap_common_pars_fragment>
  3122. #include <envmap_pars_fragment>
  3123. #include <fog_pars_fragment>
  3124. #include <bsdfs>
  3125. #include <lights_pars_begin>
  3126. #include <normal_pars_fragment>
  3127. #include <lights_phong_pars_fragment>
  3128. #include <shadowmap_pars_fragment>
  3129. #include <bumpmap_pars_fragment>
  3130. #include <normalmap_pars_fragment>
  3131. #include <specularmap_pars_fragment>
  3132. #include <logdepthbuf_pars_fragment>
  3133. #include <clipping_planes_pars_fragment>
  3134. void main() {
  3135. vec4 diffuseColor = vec4( diffuse, opacity );
  3136. #include <clipping_planes_fragment>
  3137. ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
  3138. vec3 totalEmissiveRadiance = emissive;
  3139. #include <logdepthbuf_fragment>
  3140. #include <map_fragment>
  3141. #include <color_fragment>
  3142. #include <alphamap_fragment>
  3143. #include <alphatest_fragment>
  3144. #include <alphahash_fragment>
  3145. #include <specularmap_fragment>
  3146. #include <normal_fragment_begin>
  3147. #include <normal_fragment_maps>
  3148. #include <emissivemap_fragment>
  3149. #include <lights_phong_fragment>
  3150. #include <lights_fragment_begin>
  3151. #include <lights_fragment_maps>
  3152. #include <lights_fragment_end>
  3153. #include <aomap_fragment>
  3154. vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
  3155. #include <envmap_fragment>
  3156. #include <opaque_fragment>
  3157. #include <tonemapping_fragment>
  3158. #include <colorspace_fragment>
  3159. #include <fog_fragment>
  3160. #include <premultiplied_alpha_fragment>
  3161. #include <dithering_fragment>
  3162. }`,u0e=`#define STANDARD
  3163. varying vec3 vViewPosition;
  3164. #ifdef USE_TRANSMISSION
  3165. varying vec3 vWorldPosition;
  3166. #endif
  3167. #include <common>
  3168. #include <batching_pars_vertex>
  3169. #include <uv_pars_vertex>
  3170. #include <displacementmap_pars_vertex>
  3171. #include <color_pars_vertex>
  3172. #include <fog_pars_vertex>
  3173. #include <normal_pars_vertex>
  3174. #include <morphtarget_pars_vertex>
  3175. #include <skinning_pars_vertex>
  3176. #include <shadowmap_pars_vertex>
  3177. #include <logdepthbuf_pars_vertex>
  3178. #include <clipping_planes_pars_vertex>
  3179. void main() {
  3180. #include <uv_vertex>
  3181. #include <color_vertex>
  3182. #include <morphinstance_vertex>
  3183. #include <morphcolor_vertex>
  3184. #include <batching_vertex>
  3185. #include <beginnormal_vertex>
  3186. #include <morphnormal_vertex>
  3187. #include <skinbase_vertex>
  3188. #include <skinnormal_vertex>
  3189. #include <defaultnormal_vertex>
  3190. #include <normal_vertex>
  3191. #include <begin_vertex>
  3192. #include <morphtarget_vertex>
  3193. #include <skinning_vertex>
  3194. #include <displacementmap_vertex>
  3195. #include <project_vertex>
  3196. #include <logdepthbuf_vertex>
  3197. #include <clipping_planes_vertex>
  3198. vViewPosition = - mvPosition.xyz;
  3199. #include <worldpos_vertex>
  3200. #include <shadowmap_vertex>
  3201. #include <fog_vertex>
  3202. #ifdef USE_TRANSMISSION
  3203. vWorldPosition = worldPosition.xyz;
  3204. #endif
  3205. }`,h0e=`#define STANDARD
  3206. #ifdef PHYSICAL
  3207. #define IOR
  3208. #define USE_SPECULAR
  3209. #endif
  3210. uniform vec3 diffuse;
  3211. uniform vec3 emissive;
  3212. uniform float roughness;
  3213. uniform float metalness;
  3214. uniform float opacity;
  3215. #ifdef IOR
  3216. uniform float ior;
  3217. #endif
  3218. #ifdef USE_SPECULAR
  3219. uniform float specularIntensity;
  3220. uniform vec3 specularColor;
  3221. #ifdef USE_SPECULAR_COLORMAP
  3222. uniform sampler2D specularColorMap;
  3223. #endif
  3224. #ifdef USE_SPECULAR_INTENSITYMAP
  3225. uniform sampler2D specularIntensityMap;
  3226. #endif
  3227. #endif
  3228. #ifdef USE_CLEARCOAT
  3229. uniform float clearcoat;
  3230. uniform float clearcoatRoughness;
  3231. #endif
  3232. #ifdef USE_DISPERSION
  3233. uniform float dispersion;
  3234. #endif
  3235. #ifdef USE_IRIDESCENCE
  3236. uniform float iridescence;
  3237. uniform float iridescenceIOR;
  3238. uniform float iridescenceThicknessMinimum;
  3239. uniform float iridescenceThicknessMaximum;
  3240. #endif
  3241. #ifdef USE_SHEEN
  3242. uniform vec3 sheenColor;
  3243. uniform float sheenRoughness;
  3244. #ifdef USE_SHEEN_COLORMAP
  3245. uniform sampler2D sheenColorMap;
  3246. #endif
  3247. #ifdef USE_SHEEN_ROUGHNESSMAP
  3248. uniform sampler2D sheenRoughnessMap;
  3249. #endif
  3250. #endif
  3251. #ifdef USE_ANISOTROPY
  3252. uniform vec2 anisotropyVector;
  3253. #ifdef USE_ANISOTROPYMAP
  3254. uniform sampler2D anisotropyMap;
  3255. #endif
  3256. #endif
  3257. varying vec3 vViewPosition;
  3258. #include <common>
  3259. #include <packing>
  3260. #include <dithering_pars_fragment>
  3261. #include <color_pars_fragment>
  3262. #include <uv_pars_fragment>
  3263. #include <map_pars_fragment>
  3264. #include <alphamap_pars_fragment>
  3265. #include <alphatest_pars_fragment>
  3266. #include <alphahash_pars_fragment>
  3267. #include <aomap_pars_fragment>
  3268. #include <lightmap_pars_fragment>
  3269. #include <emissivemap_pars_fragment>
  3270. #include <iridescence_fragment>
  3271. #include <cube_uv_reflection_fragment>
  3272. #include <envmap_common_pars_fragment>
  3273. #include <envmap_physical_pars_fragment>
  3274. #include <fog_pars_fragment>
  3275. #include <lights_pars_begin>
  3276. #include <normal_pars_fragment>
  3277. #include <lights_physical_pars_fragment>
  3278. #include <transmission_pars_fragment>
  3279. #include <shadowmap_pars_fragment>
  3280. #include <bumpmap_pars_fragment>
  3281. #include <normalmap_pars_fragment>
  3282. #include <clearcoat_pars_fragment>
  3283. #include <iridescence_pars_fragment>
  3284. #include <roughnessmap_pars_fragment>
  3285. #include <metalnessmap_pars_fragment>
  3286. #include <logdepthbuf_pars_fragment>
  3287. #include <clipping_planes_pars_fragment>
  3288. void main() {
  3289. vec4 diffuseColor = vec4( diffuse, opacity );
  3290. #include <clipping_planes_fragment>
  3291. ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
  3292. vec3 totalEmissiveRadiance = emissive;
  3293. #include <logdepthbuf_fragment>
  3294. #include <map_fragment>
  3295. #include <color_fragment>
  3296. #include <alphamap_fragment>
  3297. #include <alphatest_fragment>
  3298. #include <alphahash_fragment>
  3299. #include <roughnessmap_fragment>
  3300. #include <metalnessmap_fragment>
  3301. #include <normal_fragment_begin>
  3302. #include <normal_fragment_maps>
  3303. #include <clearcoat_normal_fragment_begin>
  3304. #include <clearcoat_normal_fragment_maps>
  3305. #include <emissivemap_fragment>
  3306. #include <lights_physical_fragment>
  3307. #include <lights_fragment_begin>
  3308. #include <lights_fragment_maps>
  3309. #include <lights_fragment_end>
  3310. #include <aomap_fragment>
  3311. vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
  3312. vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
  3313. #include <transmission_fragment>
  3314. vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
  3315. #ifdef USE_SHEEN
  3316. float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
  3317. outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
  3318. #endif
  3319. #ifdef USE_CLEARCOAT
  3320. float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
  3321. vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
  3322. outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
  3323. #endif
  3324. #include <opaque_fragment>
  3325. #include <tonemapping_fragment>
  3326. #include <colorspace_fragment>
  3327. #include <fog_fragment>
  3328. #include <premultiplied_alpha_fragment>
  3329. #include <dithering_fragment>
  3330. }`,d0e=`#define TOON
  3331. varying vec3 vViewPosition;
  3332. #include <common>
  3333. #include <batching_pars_vertex>
  3334. #include <uv_pars_vertex>
  3335. #include <displacementmap_pars_vertex>
  3336. #include <color_pars_vertex>
  3337. #include <fog_pars_vertex>
  3338. #include <normal_pars_vertex>
  3339. #include <morphtarget_pars_vertex>
  3340. #include <skinning_pars_vertex>
  3341. #include <shadowmap_pars_vertex>
  3342. #include <logdepthbuf_pars_vertex>
  3343. #include <clipping_planes_pars_vertex>
  3344. void main() {
  3345. #include <uv_vertex>
  3346. #include <color_vertex>
  3347. #include <morphinstance_vertex>
  3348. #include <morphcolor_vertex>
  3349. #include <batching_vertex>
  3350. #include <beginnormal_vertex>
  3351. #include <morphnormal_vertex>
  3352. #include <skinbase_vertex>
  3353. #include <skinnormal_vertex>
  3354. #include <defaultnormal_vertex>
  3355. #include <normal_vertex>
  3356. #include <begin_vertex>
  3357. #include <morphtarget_vertex>
  3358. #include <skinning_vertex>
  3359. #include <displacementmap_vertex>
  3360. #include <project_vertex>
  3361. #include <logdepthbuf_vertex>
  3362. #include <clipping_planes_vertex>
  3363. vViewPosition = - mvPosition.xyz;
  3364. #include <worldpos_vertex>
  3365. #include <shadowmap_vertex>
  3366. #include <fog_vertex>
  3367. }`,p0e=`#define TOON
  3368. uniform vec3 diffuse;
  3369. uniform vec3 emissive;
  3370. uniform float opacity;
  3371. #include <common>
  3372. #include <packing>
  3373. #include <dithering_pars_fragment>
  3374. #include <color_pars_fragment>
  3375. #include <uv_pars_fragment>
  3376. #include <map_pars_fragment>
  3377. #include <alphamap_pars_fragment>
  3378. #include <alphatest_pars_fragment>
  3379. #include <alphahash_pars_fragment>
  3380. #include <aomap_pars_fragment>
  3381. #include <lightmap_pars_fragment>
  3382. #include <emissivemap_pars_fragment>
  3383. #include <gradientmap_pars_fragment>
  3384. #include <fog_pars_fragment>
  3385. #include <bsdfs>
  3386. #include <lights_pars_begin>
  3387. #include <normal_pars_fragment>
  3388. #include <lights_toon_pars_fragment>
  3389. #include <shadowmap_pars_fragment>
  3390. #include <bumpmap_pars_fragment>
  3391. #include <normalmap_pars_fragment>
  3392. #include <logdepthbuf_pars_fragment>
  3393. #include <clipping_planes_pars_fragment>
  3394. void main() {
  3395. vec4 diffuseColor = vec4( diffuse, opacity );
  3396. #include <clipping_planes_fragment>
  3397. ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
  3398. vec3 totalEmissiveRadiance = emissive;
  3399. #include <logdepthbuf_fragment>
  3400. #include <map_fragment>
  3401. #include <color_fragment>
  3402. #include <alphamap_fragment>
  3403. #include <alphatest_fragment>
  3404. #include <alphahash_fragment>
  3405. #include <normal_fragment_begin>
  3406. #include <normal_fragment_maps>
  3407. #include <emissivemap_fragment>
  3408. #include <lights_toon_fragment>
  3409. #include <lights_fragment_begin>
  3410. #include <lights_fragment_maps>
  3411. #include <lights_fragment_end>
  3412. #include <aomap_fragment>
  3413. vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
  3414. #include <opaque_fragment>
  3415. #include <tonemapping_fragment>
  3416. #include <colorspace_fragment>
  3417. #include <fog_fragment>
  3418. #include <premultiplied_alpha_fragment>
  3419. #include <dithering_fragment>
  3420. }`,f0e=`uniform float size;
  3421. uniform float scale;
  3422. #include <common>
  3423. #include <color_pars_vertex>
  3424. #include <fog_pars_vertex>
  3425. #include <morphtarget_pars_vertex>
  3426. #include <logdepthbuf_pars_vertex>
  3427. #include <clipping_planes_pars_vertex>
  3428. #ifdef USE_POINTS_UV
  3429. varying vec2 vUv;
  3430. uniform mat3 uvTransform;
  3431. #endif
  3432. void main() {
  3433. #ifdef USE_POINTS_UV
  3434. vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
  3435. #endif
  3436. #include <color_vertex>
  3437. #include <morphinstance_vertex>
  3438. #include <morphcolor_vertex>
  3439. #include <begin_vertex>
  3440. #include <morphtarget_vertex>
  3441. #include <project_vertex>
  3442. gl_PointSize = size;
  3443. #ifdef USE_SIZEATTENUATION
  3444. bool isPerspective = isPerspectiveMatrix( projectionMatrix );
  3445. if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
  3446. #endif
  3447. #include <logdepthbuf_vertex>
  3448. #include <clipping_planes_vertex>
  3449. #include <worldpos_vertex>
  3450. #include <fog_vertex>
  3451. }`,m0e=`uniform vec3 diffuse;
  3452. uniform float opacity;
  3453. #include <common>
  3454. #include <color_pars_fragment>
  3455. #include <map_particle_pars_fragment>
  3456. #include <alphatest_pars_fragment>
  3457. #include <alphahash_pars_fragment>
  3458. #include <fog_pars_fragment>
  3459. #include <logdepthbuf_pars_fragment>
  3460. #include <clipping_planes_pars_fragment>
  3461. void main() {
  3462. vec4 diffuseColor = vec4( diffuse, opacity );
  3463. #include <clipping_planes_fragment>
  3464. vec3 outgoingLight = vec3( 0.0 );
  3465. #include <logdepthbuf_fragment>
  3466. #include <map_particle_fragment>
  3467. #include <color_fragment>
  3468. #include <alphatest_fragment>
  3469. #include <alphahash_fragment>
  3470. outgoingLight = diffuseColor.rgb;
  3471. #include <opaque_fragment>
  3472. #include <tonemapping_fragment>
  3473. #include <colorspace_fragment>
  3474. #include <fog_fragment>
  3475. #include <premultiplied_alpha_fragment>
  3476. }`,g0e=`#include <common>
  3477. #include <batching_pars_vertex>
  3478. #include <fog_pars_vertex>
  3479. #include <morphtarget_pars_vertex>
  3480. #include <skinning_pars_vertex>
  3481. #include <logdepthbuf_pars_vertex>
  3482. #include <shadowmap_pars_vertex>
  3483. void main() {
  3484. #include <batching_vertex>
  3485. #include <beginnormal_vertex>
  3486. #include <morphinstance_vertex>
  3487. #include <morphnormal_vertex>
  3488. #include <skinbase_vertex>
  3489. #include <skinnormal_vertex>
  3490. #include <defaultnormal_vertex>
  3491. #include <begin_vertex>
  3492. #include <morphtarget_vertex>
  3493. #include <skinning_vertex>
  3494. #include <project_vertex>
  3495. #include <logdepthbuf_vertex>
  3496. #include <worldpos_vertex>
  3497. #include <shadowmap_vertex>
  3498. #include <fog_vertex>
  3499. }`,y0e=`uniform vec3 color;
  3500. uniform float opacity;
  3501. #include <common>
  3502. #include <packing>
  3503. #include <fog_pars_fragment>
  3504. #include <bsdfs>
  3505. #include <lights_pars_begin>
  3506. #include <logdepthbuf_pars_fragment>
  3507. #include <shadowmap_pars_fragment>
  3508. #include <shadowmask_pars_fragment>
  3509. void main() {
  3510. #include <logdepthbuf_fragment>
  3511. gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
  3512. #include <tonemapping_fragment>
  3513. #include <colorspace_fragment>
  3514. #include <fog_fragment>
  3515. }`,b0e=`uniform float rotation;
  3516. uniform vec2 center;
  3517. #include <common>
  3518. #include <uv_pars_vertex>
  3519. #include <fog_pars_vertex>
  3520. #include <logdepthbuf_pars_vertex>
  3521. #include <clipping_planes_pars_vertex>
  3522. void main() {
  3523. #include <uv_vertex>
  3524. vec4 mvPosition = modelViewMatrix[ 3 ];
  3525. vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
  3526. #ifndef USE_SIZEATTENUATION
  3527. bool isPerspective = isPerspectiveMatrix( projectionMatrix );
  3528. if ( isPerspective ) scale *= - mvPosition.z;
  3529. #endif
  3530. vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
  3531. vec2 rotatedPosition;
  3532. rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
  3533. rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
  3534. mvPosition.xy += rotatedPosition;
  3535. gl_Position = projectionMatrix * mvPosition;
  3536. #include <logdepthbuf_vertex>
  3537. #include <clipping_planes_vertex>
  3538. #include <fog_vertex>
  3539. }`,v0e=`uniform vec3 diffuse;
  3540. uniform float opacity;
  3541. #include <common>
  3542. #include <uv_pars_fragment>
  3543. #include <map_pars_fragment>
  3544. #include <alphamap_pars_fragment>
  3545. #include <alphatest_pars_fragment>
  3546. #include <alphahash_pars_fragment>
  3547. #include <fog_pars_fragment>
  3548. #include <logdepthbuf_pars_fragment>
  3549. #include <clipping_planes_pars_fragment>
  3550. void main() {
  3551. vec4 diffuseColor = vec4( diffuse, opacity );
  3552. #include <clipping_planes_fragment>
  3553. vec3 outgoingLight = vec3( 0.0 );
  3554. #include <logdepthbuf_fragment>
  3555. #include <map_fragment>
  3556. #include <alphamap_fragment>
  3557. #include <alphatest_fragment>
  3558. #include <alphahash_fragment>
  3559. outgoingLight = diffuseColor.rgb;
  3560. #include <opaque_fragment>
  3561. #include <tonemapping_fragment>
  3562. #include <colorspace_fragment>
  3563. #include <fog_fragment>
  3564. }`,Qt={alphahash_fragment:jye,alphahash_pars_fragment:Vye,alphamap_fragment:Gye,alphamap_pars_fragment:Hye,alphatest_fragment:Wye,alphatest_pars_fragment:Xye,aomap_fragment:Yye,aomap_pars_fragment:$ye,batching_pars_vertex:Kye,batching_vertex:qye,begin_vertex:Zye,beginnormal_vertex:Jye,bsdfs:Qye,iridescence_fragment:ebe,bumpmap_pars_fragment:tbe,clipping_planes_fragment:nbe,clipping_planes_pars_fragment:rbe,clipping_planes_pars_vertex:ibe,clipping_planes_vertex:obe,color_fragment:abe,color_pars_fragment:sbe,color_pars_vertex:lbe,color_vertex:cbe,common:ube,cube_uv_reflection_fragment:hbe,defaultnormal_vertex:dbe,displacementmap_pars_vertex:pbe,displacementmap_vertex:fbe,emissivemap_fragment:mbe,emissivemap_pars_fragment:gbe,colorspace_fragment:ybe,colorspace_pars_fragment:bbe,envmap_fragment:vbe,envmap_common_pars_fragment:xbe,envmap_pars_fragment:wbe,envmap_pars_vertex:_be,envmap_physical_pars_fragment:Obe,envmap_vertex:Sbe,fog_vertex:Abe,fog_pars_vertex:Mbe,fog_fragment:Pbe,fog_pars_fragment:Ebe,gradientmap_pars_fragment:Cbe,lightmap_pars_fragment:Tbe,lights_lambert_fragment:kbe,lights_lambert_pars_fragment:Ibe,lights_pars_begin:Lbe,lights_toon_fragment:Dbe,lights_toon_pars_fragment:Rbe,lights_phong_fragment:Bbe,lights_phong_pars_fragment:Fbe,lights_physical_fragment:Nbe,lights_physical_pars_fragment:zbe,lights_fragment_begin:Ube,lights_fragment_maps:jbe,lights_fragment_end:Vbe,logdepthbuf_fragment:Gbe,logdepthbuf_pars_fragment:Hbe,logdepthbuf_pars_vertex:Wbe,logdepthbuf_vertex:Xbe,map_fragment:Ybe,map_pars_fragment:$be,map_particle_fragment:Kbe,map_particle_pars_fragment:qbe,metalnessmap_fragment:Zbe,metalnessmap_pars_fragment:Jbe,morphinstance_vertex:Qbe,morphcolor_vertex:eve,morphnormal_vertex:tve,morphtarget_pars_vertex:nve,morphtarget_vertex:rve,normal_fragment_begin:ive,normal_fragment_maps:ove,normal_pars_fragment:ave,normal_pars_vertex:sve,normal_vertex:lve,normalmap_pars_fragment:cve,clearcoat_normal_fragment_begin:uve,clearcoat_normal_fragment_maps:hve,clearcoat_pars_fragment:dve,iridescence_pars_fragment:pve,opaque_fragment:fve,packing:mve,premultiplied_alpha_fragment:gve,project_vertex:yve,dithering_fragment:bve,dithering_pars_fragment:vve,roughnessmap_fragment:xve,roughnessmap_pars_fragment:wve,shadowmap_pars_fragment:_ve,shadowmap_pars_vertex:Sve,shadowmap_vertex:Ave,shadowmask_pars_fragment:Mve,skinbase_vertex:Pve,skinning_pars_vertex:Eve,skinning_vertex:Cve,skinnormal_vertex:Tve,specularmap_fragment:kve,specularmap_pars_fragment:Ive,tonemapping_fragment:Lve,tonemapping_pars_fragment:Ove,transmission_fragment:Dve,transmission_pars_fragment:Rve,uv_pars_fragment:Bve,uv_pars_vertex:Fve,uv_vertex:Nve,worldpos_vertex:zve,background_vert:Uve,background_frag:jve,backgroundCube_vert:Vve,backgroundCube_frag:Gve,cube_vert:Hve,cube_frag:Wve,depth_vert:Xve,depth_frag:Yve,distanceRGBA_vert:$ve,distanceRGBA_frag:Kve,equirect_vert:qve,equirect_frag:Zve,linedashed_vert:Jve,linedashed_frag:Qve,meshbasic_vert:e0e,meshbasic_frag:t0e,meshlambert_vert:n0e,meshlambert_frag:r0e,meshmatcap_vert:i0e,meshmatcap_frag:o0e,meshnormal_vert:a0e,meshnormal_frag:s0e,meshphong_vert:l0e,meshphong_frag:c0e,meshphysical_vert:u0e,meshphysical_frag:h0e,meshtoon_vert:d0e,meshtoon_frag:p0e,points_vert:f0e,points_frag:m0e,shadow_vert:g0e,shadow_frag:y0e,sprite_vert:b0e,sprite_frag:v0e},We={common:{diffuse:{value:new $e(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Xt},alphaMap:{value:null},alphaMapTransform:{value:new Xt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Xt}},envmap:{envMap:{value:null},envMapRotation:{value:new Xt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Xt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Xt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Xt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Xt},normalScale:{value:new Le(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Xt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Xt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Xt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Xt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new $e(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new $e(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Xt},alphaTest:{value:0},uvTransform:{value:new Xt}},sprite:{diffuse:{value:new $e(16777215)},opacity:{value:1},center:{value:new Le(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Xt},alphaMap:{value:null},alphaMapTransform:{value:new Xt},alphaTest:{value:0}}},Ho={basic:{uniforms:yo([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.fog]),vertexShader:Qt.meshbasic_vert,fragmentShader:Qt.meshbasic_frag},lambert:{uniforms:yo([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new $e(0)}}]),vertexShader:Qt.meshlambert_vert,fragmentShader:Qt.meshlambert_frag},phong:{uniforms:yo([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new $e(0)},specular:{value:new $e(1118481)},shininess:{value:30}}]),vertexShader:Qt.meshphong_vert,fragmentShader:Qt.meshphong_frag},standard:{uniforms:yo([We.common,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.roughnessmap,We.metalnessmap,We.fog,We.lights,{emissive:{value:new $e(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Qt.meshphysical_vert,fragmentShader:Qt.meshphysical_frag},toon:{uniforms:yo([We.common,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.gradientmap,We.fog,We.lights,{emissive:{value:new $e(0)}}]),vertexShader:Qt.meshtoon_vert,fragmentShader:Qt.meshtoon_frag},matcap:{uniforms:yo([We.common,We.bumpmap,We.normalmap,We.displacementmap,We.fog,{matcap:{value:null}}]),vertexShader:Qt.meshmatcap_vert,fragmentShader:Qt.meshmatcap_frag},points:{uniforms:yo([We.points,We.fog]),vertexShader:Qt.points_vert,fragmentShader:Qt.points_frag},dashed:{uniforms:yo([We.common,We.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Qt.linedashed_vert,fragmentShader:Qt.linedashed_frag},depth:{uniforms:yo([We.common,We.displacementmap]),vertexShader:Qt.depth_vert,fragmentShader:Qt.depth_frag},normal:{uniforms:yo([We.common,We.bumpmap,We.normalmap,We.displacementmap,{opacity:{value:1}}]),vertexShader:Qt.meshnormal_vert,fragmentShader:Qt.meshnormal_frag},sprite:{uniforms:yo([We.sprite,We.fog]),vertexShader:Qt.sprite_vert,fragmentShader:Qt.sprite_frag},background:{uniforms:{uvTransform:{value:new Xt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Qt.background_vert,fragmentShader:Qt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Xt}},vertexShader:Qt.backgroundCube_vert,fragmentShader:Qt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Qt.cube_vert,fragmentShader:Qt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Qt.equirect_vert,fragmentShader:Qt.equirect_frag},distanceRGBA:{uniforms:yo([We.common,We.displacementmap,{referencePosition:{value:new U},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Qt.distanceRGBA_vert,fragmentShader:Qt.distanceRGBA_frag},shadow:{uniforms:yo([We.lights,We.fog,{color:{value:new $e(0)},opacity:{value:1}}]),vertexShader:Qt.shadow_vert,fragmentShader:Qt.shadow_frag}};Ho.physical={uniforms:yo([Ho.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Xt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Xt},clearcoatNormalScale:{value:new Le(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Xt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Xt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Xt},sheen:{value:0},sheenColor:{value:new $e(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Xt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Xt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Xt},transmissionSamplerSize:{value:new Le},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Xt},attenuationDistance:{value:0},attenuationColor:{value:new $e(0)},specularColor:{value:new $e(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Xt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Xt},anisotropyVector:{value:new Le},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Xt}}]),vertexShader:Qt.meshphysical_vert,fragmentShader:Qt.meshphysical_frag};var sE={r:0,b:0,g:0},ff=new da,x0e=new vt;function w0e(r,e,t,n,i,o,a){let s=new $e(0),l=o===!0?0:1,c,u,h=null,d=0,p=null;function f(v){let x=v.isScene===!0?v.background:null;return x&&x.isTexture&&(x=(v.backgroundBlurriness>0?t:e).get(x)),x}function m(v){let x=!1,w=f(v);w===null?y(s,l):w&&w.isColor&&(y(w,1),x=!0);let _=r.xr.getEnvironmentBlendMode();_==="additive"?n.buffers.color.setClear(0,0,0,1,a):_==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,a),(r.autoClear||x)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil))}function g(v,x){let w=f(x);w&&(w.isCubeTexture||w.mapping===Zw)?(u===void 0&&(u=new jt(new Ty(1,1,1),new Kn({name:"BackgroundCubeMaterial",uniforms:df(Ho.backgroundCube.uniforms),vertexShader:Ho.backgroundCube.vertexShader,fragmentShader:Ho.backgroundCube.fragmentShader,side:zi,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(_,A,E){this.matrixWorld.copyPosition(E.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),ff.copy(x.backgroundRotation),ff.x*=-1,ff.y*=-1,ff.z*=-1,w.isCubeTexture&&w.isRenderTargetTexture===!1&&(ff.y*=-1,ff.z*=-1),u.material.uniforms.envMap.value=w,u.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(x0e.makeRotationFromEuler(ff)),u.material.toneMapped=wn.getTransfer(w.colorSpace)!==zn,(h!==w||d!==w.version||p!==r.toneMapping)&&(u.material.needsUpdate=!0,h=w,d=w.version,p=r.toneMapping),u.layers.enableAll(),v.unshift(u,u.geometry,u.material,0,0,null)):w&&w.isTexture&&(c===void 0&&(c=new jt(new Xu(2,2),new Kn({name:"BackgroundMaterial",uniforms:df(Ho.background.uniforms),vertexShader:Ho.background.vertexShader,fragmentShader:Ho.background.fragmentShader,side:ua,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=w,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=wn.getTransfer(w.colorSpace)!==zn,w.matrixAutoUpdate===!0&&w.updateMatrix(),c.material.uniforms.uvTransform.value.copy(w.matrix),(h!==w||d!==w.version||p!==r.toneMapping)&&(c.material.needsUpdate=!0,h=w,d=w.version,p=r.toneMapping),c.layers.enableAll(),v.unshift(c,c.geometry,c.material,0,0,null))}function y(v,x){v.getRGB(sE,QR(r)),n.buffers.color.setClear(sE.r,sE.g,sE.b,x,a)}function b(){u!==void 0&&(u.geometry.dispose(),u.material.dispose()),c!==void 0&&(c.geometry.dispose(),c.material.dispose())}return{getClearColor:function(){return s},setClearColor:function(v,x=1){s.set(v),l=x,y(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(v){l=v,y(s,l)},render:m,addToRenderList:g,dispose:b}}function _0e(r,e){let t=r.getParameter(r.MAX_VERTEX_ATTRIBS),n={},i=d(null),o=i,a=!1;function s(M,T,L,O,D){let z=!1,N=h(O,L,T);o!==N&&(o=N,c(o.object)),z=p(M,O,L,D),z&&f(M,O,L,D),D!==null&&e.update(D,r.ELEMENT_ARRAY_BUFFER),(z||a)&&(a=!1,x(M,T,L,O),D!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e.get(D).buffer))}function l(){return r.createVertexArray()}function c(M){return r.bindVertexArray(M)}function u(M){return r.deleteVertexArray(M)}function h(M,T,L){let O=L.wireframe===!0,D=n[M.id];D===void 0&&(D={},n[M.id]=D);let z=D[T.id];z===void 0&&(z={},D[T.id]=z);let N=z[O];return N===void 0&&(N=d(l()),z[O]=N),N}function d(M){let T=[],L=[],O=[];for(let D=0;D<t;D++)T[D]=0,L[D]=0,O[D]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:T,enabledAttributes:L,attributeDivisors:O,object:M,attributes:{},index:null}}function p(M,T,L,O){let D=o.attributes,z=T.attributes,N=0,J=L.getAttributes();for(let X in J)if(J[X].location>=0){let ce=D[X],H=z[X];if(H===void 0&&(X==="instanceMatrix"&&M.instanceMatrix&&(H=M.instanceMatrix),X==="instanceColor"&&M.instanceColor&&(H=M.instanceColor)),ce===void 0||ce.attribute!==H||H&&ce.data!==H.data)return!0;N++}return o.attributesNum!==N||o.index!==O}function f(M,T,L,O){let D={},z=T.attributes,N=0,J=L.getAttributes();for(let X in J)if(J[X].location>=0){let ce=z[X];ce===void 0&&(X==="instanceMatrix"&&M.instanceMatrix&&(ce=M.instanceMatrix),X==="instanceColor"&&M.instanceColor&&(ce=M.instanceColor));let H={};H.attribute=ce,ce&&ce.data&&(H.data=ce.data),D[X]=H,N++}o.attributes=D,o.attributesNum=N,o.index=O}function m(){let M=o.newAttributes;for(let T=0,L=M.length;T<L;T++)M[T]=0}function g(M){y(M,0)}function y(M,T){let L=o.newAttributes,O=o.enabledAttributes,D=o.attributeDivisors;L[M]=1,O[M]===0&&(r.enableVertexAttribArray(M),O[M]=1),D[M]!==T&&(r.vertexAttribDivisor(M,T),D[M]=T)}function b(){let M=o.newAttributes,T=o.enabledAttributes;for(let L=0,O=T.length;L<O;L++)T[L]!==M[L]&&(r.disableVertexAttribArray(L),T[L]=0)}function v(M,T,L,O,D,z,N){N===!0?r.vertexAttribIPointer(M,T,L,D,z):r.vertexAttribPointer(M,T,L,O,D,z)}function x(M,T,L,O){m();let D=O.attributes,z=L.getAttributes(),N=T.defaultAttributeValues;for(let J in z){let X=z[J];if(X.location>=0){let Q=D[J];if(Q===void 0&&(J==="instanceMatrix"&&M.instanceMatrix&&(Q=M.instanceMatrix),J==="instanceColor"&&M.instanceColor&&(Q=M.instanceColor)),Q!==void 0){let ce=Q.normalized,H=Q.itemSize,de=e.get(Q);if(de===void 0)continue;let Se=de.buffer,te=de.type,ue=de.bytesPerElement,ve=te===r.INT||te===r.UNSIGNED_INT||Q.gpuType===PP;if(Q.isInterleavedBufferAttribute){let se=Q.data,we=se.stride,pe=Q.offset;if(se.isInstancedInterleavedBuffer){for(let Ee=0;Ee<X.locationSize;Ee++)y(X.location+Ee,se.meshPerAttribute);M.isInstancedMesh!==!0&&O._maxInstanceCount===void 0&&(O._maxInstanceCount=se.meshPerAttribute*se.count)}else for(let Ee=0;Ee<X.locationSize;Ee++)g(X.location+Ee);r.bindBuffer(r.ARRAY_BUFFER,Se);for(let Ee=0;Ee<X.locationSize;Ee++)v(X.location+Ee,H/X.locationSize,te,ce,we*ue,(pe+H/X.locationSize*Ee)*ue,ve)}else{if(Q.isInstancedBufferAttribute){for(let se=0;se<X.locationSize;se++)y(X.location+se,Q.meshPerAttribute);M.isInstancedMesh!==!0&&O._maxInstanceCount===void 0&&(O._maxInstanceCount=Q.meshPerAttribute*Q.count)}else for(let se=0;se<X.locationSize;se++)g(X.location+se);r.bindBuffer(r.ARRAY_BUFFER,Se);for(let se=0;se<X.locationSize;se++)v(X.location+se,H/X.locationSize,te,ce,H*ue,H/X.locationSize*se*ue,ve)}}else if(N!==void 0){let ce=N[J];if(ce!==void 0)switch(ce.length){case 2:r.vertexAttrib2fv(X.location,ce);break;case 3:r.vertexAttrib3fv(X.location,ce);break;case 4:r.vertexAttrib4fv(X.location,ce);break;default:r.vertexAttrib1fv(X.location,ce)}}}}b()}function w(){E();for(let M in n){let T=n[M];for(let L in T){let O=T[L];for(let D in O)u(O[D].object),delete O[D];delete T[L]}delete n[M]}}function _(M){if(n[M.id]===void 0)return;let T=n[M.id];for(let L in T){let O=T[L];for(let D in O)u(O[D].object),delete O[D];delete T[L]}delete n[M.id]}function A(M){for(let T in n){let L=n[T];if(L[M.id]===void 0)continue;let O=L[M.id];for(let D in O)u(O[D].object),delete O[D];delete L[M.id]}}function E(){S(),a=!0,o!==i&&(o=i,c(o.object))}function S(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:s,reset:E,resetDefaultState:S,dispose:w,releaseStatesOfGeometry:_,releaseStatesOfProgram:A,initAttributes:m,enableAttribute:g,disableUnusedAttributes:b}}function S0e(r,e,t){let n;function i(c){n=c}function o(c,u){r.drawArrays(n,c,u),t.update(u,n,1)}function a(c,u,h){h!==0&&(r.drawArraysInstanced(n,c,u,h),t.update(u,n,h))}function s(c,u,h){if(h===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,u,0,h);let p=0;for(let f=0;f<h;f++)p+=u[f];t.update(p,n,1)}function l(c,u,h,d){if(h===0)return;let p=e.get("WEBGL_multi_draw");if(p===null)for(let f=0;f<c.length;f++)a(c[f],u[f],d[f]);else{p.multiDrawArraysInstancedWEBGL(n,c,0,u,0,d,0,h);let f=0;for(let m=0;m<h;m++)f+=u[m]*d[m];t.update(f,n,1)}}this.setMode=i,this.render=o,this.renderInstances=a,this.renderMultiDraw=s,this.renderMultiDrawInstances=l}function A0e(r,e,t,n){let i;function o(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){let A=e.get("EXT_texture_filter_anisotropic");i=r.getParameter(A.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function a(A){return!(A!==oi&&n.convert(A)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT))}function s(A){let E=A===Fy&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(A!==pa&&n.convert(A)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)&&A!==Wa&&!E)}function l(A){if(A==="highp"){if(r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp",u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);let h=t.logarithmicDepthBuffer===!0,d=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),p=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),f=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=r.getParameter(r.MAX_TEXTURE_SIZE),g=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),y=r.getParameter(r.MAX_VERTEX_ATTRIBS),b=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),v=r.getParameter(r.MAX_VARYING_VECTORS),x=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),w=f>0,_=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:l,textureFormatReadable:a,textureTypeReadable:s,precision:c,logarithmicDepthBuffer:h,reverseDepthBuffer:d,maxTextures:p,maxVertexTextures:f,maxTextureSize:m,maxCubemapSize:g,maxAttributes:y,maxVertexUniforms:b,maxVaryings:v,maxFragmentUniforms:x,vertexTextures:w,maxSamples:_}}function M0e(r){let e=this,t=null,n=0,i=!1,o=!1,a=new Ms,s=new Xt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,d){let p=h.length!==0||d||n!==0||i;return i=d,n=h.length,p},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(h,d){t=u(h,d,0)},this.setState=function(h,d,p){let f=h.clippingPlanes,m=h.clipIntersection,g=h.clipShadows,y=r.get(h);if(!i||f===null||f.length===0||o&&!g)o?u(null):c();else{let b=o?0:n,v=b*4,x=y.clippingState||null;l.value=x,x=u(f,d,v,p);for(let w=0;w!==v;++w)x[w]=t[w];y.clippingState=x,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function u(h,d,p,f){let m=h!==null?h.length:0,g=null;if(m!==0){if(g=l.value,f!==!0||g===null){let y=p+m*4,b=d.matrixWorldInverse;s.getNormalMatrix(b),(g===null||g.length<y)&&(g=new Float32Array(y));for(let v=0,x=p;v!==m;++v,x+=4)a.copy(h[v]).applyMatrix4(b,s),a.normal.toArray(g,x),g[x+3]=a.constant}l.value=g,l.needsUpdate=!0}return e.numPlanes=m,e.numIntersection=0,g}}function P0e(r){let e=new WeakMap;function t(a,s){return s===SP?a.mapping=sf:s===AP&&(a.mapping=lf),a}function n(a){if(a&&a.isTexture){let s=a.mapping;if(s===SP||s===AP)if(e.has(a)){let l=e.get(a).texture;return t(l,a.mapping)}else{let l=a.image;if(l&&l.height>0){let c=new KM(l.height);return c.fromEquirectangularTexture(r,a),e.set(a,c),a.addEventListener("dispose",i),t(c.texture,a.mapping)}else return null}}return a}function i(a){let s=a.target;s.removeEventListener("dispose",i);let l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}var zy=4,cX=[.125,.215,.35,.446,.526,.582],yf=20,i4=new Ga,uX=new $e,o4=null,a4=0,s4=0,l4=!1,gf=(1+Math.sqrt(5))/2,Ny=1/gf,hX=[new U(-gf,Ny,0),new U(gf,Ny,0),new U(-Ny,0,gf),new U(Ny,0,gf),new U(0,gf,-Ny),new U(0,gf,Ny),new U(-1,1,-1),new U(1,1,-1),new U(-1,1,1),new U(1,1,1)],uE=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100){o4=this._renderer.getRenderTarget(),a4=this._renderer.getActiveCubeFace(),s4=this._renderer.getActiveMipmapLevel(),l4=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);let o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,n,i,o),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=fX(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=pX(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(o4,a4,s4),this._renderer.xr.enabled=l4,e.scissorTest=!1,lE(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===sf||e.mapping===lf?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),o4=this._renderer.getRenderTarget(),a4=this._renderer.getActiveCubeFace(),s4=this._renderer.getActiveMipmapLevel(),l4=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:xi,minFilter:xi,generateMipmaps:!1,type:Fy,format:oi,colorSpace:Qp,depthBuffer:!1},i=dX(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=dX(e,t,n);let{_lodMax:o}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=E0e(o)),this._blurMaterial=C0e(o,e,t)}return i}_compileMaterial(e){let t=new jt(this._lodPlanes[0],e);this._renderer.compile(t,i4)}_sceneToCubeUV(e,t,n,i){let s=new ca(90,1,t,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,d=u.toneMapping;u.getClearColor(uX),u.toneMapping=$u,u.autoClear=!1;let p=new _i({name:"PMREM.Background",side:zi,depthWrite:!1,depthTest:!1}),f=new jt(new Ty,p),m=!1,g=e.background;g?g.isColor&&(p.color.copy(g),e.background=null,m=!0):(p.color.copy(uX),m=!0);for(let y=0;y<6;y++){let b=y%3;b===0?(s.up.set(0,l[y],0),s.lookAt(c[y],0,0)):b===1?(s.up.set(0,0,l[y]),s.lookAt(0,c[y],0)):(s.up.set(0,l[y],0),s.lookAt(0,0,c[y]));let v=this._cubeSize;lE(i,b*v,y>2?v:0,v,v),u.setRenderTarget(i),m&&u.render(f,s),u.render(e,s)}f.geometry.dispose(),f.material.dispose(),u.toneMapping=d,u.autoClear=h,e.background=g}_textureToCubeUV(e,t){let n=this._renderer,i=e.mapping===sf||e.mapping===lf;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=fX()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=pX());let o=i?this._cubemapMaterial:this._equirectMaterial,a=new jt(this._lodPlanes[0],o),s=o.uniforms;s.envMap.value=e;let l=this._cubeSize;lE(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(a,i4)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let i=this._lodPlanes.length;for(let o=1;o<i;o++){let a=Math.sqrt(this._sigmas[o]*this._sigmas[o]-this._sigmas[o-1]*this._sigmas[o-1]),s=hX[(i-o-1)%hX.length];this._blur(e,o-1,o,a,s)}t.autoClear=n}_blur(e,t,n,i,o){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",o),this._halfBlur(a,e,n,n,i,"longitudinal",o)}_halfBlur(e,t,n,i,o,a,s){let l=this._renderer,c=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");let u=3,h=new jt(this._lodPlanes[i],c),d=c.uniforms,p=this._sizeLods[n]-1,f=isFinite(o)?Math.PI/(2*p):2*Math.PI/(2*yf-1),m=o/f,g=isFinite(o)?1+Math.floor(u*m):yf;g>yf&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${yf}`);let y=[],b=0;for(let A=0;A<yf;++A){let E=A/m,S=Math.exp(-E*E/2);y.push(S),A===0?b+=S:A<g&&(b+=2*S)}for(let A=0;A<y.length;A++)y[A]=y[A]/b;d.envMap.value=e.texture,d.samples.value=g,d.weights.value=y,d.latitudinal.value=a==="latitudinal",s&&(d.poleAxis.value=s);let{_lodMax:v}=this;d.dTheta.value=f,d.mipInt.value=v-n;let x=this._sizeLods[i],w=3*x*(i>v-zy?i-v+zy:0),_=4*(this._cubeSize-x);lE(t,w,_,3*x,2*x),l.setRenderTarget(t),l.render(h,i4)}};function E0e(r){let e=[],t=[],n=[],i=r,o=r-zy+1+cX.length;for(let a=0;a<o;a++){let s=Math.pow(2,i);t.push(s);let l=1/s;a>r-zy?l=cX[a-r+zy-1]:a===0&&(l=0),n.push(l);let c=1/(s-2),u=-c,h=1+c,d=[u,u,h,u,h,h,u,u,h,h,u,h],p=6,f=6,m=3,g=2,y=1,b=new Float32Array(m*f*p),v=new Float32Array(g*f*p),x=new Float32Array(y*f*p);for(let _=0;_<p;_++){let A=_%3*2/3-1,E=_>2?0:-1,S=[A,E,0,A+2/3,E,0,A+2/3,E+1,0,A,E,0,A+2/3,E+1,0,A,E+1,0];b.set(S,m*f*_),v.set(d,g*f*_);let M=[_,_,_,_,_,_];x.set(M,y*f*_)}let w=new ot;w.setAttribute("position",new Et(b,m)),w.setAttribute("uv",new Et(v,g)),w.setAttribute("faceIndex",new Et(x,y)),e.push(w),i>zy&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function dX(r,e,t){let n=new Go(r,e,t);return n.texture.mapping=Zw,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function lE(r,e,t,n,i){r.viewport.set(e,t,n,i),r.scissor.set(e,t,n,i)}function C0e(r,e,t){let n=new Float32Array(yf),i=new U(0,1,0);return new Kn({name:"SphericalGaussianBlur",defines:{n:yf,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:b4(),fragmentShader:`
  3565. precision mediump float;
  3566. precision mediump int;
  3567. varying vec3 vOutputDirection;
  3568. uniform sampler2D envMap;
  3569. uniform int samples;
  3570. uniform float weights[ n ];
  3571. uniform bool latitudinal;
  3572. uniform float dTheta;
  3573. uniform float mipInt;
  3574. uniform vec3 poleAxis;
  3575. #define ENVMAP_TYPE_CUBE_UV
  3576. #include <cube_uv_reflection_fragment>
  3577. vec3 getSample( float theta, vec3 axis ) {
  3578. float cosTheta = cos( theta );
  3579. // Rodrigues' axis-angle rotation
  3580. vec3 sampleDirection = vOutputDirection * cosTheta
  3581. + cross( axis, vOutputDirection ) * sin( theta )
  3582. + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
  3583. return bilinearCubeUV( envMap, sampleDirection, mipInt );
  3584. }
  3585. void main() {
  3586. vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
  3587. if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
  3588. axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
  3589. }
  3590. axis = normalize( axis );
  3591. gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
  3592. gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
  3593. for ( int i = 1; i < n; i++ ) {
  3594. if ( i >= samples ) {
  3595. break;
  3596. }
  3597. float theta = dTheta * float( i );
  3598. gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
  3599. gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
  3600. }
  3601. }
  3602. `,blending:Yu,depthTest:!1,depthWrite:!1})}function pX(){return new Kn({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:b4(),fragmentShader:`
  3603. precision mediump float;
  3604. precision mediump int;
  3605. varying vec3 vOutputDirection;
  3606. uniform sampler2D envMap;
  3607. #include <common>
  3608. void main() {
  3609. vec3 outputDirection = normalize( vOutputDirection );
  3610. vec2 uv = equirectUv( outputDirection );
  3611. gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
  3612. }
  3613. `,blending:Yu,depthTest:!1,depthWrite:!1})}function fX(){return new Kn({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:b4(),fragmentShader:`
  3614. precision mediump float;
  3615. precision mediump int;
  3616. uniform float flipEnvMap;
  3617. varying vec3 vOutputDirection;
  3618. uniform samplerCube envMap;
  3619. void main() {
  3620. gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
  3621. }
  3622. `,blending:Yu,depthTest:!1,depthWrite:!1})}function b4(){return`
  3623. precision mediump float;
  3624. precision mediump int;
  3625. attribute float faceIndex;
  3626. varying vec3 vOutputDirection;
  3627. // RH coordinate system; PMREM face-indexing convention
  3628. vec3 getDirection( vec2 uv, float face ) {
  3629. uv = 2.0 * uv - 1.0;
  3630. vec3 direction = vec3( uv, 1.0 );
  3631. if ( face == 0.0 ) {
  3632. direction = direction.zyx; // ( 1, v, u ) pos x
  3633. } else if ( face == 1.0 ) {
  3634. direction = direction.xzy;
  3635. direction.xz *= -1.0; // ( -u, 1, -v ) pos y
  3636. } else if ( face == 2.0 ) {
  3637. direction.x *= -1.0; // ( -u, v, 1 ) pos z
  3638. } else if ( face == 3.0 ) {
  3639. direction = direction.zyx;
  3640. direction.xz *= -1.0; // ( -1, v, -u ) neg x
  3641. } else if ( face == 4.0 ) {
  3642. direction = direction.xzy;
  3643. direction.xy *= -1.0; // ( -u, -1, v ) neg y
  3644. } else if ( face == 5.0 ) {
  3645. direction.z *= -1.0; // ( u, v, -1 ) neg z
  3646. }
  3647. return direction;
  3648. }
  3649. void main() {
  3650. vOutputDirection = getDirection( uv, faceIndex );
  3651. gl_Position = vec4( position, 1.0 );
  3652. }
  3653. `}function T0e(r){let e=new WeakMap,t=null;function n(s){if(s&&s.isTexture){let l=s.mapping,c=l===SP||l===AP,u=l===sf||l===lf;if(c||u){let h=e.get(s),d=h!==void 0?h.texture.pmremVersion:0;if(s.isRenderTargetTexture&&s.pmremVersion!==d)return t===null&&(t=new uE(r)),h=c?t.fromEquirectangular(s,h):t.fromCubemap(s,h),h.texture.pmremVersion=s.pmremVersion,e.set(s,h),h.texture;if(h!==void 0)return h.texture;{let p=s.image;return c&&p&&p.height>0||u&&p&&i(p)?(t===null&&(t=new uE(r)),h=c?t.fromEquirectangular(s):t.fromCubemap(s),h.texture.pmremVersion=s.pmremVersion,e.set(s,h),s.addEventListener("dispose",o),h.texture):null}}}return s}function i(s){let l=0,c=6;for(let u=0;u<c;u++)s[u]!==void 0&&l++;return l===c}function o(s){let l=s.target;l.removeEventListener("dispose",o);let c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function a(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:a}}function k0e(r){let e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=r.getExtension("WEBGL_depth_texture")||r.getExtension("MOZ_WEBGL_depth_texture")||r.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=r.getExtension("WEBGL_compressed_texture_s3tc")||r.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=r.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){let i=t(n);return i===null&&hf("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function I0e(r,e,t,n){let i={},o=new WeakMap;function a(h){let d=h.target;d.index!==null&&e.remove(d.index);for(let f in d.attributes)e.remove(d.attributes[f]);d.removeEventListener("dispose",a),delete i[d.id];let p=o.get(d);p&&(e.remove(p),o.delete(d)),n.releaseStatesOfGeometry(d),d.isInstancedBufferGeometry===!0&&delete d._maxInstanceCount,t.memory.geometries--}function s(h,d){return i[d.id]===!0||(d.addEventListener("dispose",a),i[d.id]=!0,t.memory.geometries++),d}function l(h){let d=h.attributes;for(let p in d)e.update(d[p],r.ARRAY_BUFFER)}function c(h){let d=[],p=h.index,f=h.attributes.position,m=0;if(p!==null){let b=p.array;m=p.version;for(let v=0,x=b.length;v<x;v+=3){let w=b[v+0],_=b[v+1],A=b[v+2];d.push(w,_,_,A,A,w)}}else if(f!==void 0){let b=f.array;m=f.version;for(let v=0,x=b.length/3-1;v<x;v+=3){let w=v+0,_=v+1,A=v+2;d.push(w,_,_,A,A,w)}}else return;let g=new(JR(d)?ef:Gu)(d,1);g.version=m;let y=o.get(h);y&&e.remove(y),o.set(h,g)}function u(h){let d=o.get(h);if(d){let p=h.index;p!==null&&d.version<p.version&&c(h)}else c(h);return o.get(h)}return{get:s,update:l,getWireframeAttribute:u}}function L0e(r,e,t){let n;function i(d){n=d}let o,a;function s(d){o=d.type,a=d.bytesPerElement}function l(d,p){r.drawElements(n,p,o,d*a),t.update(p,n,1)}function c(d,p,f){f!==0&&(r.drawElementsInstanced(n,p,o,d*a,f),t.update(p,n,f))}function u(d,p,f){if(f===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,p,0,o,d,0,f);let g=0;for(let y=0;y<f;y++)g+=p[y];t.update(g,n,1)}function h(d,p,f,m){if(f===0)return;let g=e.get("WEBGL_multi_draw");if(g===null)for(let y=0;y<d.length;y++)c(d[y]/a,p[y],m[y]);else{g.multiDrawElementsInstancedWEBGL(n,p,0,o,d,0,m,0,f);let y=0;for(let b=0;b<f;b++)y+=p[b]*m[b];t.update(y,n,1)}}this.setMode=i,this.setIndex=s,this.render=l,this.renderInstances=c,this.renderMultiDraw=u,this.renderMultiDrawInstances=h}function O0e(r){let e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(o,a,s){switch(t.calls++,a){case r.TRIANGLES:t.triangles+=s*(o/3);break;case r.LINES:t.lines+=s*(o/2);break;case r.LINE_STRIP:t.lines+=s*(o-1);break;case r.LINE_LOOP:t.lines+=s*o;break;case r.POINTS:t.points+=s*o;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",a);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function D0e(r,e,t){let n=new WeakMap,i=new yn;function o(a,s,l){let c=a.morphTargetInfluences,u=s.morphAttributes.position||s.morphAttributes.normal||s.morphAttributes.color,h=u!==void 0?u.length:0,d=n.get(s);if(d===void 0||d.count!==h){let S=function(){A.dispose(),n.delete(s),s.removeEventListener("dispose",S)};d!==void 0&&d.texture.dispose();let p=s.morphAttributes.position!==void 0,f=s.morphAttributes.normal!==void 0,m=s.morphAttributes.color!==void 0,g=s.morphAttributes.position||[],y=s.morphAttributes.normal||[],b=s.morphAttributes.color||[],v=0;p===!0&&(v=1),f===!0&&(v=2),m===!0&&(v=3);let x=s.attributes.position.count*v,w=1;x>e.maxTextureSize&&(w=Math.ceil(x/e.maxTextureSize),x=e.maxTextureSize);let _=new Float32Array(x*w*4*h),A=new kw(_,x,w,h);A.type=Wa,A.needsUpdate=!0;let E=v*4;for(let M=0;M<h;M++){let T=g[M],L=y[M],O=b[M],D=x*w*4*M;for(let z=0;z<T.count;z++){let N=z*E;p===!0&&(i.fromBufferAttribute(T,z),_[D+N+0]=i.x,_[D+N+1]=i.y,_[D+N+2]=i.z,_[D+N+3]=0),f===!0&&(i.fromBufferAttribute(L,z),_[D+N+4]=i.x,_[D+N+5]=i.y,_[D+N+6]=i.z,_[D+N+7]=0),m===!0&&(i.fromBufferAttribute(O,z),_[D+N+8]=i.x,_[D+N+9]=i.y,_[D+N+10]=i.z,_[D+N+11]=O.itemSize===4?i.w:1)}}d={count:h,texture:A,size:new Le(x,w)},n.set(s,d),s.addEventListener("dispose",S)}if(a.isInstancedMesh===!0&&a.morphTexture!==null)l.getUniforms().setValue(r,"morphTexture",a.morphTexture,t);else{let p=0;for(let m=0;m<c.length;m++)p+=c[m];let f=s.morphTargetsRelative?1:1-p;l.getUniforms().setValue(r,"morphTargetBaseInfluence",f),l.getUniforms().setValue(r,"morphTargetInfluences",c)}l.getUniforms().setValue(r,"morphTargetsTexture",d.texture,t),l.getUniforms().setValue(r,"morphTargetsTextureSize",d.size)}return{update:o}}function R0e(r,e,t,n){let i=new WeakMap;function o(l){let c=n.render.frame,u=l.geometry,h=e.get(l,u);if(i.get(h)!==c&&(e.update(h),i.set(h,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",s)===!1&&l.addEventListener("dispose",s),i.get(l)!==c&&(t.update(l.instanceMatrix,r.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,r.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){let d=l.skeleton;i.get(d)!==c&&(d.update(),i.set(d,c))}return h}function a(){i=new WeakMap}function s(l){let c=l.target;c.removeEventListener("dispose",s),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:o,dispose:a}}var OX=new wi,mX=new Fw(1,1),DX=new kw,RX=new YM,BX=new Lw,gX=[],yX=[],bX=new Float32Array(16),vX=new Float32Array(9),xX=new Float32Array(4);function jy(r,e,t){let n=r[0];if(n<=0||n>0)return r;let i=e*t,o=gX[i];if(o===void 0&&(o=new Float32Array(i),gX[i]=o),e!==0){n.toArray(o,0);for(let a=1,s=0;a!==e;++a)s+=t,r[a].toArray(o,s)}return o}function ai(r,e){if(r.length!==e.length)return!1;for(let t=0,n=r.length;t<n;t++)if(r[t]!==e[t])return!1;return!0}function si(r,e){for(let t=0,n=e.length;t<n;t++)r[t]=e[t]}function dE(r,e){let t=yX[e];t===void 0&&(t=new Int32Array(e),yX[e]=t);for(let n=0;n!==e;++n)t[n]=r.allocateTextureUnit();return t}function B0e(r,e){let t=this.cache;t[0]!==e&&(r.uniform1f(this.addr,e),t[0]=e)}function F0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(r.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ai(t,e))return;r.uniform2fv(this.addr,e),si(t,e)}}function N0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(r.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(r.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(ai(t,e))return;r.uniform3fv(this.addr,e),si(t,e)}}function z0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(r.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(ai(t,e))return;r.uniform4fv(this.addr,e),si(t,e)}}function U0e(r,e){let t=this.cache,n=e.elements;if(n===void 0){if(ai(t,e))return;r.uniformMatrix2fv(this.addr,!1,e),si(t,e)}else{if(ai(t,n))return;xX.set(n),r.uniformMatrix2fv(this.addr,!1,xX),si(t,n)}}function j0e(r,e){let t=this.cache,n=e.elements;if(n===void 0){if(ai(t,e))return;r.uniformMatrix3fv(this.addr,!1,e),si(t,e)}else{if(ai(t,n))return;vX.set(n),r.uniformMatrix3fv(this.addr,!1,vX),si(t,n)}}function V0e(r,e){let t=this.cache,n=e.elements;if(n===void 0){if(ai(t,e))return;r.uniformMatrix4fv(this.addr,!1,e),si(t,e)}else{if(ai(t,n))return;bX.set(n),r.uniformMatrix4fv(this.addr,!1,bX),si(t,n)}}function G0e(r,e){let t=this.cache;t[0]!==e&&(r.uniform1i(this.addr,e),t[0]=e)}function H0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(r.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ai(t,e))return;r.uniform2iv(this.addr,e),si(t,e)}}function W0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(r.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ai(t,e))return;r.uniform3iv(this.addr,e),si(t,e)}}function X0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(r.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(ai(t,e))return;r.uniform4iv(this.addr,e),si(t,e)}}function Y0e(r,e){let t=this.cache;t[0]!==e&&(r.uniform1ui(this.addr,e),t[0]=e)}function $0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(r.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ai(t,e))return;r.uniform2uiv(this.addr,e),si(t,e)}}function K0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(r.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ai(t,e))return;r.uniform3uiv(this.addr,e),si(t,e)}}function q0e(r,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(r.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(ai(t,e))return;r.uniform4uiv(this.addr,e),si(t,e)}}function Z0e(r,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i);let o;this.type===r.SAMPLER_2D_SHADOW?(mX.compareFunction=KR,o=mX):o=OX,t.setTexture2D(e||o,i)}function J0e(r,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||RX,i)}function Q0e(r,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||BX,i)}function exe(r,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||DX,i)}function txe(r){switch(r){case 5126:return B0e;case 35664:return F0e;case 35665:return N0e;case 35666:return z0e;case 35674:return U0e;case 35675:return j0e;case 35676:return V0e;case 5124:case 35670:return G0e;case 35667:case 35671:return H0e;case 35668:case 35672:return W0e;case 35669:case 35673:return X0e;case 5125:return Y0e;case 36294:return $0e;case 36295:return K0e;case 36296:return q0e;case 35678:case 36198:case 36298:case 36306:case 35682:return Z0e;case 35679:case 36299:case 36307:return J0e;case 35680:case 36300:case 36308:case 36293:return Q0e;case 36289:case 36303:case 36311:case 36292:return exe}}function nxe(r,e){r.uniform1fv(this.addr,e)}function rxe(r,e){let t=jy(e,this.size,2);r.uniform2fv(this.addr,t)}function ixe(r,e){let t=jy(e,this.size,3);r.uniform3fv(this.addr,t)}function oxe(r,e){let t=jy(e,this.size,4);r.uniform4fv(this.addr,t)}function axe(r,e){let t=jy(e,this.size,4);r.uniformMatrix2fv(this.addr,!1,t)}function sxe(r,e){let t=jy(e,this.size,9);r.uniformMatrix3fv(this.addr,!1,t)}function lxe(r,e){let t=jy(e,this.size,16);r.uniformMatrix4fv(this.addr,!1,t)}function cxe(r,e){r.uniform1iv(this.addr,e)}function uxe(r,e){r.uniform2iv(this.addr,e)}function hxe(r,e){r.uniform3iv(this.addr,e)}function dxe(r,e){r.uniform4iv(this.addr,e)}function pxe(r,e){r.uniform1uiv(this.addr,e)}function fxe(r,e){r.uniform2uiv(this.addr,e)}function mxe(r,e){r.uniform3uiv(this.addr,e)}function gxe(r,e){r.uniform4uiv(this.addr,e)}function yxe(r,e,t){let n=this.cache,i=e.length,o=dE(t,i);ai(n,o)||(r.uniform1iv(this.addr,o),si(n,o));for(let a=0;a!==i;++a)t.setTexture2D(e[a]||OX,o[a])}function bxe(r,e,t){let n=this.cache,i=e.length,o=dE(t,i);ai(n,o)||(r.uniform1iv(this.addr,o),si(n,o));for(let a=0;a!==i;++a)t.setTexture3D(e[a]||RX,o[a])}function vxe(r,e,t){let n=this.cache,i=e.length,o=dE(t,i);ai(n,o)||(r.uniform1iv(this.addr,o),si(n,o));for(let a=0;a!==i;++a)t.setTextureCube(e[a]||BX,o[a])}function xxe(r,e,t){let n=this.cache,i=e.length,o=dE(t,i);ai(n,o)||(r.uniform1iv(this.addr,o),si(n,o));for(let a=0;a!==i;++a)t.setTexture2DArray(e[a]||DX,o[a])}function wxe(r){switch(r){case 5126:return nxe;case 35664:return rxe;case 35665:return ixe;case 35666:return oxe;case 35674:return axe;case 35675:return sxe;case 35676:return lxe;case 5124:case 35670:return cxe;case 35667:case 35671:return uxe;case 35668:case 35672:return hxe;case 35669:case 35673:return dxe;case 5125:return pxe;case 36294:return fxe;case 36295:return mxe;case 36296:return gxe;case 35678:case 36198:case 36298:case 36306:case 35682:return yxe;case 35679:case 36299:case 36307:return bxe;case 35680:case 36300:case 36308:case 36293:return vxe;case 36289:case 36303:case 36311:case 36292:return xxe}}var u4=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=txe(t.type)}},h4=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=wxe(t.type)}},d4=class{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){let i=this.seq;for(let o=0,a=i.length;o!==a;++o){let s=i[o];s.setValue(e,t[s.id],n)}}},c4=/(\w+)(\])?(\[|\.)?/g;function wX(r,e){r.seq.push(e),r.map[e.id]=e}function _xe(r,e,t){let n=r.name,i=n.length;for(c4.lastIndex=0;;){let o=c4.exec(n),a=c4.lastIndex,s=o[1],l=o[2]==="]",c=o[3];if(l&&(s=s|0),c===void 0||c==="["&&a+2===i){wX(t,c===void 0?new u4(s,r,e):new h4(s,r,e));break}else{let h=t.map[s];h===void 0&&(h=new d4(s),wX(t,h)),t=h}}}var Uy=class{constructor(e,t){this.seq=[],this.map={};let n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){let o=e.getActiveUniform(t,i),a=e.getUniformLocation(t,o.name);_xe(o,a,this)}}setValue(e,t,n,i){let o=this.map[t];o!==void 0&&o.setValue(e,n,i)}setOptional(e,t,n){let i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let o=0,a=t.length;o!==a;++o){let s=t[o],l=n[s.id];l.needsUpdate!==!1&&s.setValue(e,l.value,i)}}static seqWithValue(e,t){let n=[];for(let i=0,o=e.length;i!==o;++i){let a=e[i];a.id in t&&n.push(a)}return n}};function _X(r,e,t){let n=r.createShader(e);return r.shaderSource(n,t),r.compileShader(n),n}var Sxe=37297,Axe=0;function Mxe(r,e){let t=r.split(`
  3654. `),n=[],i=Math.max(e-6,0),o=Math.min(e+6,t.length);for(let a=i;a<o;a++){let s=a+1;n.push(`${s===e?">":" "} ${s}: ${t[a]}`)}return n.join(`
  3655. `)}var SX=new Xt;function Pxe(r){wn._getMatrix(SX,wn.workingColorSpace,r);let e=`mat3( ${SX.elements.map(t=>t.toFixed(4))} )`;switch(wn.getTransfer(r)){case Ew:return[e,"LinearTransferOETF"];case zn:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",r),[e,"LinearTransferOETF"]}}function AX(r,e,t){let n=r.getShaderParameter(e,r.COMPILE_STATUS),i=r.getShaderInfoLog(e).trim();if(n&&i==="")return"";let o=/ERROR: 0:(\d+)/.exec(i);if(o){let a=parseInt(o[1]);return t.toUpperCase()+`
  3656. `+i+`
  3657. `+Mxe(r.getShaderSource(e),a)}else return i}function Exe(r,e){let t=Pxe(e);return[`vec4 ${r}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(`
  3658. `)}function Cxe(r,e){let t;switch(e){case DW:t="Linear";break;case RW:t="Reinhard";break;case BW:t="Cineon";break;case FW:t="ACESFilmic";break;case zW:t="AgX";break;case UW:t="Neutral";break;case NW:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}var cE=new U;function Txe(){wn.getLuminanceCoefficients(cE);let r=cE.x.toFixed(4),e=cE.y.toFixed(4),t=cE.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${r}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(`
  3659. `)}function kxe(r){return[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(i_).join(`
  3660. `)}function Ixe(r){let e=[];for(let t in r){let n=r[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(`
  3661. `)}function Lxe(r,e){let t={},n=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){let o=r.getActiveAttrib(e,i),a=o.name,s=1;o.type===r.FLOAT_MAT2&&(s=2),o.type===r.FLOAT_MAT3&&(s=3),o.type===r.FLOAT_MAT4&&(s=4),t[a]={type:o.type,location:r.getAttribLocation(e,a),locationSize:s}}return t}function i_(r){return r!==""}function MX(r,e){let t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return r.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function PX(r,e){return r.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}var Oxe=/^[ \t]*#include +<([\w\d./]+)>/gm;function p4(r){return r.replace(Oxe,Rxe)}var Dxe=new Map;function Rxe(r,e){let t=Qt[e];if(t===void 0){let n=Dxe.get(e);if(n!==void 0)t=Qt[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return p4(t)}var Bxe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function EX(r){return r.replace(Bxe,Fxe)}function Fxe(r,e,t,n){let i="";for(let o=parseInt(e);o<parseInt(t);o++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function CX(r){let e=`precision ${r.precision} float;
  3662. precision ${r.precision} int;
  3663. precision ${r.precision} sampler2D;
  3664. precision ${r.precision} samplerCube;
  3665. precision ${r.precision} sampler3D;
  3666. precision ${r.precision} sampler2DArray;
  3667. precision ${r.precision} sampler2DShadow;
  3668. precision ${r.precision} samplerCubeShadow;
  3669. precision ${r.precision} sampler2DArrayShadow;
  3670. precision ${r.precision} isampler2D;
  3671. precision ${r.precision} isampler3D;
  3672. precision ${r.precision} isamplerCube;
  3673. precision ${r.precision} isampler2DArray;
  3674. precision ${r.precision} usampler2D;
  3675. precision ${r.precision} usampler3D;
  3676. precision ${r.precision} usamplerCube;
  3677. precision ${r.precision} usampler2DArray;
  3678. `;return r.precision==="highp"?e+=`
  3679. #define HIGH_PRECISION`:r.precision==="mediump"?e+=`
  3680. #define MEDIUM_PRECISION`:r.precision==="lowp"&&(e+=`
  3681. #define LOW_PRECISION`),e}function Nxe(r){let e="SHADOWMAP_TYPE_BASIC";return r.shadowMapType===DR?e="SHADOWMAP_TYPE_PCF":r.shadowMapType===pW?e="SHADOWMAP_TYPE_PCF_SOFT":r.shadowMapType===mc&&(e="SHADOWMAP_TYPE_VSM"),e}function zxe(r){let e="ENVMAP_TYPE_CUBE";if(r.envMap)switch(r.envMapMode){case sf:case lf:e="ENVMAP_TYPE_CUBE";break;case Zw:e="ENVMAP_TYPE_CUBE_UV";break}return e}function Uxe(r){let e="ENVMAP_MODE_REFLECTION";return r.envMap&&r.envMapMode===lf&&(e="ENVMAP_MODE_REFRACTION"),e}function jxe(r){let e="ENVMAP_BLENDING_NONE";if(r.envMap)switch(r.combine){case NR:e="ENVMAP_BLENDING_MULTIPLY";break;case LW:e="ENVMAP_BLENDING_MIX";break;case OW:e="ENVMAP_BLENDING_ADD";break}return e}function Vxe(r){let e=r.envMapCubeUVHeight;if(e===null)return null;let t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:n,maxMip:t}}function Gxe(r,e,t,n){let i=r.getContext(),o=t.defines,a=t.vertexShader,s=t.fragmentShader,l=Nxe(t),c=zxe(t),u=Uxe(t),h=jxe(t),d=Vxe(t),p=kxe(t),f=Ixe(o),m=i.createProgram(),g,y,b=t.glslVersion?"#version "+t.glslVersion+`
  3682. `:"";t.isRawShaderMaterial?(g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,f].filter(i_).join(`
  3683. `),g.length>0&&(g+=`
  3684. `),y=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,f].filter(i_).join(`
  3685. `),y.length>0&&(y+=`
  3686. `)):(g=[CX(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,f,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
  3687. `].filter(i_).join(`
  3688. `),y=[CX(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,f,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+h:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==$u?"#define TONE_MAPPING":"",t.toneMapping!==$u?Qt.tonemapping_pars_fragment:"",t.toneMapping!==$u?Cxe("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Qt.colorspace_pars_fragment,Exe("linearToOutputTexel",t.outputColorSpace),Txe(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
  3689. `].filter(i_).join(`
  3690. `)),a=p4(a),a=MX(a,t),a=PX(a,t),s=p4(s),s=MX(s,t),s=PX(s,t),a=EX(a),s=EX(s),t.isRawShaderMaterial!==!0&&(b=`#version 300 es
  3691. `,g=[p,"#define attribute in","#define varying out","#define texture2D texture"].join(`
  3692. `)+`
  3693. `+g,y=["#define varying in",t.glslVersion===qR?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===qR?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
  3694. `)+`
  3695. `+y);let v=b+g+a,x=b+y+s,w=_X(i,i.VERTEX_SHADER,v),_=_X(i,i.FRAGMENT_SHADER,x);i.attachShader(m,w),i.attachShader(m,_),t.index0AttributeName!==void 0?i.bindAttribLocation(m,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m);function A(T){if(r.debug.checkShaderErrors){let L=i.getProgramInfoLog(m).trim(),O=i.getShaderInfoLog(w).trim(),D=i.getShaderInfoLog(_).trim(),z=!0,N=!0;if(i.getProgramParameter(m,i.LINK_STATUS)===!1)if(z=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(i,m,w,_);else{let J=AX(i,w,"vertex"),X=AX(i,_,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(m,i.VALIDATE_STATUS)+`
  3696. Material Name: `+T.name+`
  3697. Material Type: `+T.type+`
  3698. Program Info Log: `+L+`
  3699. `+J+`
  3700. `+X)}else L!==""?console.warn("THREE.WebGLProgram: Program Info Log:",L):(O===""||D==="")&&(N=!1);N&&(T.diagnostics={runnable:z,programLog:L,vertexShader:{log:O,prefix:g},fragmentShader:{log:D,prefix:y}})}i.deleteShader(w),i.deleteShader(_),E=new Uy(i,m),S=Lxe(i,m)}let E;this.getUniforms=function(){return E===void 0&&A(this),E};let S;this.getAttributes=function(){return S===void 0&&A(this),S};let M=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=i.getProgramParameter(m,Sxe)),M},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Axe++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=w,this.fragmentShader=_,this}var Hxe=0,f4=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),o=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(o)===!1&&(a.add(o),o.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new m4(e),t.set(e,n)),n}},m4=class{constructor(e){this.id=Hxe++,this.code=e,this.usedTimes=0}};function Wxe(r,e,t,n,i,o,a){let s=new Cy,l=new f4,c=new Set,u=[],h=i.logarithmicDepthBuffer,d=i.vertexTextures,p=i.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(S){return c.add(S),S===0?"uv":`uv${S}`}function g(S,M,T,L,O){let D=L.fog,z=O.geometry,N=S.isMeshStandardMaterial?L.environment:null,J=(S.isMeshStandardMaterial?t:e).get(S.envMap||N),X=J&&J.mapping===Zw?J.image.height:null,Q=f[S.type];S.precision!==null&&(p=i.getMaxPrecision(S.precision),p!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",p,"instead."));let ce=z.morphAttributes.position||z.morphAttributes.normal||z.morphAttributes.color,H=ce!==void 0?ce.length:0,de=0;z.morphAttributes.position!==void 0&&(de=1),z.morphAttributes.normal!==void 0&&(de=2),z.morphAttributes.color!==void 0&&(de=3);let Se,te,ue,ve;if(Q){let Bn=Ho[Q];Se=Bn.vertexShader,te=Bn.fragmentShader}else Se=S.vertexShader,te=S.fragmentShader,l.update(S),ue=l.getVertexShaderID(S),ve=l.getFragmentShaderID(S);let se=r.getRenderTarget(),we=r.state.buffers.depth.getReversed(),pe=O.isInstancedMesh===!0,Ee=O.isBatchedMesh===!0,Oe=!!S.map,Pe=!!S.matcap,Xe=!!J,$=!!S.aoMap,yt=!!S.lightMap,C=!!S.bumpMap,I=!!S.normalMap,B=!!S.displacementMap,K=!!S.emissiveMap,q=!!S.metalnessMap,F=!!S.roughnessMap,R=S.anisotropy>0,ee=S.clearcoat>0,fe=S.dispersion>0,ge=S.iridescence>0,ye=S.sheen>0,Re=S.transmission>0,Te=R&&!!S.anisotropyMap,nt=ee&&!!S.clearcoatMap,ln=ee&&!!S.clearcoatNormalMap,Ve=ee&&!!S.clearcoatRoughnessMap,dt=ge&&!!S.iridescenceMap,Lt=ge&&!!S.iridescenceThicknessMap,Rt=ye&&!!S.sheenColorMap,pt=ye&&!!S.sheenRoughnessMap,dn=!!S.specularMap,Zt=!!S.specularColorMap,Xn=!!S.specularIntensityMap,re=Re&&!!S.transmissionMap,Je=Re&&!!S.thicknessMap,_e=!!S.gradientMap,ke=!!S.alphaMap,it=S.alphaTest>0,rt=!!S.alphaHash,$t=!!S.extensions,Ar=$u;S.toneMapped&&(se===null||se.isXRRenderTarget===!0)&&(Ar=r.toneMapping);let $i={shaderID:Q,shaderType:S.type,shaderName:S.name,vertexShader:Se,fragmentShader:te,defines:S.defines,customVertexShaderID:ue,customFragmentShaderID:ve,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:p,batching:Ee,batchingColor:Ee&&O._colorsTexture!==null,instancing:pe,instancingColor:pe&&O.instanceColor!==null,instancingMorph:pe&&O.morphTexture!==null,supportsVertexTextures:d,outputColorSpace:se===null?r.outputColorSpace:se.isXRRenderTarget===!0?se.texture.colorSpace:Qp,alphaToCoverage:!!S.alphaToCoverage,map:Oe,matcap:Pe,envMap:Xe,envMapMode:Xe&&J.mapping,envMapCubeUVHeight:X,aoMap:$,lightMap:yt,bumpMap:C,normalMap:I,displacementMap:d&&B,emissiveMap:K,normalMapObjectSpace:I&&S.normalMapType===WW,normalMapTangentSpace:I&&S.normalMapType===HW,metalnessMap:q,roughnessMap:F,anisotropy:R,anisotropyMap:Te,clearcoat:ee,clearcoatMap:nt,clearcoatNormalMap:ln,clearcoatRoughnessMap:Ve,dispersion:fe,iridescence:ge,iridescenceMap:dt,iridescenceThicknessMap:Lt,sheen:ye,sheenColorMap:Rt,sheenRoughnessMap:pt,specularMap:dn,specularColorMap:Zt,specularIntensityMap:Xn,transmission:Re,transmissionMap:re,thicknessMap:Je,gradientMap:_e,opaque:S.transparent===!1&&S.blending===qp&&S.alphaToCoverage===!1,alphaMap:ke,alphaTest:it,alphaHash:rt,combine:S.combine,mapUv:Oe&&m(S.map.channel),aoMapUv:$&&m(S.aoMap.channel),lightMapUv:yt&&m(S.lightMap.channel),bumpMapUv:C&&m(S.bumpMap.channel),normalMapUv:I&&m(S.normalMap.channel),displacementMapUv:B&&m(S.displacementMap.channel),emissiveMapUv:K&&m(S.emissiveMap.channel),metalnessMapUv:q&&m(S.metalnessMap.channel),roughnessMapUv:F&&m(S.roughnessMap.channel),anisotropyMapUv:Te&&m(S.anisotropyMap.channel),clearcoatMapUv:nt&&m(S.clearcoatMap.channel),clearcoatNormalMapUv:ln&&m(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ve&&m(S.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&m(S.iridescenceMap.channel),iridescenceThicknessMapUv:Lt&&m(S.iridescenceThicknessMap.channel),sheenColorMapUv:Rt&&m(S.sheenColorMap.channel),sheenRoughnessMapUv:pt&&m(S.sheenRoughnessMap.channel),specularMapUv:dn&&m(S.specularMap.channel),specularColorMapUv:Zt&&m(S.specularColorMap.channel),specularIntensityMapUv:Xn&&m(S.specularIntensityMap.channel),transmissionMapUv:re&&m(S.transmissionMap.channel),thicknessMapUv:Je&&m(S.thicknessMap.channel),alphaMapUv:ke&&m(S.alphaMap.channel),vertexTangents:!!z.attributes.tangent&&(I||R),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!z.attributes.color&&z.attributes.color.itemSize===4,pointsUvs:O.isPoints===!0&&!!z.attributes.uv&&(Oe||ke),fog:!!D,useFog:S.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:h,reverseDepthBuffer:we,skinning:O.isSkinnedMesh===!0,morphTargets:z.morphAttributes.position!==void 0,morphNormals:z.morphAttributes.normal!==void 0,morphColors:z.morphAttributes.color!==void 0,morphTargetsCount:H,morphTextureStride:de,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:S.dithering,shadowMapEnabled:r.shadowMap.enabled&&T.length>0,shadowMapType:r.shadowMap.type,toneMapping:Ar,decodeVideoTexture:Oe&&S.map.isVideoTexture===!0&&wn.getTransfer(S.map.colorSpace)===zn,decodeVideoTextureEmissive:K&&S.emissiveMap.isVideoTexture===!0&&wn.getTransfer(S.emissiveMap.colorSpace)===zn,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===Si,flipSided:S.side===zi,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionClipCullDistance:$t&&S.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:($t&&S.extensions.multiDraw===!0||Ee)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()};return $i.vertexUv1s=c.has(1),$i.vertexUv2s=c.has(2),$i.vertexUv3s=c.has(3),c.clear(),$i}function y(S){let M=[];if(S.shaderID?M.push(S.shaderID):(M.push(S.customVertexShaderID),M.push(S.customFragmentShaderID)),S.defines!==void 0)for(let T in S.defines)M.push(T),M.push(S.defines[T]);return S.isRawShaderMaterial===!1&&(b(M,S),v(M,S),M.push(r.outputColorSpace)),M.push(S.customProgramCacheKey),M.join()}function b(S,M){S.push(M.precision),S.push(M.outputColorSpace),S.push(M.envMapMode),S.push(M.envMapCubeUVHeight),S.push(M.mapUv),S.push(M.alphaMapUv),S.push(M.lightMapUv),S.push(M.aoMapUv),S.push(M.bumpMapUv),S.push(M.normalMapUv),S.push(M.displacementMapUv),S.push(M.emissiveMapUv),S.push(M.metalnessMapUv),S.push(M.roughnessMapUv),S.push(M.anisotropyMapUv),S.push(M.clearcoatMapUv),S.push(M.clearcoatNormalMapUv),S.push(M.clearcoatRoughnessMapUv),S.push(M.iridescenceMapUv),S.push(M.iridescenceThicknessMapUv),S.push(M.sheenColorMapUv),S.push(M.sheenRoughnessMapUv),S.push(M.specularMapUv),S.push(M.specularColorMapUv),S.push(M.specularIntensityMapUv),S.push(M.transmissionMapUv),S.push(M.thicknessMapUv),S.push(M.combine),S.push(M.fogExp2),S.push(M.sizeAttenuation),S.push(M.morphTargetsCount),S.push(M.morphAttributeCount),S.push(M.numDirLights),S.push(M.numPointLights),S.push(M.numSpotLights),S.push(M.numSpotLightMaps),S.push(M.numHemiLights),S.push(M.numRectAreaLights),S.push(M.numDirLightShadows),S.push(M.numPointLightShadows),S.push(M.numSpotLightShadows),S.push(M.numSpotLightShadowsWithMaps),S.push(M.numLightProbes),S.push(M.shadowMapType),S.push(M.toneMapping),S.push(M.numClippingPlanes),S.push(M.numClipIntersection),S.push(M.depthPacking)}function v(S,M){s.disableAll(),M.supportsVertexTextures&&s.enable(0),M.instancing&&s.enable(1),M.instancingColor&&s.enable(2),M.instancingMorph&&s.enable(3),M.matcap&&s.enable(4),M.envMap&&s.enable(5),M.normalMapObjectSpace&&s.enable(6),M.normalMapTangentSpace&&s.enable(7),M.clearcoat&&s.enable(8),M.iridescence&&s.enable(9),M.alphaTest&&s.enable(10),M.vertexColors&&s.enable(11),M.vertexAlphas&&s.enable(12),M.vertexUv1s&&s.enable(13),M.vertexUv2s&&s.enable(14),M.vertexUv3s&&s.enable(15),M.vertexTangents&&s.enable(16),M.anisotropy&&s.enable(17),M.alphaHash&&s.enable(18),M.batching&&s.enable(19),M.dispersion&&s.enable(20),M.batchingColor&&s.enable(21),S.push(s.mask),s.disableAll(),M.fog&&s.enable(0),M.useFog&&s.enable(1),M.flatShading&&s.enable(2),M.logarithmicDepthBuffer&&s.enable(3),M.reverseDepthBuffer&&s.enable(4),M.skinning&&s.enable(5),M.morphTargets&&s.enable(6),M.morphNormals&&s.enable(7),M.morphColors&&s.enable(8),M.premultipliedAlpha&&s.enable(9),M.shadowMapEnabled&&s.enable(10),M.doubleSided&&s.enable(11),M.flipSided&&s.enable(12),M.useDepthPacking&&s.enable(13),M.dithering&&s.enable(14),M.transmission&&s.enable(15),M.sheen&&s.enable(16),M.opaque&&s.enable(17),M.pointsUvs&&s.enable(18),M.decodeVideoTexture&&s.enable(19),M.decodeVideoTextureEmissive&&s.enable(20),M.alphaToCoverage&&s.enable(21),S.push(s.mask)}function x(S){let M=f[S.type],T;if(M){let L=Ho[M];T=pf.clone(L.uniforms)}else T=S.uniforms;return T}function w(S,M){let T;for(let L=0,O=u.length;L<O;L++){let D=u[L];if(D.cacheKey===M){T=D,++T.usedTimes;break}}return T===void 0&&(T=new Gxe(r,M,S,o),u.push(T)),T}function _(S){if(--S.usedTimes===0){let M=u.indexOf(S);u[M]=u[u.length-1],u.pop(),S.destroy()}}function A(S){l.remove(S)}function E(){l.dispose()}return{getParameters:g,getProgramCacheKey:y,getUniforms:x,acquireProgram:w,releaseProgram:_,releaseShaderCache:A,programs:u,dispose:E}}function Xxe(){let r=new WeakMap;function e(a){return r.has(a)}function t(a){let s=r.get(a);return s===void 0&&(s={},r.set(a,s)),s}function n(a){r.delete(a)}function i(a,s,l){r.get(a)[s]=l}function o(){r=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:o}}function Yxe(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.material.id!==e.material.id?r.material.id-e.material.id:r.z!==e.z?r.z-e.z:r.id-e.id}function TX(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.z!==e.z?e.z-r.z:r.id-e.id}function kX(){let r=[],e=0,t=[],n=[],i=[];function o(){e=0,t.length=0,n.length=0,i.length=0}function a(h,d,p,f,m,g){let y=r[e];return y===void 0?(y={id:h.id,object:h,geometry:d,material:p,groupOrder:f,renderOrder:h.renderOrder,z:m,group:g},r[e]=y):(y.id=h.id,y.object=h,y.geometry=d,y.material=p,y.groupOrder=f,y.renderOrder=h.renderOrder,y.z=m,y.group=g),e++,y}function s(h,d,p,f,m,g){let y=a(h,d,p,f,m,g);p.transmission>0?n.push(y):p.transparent===!0?i.push(y):t.push(y)}function l(h,d,p,f,m,g){let y=a(h,d,p,f,m,g);p.transmission>0?n.unshift(y):p.transparent===!0?i.unshift(y):t.unshift(y)}function c(h,d){t.length>1&&t.sort(h||Yxe),n.length>1&&n.sort(d||TX),i.length>1&&i.sort(d||TX)}function u(){for(let h=e,d=r.length;h<d;h++){let p=r[h];if(p.id===null)break;p.id=null,p.object=null,p.geometry=null,p.material=null,p.group=null}}return{opaque:t,transmissive:n,transparent:i,init:o,push:s,unshift:l,finish:u,sort:c}}function $xe(){let r=new WeakMap;function e(n,i){let o=r.get(n),a;return o===void 0?(a=new kX,r.set(n,[a])):i>=o.length?(a=new kX,o.push(a)):a=o[i],a}function t(){r=new WeakMap}return{get:e,dispose:t}}function Kxe(){let r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new U,color:new $e};break;case"SpotLight":t={position:new U,direction:new U,color:new $e,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new U,color:new $e,distance:0,decay:0};break;case"HemisphereLight":t={direction:new U,skyColor:new $e,groundColor:new $e};break;case"RectAreaLight":t={color:new $e,position:new U,halfWidth:new U,halfHeight:new U};break}return r[e.id]=t,t}}}function qxe(){let r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Le};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Le};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Le,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}var Zxe=0;function Jxe(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function Qxe(r){let e=new Kxe,t=qxe(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new U);let i=new U,o=new vt,a=new vt;function s(c){let u=0,h=0,d=0;for(let S=0;S<9;S++)n.probe[S].set(0,0,0);let p=0,f=0,m=0,g=0,y=0,b=0,v=0,x=0,w=0,_=0,A=0;c.sort(Jxe);for(let S=0,M=c.length;S<M;S++){let T=c[S],L=T.color,O=T.intensity,D=T.distance,z=T.shadow&&T.shadow.map?T.shadow.map.texture:null;if(T.isAmbientLight)u+=L.r*O,h+=L.g*O,d+=L.b*O;else if(T.isLightProbe){for(let N=0;N<9;N++)n.probe[N].addScaledVector(T.sh.coefficients[N],O);A++}else if(T.isDirectionalLight){let N=e.get(T);if(N.color.copy(T.color).multiplyScalar(T.intensity),T.castShadow){let J=T.shadow,X=t.get(T);X.shadowIntensity=J.intensity,X.shadowBias=J.bias,X.shadowNormalBias=J.normalBias,X.shadowRadius=J.radius,X.shadowMapSize=J.mapSize,n.directionalShadow[p]=X,n.directionalShadowMap[p]=z,n.directionalShadowMatrix[p]=T.shadow.matrix,b++}n.directional[p]=N,p++}else if(T.isSpotLight){let N=e.get(T);N.position.setFromMatrixPosition(T.matrixWorld),N.color.copy(L).multiplyScalar(O),N.distance=D,N.coneCos=Math.cos(T.angle),N.penumbraCos=Math.cos(T.angle*(1-T.penumbra)),N.decay=T.decay,n.spot[m]=N;let J=T.shadow;if(T.map&&(n.spotLightMap[w]=T.map,w++,J.updateMatrices(T),T.castShadow&&_++),n.spotLightMatrix[m]=J.matrix,T.castShadow){let X=t.get(T);X.shadowIntensity=J.intensity,X.shadowBias=J.bias,X.shadowNormalBias=J.normalBias,X.shadowRadius=J.radius,X.shadowMapSize=J.mapSize,n.spotShadow[m]=X,n.spotShadowMap[m]=z,x++}m++}else if(T.isRectAreaLight){let N=e.get(T);N.color.copy(L).multiplyScalar(O),N.halfWidth.set(T.width*.5,0,0),N.halfHeight.set(0,T.height*.5,0),n.rectArea[g]=N,g++}else if(T.isPointLight){let N=e.get(T);if(N.color.copy(T.color).multiplyScalar(T.intensity),N.distance=T.distance,N.decay=T.decay,T.castShadow){let J=T.shadow,X=t.get(T);X.shadowIntensity=J.intensity,X.shadowBias=J.bias,X.shadowNormalBias=J.normalBias,X.shadowRadius=J.radius,X.shadowMapSize=J.mapSize,X.shadowCameraNear=J.camera.near,X.shadowCameraFar=J.camera.far,n.pointShadow[f]=X,n.pointShadowMap[f]=z,n.pointShadowMatrix[f]=T.shadow.matrix,v++}n.point[f]=N,f++}else if(T.isHemisphereLight){let N=e.get(T);N.skyColor.copy(T.color).multiplyScalar(O),N.groundColor.copy(T.groundColor).multiplyScalar(O),n.hemi[y]=N,y++}}g>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=We.LTC_FLOAT_1,n.rectAreaLTC2=We.LTC_FLOAT_2):(n.rectAreaLTC1=We.LTC_HALF_1,n.rectAreaLTC2=We.LTC_HALF_2)),n.ambient[0]=u,n.ambient[1]=h,n.ambient[2]=d;let E=n.hash;(E.directionalLength!==p||E.pointLength!==f||E.spotLength!==m||E.rectAreaLength!==g||E.hemiLength!==y||E.numDirectionalShadows!==b||E.numPointShadows!==v||E.numSpotShadows!==x||E.numSpotMaps!==w||E.numLightProbes!==A)&&(n.directional.length=p,n.spot.length=m,n.rectArea.length=g,n.point.length=f,n.hemi.length=y,n.directionalShadow.length=b,n.directionalShadowMap.length=b,n.pointShadow.length=v,n.pointShadowMap.length=v,n.spotShadow.length=x,n.spotShadowMap.length=x,n.directionalShadowMatrix.length=b,n.pointShadowMatrix.length=v,n.spotLightMatrix.length=x+w-_,n.spotLightMap.length=w,n.numSpotLightShadowsWithMaps=_,n.numLightProbes=A,E.directionalLength=p,E.pointLength=f,E.spotLength=m,E.rectAreaLength=g,E.hemiLength=y,E.numDirectionalShadows=b,E.numPointShadows=v,E.numSpotShadows=x,E.numSpotMaps=w,E.numLightProbes=A,n.version=Zxe++)}function l(c,u){let h=0,d=0,p=0,f=0,m=0,g=u.matrixWorldInverse;for(let y=0,b=c.length;y<b;y++){let v=c[y];if(v.isDirectionalLight){let x=n.directional[h];x.direction.setFromMatrixPosition(v.matrixWorld),i.setFromMatrixPosition(v.target.matrixWorld),x.direction.sub(i),x.direction.transformDirection(g),h++}else if(v.isSpotLight){let x=n.spot[p];x.position.setFromMatrixPosition(v.matrixWorld),x.position.applyMatrix4(g),x.direction.setFromMatrixPosition(v.matrixWorld),i.setFromMatrixPosition(v.target.matrixWorld),x.direction.sub(i),x.direction.transformDirection(g),p++}else if(v.isRectAreaLight){let x=n.rectArea[f];x.position.setFromMatrixPosition(v.matrixWorld),x.position.applyMatrix4(g),a.identity(),o.copy(v.matrixWorld),o.premultiply(g),a.extractRotation(o),x.halfWidth.set(v.width*.5,0,0),x.halfHeight.set(0,v.height*.5,0),x.halfWidth.applyMatrix4(a),x.halfHeight.applyMatrix4(a),f++}else if(v.isPointLight){let x=n.point[d];x.position.setFromMatrixPosition(v.matrixWorld),x.position.applyMatrix4(g),d++}else if(v.isHemisphereLight){let x=n.hemi[m];x.direction.setFromMatrixPosition(v.matrixWorld),x.direction.transformDirection(g),m++}}}return{setup:s,setupView:l,state:n}}function IX(r){let e=new Qxe(r),t=[],n=[];function i(u){c.camera=u,t.length=0,n.length=0}function o(u){t.push(u)}function a(u){n.push(u)}function s(){e.setup(t)}function l(u){e.setupView(t,u)}let c={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:s,setupLightsView:l,pushLight:o,pushShadow:a}}function ewe(r){let e=new WeakMap;function t(i,o=0){let a=e.get(i),s;return a===void 0?(s=new IX(r),e.set(i,[s])):o>=a.length?(s=new IX(r),a.push(s)):s=a[o],s}function n(){e=new WeakMap}return{get:t,dispose:n}}var twe=`void main() {
  3701. gl_Position = vec4( position, 1.0 );
  3702. }`,nwe=`uniform sampler2D shadow_pass;
  3703. uniform vec2 resolution;
  3704. uniform float radius;
  3705. #include <packing>
  3706. void main() {
  3707. const float samples = float( VSM_SAMPLES );
  3708. float mean = 0.0;
  3709. float squared_mean = 0.0;
  3710. float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
  3711. float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
  3712. for ( float i = 0.0; i < samples; i ++ ) {
  3713. float uvOffset = uvStart + i * uvStride;
  3714. #ifdef HORIZONTAL_PASS
  3715. vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
  3716. mean += distribution.x;
  3717. squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
  3718. #else
  3719. float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
  3720. mean += depth;
  3721. squared_mean += depth * depth;
  3722. #endif
  3723. }
  3724. mean = mean / samples;
  3725. squared_mean = squared_mean / samples;
  3726. float std_dev = sqrt( squared_mean - mean * mean );
  3727. gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
  3728. }`;function rwe(r,e,t){let n=new Rw,i=new Le,o=new Le,a=new yn,s=new iP({depthPacking:GW}),l=new oP,c={},u=t.maxTextureSize,h={[ua]:zi,[zi]:ua,[Si]:Si},d=new Kn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Le},radius:{value:4}},vertexShader:twe,fragmentShader:nwe}),p=d.clone();p.defines.HORIZONTAL_PASS=1;let f=new ot;f.setAttribute("position",new Et(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new jt(f,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=DR;let y=this.type;this.render=function(_,A,E){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||_.length===0)return;let S=r.getRenderTarget(),M=r.getActiveCubeFace(),T=r.getActiveMipmapLevel(),L=r.state;L.setBlending(Yu),L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);let O=y!==mc&&this.type===mc,D=y===mc&&this.type!==mc;for(let z=0,N=_.length;z<N;z++){let J=_[z],X=J.shadow;if(X===void 0){console.warn("THREE.WebGLShadowMap:",J,"has no shadow.");continue}if(X.autoUpdate===!1&&X.needsUpdate===!1)continue;i.copy(X.mapSize);let Q=X.getFrameExtents();if(i.multiply(Q),o.copy(X.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/Q.x),i.x=o.x*Q.x,X.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/Q.y),i.y=o.y*Q.y,X.mapSize.y=o.y)),X.map===null||O===!0||D===!0){let H=this.type!==mc?{minFilter:Ur,magFilter:Ur}:{};X.map!==null&&X.map.dispose(),X.map=new Go(i.x,i.y,H),X.map.texture.name=J.name+".shadowMap",X.camera.updateProjectionMatrix()}r.setRenderTarget(X.map),r.clear();let ce=X.getViewportCount();for(let H=0;H<ce;H++){let de=X.getViewport(H);a.set(o.x*de.x,o.y*de.y,o.x*de.z,o.y*de.w),L.viewport(a),X.updateMatrices(J,H),n=X.getFrustum(),x(A,E,X.camera,J,this.type)}X.isPointLightShadow!==!0&&this.type===mc&&b(X,E),X.needsUpdate=!1}y=this.type,g.needsUpdate=!1,r.setRenderTarget(S,M,T)};function b(_,A){let E=e.update(m);d.defines.VSM_SAMPLES!==_.blurSamples&&(d.defines.VSM_SAMPLES=_.blurSamples,p.defines.VSM_SAMPLES=_.blurSamples,d.needsUpdate=!0,p.needsUpdate=!0),_.mapPass===null&&(_.mapPass=new Go(i.x,i.y)),d.uniforms.shadow_pass.value=_.map.texture,d.uniforms.resolution.value=_.mapSize,d.uniforms.radius.value=_.radius,r.setRenderTarget(_.mapPass),r.clear(),r.renderBufferDirect(A,null,E,d,m,null),p.uniforms.shadow_pass.value=_.mapPass.texture,p.uniforms.resolution.value=_.mapSize,p.uniforms.radius.value=_.radius,r.setRenderTarget(_.map),r.clear(),r.renderBufferDirect(A,null,E,p,m,null)}function v(_,A,E,S){let M=null,T=E.isPointLight===!0?_.customDistanceMaterial:_.customDepthMaterial;if(T!==void 0)M=T;else if(M=E.isPointLight===!0?l:s,r.localClippingEnabled&&A.clipShadows===!0&&Array.isArray(A.clippingPlanes)&&A.clippingPlanes.length!==0||A.displacementMap&&A.displacementScale!==0||A.alphaMap&&A.alphaTest>0||A.map&&A.alphaTest>0){let L=M.uuid,O=A.uuid,D=c[L];D===void 0&&(D={},c[L]=D);let z=D[O];z===void 0&&(z=M.clone(),D[O]=z,A.addEventListener("dispose",w)),M=z}if(M.visible=A.visible,M.wireframe=A.wireframe,S===mc?M.side=A.shadowSide!==null?A.shadowSide:A.side:M.side=A.shadowSide!==null?A.shadowSide:h[A.side],M.alphaMap=A.alphaMap,M.alphaTest=A.alphaTest,M.map=A.map,M.clipShadows=A.clipShadows,M.clippingPlanes=A.clippingPlanes,M.clipIntersection=A.clipIntersection,M.displacementMap=A.displacementMap,M.displacementScale=A.displacementScale,M.displacementBias=A.displacementBias,M.wireframeLinewidth=A.wireframeLinewidth,M.linewidth=A.linewidth,E.isPointLight===!0&&M.isMeshDistanceMaterial===!0){let L=r.properties.get(M);L.light=E}return M}function x(_,A,E,S,M){if(_.visible===!1)return;if(_.layers.test(A.layers)&&(_.isMesh||_.isLine||_.isPoints)&&(_.castShadow||_.receiveShadow&&M===mc)&&(!_.frustumCulled||n.intersectsObject(_))){_.modelViewMatrix.multiplyMatrices(E.matrixWorldInverse,_.matrixWorld);let O=e.update(_),D=_.material;if(Array.isArray(D)){let z=O.groups;for(let N=0,J=z.length;N<J;N++){let X=z[N],Q=D[X.materialIndex];if(Q&&Q.visible){let ce=v(_,Q,S,M);_.onBeforeShadow(r,_,A,E,O,ce,X),r.renderBufferDirect(E,null,O,ce,_,X),_.onAfterShadow(r,_,A,E,O,ce,X)}}}else if(D.visible){let z=v(_,D,S,M);_.onBeforeShadow(r,_,A,E,O,z,null),r.renderBufferDirect(E,null,O,z,_,null),_.onAfterShadow(r,_,A,E,O,z,null)}}let L=_.children;for(let O=0,D=L.length;O<D;O++)x(L[O],A,E,S,M)}function w(_){_.target.removeEventListener("dispose",w);for(let E in c){let S=c[E],M=_.target.uuid;M in S&&(S[M].dispose(),delete S[M])}}}var iwe={[gP]:yP,[bP]:wP,[vP]:_P,[Zp]:xP,[yP]:gP,[wP]:bP,[_P]:vP,[xP]:Zp};function owe(r,e){function t(){let re=!1,Je=new yn,_e=null,ke=new yn(0,0,0,0);return{setMask:function(it){_e!==it&&!re&&(r.colorMask(it,it,it,it),_e=it)},setLocked:function(it){re=it},setClear:function(it,rt,$t,Ar,$i){$i===!0&&(it*=Ar,rt*=Ar,$t*=Ar),Je.set(it,rt,$t,Ar),ke.equals(Je)===!1&&(r.clearColor(it,rt,$t,Ar),ke.copy(Je))},reset:function(){re=!1,_e=null,ke.set(-1,0,0,0)}}}function n(){let re=!1,Je=!1,_e=null,ke=null,it=null;return{setReversed:function(rt){if(Je!==rt){let $t=e.get("EXT_clip_control");Je?$t.clipControlEXT($t.LOWER_LEFT_EXT,$t.ZERO_TO_ONE_EXT):$t.clipControlEXT($t.LOWER_LEFT_EXT,$t.NEGATIVE_ONE_TO_ONE_EXT);let Ar=it;it=null,this.setClear(Ar)}Je=rt},getReversed:function(){return Je},setTest:function(rt){rt?se(r.DEPTH_TEST):we(r.DEPTH_TEST)},setMask:function(rt){_e!==rt&&!re&&(r.depthMask(rt),_e=rt)},setFunc:function(rt){if(Je&&(rt=iwe[rt]),ke!==rt){switch(rt){case gP:r.depthFunc(r.NEVER);break;case yP:r.depthFunc(r.ALWAYS);break;case bP:r.depthFunc(r.LESS);break;case Zp:r.depthFunc(r.LEQUAL);break;case vP:r.depthFunc(r.EQUAL);break;case xP:r.depthFunc(r.GEQUAL);break;case wP:r.depthFunc(r.GREATER);break;case _P:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}ke=rt}},setLocked:function(rt){re=rt},setClear:function(rt){it!==rt&&(Je&&(rt=1-rt),r.clearDepth(rt),it=rt)},reset:function(){re=!1,_e=null,ke=null,it=null,Je=!1}}}function i(){let re=!1,Je=null,_e=null,ke=null,it=null,rt=null,$t=null,Ar=null,$i=null;return{setTest:function(Bn){re||(Bn?se(r.STENCIL_TEST):we(r.STENCIL_TEST))},setMask:function(Bn){Je!==Bn&&!re&&(r.stencilMask(Bn),Je=Bn)},setFunc:function(Bn,Xs,Wc){(_e!==Bn||ke!==Xs||it!==Wc)&&(r.stencilFunc(Bn,Xs,Wc),_e=Bn,ke=Xs,it=Wc)},setOp:function(Bn,Xs,Wc){(rt!==Bn||$t!==Xs||Ar!==Wc)&&(r.stencilOp(Bn,Xs,Wc),rt=Bn,$t=Xs,Ar=Wc)},setLocked:function(Bn){re=Bn},setClear:function(Bn){$i!==Bn&&(r.clearStencil(Bn),$i=Bn)},reset:function(){re=!1,Je=null,_e=null,ke=null,it=null,rt=null,$t=null,Ar=null,$i=null}}}let o=new t,a=new n,s=new i,l=new WeakMap,c=new WeakMap,u={},h={},d=new WeakMap,p=[],f=null,m=!1,g=null,y=null,b=null,v=null,x=null,w=null,_=null,A=new $e(0,0,0),E=0,S=!1,M=null,T=null,L=null,O=null,D=null,z=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS),N=!1,J=0,X=r.getParameter(r.VERSION);X.indexOf("WebGL")!==-1?(J=parseFloat(/^WebGL (\d)/.exec(X)[1]),N=J>=1):X.indexOf("OpenGL ES")!==-1&&(J=parseFloat(/^OpenGL ES (\d)/.exec(X)[1]),N=J>=2);let Q=null,ce={},H=r.getParameter(r.SCISSOR_BOX),de=r.getParameter(r.VIEWPORT),Se=new yn().fromArray(H),te=new yn().fromArray(de);function ue(re,Je,_e,ke){let it=new Uint8Array(4),rt=r.createTexture();r.bindTexture(re,rt),r.texParameteri(re,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(re,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let $t=0;$t<_e;$t++)re===r.TEXTURE_3D||re===r.TEXTURE_2D_ARRAY?r.texImage3D(Je,0,r.RGBA,1,1,ke,0,r.RGBA,r.UNSIGNED_BYTE,it):r.texImage2D(Je+$t,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,it);return rt}let ve={};ve[r.TEXTURE_2D]=ue(r.TEXTURE_2D,r.TEXTURE_2D,1),ve[r.TEXTURE_CUBE_MAP]=ue(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),ve[r.TEXTURE_2D_ARRAY]=ue(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),ve[r.TEXTURE_3D]=ue(r.TEXTURE_3D,r.TEXTURE_3D,1,1),o.setClear(0,0,0,1),a.setClear(1),s.setClear(0),se(r.DEPTH_TEST),a.setFunc(Zp),C(!1),I(OR),se(r.CULL_FACE),$(Yu);function se(re){u[re]!==!0&&(r.enable(re),u[re]=!0)}function we(re){u[re]!==!1&&(r.disable(re),u[re]=!1)}function pe(re,Je){return h[re]!==Je?(r.bindFramebuffer(re,Je),h[re]=Je,re===r.DRAW_FRAMEBUFFER&&(h[r.FRAMEBUFFER]=Je),re===r.FRAMEBUFFER&&(h[r.DRAW_FRAMEBUFFER]=Je),!0):!1}function Ee(re,Je){let _e=p,ke=!1;if(re){_e=d.get(Je),_e===void 0&&(_e=[],d.set(Je,_e));let it=re.textures;if(_e.length!==it.length||_e[0]!==r.COLOR_ATTACHMENT0){for(let rt=0,$t=it.length;rt<$t;rt++)_e[rt]=r.COLOR_ATTACHMENT0+rt;_e.length=it.length,ke=!0}}else _e[0]!==r.BACK&&(_e[0]=r.BACK,ke=!0);ke&&r.drawBuffers(_e)}function Oe(re){return f!==re?(r.useProgram(re),f=re,!0):!1}let Pe={[Xh]:r.FUNC_ADD,[mW]:r.FUNC_SUBTRACT,[gW]:r.FUNC_REVERSE_SUBTRACT};Pe[yW]=r.MIN,Pe[bW]=r.MAX;let Xe={[vW]:r.ZERO,[xW]:r.ONE,[wW]:r.SRC_COLOR,[zM]:r.SRC_ALPHA,[EW]:r.SRC_ALPHA_SATURATE,[MW]:r.DST_COLOR,[SW]:r.DST_ALPHA,[_W]:r.ONE_MINUS_SRC_COLOR,[UM]:r.ONE_MINUS_SRC_ALPHA,[PW]:r.ONE_MINUS_DST_COLOR,[AW]:r.ONE_MINUS_DST_ALPHA,[CW]:r.CONSTANT_COLOR,[TW]:r.ONE_MINUS_CONSTANT_COLOR,[kW]:r.CONSTANT_ALPHA,[IW]:r.ONE_MINUS_CONSTANT_ALPHA};function $(re,Je,_e,ke,it,rt,$t,Ar,$i,Bn){if(re===Yu){m===!0&&(we(r.BLEND),m=!1);return}if(m===!1&&(se(r.BLEND),m=!0),re!==fW){if(re!==g||Bn!==S){if((y!==Xh||x!==Xh)&&(r.blendEquation(r.FUNC_ADD),y=Xh,x=Xh),Bn)switch(re){case qp:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case RR:r.blendFunc(r.ONE,r.ONE);break;case BR:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case FR:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",re);break}else switch(re){case qp:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case RR:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case BR:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case FR:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",re);break}b=null,v=null,w=null,_=null,A.set(0,0,0),E=0,g=re,S=Bn}return}it=it||Je,rt=rt||_e,$t=$t||ke,(Je!==y||it!==x)&&(r.blendEquationSeparate(Pe[Je],Pe[it]),y=Je,x=it),(_e!==b||ke!==v||rt!==w||$t!==_)&&(r.blendFuncSeparate(Xe[_e],Xe[ke],Xe[rt],Xe[$t]),b=_e,v=ke,w=rt,_=$t),(Ar.equals(A)===!1||$i!==E)&&(r.blendColor(Ar.r,Ar.g,Ar.b,$i),A.copy(Ar),E=$i),g=re,S=!1}function yt(re,Je){re.side===Si?we(r.CULL_FACE):se(r.CULL_FACE);let _e=re.side===zi;Je&&(_e=!_e),C(_e),re.blending===qp&&re.transparent===!1?$(Yu):$(re.blending,re.blendEquation,re.blendSrc,re.blendDst,re.blendEquationAlpha,re.blendSrcAlpha,re.blendDstAlpha,re.blendColor,re.blendAlpha,re.premultipliedAlpha),a.setFunc(re.depthFunc),a.setTest(re.depthTest),a.setMask(re.depthWrite),o.setMask(re.colorWrite);let ke=re.stencilWrite;s.setTest(ke),ke&&(s.setMask(re.stencilWriteMask),s.setFunc(re.stencilFunc,re.stencilRef,re.stencilFuncMask),s.setOp(re.stencilFail,re.stencilZFail,re.stencilZPass)),K(re.polygonOffset,re.polygonOffsetFactor,re.polygonOffsetUnits),re.alphaToCoverage===!0?se(r.SAMPLE_ALPHA_TO_COVERAGE):we(r.SAMPLE_ALPHA_TO_COVERAGE)}function C(re){M!==re&&(re?r.frontFace(r.CW):r.frontFace(r.CCW),M=re)}function I(re){re!==hW?(se(r.CULL_FACE),re!==T&&(re===OR?r.cullFace(r.BACK):re===dW?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):we(r.CULL_FACE),T=re}function B(re){re!==L&&(N&&r.lineWidth(re),L=re)}function K(re,Je,_e){re?(se(r.POLYGON_OFFSET_FILL),(O!==Je||D!==_e)&&(r.polygonOffset(Je,_e),O=Je,D=_e)):we(r.POLYGON_OFFSET_FILL)}function q(re){re?se(r.SCISSOR_TEST):we(r.SCISSOR_TEST)}function F(re){re===void 0&&(re=r.TEXTURE0+z-1),Q!==re&&(r.activeTexture(re),Q=re)}function R(re,Je,_e){_e===void 0&&(Q===null?_e=r.TEXTURE0+z-1:_e=Q);let ke=ce[_e];ke===void 0&&(ke={type:void 0,texture:void 0},ce[_e]=ke),(ke.type!==re||ke.texture!==Je)&&(Q!==_e&&(r.activeTexture(_e),Q=_e),r.bindTexture(re,Je||ve[re]),ke.type=re,ke.texture=Je)}function ee(){let re=ce[Q];re!==void 0&&re.type!==void 0&&(r.bindTexture(re.type,null),re.type=void 0,re.texture=void 0)}function fe(){try{r.compressedTexImage2D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function ge(){try{r.compressedTexImage3D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function ye(){try{r.texSubImage2D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function Re(){try{r.texSubImage3D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function Te(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function nt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function ln(){try{r.texStorage2D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function Ve(){try{r.texStorage3D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function dt(){try{r.texImage2D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function Lt(){try{r.texImage3D.apply(r,arguments)}catch(re){console.error("THREE.WebGLState:",re)}}function Rt(re){Se.equals(re)===!1&&(r.scissor(re.x,re.y,re.z,re.w),Se.copy(re))}function pt(re){te.equals(re)===!1&&(r.viewport(re.x,re.y,re.z,re.w),te.copy(re))}function dn(re,Je){let _e=c.get(Je);_e===void 0&&(_e=new WeakMap,c.set(Je,_e));let ke=_e.get(re);ke===void 0&&(ke=r.getUniformBlockIndex(Je,re.name),_e.set(re,ke))}function Zt(re,Je){let ke=c.get(Je).get(re);l.get(Je)!==ke&&(r.uniformBlockBinding(Je,ke,re.__bindingPointIndex),l.set(Je,ke))}function Xn(){r.disable(r.BLEND),r.disable(r.CULL_FACE),r.disable(r.DEPTH_TEST),r.disable(r.POLYGON_OFFSET_FILL),r.disable(r.SCISSOR_TEST),r.disable(r.STENCIL_TEST),r.disable(r.SAMPLE_ALPHA_TO_COVERAGE),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ZERO),r.blendFuncSeparate(r.ONE,r.ZERO,r.ONE,r.ZERO),r.blendColor(0,0,0,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(r.LESS),a.setReversed(!1),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(r.ALWAYS,0,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP),r.clearStencil(0),r.cullFace(r.BACK),r.frontFace(r.CCW),r.polygonOffset(0,0),r.activeTexture(r.TEXTURE0),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),r.bindFramebuffer(r.READ_FRAMEBUFFER,null),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),u={},Q=null,ce={},h={},d=new WeakMap,p=[],f=null,m=!1,g=null,y=null,b=null,v=null,x=null,w=null,_=null,A=new $e(0,0,0),E=0,S=!1,M=null,T=null,L=null,O=null,D=null,Se.set(0,0,r.canvas.width,r.canvas.height),te.set(0,0,r.canvas.width,r.canvas.height),o.reset(),a.reset(),s.reset()}return{buffers:{color:o,depth:a,stencil:s},enable:se,disable:we,bindFramebuffer:pe,drawBuffers:Ee,useProgram:Oe,setBlending:$,setMaterial:yt,setFlipSided:C,setCullFace:I,setLineWidth:B,setPolygonOffset:K,setScissorTest:q,activeTexture:F,bindTexture:R,unbindTexture:ee,compressedTexImage2D:fe,compressedTexImage3D:ge,texImage2D:dt,texImage3D:Lt,updateUBOMapping:dn,uniformBlockBinding:Zt,texStorage2D:ln,texStorage3D:Ve,texSubImage2D:ye,texSubImage3D:Re,compressedTexSubImage2D:Te,compressedTexSubImage3D:nt,scissor:Rt,viewport:pt,reset:Xn}}function awe(r,e,t,n,i,o,a){let s=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Le,u=new WeakMap,h,d=new WeakMap,p=!1;try{p=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function f(F,R){return p?new OffscreenCanvas(F,R):Ey("canvas")}function m(F,R,ee){let fe=1,ge=q(F);if((ge.width>ee||ge.height>ee)&&(fe=ee/Math.max(ge.width,ge.height)),fe<1)if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap||typeof VideoFrame<"u"&&F instanceof VideoFrame){let ye=Math.floor(fe*ge.width),Re=Math.floor(fe*ge.height);h===void 0&&(h=f(ye,Re));let Te=R?f(ye,Re):h;return Te.width=ye,Te.height=Re,Te.getContext("2d").drawImage(F,0,0,ye,Re),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ge.width+"x"+ge.height+") to ("+ye+"x"+Re+")."),Te}else return"data"in F&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ge.width+"x"+ge.height+")."),F;return F}function g(F){return F.generateMipmaps}function y(F){r.generateMipmap(F)}function b(F){return F.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:F.isWebGL3DRenderTarget?r.TEXTURE_3D:F.isWebGLArrayRenderTarget||F.isCompressedArrayTexture?r.TEXTURE_2D_ARRAY:r.TEXTURE_2D}function v(F,R,ee,fe,ge=!1){if(F!==null){if(r[F]!==void 0)return r[F];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+F+"'")}let ye=R;if(R===r.RED&&(ee===r.FLOAT&&(ye=r.R32F),ee===r.HALF_FLOAT&&(ye=r.R16F),ee===r.UNSIGNED_BYTE&&(ye=r.R8)),R===r.RED_INTEGER&&(ee===r.UNSIGNED_BYTE&&(ye=r.R8UI),ee===r.UNSIGNED_SHORT&&(ye=r.R16UI),ee===r.UNSIGNED_INT&&(ye=r.R32UI),ee===r.BYTE&&(ye=r.R8I),ee===r.SHORT&&(ye=r.R16I),ee===r.INT&&(ye=r.R32I)),R===r.RG&&(ee===r.FLOAT&&(ye=r.RG32F),ee===r.HALF_FLOAT&&(ye=r.RG16F),ee===r.UNSIGNED_BYTE&&(ye=r.RG8)),R===r.RG_INTEGER&&(ee===r.UNSIGNED_BYTE&&(ye=r.RG8UI),ee===r.UNSIGNED_SHORT&&(ye=r.RG16UI),ee===r.UNSIGNED_INT&&(ye=r.RG32UI),ee===r.BYTE&&(ye=r.RG8I),ee===r.SHORT&&(ye=r.RG16I),ee===r.INT&&(ye=r.RG32I)),R===r.RGB_INTEGER&&(ee===r.UNSIGNED_BYTE&&(ye=r.RGB8UI),ee===r.UNSIGNED_SHORT&&(ye=r.RGB16UI),ee===r.UNSIGNED_INT&&(ye=r.RGB32UI),ee===r.BYTE&&(ye=r.RGB8I),ee===r.SHORT&&(ye=r.RGB16I),ee===r.INT&&(ye=r.RGB32I)),R===r.RGBA_INTEGER&&(ee===r.UNSIGNED_BYTE&&(ye=r.RGBA8UI),ee===r.UNSIGNED_SHORT&&(ye=r.RGBA16UI),ee===r.UNSIGNED_INT&&(ye=r.RGBA32UI),ee===r.BYTE&&(ye=r.RGBA8I),ee===r.SHORT&&(ye=r.RGBA16I),ee===r.INT&&(ye=r.RGBA32I)),R===r.RGB&&ee===r.UNSIGNED_INT_5_9_9_9_REV&&(ye=r.RGB9_E5),R===r.RGBA){let Re=ge?Ew:wn.getTransfer(fe);ee===r.FLOAT&&(ye=r.RGBA32F),ee===r.HALF_FLOAT&&(ye=r.RGBA16F),ee===r.UNSIGNED_BYTE&&(ye=Re===zn?r.SRGB8_ALPHA8:r.RGBA8),ee===r.UNSIGNED_SHORT_4_4_4_4&&(ye=r.RGBA4),ee===r.UNSIGNED_SHORT_5_5_5_1&&(ye=r.RGB5_A1)}return(ye===r.R16F||ye===r.R32F||ye===r.RG16F||ye===r.RG32F||ye===r.RGBA16F||ye===r.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function x(F,R){let ee;return F?R===null||R===nd||R===cf?ee=r.DEPTH24_STENCIL8:R===Wa?ee=r.DEPTH32F_STENCIL8:R===By&&(ee=r.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):R===null||R===nd||R===cf?ee=r.DEPTH_COMPONENT24:R===Wa?ee=r.DEPTH_COMPONENT32F:R===By&&(ee=r.DEPTH_COMPONENT16),ee}function w(F,R){return g(F)===!0||F.isFramebufferTexture&&F.minFilter!==Ur&&F.minFilter!==xi?Math.log2(Math.max(R.width,R.height))+1:F.mipmaps!==void 0&&F.mipmaps.length>0?F.mipmaps.length:F.isCompressedTexture&&Array.isArray(F.image)?R.mipmaps.length:1}function _(F){let R=F.target;R.removeEventListener("dispose",_),E(R),R.isVideoTexture&&u.delete(R)}function A(F){let R=F.target;R.removeEventListener("dispose",A),M(R)}function E(F){let R=n.get(F);if(R.__webglInit===void 0)return;let ee=F.source,fe=d.get(ee);if(fe){let ge=fe[R.__cacheKey];ge.usedTimes--,ge.usedTimes===0&&S(F),Object.keys(fe).length===0&&d.delete(ee)}n.remove(F)}function S(F){let R=n.get(F);r.deleteTexture(R.__webglTexture);let ee=F.source,fe=d.get(ee);delete fe[R.__cacheKey],a.memory.textures--}function M(F){let R=n.get(F);if(F.depthTexture&&(F.depthTexture.dispose(),n.remove(F.depthTexture)),F.isWebGLCubeRenderTarget)for(let fe=0;fe<6;fe++){if(Array.isArray(R.__webglFramebuffer[fe]))for(let ge=0;ge<R.__webglFramebuffer[fe].length;ge++)r.deleteFramebuffer(R.__webglFramebuffer[fe][ge]);else r.deleteFramebuffer(R.__webglFramebuffer[fe]);R.__webglDepthbuffer&&r.deleteRenderbuffer(R.__webglDepthbuffer[fe])}else{if(Array.isArray(R.__webglFramebuffer))for(let fe=0;fe<R.__webglFramebuffer.length;fe++)r.deleteFramebuffer(R.__webglFramebuffer[fe]);else r.deleteFramebuffer(R.__webglFramebuffer);if(R.__webglDepthbuffer&&r.deleteRenderbuffer(R.__webglDepthbuffer),R.__webglMultisampledFramebuffer&&r.deleteFramebuffer(R.__webglMultisampledFramebuffer),R.__webglColorRenderbuffer)for(let fe=0;fe<R.__webglColorRenderbuffer.length;fe++)R.__webglColorRenderbuffer[fe]&&r.deleteRenderbuffer(R.__webglColorRenderbuffer[fe]);R.__webglDepthRenderbuffer&&r.deleteRenderbuffer(R.__webglDepthRenderbuffer)}let ee=F.textures;for(let fe=0,ge=ee.length;fe<ge;fe++){let ye=n.get(ee[fe]);ye.__webglTexture&&(r.deleteTexture(ye.__webglTexture),a.memory.textures--),n.remove(ee[fe])}n.remove(F)}let T=0;function L(){T=0}function O(){let F=T;return F>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+F+" texture units while this GPU supports only "+i.maxTextures),T+=1,F}function D(F){let R=[];return R.push(F.wrapS),R.push(F.wrapT),R.push(F.wrapR||0),R.push(F.magFilter),R.push(F.minFilter),R.push(F.anisotropy),R.push(F.internalFormat),R.push(F.format),R.push(F.type),R.push(F.generateMipmaps),R.push(F.premultiplyAlpha),R.push(F.flipY),R.push(F.unpackAlignment),R.push(F.colorSpace),R.join()}function z(F,R){let ee=n.get(F);if(F.isVideoTexture&&B(F),F.isRenderTargetTexture===!1&&F.version>0&&ee.__version!==F.version){let fe=F.image;if(fe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(fe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{te(ee,F,R);return}}t.bindTexture(r.TEXTURE_2D,ee.__webglTexture,r.TEXTURE0+R)}function N(F,R){let ee=n.get(F);if(F.version>0&&ee.__version!==F.version){te(ee,F,R);return}t.bindTexture(r.TEXTURE_2D_ARRAY,ee.__webglTexture,r.TEXTURE0+R)}function J(F,R){let ee=n.get(F);if(F.version>0&&ee.__version!==F.version){te(ee,F,R);return}t.bindTexture(r.TEXTURE_3D,ee.__webglTexture,r.TEXTURE0+R)}function X(F,R){let ee=n.get(F);if(F.version>0&&ee.__version!==F.version){ue(ee,F,R);return}t.bindTexture(r.TEXTURE_CUBE_MAP,ee.__webglTexture,r.TEXTURE0+R)}let Q={[jM]:r.REPEAT,[bl]:r.CLAMP_TO_EDGE,[VM]:r.MIRRORED_REPEAT},ce={[Ur]:r.NEAREST,[jW]:r.NEAREST_MIPMAP_NEAREST,[Jw]:r.NEAREST_MIPMAP_LINEAR,[xi]:r.LINEAR,[MP]:r.LINEAR_MIPMAP_NEAREST,[td]:r.LINEAR_MIPMAP_LINEAR},H={[XW]:r.NEVER,[JW]:r.ALWAYS,[YW]:r.LESS,[KR]:r.LEQUAL,[$W]:r.EQUAL,[ZW]:r.GEQUAL,[KW]:r.GREATER,[qW]:r.NOTEQUAL};function de(F,R){if(R.type===Wa&&e.has("OES_texture_float_linear")===!1&&(R.magFilter===xi||R.magFilter===MP||R.magFilter===Jw||R.magFilter===td||R.minFilter===xi||R.minFilter===MP||R.minFilter===Jw||R.minFilter===td)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(F,r.TEXTURE_WRAP_S,Q[R.wrapS]),r.texParameteri(F,r.TEXTURE_WRAP_T,Q[R.wrapT]),(F===r.TEXTURE_3D||F===r.TEXTURE_2D_ARRAY)&&r.texParameteri(F,r.TEXTURE_WRAP_R,Q[R.wrapR]),r.texParameteri(F,r.TEXTURE_MAG_FILTER,ce[R.magFilter]),r.texParameteri(F,r.TEXTURE_MIN_FILTER,ce[R.minFilter]),R.compareFunction&&(r.texParameteri(F,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(F,r.TEXTURE_COMPARE_FUNC,H[R.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(R.magFilter===Ur||R.minFilter!==Jw&&R.minFilter!==td||R.type===Wa&&e.has("OES_texture_float_linear")===!1)return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){let ee=e.get("EXT_texture_filter_anisotropic");r.texParameterf(F,ee.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,i.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function Se(F,R){let ee=!1;F.__webglInit===void 0&&(F.__webglInit=!0,R.addEventListener("dispose",_));let fe=R.source,ge=d.get(fe);ge===void 0&&(ge={},d.set(fe,ge));let ye=D(R);if(ye!==F.__cacheKey){ge[ye]===void 0&&(ge[ye]={texture:r.createTexture(),usedTimes:0},a.memory.textures++,ee=!0),ge[ye].usedTimes++;let Re=ge[F.__cacheKey];Re!==void 0&&(ge[F.__cacheKey].usedTimes--,Re.usedTimes===0&&S(R)),F.__cacheKey=ye,F.__webglTexture=ge[ye].texture}return ee}function te(F,R,ee){let fe=r.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(fe=r.TEXTURE_2D_ARRAY),R.isData3DTexture&&(fe=r.TEXTURE_3D);let ge=Se(F,R),ye=R.source;t.bindTexture(fe,F.__webglTexture,r.TEXTURE0+ee);let Re=n.get(ye);if(ye.version!==Re.__version||ge===!0){t.activeTexture(r.TEXTURE0+ee);let Te=wn.getPrimaries(wn.workingColorSpace),nt=R.colorSpace===Es?null:wn.getPrimaries(R.colorSpace),ln=R.colorSpace===Es||Te===nt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,R.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,R.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,ln);let Ve=m(R.image,!1,i.maxTextureSize);Ve=K(R,Ve);let dt=o.convert(R.format,R.colorSpace),Lt=o.convert(R.type),Rt=v(R.internalFormat,dt,Lt,R.colorSpace,R.isVideoTexture);de(fe,R);let pt,dn=R.mipmaps,Zt=R.isVideoTexture!==!0,Xn=Re.__version===void 0||ge===!0,re=ye.dataReady,Je=w(R,Ve);if(R.isDepthTexture)Rt=x(R.format===Jp,R.type),Xn&&(Zt?t.texStorage2D(r.TEXTURE_2D,1,Rt,Ve.width,Ve.height):t.texImage2D(r.TEXTURE_2D,0,Rt,Ve.width,Ve.height,0,dt,Lt,null));else if(R.isDataTexture)if(dn.length>0){Zt&&Xn&&t.texStorage2D(r.TEXTURE_2D,Je,Rt,dn[0].width,dn[0].height);for(let _e=0,ke=dn.length;_e<ke;_e++)pt=dn[_e],Zt?re&&t.texSubImage2D(r.TEXTURE_2D,_e,0,0,pt.width,pt.height,dt,Lt,pt.data):t.texImage2D(r.TEXTURE_2D,_e,Rt,pt.width,pt.height,0,dt,Lt,pt.data);R.generateMipmaps=!1}else Zt?(Xn&&t.texStorage2D(r.TEXTURE_2D,Je,Rt,Ve.width,Ve.height),re&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,Ve.width,Ve.height,dt,Lt,Ve.data)):t.texImage2D(r.TEXTURE_2D,0,Rt,Ve.width,Ve.height,0,dt,Lt,Ve.data);else if(R.isCompressedTexture)if(R.isCompressedArrayTexture){Zt&&Xn&&t.texStorage3D(r.TEXTURE_2D_ARRAY,Je,Rt,dn[0].width,dn[0].height,Ve.depth);for(let _e=0,ke=dn.length;_e<ke;_e++)if(pt=dn[_e],R.format!==oi)if(dt!==null)if(Zt){if(re)if(R.layerUpdates.size>0){let it=r4(pt.width,pt.height,R.format,R.type);for(let rt of R.layerUpdates){let $t=pt.data.subarray(rt*it/pt.data.BYTES_PER_ELEMENT,(rt+1)*it/pt.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,_e,0,0,rt,pt.width,pt.height,1,dt,$t)}R.clearLayerUpdates()}else t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,_e,0,0,0,pt.width,pt.height,Ve.depth,dt,pt.data)}else t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,_e,Rt,pt.width,pt.height,Ve.depth,0,pt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Zt?re&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,_e,0,0,0,pt.width,pt.height,Ve.depth,dt,Lt,pt.data):t.texImage3D(r.TEXTURE_2D_ARRAY,_e,Rt,pt.width,pt.height,Ve.depth,0,dt,Lt,pt.data)}else{Zt&&Xn&&t.texStorage2D(r.TEXTURE_2D,Je,Rt,dn[0].width,dn[0].height);for(let _e=0,ke=dn.length;_e<ke;_e++)pt=dn[_e],R.format!==oi?dt!==null?Zt?re&&t.compressedTexSubImage2D(r.TEXTURE_2D,_e,0,0,pt.width,pt.height,dt,pt.data):t.compressedTexImage2D(r.TEXTURE_2D,_e,Rt,pt.width,pt.height,0,pt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Zt?re&&t.texSubImage2D(r.TEXTURE_2D,_e,0,0,pt.width,pt.height,dt,Lt,pt.data):t.texImage2D(r.TEXTURE_2D,_e,Rt,pt.width,pt.height,0,dt,Lt,pt.data)}else if(R.isDataArrayTexture)if(Zt){if(Xn&&t.texStorage3D(r.TEXTURE_2D_ARRAY,Je,Rt,Ve.width,Ve.height,Ve.depth),re)if(R.layerUpdates.size>0){let _e=r4(Ve.width,Ve.height,R.format,R.type);for(let ke of R.layerUpdates){let it=Ve.data.subarray(ke*_e/Ve.data.BYTES_PER_ELEMENT,(ke+1)*_e/Ve.data.BYTES_PER_ELEMENT);t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,ke,Ve.width,Ve.height,1,dt,Lt,it)}R.clearLayerUpdates()}else t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,Ve.width,Ve.height,Ve.depth,dt,Lt,Ve.data)}else t.texImage3D(r.TEXTURE_2D_ARRAY,0,Rt,Ve.width,Ve.height,Ve.depth,0,dt,Lt,Ve.data);else if(R.isData3DTexture)Zt?(Xn&&t.texStorage3D(r.TEXTURE_3D,Je,Rt,Ve.width,Ve.height,Ve.depth),re&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,Ve.width,Ve.height,Ve.depth,dt,Lt,Ve.data)):t.texImage3D(r.TEXTURE_3D,0,Rt,Ve.width,Ve.height,Ve.depth,0,dt,Lt,Ve.data);else if(R.isFramebufferTexture){if(Xn)if(Zt)t.texStorage2D(r.TEXTURE_2D,Je,Rt,Ve.width,Ve.height);else{let _e=Ve.width,ke=Ve.height;for(let it=0;it<Je;it++)t.texImage2D(r.TEXTURE_2D,it,Rt,_e,ke,0,dt,Lt,null),_e>>=1,ke>>=1}}else if(dn.length>0){if(Zt&&Xn){let _e=q(dn[0]);t.texStorage2D(r.TEXTURE_2D,Je,Rt,_e.width,_e.height)}for(let _e=0,ke=dn.length;_e<ke;_e++)pt=dn[_e],Zt?re&&t.texSubImage2D(r.TEXTURE_2D,_e,0,0,dt,Lt,pt):t.texImage2D(r.TEXTURE_2D,_e,Rt,dt,Lt,pt);R.generateMipmaps=!1}else if(Zt){if(Xn){let _e=q(Ve);t.texStorage2D(r.TEXTURE_2D,Je,Rt,_e.width,_e.height)}re&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,dt,Lt,Ve)}else t.texImage2D(r.TEXTURE_2D,0,Rt,dt,Lt,Ve);g(R)&&y(fe),Re.__version=ye.version,R.onUpdate&&R.onUpdate(R)}F.__version=R.version}function ue(F,R,ee){if(R.image.length!==6)return;let fe=Se(F,R),ge=R.source;t.bindTexture(r.TEXTURE_CUBE_MAP,F.__webglTexture,r.TEXTURE0+ee);let ye=n.get(ge);if(ge.version!==ye.__version||fe===!0){t.activeTexture(r.TEXTURE0+ee);let Re=wn.getPrimaries(wn.workingColorSpace),Te=R.colorSpace===Es?null:wn.getPrimaries(R.colorSpace),nt=R.colorSpace===Es||Re===Te?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,R.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,R.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,nt);let ln=R.isCompressedTexture||R.image[0].isCompressedTexture,Ve=R.image[0]&&R.image[0].isDataTexture,dt=[];for(let ke=0;ke<6;ke++)!ln&&!Ve?dt[ke]=m(R.image[ke],!0,i.maxCubemapSize):dt[ke]=Ve?R.image[ke].image:R.image[ke],dt[ke]=K(R,dt[ke]);let Lt=dt[0],Rt=o.convert(R.format,R.colorSpace),pt=o.convert(R.type),dn=v(R.internalFormat,Rt,pt,R.colorSpace),Zt=R.isVideoTexture!==!0,Xn=ye.__version===void 0||fe===!0,re=ge.dataReady,Je=w(R,Lt);de(r.TEXTURE_CUBE_MAP,R);let _e;if(ln){Zt&&Xn&&t.texStorage2D(r.TEXTURE_CUBE_MAP,Je,dn,Lt.width,Lt.height);for(let ke=0;ke<6;ke++){_e=dt[ke].mipmaps;for(let it=0;it<_e.length;it++){let rt=_e[it];R.format!==oi?Rt!==null?Zt?re&&t.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it,0,0,rt.width,rt.height,Rt,rt.data):t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it,dn,rt.width,rt.height,0,rt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Zt?re&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it,0,0,rt.width,rt.height,Rt,pt,rt.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it,dn,rt.width,rt.height,0,Rt,pt,rt.data)}}}else{if(_e=R.mipmaps,Zt&&Xn){_e.length>0&&Je++;let ke=q(dt[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,Je,dn,ke.width,ke.height)}for(let ke=0;ke<6;ke++)if(Ve){Zt?re&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,0,0,dt[ke].width,dt[ke].height,Rt,pt,dt[ke].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,dn,dt[ke].width,dt[ke].height,0,Rt,pt,dt[ke].data);for(let it=0;it<_e.length;it++){let $t=_e[it].image[ke].image;Zt?re&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it+1,0,0,$t.width,$t.height,Rt,pt,$t.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it+1,dn,$t.width,$t.height,0,Rt,pt,$t.data)}}else{Zt?re&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,0,0,Rt,pt,dt[ke]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,dn,Rt,pt,dt[ke]);for(let it=0;it<_e.length;it++){let rt=_e[it];Zt?re&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it+1,0,0,Rt,pt,rt.image[ke]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ke,it+1,dn,Rt,pt,rt.image[ke])}}}g(R)&&y(r.TEXTURE_CUBE_MAP),ye.__version=ge.version,R.onUpdate&&R.onUpdate(R)}F.__version=R.version}function ve(F,R,ee,fe,ge,ye){let Re=o.convert(ee.format,ee.colorSpace),Te=o.convert(ee.type),nt=v(ee.internalFormat,Re,Te,ee.colorSpace),ln=n.get(R),Ve=n.get(ee);if(Ve.__renderTarget=R,!ln.__hasExternalTextures){let dt=Math.max(1,R.width>>ye),Lt=Math.max(1,R.height>>ye);ge===r.TEXTURE_3D||ge===r.TEXTURE_2D_ARRAY?t.texImage3D(ge,ye,nt,dt,Lt,R.depth,0,Re,Te,null):t.texImage2D(ge,ye,nt,dt,Lt,0,Re,Te,null)}t.bindFramebuffer(r.FRAMEBUFFER,F),I(R)?s.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,fe,ge,Ve.__webglTexture,0,C(R)):(ge===r.TEXTURE_2D||ge>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&ge<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,fe,ge,Ve.__webglTexture,ye),t.bindFramebuffer(r.FRAMEBUFFER,null)}function se(F,R,ee){if(r.bindRenderbuffer(r.RENDERBUFFER,F),R.depthBuffer){let fe=R.depthTexture,ge=fe&&fe.isDepthTexture?fe.type:null,ye=x(R.stencilBuffer,ge),Re=R.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Te=C(R);I(R)?s.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Te,ye,R.width,R.height):ee?r.renderbufferStorageMultisample(r.RENDERBUFFER,Te,ye,R.width,R.height):r.renderbufferStorage(r.RENDERBUFFER,ye,R.width,R.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,Re,r.RENDERBUFFER,F)}else{let fe=R.textures;for(let ge=0;ge<fe.length;ge++){let ye=fe[ge],Re=o.convert(ye.format,ye.colorSpace),Te=o.convert(ye.type),nt=v(ye.internalFormat,Re,Te,ye.colorSpace),ln=C(R);ee&&I(R)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,ln,nt,R.width,R.height):I(R)?s.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,ln,nt,R.width,R.height):r.renderbufferStorage(r.RENDERBUFFER,nt,R.width,R.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function we(F,R){if(R&&R.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(r.FRAMEBUFFER,F),!(R.depthTexture&&R.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");let fe=n.get(R.depthTexture);fe.__renderTarget=R,(!fe.__webglTexture||R.depthTexture.image.width!==R.width||R.depthTexture.image.height!==R.height)&&(R.depthTexture.image.width=R.width,R.depthTexture.image.height=R.height,R.depthTexture.needsUpdate=!0),z(R.depthTexture,0);let ge=fe.__webglTexture,ye=C(R);if(R.depthTexture.format===Kp)I(R)?s.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,ge,0,ye):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,ge,0);else if(R.depthTexture.format===Jp)I(R)?s.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,ge,0,ye):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,ge,0);else throw new Error("Unknown depthTexture format")}function pe(F){let R=n.get(F),ee=F.isWebGLCubeRenderTarget===!0;if(R.__boundDepthTexture!==F.depthTexture){let fe=F.depthTexture;if(R.__depthDisposeCallback&&R.__depthDisposeCallback(),fe){let ge=()=>{delete R.__boundDepthTexture,delete R.__depthDisposeCallback,fe.removeEventListener("dispose",ge)};fe.addEventListener("dispose",ge),R.__depthDisposeCallback=ge}R.__boundDepthTexture=fe}if(F.depthTexture&&!R.__autoAllocateDepthBuffer){if(ee)throw new Error("target.depthTexture not supported in Cube render targets");we(R.__webglFramebuffer,F)}else if(ee){R.__webglDepthbuffer=[];for(let fe=0;fe<6;fe++)if(t.bindFramebuffer(r.FRAMEBUFFER,R.__webglFramebuffer[fe]),R.__webglDepthbuffer[fe]===void 0)R.__webglDepthbuffer[fe]=r.createRenderbuffer(),se(R.__webglDepthbuffer[fe],F,!1);else{let ge=F.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,ye=R.__webglDepthbuffer[fe];r.bindRenderbuffer(r.RENDERBUFFER,ye),r.framebufferRenderbuffer(r.FRAMEBUFFER,ge,r.RENDERBUFFER,ye)}}else if(t.bindFramebuffer(r.FRAMEBUFFER,R.__webglFramebuffer),R.__webglDepthbuffer===void 0)R.__webglDepthbuffer=r.createRenderbuffer(),se(R.__webglDepthbuffer,F,!1);else{let fe=F.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,ge=R.__webglDepthbuffer;r.bindRenderbuffer(r.RENDERBUFFER,ge),r.framebufferRenderbuffer(r.FRAMEBUFFER,fe,r.RENDERBUFFER,ge)}t.bindFramebuffer(r.FRAMEBUFFER,null)}function Ee(F,R,ee){let fe=n.get(F);R!==void 0&&ve(fe.__webglFramebuffer,F,F.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),ee!==void 0&&pe(F)}function Oe(F){let R=F.texture,ee=n.get(F),fe=n.get(R);F.addEventListener("dispose",A);let ge=F.textures,ye=F.isWebGLCubeRenderTarget===!0,Re=ge.length>1;if(Re||(fe.__webglTexture===void 0&&(fe.__webglTexture=r.createTexture()),fe.__version=R.version,a.memory.textures++),ye){ee.__webglFramebuffer=[];for(let Te=0;Te<6;Te++)if(R.mipmaps&&R.mipmaps.length>0){ee.__webglFramebuffer[Te]=[];for(let nt=0;nt<R.mipmaps.length;nt++)ee.__webglFramebuffer[Te][nt]=r.createFramebuffer()}else ee.__webglFramebuffer[Te]=r.createFramebuffer()}else{if(R.mipmaps&&R.mipmaps.length>0){ee.__webglFramebuffer=[];for(let Te=0;Te<R.mipmaps.length;Te++)ee.__webglFramebuffer[Te]=r.createFramebuffer()}else ee.__webglFramebuffer=r.createFramebuffer();if(Re)for(let Te=0,nt=ge.length;Te<nt;Te++){let ln=n.get(ge[Te]);ln.__webglTexture===void 0&&(ln.__webglTexture=r.createTexture(),a.memory.textures++)}if(F.samples>0&&I(F)===!1){ee.__webglMultisampledFramebuffer=r.createFramebuffer(),ee.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,ee.__webglMultisampledFramebuffer);for(let Te=0;Te<ge.length;Te++){let nt=ge[Te];ee.__webglColorRenderbuffer[Te]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,ee.__webglColorRenderbuffer[Te]);let ln=o.convert(nt.format,nt.colorSpace),Ve=o.convert(nt.type),dt=v(nt.internalFormat,ln,Ve,nt.colorSpace,F.isXRRenderTarget===!0),Lt=C(F);r.renderbufferStorageMultisample(r.RENDERBUFFER,Lt,dt,F.width,F.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Te,r.RENDERBUFFER,ee.__webglColorRenderbuffer[Te])}r.bindRenderbuffer(r.RENDERBUFFER,null),F.depthBuffer&&(ee.__webglDepthRenderbuffer=r.createRenderbuffer(),se(ee.__webglDepthRenderbuffer,F,!0)),t.bindFramebuffer(r.FRAMEBUFFER,null)}}if(ye){t.bindTexture(r.TEXTURE_CUBE_MAP,fe.__webglTexture),de(r.TEXTURE_CUBE_MAP,R);for(let Te=0;Te<6;Te++)if(R.mipmaps&&R.mipmaps.length>0)for(let nt=0;nt<R.mipmaps.length;nt++)ve(ee.__webglFramebuffer[Te][nt],F,R,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Te,nt);else ve(ee.__webglFramebuffer[Te],F,R,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Te,0);g(R)&&y(r.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Re){for(let Te=0,nt=ge.length;Te<nt;Te++){let ln=ge[Te],Ve=n.get(ln);t.bindTexture(r.TEXTURE_2D,Ve.__webglTexture),de(r.TEXTURE_2D,ln),ve(ee.__webglFramebuffer,F,ln,r.COLOR_ATTACHMENT0+Te,r.TEXTURE_2D,0),g(ln)&&y(r.TEXTURE_2D)}t.unbindTexture()}else{let Te=r.TEXTURE_2D;if((F.isWebGL3DRenderTarget||F.isWebGLArrayRenderTarget)&&(Te=F.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),t.bindTexture(Te,fe.__webglTexture),de(Te,R),R.mipmaps&&R.mipmaps.length>0)for(let nt=0;nt<R.mipmaps.length;nt++)ve(ee.__webglFramebuffer[nt],F,R,r.COLOR_ATTACHMENT0,Te,nt);else ve(ee.__webglFramebuffer,F,R,r.COLOR_ATTACHMENT0,Te,0);g(R)&&y(Te),t.unbindTexture()}F.depthBuffer&&pe(F)}function Pe(F){let R=F.textures;for(let ee=0,fe=R.length;ee<fe;ee++){let ge=R[ee];if(g(ge)){let ye=b(F),Re=n.get(ge).__webglTexture;t.bindTexture(ye,Re),y(ye),t.unbindTexture()}}}let Xe=[],$=[];function yt(F){if(F.samples>0){if(I(F)===!1){let R=F.textures,ee=F.width,fe=F.height,ge=r.COLOR_BUFFER_BIT,ye=F.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Re=n.get(F),Te=R.length>1;if(Te)for(let nt=0;nt<R.length;nt++)t.bindFramebuffer(r.FRAMEBUFFER,Re.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+nt,r.RENDERBUFFER,null),t.bindFramebuffer(r.FRAMEBUFFER,Re.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+nt,r.TEXTURE_2D,null,0);t.bindFramebuffer(r.READ_FRAMEBUFFER,Re.__webglMultisampledFramebuffer),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Re.__webglFramebuffer);for(let nt=0;nt<R.length;nt++){if(F.resolveDepthBuffer&&(F.depthBuffer&&(ge|=r.DEPTH_BUFFER_BIT),F.stencilBuffer&&F.resolveStencilBuffer&&(ge|=r.STENCIL_BUFFER_BIT)),Te){r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,Re.__webglColorRenderbuffer[nt]);let ln=n.get(R[nt]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,ln,0)}r.blitFramebuffer(0,0,ee,fe,0,0,ee,fe,ge,r.NEAREST),l===!0&&(Xe.length=0,$.length=0,Xe.push(r.COLOR_ATTACHMENT0+nt),F.depthBuffer&&F.resolveDepthBuffer===!1&&(Xe.push(ye),$.push(ye),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,$)),r.invalidateFramebuffer(r.READ_FRAMEBUFFER,Xe))}if(t.bindFramebuffer(r.READ_FRAMEBUFFER,null),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),Te)for(let nt=0;nt<R.length;nt++){t.bindFramebuffer(r.FRAMEBUFFER,Re.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+nt,r.RENDERBUFFER,Re.__webglColorRenderbuffer[nt]);let ln=n.get(R[nt]).__webglTexture;t.bindFramebuffer(r.FRAMEBUFFER,Re.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+nt,r.TEXTURE_2D,ln,0)}t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Re.__webglMultisampledFramebuffer)}else if(F.depthBuffer&&F.resolveDepthBuffer===!1&&l){let R=F.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT;r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[R])}}}function C(F){return Math.min(i.maxSamples,F.samples)}function I(F){let R=n.get(F);return F.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&R.__useRenderToTexture!==!1}function B(F){let R=a.render.frame;u.get(F)!==R&&(u.set(F,R),F.update())}function K(F,R){let ee=F.colorSpace,fe=F.format,ge=F.type;return F.isCompressedTexture===!0||F.isVideoTexture===!0||ee!==Qp&&ee!==Es&&(wn.getTransfer(ee)===zn?(fe!==oi||ge!==pa)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ee)),R}function q(F){return typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement?(c.width=F.naturalWidth||F.width,c.height=F.naturalHeight||F.height):typeof VideoFrame<"u"&&F instanceof VideoFrame?(c.width=F.displayWidth,c.height=F.displayHeight):(c.width=F.width,c.height=F.height),c}this.allocateTextureUnit=O,this.resetTextureUnits=L,this.setTexture2D=z,this.setTexture2DArray=N,this.setTexture3D=J,this.setTextureCube=X,this.rebindTextures=Ee,this.setupRenderTarget=Oe,this.updateRenderTargetMipmap=Pe,this.updateMultisampleRenderTarget=yt,this.setupDepthRenderbuffer=pe,this.setupFrameBufferTexture=ve,this.useMultisampledRTT=I}function swe(r,e){function t(n,i=Es){let o,a=wn.getTransfer(i);if(n===pa)return r.UNSIGNED_BYTE;if(n===EP)return r.UNSIGNED_SHORT_4_4_4_4;if(n===CP)return r.UNSIGNED_SHORT_5_5_5_1;if(n===VR)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===UR)return r.BYTE;if(n===jR)return r.SHORT;if(n===By)return r.UNSIGNED_SHORT;if(n===PP)return r.INT;if(n===nd)return r.UNSIGNED_INT;if(n===Wa)return r.FLOAT;if(n===Fy)return r.HALF_FLOAT;if(n===GR)return r.ALPHA;if(n===HR)return r.RGB;if(n===oi)return r.RGBA;if(n===WR)return r.LUMINANCE;if(n===XR)return r.LUMINANCE_ALPHA;if(n===Kp)return r.DEPTH_COMPONENT;if(n===Jp)return r.DEPTH_STENCIL;if(n===TP)return r.RED;if(n===kP)return r.RED_INTEGER;if(n===YR)return r.RG;if(n===IP)return r.RG_INTEGER;if(n===LP)return r.RGBA_INTEGER;if(n===Qw||n===e_||n===t_||n===n_)if(a===zn)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(n===Qw)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===e_)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===t_)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===n_)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(n===Qw)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===e_)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===t_)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===n_)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===OP||n===DP||n===RP||n===BP)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(n===OP)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===DP)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===RP)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===BP)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===FP||n===NP||n===zP)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(n===FP||n===NP)return a===zn?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(n===zP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===UP||n===jP||n===VP||n===GP||n===HP||n===WP||n===XP||n===YP||n===$P||n===KP||n===qP||n===ZP||n===JP||n===QP)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(n===UP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===jP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===VP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===GP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===HP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===WP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===XP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===YP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===$P)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===KP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===qP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===ZP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===JP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===QP)return a===zn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===r_||n===eE||n===tE)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(n===r_)return a===zn?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===eE)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===tE)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===$R||n===nE||n===rE||n===iE)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(n===r_)return o.COMPRESSED_RED_RGTC1_EXT;if(n===nE)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===rE)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===iE)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===cf?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:t}}var lwe={type:"move"},o_=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Zn,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Zn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new U,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new U),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Zn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new U,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new U),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,o=null,a=null,s=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){a=!0;for(let m of e.hand.values()){let g=t.getJointPose(m,n),y=this._getHandJoint(c,m);g!==null&&(y.matrix.fromArray(g.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,y.jointRadius=g.radius),y.visible=g!==null}let u=c.joints["index-finger-tip"],h=c.joints["thumb-tip"],d=u.position.distanceTo(h.position),p=.02,f=.005;c.inputState.pinching&&d>p+f?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&d<=p-f&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));s!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&o!==null&&(i=o),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(lwe)))}return s!==null&&(s.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new Zn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},cwe=`
  3729. void main() {
  3730. gl_Position = vec4( position, 1.0 );
  3731. }`,uwe=`
  3732. uniform sampler2DArray depthColor;
  3733. uniform float depthWidth;
  3734. uniform float depthHeight;
  3735. void main() {
  3736. vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
  3737. if ( coord.x >= 1.0 ) {
  3738. gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
  3739. } else {
  3740. gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
  3741. }
  3742. }`,g4=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){let i=new wi,o=e.properties.get(i);o.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new Kn({vertexShader:cwe,fragmentShader:uwe,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new jt(new Xu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},y4=class extends pc{constructor(e,t){super();let n=this,i=null,o=1,a=null,s="local-floor",l=1,c=null,u=null,h=null,d=null,p=null,f=null,m=new g4,g=t.getContextAttributes(),y=null,b=null,v=[],x=[],w=new Le,_=null,A=new ca;A.viewport=new yn;let E=new ca;E.viewport=new yn;let S=[A,E],M=new mP,T=null,L=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(te){let ue=v[te];return ue===void 0&&(ue=new o_,v[te]=ue),ue.getTargetRaySpace()},this.getControllerGrip=function(te){let ue=v[te];return ue===void 0&&(ue=new o_,v[te]=ue),ue.getGripSpace()},this.getHand=function(te){let ue=v[te];return ue===void 0&&(ue=new o_,v[te]=ue),ue.getHandSpace()};function O(te){let ue=x.indexOf(te.inputSource);if(ue===-1)return;let ve=v[ue];ve!==void 0&&(ve.update(te.inputSource,te.frame,c||a),ve.dispatchEvent({type:te.type,data:te.inputSource}))}function D(){i.removeEventListener("select",O),i.removeEventListener("selectstart",O),i.removeEventListener("selectend",O),i.removeEventListener("squeeze",O),i.removeEventListener("squeezestart",O),i.removeEventListener("squeezeend",O),i.removeEventListener("end",D),i.removeEventListener("inputsourceschange",z);for(let te=0;te<v.length;te++){let ue=x[te];ue!==null&&(x[te]=null,v[te].disconnect(ue))}T=null,L=null,m.reset(),e.setRenderTarget(y),p=null,d=null,h=null,i=null,b=null,Se.stop(),n.isPresenting=!1,e.setPixelRatio(_),e.setSize(w.width,w.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(te){o=te,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(te){s=te,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(te){c=te},this.getBaseLayer=function(){return d!==null?d:p},this.getBinding=function(){return h},this.getFrame=function(){return f},this.getSession=function(){return i},this.setSession=async function(te){if(i=te,i!==null){if(y=e.getRenderTarget(),i.addEventListener("select",O),i.addEventListener("selectstart",O),i.addEventListener("selectend",O),i.addEventListener("squeeze",O),i.addEventListener("squeezestart",O),i.addEventListener("squeezeend",O),i.addEventListener("end",D),i.addEventListener("inputsourceschange",z),g.xrCompatible!==!0&&await t.makeXRCompatible(),_=e.getPixelRatio(),e.getSize(w),i.enabledFeatures!==void 0&&i.enabledFeatures.includes("layers")){let ve=null,se=null,we=null;g.depth&&(we=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ve=g.stencil?Jp:Kp,se=g.stencil?cf:nd);let pe={colorFormat:t.RGBA8,depthFormat:we,scaleFactor:o};h=new XRWebGLBinding(i,t),d=h.createProjectionLayer(pe),i.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),b=new Go(d.textureWidth,d.textureHeight,{format:oi,type:pa,depthTexture:new Fw(d.textureWidth,d.textureHeight,se,void 0,void 0,void 0,void 0,void 0,void 0,ve),stencilBuffer:g.stencil,colorSpace:e.outputColorSpace,samples:g.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1})}else{let ve={antialias:g.antialias,alpha:!0,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:o};p=new XRWebGLLayer(i,t,ve),i.updateRenderState({baseLayer:p}),e.setPixelRatio(1),e.setSize(p.framebufferWidth,p.framebufferHeight,!1),b=new Go(p.framebufferWidth,p.framebufferHeight,{format:oi,type:pa,colorSpace:e.outputColorSpace,stencilBuffer:g.stencil})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,a=await i.requestReferenceSpace(s),Se.setContext(i),Se.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};function z(te){for(let ue=0;ue<te.removed.length;ue++){let ve=te.removed[ue],se=x.indexOf(ve);se>=0&&(x[se]=null,v[se].disconnect(ve))}for(let ue=0;ue<te.added.length;ue++){let ve=te.added[ue],se=x.indexOf(ve);if(se===-1){for(let pe=0;pe<v.length;pe++)if(pe>=x.length){x.push(ve),se=pe;break}else if(x[pe]===null){x[pe]=ve,se=pe;break}if(se===-1)break}let we=v[se];we&&we.connect(ve)}}let N=new U,J=new U;function X(te,ue,ve){N.setFromMatrixPosition(ue.matrixWorld),J.setFromMatrixPosition(ve.matrixWorld);let se=N.distanceTo(J),we=ue.projectionMatrix.elements,pe=ve.projectionMatrix.elements,Ee=we[14]/(we[10]-1),Oe=we[14]/(we[10]+1),Pe=(we[9]+1)/we[5],Xe=(we[9]-1)/we[5],$=(we[8]-1)/we[0],yt=(pe[8]+1)/pe[0],C=Ee*$,I=Ee*yt,B=se/(-$+yt),K=B*-$;if(ue.matrixWorld.decompose(te.position,te.quaternion,te.scale),te.translateX(K),te.translateZ(B),te.matrixWorld.compose(te.position,te.quaternion,te.scale),te.matrixWorldInverse.copy(te.matrixWorld).invert(),we[10]===-1)te.projectionMatrix.copy(ue.projectionMatrix),te.projectionMatrixInverse.copy(ue.projectionMatrixInverse);else{let q=Ee+B,F=Oe+B,R=C-K,ee=I+(se-K),fe=Pe*Oe/F*q,ge=Xe*Oe/F*q;te.projectionMatrix.makePerspective(R,ee,fe,ge,q,F),te.projectionMatrixInverse.copy(te.projectionMatrix).invert()}}function Q(te,ue){ue===null?te.matrixWorld.copy(te.matrix):te.matrixWorld.multiplyMatrices(ue.matrixWorld,te.matrix),te.matrixWorldInverse.copy(te.matrixWorld).invert()}this.updateCamera=function(te){if(i===null)return;let ue=te.near,ve=te.far;m.texture!==null&&(m.depthNear>0&&(ue=m.depthNear),m.depthFar>0&&(ve=m.depthFar)),M.near=E.near=A.near=ue,M.far=E.far=A.far=ve,(T!==M.near||L!==M.far)&&(i.updateRenderState({depthNear:M.near,depthFar:M.far}),T=M.near,L=M.far),A.layers.mask=te.layers.mask|2,E.layers.mask=te.layers.mask|4,M.layers.mask=A.layers.mask|E.layers.mask;let se=te.parent,we=M.cameras;Q(M,se);for(let pe=0;pe<we.length;pe++)Q(we[pe],se);we.length===2?X(M,A,E):M.projectionMatrix.copy(A.projectionMatrix),ce(te,M,se)};function ce(te,ue,ve){ve===null?te.matrix.copy(ue.matrixWorld):(te.matrix.copy(ve.matrixWorld),te.matrix.invert(),te.matrix.multiply(ue.matrixWorld)),te.matrix.decompose(te.position,te.quaternion,te.scale),te.updateMatrixWorld(!0),te.projectionMatrix.copy(ue.projectionMatrix),te.projectionMatrixInverse.copy(ue.projectionMatrixInverse),te.isPerspectiveCamera&&(te.fov=Py*2*Math.atan(1/te.projectionMatrix.elements[5]),te.zoom=1)}this.getCamera=function(){return M},this.getFoveation=function(){if(!(d===null&&p===null))return l},this.setFoveation=function(te){l=te,d!==null&&(d.fixedFoveation=te),p!==null&&p.fixedFoveation!==void 0&&(p.fixedFoveation=te)},this.hasDepthSensing=function(){return m.texture!==null},this.getDepthSensingMesh=function(){return m.getMesh(M)};let H=null;function de(te,ue){if(u=ue.getViewerPose(c||a),f=ue,u!==null){let ve=u.views;p!==null&&(e.setRenderTargetFramebuffer(b,p.framebuffer),e.setRenderTarget(b));let se=!1;ve.length!==M.cameras.length&&(M.cameras.length=0,se=!0);for(let pe=0;pe<ve.length;pe++){let Ee=ve[pe],Oe=null;if(p!==null)Oe=p.getViewport(Ee);else{let Xe=h.getViewSubImage(d,Ee);Oe=Xe.viewport,pe===0&&(e.setRenderTargetTextures(b,Xe.colorTexture,d.ignoreDepthValues?void 0:Xe.depthStencilTexture),e.setRenderTarget(b))}let Pe=S[pe];Pe===void 0&&(Pe=new ca,Pe.layers.enable(pe),Pe.viewport=new yn,S[pe]=Pe),Pe.matrix.fromArray(Ee.transform.matrix),Pe.matrix.decompose(Pe.position,Pe.quaternion,Pe.scale),Pe.projectionMatrix.fromArray(Ee.projectionMatrix),Pe.projectionMatrixInverse.copy(Pe.projectionMatrix).invert(),Pe.viewport.set(Oe.x,Oe.y,Oe.width,Oe.height),pe===0&&(M.matrix.copy(Pe.matrix),M.matrix.decompose(M.position,M.quaternion,M.scale)),se===!0&&M.cameras.push(Pe)}let we=i.enabledFeatures;if(we&&we.includes("depth-sensing")){let pe=h.getDepthInformation(ve[0]);pe&&pe.isValid&&pe.texture&&m.init(e,pe,i.renderState)}}for(let ve=0;ve<v.length;ve++){let se=x[ve],we=v[ve];se!==null&&we!==void 0&&we.update(se,ue,c||a)}H&&H(te,ue),ue.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ue}),f=null}let Se=new LX;Se.setAnimationLoop(de),this.setAnimationLoop=function(te){H=te},this.dispose=function(){}}},mf=new da,hwe=new vt;function dwe(r,e){function t(g,y){g.matrixAutoUpdate===!0&&g.updateMatrix(),y.value.copy(g.matrix)}function n(g,y){y.color.getRGB(g.fogColor.value,QR(r)),y.isFog?(g.fogNear.value=y.near,g.fogFar.value=y.far):y.isFogExp2&&(g.fogDensity.value=y.density)}function i(g,y,b,v,x){y.isMeshBasicMaterial||y.isMeshLambertMaterial?o(g,y):y.isMeshToonMaterial?(o(g,y),h(g,y)):y.isMeshPhongMaterial?(o(g,y),u(g,y)):y.isMeshStandardMaterial?(o(g,y),d(g,y),y.isMeshPhysicalMaterial&&p(g,y,x)):y.isMeshMatcapMaterial?(o(g,y),f(g,y)):y.isMeshDepthMaterial?o(g,y):y.isMeshDistanceMaterial?(o(g,y),m(g,y)):y.isMeshNormalMaterial?o(g,y):y.isLineBasicMaterial?(a(g,y),y.isLineDashedMaterial&&s(g,y)):y.isPointsMaterial?l(g,y,b,v):y.isSpriteMaterial?c(g,y):y.isShadowMaterial?(g.color.value.copy(y.color),g.opacity.value=y.opacity):y.isShaderMaterial&&(y.uniformsNeedUpdate=!1)}function o(g,y){g.opacity.value=y.opacity,y.color&&g.diffuse.value.copy(y.color),y.emissive&&g.emissive.value.copy(y.emissive).multiplyScalar(y.emissiveIntensity),y.map&&(g.map.value=y.map,t(y.map,g.mapTransform)),y.alphaMap&&(g.alphaMap.value=y.alphaMap,t(y.alphaMap,g.alphaMapTransform)),y.bumpMap&&(g.bumpMap.value=y.bumpMap,t(y.bumpMap,g.bumpMapTransform),g.bumpScale.value=y.bumpScale,y.side===zi&&(g.bumpScale.value*=-1)),y.normalMap&&(g.normalMap.value=y.normalMap,t(y.normalMap,g.normalMapTransform),g.normalScale.value.copy(y.normalScale),y.side===zi&&g.normalScale.value.negate()),y.displacementMap&&(g.displacementMap.value=y.displacementMap,t(y.displacementMap,g.displacementMapTransform),g.displacementScale.value=y.displacementScale,g.displacementBias.value=y.displacementBias),y.emissiveMap&&(g.emissiveMap.value=y.emissiveMap,t(y.emissiveMap,g.emissiveMapTransform)),y.specularMap&&(g.specularMap.value=y.specularMap,t(y.specularMap,g.specularMapTransform)),y.alphaTest>0&&(g.alphaTest.value=y.alphaTest);let b=e.get(y),v=b.envMap,x=b.envMapRotation;v&&(g.envMap.value=v,mf.copy(x),mf.x*=-1,mf.y*=-1,mf.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(mf.y*=-1,mf.z*=-1),g.envMapRotation.value.setFromMatrix4(hwe.makeRotationFromEuler(mf)),g.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=y.reflectivity,g.ior.value=y.ior,g.refractionRatio.value=y.refractionRatio),y.lightMap&&(g.lightMap.value=y.lightMap,g.lightMapIntensity.value=y.lightMapIntensity,t(y.lightMap,g.lightMapTransform)),y.aoMap&&(g.aoMap.value=y.aoMap,g.aoMapIntensity.value=y.aoMapIntensity,t(y.aoMap,g.aoMapTransform))}function a(g,y){g.diffuse.value.copy(y.color),g.opacity.value=y.opacity,y.map&&(g.map.value=y.map,t(y.map,g.mapTransform))}function s(g,y){g.dashSize.value=y.dashSize,g.totalSize.value=y.dashSize+y.gapSize,g.scale.value=y.scale}function l(g,y,b,v){g.diffuse.value.copy(y.color),g.opacity.value=y.opacity,g.size.value=y.size*b,g.scale.value=v*.5,y.map&&(g.map.value=y.map,t(y.map,g.uvTransform)),y.alphaMap&&(g.alphaMap.value=y.alphaMap,t(y.alphaMap,g.alphaMapTransform)),y.alphaTest>0&&(g.alphaTest.value=y.alphaTest)}function c(g,y){g.diffuse.value.copy(y.color),g.opacity.value=y.opacity,g.rotation.value=y.rotation,y.map&&(g.map.value=y.map,t(y.map,g.mapTransform)),y.alphaMap&&(g.alphaMap.value=y.alphaMap,t(y.alphaMap,g.alphaMapTransform)),y.alphaTest>0&&(g.alphaTest.value=y.alphaTest)}function u(g,y){g.specular.value.copy(y.specular),g.shininess.value=Math.max(y.shininess,1e-4)}function h(g,y){y.gradientMap&&(g.gradientMap.value=y.gradientMap)}function d(g,y){g.metalness.value=y.metalness,y.metalnessMap&&(g.metalnessMap.value=y.metalnessMap,t(y.metalnessMap,g.metalnessMapTransform)),g.roughness.value=y.roughness,y.roughnessMap&&(g.roughnessMap.value=y.roughnessMap,t(y.roughnessMap,g.roughnessMapTransform)),y.envMap&&(g.envMapIntensity.value=y.envMapIntensity)}function p(g,y,b){g.ior.value=y.ior,y.sheen>0&&(g.sheenColor.value.copy(y.sheenColor).multiplyScalar(y.sheen),g.sheenRoughness.value=y.sheenRoughness,y.sheenColorMap&&(g.sheenColorMap.value=y.sheenColorMap,t(y.sheenColorMap,g.sheenColorMapTransform)),y.sheenRoughnessMap&&(g.sheenRoughnessMap.value=y.sheenRoughnessMap,t(y.sheenRoughnessMap,g.sheenRoughnessMapTransform))),y.clearcoat>0&&(g.clearcoat.value=y.clearcoat,g.clearcoatRoughness.value=y.clearcoatRoughness,y.clearcoatMap&&(g.clearcoatMap.value=y.clearcoatMap,t(y.clearcoatMap,g.clearcoatMapTransform)),y.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=y.clearcoatRoughnessMap,t(y.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),y.clearcoatNormalMap&&(g.clearcoatNormalMap.value=y.clearcoatNormalMap,t(y.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(y.clearcoatNormalScale),y.side===zi&&g.clearcoatNormalScale.value.negate())),y.dispersion>0&&(g.dispersion.value=y.dispersion),y.iridescence>0&&(g.iridescence.value=y.iridescence,g.iridescenceIOR.value=y.iridescenceIOR,g.iridescenceThicknessMinimum.value=y.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=y.iridescenceThicknessRange[1],y.iridescenceMap&&(g.iridescenceMap.value=y.iridescenceMap,t(y.iridescenceMap,g.iridescenceMapTransform)),y.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=y.iridescenceThicknessMap,t(y.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),y.transmission>0&&(g.transmission.value=y.transmission,g.transmissionSamplerMap.value=b.texture,g.transmissionSamplerSize.value.set(b.width,b.height),y.transmissionMap&&(g.transmissionMap.value=y.transmissionMap,t(y.transmissionMap,g.transmissionMapTransform)),g.thickness.value=y.thickness,y.thicknessMap&&(g.thicknessMap.value=y.thicknessMap,t(y.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=y.attenuationDistance,g.attenuationColor.value.copy(y.attenuationColor)),y.anisotropy>0&&(g.anisotropyVector.value.set(y.anisotropy*Math.cos(y.anisotropyRotation),y.anisotropy*Math.sin(y.anisotropyRotation)),y.anisotropyMap&&(g.anisotropyMap.value=y.anisotropyMap,t(y.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=y.specularIntensity,g.specularColor.value.copy(y.specularColor),y.specularColorMap&&(g.specularColorMap.value=y.specularColorMap,t(y.specularColorMap,g.specularColorMapTransform)),y.specularIntensityMap&&(g.specularIntensityMap.value=y.specularIntensityMap,t(y.specularIntensityMap,g.specularIntensityMapTransform))}function f(g,y){y.matcap&&(g.matcap.value=y.matcap)}function m(g,y){let b=e.get(y).light;g.referencePosition.value.setFromMatrixPosition(b.matrixWorld),g.nearDistance.value=b.shadow.camera.near,g.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function pwe(r,e,t,n){let i={},o={},a=[],s=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,v){let x=v.program;n.uniformBlockBinding(b,x)}function c(b,v){let x=i[b.id];x===void 0&&(f(b),x=u(b),i[b.id]=x,b.addEventListener("dispose",g));let w=v.program;n.updateUBOMapping(b,w);let _=e.render.frame;o[b.id]!==_&&(d(b),o[b.id]=_)}function u(b){let v=h();b.__bindingPointIndex=v;let x=r.createBuffer(),w=b.__size,_=b.usage;return r.bindBuffer(r.UNIFORM_BUFFER,x),r.bufferData(r.UNIFORM_BUFFER,w,_),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,v,x),x}function h(){for(let b=0;b<s;b++)if(a.indexOf(b)===-1)return a.push(b),b;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(b){let v=i[b.id],x=b.uniforms,w=b.__cache;r.bindBuffer(r.UNIFORM_BUFFER,v);for(let _=0,A=x.length;_<A;_++){let E=Array.isArray(x[_])?x[_]:[x[_]];for(let S=0,M=E.length;S<M;S++){let T=E[S];if(p(T,_,S,w)===!0){let L=T.__offset,O=Array.isArray(T.value)?T.value:[T.value],D=0;for(let z=0;z<O.length;z++){let N=O[z],J=m(N);typeof N=="number"||typeof N=="boolean"?(T.__data[0]=N,r.bufferSubData(r.UNIFORM_BUFFER,L+D,T.__data)):N.isMatrix3?(T.__data[0]=N.elements[0],T.__data[1]=N.elements[1],T.__data[2]=N.elements[2],T.__data[3]=0,T.__data[4]=N.elements[3],T.__data[5]=N.elements[4],T.__data[6]=N.elements[5],T.__data[7]=0,T.__data[8]=N.elements[6],T.__data[9]=N.elements[7],T.__data[10]=N.elements[8],T.__data[11]=0):(N.toArray(T.__data,D),D+=J.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,L,T.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function p(b,v,x,w){let _=b.value,A=v+"_"+x;if(w[A]===void 0)return typeof _=="number"||typeof _=="boolean"?w[A]=_:w[A]=_.clone(),!0;{let E=w[A];if(typeof _=="number"||typeof _=="boolean"){if(E!==_)return w[A]=_,!0}else if(E.equals(_)===!1)return E.copy(_),!0}return!1}function f(b){let v=b.uniforms,x=0,w=16;for(let A=0,E=v.length;A<E;A++){let S=Array.isArray(v[A])?v[A]:[v[A]];for(let M=0,T=S.length;M<T;M++){let L=S[M],O=Array.isArray(L.value)?L.value:[L.value];for(let D=0,z=O.length;D<z;D++){let N=O[D],J=m(N),X=x%w,Q=X%J.boundary,ce=X+Q;x+=Q,ce!==0&&w-ce<J.storage&&(x+=w-ce),L.__data=new Float32Array(J.storage/Float32Array.BYTES_PER_ELEMENT),L.__offset=x,x+=J.storage}}}let _=x%w;return _>0&&(x+=w-_),b.__size=x,b.__cache={},this}function m(b){let v={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(v.boundary=4,v.storage=4):b.isVector2?(v.boundary=8,v.storage=8):b.isVector3||b.isColor?(v.boundary=16,v.storage=12):b.isVector4?(v.boundary=16,v.storage=16):b.isMatrix3?(v.boundary=48,v.storage=48):b.isMatrix4?(v.boundary=64,v.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),v}function g(b){let v=b.target;v.removeEventListener("dispose",g);let x=a.indexOf(v.__bindingPointIndex);a.splice(x,1),r.deleteBuffer(i[v.id]),delete i[v.id],delete o[v.id]}function y(){for(let b in i)r.deleteBuffer(i[b]);a=[],i={},o={}}return{bind:l,update:c,dispose:y}}var hE=class{constructor(e={}){let{canvas:t=QW(),context:n=null,depth:i=!0,stencil:o=!1,alpha:a=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:h=!1,reverseDepthBuffer:d=!1}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=n.getContextAttributes().alpha}else p=a;let f=new Uint32Array(4),m=new Int32Array(4),g=null,y=null,b=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=jo,this.toneMapping=$u,this.toneMappingExposure=1;let x=this,w=!1,_=0,A=0,E=null,S=-1,M=null,T=new yn,L=new yn,O=null,D=new $e(0),z=0,N=t.width,J=t.height,X=1,Q=null,ce=null,H=new yn(0,0,N,J),de=new yn(0,0,N,J),Se=!1,te=new Rw,ue=!1,ve=!1;this.transmissionResolutionScale=1;let se=new vt,we=new vt,pe=new U,Ee=new yn,Oe={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},Pe=!1;function Xe(){return E===null?X:1}let $=n;function yt(j,ae){return t.getContext(j,ae)}try{let j={alpha:!0,depth:i,stencil:o,antialias:s,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:h};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${"172"}`),t.addEventListener("webglcontextlost",ke,!1),t.addEventListener("webglcontextrestored",it,!1),t.addEventListener("webglcontextcreationerror",rt,!1),$===null){let ae="webgl2";if($=yt(ae,j),$===null)throw yt(ae)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(j){throw console.error("THREE.WebGLRenderer: "+j.message),j}let C,I,B,K,q,F,R,ee,fe,ge,ye,Re,Te,nt,ln,Ve,dt,Lt,Rt,pt,dn,Zt,Xn,re;function Je(){C=new k0e($),C.init(),Zt=new swe($,C),I=new A0e($,C,e,Zt),B=new owe($,C),I.reverseDepthBuffer&&d&&B.buffers.depth.setReversed(!0),K=new O0e($),q=new Xxe,F=new awe($,C,B,q,I,Zt,K),R=new P0e(x),ee=new T0e(x),fe=new Uye($),Xn=new _0e($,fe),ge=new I0e($,fe,K,Xn),ye=new R0e($,ge,fe,K),Rt=new D0e($,I,F),Ve=new M0e(q),Re=new Wxe(x,R,ee,C,I,Xn,Ve),Te=new dwe(x,q),nt=new $xe,ln=new ewe(C),Lt=new w0e(x,R,ee,B,ye,p,l),dt=new rwe(x,ye,I),re=new pwe($,K,I,B),pt=new S0e($,C,K),dn=new L0e($,C,K),K.programs=Re.programs,x.capabilities=I,x.extensions=C,x.properties=q,x.renderLists=nt,x.shadowMap=dt,x.state=B,x.info=K}Je();let _e=new y4(x,$);this.xr=_e,this.getContext=function(){return $},this.getContextAttributes=function(){return $.getContextAttributes()},this.forceContextLoss=function(){let j=C.get("WEBGL_lose_context");j&&j.loseContext()},this.forceContextRestore=function(){let j=C.get("WEBGL_lose_context");j&&j.restoreContext()},this.getPixelRatio=function(){return X},this.setPixelRatio=function(j){j!==void 0&&(X=j,this.setSize(N,J,!1))},this.getSize=function(j){return j.set(N,J)},this.setSize=function(j,ae,me=!0){if(_e.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}N=j,J=ae,t.width=Math.floor(j*X),t.height=Math.floor(ae*X),me===!0&&(t.style.width=j+"px",t.style.height=ae+"px"),this.setViewport(0,0,j,ae)},this.getDrawingBufferSize=function(j){return j.set(N*X,J*X).floor()},this.setDrawingBufferSize=function(j,ae,me){N=j,J=ae,X=me,t.width=Math.floor(j*me),t.height=Math.floor(ae*me),this.setViewport(0,0,j,ae)},this.getCurrentViewport=function(j){return j.copy(T)},this.getViewport=function(j){return j.copy(H)},this.setViewport=function(j,ae,me,be){j.isVector4?H.set(j.x,j.y,j.z,j.w):H.set(j,ae,me,be),B.viewport(T.copy(H).multiplyScalar(X).round())},this.getScissor=function(j){return j.copy(de)},this.setScissor=function(j,ae,me,be){j.isVector4?de.set(j.x,j.y,j.z,j.w):de.set(j,ae,me,be),B.scissor(L.copy(de).multiplyScalar(X).round())},this.getScissorTest=function(){return Se},this.setScissorTest=function(j){B.setScissorTest(Se=j)},this.setOpaqueSort=function(j){Q=j},this.setTransparentSort=function(j){ce=j},this.getClearColor=function(j){return j.copy(Lt.getClearColor())},this.setClearColor=function(){Lt.setClearColor.apply(Lt,arguments)},this.getClearAlpha=function(){return Lt.getClearAlpha()},this.setClearAlpha=function(){Lt.setClearAlpha.apply(Lt,arguments)},this.clear=function(j=!0,ae=!0,me=!0){let be=0;if(j){let le=!1;if(E!==null){let Ue=E.texture.format;le=Ue===LP||Ue===IP||Ue===kP}if(le){let Ue=E.texture.type,Qe=Ue===pa||Ue===nd||Ue===By||Ue===cf||Ue===EP||Ue===CP,lt=Lt.getClearColor(),ft=Lt.getClearAlpha(),Bt=lt.r,Nt=lt.g,Mt=lt.b;Qe?(f[0]=Bt,f[1]=Nt,f[2]=Mt,f[3]=ft,$.clearBufferuiv($.COLOR,0,f)):(m[0]=Bt,m[1]=Nt,m[2]=Mt,m[3]=ft,$.clearBufferiv($.COLOR,0,m))}else be|=$.COLOR_BUFFER_BIT}ae&&(be|=$.DEPTH_BUFFER_BIT),me&&(be|=$.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),$.clear(be)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ke,!1),t.removeEventListener("webglcontextrestored",it,!1),t.removeEventListener("webglcontextcreationerror",rt,!1),Lt.dispose(),nt.dispose(),ln.dispose(),q.dispose(),R.dispose(),ee.dispose(),ye.dispose(),Xn.dispose(),re.dispose(),Re.dispose(),_e.dispose(),_e.removeEventListener("sessionstart",CU),_e.removeEventListener("sessionend",TU),Ud.stop()};function ke(j){j.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),w=!0}function it(){console.log("THREE.WebGLRenderer: Context Restored."),w=!1;let j=K.autoReset,ae=dt.enabled,me=dt.autoUpdate,be=dt.needsUpdate,le=dt.type;Je(),K.autoReset=j,dt.enabled=ae,dt.autoUpdate=me,dt.needsUpdate=be,dt.type=le}function rt(j){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",j.statusMessage)}function $t(j){let ae=j.target;ae.removeEventListener("dispose",$t),Ar(ae)}function Ar(j){$i(j),q.remove(j)}function $i(j){let ae=q.get(j).programs;ae!==void 0&&(ae.forEach(function(me){Re.releaseProgram(me)}),j.isShaderMaterial&&Re.releaseShaderCache(j))}this.renderBufferDirect=function(j,ae,me,be,le,Ue){ae===null&&(ae=Oe);let Qe=le.isMesh&&le.matrixWorld.determinant()<0,lt=are(j,ae,me,be,le);B.setMaterial(be,Qe);let ft=me.index,Bt=1;if(be.wireframe===!0){if(ft=ge.getWireframeAttribute(me),ft===void 0)return;Bt=2}let Nt=me.drawRange,Mt=me.attributes.position,bn=Nt.start*Bt,On=(Nt.start+Nt.count)*Bt;Ue!==null&&(bn=Math.max(bn,Ue.start*Bt),On=Math.min(On,(Ue.start+Ue.count)*Bt)),ft!==null?(bn=Math.max(bn,0),On=Math.min(On,ft.count)):Mt!=null&&(bn=Math.max(bn,0),On=Math.min(On,Mt.count));let Xr=On-bn;if(Xr<0||Xr===1/0)return;Xn.setup(le,be,lt,me,ft);let Mr,An=pt;if(ft!==null&&(Mr=fe.get(ft),An=dn,An.setIndex(Mr)),le.isMesh)be.wireframe===!0?(B.setLineWidth(be.wireframeLinewidth*Xe()),An.setMode($.LINES)):An.setMode($.TRIANGLES);else if(le.isLine){let Ct=be.linewidth;Ct===void 0&&(Ct=1),B.setLineWidth(Ct*Xe()),le.isLineSegments?An.setMode($.LINES):le.isLineLoop?An.setMode($.LINE_LOOP):An.setMode($.LINE_STRIP)}else le.isPoints?An.setMode($.POINTS):le.isSprite&&An.setMode($.TRIANGLES);if(le.isBatchedMesh)if(le._multiDrawInstances!==null)An.renderMultiDrawInstances(le._multiDrawStarts,le._multiDrawCounts,le._multiDrawCount,le._multiDrawInstances);else if(C.get("WEBGL_multi_draw"))An.renderMultiDraw(le._multiDrawStarts,le._multiDrawCounts,le._multiDrawCount);else{let Ct=le._multiDrawStarts,ki=le._multiDrawCounts,Dn=le._multiDrawCount,Ys=ft?fe.get(ft).bytesPerElement:1,dm=q.get(be).currentProgram.getUniforms();for(let Aa=0;Aa<Dn;Aa++)dm.setValue($,"_gl_DrawID",Aa),An.render(Ct[Aa]/Ys,ki[Aa])}else if(le.isInstancedMesh)An.renderInstances(bn,Xr,le.count);else if(me.isInstancedBufferGeometry){let Ct=me._maxInstanceCount!==void 0?me._maxInstanceCount:1/0,ki=Math.min(me.instanceCount,Ct);An.renderInstances(bn,Xr,ki)}else An.render(bn,Xr)};function Bn(j,ae,me){j.transparent===!0&&j.side===Si&&j.forceSinglePass===!1?(j.side=zi,j.needsUpdate=!0,oS(j,ae,me),j.side=ua,j.needsUpdate=!0,oS(j,ae,me),j.side=Si):oS(j,ae,me)}this.compile=function(j,ae,me=null){me===null&&(me=j),y=ln.get(me),y.init(ae),v.push(y),me.traverseVisible(function(le){le.isLight&&le.layers.test(ae.layers)&&(y.pushLight(le),le.castShadow&&y.pushShadow(le))}),j!==me&&j.traverseVisible(function(le){le.isLight&&le.layers.test(ae.layers)&&(y.pushLight(le),le.castShadow&&y.pushShadow(le))}),y.setupLights();let be=new Set;return j.traverse(function(le){if(!(le.isMesh||le.isPoints||le.isLine||le.isSprite))return;let Ue=le.material;if(Ue)if(Array.isArray(Ue))for(let Qe=0;Qe<Ue.length;Qe++){let lt=Ue[Qe];Bn(lt,me,le),be.add(lt)}else Bn(Ue,me,le),be.add(Ue)}),v.pop(),y=null,be},this.compileAsync=function(j,ae,me=null){let be=this.compile(j,ae,me);return new Promise(le=>{function Ue(){if(be.forEach(function(Qe){q.get(Qe).currentProgram.isReady()&&be.delete(Qe)}),be.size===0){le(j);return}setTimeout(Ue,10)}C.get("KHR_parallel_shader_compile")!==null?Ue():setTimeout(Ue,10)})};let Xs=null;function Wc(j){Xs&&Xs(j)}function CU(){Ud.stop()}function TU(){Ud.start()}let Ud=new LX;Ud.setAnimationLoop(Wc),typeof self<"u"&&Ud.setContext(self),this.setAnimationLoop=function(j){Xs=j,_e.setAnimationLoop(j),j===null?Ud.stop():Ud.start()},_e.addEventListener("sessionstart",CU),_e.addEventListener("sessionend",TU),this.render=function(j,ae){if(ae!==void 0&&ae.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(w===!0)return;if(j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),ae.parent===null&&ae.matrixWorldAutoUpdate===!0&&ae.updateMatrixWorld(),_e.enabled===!0&&_e.isPresenting===!0&&(_e.cameraAutoUpdate===!0&&_e.updateCamera(ae),ae=_e.getCamera()),j.isScene===!0&&j.onBeforeRender(x,j,ae,E),y=ln.get(j,v.length),y.init(ae),v.push(y),we.multiplyMatrices(ae.projectionMatrix,ae.matrixWorldInverse),te.setFromProjectionMatrix(we),ve=this.localClippingEnabled,ue=Ve.init(this.clippingPlanes,ve),g=nt.get(j,b.length),g.init(),b.push(g),_e.enabled===!0&&_e.isPresenting===!0){let Ue=x.xr.getDepthSensingMesh();Ue!==null&&Uk(Ue,ae,-1/0,x.sortObjects)}Uk(j,ae,0,x.sortObjects),g.finish(),x.sortObjects===!0&&g.sort(Q,ce),Pe=_e.enabled===!1||_e.isPresenting===!1||_e.hasDepthSensing()===!1,Pe&&Lt.addToRenderList(g,j),this.info.render.frame++,ue===!0&&Ve.beginShadows();let me=y.state.shadowsArray;dt.render(me,j,ae),ue===!0&&Ve.endShadows(),this.info.autoReset===!0&&this.info.reset();let be=g.opaque,le=g.transmissive;if(y.setupLights(),ae.isArrayCamera){let Ue=ae.cameras;if(le.length>0)for(let Qe=0,lt=Ue.length;Qe<lt;Qe++){let ft=Ue[Qe];IU(be,le,j,ft)}Pe&&Lt.render(j);for(let Qe=0,lt=Ue.length;Qe<lt;Qe++){let ft=Ue[Qe];kU(g,j,ft,ft.viewport)}}else le.length>0&&IU(be,le,j,ae),Pe&&Lt.render(j),kU(g,j,ae);E!==null&&A===0&&(F.updateMultisampleRenderTarget(E),F.updateRenderTargetMipmap(E)),j.isScene===!0&&j.onAfterRender(x,j,ae),Xn.resetDefaultState(),S=-1,M=null,v.pop(),v.length>0?(y=v[v.length-1],ue===!0&&Ve.setGlobalState(x.clippingPlanes,y.state.camera)):y=null,b.pop(),b.length>0?g=b[b.length-1]:g=null};function Uk(j,ae,me,be){if(j.visible===!1)return;if(j.layers.test(ae.layers)){if(j.isGroup)me=j.renderOrder;else if(j.isLOD)j.autoUpdate===!0&&j.update(ae);else if(j.isLight)y.pushLight(j),j.castShadow&&y.pushShadow(j);else if(j.isSprite){if(!j.frustumCulled||te.intersectsSprite(j)){be&&Ee.setFromMatrixPosition(j.matrixWorld).applyMatrix4(we);let Qe=ye.update(j),lt=j.material;lt.visible&&g.push(j,Qe,lt,me,Ee.z,null)}}else if((j.isMesh||j.isLine||j.isPoints)&&(!j.frustumCulled||te.intersectsObject(j))){let Qe=ye.update(j),lt=j.material;if(be&&(j.boundingSphere!==void 0?(j.boundingSphere===null&&j.computeBoundingSphere(),Ee.copy(j.boundingSphere.center)):(Qe.boundingSphere===null&&Qe.computeBoundingSphere(),Ee.copy(Qe.boundingSphere.center)),Ee.applyMatrix4(j.matrixWorld).applyMatrix4(we)),Array.isArray(lt)){let ft=Qe.groups;for(let Bt=0,Nt=ft.length;Bt<Nt;Bt++){let Mt=ft[Bt],bn=lt[Mt.materialIndex];bn&&bn.visible&&g.push(j,Qe,bn,me,Ee.z,Mt)}}else lt.visible&&g.push(j,Qe,lt,me,Ee.z,null)}}let Ue=j.children;for(let Qe=0,lt=Ue.length;Qe<lt;Qe++)Uk(Ue[Qe],ae,me,be)}function kU(j,ae,me,be){let le=j.opaque,Ue=j.transmissive,Qe=j.transparent;y.setupLightsView(me),ue===!0&&Ve.setGlobalState(x.clippingPlanes,me),be&&B.viewport(T.copy(be)),le.length>0&&iS(le,ae,me),Ue.length>0&&iS(Ue,ae,me),Qe.length>0&&iS(Qe,ae,me),B.buffers.depth.setTest(!0),B.buffers.depth.setMask(!0),B.buffers.color.setMask(!0),B.setPolygonOffset(!1)}function IU(j,ae,me,be){if((me.isScene===!0?me.overrideMaterial:null)!==null)return;y.state.transmissionRenderTarget[be.id]===void 0&&(y.state.transmissionRenderTarget[be.id]=new Go(1,1,{generateMipmaps:!0,type:C.has("EXT_color_buffer_half_float")||C.has("EXT_color_buffer_float")?Fy:pa,minFilter:td,samples:4,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:wn.workingColorSpace}));let Ue=y.state.transmissionRenderTarget[be.id],Qe=be.viewport||T;Ue.setSize(Qe.z*x.transmissionResolutionScale,Qe.w*x.transmissionResolutionScale);let lt=x.getRenderTarget();x.setRenderTarget(Ue),x.getClearColor(D),z=x.getClearAlpha(),z<1&&x.setClearColor(16777215,.5),x.clear(),Pe&&Lt.render(me);let ft=x.toneMapping;x.toneMapping=$u;let Bt=be.viewport;if(be.viewport!==void 0&&(be.viewport=void 0),y.setupLightsView(be),ue===!0&&Ve.setGlobalState(x.clippingPlanes,be),iS(j,me,be),F.updateMultisampleRenderTarget(Ue),F.updateRenderTargetMipmap(Ue),C.has("WEBGL_multisampled_render_to_texture")===!1){let Nt=!1;for(let Mt=0,bn=ae.length;Mt<bn;Mt++){let On=ae[Mt],Xr=On.object,Mr=On.geometry,An=On.material,Ct=On.group;if(An.side===Si&&Xr.layers.test(be.layers)){let ki=An.side;An.side=zi,An.needsUpdate=!0,LU(Xr,me,be,Mr,An,Ct),An.side=ki,An.needsUpdate=!0,Nt=!0}}Nt===!0&&(F.updateMultisampleRenderTarget(Ue),F.updateRenderTargetMipmap(Ue))}x.setRenderTarget(lt),x.setClearColor(D,z),Bt!==void 0&&(be.viewport=Bt),x.toneMapping=ft}function iS(j,ae,me){let be=ae.isScene===!0?ae.overrideMaterial:null;for(let le=0,Ue=j.length;le<Ue;le++){let Qe=j[le],lt=Qe.object,ft=Qe.geometry,Bt=be===null?Qe.material:be,Nt=Qe.group;lt.layers.test(me.layers)&&LU(lt,ae,me,ft,Bt,Nt)}}function LU(j,ae,me,be,le,Ue){j.onBeforeRender(x,ae,me,be,le,Ue),j.modelViewMatrix.multiplyMatrices(me.matrixWorldInverse,j.matrixWorld),j.normalMatrix.getNormalMatrix(j.modelViewMatrix),le.onBeforeRender(x,ae,me,be,j,Ue),le.transparent===!0&&le.side===Si&&le.forceSinglePass===!1?(le.side=zi,le.needsUpdate=!0,x.renderBufferDirect(me,ae,be,le,j,Ue),le.side=ua,le.needsUpdate=!0,x.renderBufferDirect(me,ae,be,le,j,Ue),le.side=Si):x.renderBufferDirect(me,ae,be,le,j,Ue),j.onAfterRender(x,ae,me,be,le,Ue)}function oS(j,ae,me){ae.isScene!==!0&&(ae=Oe);let be=q.get(j),le=y.state.lights,Ue=y.state.shadowsArray,Qe=le.state.version,lt=Re.getParameters(j,le.state,Ue,ae,me),ft=Re.getProgramCacheKey(lt),Bt=be.programs;be.environment=j.isMeshStandardMaterial?ae.environment:null,be.fog=ae.fog,be.envMap=(j.isMeshStandardMaterial?ee:R).get(j.envMap||be.environment),be.envMapRotation=be.environment!==null&&j.envMap===null?ae.environmentRotation:j.envMapRotation,Bt===void 0&&(j.addEventListener("dispose",$t),Bt=new Map,be.programs=Bt);let Nt=Bt.get(ft);if(Nt!==void 0){if(be.currentProgram===Nt&&be.lightsStateVersion===Qe)return DU(j,lt),Nt}else lt.uniforms=Re.getUniforms(j),j.onBeforeCompile(lt,x),Nt=Re.acquireProgram(lt,ft),Bt.set(ft,Nt),be.uniforms=lt.uniforms;let Mt=be.uniforms;return(!j.isShaderMaterial&&!j.isRawShaderMaterial||j.clipping===!0)&&(Mt.clippingPlanes=Ve.uniform),DU(j,lt),be.needsLights=lre(j),be.lightsStateVersion=Qe,be.needsLights&&(Mt.ambientLightColor.value=le.state.ambient,Mt.lightProbe.value=le.state.probe,Mt.directionalLights.value=le.state.directional,Mt.directionalLightShadows.value=le.state.directionalShadow,Mt.spotLights.value=le.state.spot,Mt.spotLightShadows.value=le.state.spotShadow,Mt.rectAreaLights.value=le.state.rectArea,Mt.ltc_1.value=le.state.rectAreaLTC1,Mt.ltc_2.value=le.state.rectAreaLTC2,Mt.pointLights.value=le.state.point,Mt.pointLightShadows.value=le.state.pointShadow,Mt.hemisphereLights.value=le.state.hemi,Mt.directionalShadowMap.value=le.state.directionalShadowMap,Mt.directionalShadowMatrix.value=le.state.directionalShadowMatrix,Mt.spotShadowMap.value=le.state.spotShadowMap,Mt.spotLightMatrix.value=le.state.spotLightMatrix,Mt.spotLightMap.value=le.state.spotLightMap,Mt.pointShadowMap.value=le.state.pointShadowMap,Mt.pointShadowMatrix.value=le.state.pointShadowMatrix),be.currentProgram=Nt,be.uniformsList=null,Nt}function OU(j){if(j.uniformsList===null){let ae=j.currentProgram.getUniforms();j.uniformsList=Uy.seqWithValue(ae.seq,j.uniforms)}return j.uniformsList}function DU(j,ae){let me=q.get(j);me.outputColorSpace=ae.outputColorSpace,me.batching=ae.batching,me.batchingColor=ae.batchingColor,me.instancing=ae.instancing,me.instancingColor=ae.instancingColor,me.instancingMorph=ae.instancingMorph,me.skinning=ae.skinning,me.morphTargets=ae.morphTargets,me.morphNormals=ae.morphNormals,me.morphColors=ae.morphColors,me.morphTargetsCount=ae.morphTargetsCount,me.numClippingPlanes=ae.numClippingPlanes,me.numIntersection=ae.numClipIntersection,me.vertexAlphas=ae.vertexAlphas,me.vertexTangents=ae.vertexTangents,me.toneMapping=ae.toneMapping}function are(j,ae,me,be,le){ae.isScene!==!0&&(ae=Oe),F.resetTextureUnits();let Ue=ae.fog,Qe=be.isMeshStandardMaterial?ae.environment:null,lt=E===null?x.outputColorSpace:E.isXRRenderTarget===!0?E.texture.colorSpace:Qp,ft=(be.isMeshStandardMaterial?ee:R).get(be.envMap||Qe),Bt=be.vertexColors===!0&&!!me.attributes.color&&me.attributes.color.itemSize===4,Nt=!!me.attributes.tangent&&(!!be.normalMap||be.anisotropy>0),Mt=!!me.morphAttributes.position,bn=!!me.morphAttributes.normal,On=!!me.morphAttributes.color,Xr=$u;be.toneMapped&&(E===null||E.isXRRenderTarget===!0)&&(Xr=x.toneMapping);let Mr=me.morphAttributes.position||me.morphAttributes.normal||me.morphAttributes.color,An=Mr!==void 0?Mr.length:0,Ct=q.get(be),ki=y.state.lights;if(ue===!0&&(ve===!0||j!==M)){let Co=j===M&&be.id===S;Ve.setState(be,j,Co)}let Dn=!1;be.version===Ct.__version?(Ct.needsLights&&Ct.lightsStateVersion!==ki.state.version||Ct.outputColorSpace!==lt||le.isBatchedMesh&&Ct.batching===!1||!le.isBatchedMesh&&Ct.batching===!0||le.isBatchedMesh&&Ct.batchingColor===!0&&le.colorTexture===null||le.isBatchedMesh&&Ct.batchingColor===!1&&le.colorTexture!==null||le.isInstancedMesh&&Ct.instancing===!1||!le.isInstancedMesh&&Ct.instancing===!0||le.isSkinnedMesh&&Ct.skinning===!1||!le.isSkinnedMesh&&Ct.skinning===!0||le.isInstancedMesh&&Ct.instancingColor===!0&&le.instanceColor===null||le.isInstancedMesh&&Ct.instancingColor===!1&&le.instanceColor!==null||le.isInstancedMesh&&Ct.instancingMorph===!0&&le.morphTexture===null||le.isInstancedMesh&&Ct.instancingMorph===!1&&le.morphTexture!==null||Ct.envMap!==ft||be.fog===!0&&Ct.fog!==Ue||Ct.numClippingPlanes!==void 0&&(Ct.numClippingPlanes!==Ve.numPlanes||Ct.numIntersection!==Ve.numIntersection)||Ct.vertexAlphas!==Bt||Ct.vertexTangents!==Nt||Ct.morphTargets!==Mt||Ct.morphNormals!==bn||Ct.morphColors!==On||Ct.toneMapping!==Xr||Ct.morphTargetsCount!==An)&&(Dn=!0):(Dn=!0,Ct.__version=be.version);let Ys=Ct.currentProgram;Dn===!0&&(Ys=oS(be,ae,le));let dm=!1,Aa=!1,$b=!1,ir=Ys.getUniforms(),ns=Ct.uniforms;if(B.useProgram(Ys.program)&&(dm=!0,Aa=!0,$b=!0),be.id!==S&&(S=be.id,Aa=!0),dm||M!==j){B.buffers.depth.getReversed()?(se.copy(j.projectionMatrix),tX(se),nX(se),ir.setValue($,"projectionMatrix",se)):ir.setValue($,"projectionMatrix",j.projectionMatrix),ir.setValue($,"viewMatrix",j.matrixWorldInverse);let Qo=ir.map.cameraPosition;Qo!==void 0&&Qo.setValue($,pe.setFromMatrixPosition(j.matrixWorld)),I.logarithmicDepthBuffer&&ir.setValue($,"logDepthBufFC",2/(Math.log(j.far+1)/Math.LN2)),(be.isMeshPhongMaterial||be.isMeshToonMaterial||be.isMeshLambertMaterial||be.isMeshBasicMaterial||be.isMeshStandardMaterial||be.isShaderMaterial)&&ir.setValue($,"isOrthographic",j.isOrthographicCamera===!0),M!==j&&(M=j,Aa=!0,$b=!0)}if(le.isSkinnedMesh){ir.setOptional($,le,"bindMatrix"),ir.setOptional($,le,"bindMatrixInverse");let Co=le.skeleton;Co&&(Co.boneTexture===null&&Co.computeBoneTexture(),ir.setValue($,"boneTexture",Co.boneTexture,F))}le.isBatchedMesh&&(ir.setOptional($,le,"batchingTexture"),ir.setValue($,"batchingTexture",le._matricesTexture,F),ir.setOptional($,le,"batchingIdTexture"),ir.setValue($,"batchingIdTexture",le._indirectTexture,F),ir.setOptional($,le,"batchingColorTexture"),le._colorsTexture!==null&&ir.setValue($,"batchingColorTexture",le._colorsTexture,F));let rs=me.morphAttributes;if((rs.position!==void 0||rs.normal!==void 0||rs.color!==void 0)&&Rt.update(le,me,Ys),(Aa||Ct.receiveShadow!==le.receiveShadow)&&(Ct.receiveShadow=le.receiveShadow,ir.setValue($,"receiveShadow",le.receiveShadow)),be.isMeshGouraudMaterial&&be.envMap!==null&&(ns.envMap.value=ft,ns.flipEnvMap.value=ft.isCubeTexture&&ft.isRenderTargetTexture===!1?-1:1),be.isMeshStandardMaterial&&be.envMap===null&&ae.environment!==null&&(ns.envMapIntensity.value=ae.environmentIntensity),Aa&&(ir.setValue($,"toneMappingExposure",x.toneMappingExposure),Ct.needsLights&&sre(ns,$b),Ue&&be.fog===!0&&Te.refreshFogUniforms(ns,Ue),Te.refreshMaterialUniforms(ns,be,X,J,y.state.transmissionRenderTarget[j.id]),Uy.upload($,OU(Ct),ns,F)),be.isShaderMaterial&&be.uniformsNeedUpdate===!0&&(Uy.upload($,OU(Ct),ns,F),be.uniformsNeedUpdate=!1),be.isSpriteMaterial&&ir.setValue($,"center",le.center),ir.setValue($,"modelViewMatrix",le.modelViewMatrix),ir.setValue($,"normalMatrix",le.normalMatrix),ir.setValue($,"modelMatrix",le.matrixWorld),be.isShaderMaterial||be.isRawShaderMaterial){let Co=be.uniformsGroups;for(let Qo=0,jk=Co.length;Qo<jk;Qo++){let jd=Co[Qo];re.update(jd,Ys),re.bind(jd,Ys)}}return Ys}function sre(j,ae){j.ambientLightColor.needsUpdate=ae,j.lightProbe.needsUpdate=ae,j.directionalLights.needsUpdate=ae,j.directionalLightShadows.needsUpdate=ae,j.pointLights.needsUpdate=ae,j.pointLightShadows.needsUpdate=ae,j.spotLights.needsUpdate=ae,j.spotLightShadows.needsUpdate=ae,j.rectAreaLights.needsUpdate=ae,j.hemisphereLights.needsUpdate=ae}function lre(j){return j.isMeshLambertMaterial||j.isMeshToonMaterial||j.isMeshPhongMaterial||j.isMeshStandardMaterial||j.isShadowMaterial||j.isShaderMaterial&&j.lights===!0}this.getActiveCubeFace=function(){return _},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return E},this.setRenderTargetTextures=function(j,ae,me){q.get(j.texture).__webglTexture=ae,q.get(j.depthTexture).__webglTexture=me;let be=q.get(j);be.__hasExternalTextures=!0,be.__autoAllocateDepthBuffer=me===void 0,be.__autoAllocateDepthBuffer||C.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),be.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(j,ae){let me=q.get(j);me.__webglFramebuffer=ae,me.__useDefaultFramebuffer=ae===void 0};let cre=$.createFramebuffer();this.setRenderTarget=function(j,ae=0,me=0){E=j,_=ae,A=me;let be=!0,le=null,Ue=!1,Qe=!1;if(j){let ft=q.get(j);if(ft.__useDefaultFramebuffer!==void 0)B.bindFramebuffer($.FRAMEBUFFER,null),be=!1;else if(ft.__webglFramebuffer===void 0)F.setupRenderTarget(j);else if(ft.__hasExternalTextures)F.rebindTextures(j,q.get(j.texture).__webglTexture,q.get(j.depthTexture).__webglTexture);else if(j.depthBuffer){let Mt=j.depthTexture;if(ft.__boundDepthTexture!==Mt){if(Mt!==null&&q.has(Mt)&&(j.width!==Mt.image.width||j.height!==Mt.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");F.setupDepthRenderbuffer(j)}}let Bt=j.texture;(Bt.isData3DTexture||Bt.isDataArrayTexture||Bt.isCompressedArrayTexture)&&(Qe=!0);let Nt=q.get(j).__webglFramebuffer;j.isWebGLCubeRenderTarget?(Array.isArray(Nt[ae])?le=Nt[ae][me]:le=Nt[ae],Ue=!0):j.samples>0&&F.useMultisampledRTT(j)===!1?le=q.get(j).__webglMultisampledFramebuffer:Array.isArray(Nt)?le=Nt[me]:le=Nt,T.copy(j.viewport),L.copy(j.scissor),O=j.scissorTest}else T.copy(H).multiplyScalar(X).floor(),L.copy(de).multiplyScalar(X).floor(),O=Se;if(me!==0&&(le=cre),B.bindFramebuffer($.FRAMEBUFFER,le)&&be&&B.drawBuffers(j,le),B.viewport(T),B.scissor(L),B.setScissorTest(O),Ue){let ft=q.get(j.texture);$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_CUBE_MAP_POSITIVE_X+ae,ft.__webglTexture,me)}else if(Qe){let ft=q.get(j.texture),Bt=ae;$.framebufferTextureLayer($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,ft.__webglTexture,me,Bt)}else if(j!==null&&me!==0){let ft=q.get(j.texture);$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,ft.__webglTexture,me)}S=-1},this.readRenderTargetPixels=function(j,ae,me,be,le,Ue,Qe){if(!(j&&j.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let lt=q.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&Qe!==void 0&&(lt=lt[Qe]),lt){B.bindFramebuffer($.FRAMEBUFFER,lt);try{let ft=j.texture,Bt=ft.format,Nt=ft.type;if(!I.textureFormatReadable(Bt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!I.textureTypeReadable(Nt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ae>=0&&ae<=j.width-be&&me>=0&&me<=j.height-le&&$.readPixels(ae,me,be,le,Zt.convert(Bt),Zt.convert(Nt),Ue)}finally{let ft=E!==null?q.get(E).__webglFramebuffer:null;B.bindFramebuffer($.FRAMEBUFFER,ft)}}},this.readRenderTargetPixelsAsync=async function(j,ae,me,be,le,Ue,Qe){if(!(j&&j.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let lt=q.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&Qe!==void 0&&(lt=lt[Qe]),lt){let ft=j.texture,Bt=ft.format,Nt=ft.type;if(!I.textureFormatReadable(Bt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!I.textureTypeReadable(Nt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ae>=0&&ae<=j.width-be&&me>=0&&me<=j.height-le){B.bindFramebuffer($.FRAMEBUFFER,lt);let Mt=$.createBuffer();$.bindBuffer($.PIXEL_PACK_BUFFER,Mt),$.bufferData($.PIXEL_PACK_BUFFER,Ue.byteLength,$.STREAM_READ),$.readPixels(ae,me,be,le,Zt.convert(Bt),Zt.convert(Nt),0);let bn=E!==null?q.get(E).__webglFramebuffer:null;B.bindFramebuffer($.FRAMEBUFFER,bn);let On=$.fenceSync($.SYNC_GPU_COMMANDS_COMPLETE,0);return $.flush(),await eX($,On,4),$.bindBuffer($.PIXEL_PACK_BUFFER,Mt),$.getBufferSubData($.PIXEL_PACK_BUFFER,0,Ue),$.deleteBuffer(Mt),$.deleteSync(On),Ue}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(j,ae=null,me=0){j.isTexture!==!0&&(hf("WebGLRenderer: copyFramebufferToTexture function signature has changed."),ae=arguments[0]||null,j=arguments[1]);let be=Math.pow(2,-me),le=Math.floor(j.image.width*be),Ue=Math.floor(j.image.height*be),Qe=ae!==null?ae.x:0,lt=ae!==null?ae.y:0;F.setTexture2D(j,0),$.copyTexSubImage2D($.TEXTURE_2D,me,0,0,Qe,lt,le,Ue),B.unbindTexture()};let ure=$.createFramebuffer(),hre=$.createFramebuffer();this.copyTextureToTexture=function(j,ae,me=null,be=null,le=0,Ue=null){j.isTexture!==!0&&(hf("WebGLRenderer: copyTextureToTexture function signature has changed."),be=arguments[0]||null,j=arguments[1],ae=arguments[2],Ue=arguments[3]||0,me=null),Ue===null&&(le!==0?(hf("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Ue=le,le=0):Ue=0);let Qe,lt,ft,Bt,Nt,Mt,bn,On,Xr,Mr=j.isCompressedTexture?j.mipmaps[Ue]:j.image;if(me!==null)Qe=me.max.x-me.min.x,lt=me.max.y-me.min.y,ft=me.isBox3?me.max.z-me.min.z:1,Bt=me.min.x,Nt=me.min.y,Mt=me.isBox3?me.min.z:0;else{let rs=Math.pow(2,-le);Qe=Math.floor(Mr.width*rs),lt=Math.floor(Mr.height*rs),j.isDataArrayTexture?ft=Mr.depth:j.isData3DTexture?ft=Math.floor(Mr.depth*rs):ft=1,Bt=0,Nt=0,Mt=0}be!==null?(bn=be.x,On=be.y,Xr=be.z):(bn=0,On=0,Xr=0);let An=Zt.convert(ae.format),Ct=Zt.convert(ae.type),ki;ae.isData3DTexture?(F.setTexture3D(ae,0),ki=$.TEXTURE_3D):ae.isDataArrayTexture||ae.isCompressedArrayTexture?(F.setTexture2DArray(ae,0),ki=$.TEXTURE_2D_ARRAY):(F.setTexture2D(ae,0),ki=$.TEXTURE_2D),$.pixelStorei($.UNPACK_FLIP_Y_WEBGL,ae.flipY),$.pixelStorei($.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ae.premultiplyAlpha),$.pixelStorei($.UNPACK_ALIGNMENT,ae.unpackAlignment);let Dn=$.getParameter($.UNPACK_ROW_LENGTH),Ys=$.getParameter($.UNPACK_IMAGE_HEIGHT),dm=$.getParameter($.UNPACK_SKIP_PIXELS),Aa=$.getParameter($.UNPACK_SKIP_ROWS),$b=$.getParameter($.UNPACK_SKIP_IMAGES);$.pixelStorei($.UNPACK_ROW_LENGTH,Mr.width),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,Mr.height),$.pixelStorei($.UNPACK_SKIP_PIXELS,Bt),$.pixelStorei($.UNPACK_SKIP_ROWS,Nt),$.pixelStorei($.UNPACK_SKIP_IMAGES,Mt);let ir=j.isDataArrayTexture||j.isData3DTexture,ns=ae.isDataArrayTexture||ae.isData3DTexture;if(j.isDepthTexture){let rs=q.get(j),Co=q.get(ae),Qo=q.get(rs.__renderTarget),jk=q.get(Co.__renderTarget);B.bindFramebuffer($.READ_FRAMEBUFFER,Qo.__webglFramebuffer),B.bindFramebuffer($.DRAW_FRAMEBUFFER,jk.__webglFramebuffer);for(let jd=0;jd<ft;jd++)ir&&($.framebufferTextureLayer($.READ_FRAMEBUFFER,$.COLOR_ATTACHMENT0,q.get(j).__webglTexture,le,Mt+jd),$.framebufferTextureLayer($.DRAW_FRAMEBUFFER,$.COLOR_ATTACHMENT0,q.get(ae).__webglTexture,Ue,Xr+jd)),$.blitFramebuffer(Bt,Nt,Qe,lt,bn,On,Qe,lt,$.DEPTH_BUFFER_BIT,$.NEAREST);B.bindFramebuffer($.READ_FRAMEBUFFER,null),B.bindFramebuffer($.DRAW_FRAMEBUFFER,null)}else if(le!==0||j.isRenderTargetTexture||q.has(j)){let rs=q.get(j),Co=q.get(ae);B.bindFramebuffer($.READ_FRAMEBUFFER,ure),B.bindFramebuffer($.DRAW_FRAMEBUFFER,hre);for(let Qo=0;Qo<ft;Qo++)ir?$.framebufferTextureLayer($.READ_FRAMEBUFFER,$.COLOR_ATTACHMENT0,rs.__webglTexture,le,Mt+Qo):$.framebufferTexture2D($.READ_FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,rs.__webglTexture,le),ns?$.framebufferTextureLayer($.DRAW_FRAMEBUFFER,$.COLOR_ATTACHMENT0,Co.__webglTexture,Ue,Xr+Qo):$.framebufferTexture2D($.DRAW_FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,Co.__webglTexture,Ue),le!==0?$.blitFramebuffer(Bt,Nt,Qe,lt,bn,On,Qe,lt,$.COLOR_BUFFER_BIT,$.NEAREST):ns?$.copyTexSubImage3D(ki,Ue,bn,On,Xr+Qo,Bt,Nt,Qe,lt):$.copyTexSubImage2D(ki,Ue,bn,On,Bt,Nt,Qe,lt);B.bindFramebuffer($.READ_FRAMEBUFFER,null),B.bindFramebuffer($.DRAW_FRAMEBUFFER,null)}else ns?j.isDataTexture||j.isData3DTexture?$.texSubImage3D(ki,Ue,bn,On,Xr,Qe,lt,ft,An,Ct,Mr.data):ae.isCompressedArrayTexture?$.compressedTexSubImage3D(ki,Ue,bn,On,Xr,Qe,lt,ft,An,Mr.data):$.texSubImage3D(ki,Ue,bn,On,Xr,Qe,lt,ft,An,Ct,Mr):j.isDataTexture?$.texSubImage2D($.TEXTURE_2D,Ue,bn,On,Qe,lt,An,Ct,Mr.data):j.isCompressedTexture?$.compressedTexSubImage2D($.TEXTURE_2D,Ue,bn,On,Mr.width,Mr.height,An,Mr.data):$.texSubImage2D($.TEXTURE_2D,Ue,bn,On,Qe,lt,An,Ct,Mr);$.pixelStorei($.UNPACK_ROW_LENGTH,Dn),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,Ys),$.pixelStorei($.UNPACK_SKIP_PIXELS,dm),$.pixelStorei($.UNPACK_SKIP_ROWS,Aa),$.pixelStorei($.UNPACK_SKIP_IMAGES,$b),Ue===0&&ae.generateMipmaps&&$.generateMipmap(ki),B.unbindTexture()},this.copyTextureToTexture3D=function(j,ae,me=null,be=null,le=0){return j.isTexture!==!0&&(hf("WebGLRenderer: copyTextureToTexture3D function signature has changed."),me=arguments[0]||null,be=arguments[1]||null,j=arguments[2],ae=arguments[3],le=arguments[4]||0),hf('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(j,ae,me,be,le)},this.initRenderTarget=function(j){q.get(j).__webglFramebuffer===void 0&&F.setupRenderTarget(j)},this.initTexture=function(j){j.isCubeTexture?F.setTextureCube(j,0):j.isData3DTexture?F.setTexture3D(j,0):j.isDataArrayTexture||j.isCompressedArrayTexture?F.setTexture2DArray(j,0):F.setTexture2D(j,0),B.unbindTexture()},this.resetState=function(){_=0,A=0,E=null,B.reset(),Xn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return uc}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorspace=wn._getDrawingBufferColorSpace(e),t.unpackColorSpace=wn._getUnpackColorSpace()}};We.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new Le(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Ho.line={uniforms:pf.merge([We.common,We.fog,We.line]),vertexShader:`
  3743. #include <common>
  3744. #include <color_pars_vertex>
  3745. #include <fog_pars_vertex>
  3746. #include <logdepthbuf_pars_vertex>
  3747. #include <clipping_planes_pars_vertex>
  3748. uniform float linewidth;
  3749. uniform vec2 resolution;
  3750. attribute vec3 instanceStart;
  3751. attribute vec3 instanceEnd;
  3752. attribute vec3 instanceColorStart;
  3753. attribute vec3 instanceColorEnd;
  3754. #ifdef WORLD_UNITS
  3755. varying vec4 worldPos;
  3756. varying vec3 worldStart;
  3757. varying vec3 worldEnd;
  3758. #ifdef USE_DASH
  3759. varying vec2 vUv;
  3760. #endif
  3761. #else
  3762. varying vec2 vUv;
  3763. #endif
  3764. #ifdef USE_DASH
  3765. uniform float dashScale;
  3766. attribute float instanceDistanceStart;
  3767. attribute float instanceDistanceEnd;
  3768. varying float vLineDistance;
  3769. #endif
  3770. void trimSegment( const in vec4 start, inout vec4 end ) {
  3771. // trim end segment so it terminates between the camera plane and the near plane
  3772. // conservative estimate of the near plane
  3773. float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
  3774. float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
  3775. float nearEstimate = - 0.5 * b / a;
  3776. float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
  3777. end.xyz = mix( start.xyz, end.xyz, alpha );
  3778. }
  3779. void main() {
  3780. #ifdef USE_COLOR
  3781. vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
  3782. #endif
  3783. #ifdef USE_DASH
  3784. vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
  3785. vUv = uv;
  3786. #endif
  3787. float aspect = resolution.x / resolution.y;
  3788. // camera space
  3789. vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
  3790. vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
  3791. #ifdef WORLD_UNITS
  3792. worldStart = start.xyz;
  3793. worldEnd = end.xyz;
  3794. #else
  3795. vUv = uv;
  3796. #endif
  3797. // special case for perspective projection, and segments that terminate either in, or behind, the camera plane
  3798. // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
  3799. // but we need to perform ndc-space calculations in the shader, so we must address this issue directly
  3800. // perhaps there is a more elegant solution -- WestLangley
  3801. bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
  3802. if ( perspective ) {
  3803. if ( start.z < 0.0 && end.z >= 0.0 ) {
  3804. trimSegment( start, end );
  3805. } else if ( end.z < 0.0 && start.z >= 0.0 ) {
  3806. trimSegment( end, start );
  3807. }
  3808. }
  3809. // clip space
  3810. vec4 clipStart = projectionMatrix * start;
  3811. vec4 clipEnd = projectionMatrix * end;
  3812. // ndc space
  3813. vec3 ndcStart = clipStart.xyz / clipStart.w;
  3814. vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
  3815. // direction
  3816. vec2 dir = ndcEnd.xy - ndcStart.xy;
  3817. // account for clip-space aspect ratio
  3818. dir.x *= aspect;
  3819. dir = normalize( dir );
  3820. #ifdef WORLD_UNITS
  3821. vec3 worldDir = normalize( end.xyz - start.xyz );
  3822. vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) );
  3823. vec3 worldUp = normalize( cross( worldDir, tmpFwd ) );
  3824. vec3 worldFwd = cross( worldDir, worldUp );
  3825. worldPos = position.y < 0.5 ? start: end;
  3826. // height offset
  3827. float hw = linewidth * 0.5;
  3828. worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp;
  3829. // don't extend the line if we're rendering dashes because we
  3830. // won't be rendering the endcaps
  3831. #ifndef USE_DASH
  3832. // cap extension
  3833. worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir;
  3834. // add width to the box
  3835. worldPos.xyz += worldFwd * hw;
  3836. // endcaps
  3837. if ( position.y > 1.0 || position.y < 0.0 ) {
  3838. worldPos.xyz -= worldFwd * 2.0 * hw;
  3839. }
  3840. #endif
  3841. // project the worldpos
  3842. vec4 clip = projectionMatrix * worldPos;
  3843. // shift the depth of the projected points so the line
  3844. // segments overlap neatly
  3845. vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
  3846. clip.z = clipPose.z * clip.w;
  3847. #else
  3848. vec2 offset = vec2( dir.y, - dir.x );
  3849. // undo aspect ratio adjustment
  3850. dir.x /= aspect;
  3851. offset.x /= aspect;
  3852. // sign flip
  3853. if ( position.x < 0.0 ) offset *= - 1.0;
  3854. // endcaps
  3855. if ( position.y < 0.0 ) {
  3856. offset += - dir;
  3857. } else if ( position.y > 1.0 ) {
  3858. offset += dir;
  3859. }
  3860. // adjust for linewidth
  3861. offset *= linewidth;
  3862. // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
  3863. offset /= resolution.y;
  3864. // select end
  3865. vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
  3866. // back to clip space
  3867. offset *= clip.w;
  3868. clip.xy += offset;
  3869. #endif
  3870. gl_Position = clip;
  3871. vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
  3872. #include <logdepthbuf_vertex>
  3873. #include <clipping_planes_vertex>
  3874. #include <fog_vertex>
  3875. }
  3876. `,fragmentShader:`
  3877. uniform vec3 diffuse;
  3878. uniform float opacity;
  3879. uniform float linewidth;
  3880. #ifdef USE_DASH
  3881. uniform float dashOffset;
  3882. uniform float dashSize;
  3883. uniform float gapSize;
  3884. #endif
  3885. varying float vLineDistance;
  3886. #ifdef WORLD_UNITS
  3887. varying vec4 worldPos;
  3888. varying vec3 worldStart;
  3889. varying vec3 worldEnd;
  3890. #ifdef USE_DASH
  3891. varying vec2 vUv;
  3892. #endif
  3893. #else
  3894. varying vec2 vUv;
  3895. #endif
  3896. #include <common>
  3897. #include <color_pars_fragment>
  3898. #include <fog_pars_fragment>
  3899. #include <logdepthbuf_pars_fragment>
  3900. #include <clipping_planes_pars_fragment>
  3901. vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
  3902. float mua;
  3903. float mub;
  3904. vec3 p13 = p1 - p3;
  3905. vec3 p43 = p4 - p3;
  3906. vec3 p21 = p2 - p1;
  3907. float d1343 = dot( p13, p43 );
  3908. float d4321 = dot( p43, p21 );
  3909. float d1321 = dot( p13, p21 );
  3910. float d4343 = dot( p43, p43 );
  3911. float d2121 = dot( p21, p21 );
  3912. float denom = d2121 * d4343 - d4321 * d4321;
  3913. float numer = d1343 * d4321 - d1321 * d4343;
  3914. mua = numer / denom;
  3915. mua = clamp( mua, 0.0, 1.0 );
  3916. mub = ( d1343 + d4321 * ( mua ) ) / d4343;
  3917. mub = clamp( mub, 0.0, 1.0 );
  3918. return vec2( mua, mub );
  3919. }
  3920. void main() {
  3921. #include <clipping_planes_fragment>
  3922. #ifdef USE_DASH
  3923. if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
  3924. if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
  3925. #endif
  3926. float alpha = opacity;
  3927. #ifdef WORLD_UNITS
  3928. // Find the closest points on the view ray and the line segment
  3929. vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
  3930. vec3 lineDir = worldEnd - worldStart;
  3931. vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
  3932. vec3 p1 = worldStart + lineDir * params.x;
  3933. vec3 p2 = rayEnd * params.y;
  3934. vec3 delta = p1 - p2;
  3935. float len = length( delta );
  3936. float norm = len / linewidth;
  3937. #ifndef USE_DASH
  3938. #ifdef USE_ALPHA_TO_COVERAGE
  3939. float dnorm = fwidth( norm );
  3940. alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
  3941. #else
  3942. if ( norm > 0.5 ) {
  3943. discard;
  3944. }
  3945. #endif
  3946. #endif
  3947. #else
  3948. #ifdef USE_ALPHA_TO_COVERAGE
  3949. // artifacts appear on some hardware if a derivative is taken within a conditional
  3950. float a = vUv.x;
  3951. float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
  3952. float len2 = a * a + b * b;
  3953. float dlen = fwidth( len2 );
  3954. if ( abs( vUv.y ) > 1.0 ) {
  3955. alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
  3956. }
  3957. #else
  3958. if ( abs( vUv.y ) > 1.0 ) {
  3959. float a = vUv.x;
  3960. float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
  3961. float len2 = a * a + b * b;
  3962. if ( len2 > 1.0 ) discard;
  3963. }
  3964. #endif
  3965. #endif
  3966. vec4 diffuseColor = vec4( diffuse, alpha );
  3967. #include <logdepthbuf_fragment>
  3968. #include <color_fragment>
  3969. gl_FragColor = vec4( diffuseColor.rgb, alpha );
  3970. #include <tonemapping_fragment>
  3971. #include <colorspace_fragment>
  3972. #include <fog_fragment>
  3973. #include <premultiplied_alpha_fragment>
  3974. }
  3975. `};var wr=class extends Kn{constructor(e){super({type:"LineMaterial",uniforms:pf.clone(Ho.line.uniforms),vertexShader:Ho.line.vertexShader,fragmentShader:Ho.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}};var FX=new Ne,pE=new U,Ai=class extends $w{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";let e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new Jt(e,3)),this.setAttribute("uv",new Jt(t,2))}applyMatrix4(e){let t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let n=new vl(t,6,1);return this.setAttribute("instanceStart",new sr(n,3,0)),this.setAttribute("instanceEnd",new sr(n,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let n=new vl(t,6,1);return this.setAttribute("instanceColorStart",new sr(n,3,0)),this.setAttribute("instanceColorEnd",new sr(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new Vw(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ne);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),FX.setFromBufferAttribute(t),this.boundingBox.union(FX))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Lr),this.boundingBox===null&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){let n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let o=0,a=e.count;o<a;o++)pE.fromBufferAttribute(e,o),i=Math.max(i,n.distanceToSquared(pE)),pE.fromBufferAttribute(t,o),i=Math.max(i,n.distanceToSquared(pE));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}};var x4=new yn,NX=new U,zX=new U,Ui=new yn,ji=new yn,gc=new yn,w4=new U,_4=new vt,Vi=new Kw,UX=new U,fE=new Ne,mE=new Lr,yc=new yn,bc,bf;function jX(r,e,t){return yc.set(0,0,-e,1).applyMatrix4(r.projectionMatrix),yc.multiplyScalar(1/yc.w),yc.x=bf/t.width,yc.y=bf/t.height,yc.applyMatrix4(r.projectionMatrixInverse),yc.multiplyScalar(1/yc.w),Math.abs(Math.max(yc.x,yc.y))}function fwe(r,e){let t=r.matrixWorld,n=r.geometry,i=n.attributes.instanceStart,o=n.attributes.instanceEnd,a=Math.min(n.instanceCount,i.count);for(let s=0,l=a;s<l;s++){Vi.start.fromBufferAttribute(i,s),Vi.end.fromBufferAttribute(o,s),Vi.applyMatrix4(t);let c=new U,u=new U;bc.distanceSqToSegment(Vi.start,Vi.end,u,c),u.distanceTo(c)<bf*.5&&e.push({point:u,pointOnLine:c,distance:bc.origin.distanceTo(u),object:r,face:null,faceIndex:s,uv:null,uv1:null})}}function mwe(r,e,t){let n=e.projectionMatrix,o=r.material.resolution,a=r.matrixWorld,s=r.geometry,l=s.attributes.instanceStart,c=s.attributes.instanceEnd,u=Math.min(s.instanceCount,l.count),h=-e.near;bc.at(1,gc),gc.w=1,gc.applyMatrix4(e.matrixWorldInverse),gc.applyMatrix4(n),gc.multiplyScalar(1/gc.w),gc.x*=o.x/2,gc.y*=o.y/2,gc.z=0,w4.copy(gc),_4.multiplyMatrices(e.matrixWorldInverse,a);for(let d=0,p=u;d<p;d++){if(Ui.fromBufferAttribute(l,d),ji.fromBufferAttribute(c,d),Ui.w=1,ji.w=1,Ui.applyMatrix4(_4),ji.applyMatrix4(_4),Ui.z>h&&ji.z>h)continue;if(Ui.z>h){let v=Ui.z-ji.z,x=(Ui.z-h)/v;Ui.lerp(ji,x)}else if(ji.z>h){let v=ji.z-Ui.z,x=(ji.z-h)/v;ji.lerp(Ui,x)}Ui.applyMatrix4(n),ji.applyMatrix4(n),Ui.multiplyScalar(1/Ui.w),ji.multiplyScalar(1/ji.w),Ui.x*=o.x/2,Ui.y*=o.y/2,ji.x*=o.x/2,ji.y*=o.y/2,Vi.start.copy(Ui),Vi.start.z=0,Vi.end.copy(ji),Vi.end.z=0;let m=Vi.closestPointToPointParameter(w4,!0);Vi.at(m,UX);let g=uf.lerp(Ui.z,ji.z,m),y=g>=-1&&g<=1,b=w4.distanceTo(UX)<bf*.5;if(y&&b){Vi.start.fromBufferAttribute(l,d),Vi.end.fromBufferAttribute(c,d),Vi.start.applyMatrix4(a),Vi.end.applyMatrix4(a);let v=new U,x=new U;bc.distanceSqToSegment(Vi.start,Vi.end,x,v),t.push({point:x,pointOnLine:v,distance:bc.origin.distanceTo(x),object:r,face:null,faceIndex:d,uv:null,uv1:null})}}}var li=class extends jt{constructor(e=new Ai,t=new wr({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let a=0,s=0,l=t.count;a<l;a++,s+=2)NX.fromBufferAttribute(t,a),zX.fromBufferAttribute(n,a),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+NX.distanceTo(zX);let o=new vl(i,2,1);return e.setAttribute("instanceDistanceStart",new sr(o,1,0)),e.setAttribute("instanceDistanceEnd",new sr(o,1,1)),this}raycast(e,t){let n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');let o=e.params.Line2!==void 0&&e.params.Line2.threshold||0;bc=e.ray;let a=this.matrixWorld,s=this.geometry,l=this.material;bf=l.linewidth+o,s.boundingSphere===null&&s.computeBoundingSphere(),mE.copy(s.boundingSphere).applyMatrix4(a);let c;if(n)c=bf*.5;else{let h=Math.max(i.near,mE.distanceToPoint(bc.origin));c=jX(i,h,l.resolution)}if(mE.radius+=c,bc.intersectsSphere(mE)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),fE.copy(s.boundingBox).applyMatrix4(a);let u;if(n)u=bf*.5;else{let h=Math.max(i.near,fE.distanceToPoint(bc.origin));u=jX(i,h,l.resolution)}fE.expandByScalar(u),bc.intersectsBox(fE)!==!1&&(n?fwe(this,t):mwe(this,i,t))}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(x4),this.material.uniforms.resolution.value.set(x4.z,x4.w))}};var Yt;(function(r){r[r.NONE=0]="NONE",r[r.WORD=1]="WORD",r[r.STACK=2]="STACK",r[r.SPACE=3]="SPACE",r[r.NBSP=4]="NBSP",r[r.TABULATOR=5]="TABULATOR",r[r.NEW_PARAGRAPH=6]="NEW_PARAGRAPH",r[r.NEW_COLUMN=7]="NEW_COLUMN",r[r.WRAP_AT_DIMLINE=8]="WRAP_AT_DIMLINE",r[r.PROPERTIES_CHANGED=9]="PROPERTIES_CHANGED",r[r.PERCENT_SYMBOL=10]="PERCENT_SYMBOL"})(Yt||(Yt={}));var lr;(function(r){r[r.BOTTOM=0]="BOTTOM",r[r.MIDDLE=1]="MIDDLE",r[r.TOP=2]="TOP"})(lr||(lr={}));var Vt;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r[r.CENTER=3]="CENTER",r[r.JUSTIFIED=4]="JUSTIFIED",r[r.DISTRIBUTED=5]="DISTRIBUTED"})(Vt||(Vt={}));var rd;(function(r){r[r.NONE=0]="NONE",r[r.UNDERLINE=1]="UNDERLINE",r[r.OVERLINE=2]="OVERLINE",r[r.STRIKE_THROUGH=4]="STRIKE_THROUGH"})(rd||(rd={}));var gwe={c:"\xD8",d:"\xB0",p:"\xB1","%":"%"},ywe={l:Vt.LEFT,r:Vt.RIGHT,c:Vt.CENTER,j:Vt.JUSTIFIED,d:Vt.DISTRIBUTED};function A4(r){let[e,t,n]=r;return e<<16|t<<8|n}function VX(r){return Math.max(0,Math.min(255,Math.round(r)))}function HX(r){return Math.max(0,Math.min(16777215,Math.round(r)))}function bwe(r){return r===null?null:`#${HX(r).toString(16).padStart(6,"0")}`}function vwe(r){if(!r)return null;let e=r.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(e))return e;if(/^[0-9a-f]{6}$/.test(e))return`#${e}`;if(/^#[0-9a-f]{3}$/.test(e)){let t=e[1],n=e[2],i=e[3];return`#${t}${t}${n}${n}${i}${i}`}if(/^[0-9a-f]{3}$/.test(e)){let t=e[0],n=e[1],i=e[2];return`#${t}${t}${n}${n}${i}${i}`}return null}function xwe(r){if(!r)return null;let e=r.trim().toLowerCase();if(e==="transparent")return null;let t=vwe(e);if(t)return HX(Number.parseInt(t.slice(1),16));let n=e.match(/^rgba?\((.*)\)$/);if(!n)return null;let i=n[1].replace(/\s*\/\s*/g," ").split(/[,\s]+/).map(c=>c.trim()).filter(Boolean);if(i.length<3)return null;let o=c=>{if(c.endsWith("%")){let h=Number.parseFloat(c.slice(0,-1));return VX(h/100*255)}let u=Number.parseFloat(c);return VX(u)},a=o(i[0]),s=o(i[1]),l=o(i[2]);return A4([a,s,l])}function GX(r){let e="";for(let t=0;t<r.length;t++)r[t]==="\\"?(e+="\\\\",r[t+1]==="\\"&&t++):e+=r[t];return e}function wwe(r){if(!r.includes("\\"))return r;let e=/(?<![0-9A-Fa-f+])[A-Za-z]:\\(?![MmUu]\+)[^{}]*/g,t=/\\\\(?![UuMm]\+)[^\\{}]+(?:\\[^{}\\]*)*/g,n=r.replace(e,i=>GX(i));return n=n.replace(t,i=>GX(i)),n}function WX(r,e=!1){let t=new Set,n=/\\[fF](.*?)[;|]/g;return[...r.matchAll(n)].forEach(i=>{let o=i[1].toLowerCase();e&&(o=o.replace(/\.(ttf|otf|woff|shx)$/,"")),t.add(o)}),t}var S4=class{constructor(e){this.stack=[],this.stack.push(e)}push(e){this.stack.push(e)}pop(){if(this.stack.length<=1)return;let e=this.stack.pop(),t=this.stack[this.stack.length-1];return JSON.stringify(t.paragraph)!==JSON.stringify(e.paragraph)&&(t.paragraph={...e.paragraph}),e}get current(){return this.stack[this.stack.length-1]}get depth(){return this.stack.length-1}get root(){return this.stack[0]}setCurrent(e){this.stack[this.stack.length-1]=e}},Vy=class{constructor(e,t,n={}){this.continueStroke=!1,this.inStackContext=!1,this.scanner=new a_(wwe(e));let i=t??new Cs;this.ctxStack=new S4(i),this.yieldPropertyCommands=n.yieldPropertyCommands??!1,this.resetParagraphParameters=n.resetParagraphParameters??!1,this.yieldPercentSymbols=n.yieldPercentSymbols??!1,this.mifDecoder=n.mifDecoder??this.decodeMultiByteChar.bind(this),this.mifCodeLength=n.mifCodeLength??"auto"}decodeMultiByteChar(e){try{if(e.length===5){let t=e[0],n="gbk";t==="1"?n="shift-jis":t==="2"&&(n="big5");let i=new Uint8Array([parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16)]);return new TextDecoder(n).decode(i)}else if(e.length===4){let t=new Uint8Array([parseInt(e.substr(0,2),16),parseInt(e.substr(2,2),16)]),i=new TextDecoder("gbk").decode(t);if(i!=="\u25AF")return i;let a=new TextDecoder("big5").decode(t);if(a!=="\u25AF")return a}return"\u25AF"}catch{return"\u25AF"}}extractMifCode(e){if(e==="auto"){let t=this.scanner.tail.match(/^[0-9A-Fa-f]{5}/)?.[0];if(t)return t;let n=this.scanner.tail.match(/^[0-9A-Fa-f]{4}/)?.[0];return n||null}else return this.scanner.tail.match(new RegExp(`^[0-9A-Fa-f]{${e}}`))?.[0]??null}parseUnicodeEscape(){if(this.scanner.peek()!=="+")return null;this.scanner.consume(1);let e=this.scanner.tail.match(/^[0-9A-Fa-f]{4}/);if(!e)return this.scanner.consume(-1),null;let t=parseInt(e[0],16);if(this.scanner.consume(e[0].length),t>=55296&&t<=56319){let n=this.scanner.tail.match(/^\\U\+([0-9A-Fa-f]{4})/);if(n){let i=parseInt(n[1],16);if(i>=56320&&i<=57343){this.scanner.consume(n[0].length);let o=(t-55296<<10)+(i-56320)+65536;try{return String.fromCodePoint(o)}catch{return"\u25AF"}}}}return String.fromCharCode(t)}pushCtx(){this.ctxStack.push(this.ctxStack.current)}popCtx(){this.ctxStack.pop()}parseStacking(){let e=new a_(this.extractExpression(!0)),t="",n="",i="",o=()=>{let l=e.peek(),c=!1;return l.charCodeAt(0)<32&&(l=" "),l==="\\"&&(c=!0,e.consume(1),l=e.peek()),e.consume(1),[l,c]},a=()=>{let l="";for(;e.hasData;){let[c,u]=o();if(!u&&(c==="/"||c==="#"||c==="^"))return[l,c];l+=c}return[l,""]},s=l=>{let c="",u=l;for(;e.hasData;){let[h,d]=o();if(!(u&&h===" ")){if(u=!1,!d&&h===";")break;c+=h}}return c};return[t,i]=a(),i&&(n=s(i==="^")),t===""&&n.includes("I/")?[Yt.STACK,[" "," ","/"]]:i==="^"?[Yt.STACK,[t,n,"^"]]:[Yt.STACK,[t,n,i]]}parseProperties(e){let t=this.ctxStack.current.copy(),n=this.ctxStack.current.copy();switch(e){case"L":n.underline=!0,this.continueStroke=!0;break;case"l":n.underline=!1,n.hasAnyStroke||(this.continueStroke=!1);break;case"O":n.overline=!0,this.continueStroke=!0;break;case"o":n.overline=!1,n.hasAnyStroke||(this.continueStroke=!1);break;case"K":n.strikeThrough=!0,this.continueStroke=!0;break;case"k":n.strikeThrough=!1,n.hasAnyStroke||(this.continueStroke=!1);break;case"A":this.parseAlign(n);break;case"C":this.parseAciColor(n);break;case"c":this.parseRgbColor(n);break;case"H":this.parseHeight(n);break;case"W":this.parseWidth(n);break;case"Q":this.parseOblique(n);break;case"T":this.parseCharTracking(n);break;case"p":this.parseParagraphProperties(n);break;case"f":case"F":this.parseFontProperties(n);break;default:throw new Error(`Unknown command: ${e}`)}if(this.continueStroke=n.hasAnyStroke,n.continueStroke=this.continueStroke,this.ctxStack.setCurrent(n),this.yieldPropertyCommands){let i=this.getPropertyChanges(t,n);if(Object.keys(i).length>0)return{command:e,changes:i,depth:this.ctxStack.depth}}}getPropertyChanges(e,t){let n={};if(e.underline!==t.underline&&(n.underline=t.underline),e.overline!==t.overline&&(n.overline=t.overline),e.strikeThrough!==t.strikeThrough&&(n.strikeThrough=t.strikeThrough),e.color.aci!==t.color.aci&&(n.aci=t.color.aci),e.color.rgbValue!==t.color.rgbValue&&(n.rgb=t.color.rgb),e.align!==t.align&&(n.align=t.align),JSON.stringify(e.fontFace)!==JSON.stringify(t.fontFace)&&(n.fontFace=t.fontFace),(e.capHeight.value!==t.capHeight.value||e.capHeight.isRelative!==t.capHeight.isRelative)&&(n.capHeight=t.capHeight),(e.widthFactor.value!==t.widthFactor.value||e.widthFactor.isRelative!==t.widthFactor.isRelative)&&(n.widthFactor=t.widthFactor),(e.charTrackingFactor.value!==t.charTrackingFactor.value||e.charTrackingFactor.isRelative!==t.charTrackingFactor.isRelative)&&(n.charTrackingFactor=t.charTrackingFactor),e.oblique!==t.oblique&&(n.oblique=t.oblique),JSON.stringify(e.paragraph)!==JSON.stringify(t.paragraph)){let i={};e.paragraph.indent!==t.paragraph.indent&&(i.indent=t.paragraph.indent),e.paragraph.align!==t.paragraph.align&&(i.align=t.paragraph.align),e.paragraph.left!==t.paragraph.left&&(i.left=t.paragraph.left),e.paragraph.right!==t.paragraph.right&&(i.right=t.paragraph.right),JSON.stringify(e.paragraph.tabs)!==JSON.stringify(t.paragraph.tabs)&&(i.tabs=t.paragraph.tabs),Object.keys(i).length>0&&(n.paragraph=i)}return n}parseAlign(e){let t=this.scanner.get();"012".includes(t)?e.align=parseInt(t):e.align=lr.BOTTOM,this.consumeOptionalTerminator()}parseHeight(e){let t=this.extractFloatExpression(!0);if(t)try{t.endsWith("x")?e.capHeight={value:parseFloat(t.slice(0,-1)),isRelative:!0}:e.capHeight={value:parseFloat(t),isRelative:!1}}catch{this.scanner.consume(-t.length);return}this.consumeOptionalTerminator()}parseWidth(e){let t=this.extractFloatExpression(!0);if(t)try{t.endsWith("x")?e.widthFactor={value:parseFloat(t.slice(0,-1)),isRelative:!0}:e.widthFactor={value:parseFloat(t),isRelative:!1}}catch{this.scanner.consume(-t.length);return}this.consumeOptionalTerminator()}parseCharTracking(e){let t=this.extractFloatExpression(!0);if(t)try{t.endsWith("x")?e.charTrackingFactor={value:Math.abs(parseFloat(t.slice(0,-1))),isRelative:!0}:e.charTrackingFactor={value:Math.abs(parseFloat(t)),isRelative:!1}}catch{this.scanner.consume(-t.length);return}this.consumeOptionalTerminator()}parseFloatValueOrFactor(e){let t=this.extractFloatExpression(!0);if(t)if(t.endsWith("x")){let n=parseFloat(t.slice(0,-1));e*=n}else e=parseFloat(t);return e}parseOblique(e){let t=this.extractFloatExpression(!1);t&&(e.oblique=parseFloat(t)),this.consumeOptionalTerminator()}parseAciColor(e){let t=this.extractIntExpression();if(t){let n=parseInt(t);n<257&&(e.color.aci=n)}this.consumeOptionalTerminator()}parseRgbColor(e){let t=this.extractIntExpression();if(t){let n=parseInt(t)&16777215;e.color.rgbValue=n}this.consumeOptionalTerminator()}extractFloatExpression(e=!1){let t=e?/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?x?/:/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,n=this.scanner.tail.match(t);if(n){let i=n[0];return this.scanner.consume(i.length),i}return""}extractIntExpression(){let e=this.scanner.tail.match(/^\d+/);if(e){let t=e[0];return this.scanner.consume(t.length),t}return""}extractExpression(e=!1){let t=this.scanner.find(";",e);if(t<0){let a=this.scanner.tail;return this.scanner.consume(a.length),a}let i=this.scanner.peek(t-this.scanner.currentIndex-1)==="\\",o=this.scanner.tail.slice(0,t-this.scanner.currentIndex+(i?1:0));return this.scanner.consume(o.length+1),o}parseFontProperties(e){let t=this.extractExpression().split("|");if(t.length>0&&t[0]){let n=t[0],i="Regular",o=400;for(let a of t.slice(1))a.startsWith("b1")?o=700:a==="i"||a.startsWith("i1")?i="Italic":(a==="i0"||a.startsWith("i0"))&&(i="Regular");e.fontFace={family:n,style:i,weight:o}}}parseParagraphProperties(e){let t=new a_(this.extractExpression()),n=e.paragraph.indent,i=e.paragraph.left,o=e.paragraph.right,a=e.paragraph.align,s=[],l=()=>{let c=t.tail.match(/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/);if(c){let u=parseFloat(c[0]);for(t.consume(c[0].length);t.peek()===",";)t.consume(1);return u}return 0};for(;t.hasData;)switch(t.get()){case"i":n=l();break;case"l":i=l();break;case"r":o=l();break;case"x":break;case"q":{let u=t.get();for(a=ywe[u]||Vt.DEFAULT;t.peek()===",";)t.consume(1);break}case"t":for(s=[];t.hasData;){let u=t.currentIndex,h=t.peek();if(h==="r"||h==="c"){t.consume(1);let d=t.currentIndex,p=l();t.currentIndex!==d&&s.push(h+p.toString())}else{let d=l();t.currentIndex!==u&&s.push(d)}t.currentIndex===u&&t.consume(1)}break}e.paragraph={indent:n,left:i,right:o,align:a,tabs:s}}consumeOptionalTerminator(){this.scanner.peek()===";"&&this.scanner.consume(1)}buildPercentSymbolData(e,t){return e==="c"||e==="d"||e==="p"?{kind:"named",code:e,char:t}:e==="%"?{kind:"literal",char:"%"}:null}*parse(){let e=Yt.WORD,t=Yt.SPACE,n=null,i;function o(l){let c={...l.paragraph};l.paragraph={indent:0,left:0,right:0,align:Vt.DEFAULT,tabs:[]};let u={};return c.indent!==0&&(u.indent=0),c.left!==0&&(u.left=0),c.right!==0&&(u.right=0),c.align!==Vt.DEFAULT&&(u.align=Vt.DEFAULT),JSON.stringify(c.tabs)!==JSON.stringify([])&&(u.tabs=[]),u}let a=()=>{let l="";for(;this.scanner.hasData;){let c=!1,u=this.scanner.peek(),h=this.scanner.currentIndex;if(u.charCodeAt(0)<32)return u===" "?(this.scanner.consume(1),l?(n=Yt.TABULATOR,i=null,[e,l]):[Yt.TABULATOR,null]):u===`
  3976. `?(this.scanner.consume(1),l?(n=Yt.NEW_PARAGRAPH,i=null,[e,l]):[Yt.NEW_PARAGRAPH,null]):(this.scanner.consume(1),l?(n=t,[e,l]):[t,null]);if(u==="\\")if("\\{}".includes(this.scanner.peek(1)))c=!0,this.scanner.consume(1),u=this.scanner.peek();else{if(l)return[e,l];this.scanner.consume(1);let d=this.scanner.get();switch(d){case"~":return[Yt.NBSP,null];case"P":return[Yt.NEW_PARAGRAPH,null];case"N":return[Yt.NEW_COLUMN,null];case"X":return[Yt.WRAP_AT_DIMLINE,null];case"S":{this.inStackContext=!0;let p=this.parseStacking();return this.inStackContext=!1,p}case"m":case"M":if(this.scanner.peek()==="+"){this.scanner.consume(1);let p=this.extractMifCode(this.mifCodeLength);if(p){this.scanner.consume(p.length);let f=this.mifDecoder(p);return l?[e,l]:[e,f]}this.scanner.consume(-1)}l+="\\M";continue;case"U":{let p=this.parseUnicodeEscape();if(p!==null)return l?[e,l]:[e,p];l+="\\U";continue}default:if(d)try{let p=this.parseProperties(d);if(this.yieldPropertyCommands&&p)return[Yt.PROPERTIES_CHANGED,p];continue}catch{l+=this.scanner.slice(h,this.scanner.currentIndex)}}continue}if(u==="%"&&this.scanner.peek(1)==="%"){let d=this.scanner.peek(2).toLowerCase(),p=gwe[d];if(p){if(this.scanner.consume(3),this.yieldPercentSymbols){let f=this.buildPercentSymbolData(d,p);if(f)return l?(n=Yt.PERCENT_SYMBOL,i=f,[e,l]):[Yt.PERCENT_SYMBOL,f]}l+=p;continue}else{let f=[];for(let m=0;m<3;m++){let g=this.scanner.peek(2+m);if(g>="0"&&g<="9")f.push(g);else break}if(f.length>0){let m=Number.parseInt(f.join(""),10);if(this.scanner.consume(2+f.length),this.yieldPercentSymbols){let g={kind:"numeric",charCode:m,char:String.fromCharCode(m)};return l?(n=Yt.PERCENT_SYMBOL,i=g,[e,l]):[Yt.PERCENT_SYMBOL,g]}l+=String.fromCharCode(m)}else this.scanner.consume(3);continue}}if(u===" ")return l?(this.scanner.consume(1),n=t,[e,l]):(this.scanner.consume(1),[t,null]);if(!c){if(u==="{"){if(l)return[e,l];this.scanner.consume(1),this.pushCtx();continue}else if(u==="}"){if(l)return[e,l];if(this.scanner.consume(1),this.yieldPropertyCommands){let d=this.ctxStack.current;this.popCtx();let p=this.getPropertyChanges(d,this.ctxStack.current);if(Object.keys(p).length>0)return[Yt.PROPERTIES_CHANGED,{command:void 0,changes:p,depth:this.ctxStack.depth}]}else this.popCtx();continue}}if(!this.inStackContext&&u==="^"){let d=this.scanner.peek(1);if(d){let p=d.charCodeAt(0);if(this.scanner.consume(2),p===32)l+="^";else{if(p===73)return l?[e,l]:[Yt.TABULATOR,null];if(p===74)return l?[e,l]:[Yt.NEW_PARAGRAPH,null];if(p===77)continue;l+="\u25AF"}continue}}this.scanner.consume(1),u.charCodeAt(0)>=32&&(l+=u)}return l?[e,l]:[Yt.NONE,null]},s=l=>{if(l!==Yt.NEW_PARAGRAPH||!this.resetParagraphParameters)return;let c=this.ctxStack.current,u=o(c);if(this.yieldPropertyCommands&&Object.keys(u).length>0)return new s_(Yt.PROPERTIES_CHANGED,c.copy(),{command:void 0,changes:{paragraph:u},depth:this.ctxStack.depth})};for(;;){let[l,c]=a.call(this);if(l){yield new s_(l,this.ctxStack.current.copy(),c);let u=s(l);if(u&&(yield u),n){yield new s_(n,this.ctxStack.current.copy(),i??null);let h=s(n);h&&(yield h),n=null,i=void 0}}else break}}},a_=class{constructor(e){this.text=e,this.textLen=e.length,this._index=0}get currentIndex(){return this._index}get isEmpty(){return this._index>=this.textLen}get hasData(){return this._index<this.textLen}get(){if(this.isEmpty)return"";let e=this.text[this._index];return this._index++,e}consume(e=1){this._index=Math.max(0,Math.min(this._index+e,this.textLen))}peek(e=0){let t=this._index+e;return t>=this.textLen||t<0?"":this.text[t]}find(e,t=!1){let n=this._index;for(;n<this.textLen;){if(t&&this.text[n]==="\\"){if(n+1<this.textLen){if(this.text[n+1]===e)return n+1;n+=2;continue}n++;continue}if(this.text[n]===e)return n;n++}return-1}get tail(){return this.text.slice(this._index)}slice(e,t){return this.text.slice(e,t)}isNextSpace(){return this.peek()===" "}consumeSpaces(){let e=0;for(;this.isNextSpace();)this.consume(),e++;return e}},Mi=class r{constructor(e){this._aci=256,this._rgbValue=null,Array.isArray(e)?this.rgb=e:typeof e=="number"?this.aci=e:this.aci=256}get aci(){return this._aci}set aci(e){if(e===null)this._aci=null;else if(e>=0&&e<=256)this._aci=e,this._rgbValue=null;else throw new Error("ACI not in range [0, 256]")}get rgb(){if(this._rgbValue===null)return null;let e=this._rgbValue>>16&255,t=this._rgbValue>>8&255,n=this._rgbValue&255;return[e,t,n]}set rgb(e){if(e){let[t,n,i]=e;this._rgbValue=(t&255)<<16|(n&255)<<8|i&255,this._aci=null}else this._rgbValue=null}get isRgb(){return this._rgbValue!==null}get isAci(){return this._rgbValue===null&&this._aci!==null}get rgbValue(){return this._rgbValue}set rgbValue(e){e===null?this._rgbValue=null:(this._rgbValue=e&16777215,this._aci=null)}copy(){let e=new r;return e._aci=this._aci,e._rgbValue=this._rgbValue,e}toObject(){return{aci:this._aci,rgb:this.rgb,rgbValue:this._rgbValue}}toCssColor(){return this._rgbValue!==null?bwe(this._rgbValue):null}static fromCssColor(e){let t=xwe(e);if(t===null)return null;let n=new r;return n.rgbValue=t,n}equals(e){return this._aci===e._aci&&this._rgbValue===e._rgbValue}},Cs=class r{constructor(){this._stroke=0,this.continueStroke=!1,this.color=new Mi,this.align=lr.BOTTOM,this.fontFace={family:"",style:"Regular",weight:400},this._capHeight={value:1,isRelative:!1},this._widthFactor={value:1,isRelative:!1},this._charTrackingFactor={value:1,isRelative:!1},this.oblique=0,this.paragraph={indent:0,left:0,right:0,align:Vt.DEFAULT,tabs:[]}}get capHeight(){return this._capHeight}set capHeight(e){this._capHeight={value:Math.abs(e.value),isRelative:e.isRelative}}get widthFactor(){return this._widthFactor}set widthFactor(e){this._widthFactor={value:Math.abs(e.value),isRelative:e.isRelative}}get charTrackingFactor(){return this._charTrackingFactor}set charTrackingFactor(e){this._charTrackingFactor={value:Math.abs(e.value),isRelative:e.isRelative}}get aci(){return this.color.aci}set aci(e){this.color.aci=e}get rgb(){return this.color.rgb}set rgb(e){this.color.rgb=e}get italic(){return this.fontFace.style==="Italic"}set italic(e){this.fontFace.style=e?"Italic":"Regular"}get bold(){return(this.fontFace.weight||400)>=700}set bold(e){this.fontFace.weight=e?700:400}get underline(){return!!(this._stroke&rd.UNDERLINE)}set underline(e){this._setStrokeState(rd.UNDERLINE,e)}get strikeThrough(){return!!(this._stroke&rd.STRIKE_THROUGH)}set strikeThrough(e){this._setStrokeState(rd.STRIKE_THROUGH,e)}get overline(){return!!(this._stroke&rd.OVERLINE)}set overline(e){this._setStrokeState(rd.OVERLINE,e)}get hasAnyStroke(){return!!this._stroke}_setStrokeState(e,t=!0){t?this._stroke|=e:this._stroke&=~e}copy(){let e=new r;return e._stroke=this._stroke,e.continueStroke=this.continueStroke,e.color=this.color.copy(),e.align=this.align,e.fontFace={...this.fontFace},e._capHeight={...this._capHeight},e._widthFactor={...this._widthFactor},e._charTrackingFactor={...this._charTrackingFactor},e.oblique=this.oblique,e.paragraph={...this.paragraph},e}},s_=class{constructor(e,t,n){this.type=e,this.ctx=t,this.data=n}};var IE=class{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}removeEventListener(e){this.listeners=this.listeners.filter(t=>t!==e)}replaceEventListener(e){this.removeEventListener(e),this.addEventListener(e)}dispatch(e,...t){for(let n of this.listeners)n.call(null,e,...t)}},_we=r=>r.substring(r.lastIndexOf(".")+1),L$=r=>r.split("/").pop(),Ju=r=>{let e=L$(r);if(e){let t=e.lastIndexOf(".");return t===-1?e:e.substring(0,t)}return r},Swe=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0],w_=r=>Swe[r];function O$(r){var e,t,n;if(!r||Awe(r))return 0;let i=0,{attributes:o}=r;for(let a of Object.keys(o)){let s=o[a];((e=s?.array)==null?void 0:e.byteLength)!=null&&(i+=s.array.byteLength)}return((n=(t=r.index)==null?void 0:t.array)==null?void 0:n.byteLength)!=null&&(i+=r.index.array.byteLength),i}function Awe(r){return r.disposed===!0?!0:Object.keys(r.attributes).length===0&&r.index==null}function Mwe(r){return r?r.length*2:0}function D$(r){return r instanceof ArrayBuffer||ArrayBuffer.isView(r)?r.byteLength:0}var m_=class{constructor(e=4096,t){this.map=new Map,this.maxSize=e,this.onEvict=t}get(e){let t=this.map.get(e);return t!==void 0&&(this.map.delete(e),this.map.set(e,t)),t}set(e,t){var n,i;if(this.map.has(e)){let o=this.map.get(e);this.map.delete(e),o!==t&&((n=this.onEvict)==null||n.call(this,e,o))}else if(this.map.size>=this.maxSize){let o=this.map.keys().next().value;if(o!==void 0){let a=this.map.get(o);this.map.delete(o),(i=this.onEvict)==null||i.call(this,o,a)}}this.map.set(e,t)}has(e){return this.map.has(e)}get size(){return this.map.size}get capacity(){return this.maxSize}values(){return this.map.values()}clear(){if(this.onEvict)for(let[e,t]of this.map)this.onEvict(e,t);this.map.clear()}},Pwe=4096,$4=class{constructor(e=Pwe){this.maxSize=e,this.cache=new m_(e,(t,n)=>{n.dispose()})}hasGeometry(e,t,n="fill"){let i=this.generateKey(e,t,n);return this.cache.has(i)}getGeometry(e,t,n="fill"){let i=this.generateKey(e,t,n);return this.cache.get(i)}setGeometry(e,t,n,i="fill"){let o=this.generateKey(e,t,i);this.cache.set(o,n)}getStats(){let e=0;for(let t of this.cache.values())e+=O$(t);return{entries:this.cache.size,maxEntries:this.maxSize,estimatedBytes:e}}dispose(){this.cache.clear()}generateKey(e,t,n="fill"){return n==="fill"?`${e}_${t}`:`${e}_${t}_${n}`}},LE=class{constructor(e){this.names=new Set,this.unsupportedChars={},this.encoding=e.encoding,e.alias.forEach(t=>this.names.add(t)),this.sourceByteLength=D$(e.data),this.cache=new $4}dispose(){this.cache.dispose()}getShapeByName(e,t){}addUnsupportedChar(e){this.unsupportedChars[e]||(this.unsupportedChars[e]=0),this.unsupportedChars[e]++}},OE=class extends Vo{constructor(){super(...arguments),this.width=0}toStrokeGeometry(){return this.toGeometry()}get geometryScale(){return 1}hasStrokeGeometry(){return this.width>0}},Gi=class{static byteToSByte(e){return(e&127)-(e&128?128:0)}constructor(e){this.position=0,this.data=new DataView(e)}readBytes(e=1){this.data.byteLength<this.position+e&&this.throwOutOfRangeError(this.position+e);let t=new Uint8Array(this.data.buffer,this.position,e);return this.position+=e,t}skip(e){this.data.byteLength<this.position+e&&this.throwOutOfRangeError(this.position+e),this.position+=e}readUint8(){this.data.byteLength<this.position+1&&this.throwOutOfRangeError(this.position+1);let e=this.data.getUint8(this.position);return this.position+=1,e}readInt8(){this.data.byteLength<this.position+1&&this.throwOutOfRangeError(this.position+1);let e=this.data.getInt8(this.position);return this.position+=1,e}readUint16(e=!0){this.data.byteLength<this.position+2&&this.throwOutOfRangeError(this.position+2);let t=this.data.getUint16(this.position,e);return this.position+=2,t}readInt16(){this.data.byteLength<this.position+2&&this.throwOutOfRangeError(this.position+2);let e=this.data.getInt16(this.position,!0);return this.position+=2,e}readUint32(){this.data.byteLength<this.position+4&&this.throwOutOfRangeError(this.position+4);let e=this.data.getUint32(this.position,!0);return this.position+=4,e}readInt32(){this.data.byteLength<this.position+4&&this.throwOutOfRangeError(this.position+4);let e=this.data.getInt32(this.position,!0);return this.position+=4,e}readFloat32(){this.data.byteLength<this.position+4&&this.throwOutOfRangeError(this.position+4);let e=this.data.getFloat32(this.position,!0);return this.position+=4,e}readFloat64(){this.data.byteLength<this.position+8&&this.throwOutOfRangeError(this.position+8);let e=this.data.getFloat64(this.position,!0);return this.position+=8,e}setPosition(e){this.data.byteLength<e&&this.throwOutOfRangeError(e),this.position=e}isEnd(){return this.position===this.data.byteLength-1}get currentPosition(){return this.position}get length(){return this.data.byteLength}throwOutOfRangeError(e){throw new Error(`Position ${e} is out of range for the data length ${this.data.byteLength}!`)}},_n=(r=>(r.SHAPES="shapes",r.BIGFONT="bigfont",r.UNIFONT="unifont",r))(_n||{}),K4=class{parse(e){let t=this.parseHeader(e).split(" "),n=t[1].toLocaleLowerCase();if(!Object.values(_n).includes(n))throw new Error(`Invalid font type: ${n}`);return{fileHeader:t[0],fontType:n,fileVersion:t[2]}}parseHeader(e){let t="",n=0;for(;e.currentPosition<e.length-2&&n<1024;){let i=e.readUint8();if(i===13){let o=e.currentPosition,a=e.readUint8(),s=e.readUint8();if(a===10&&s===26)break;e.setPosition(o),t+=String.fromCharCode(i)}else t+=String.fromCharCode(i);n++}return t.trim()}},qy=10,Ewe=[13,10,0];function R$(r,e){if(e===0){r.orientation="horizontal";return}if(e===2){r.orientation="horizontal",r.dualOrientation=!0;return}r.orientation="vertical"}function B$(r){let e={};for(let[t,n]of Object.entries(r))e[n]=t;return e}function F$(r){let e=r.indexOf(0);return e<0?{name:null,bytecode:r}:{name:e>0?new TextDecoder("ascii").decode(r.subarray(0,e)):null,bytecode:r.subarray(e+1)}}var q4=class{parse(e){try{e.readBytes(4);let t=e.readInt16();if(t<=0)throw new Error("Invalid shape count in font file");let n=[];for(let l=0;l<t;l++){let c=e.readUint16(),u=e.readUint16();u>0&&n.push({code:c,length:u})}let i={};for(let l of n)try{let c=e.readBytes(l.length);c.length===l.length&&(i[l.code]=c)}catch{console.warn(`Failed to read shape data for code ${l.code}`)}let o={},a={};for(let[l,c]of Object.entries(i)){let u=Number(l);if(u===0){o[u]=c;continue}let{name:h,bytecode:d}=F$(c);o[u]=d,h&&(a[h]=u)}let s={data:o,names:Object.keys(a).length>0?a:void 0,codeToName:Object.keys(a).length>0?B$(a):void 0,info:"",baseUp:8,baseDown:2,height:qy,width:qy,orientation:"horizontal",isExtended:!1};if(0 in o){let l=o[0];try{let c=new TextDecoder().decode(l),u=l.findIndex(h=>Ewe.includes(h));u>=0&&(s.info=c.substring(0,u),u+3<l.length&&(s.baseUp=l[u+1],s.baseDown=l[u+2],s.height=s.baseDown+s.baseUp,s.width=s.height,R$(s,l[u+3])))}catch{console.warn("Failed to parse font info block")}}return s}catch(t){let n=t instanceof Error?t.message:String(t);throw new Error(`Failed to parse shape font: ${n}`)}}},Z4=class{parse(e){try{e.readInt16();let t=e.readInt16(),n=e.readInt16();if(t<=0)throw new Error("Invalid character count in font file");e.skip(n*4);let i=[];for(let s=0;s<t;s++){let l=e.readUint16(),c=e.readUint16(),u=e.readUint32();(l!==0||c!==0||u!==0)&&i.push({code:l,length:c,offset:u})}let o={};for(let s of i)try{e.setPosition(s.offset);let l=e.readBytes(s.length);l.length===s.length&&(o[s.code]=l)}catch{console.warn(`Failed to read bigfont data for code ${s.code}`)}let a={data:o,info:"",baseUp:8,baseDown:2,height:qy,width:qy,orientation:"horizontal",isExtended:!1};if(0 in o){let s=o[0];try{let l=this.utf8ArrayToStr(s);if(l.pos>=0){let c=l.text;for(;c.length>0&&c.charCodeAt(c.length-1)===0;)c=c.slice(0,-1);a.info=c;let u=this.parseBigfontMetrics(s,l.pos+1);u&&Object.assign(a,u)}}catch{console.warn("Failed to parse bigfont info block")}}return a}catch(t){let n=t instanceof Error?t.message:String(t);throw new Error(`Failed to parse big font: ${n}`)}}parseBigfontMetrics(e,t){let n=t;for(;n<e.length&&e[n]===0;)n++;let i=e.length-n;if(i<=0)return null;let o=a=>a===0?"horizontal":"vertical";if(i>=5){let a=e[n++];n++;let s=o(e[n++]),l=e[n++];return{baseUp:a,baseDown:0,height:a,width:l,orientation:s,isExtended:!0}}if(i===4&&e[n+1]===0&&e[n+3]>0&&e[n+3]!==e[n]){let a=e[n++];n++;let s=o(e[n++]),l=e[n];return{baseUp:a,baseDown:0,height:a,width:l,orientation:s,isExtended:!0}}if(i===4){let a=e[n++],s=e[n++],l=o(e[n++]);return{baseUp:a,baseDown:s,height:a+s,width:a+s,orientation:l,isExtended:!1}}if(i===3){let a=e[n++],s=e[n++],l=o(s),c=s===2;return{baseUp:a,baseDown:0,height:a,width:a,orientation:l,isExtended:c,verticalDualMode:c}}return null}utf8ArrayToStr(e){let t="",n=0;for(;n<e.length;){let i=e[n];switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(i);break;case 12:case 13:{let o=e[n++];t+=String.fromCharCode((i&31)<<6|o&63);break}case 14:{let o=e[n++],a=e[n++];t+=String.fromCharCode((i&15)<<12|(o&63)<<6|(a&63)<<0);break}}if(t.charCodeAt(t.length-1)===0)break;n++}return{text:t,pos:n}}},J4=class{parse(e){try{let t=e.readInt32();if(t<=0)throw new Error("Invalid character count in font file");let n=e.readInt16(),i=e.readBytes(n),o={data:{},info:"",baseUp:8,baseDown:2,height:qy,width:qy,orientation:"horizontal",isExtended:!1};try{let l=new TextDecoder().decode(i),c=l.indexOf("\0");c>=0&&(o.info=l.substring(0,c),c+3<i.length&&(o.baseUp=i[c+1],o.baseDown=i[c+2],o.height=o.baseUp+o.baseDown,o.width=o.height,R$(o,i[c+3])))}catch{console.warn("Failed to parse unifont info block")}let a={},s={};for(let l=0;l<t-1;l++)try{let c=e.readUint16(),u=e.readUint16();if(u>0){let h=e.readBytes(u);if(h.length===u){let{name:d,bytecode:p}=F$(h);p.length>0&&(a[c]=p,d&&(s[d]=c))}}}catch{console.warn("Failed to read unifont character data");break}return o.data=a,o.names=Object.keys(s).length>0?s:void 0,o.codeToName=Object.keys(s).length>0?B$(s):void 0,o}catch(t){let n=t instanceof Error?t.message:String(t);throw new Error(`Failed to parse unifont: ${n}`)}}},Q4=class{static createParser(e){switch(e){case _n.SHAPES:return new q4;case _n.BIGFONT:return new Z4;case _n.UNIFONT:return new J4;default:throw new Error(`Unsupported font type: ${e}`)}}},XX=.2,g_=class{markAlignedAdvanceExplicit(e){return!1}},DE=class r extends g_{constructor(e=XX){super(),this.cellWidthFactor=e}static isCenterOriginGlyph(e){return e.bbox.minX<-1e-6}static computeAdvance(e,t,n=XX){if(!e.polylines.some(a=>a.length>=2))return t*n;let i=t*n,{maxX:o}=e.bbox;return r.isCenterOriginGlyph(e)?Math.max(o,t/2)+i:o+i}resolve(e,t){var n;return e.hasExplicitAdvance?((n=e.lastPoint)==null?void 0:n.x)??0:r.computeAdvance(e,t,this.cellWidthFactor)}markAlignedAdvanceExplicit(e){return!0}},eC=new DE,rr=class r{constructor(e=0,t=0){this.x=e,this.y=t}set(e,t){return this.x=e,this.y=t,this}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}normalize(){let e=this.length();return e!==0&&(this.x/=e,this.y/=e),this}clone(){return new r(this.x,this.y)}add(e){return this.x+=e.x,this.y+=e.y,this}subtract(e){return this.x-=e.x,this.y-=e.y,this}multiply(e){return this.x*=e,this.y*=e,this}divide(e){return e!==0&&(this.x/=e,this.y/=e),this}multiplyScalars(e,t){return this.x*=e,this.y*=t,this}divideScalars(e,t){return e!==0&&(this.x/=e),t!==0&&(this.y/=t),this}distanceTo(e){let t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}};function N$(r){let{width:e,capHeight:t,descenderHeight:n,origin:i="baseline"}=r,o=t+n;return i==="top"?{minX:-e/2,maxX:e/2,minY:-o,maxY:0}:{minX:0,maxX:e,minY:-n,maxY:t}}function Cwe(r){return[r.minX,r.minY,r.maxX,r.maxY].every(Number.isFinite)}function Twe(r,e,t=1e-6){return e.minX>=r.minX-t&&e.maxX<=r.maxX+t&&e.minY>=r.minY-t&&e.maxY<=r.maxY+t}function kwe(r,e){return{minX:Math.min(r.minX,e.minX),minY:Math.min(r.minY,e.minY),maxX:Math.max(r.maxX,e.maxX),maxY:Math.max(r.maxY,e.maxY)}}function Iwe(r,e,t){let n=r.maxX-r.minX,i=r.maxY-r.minY;return`<rect x="${r.minX}" y="${-r.maxY}" width="${n}" height="${i}" fill="none" stroke="${e}" stroke-width="${t}"/>`}function YX(r,e){let t=r.maxX-r.minX,n=r.maxY-r.minY;return`<rect x="${r.minX}" y="${-r.maxY}" width="${t}" height="${n}" fill="${e}"/>`}function Lwe(r,e,t,n,i,o,a){let s=` stroke-dasharray="${a}"`;return`<line x1="${r}" y1="${-e}" x2="${t}" y2="${-n}" stroke="${i}" stroke-width="${o}"${s}/>`}function Owe(r,e,t){let{capHeight:n,descenderHeight:i,origin:o="baseline"}=r,a=n+i,s=N$(r),l,c,u;o==="top"?(n>0&&(l={minX:s.minX,maxX:s.maxX,minY:-n,maxY:0}),i>0&&(c={minX:s.minX,maxX:s.maxX,minY:-a,maxY:-n}),u=-n):(n>0&&(l={minX:s.minX,maxX:s.maxX,minY:0,maxY:n}),i>0&&(c={minX:s.minX,maxX:s.maxX,minY:-i,maxY:0}),u=0);let h=[l?YX(l,"rgba(255, 0, 0, 0.06)"):"",c?YX(c,"rgba(255, 0, 0, 0.14)"):"",Iwe(s,e,t)];return u!==void 0&&i>0&&n>0&&h.push(Lwe(s.minX,u,s.maxX,u,e,t,"4 2")),`<g>${h.join("")}</g>`}var Xy=class r{constructor(e,t=[],n=!1){this.lastPoint=e,this.polylines=t,this.hasExplicitAdvance=n}get bbox(){if(this._bbox)return this._bbox;let e=1/0,t=-1/0,n=1/0,i=-1/0;return this.polylines.forEach(o=>{o.forEach(a=>{e=Math.min(e,a.x),t=Math.max(t,a.x),n=Math.min(n,a.y),i=Math.max(i,a.y)})}),this._bbox={minX:e,minY:n,maxX:t,maxY:i},this._bbox}offset(e,t=!0){var n,i;return t?new r((n=this.lastPoint)==null?void 0:n.clone().add(e),this.polylines.map(o=>o.map(a=>a.clone().add(e))),this.hasExplicitAdvance):((i=this.lastPoint)==null||i.add(e),this.polylines.forEach(o=>o.forEach(a=>a.add(e))),this._bbox&&(this._bbox.maxX+=e.x,this._bbox.minX+=e.x,this._bbox.maxY+=e.y,this._bbox.minY+=e.y),this)}normalizeToOrigin(e=!1){let t=this.bbox;return this.offset(new rr(-t.minX,-t.minY),e)}toSVG(e={}){let{strokeWidth:t="0.5%",strokeColor:n="black",isAutoFit:i=!1,fontCell:o}=e,a,s,l=c=>this.polylines.map(u=>{let h="";return u.forEach((d,p)=>{let{x:f,y:m}=c(d);h+=p===0?`M ${f} ${m} `:`L ${f} ${m} `}),`<path d="${h}" stroke="${n}" stroke-width="${t}" fill="none"/>`}).join("");if(o){let{padding:c=.1,expandToFit:u=!1,showFrame:h=!1,frameColor:d="red",frameStrokeWidth:p="0.5%"}=o,f=N$(o),m=this.bbox,g=f;u&&Cwe(m)&&!Twe(f,m)&&(g=kwe(f,m));let y=g.maxX-g.minX,b=g.maxY-g.minY,v=y*c,x=b*c,w=g.minX-v,_=g.maxX+v,A=g.minY-x,E=g.maxY+x;s=l(M=>({x:M.x,y:-M.y}));let S=h?Owe(o,d,p):"";return a=`${w} ${-E} ${_-w} ${E-A}`,`<svg width="100%" height="100%" viewBox="${a}" preserveAspectRatio="xMidYMid meet">${S}${s}</svg>`}else if(i){let c=this.bbox,u=.2,h=c.maxX-c.minX,d=c.maxY-c.minY,p=h===0?d:h,f=d===0?h:d,m=c.minX-p*u,g=c.maxX+p*u,y=c.minY-f*u,b=c.maxY+f*u;s=l(v=>({x:v.x,y:-v.y})),a=`${m} ${-b} ${g-m} ${b-y}`}else a="0 0 20 20",s=l(c=>({x:c.x+5,y:-c.y+15}));return`<svg width="100%" height="100%" viewBox="${a}" preserveAspectRatio="xMidYMid meet">${s}</svg>`}},$X=8,KX=48,Dwe=.4,Rwe=[52164,45795,49829,50150,54992,47610,54754,46532,51906,53947,49332,51706,46532,54224,52946,52714,52219,45755,51403,46532,53947,50410,49332,52219,52141,46532,50150,51120,50150,54992,51663,50119,53186,46532,46525,51365,52149,47016,46532,51889,51706,46025,47037,55031,48122,50935,47531,48122,51965,55e3];function tC(r,e){let{height:t,width:n,baseUp:i,baseDown:o}=r,a=t>0?e/t:1,s=a*i,l=a*o;return{size:e,capHeight:s,descenderHeight:l,cellWidth:a*n,totalHeight:s+l}}function Bwe(r,e,t){if(r.header.fontType!==_n.SHAPES||!(0 in r.content.data))return!1;let n=-(t.descenderHeight+t.capHeight*.2);return e.bbox.minY<n}function z$(r,e){let t=-(e.descenderHeight+e.capHeight*.05);return!(r.bbox.minY<t||r.bbox.maxY-r.bbox.minY<e.capHeight*.05)}function Fwe(r,e,t){if(r.header.fontType!==_n.BIGFONT||r.content.baseDown>0)return 0;let{height:n}=r.content;if(n<=0)return 0;let i=n*Dwe,o=[],a=new Set,s=c=>{if(a.has(c)||c<=255||!(c in r.content.data))return;a.add(c);let u=e(c);if(!u)return;let h=u.bbox.minY;h>0&&h<=i&&o.push(h)};for(let c of Rwe)if(s(c),o.length>=KX)break;if(o.length<$X){for(let c of Object.keys(r.content.data))if(s(Number(c)),o.length>=KX)break}if(o.length<$X)return 0;o.sort((c,u)=>c-u);let l=Math.floor(o.length/2);return o.length%2===0?(o[l-1]+o[l])/2:o[l]}function Nwe(r,e,t){if(r.header.fontType!==_n.UNIFONT)return!1;if(r.content.dualOrientation)return!0;let n=tC(r.content,t);for(let i of[48,65,78,49]){if(!(i in r.content.data))continue;let o=e(i);if(o&&z$(o,n))return!0}return!1}function zwe(r,e,t,n=eC,i=!1,o=0){var a;let s=r;if(e.header.fontType===_n.BIGFONT&&o>0){let u=e.content.height>0?t.size/e.content.height:1;s=s.offset(new rr(0,-o*u),!0)}if(e.header.fontType===_n.UNIFONT||Bwe(e,r,t)){let u=e.header.fontType===_n.UNIFONT&&(i||e.content.dualOrientation||z$(r,t));(e.header.fontType!==_n.UNIFONT||!u)&&(s=s.offset(new rr(0,t.capHeight),!0))}let l=n.resolve(s,t.cellWidth),c=n.markAlignedAdvanceExplicit(s)?!0:s.hasExplicitAdvance;return new Xy(new rr(l,((a=s.lastPoint)==null?void 0:a.y)??0),s.polylines,c)}function Uwe(r,e,t,n=eC,i=!1,o=0){let a=tC(e.content,t);return zwe(r,e,a,n,i,o)}var qX=Math.PI/4,RE=class r{static fromBulge(e,t,n){let i=Math.max(-1,Math.min(1,n));return new r({start:e,end:t,bulge:i})}static fromOctant(e,t,n,i,o){return new r({center:e,radius:t,startOctant:n,octantCount:i,isClockwise:o})}constructor(e){if(e.start&&e.end&&e.bulge!==void 0){this.start=e.start.clone(),this.end=e.end.clone(),this.bulge=e.bulge,this.isClockwise=e.bulge<0;let t=this.end.clone().subtract(this.start),n=t.length();if(Math.abs(this.bulge)*n/2===0){this.radius=0,this.center=this.start.clone(),this.startAngle=Math.atan2(t.y,t.x),this.endAngle=this.startAngle;return}let i=4*Math.atan(Math.abs(this.bulge));this.radius=n/(2*Math.sin(i/2));let o=this.start.clone().add(t.clone().divide(2)),a=new rr(-t.y,t.x);a.normalize(),a.multiply(Math.abs(this.radius*Math.cos(i/2))),this.center=o.clone(),this.isClockwise?this.center.subtract(a):this.center.add(a),this.startAngle=Math.atan2(this.start.y-this.center.y,this.start.x-this.center.x),this.endAngle=Math.atan2(this.end.y-this.center.y,this.end.x-this.center.x),this.isClockwise?this.endAngle>=this.startAngle&&(this.endAngle-=2*Math.PI):this.endAngle<=this.startAngle&&(this.endAngle+=2*Math.PI)}else if(e.center&&e.radius!==void 0&&e.startOctant!==void 0&&e.octantCount!==void 0&&e.isClockwise!==void 0){this.center=e.center.clone(),this.radius=e.radius,this.isClockwise=e.isClockwise,this.startAngle=e.startOctant*qX;let t=(e.octantCount===0?8:e.octantCount)*qX;this.endAngle=this.startAngle+(this.isClockwise?-t:t),this.start=this.center.clone().add(new rr(this.radius*Math.cos(this.startAngle),this.radius*Math.sin(this.startAngle))),this.end=this.center.clone().add(new rr(this.radius*Math.cos(this.endAngle),this.radius*Math.sin(this.endAngle)))}else throw new Error("Invalid arc parameters")}tessellate(e=Math.PI/18){if(this.radius===0)return[this.start.clone(),this.end.clone()];let t=[this.start.clone()],n=Math.abs(this.endAngle-this.startAngle),i=Math.max(1,Math.floor(n/e));for(let o=1;o<i;o++){let a=o/i,s=this.isClockwise?this.startAngle-a*n:this.startAngle+a*n;t.push(this.center.clone().add(new rr(this.radius*Math.cos(s),this.radius*Math.sin(s))))}return t.push(this.end?this.end.clone():this.center.clone().add(new rr(this.radius*Math.cos(this.endAngle),this.radius*Math.sin(this.endAngle)))),t}},jwe=Math.PI/18,Vwe=1e-6,eB=class{constructor(e){this.shapeCache=new Map,this.subshapeCache=new Map,this.shapeData=new Map,this.fontData=e}release(){this.shapeCache.clear(),this.subshapeCache.clear(),this.shapeData.clear()}getCharShape(e,t){let n=this.fontData.header.fontType===_n.SHAPES&&!(0 in this.fontData.content.data)?t:t/this.fontData.content.height;return this.parseAndScale(e,{factor:n})}parseAndScale(e,t){if(e===0)return;let n;if(this.shapeCache.has(e))n=this.shapeCache.get(e);else{let i=this.fontData.content.data;if(i[e]){let o=this.prepareBigfontGlyphBytecode(e,i[e]),a=this.fontData.header.fontType!==_n.BIGFONT;n=this.parseShape(o,{flushOnEnd:!0,initialPenDown:a}),this.shapeData.set(e,n),this.shapeCache.set(e,n)}}if(n){if(t.factor!==void 0)return this.scaleShapeByFactor(n,t.factor);if(t.height!==void 0){let i=t.width??t.height;return this.scaleShapeByHeightAndWidth(n,t.height,i)}else return n}}prepareBigfontGlyphBytecode(e,t){if(this.fontData.header.fontType!==_n.BIGFONT||e<=255)return t;let n=e>>8&255,i=e&255;if(t.length>=2&&t[0]===n&&t[1]===i){let o=2;return t[o]===0&&o++,t.slice(o)}return t}isVerticalDualBigfontMarker(e,t,n){return this.fontData.content.verticalDualMode?n==="open"?e[t]===142:e[t]===143:!1}scaleShapeByFactor(e,t){var n;return new Xy((n=e.lastPoint)==null?void 0:n.clone().multiply(t),e.polylines.map(i=>i.map(o=>o.clone().multiply(t))),e.hasExplicitAdvance)}scaleShapeByHeightAndWidth(e,t,n){var i;let o=e.bbox,a=o.maxY-o.minY,s=o.maxX-o.minX,l=a>0?t/a:1,c=s>0?n/s:1,u=(i=e.lastPoint)==null?void 0:i.clone();u&&(u.x*=c,u.y*=l);let h=e.polylines.map(d=>d.map(p=>{let f=p.clone();return f.x*=c,f.y*=l,f}));return new Xy(u,h,e.hasExplicitAdvance)}shouldSkipVerticalFlagCommand(e=!1){let{content:t,header:n}=this.fontData;return n.fontType===_n.BIGFONT?!t.verticalDualMode:t.dualOrientation?!e:t.orientation==="horizontal"}markAdvanceDefined(e){e.hasExplicitAdvance=!0}notePenUpPositioning(e){e.pendingTerminalAdvance=!0}clearPendingAdvance(e){e.pendingTerminalAdvance=!1}stateHasInk(e){return e.currentPolyline.length>1?!0:e.polylines.some(t=>t.length>=2)}finalizeAdvanceFlag(e){if(!e.pendingTerminalAdvance)return;let t=e.currentPoint.x;if(Math.abs(t)>Vwe){e.hasExplicitAdvance=!0;return}this.stateHasInk(e)||(e.hasExplicitAdvance=!0)}parseShape(e,t={}){let n=new rr,i=[],o=[],a=[],s=t.initialPenDown??!1;s&&o.push(n.clone());let l={currentPoint:n,polylines:i,currentPolyline:o,sp:a,isPenDown:s,scale:1,flushEndPolyline:t.flushOnEnd??!1,hasExplicitAdvance:!1,pendingTerminalAdvance:!1};for(let c=0;c<e.length;c++){let u=e[c];u<=15?c=this.handleSpecialCommand(u,e,c,l):(this.clearPendingAdvance(l),this.handleVectorCommand(u,l))}return this.finalizeAdvanceFlag(l),this.buildShapeFromState(l)}buildShapeFromState(e){let t=e.polylines.map(n=>n.map(i=>i.clone()));return e.currentPolyline.length>1&&t.push(e.currentPolyline.map(n=>n.clone())),new Xy(e.currentPoint.clone(),t,e.hasExplicitAdvance)}handleSpecialCommand(e,t,n,i){let o=n;switch(e){case 0:this.finalizeAdvanceFlag(i),i.flushEndPolyline&&i.currentPolyline.length>1?(i.polylines.push(i.currentPolyline.slice()),i.currentPolyline=[]):i.flushEndPolyline&&(i.currentPolyline=[]),i.isPenDown=!1;break;case 1:this.clearPendingAdvance(i),i.isPenDown||i.currentPolyline.push(i.currentPoint.clone()),i.isPenDown=!0;break;case 2:i.isPenDown=!1,i.currentPolyline.length>1&&i.polylines.push(i.currentPolyline.slice()),i.currentPolyline=[];break;case 3:this.clearPendingAdvance(i),o++,i.scale/=t[o];break;case 4:this.clearPendingAdvance(i),o++,i.scale*=t[o];break;case 5:if(this.clearPendingAdvance(i),i.sp.length===4)throw new Error("The position stack is only four locations deep");i.sp.push(i.currentPoint.clone());break;case 6:this.clearPendingAdvance(i),i.currentPoint=i.sp.pop()??i.currentPoint,i.currentPolyline.length>1&&(i.polylines.push(i.currentPolyline.slice()),i.currentPolyline=[]),i.isPenDown&&i.currentPolyline.push(i.currentPoint.clone());break;case 7:this.clearPendingAdvance(i),o=this.handleSubshapeCommand(t,o,i);break;case 8:o=this.handleXYDisplacement(t,o,i);break;case 9:o=this.handleMultipleXYDisplacements(t,o,i);break;case 10:this.clearPendingAdvance(i),o=this.handleOctantArc(t,o,i);break;case 11:this.clearPendingAdvance(i),o=this.handleFractionalArc(t,o,i);break;case 12:this.clearPendingAdvance(i),o=this.handleBulgeArc(t,o,i);break;case 13:this.clearPendingAdvance(i),o=this.handleMultipleBulgeArcs(t,o,i);break;case 14:this.clearPendingAdvance(i),this.shouldSkipVerticalFlagCommand()&&(o=this.skipCode(t,++o));break}return o}handleVectorCommand(e,t){let n=(e&240)>>4,i=e&15,o=this.getVectorForDirection(i);t.currentPoint.add(o.multiply(n*t.scale)),t.isPenDown&&t.currentPolyline.push(t.currentPoint.clone())}getVectorForDirection(e){let t=new rr;switch(e){case 0:t.x=1;break;case 1:t.x=1,t.y=.5;break;case 2:t.x=1,t.y=1;break;case 3:t.x=.5,t.y=1;break;case 4:t.y=1;break;case 5:t.x=-.5,t.y=1;break;case 6:t.x=-1,t.y=1;break;case 7:t.x=-1,t.y=.5;break;case 8:t.x=-1;break;case 9:t.x=-1,t.y=-.5;break;case 10:t.x=-1,t.y=-1;break;case 11:t.x=-.5,t.y=-1;break;case 12:t.y=-1;break;case 13:t.x=.5,t.y=-1;break;case 14:t.x=1,t.y=-1;break;case 15:t.x=1,t.y=-.5;break}return t}handleSubshapeCommand(e,t,n){let i=t,o=0,a,s=n.scale*this.fontData.content.baseUp,l=s,c=n.currentPoint.clone();switch(n.currentPolyline.length>1&&(n.polylines.push(n.currentPolyline.slice()),n.currentPolyline=[]),this.fontData.header.fontType){case _n.SHAPES:i++,o=e[i];break;case _n.BIGFONT:if(i++,this.isVerticalDualBigfontMarker(e,i,"open"))return i;if(this.isVerticalDualBigfontMarker(e,i,"close"))return i+1;o=e[i],o===0&&(i++,o=e[i++]<<8|e[i++],c.x=Gi.byteToSByte(e[i++])*n.scale,c.y=Gi.byteToSByte(e[i++])*n.scale,this.fontData.content.isExtended?(l=e[i++]*n.scale,s=e[i]*n.scale):(s=e[i]*n.scale,l=s));break;case _n.UNIFONT:i++,o=e[i++]<<8|e[i++],i--;break}if(o!==0)if(this.fontData.header.fontType===_n.UNIFONT){let u=n.isPenDown;a=this.getScaledSubshapeAtInsertPoint(o,l,s,c,u),a!=null&&a.polylines.some(h=>h.length>=2)&&(n.polylines.push(...a.polylines.slice()),a.lastPoint&&(n.currentPoint=a.lastPoint.clone()),n.currentPolyline=[],n.isPenDown&&n.currentPolyline.push(n.currentPoint.clone()))}else if(this.fontData.header.fontType===_n.SHAPES)a=this.getScaledSubshapeAtInsertPoint(o,l,s,c),a&&(n.polylines.push(...a.polylines.slice()),a.lastPoint&&(n.currentPoint=a.lastPoint.clone(),a.hasExplicitAdvance&&this.markAdvanceDefined(n))),n.currentPolyline=[],n.isPenDown&&n.currentPolyline.push(n.currentPoint.clone());else{if(a=this.getScaledSubshapeAtInsertPoint(o,l,s,c),a&&(n.polylines.push(...a.polylines.slice()),o===2&&a.lastPoint)){let u=a.lastPoint.x-c.x;u>n.currentPoint.x&&(n.currentPoint.x=u),this.markAdvanceDefined(n)}n.currentPolyline=[]}return i}handleXYDisplacement(e,t,n){let i=t,o=new rr;return o.x=Gi.byteToSByte(e[++i]),o.y=Gi.byteToSByte(e[++i]),n.currentPoint.add(o.multiply(n.scale)),n.isPenDown?n.currentPolyline.push(n.currentPoint.clone()):this.notePenUpPositioning(n),i}handleMultipleXYDisplacements(e,t,n){let i=t;for(;!(i+1>=e.length);){let o=new rr;if(o.x=Gi.byteToSByte(e[++i]),o.y=Gi.byteToSByte(e[++i]),o.x===0&&o.y===0)break;n.currentPoint.add(o.multiply(n.scale)),n.isPenDown?n.currentPolyline.push(n.currentPoint.clone()):this.notePenUpPositioning(n)}return i}handleOctantArc(e,t,n){let i=t,o=e[++i]*n.scale,a=Gi.byteToSByte(e[++i]),s=(a&112)>>4,l=a&7,c=a<0,u=Math.PI/4*s,h=n.currentPoint.clone().subtract(new rr(Math.cos(u)*o,Math.sin(u)*o)),d=RE.fromOctant(h,o,s,l,c).tessellate();return n.isPenDown&&(n.currentPolyline.pop(),n.currentPolyline.push(...d.slice())),n.currentPoint=d[d.length-1].clone(),i}handleFractionalArc(e,t,n){let i=t,o=e[++i],a=e[++i],s=e[++i],l=e[++i],c=(s*255+l)*n.scale,u=Gi.byteToSByte(e[++i]),h=(u&112)>>4,d=u&7;d===0&&(d=8),a!==0&&d--;let p=Math.PI/4,f=p*d,m=jwe,g=1;u<0&&(m=-m,f=-f,g=-1);let y=p*h,b=y+f;y+=p*o/256*g,b+=p*a/256*g;let v=n.currentPoint.clone().subtract(new rr(c*Math.cos(y),c*Math.sin(y)));if(n.currentPoint=v.clone().add(new rr(c*Math.cos(b),c*Math.sin(b))),n.isPenDown){let x=y,w=[];if(w.push(v.clone().add(new rr(c*Math.cos(x),c*Math.sin(x)))),m>0)for(;x+m<b;)x+=m,w.push(v.clone().add(new rr(c*Math.cos(x),c*Math.sin(x))));else for(;x+m>b;)x+=m,w.push(v.clone().add(new rr(c*Math.cos(x),c*Math.sin(x))));w.push(v.clone().add(new rr(c*Math.cos(b),c*Math.sin(b)))),n.currentPolyline.push(...w)}return i}handleBulgeArc(e,t,n){let i=t,o=new rr;o.x=Gi.byteToSByte(e[++i]),o.y=Gi.byteToSByte(e[++i]);let a=Gi.byteToSByte(e[++i]);return n.currentPoint=this.handleArcSegment(n.currentPoint,o,a,n.scale,n.isPenDown,n.currentPolyline),i}handleMultipleBulgeArcs(e,t,n){let i=t;for(;!(i+1>=e.length);){let o=new rr;if(o.x=Gi.byteToSByte(e[++i]),o.y=Gi.byteToSByte(e[++i]),o.x===0&&o.y===0||i+1>=e.length)break;let a=Gi.byteToSByte(e[++i]);n.currentPoint=this.handleArcSegment(n.currentPoint,o,a,n.scale,n.isPenDown,n.currentPolyline)}return i}skipCode(e,t){switch(e[t]){case 0:break;case 1:break;case 2:break;case 3:case 4:t++;break;case 5:break;case 6:break;case 7:switch(this.fontData.header.fontType){case _n.SHAPES:t++;break;case _n.BIGFONT:t++,this.isVerticalDualBigfontMarker(e,t,"open")?t++:this.isVerticalDualBigfontMarker(e,t,"close")?t+=2:e[t]===0&&(t+=this.fontData.content.isExtended?6:5);break;case _n.UNIFONT:t+=2;break}break;case 8:t+=2;break;case 9:for(;t++,!(t>=e.length);){let n=e[t];if(t++,t>=e.length)break;let i=e[t];if(n===0&&i===0)break}break;case 10:t+=2;break;case 11:t+=5;break;case 12:t+=3;break;case 13:for(;t++,!(t>=e.length);){let n=e[t];if(t++,t>=e.length)break;let i=e[t];if(n===0&&i===0)break;t++}break}return t}getScaledSubshapeAtInsertPoint(e,t,n,i,o=!1){let a;if(o){let c=this.fontData.content.data[e];if(!c)return;a=this.parseShape(c,{initialPenDown:!0,flushOnEnd:!0})}else if(a=this.subshapeCache.get(e),!a){let c=this.fontData.content.data[e];if(!c)return;let u=this.fontData.header.fontType!==_n.BIGFONT;a=this.parseShape(c,{flushOnEnd:!1,initialPenDown:u}),this.shapeData.set(e,a),this.subshapeCache.set(e,a)}let s=this.fontData.header.fontType===_n.BIGFONT?void 0:n/this.fontData.content.baseUp,l=a.polylines.some(c=>c.length>0);return(s!==void 0?this.scaleShapeByFactor(a,s):this.scaleShapeByHeightAndWidth(l?a.normalizeToOrigin(!0):a,n,t)).offset(i,!1)}handleArcSegment(e,t,n,i,o,a){t.x*=i,t.y*=i,n<-127&&(n=-127);let s=e.clone();if(o)if(n===0)a.push(s.clone().add(t));else{let l=s.clone().add(t),c=RE.fromBulge(s,l,n/127).tessellate();a.push(...c.slice(1))}return s.add(t),s}},cd=class{constructor(e){if(e instanceof ArrayBuffer){let t=new Gi(e),n=new K4().parse(t),i=Q4.createParser(n.fontType).parse(t);this.fontData={header:n,content:i}}else this.fontData=e;this.shapeParser=new eB(this.fontData)}hasChar(e){return this.fontData.content.data[e]!==void 0}hasShape(e){return this.getShapeCode(e)!==void 0}getShapeCode(e){let t=this.fontData.content.names;if(t)return t[e.toUpperCase()]}getShapeName(e){var t;let n=(t=this.fontData.content.codeToName)==null?void 0:t[e];if(n!==void 0)return n;let i=this.fontData.content.names;if(i){for(let[o,a]of Object.entries(i))if(a===e)return o}}getFontMetrics(e){return tC(this.fontData.content,e)}getLayoutCharShape(e,t,n=eC){let i=this.getCharShape(e,t);if(i)return Uwe(i,this.fontData,t,n,this.usesUnifontBaselineOriginFont(t),this.getBigfontBaselineInkPaddingNative())}getBigfontBaselineInkPaddingNative(){if(this.bigfontBaselineInkPaddingNative===void 0){let e=this.fontData.content.height;this.bigfontBaselineInkPaddingNative=Fwe(this.fontData,t=>this.getCharShape(t,e))}return this.bigfontBaselineInkPaddingNative}usesUnifontBaselineOriginFont(e){return this.unifontBaselineOriginFont===void 0&&(this.unifontBaselineOriginFont=Nwe(this.fontData,t=>this.getCharShape(t,e),e)),this.unifontBaselineOriginFont}getShapeByName(e,t){let n=this.getShapeCode(e);if(n!==void 0)return this.getCharShape(n,t)}getCharShape(e,t){return this.shapeParser.getCharShape(e,t)}release(){this.shapeParser.release()}};function Gwe(r,e,t,n=eC){let i=tC(e.content,t);return n.resolve(r,i.cellWidth)}var tB=(r,e)=>e.some(t=>r instanceof t),ZX,JX;function Hwe(){return ZX||(ZX=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Wwe(){return JX||(JX=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var nB=new WeakMap,M4=new WeakMap,nC=new WeakMap;function Xwe(r){let e=new Promise((t,n)=>{let i=()=>{r.removeEventListener("success",o),r.removeEventListener("error",a)},o=()=>{t(Ef(r.result)),i()},a=()=>{n(r.error),i()};r.addEventListener("success",o),r.addEventListener("error",a)});return nC.set(e,r),e}function Ywe(r){if(nB.has(r))return;let e=new Promise((t,n)=>{let i=()=>{r.removeEventListener("complete",o),r.removeEventListener("error",a),r.removeEventListener("abort",a)},o=()=>{t(),i()},a=()=>{n(r.error||new DOMException("AbortError","AbortError")),i()};r.addEventListener("complete",o),r.addEventListener("error",a),r.addEventListener("abort",a)});nB.set(r,e)}var rB={get(r,e,t){if(r instanceof IDBTransaction){if(e==="done")return nB.get(r);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Ef(r[e])},set(r,e,t){return r[e]=t,!0},has(r,e){return r instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in r}};function U$(r){rB=r(rB)}function $we(r){return Wwe().includes(r)?function(...e){return r.apply(iB(this),e),Ef(this.request)}:function(...e){return Ef(r.apply(iB(this),e))}}function Kwe(r){return typeof r=="function"?$we(r):(r instanceof IDBTransaction&&Ywe(r),tB(r,Hwe())?new Proxy(r,rB):r)}function Ef(r){if(r instanceof IDBRequest)return Xwe(r);if(M4.has(r))return M4.get(r);let e=Kwe(r);return e!==r&&(M4.set(r,e),nC.set(e,r)),e}var iB=r=>nC.get(r);function qwe(r,e,{blocked:t,upgrade:n,blocking:i,terminated:o}={}){let a=indexedDB.open(r,e),s=Ef(a);return n&&a.addEventListener("upgradeneeded",l=>{n(Ef(a.result),l.oldVersion,l.newVersion,Ef(a.transaction),l)}),t&&a.addEventListener("blocked",l=>t(l.oldVersion,l.newVersion,l)),s.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}var Zwe=["get","getKey","getAll","getAllKeys","count"],Jwe=["put","add","delete","clear"],P4=new Map;function QX(r,e){if(!(r instanceof IDBDatabase&&!(e in r)&&typeof e=="string"))return;if(P4.get(e))return P4.get(e);let t=e.replace(/FromIndex$/,""),n=e!==t,i=Jwe.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Zwe.includes(t)))return;let o=async function(a,...s){let l=this.transaction(a,i?"readwrite":"readonly"),c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[t](...s),i&&l.done]))[0]};return P4.set(e,o),o}U$(r=>({...r,get:(e,t,n)=>QX(e,t)||r.get(e,t,n),has:(e,t)=>!!QX(e,t)||r.has(e,t)}));var Qwe=["continue","continuePrimaryKey","advance"],eY={},oB=new WeakMap,j$=new WeakMap,e_e={get(r,e){if(!Qwe.includes(e))return r[e];let t=eY[e];return t||(t=eY[e]=function(...n){oB.set(this,j$.get(this)[e](...n))}),t}};async function*t_e(...r){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...r)),!e)return;e=e;let t=new Proxy(e,e_e);for(j$.set(t,e),nC.set(t,iB(e));e;)yield t,e=await(oB.get(t)||e.continue()),oB.delete(t)}function tY(r,e){return e===Symbol.asyncIterator&&tB(r,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&tB(r,[IDBIndex,IDBObjectStore])}U$(r=>({...r,get(e,t,n){return tY(e,t)?t_e:r.get(e,t,n)},has(e,t){return tY(e,t)||r.has(e,t)}}));var Sf={fonts:"fonts"},aB=[{version:1,stores:[{name:Sf.fonts,keyPath:"name"}]},{version:2,stores:[{name:Sf.fonts,keyPath:"name"}]}],sB=class xc{constructor(){this.isClosing=!1,typeof window<"u"&&window.addEventListener("pagehide",e=>{e.persisted||this.close()})}static get instance(){return xc._instance||(xc._instance=new xc),xc._instance}async set(e,t){await(await this.getDatabase()).put(Sf.fonts,{...t,name:e})}async get(e){return await(await this.getDatabase()).get(Sf.fonts,e)}async find(e){let t=Ju(e).toLowerCase();return await this.get(t)||(await this.getAll()).find(i=>{var o;return i.name===t||((o=i.alias)==null?void 0:o.some(a=>a.toLowerCase()===t))})}async delete(e){await(await this.getDatabase()).delete(Sf.fonts,e)}async getAll(){return await(await this.getDatabase()).getAll(Sf.fonts)}async getStorageStats(){let e=(await this.getAll()).map(n=>({name:n.name,type:n.type,bytes:D$(n.data)})),t=e.reduce((n,i)=>n+i.bytes,0);return{fontCount:e.length,totalBytes:t,fonts:e}}async clear(){await(await this.getDatabase()).clear(Sf.fonts)}async has(e){return await this.get(e)!==void 0}close(){if(!this.isClosing){this.isClosing=!0;try{this.db&&(this.db.close(),this.db=void 0)}finally{this.isClosing=!1}}}async destroy(){this.close(),await indexedDB.deleteDatabase(xc.DATABASE_NAME),xc._instance=void 0}async getDatabase(){if(this.isClosing)throw new Error("Cannot perform operation while database is closing");return this.db?this.db:(this.db=await qwe(xc.DATABASE_NAME,xc.DATABASE_VERSION,{upgrade:(e,t,n)=>this.handleUpgrade(e,t,n),blocked(){console.warn("Database upgrade blocked - please close other tabs using the application")},blocking(){console.warn("Database blocking newer version - closing connection"),xc.instance.close()}}),this.db)}handleUpgrade(e,t,n){let i=aB.filter(o=>o.version>t&&(!n||o.version<=n));for(let o of i)this.applySchemaVersion(e,o)}applySchemaVersion(e,t){for(let n of t.stores)e.objectStoreNames.contains(n.name)||e.createObjectStore(n.name,{keyPath:n.keyPath})}};sB.DATABASE_NAME="mlightcad",sB.DATABASE_VERSION=aB[aB.length-1].version;var Ts=sB,n_e=512;function r_e(r,e){return(r+e)*n_e}var i_e=2.5,o_e=1.5;function V$(){return{meshCount:0,lineCount:0,estimatedBytes:0}}var lB={minimal:["txt","simsun"],r12r14:["txt","simplex","romans","gbcbig","simsun"],modern:["simsun","hztxt"],international:["txt","simplex","romans","simsun"],cjk:["simsun","malgun","msgothic","gbcbig","hztxt","extfont2","extfont","whgtxt","whgdtxt"],chinese:["simsun","gbcbig","hztxt"],korean:["malgun","whgtxt","whgdtxt"],japanese:["msgothic","extfont2","extfont"]},E4={minimal:["simplex","amgdt"],r12r14:["simplex","amgdt"],modern:["simplex","amgdt"],international:["simplex","amgdt"],cjk:["simplex","amgdt"],chinese:["simplex","amgdt"],korean:["simplex","amgdt"],japanese:["simplex","amgdt"]};function nY(r){return Object.prototype.hasOwnProperty.call(lB,r)}var IB=0,G$=-3;function y_(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function a_e(r,e){this.source=r,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new y_,this.dtree=new y_}var H$=new y_,W$=new y_,LB=new Uint8Array(30),OB=new Uint16Array(30),X$=new Uint8Array(30),Y$=new Uint16Array(30),s_e=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rY=new y_,vc=new Uint8Array(320);function $$(r,e,t,n){var i,o;for(i=0;i<t;++i)r[i]=0;for(i=0;i<30-t;++i)r[i+t]=i/t|0;for(o=n,i=0;i<30;++i)e[i]=o,o+=1<<r[i]}function l_e(r,e){var t;for(t=0;t<7;++t)r.table[t]=0;for(r.table[7]=24,r.table[8]=152,r.table[9]=112,t=0;t<24;++t)r.trans[t]=256+t;for(t=0;t<144;++t)r.trans[24+t]=t;for(t=0;t<8;++t)r.trans[168+t]=280+t;for(t=0;t<112;++t)r.trans[176+t]=144+t;for(t=0;t<5;++t)e.table[t]=0;for(e.table[5]=32,t=0;t<32;++t)e.trans[t]=t}var iY=new Uint16Array(16);function C4(r,e,t,n){var i,o;for(i=0;i<16;++i)r.table[i]=0;for(i=0;i<n;++i)r.table[e[t+i]]++;for(r.table[0]=0,o=0,i=0;i<16;++i)iY[i]=o,o+=r.table[i];for(i=0;i<n;++i)e[t+i]&&(r.trans[iY[e[t+i]]++]=i)}function c_e(r){r.bitcount--||(r.tag=r.source[r.sourceIndex++],r.bitcount=7);var e=r.tag&1;return r.tag>>>=1,e}function _c(r,e,t){if(!e)return t;for(;r.bitcount<24;)r.tag|=r.source[r.sourceIndex++]<<r.bitcount,r.bitcount+=8;var n=r.tag&65535>>>16-e;return r.tag>>>=e,r.bitcount-=e,n+t}function cB(r,e){for(;r.bitcount<24;)r.tag|=r.source[r.sourceIndex++]<<r.bitcount,r.bitcount+=8;var t=0,n=0,i=0,o=r.tag;do n=2*n+(o&1),o>>>=1,++i,t+=e.table[i],n-=e.table[i];while(n>=0);return r.tag=o,r.bitcount-=i,e.trans[t+n]}function u_e(r,e,t){var n,i,o,a,s,l;for(n=_c(r,5,257),i=_c(r,5,1),o=_c(r,4,4),a=0;a<19;++a)vc[a]=0;for(a=0;a<o;++a){var c=_c(r,3,0);vc[s_e[a]]=c}for(C4(rY,vc,0,19),s=0;s<n+i;){var u=cB(r,rY);switch(u){case 16:var h=vc[s-1];for(l=_c(r,2,3);l;--l)vc[s++]=h;break;case 17:for(l=_c(r,3,3);l;--l)vc[s++]=0;break;case 18:for(l=_c(r,7,11);l;--l)vc[s++]=0;break;default:vc[s++]=u;break}}C4(e,vc,0,n),C4(t,vc,n,i)}function oY(r,e,t){for(;;){var n=cB(r,e);if(n===256)return IB;if(n<256)r.dest[r.destLen++]=n;else{var i,o,a,s;for(n-=257,i=_c(r,LB[n],OB[n]),o=cB(r,t),a=r.destLen-_c(r,X$[o],Y$[o]),s=a;s<a+i;++s)r.dest[r.destLen++]=r.dest[s]}}}function h_e(r){for(var e,t,n;r.bitcount>8;)r.sourceIndex--,r.bitcount-=8;if(e=r.source[r.sourceIndex+1],e=256*e+r.source[r.sourceIndex],t=r.source[r.sourceIndex+3],t=256*t+r.source[r.sourceIndex+2],e!==(~t&65535))return G$;for(r.sourceIndex+=4,n=e;n;--n)r.dest[r.destLen++]=r.source[r.sourceIndex++];return r.bitcount=0,IB}function K$(r,e){var t=new a_e(r,e),n,i,o;do{switch(n=c_e(t),i=_c(t,2,0),i){case 0:o=h_e(t);break;case 1:o=oY(t,H$,W$);break;case 2:u_e(t,t.ltree,t.dtree),o=oY(t,t.ltree,t.dtree);break;default:o=G$}if(o!==IB)throw new Error("Data error")}while(!n);return t.destLen<t.dest.length?typeof t.dest.slice=="function"?t.dest.slice(0,t.destLen):t.dest.subarray(0,t.destLen):t.dest}l_e(H$,W$);$$(LB,OB,4,3);$$(X$,Y$,2,1);LB[28]=0;OB[28]=258;function Gy(r,e,t,n,i){return Math.pow(1-i,3)*r+3*Math.pow(1-i,2)*i*e+3*(1-i)*Math.pow(i,2)*t+Math.pow(i,3)*n}function If(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}If.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)};If.prototype.addPoint=function(r,e){typeof r=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=r,this.x2=r),r<this.x1&&(this.x1=r),r>this.x2&&(this.x2=r)),typeof e=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))};If.prototype.addX=function(r){this.addPoint(r,null)};If.prototype.addY=function(r){this.addPoint(null,r)};If.prototype.addBezier=function(r,e,t,n,i,o,a,s){let l=[r,e],c=[t,n],u=[i,o],h=[a,s];this.addPoint(r,e),this.addPoint(a,s);for(let d=0;d<=1;d++){let p=6*l[d]-12*c[d]+6*u[d],f=-3*l[d]+9*c[d]-9*u[d]+3*h[d],m=3*c[d]-3*l[d];if(f===0){if(p===0)continue;let v=-m/p;0<v&&v<1&&(d===0&&this.addX(Gy(l[d],c[d],u[d],h[d],v)),d===1&&this.addY(Gy(l[d],c[d],u[d],h[d],v)));continue}let g=Math.pow(p,2)-4*m*f;if(g<0)continue;let y=(-p+Math.sqrt(g))/(2*f);0<y&&y<1&&(d===0&&this.addX(Gy(l[d],c[d],u[d],h[d],y)),d===1&&this.addY(Gy(l[d],c[d],u[d],h[d],y)));let b=(-p-Math.sqrt(g))/(2*f);0<b&&b<1&&(d===0&&this.addX(Gy(l[d],c[d],u[d],h[d],b)),d===1&&this.addY(Gy(l[d],c[d],u[d],h[d],b)))}};If.prototype.addQuad=function(r,e,t,n,i,o){let a=r+.6666666666666666*(t-r),s=e+2/3*(n-e),l=a+1/3*(i-r),c=s+1/3*(o-e);this.addBezier(r,e,a,s,l,c,i,o)};var q$=If;function ui(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}var l_={};function Z$(r,e){let t=Math.floor(r),n=r-t;if(l_[e]||(l_[e]={}),l_[e][n]!==void 0){let o=l_[e][n];return t+o}let i=+(Math.round(n+"e+"+e)+"e-"+e);return l_[e][n]=i,t+i}function J$(r){let e=[[]],t=0,n=0;for(let i=0;i<r.length;i+=1){let o=e[e.length-1],a=r[i],s=o[0],l=o[1],c=o[o.length-1],u=r[i+1];o.push(a),a.type==="M"?(t=a.x,n=a.y):a.type==="L"&&(!u||u.type==="Z")?Math.abs(a.x-t)>1||Math.abs(a.y-n)>1||o.pop():a.type==="L"&&c&&c.x===a.x&&c.y===a.y?o.pop():a.type==="Z"&&(s&&l&&c&&s.type==="M"&&l.type==="L"&&c.type==="L"&&c.x===s.x&&c.y===s.y&&(o.shift(),o[0].type="M"),i+1<r.length&&e.push([]))}return r=[].concat.apply([],e),r}function d_e(r){return Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0,scale:1,x:0,y:0},r)}function p_e(r){return parseInt(r)===r&&(r={decimalPlaces:r,flipY:!1}),Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0},r)}ui.prototype.fromSVG=function(r,e={}){typeof SVGPathElement<"u"&&r instanceof SVGPathElement&&(r=r.getAttribute("d")),e=d_e(e),this.commands=[];let t="0123456789",n="MmLlQqCcZzHhVv",i="SsTtAa",o="-+",a={},s=[""],l=!1;function c(f){return f.filter(m=>m.length).map(m=>{let g=parseFloat(m);return(e.decimalPlaces||e.decimalPlaces===0)&&(g=Z$(g,e.decimalPlaces)),g})}function u(f){if(!this.commands.length)return f;let m=this.commands[this.commands.length-1];for(let g=0;g<f.length;g++)f[g]+=m[g&1?"y":"x"];return f}function h(){if(a.type===void 0)return;let f=a.type.toUpperCase(),m=f!=="Z"&&a.type.toUpperCase()!==a.type,g=c(s);if(s=[""],!g.length&&f!=="Z")return;m&&f!=="H"&&f!=="V"&&(g=u.apply(this,[g]));let y=this.commands.length&&this.commands[this.commands.length-1].x||0,b=this.commands.length&&this.commands[this.commands.length-1].y||0;switch(f){case"M":this.moveTo(...g);break;case"L":this.lineTo(...g);break;case"V":for(let v=0;v<g.length;v++){let x=0;m&&(x=this.commands.length&&this.commands[this.commands.length-1].y||0),this.lineTo(y,g[v]+x)}break;case"H":for(let v=0;v<g.length;v++){let x=0;m&&(x=this.commands.length&&this.commands[this.commands.length-1].x||0),this.lineTo(g[v]+x,b)}break;case"C":this.bezierCurveTo(...g);break;case"Q":this.quadraticCurveTo(...g);break;case"Z":(this.commands.length<1||this.commands[this.commands.length-1].type!=="Z")&&this.close();break}if(this.commands.length)for(let v in this.commands[this.commands.length-1])this.commands[this.commands.length-1][v]===void 0&&(this.commands[this.commands.length-1][v]=0)}for(let f=0;f<r.length;f++){let m=r.charAt(f),g=s[s.length-1];if(t.indexOf(m)>-1)s[s.length-1]+=m;else if(o.indexOf(m)>-1)if(!a.type&&!this.commands.length&&(a.type="L"),m==="-")!a.type||g.indexOf("-")>0?l=!0:g.length?s.push("-"):s[s.length-1]=m;else if(!a.type||g.length>0)l=!0;else continue;else if(n.indexOf(m)>-1)a.type?(h.apply(this),a={type:m}):a.type=m;else{if(i.indexOf(m)>-1)throw new Error("Unsupported path command: "+m+". Currently supported commands are "+n.split("").join(", ")+".");` ,
  3977. \r\f\v`.indexOf(m)>-1?s.push(""):m==="."?!a.type||g.indexOf(m)>-1?l=!0:s[s.length-1]+=m:l=!0}if(l)throw new Error("Unexpected character: "+m+" at offset "+f)}h.apply(this),e.optimize&&(this.commands=J$(this.commands));let d=e.flipY,p=e.flipYBase;if(d===!0&&e.flipYBase===void 0){let f=this.getBoundingBox();p=f.y1+f.y2}for(let f in this.commands){let m=this.commands[f];for(let g in m)["x","x1","x2"].includes(g)?this.commands[f][g]=e.x+m[g]*e.scale:["y","y1","y2"].includes(g)&&(this.commands[f][g]=e.y+(d?p-m[g]:m[g])*e.scale)}return this};ui.fromSVG=function(r,e){return new ui().fromSVG(r,e)};ui.prototype.moveTo=function(r,e){this.commands.push({type:"M",x:r,y:e})};ui.prototype.lineTo=function(r,e){this.commands.push({type:"L",x:r,y:e})};ui.prototype.curveTo=ui.prototype.bezierCurveTo=function(r,e,t,n,i,o){this.commands.push({type:"C",x1:r,y1:e,x2:t,y2:n,x:i,y:o})};ui.prototype.quadTo=ui.prototype.quadraticCurveTo=function(r,e,t,n){this.commands.push({type:"Q",x1:r,y1:e,x:t,y:n})};ui.prototype.close=ui.prototype.closePath=function(){this.commands.push({type:"Z"})};ui.prototype.extend=function(r){if(r.commands)r=r.commands;else if(r instanceof q$){let e=r;this.moveTo(e.x1,e.y1),this.lineTo(e.x2,e.y1),this.lineTo(e.x2,e.y2),this.lineTo(e.x1,e.y2),this.close();return}Array.prototype.push.apply(this.commands,r)};ui.prototype.getBoundingBox=function(){let r=new q$,e=0,t=0,n=0,i=0;for(let o=0;o<this.commands.length;o++){let a=this.commands[o];switch(a.type){case"M":r.addPoint(a.x,a.y),e=n=a.x,t=i=a.y;break;case"L":r.addPoint(a.x,a.y),n=a.x,i=a.y;break;case"Q":r.addQuad(n,i,a.x1,a.y1,a.x,a.y),n=a.x,i=a.y;break;case"C":r.addBezier(n,i,a.x1,a.y1,a.x2,a.y2,a.x,a.y),n=a.x,i=a.y;break;case"Z":n=e,i=t;break;default:throw new Error("Unexpected path command "+a.type)}}return r.isEmpty()&&r.addPoint(0,0),r};ui.prototype.draw=function(r){let e=this._layers;if(e&&e.length){for(let n=0;n<e.length;n++)this.draw.call(e[n],r);return}let t=this._image;if(t){r.drawImage(t.image,t.x,t.y,t.width,t.height);return}r.beginPath();for(let n=0;n<this.commands.length;n+=1){let i=this.commands[n];i.type==="M"?r.moveTo(i.x,i.y):i.type==="L"?r.lineTo(i.x,i.y):i.type==="C"?r.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y):i.type==="Q"?r.quadraticCurveTo(i.x1,i.y1,i.x,i.y):i.type==="Z"&&this.stroke&&this.strokeWidth&&r.closePath()}this.fill&&(r.fillStyle=this.fill,r.fill()),this.stroke&&(r.strokeStyle=this.stroke,r.lineWidth=this.strokeWidth,r.stroke())};ui.prototype.toPathData=function(r){r=p_e(r);function e(s){let l=Z$(s,r.decimalPlaces);return Math.round(s)===l?""+l:l.toFixed(r.decimalPlaces)}function t(){let s="";for(let l=0;l<arguments.length;l+=1){let c=arguments[l];c>=0&&l>0&&(s+=" "),s+=e(c)}return s}let n=this.commands;r.optimize&&(n=JSON.parse(JSON.stringify(this.commands)),n=J$(n));let i=r.flipY,o=r.flipYBase;if(i===!0&&o===void 0){let s=new ui;s.extend(n);let l=s.getBoundingBox();o=l.y1+l.y2}let a="";for(let s=0;s<n.length;s+=1){let l=n[s];l.type==="M"?a+="M"+t(l.x,i?o-l.y:l.y):l.type==="L"?a+="L"+t(l.x,i?o-l.y:l.y):l.type==="C"?a+="C"+t(l.x1,i?o-l.y1:l.y1,l.x2,i?o-l.y2:l.y2,l.x,i?o-l.y:l.y):l.type==="Q"?a+="Q"+t(l.x1,i?o-l.y1:l.y1,l.x,i?o-l.y:l.y):l.type==="Z"&&(a+="Z")}return a};ui.prototype.toSVG=function(r,e){this._layers&&this._layers.length&&console.warn("toSVG() does not support colr font layers yet"),this._image&&console.warn("toSVG() does not support SVG glyphs yet"),e||(e=this.toPathData(r));let t='<path d="';return t+=e,t+='"',this.fill!==void 0&&this.fill!=="black"&&(this.fill===null?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>",t};ui.prototype.toDOMElement=function(r,e){this._layers&&this._layers.length&&console.warn("toDOMElement() does not support colr font layers yet"),e||(e=this.toPathData(r));let t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",e),this.fill!==void 0&&this.fill!=="black"&&(this.fill===null?t.setAttribute("fill","none"):t.setAttribute("fill",this.fill)),this.stroke&&(t.setAttribute("stroke",this.stroke),t.setAttribute("stroke-width",this.strokeWidth)),t};var Zy=ui;function Q$(r){throw new Error(r)}function aY(r,e){r||Q$(e)}var mt={fail:Q$,argument:aY,assert:aY},sY=32768,lY=2147483648,f_e=-32768,m_e=32767+1/65536,Jy={},Ye={},Tt={};function Al(r){return function(){return r}}Ye.BYTE=function(r){return mt.argument(r>=0&&r<=255,"Byte value should be between 0 and 255."),[r]};Tt.BYTE=Al(1);Ye.CHAR=function(r){return[r.charCodeAt(0)]};Tt.CHAR=Al(1);Ye.CHARARRAY=function(r){(r===null||typeof r>"u")&&(r="",console.warn("CHARARRAY with undefined or null value encountered and treated as an empty string. This is probably caused by a missing glyph name."));let e=[];for(let t=0;t<r.length;t+=1)e[t]=r.charCodeAt(t);return e};Tt.CHARARRAY=function(r){return typeof r>"u"?0:r.length};Ye.USHORT=function(r){return[r>>8&255,r&255]};Tt.USHORT=Al(2);Ye.SHORT=function(r){return r>=sY&&(r=-(2*sY-r)),[r>>8&255,r&255]};Tt.SHORT=Al(2);Ye.UINT24=function(r){return[r>>16&255,r>>8&255,r&255]};Tt.UINT24=Al(3);Ye.ULONG=function(r){return[r>>24&255,r>>16&255,r>>8&255,r&255]};Tt.ULONG=Al(4);Ye.LONG=function(r){return r>=lY&&(r=-(2*lY-r)),[r>>24&255,r>>16&255,r>>8&255,r&255]};Tt.LONG=Al(4);Ye.FLOAT=function(r){if(r>m_e||r<f_e)throw new Error(`Value ${r} is outside the range of representable values in 16.16 format`);let e=Math.round(r*65536)<<0;return Ye.ULONG(e)};Tt.FLOAT=Tt.ULONG;Ye.FIXED=Ye.ULONG;Tt.FIXED=Tt.ULONG;Ye.FWORD=Ye.SHORT;Tt.FWORD=Tt.SHORT;Ye.UFWORD=Ye.USHORT;Tt.UFWORD=Tt.USHORT;Ye.F2DOT14=function(r){return Ye.USHORT(r*16384)};Tt.F2DOT14=Tt.USHORT;Ye.LONGDATETIME=function(r){return[0,0,0,0,r>>24&255,r>>16&255,r>>8&255,r&255]};Tt.LONGDATETIME=Al(8);Ye.TAG=function(r){return mt.argument(r.length===4,"Tag should be exactly 4 ASCII characters."),[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3)]};Tt.TAG=Al(4);Ye.Card8=Ye.BYTE;Tt.Card8=Tt.BYTE;Ye.Card16=Ye.USHORT;Tt.Card16=Tt.USHORT;Ye.OffSize=Ye.BYTE;Tt.OffSize=Tt.BYTE;Ye.SID=Ye.USHORT;Tt.SID=Tt.USHORT;Ye.NUMBER=function(r){return r>=-107&&r<=107?[r+139]:r>=108&&r<=1131?(r=r-108,[(r>>8)+247,r&255]):r>=-1131&&r<=-108?(r=-r-108,[(r>>8)+251,r&255]):r>=-32768&&r<=32767?Ye.NUMBER16(r):Ye.NUMBER32(r)};Tt.NUMBER=function(r){return Ye.NUMBER(r).length};Ye.NUMBER16=function(r){return[28,r>>8&255,r&255]};Tt.NUMBER16=Al(3);Ye.NUMBER32=function(r){return[29,r>>24&255,r>>16&255,r>>8&255,r&255]};Tt.NUMBER32=Al(5);Ye.REAL=function(r){let e=r.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(e);if(t){let o=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));e=(Math.round(r*o)/o).toString()}let n="";for(let o=0,a=e.length;o<a;o+=1){let s=e[o];s==="e"?n+=e[++o]==="-"?"c":"b":s==="."?n+="a":s==="-"?n+="e":n+=s}n+=n.length&1?"f":"ff";let i=[30];for(let o=0,a=n.length;o<a;o+=2)i.push(parseInt(n.substr(o,2),16));return i};Tt.REAL=function(r){return Ye.REAL(r).length};Ye.NAME=Ye.CHARARRAY;Tt.NAME=Tt.CHARARRAY;Ye.STRING=Ye.CHARARRAY;Tt.STRING=Tt.CHARARRAY;Jy.UTF8=function(r,e,t){let n=[],i=t;for(let o=0;o<i;o++,e+=1)n[o]=r.getUint8(e);return String.fromCharCode.apply(null,n)};Jy.UTF16=function(r,e,t){let n=[],i=t/2;for(let o=0;o<i;o++,e+=2)n[o]=r.getUint16(e);return String.fromCharCode.apply(null,n)};Ye.UTF16=function(r){let e=[];for(let t=0;t<r.length;t+=1){let n=r.charCodeAt(t);e[e.length]=n>>8&255,e[e.length]=n&255}return e};Tt.UTF16=function(r){return r.length*2};var BE={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};Jy.MACSTRING=function(r,e,t,n){let i=BE[n];if(i===void 0)return;let o="";for(let a=0;a<t;a++){let s=r.getUint8(e+a);s<=127?o+=String.fromCharCode(s):o+=i[s&127]}return o};var gE=typeof WeakMap=="function"&&new WeakMap,yE,g_e=function(r){if(!yE){yE={};for(let i in BE)yE[i]=new String(i)}let e=yE[r];if(e===void 0)return;if(gE){let i=gE.get(e);if(i!==void 0)return i}let t=BE[r];if(t===void 0)return;let n={};for(let i=0;i<t.length;i++)n[t.charCodeAt(i)]=i+128;return gE&&gE.set(e,n),n};Ye.MACSTRING=function(r,e){let t=g_e(e);if(t===void 0)return;let n=[];for(let i=0;i<r.length;i++){let o=r.charCodeAt(i);if(o>=128&&(o=t[o],o===void 0))return;n[i]=o}return n};Tt.MACSTRING=function(r,e){let t=Ye.MACSTRING(r,e);return t!==void 0?t.length:0};function uB(r){return r>=-128&&r<=127}function y_e(r,e,t){let n=0,i=r.length;for(;e<i&&n<64&&r[e]===0;)++e,++n;return t.push(128|n-1),e}function b_e(r,e,t){let n=0,i=r.length,o=e;for(;o<i&&n<64;){let a=r[o];if(!uB(a)||a===0&&o+1<i&&r[o+1]===0)break;++o,++n}t.push(n-1);for(let a=e;a<o;++a)t.push(r[a]+256&255);return o}function v_e(r,e,t){let n=0,i=r.length,o=e;for(;o<i&&n<64;){let a=r[o];if(a===0||uB(a)&&o+1<i&&uB(r[o+1]))break;++o,++n}t.push(64|n-1);for(let a=e;a<o;++a){let s=r[a];t.push(s+65536>>8&255,s+256&255)}return o}Ye.VARDELTAS=function(r){let e=0,t=[];for(;e<r.length;){let n=r[e];n===0?e=y_e(r,e,t):n>=-128&&n<=127?e=b_e(r,e,t):e=v_e(r,e,t)}return t};Ye.INDEX=function(r){let e=1,t=[e],n=[];for(let s=0;s<r.length;s+=1){let l=Ye.OBJECT(r[s]);Array.prototype.push.apply(n,l),e+=l.length,t.push(e)}if(n.length===0)return[0,0];let i=[],o=1+Math.floor(Math.log(e)/Math.log(2))/8|0,a=[void 0,Ye.BYTE,Ye.USHORT,Ye.UINT24,Ye.ULONG][o];for(let s=0;s<t.length;s+=1){let l=a(t[s]);Array.prototype.push.apply(i,l)}return Array.prototype.concat(Ye.Card16(r.length),Ye.OffSize(o),i,n)};Tt.INDEX=function(r){return Ye.INDEX(r).length};Ye.DICT=function(r){let e=[],t=Object.keys(r),n=t.length;for(let i=0;i<n;i+=1){let o=parseInt(t[i],0),a=r[o],s=Ye.OPERAND(a.value,a.type),l=Ye.OPERATOR(o);for(let c=0;c<s.length;c++)e.push(s[c]);for(let c=0;c<l.length;c++)e.push(l[c])}return e};Tt.DICT=function(r){return Ye.DICT(r).length};Ye.OPERATOR=function(r){return r<1200?[r]:[12,r-1200]};Ye.OPERAND=function(r,e){let t=[];if(Array.isArray(e))for(let n=0;n<e.length;n+=1){mt.argument(r.length===e.length,"Not enough arguments given for type"+e);let i=Ye.OPERAND(r[n],e[n]);for(let o=0;o<i.length;o++)t.push(i[o])}else if(e==="SID"){let n=Ye.NUMBER(r);for(let i=0;i<n.length;i++)t.push(n[i])}else if(e==="offset"){let n=Ye.NUMBER32(r);for(let i=0;i<n.length;i++)t.push(n[i])}else if(e==="number"){let n=Ye.NUMBER(r);for(let i=0;i<n.length;i++)t.push(n[i])}else if(e==="real"){let n=Ye.REAL(r);for(let i=0;i<n.length;i++)t.push(n[i])}else throw new Error("Unknown operand type "+e);return t};Ye.OP=Ye.BYTE;Tt.OP=Tt.BYTE;var bE=typeof WeakMap=="function"&&new WeakMap;Ye.CHARSTRING=function(r){if(bE){let n=bE.get(r);if(n!==void 0)return n}let e=[],t=r.length;for(let n=0;n<t;n+=1){let i=r[n],o=Ye[i.type](i.value);for(let a=0;a<o.length;a++)e.push(o[a])}return bE&&bE.set(r,e),e};Tt.CHARSTRING=function(r){return Ye.CHARSTRING(r).length};Ye.OBJECT=function(r){let e=Ye[r.type];return mt.argument(e!==void 0,"No encoding function for type "+r.type),e(r.value)};Tt.OBJECT=function(r){let e=Tt[r.type];return mt.argument(e!==void 0,"No sizeOf function for type "+r.type),e(r.value)};Ye.TABLE=function(r){let e=[],t=(r.fields||[]).length,n=[],i=[];for(let o=0;o<t;o+=1){let a=r.fields[o],s=Ye[a.type];mt.argument(s!==void 0,"No encoding function for field type "+a.type+" ("+a.name+")");let l=r[a.name];l===void 0&&(l=a.value);let c=s(l);if(a.type==="TABLE")l.fields!==null&&(i.push(e.length),n.push(c)),e.push(0,0);else for(let u=0;u<c.length;u++)e.push(c[u])}for(let o=0;o<n.length;o+=1){let a=i[o],s=e.length;mt.argument(s<65536,"Table "+r.tableName+" too big."),e[a]=s>>8,e[a+1]=s&255;for(let l=0;l<n[o].length;l++)e.push(n[o][l])}return e};Tt.TABLE=function(r){let e=0,t=(r.fields||[]).length;for(let n=0;n<t;n+=1){let i=r.fields[n],o=Tt[i.type];mt.argument(o!==void 0,"No sizeOf function for field type "+i.type+" ("+i.name+")");let a=r[i.name];a===void 0&&(a=i.value),e+=o(a),i.type==="TABLE"&&(e+=2)}return e};Ye.RECORD=Ye.TABLE;Tt.RECORD=Tt.TABLE;Ye.LITERAL=function(r){return r};Tt.LITERAL=function(r){return r.length};function jr(r,e,t){if(e&&e.length)for(let n=0;n<e.length;n+=1){let i=e[n];this[i.name]=i.value}if(this.tableName=r,this.fields=e,t){let n=Object.keys(t);for(let i=0;i<n.length;i+=1){let o=n[i],a=t[o];this[o]!==void 0&&(this[o]=a)}}}jr.prototype.encode=function(){return Ye.TABLE(this)};jr.prototype.sizeOf=function(){return Tt.TABLE(this)};function Qy(r,e,t){t===void 0&&(t=e.length);let n=new Array(e.length+1);n[0]={name:r+"Count",type:"USHORT",value:t};for(let i=0;i<e.length;i++)n[i+1]={name:r+i,type:"USHORT",value:e[i]};return n}function hB(r,e,t){let n=e.length,i=new Array(n+1);i[0]={name:r+"Count",type:"USHORT",value:n};for(let o=0;o<n;o++)i[o+1]={name:r+o,type:"TABLE",value:t(e[o],o)};return i}function eb(r,e,t){let n=e.length,i=[];i[0]={name:r+"Count",type:"USHORT",value:n};for(let o=0;o<n;o++)i=i.concat(t(e[o],o));return i}function FE(r){r.format===1?jr.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(Qy("glyph",r.glyphs))):r.format===2?jr.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(eb("rangeRecord",r.ranges,function(e,t){return[{name:"startGlyphID"+t,type:"USHORT",value:e.start},{name:"endGlyphID"+t,type:"USHORT",value:e.end},{name:"startCoverageIndex"+t,type:"USHORT",value:e.index}]}))):mt.assert(!1,"Coverage format must be 1 or 2.")}FE.prototype=Object.create(jr.prototype);FE.prototype.constructor=FE;function NE(r){jr.call(this,"scriptListTable",eb("scriptRecord",r,function(e,t){let n=e.script,i=n.defaultLangSys;return mt.assert(!!i,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new jr("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new jr("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(Qy("featureIndex",i.featureIndexes)))}].concat(eb("langSys",n.langSysRecords,function(o,a){let s=o.langSys;return[{name:"langSysTag"+a,type:"TAG",value:o.tag},{name:"langSys"+a,type:"TABLE",value:new jr("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:s.reqFeatureIndex}].concat(Qy("featureIndex",s.featureIndexes)))}]})))}]}))}NE.prototype=Object.create(jr.prototype);NE.prototype.constructor=NE;function zE(r){jr.call(this,"featureListTable",eb("featureRecord",r,function(e,t){let n=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new jr("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(Qy("lookupListIndex",n.lookupListIndexes)))}]}))}zE.prototype=Object.create(jr.prototype);zE.prototype.constructor=zE;function UE(r,e){jr.call(this,"lookupListTable",hB("lookup",r,function(t){let n=e[t.lookupType];return mt.assert(!!n,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new jr("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(hB("subtable",t.subtables,n)))}))}UE.prototype=Object.create(jr.prototype);UE.prototype.constructor=UE;function jE(r){r.format===1?jr.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:1},{name:"startGlyphID",type:"USHORT",value:r.startGlyph}].concat(Qy("glyph",r.classes))):r.format===2?jr.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:2}].concat(eb("rangeRecord",r.ranges,function(e,t){return[{name:"startGlyphID"+t,type:"USHORT",value:e.start},{name:"endGlyphID"+t,type:"USHORT",value:e.end},{name:"class"+t,type:"USHORT",value:e.classId}]}))):mt.assert(!1,"Class format must be 1 or 2.")}jE.prototype=Object.create(jr.prototype);jE.prototype.constructor=jE;var Fe={Table:jr,Record:jr,Coverage:FE,ClassDef:jE,ScriptList:NE,FeatureList:zE,LookupList:UE,ushortList:Qy,tableList:hB,recordList:eb};function cY(r,e){return r.getUint8(e)}function VE(r,e){return r.getUint16(e,!1)}function x_e(r,e){return r.getInt16(e,!1)}function eK(r,e){return(r.getUint16(e)<<8)+r.getUint8(e+2)}function DB(r,e){return r.getUint32(e,!1)}function w_e(r,e){return r.getInt32(e,!1)}function tK(r,e){let t=r.getInt16(e,!1),n=r.getUint16(e+2,!1);return t+n/65535}function __e(r,e){let t="";for(let n=e;n<e+4;n+=1)t+=String.fromCharCode(r.getInt8(n));return t}function S_e(r,e,t){let n=0;for(let i=0;i<t;i+=1)n<<=8,n+=r.getUint8(e+i);return n}function A_e(r,e,t){let n=[];for(let i=e;i<t;i+=1)n.push(r.getUint8(i));return n}function M_e(r){let e="";for(let t=0;t<r.length;t+=1)e+=String.fromCharCode(r[t]);return e}var P_e={byte:1,uShort:2,f2dot14:2,short:2,uInt24:3,uLong:4,fixed:4,longDateTime:8,tag:4},bo={LONG_WORDS:32768,WORD_DELTA_COUNT_MASK:32767,SHARED_POINT_NUMBERS:32768,COUNT_MASK:4095,EMBEDDED_PEAK_TUPLE:32768,INTERMEDIATE_REGION:16384,PRIVATE_POINT_NUMBERS:8192,TUPLE_INDEX_MASK:4095,POINTS_ARE_WORDS:128,POINT_RUN_COUNT_MASK:127,DELTAS_ARE_ZERO:128,DELTAS_ARE_WORDS:64,DELTA_RUN_COUNT_MASK:63,INNER_INDEX_BIT_COUNT_MASK:15,MAP_ENTRY_SIZE_MASK:48};function ie(r,e){this.data=r,this.offset=e,this.relativeOffset=0}ie.prototype.parseByte=function(){let r=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,r};ie.prototype.parseChar=function(){let r=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,r};ie.prototype.parseCard8=ie.prototype.parseByte;ie.prototype.parseUShort=function(){let r=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,r};ie.prototype.parseCard16=ie.prototype.parseUShort;ie.prototype.parseSID=ie.prototype.parseUShort;ie.prototype.parseOffset16=ie.prototype.parseUShort;ie.prototype.parseShort=function(){let r=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,r};ie.prototype.parseF2Dot14=function(){let r=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,r};ie.prototype.parseUInt24=function(){let r=eK(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=3,r};ie.prototype.parseULong=function(){let r=DB(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,r};ie.prototype.parseLong=function(){let r=w_e(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,r};ie.prototype.parseOffset32=ie.prototype.parseULong;ie.prototype.parseFixed=function(){let r=tK(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,r};ie.prototype.parseString=function(r){let e=this.data,t=this.offset+this.relativeOffset,n="";this.relativeOffset+=r;for(let i=0;i<r;i++)n+=String.fromCharCode(e.getUint8(t+i));return n};ie.prototype.parseTag=function(){return this.parseString(4)};ie.prototype.parseLongDateTime=function(){let r=DB(this.data,this.offset+this.relativeOffset+4);return r-=2082844800,this.relativeOffset+=8,r};ie.prototype.parseVersion=function(r){let e=VE(this.data,this.offset+this.relativeOffset),t=VE(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,r===void 0&&(r=4096),e+t/r/10};ie.prototype.skip=function(r,e){e===void 0&&(e=1),this.relativeOffset+=P_e[r]*e};ie.prototype.parseULongList=function(r){r===void 0&&(r=this.parseULong());let e=new Array(r),t=this.data,n=this.offset+this.relativeOffset;for(let i=0;i<r;i++)e[i]=t.getUint32(n),n+=4;return this.relativeOffset+=r*4,e};ie.prototype.parseOffset16List=ie.prototype.parseUShortList=function(r){r===void 0&&(r=this.parseUShort());let e=new Array(r),t=this.data,n=this.offset+this.relativeOffset;for(let i=0;i<r;i++)e[i]=t.getUint16(n),n+=2;return this.relativeOffset+=r*2,e};ie.prototype.parseShortList=function(r){let e=new Array(r),t=this.data,n=this.offset+this.relativeOffset;for(let i=0;i<r;i++)e[i]=t.getInt16(n),n+=2;return this.relativeOffset+=r*2,e};ie.prototype.parseByteList=function(r){let e=new Array(r),t=this.data,n=this.offset+this.relativeOffset;for(let i=0;i<r;i++)e[i]=t.getUint8(n++);return this.relativeOffset+=r,e};ie.prototype.parseList=function(r,e){e||(e=r,r=this.parseUShort());let t=new Array(r);for(let n=0;n<r;n++)t[n]=e.call(this);return t};ie.prototype.parseList32=function(r,e){e||(e=r,r=this.parseULong());let t=new Array(r);for(let n=0;n<r;n++)t[n]=e.call(this);return t};ie.prototype.parseRecordList=function(r,e){e||(e=r,r=this.parseUShort());let t=new Array(r),n=Object.keys(e);for(let i=0;i<r;i++){let o={};for(let a=0;a<n.length;a++){let s=n[a],l=e[s];o[s]=l.call(this)}t[i]=o}return t};ie.prototype.parseRecordList32=function(r,e){e||(e=r,r=this.parseULong());let t=new Array(r),n=Object.keys(e);for(let i=0;i<r;i++){let o={};for(let a=0;a<n.length;a++){let s=n[a],l=e[s];o[s]=l.call(this)}t[i]=o}return t};ie.prototype.parseTupleRecords=function(r,e){let t=[];for(let n=0;n<r;n++){let i=[];for(let o=0;o<e;o++)i.push(this.parseF2Dot14());t.push(i)}return t};ie.prototype.parseStruct=function(r){if(typeof r=="function")return r.call(this);{let e=Object.keys(r),t={};for(let n=0;n<e.length;n++){let i=e[n],o=r[i];t[i]=o.call(this)}return t}};ie.prototype.parseValueRecord=function(r){if(r===void 0&&(r=this.parseUShort()),r===0)return;let e={};return r&1&&(e.xPlacement=this.parseShort()),r&2&&(e.yPlacement=this.parseShort()),r&4&&(e.xAdvance=this.parseShort()),r&8&&(e.yAdvance=this.parseShort()),r&16&&(e.xPlaDevice=void 0,this.parseShort()),r&32&&(e.yPlaDevice=void 0,this.parseShort()),r&64&&(e.xAdvDevice=void 0,this.parseShort()),r&128&&(e.yAdvDevice=void 0,this.parseShort()),e};ie.prototype.parseValueRecordList=function(){let r=this.parseUShort(),e=this.parseUShort(),t=new Array(e);for(let n=0;n<e;n++)t[n]=this.parseValueRecord(r);return t};ie.prototype.parsePointer=function(r){let e=this.parseOffset16();if(e>0)return new ie(this.data,this.offset+e).parseStruct(r)};ie.prototype.parsePointer32=function(r){let e=this.parseOffset32();if(e>0)return new ie(this.data,this.offset+e).parseStruct(r)};ie.prototype.parseListOfLists=function(r){let e=this.parseOffset16List(),t=e.length,n=this.relativeOffset,i=new Array(t);for(let o=0;o<t;o++){let a=e[o];if(a===0){i[o]=void 0;continue}if(this.relativeOffset=a,r){let s=this.parseOffset16List(),l=new Array(s.length);for(let c=0;c<s.length;c++)this.relativeOffset=a+s[c],l[c]=r.call(this);i[o]=l}else i[o]=this.parseUShortList()}return this.relativeOffset=n,i};ie.prototype.parseCoverage=function(){let r=this.offset+this.relativeOffset,e=this.parseUShort(),t=this.parseUShort();if(e===1)return{format:1,glyphs:this.parseUShortList(t)};if(e===2){let n=new Array(t);for(let i=0;i<t;i++)n[i]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}}throw new Error("0x"+r.toString(16)+": Coverage format must be 1 or 2.")};ie.prototype.parseClassDef=function(){let r=this.offset+this.relativeOffset,e=this.parseUShort();return e===1?{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()}:e===2?{format:2,ranges:this.parseRecordList({start:ie.uShort,end:ie.uShort,classId:ie.uShort})}:(console.warn(`0x${r.toString(16)}: This font file uses an invalid ClassDef format of ${e}. It might be corrupted and should be reacquired if it doesn't display as intended.`),{format:e})};ie.list=function(r,e){return function(){return this.parseList(r,e)}};ie.list32=function(r,e){return function(){return this.parseList32(r,e)}};ie.recordList=function(r,e){return function(){return this.parseRecordList(r,e)}};ie.recordList32=function(r,e){return function(){return this.parseRecordList32(r,e)}};ie.pointer=function(r){return function(){return this.parsePointer(r)}};ie.pointer32=function(r){return function(){return this.parsePointer32(r)}};ie.tag=ie.prototype.parseTag;ie.byte=ie.prototype.parseByte;ie.uShort=ie.offset16=ie.prototype.parseUShort;ie.uShortList=ie.prototype.parseUShortList;ie.uInt24=ie.prototype.parseUInt24;ie.uLong=ie.offset32=ie.prototype.parseULong;ie.uLongList=ie.prototype.parseULongList;ie.fixed=ie.prototype.parseFixed;ie.f2Dot14=ie.prototype.parseF2Dot14;ie.struct=ie.prototype.parseStruct;ie.coverage=ie.prototype.parseCoverage;ie.classDef=ie.prototype.parseClassDef;var uY={reserved:ie.uShort,reqFeatureIndex:ie.uShort,featureIndexes:ie.uShortList};ie.prototype.parseScriptList=function(){return this.parsePointer(ie.recordList({tag:ie.tag,script:ie.pointer({defaultLangSys:ie.pointer(uY),langSysRecords:ie.recordList({tag:ie.tag,langSys:ie.pointer(uY)})})}))||[]};ie.prototype.parseFeatureList=function(){return this.parsePointer(ie.recordList({tag:ie.tag,feature:ie.pointer({featureParams:ie.offset16,lookupListIndexes:ie.uShortList})}))||[]};ie.prototype.parseLookupList=function(r){return this.parsePointer(ie.list(ie.pointer(function(){let e=this.parseUShort();mt.argument(1<=e&&e<=9,"GPOS/GSUB lookup type "+e+" unknown.");let t=this.parseUShort(),n=t&16;return{lookupType:e,lookupFlag:t,subtables:this.parseList(ie.pointer(r[e])),markFilteringSet:n?this.parseUShort():void 0}})))||[]};ie.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){let r=this.parseUShort(),e=this.parseUShort();return mt.argument(r===1&&e<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:ie.offset32,featureTableSubstitutionOffset:ie.offset32})})||[]};ie.prototype.parseVariationStore=function(){let r=this.relativeOffset,e=this.parseUShort(),t={itemVariationStore:this.parseItemVariationStore()};return this.relativeOffset=r+e+2,t};ie.prototype.parseItemVariationStore=function(){let r=this.relativeOffset,e={format:this.parseUShort(),variationRegions:[],itemVariationSubtables:[]},t=this.parseOffset32(),n=this.parseUShort(),i=this.parseULongList(n);this.relativeOffset=r+t,e.variationRegions=this.parseVariationRegionList();for(let o=0;o<n;o++){let a=i[o];this.relativeOffset=r+a,e.itemVariationSubtables.push(this.parseItemVariationSubtable())}return e};ie.prototype.parseVariationRegionList=function(){let r=this.parseUShort(),e=this.parseUShort();return this.parseRecordList(e,{regionAxes:ie.recordList(r,{startCoord:ie.f2Dot14,peakCoord:ie.f2Dot14,endCoord:ie.f2Dot14})})};ie.prototype.parseItemVariationSubtable=function(){let r=this.parseUShort(),e=this.parseUShort(),t=this.parseUShortList(),n=t.length;return{regionIndexes:t,deltaSets:r&&n?this.parseDeltaSets(r,e,n):[]}};ie.prototype.parseDeltaSetIndexMap=function(){let r=this.parseByte(),e=this.parseByte(),t=[],n=0;switch(r){case 0:n=this.parseUShort();break;case 1:n=this.parseULong();break;default:console.error(`unsupported DeltaSetIndexMap format ${r}`)}if(!n)return{format:r,entryFormat:e};let i=(e&bo.INNER_INDEX_BIT_COUNT_MASK)+1,o=((e&bo.MAP_ENTRY_SIZE_MASK)>>4)+1;for(let a=0;a<n;a++){let s;if(o===1)s=this.parseByte();else if(o===2)s=this.parseUShort();else if(o===3)s=this.parseUInt24();else if(o===4)s=this.parseULong();else throw new Error(`Invalid entry size of ${o}`);let l=s>>i,c=s&(1<<i)-1;t.push({outerIndex:l,innerIndex:c})}return{format:r,entryFormat:e,map:t}};ie.prototype.parseDeltaSets=function(r,e,t){let n=Array.from({length:r},()=>[]),i=e&bo.LONG_WORDS,o=e&bo.WORD_DELTA_COUNT_MASK;if(o>t)throw Error("wordCount must be less than or equal to regionIndexCount");let a=(i?this.parseLong:this.parseShort).bind(this),s=(i?this.parseShort:this.parseChar).bind(this);for(let l=0;l<r;l++)for(let c=0;c<t;c++)c<o?n[l].push(a()):n[l].push(s());return n};ie.prototype.parseTupleVariationStoreList=function(r,e,t){let n=this.parseUShort(),i=this.parseUShort()&1,o=this.parseOffset32(),a=(i?this.parseULong:this.parseUShort).bind(this),s={},l=a();i||(l*=2);let c;for(let u=0;u<n;u++){c=a(),i||(c*=2);let h=c-l;s[u]=h?this.parseTupleVariationStore(o+l,r,e,t,u):void 0,l=c}return s};ie.prototype.parseTupleVariationStore=function(r,e,t,n,i){let o=this.relativeOffset;this.relativeOffset=r,t==="cvar"&&(this.relativeOffset+=4);let a=this.parseUShort(),s=!!(a&bo.SHARED_POINT_NUMBERS),l=a&bo.COUNT_MASK,c=this.parseOffset16(),u=[],h=[];for(let f=0;f<l;f++){let m=this.parseTupleVariationHeader(e,t);u.push(m)}this.relativeOffset!==r+c&&(console.warn(`Unexpected offset after parsing tuple variation headers! Expected ${r+c}, actually ${this.relativeOffset}`),this.relativeOffset=r+c),s&&(h=this.parsePackedPointNumbers());let d=this.relativeOffset;for(let f=0;f<l;f++){let m=u[f];m.privatePoints=[],this.relativeOffset=d,t==="cvar"&&!m.peakTuple&&console.warn("An embedded peak tuple is required in TupleVariationHeaders for the cvar table."),m.flags.privatePointNumbers&&(m.privatePoints=this.parsePackedPointNumbers()),delete m.flags;let g=this.offset,y=this.relativeOffset,b=v=>{let x,w,_=()=>{let A=0;if(t==="gvar"){if(A=m.privatePoints.length||h.length,!A){let E=n.get(i);E.path,A=E.points.length,A+=4}}else t==="cvar"&&(A=n.length);this.offset=g,this.relativeOffset=y,x=this.parsePackedDeltas(A),t==="gvar"&&(w=this.parsePackedDeltas(A))};return{configurable:!0,get:function(){return x===void 0&&_(),v==="deltasY"?w:x},set:function(A){x===void 0&&_(),v==="deltasY"?w=A:x=A}}};Object.defineProperty(m,"deltas",b.call(this,"deltas")),t==="gvar"&&Object.defineProperty(m,"deltasY",b.call(this,"deltasY")),d+=m.variationDataSize,delete m.variationDataSize}this.relativeOffset=o;let p={headers:u};return p.sharedPoints=h,p};ie.prototype.parseTupleVariationHeader=function(r,e){let t=this.parseUShort(),n=this.parseUShort(),i=!!(n&bo.EMBEDDED_PEAK_TUPLE),o=!!(n&bo.INTERMEDIATE_REGION),a=!!(n&bo.PRIVATE_POINT_NUMBERS),s=i?void 0:n&bo.TUPLE_INDEX_MASK,l=i?this.parseTupleRecords(1,r)[0]:void 0,c=o?this.parseTupleRecords(1,r)[0]:void 0,u=o?this.parseTupleRecords(1,r)[0]:void 0,h={variationDataSize:t,peakTuple:l,intermediateStartTuple:c,intermediateEndTuple:u,flags:{embeddedPeakTuple:i,intermediateRegion:o,privatePointNumbers:a}};return e==="gvar"&&(h.sharedTupleRecordsIndex=s),h};ie.prototype.parsePackedPointNumbers=function(){let r=this.parseByte(),e=[],t=r;if(r>=128){let i=this.parseByte();t=(r&bo.POINT_RUN_COUNT_MASK)<<8|i}let n=0;for(;e.length<t;){let i=this.parseByte(),o=!!(i&bo.POINTS_ARE_WORDS),a=(i&bo.POINT_RUN_COUNT_MASK)+1;for(let s=0;s<a&&e.length<t;s++){let l;o?l=this.parseUShort():l=this.parseByte(),n=n+l,e.push(n)}}return e};ie.prototype.parsePackedDeltas=function(r){let e=[];for(;e.length<r;){let t=this.parseByte(),n=!!(t&bo.DELTAS_ARE_ZERO),i=!!(t&bo.DELTAS_ARE_WORDS),o=(t&bo.DELTA_RUN_COUNT_MASK)+1;for(let a=0;a<o&&e.length<r;a++)n?e.push(0):i?e.push(this.parseShort()):e.push(this.parseChar())}return e};var qe={getByte:cY,getCard8:cY,getUShort:VE,getCard16:VE,getShort:x_e,getUInt24:eK,getULong:DB,getFixed:tK,getTag:__e,getOffset:S_e,getBytes:A_e,bytesToString:M_e,Parser:ie},GE=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],nK={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},E_e={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},rK={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function C_e(r,e,t){switch(r){case 0:if(e===65535)return"und";if(t)return t[e];break;case 1:return nK[e];case 3:return rK[e]}}var dB="utf-16",T_e={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},k_e={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function RB(r,e,t){switch(r){case 0:return dB;case 1:return k_e[t]||T_e[e];case 3:if(e===1||e===10)return dB;break}}var iK={0:"unicode",1:"macintosh",2:"reserved",3:"windows"};function I_e(r){return iK[r]}function L_e(r,e,t){let n={},i=new qe.Parser(r,e),o=i.parseUShort(),a=i.parseUShort(),s=i.offset+i.parseUShort();for(let l=0;l<a;l++){let c=i.parseUShort(),u=i.parseUShort(),h=i.parseUShort(),d=i.parseUShort(),p=GE[d]||d,f=i.parseUShort(),m=i.parseUShort(),g=C_e(c,h,t),y=RB(c,u,h),b=I_e(c);if(y!==void 0&&g!==void 0&&b!==void 0){let v;if(y===dB?v=Jy.UTF16(r,s+m,f):v=Jy.MACSTRING(r,s+m,f,y),v){let x=n[b];x===void 0&&(x=n[b]={});let w=x[p];w===void 0&&(w=x[p]={}),w[g]=v}}}return o===1&&i.parseUShort(),n}function vE(r){let e={};for(let t in r)e[r[t]]=parseInt(t);return e}function hY(r,e,t,n,i,o){return new Fe.Record("NameRecord",[{name:"platformID",type:"USHORT",value:r},{name:"encodingID",type:"USHORT",value:e},{name:"languageID",type:"USHORT",value:t},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:i},{name:"offset",type:"USHORT",value:o}])}function O_e(r,e){let t=r.length,n=e.length-t+1;e:for(let i=0;i<n;i++)for(;i<n;i++){for(let o=0;o<t;o++)if(e[i+o]!==r[o])continue e;return i}return-1}function dY(r,e){let t=O_e(r,e);if(t<0){t=e.length;let n=0,i=r.length;for(;n<i;++n)e.push(r[n])}return t}function D_e(r,e){let t=vE(iK),n=vE(nK),i=vE(rK),o=[],a=[];for(let l in r){let c,u=[],h={},d=vE(GE),p=t[l];for(let f in r[l]){let m=d[f];if(m===void 0&&(m=f),c=parseInt(m),isNaN(c))throw new Error('Name table entry "'+f+'" does not exist, see nameTableNames for complete list.');h[c]=r[l][f],u.push(c)}for(let f=0;f<u.length;f++){c=u[f];let m=h[c];for(let g in m){let y=m[g];if(p===1||p===0){let b=n[g],v=E_e[b],x=RB(p,v,b),w=Ye.MACSTRING(y,x);if(p===0&&(b=e.indexOf(g),b<0&&(b=e.length,e.push(g)),v=4,w=Ye.UTF16(y)),w!==void 0){let _=dY(w,a);o.push(hY(p,v,b,c,w.length,_))}}if(p===3){let b=i[g];if(b!==void 0){let v=Ye.UTF16(y),x=dY(v,a);o.push(hY(3,1,b,c,v.length,x))}}}}}o.sort(function(l,c){return l.platformID-c.platformID||l.encodingID-c.encodingID||l.languageID-c.languageID||l.nameID-c.nameID});let s=new Fe.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:o.length},{name:"stringOffset",type:"USHORT",value:6+o.length*12}]);for(let l=0;l<o.length;l++)s.fields.push({name:"record_"+l,type:"RECORD",value:o[l]});return s.fields.push({name:"strings",type:"LITERAL",value:a}),s}function HE(r,e,t=[]){if(e<256&&e in GE){if(t.length&&!t.includes(parseInt(e)))return;e=GE[e]}for(let n in r)for(let i in r[n])if(i===e||parseInt(i)===e)return r[n][i]}var oK={parse:L_e,make:D_e,getNameByID:HE};function R_e(r,e,t,n){r.length=e.parseUShort(),r.language=e.parseUShort()-1;let i=e.parseByteList(r.length),o=Object.assign({},i),a=RB(t,n,r.language),s=BE[a];for(let l=0;l<s.length;l++)o[s.charCodeAt(l)]=i[128+l];r.glyphIndexMap=o}function B_e(r,e,t){e.parseUShort(),r.length=e.parseULong(),r.language=e.parseULong();let n;r.groupCount=n=e.parseULong(),r.glyphIndexMap={};for(let i=0;i<n;i+=1){let o=e.parseULong(),a=e.parseULong(),s=e.parseULong();for(let l=o;l<=a;l+=1)r.glyphIndexMap[l]=s,t===12&&s++}}function F_e(r,e,t,n,i){r.length=e.parseUShort(),r.language=e.parseUShort();let o;r.segCount=o=e.parseUShort()>>1,e.skip("uShort",3),r.glyphIndexMap={};let a=new qe.Parser(t,n+i+14),s=new qe.Parser(t,n+i+16+o*2),l=new qe.Parser(t,n+i+16+o*4),c=new qe.Parser(t,n+i+16+o*6),u=n+i+16+o*8;for(let h=0;h<o-1;h+=1){let d,p=a.parseUShort(),f=s.parseUShort(),m=l.parseShort(),g=c.parseUShort();for(let y=f;y<=p;y+=1)g!==0?(u=c.offset+c.relativeOffset-2,u+=g,u+=(y-f)*2,d=qe.getUShort(t,u),d!==0&&(d=d+m&65535)):d=y+m&65535,r.glyphIndexMap[y]=d}}function N_e(r,e){let t={};e.skip("uLong");let n=e.parseULong();for(let i=0;i<n;i+=1){let o=e.parseUInt24(),a={varSelector:o},s=e.parseOffset32(),l=e.parseOffset32(),c=e.relativeOffset;s&&(e.relativeOffset=s,a.defaultUVS=e.parseStruct({ranges:function(){return e.parseRecordList32({startUnicodeValue:e.parseUInt24,additionalCount:e.parseByte})}})),l&&(e.relativeOffset=l,a.nonDefaultUVS=e.parseStruct({uvsMappings:function(){let u={},h=e.parseRecordList32({unicodeValue:e.parseUInt24,glyphID:e.parseUShort});for(let d=0;d<h.length;d+=1)u[h[d].unicodeValue]=h[d];return u}})),t[o]=a,e.relativeOffset=c}r.varSelectorList=t}function z_e(r,e){let t={};t.version=qe.getUShort(r,e),mt.argument(t.version===0,"cmap table version should be 0."),t.numTables=qe.getUShort(r,e+2);let n=null,i=-1,o=-1,a=null,s=null,l=[0,1,2,3,4,6],c=[0,1,10];for(let h=t.numTables-1;h>=0;h-=1)if(a=qe.getUShort(r,e+4+h*8),s=qe.getUShort(r,e+4+h*8+2),a===3&&c.includes(s)||a===0&&l.includes(s)||a===1&&s===0){if(o>0)continue;if(o=qe.getULong(r,e+4+h*8+4),n)break}else if(a===0&&s===5){if(i=qe.getULong(r,e+4+h*8+4),n=new qe.Parser(r,e+i),n.parseUShort()!==14)i=-1,n=null;else if(o>0)break}if(o===-1)throw new Error("No valid cmap sub-tables found.");let u=new qe.Parser(r,e+o);if(t.format=u.parseUShort(),t.format===0)R_e(t,u,a,s);else if(t.format===12||t.format===13)B_e(t,u,t.format);else if(t.format===4)F_e(t,u,r,e,o);else throw new Error("Only format 0 (platformId 1, encodingId 0), 4, 12 and 14 cmap tables are supported (found format "+t.format+", platformId "+a+", encodingId "+s+").");return n&&N_e(t,n),t}function U_e(r,e,t){r.segments.push({end:e,start:e,delta:-(e-t),offset:0,glyphIndex:t})}function j_e(r){r.segments.push({end:65535,start:65535,delta:1,offset:0})}function V_e(r){if(r.length===0)return r;let e=[r[0]];for(let t=1;t<r.length;t++){let n=e[e.length-1],i=r[t];n.end+1===i.start&&n.delta===i.delta&&i.end!==65535?n.end=i.end:e.push(i)}return e}function G_e(r){let e=!0,t;for(t=r.length-1;t>0;t-=1)if(r.get(t).unicode>65535){e=!1;break}let n=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:e?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:e?12:20}];e||n.push({name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}),n.push({name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0});let i=new Fe.Table("cmap",n);for(i.segments=[],t=0;t<r.length;t+=1){let p=r.get(t);for(let f=0;f<p.unicodes.length;f+=1)U_e(i,p.unicodes[f],t)}i.segments.sort(function(p,f){return p.start-f.start}),i.segments=V_e(i.segments),j_e(i);let o=i.segments.length,a=0,s=[],l=[],c=[],u=[],h=[],d=[];for(t=0;t<o;t+=1){let p=i.segments[t];p.end<=65535&&p.start<=65535?(s.push({name:"end_"+t,type:"USHORT",value:p.end}),l.push({name:"start_"+t,type:"USHORT",value:p.start}),c.push({name:"idDelta_"+t,type:"SHORT",value:p.delta}),u.push({name:"idRangeOffset_"+t,type:"USHORT",value:p.offset}),p.glyphId!==void 0&&h.push({name:"glyph_"+t,type:"USHORT",value:p.glyphId})):a+=1,!e&&p.glyphIndex!==void 0&&(d.push({name:"cmap12Start_"+t,type:"ULONG",value:p.start}),d.push({name:"cmap12End_"+t,type:"ULONG",value:p.end}),d.push({name:"cmap12Glyph_"+t,type:"ULONG",value:p.glyphIndex}))}i.segCountX2=(o-a)*2,i.searchRange=Math.pow(2,Math.floor(Math.log(o-a)/Math.log(2)))*2,i.entrySelector=Math.log(i.searchRange/2)/Math.log(2),i.rangeShift=i.segCountX2-i.searchRange;for(let p=0;p<s.length;p++)i.fields.push(s[p]);i.fields.push({name:"reservedPad",type:"USHORT",value:0});for(let p=0;p<l.length;p++)i.fields.push(l[p]);for(let p=0;p<c.length;p++)i.fields.push(c[p]);for(let p=0;p<u.length;p++)i.fields.push(u[p]);for(let p=0;p<h.length;p++)i.fields.push(h[p]);if(i.cmap4Length=14+s.length*2+2+l.length*2+c.length*2+u.length*2+h.length*2,!e){let p=16+d.length*4;i.cmap12Offset=20+i.cmap4Length,i.fields.push({name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:p},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:d.length/3});for(let f=0;f<d.length;f++)i.fields.push(d[f])}return i}var aK={parse:z_e,make:G_e},AE=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],H_e=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],W_e=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],X_e=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],pB=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],Y_e=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Af=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function sK(r){this.font=r}sK.prototype.charToGlyphIndex=function(r){let e=r.codePointAt(0),t=this.font.glyphs;if(t)for(let n=0;n<t.length;n+=1){let i=t.get(n);for(let o=0;o<i.unicodes.length;o+=1)if(i.unicodes[o]===e)return n}return null};function lK(r){this.cmap=r}lK.prototype.charToGlyphIndex=function(r){return this.cmap.glyphIndexMap[r.codePointAt(0)]||0};function cK(r,e){this.encoding=r,this.charset=e}cK.prototype.charToGlyphIndex=function(r){let e=r.codePointAt(0),t=this.encoding[e];return this.charset.indexOf(t)};function BB(r){switch(r.version){case 1:this.names=Af.slice();break;case 2:this.names=new Array(r.numberOfGlyphs);for(let e=0;e<r.numberOfGlyphs;e++)r.glyphNameIndex[e]<Af.length?this.names[e]=Af[r.glyphNameIndex[e]]:this.names[e]=r.names[r.glyphNameIndex[e]-Af.length];break;case 2.5:this.names=new Array(r.numberOfGlyphs);for(let e=0;e<r.numberOfGlyphs;e++)this.names[e]=Af[e+r.glyphNameIndex[e]];break;case 3:this.names=[];break;default:this.names=[];break}}BB.prototype.nameToGlyphIndex=function(r){return this.names.indexOf(r)};BB.prototype.glyphIndexToName=function(r){return this.names[r]};function $_e(r){let e,t=r.tables.cmap.glyphIndexMap,n=Object.keys(t);for(let i=0;i<n.length;i+=1){let o=n[i],a=t[o];e=r.glyphs.get(a),e.addUnicode(parseInt(o))}for(let i=0;i<r.glyphs.length;i+=1)e=r.glyphs.get(i),r.cffEncoding?e.name=r.cffEncoding.charset[i]:r.glyphNames.names&&(e.name=r.glyphNames.glyphIndexToName(i))}function K_e(r){r._IndexToUnicodeMap={};let e=r.tables.cmap.glyphIndexMap,t=Object.keys(e);for(let n=0;n<t.length;n+=1){let i=t[n],o=e[i];r._IndexToUnicodeMap[o]===void 0?r._IndexToUnicodeMap[o]={unicodes:[parseInt(i)]}:r._IndexToUnicodeMap[o].unicodes.push(parseInt(i))}}function q_e(r,e){e.lowMemory?K_e(r):$_e(r)}function Z_e(r,e,t,n,i){r.beginPath(),r.moveTo(e,t),r.lineTo(n,i),r.stroke()}var vf={line:Z_e};function J_e(r,e){let t=new ie(r,e),n=t.parseShort();n!==0&&console.warn("Only CPALv0 is currently fully supported.");let i=t.parseShort(),o=t.parseShort(),a=t.parseShort(),s=t.parseOffset32(),l=t.parseUShortList(o);t.relativeOffset=s;let c=t.parseULongList(a);return t.relativeOffset=s,{version:n,numPaletteEntries:i,colorRecords:c,colorRecordIndices:l}}function Q_e({version:r=0,numPaletteEntries:e=0,colorRecords:t=[],colorRecordIndices:n=[0]}){return mt.argument(r===0,"Only CPALv0 are supported."),mt.argument(t.length,"No colorRecords given."),mt.argument(n.length,"No colorRecordIndices given."),n.length>1&&mt.argument(e,"Can't infer numPaletteEntries on multiple colorRecordIndices"),new Fe.Table("CPAL",[{name:"version",type:"USHORT",value:r},{name:"numPaletteEntries",type:"USHORT",value:e||t.length},{name:"numPalettes",type:"USHORT",value:n.length},{name:"numColorRecords",type:"USHORT",value:t.length},{name:"colorRecordsArrayOffset",type:"ULONG",value:12+2*n.length},...n.map((i,o)=>({name:"colorRecordIndices_"+o,type:"USHORT",value:i})),...t.map((i,o)=>({name:"colorRecords_"+o,type:"ULONG",value:i}))])}function uK(r){var e=(r&4278190080)>>24,t=(r&16711680)>>16,n=(r&65280)>>8,i=r&255;return e=e+256&255,t=t+256&255,n=n+256&255,i=(i+256&255)/255,{b:e,g:t,r:n,a:i}}function FB(r,e,t=0,n="hexa"){if(e==65535)return"currentColor";let i=r&&r.tables&&r.tables.cpal;if(!i)return"currentColor";if(t>i.colorRecordIndices.length-1)throw new Error(`Palette index out of range (colorRecordIndices.length: ${i.colorRecordIndices.length}, index: ${e})`);if(e>i.numPaletteEntries)throw new Error(`Color index out of range (numPaletteEntries: ${i.numPaletteEntries}, index: ${e})`);let o=i.colorRecordIndices[t]+e;if(o>i.colorRecords)throw new Error(`Color index out of range (colorRecords.length: ${i.colorRecords.length}, lookupIndex: ${o})`);let a=uK(i.colorRecords[o]);return n==="bgra"?a:tb(a,n)}function wl(r){return("0"+parseInt(r).toString(16)).slice(-2)}function e1e(r){let e=r.r/255,t=r.g/255,n=r.b/255,i=Math.max(e,t,n),o=Math.min(e,t,n),a,s,l=(i+o)/2;if(i===o)a=s=0;else{let c=i-o;switch(s=l>.5?c/(2-i-o):c/(i+o),i){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4;break}a/=6}return{h:a*360,s:s*100,l:l*100}}function t1e(r){let{h:e,s:t,l:n,a:i}=r;e=e%360,t/=100,n/=100;let o=(1-Math.abs(2*n-1))*t,a=o*(1-Math.abs(e/60%2-1)),s=n-o/2,l=0,c=0,u=0;return 0<=e&&e<60?(l=o,c=a,u=0):60<=e&&e<120?(l=a,c=o,u=0):120<=e&&e<180?(l=0,c=o,u=a):180<=e&&e<240?(l=0,c=a,u=o):240<=e&&e<300?(l=a,c=0,u=o):300<=e&&e<=360&&(l=o,c=0,u=a),{r:Math.round((l+s)*255),g:Math.round((c+s)*255),b:Math.round((u+s)*255),a:i}}function hK(r){return parseInt(`0x${wl(r.b)}${wl(r.g)}${wl(r.r)}${wl(r.a*255)}`,16)}function WE(r,e="hexa"){let t=e=="raw"||e=="cpal",n=Number.isInteger(r),i=!0;if(n&&t||r==="currentColor")return r;if(typeof r=="object"){if(e=="bgra")return r;if(t)return hK(r)}else if(!n&&/^#([a-f0-9]{3}|[a-f0-9]{4}|[a-f0-9]{6}|[a-f0-9]{8})$/i.test(r.trim())){switch(r=r.trim().substring(1),r.length){case 3:r={r:parseInt(r[0].repeat(2),16),g:parseInt(r[1].repeat(2),16),b:parseInt(r[2].repeat(2),16),a:1};break;case 4:r={r:parseInt(r[0].repeat(2),16),g:parseInt(r[1].repeat(2),16),b:parseInt(r[2].repeat(2),16),a:parseInt(r[3].repeat(2),16)/255};break;case 6:r={r:parseInt(r[0]+r[1],16),g:parseInt(r[2]+r[3],16),b:parseInt(r[4]+r[5],16),a:1};break;case 8:r={r:parseInt(r[0]+r[1],16),g:parseInt(r[2]+r[3],16),b:parseInt(r[4]+r[5],16),a:parseInt(r[6]+r[7],16)/255};break}if(e=="bgra")return r}else if(typeof document<"u"&&/^[a-z]+$/i.test(r)){let o=document.createElement("canvas").getContext("2d");o.fillStyle=r;let a=tb(o.fillStyle,"hexa");a==="#000000ff"&&r.toLowerCase()!=="black"?i=!1:r=a}else{r=r.trim();let o=/rgba?\(\s*(?:(\d*\.\d+)(%?)|(\d+)(%?))\s*(?:,|\s*)\s*(?:(\d*\.\d+)(%?)|(\d+)(%?))\s*(?:,|\s*)\s*(?:(\d*\.\d+)(%?)|(\d+)(%?))\s*(?:(?:,|\s|\/)\s*(?:(0*(?:\.\d+)?()|0*1(?:\.0+)?())|(?:\.\d+)|(\d+)(%)|(\d*\.\d+)(%)))?\s*\)/;if(o.test(r)){let a=r.match(o).filter(s=>typeof s<"u");r={r:Math.round(parseFloat(a[1])/(a[2]?100/255:1)),g:Math.round(parseFloat(a[3])/(a[4]?100/255:1)),b:Math.round(parseFloat(a[5])/(a[6]?100/255:1)),a:a[7]?parseFloat(a[7])/(a[8]?100:1):1}}else{let a=/hsla?\(\s*(?:(\d*\.\d+|\d+)(deg|turn|))\s*(?:,|\s*)\s*(?:(\d*\.\d+)%?|(\d+)%?)\s*(?:,|\s*)\s*(?:(\d*\.\d+)%?|(\d+)%?)\s*(?:(?:,|\s|\/)\s*(?:(0*(?:\.\d+)?()|0*1(?:\.0+)?())|(?:\.\d+)|(\d+)(%)|(\d*\.\d+)(%)))?\s*\)/;if(a.test(r)){let s=r.match(a).filter(l=>typeof l<"u");r=t1e({h:parseFloat(s[1])*(s[2]==="turn"?360:1),s:parseFloat(s[3]),l:parseFloat(s[4]),a:s[5]?parseFloat(s[5])/(s[6]?100:1):1})}else i=!1}}if(!i)throw new Error(`Invalid color format: ${r}`);return tb(r,e)}function tb(r,e="hexa"){if(r==="currentColor")return r;if(Number.isInteger(r)){if(e=="raw"||e=="cpal")return r;r=uK(r)}else typeof r!="object"&&(r=WE(r,"bgra"));let t=["hsl","hsla"].includes(e)?e1e(r):null;switch(e){case"rgba":return`rgba(${r.r}, ${r.g}, ${r.b}, ${parseFloat(r.a.toFixed(3))})`;case"rgb":return`rgb(${r.r}, ${r.g}, ${r.b})`;case"hex":case"hex6":case"hex-6":return`#${wl(r.r)}${wl(r.g)}${wl(r.b)}`;case"hexa":case"hex8":case"hex-8":return`#${wl(r.r)}${wl(r.g)}${wl(r.b)}${wl(r.a*255)}`;case"hsl":return`hsl(${t.h.toFixed(2)}, ${t.s.toFixed(2)}%, ${t.l.toFixed(2)}%)`;case"hsla":return`hsla(${t.h.toFixed(2)}, ${t.s.toFixed(2)}%, ${t.l.toFixed(2)}%, ${parseFloat(r.a.toFixed(3))})`;case"bgra":return r;case"raw":case"cpal":return hK(r);default:throw new Error("Unknown color format: "+e)}}var dK={parse:J_e,make:Q_e,getPaletteColor:FB,parseColor:WE,formatColor:tb};function n1e(r,e){let t=e||new Zy;return{configurable:!0,get:function(){return typeof t=="function"&&(t=t()),t},set:function(n){t=n}}}function vo(r){this.bindConstructorValues(r)}vo.prototype.bindConstructorValues=function(r){if(this.index=r.index||0,r.name===".notdef"?r.unicode=void 0:r.name===".null"&&(r.unicode=0),r.unicode===0&&r.name!==".null")throw new Error('The unicode value "0" is reserved for the glyph name ".null" and cannot be used by any other glyph.');this.name=r.name||null,this.unicode=r.unicode,this.unicodes=r.unicodes||(r.unicode!==void 0?[r.unicode]:[]),"xMin"in r&&(this.xMin=r.xMin),"yMin"in r&&(this.yMin=r.yMin),"xMax"in r&&(this.xMax=r.xMax),"yMax"in r&&(this.yMax=r.yMax),"advanceWidth"in r&&(this.advanceWidth=r.advanceWidth),"leftSideBearing"in r&&(this.leftSideBearing=r.leftSideBearing),"points"in r&&(this.points=r.points),Object.defineProperty(this,"path",n1e(this,r.path))};vo.prototype.addUnicode=function(r){this.unicodes.length===0&&(this.unicode=r),this.unicodes.push(r)};vo.prototype.getBoundingBox=function(){return this.path.getBoundingBox()};vo.prototype.getPath=function(r,e,t,n,i){r=r!==void 0?r:0,e=e!==void 0?e:0,t=t!==void 0?t:72,n=Object.assign({},i&&i.defaultRenderOptions,n);let o,a,s=n.xScale,l=n.yScale,c=1/(this.path.unitsPerEm||1e3)*t,u=this;i&&i.variation&&(u=i.variation.getTransform(this,n.variation),o=u.path.commands),n.hinting&&i&&i.hinting&&(a=u.path&&i.hinting.exec(u,t,n)),a?(o=i.hinting.getCommands(a),r=Math.round(r),e=Math.round(e),s=l=1):(o=u.path.commands,s===void 0&&(s=c),l===void 0&&(l=c));let h=new Zy;if(n.drawSVG){let d=this.getSvgImage(i);if(d){let p=new Zy;return p._image={image:d.image,x:r+d.leftSideBearing*c,y:e-d.baseline*c,width:d.image.width*c,height:d.image.height*c},h._layers=[p],h}}if(n.drawLayers){let d=this.getLayers(i);if(d&&d.length){h._layers=[];for(let p=0;p<d.length;p+=1){let f=d[p],m=FB(i,f.paletteIndex,n.usePalette);m==="currentColor"?m=n.fill||"black":m=tb(m,n.colorFormat||"rgba"),n=Object.assign({},n,{fill:m}),h._layers.push(this.getPath.call(f.glyph,r,e,t,n,i))}return h}}h.fill=n.fill||this.path.fill,h.stroke=this.path.stroke,h.strokeWidth=this.path.strokeWidth*c;for(let d=0;d<o.length;d+=1){let p=o[d];p.type==="M"?h.moveTo(r+p.x*s,e+-p.y*l):p.type==="L"?h.lineTo(r+p.x*s,e+-p.y*l):p.type==="Q"?h.quadraticCurveTo(r+p.x1*s,e+-p.y1*l,r+p.x*s,e+-p.y*l):p.type==="C"?h.curveTo(r+p.x1*s,e+-p.y1*l,r+p.x2*s,e+-p.y2*l,r+p.x*s,e+-p.y*l):p.type==="Z"&&h.stroke&&h.strokeWidth&&h.closePath()}return h};vo.prototype.getLayers=function(r){if(!r)throw new Error("The font object is required to read the colr/cpal tables in order to get the layers.");return r.layers.get(this.index)};vo.prototype.getSvgImage=function(r){if(!r)throw new Error("The font object is required to read the svg table in order to get the image.");return r.svgImages.get(this.index)};vo.prototype.getContours=function(r=null){if(this.points===void 0&&!r)return[];let e=[],t=[],n=r||this.points;for(let i=0;i<n.length;i+=1){let o=n[i];t.push(o),o.lastPointOfContour&&(e.push(t),t=[])}return mt.argument(t.length===0,"There are still points left in the current contour."),e};vo.prototype.getMetrics=function(){let r=this.path.commands,e=[],t=[];for(let i=0;i<r.length;i+=1){let o=r[i];o.type!=="Z"&&(e.push(o.x),t.push(o.y)),(o.type==="Q"||o.type==="C")&&(e.push(o.x1),t.push(o.y1)),o.type==="C"&&(e.push(o.x2),t.push(o.y2))}let n={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,e),yMax:Math.max.apply(null,t),leftSideBearing:this.leftSideBearing};return isFinite(n.xMin)||(n.xMin=0),isFinite(n.xMax)||(n.xMax=this.advanceWidth),isFinite(n.yMin)||(n.yMin=0),isFinite(n.yMax)||(n.yMax=0),n.rightSideBearing=this.advanceWidth-n.leftSideBearing-(n.xMax-n.xMin),n};vo.prototype.draw=function(r,e,t,n,i,o){i=Object.assign({},o&&o.defaultRenderOptions,i),this.getPath(e,t,n,i,o).draw(r)};vo.prototype.drawPoints=function(r,e,t,n,i,o){if(i=Object.assign({},o&&o.defaultRenderOptions,i),i.drawLayers){let h=this.getLayers(o);if(h&&h.length){for(let d=0;d<h.length;d+=1)h[d].glyph.index!==this.index&&this.drawPoints.call(h[d].glyph,r,e,t,n);return}}function a(h,d,p,f){r.beginPath();for(let m=0;m<h.length;m+=1)r.moveTo(d+h[m].x*f,p+h[m].y*f),r.arc(d+h[m].x*f,p+h[m].y*f,2,0,Math.PI*2,!1);r.fill()}e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:24;let s=1/this.path.unitsPerEm*n,l=[],c=[],u=this.path.commands;o&&o.variation&&(u=o.variation.getTransform(this,i.variation).path.commands);for(let h=0;h<u.length;h+=1){let d=u[h];d.x!==void 0&&l.push({x:d.x,y:-d.y}),d.x1!==void 0&&c.push({x:d.x1,y:-d.y1}),d.x2!==void 0&&c.push({x:d.x2,y:-d.y2})}r.fillStyle="blue",a(l,e,t,s),r.fillStyle="red",a(c,e,t,s)};vo.prototype.drawMetrics=function(r,e,t,n){let i;e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:24,i=1/this.path.unitsPerEm*n,r.lineWidth=1,r.strokeStyle="black",vf.line(r,e,-1e4,e,1e4),vf.line(r,-1e4,t,1e4,t);let o=this.xMin||0,a=this.yMin||0,s=this.xMax||0,l=this.yMax||0,c=this.advanceWidth||0;r.strokeStyle="blue",vf.line(r,e+o*i,-1e4,e+o*i,1e4),vf.line(r,e+s*i,-1e4,e+s*i,1e4),vf.line(r,-1e4,t+-a*i,1e4,t+-a*i),vf.line(r,-1e4,t+-l*i,1e4,t+-l*i),r.strokeStyle="green",vf.line(r,e+c*i,-1e4,e+c*i,1e4)};vo.prototype.toPathData=function(r,e){r=Object.assign({},{variation:e&&e.defaultRenderOptions.variation},r);let t=this;e&&e.variation&&(t=e.variation.getTransform(this,r.variation));let n=t.points&&r.pointsTransform?r.pointsTransform(t.points):t.path;return r.pathTransform&&(n=r.pathTransform(n)),n.toPathData(r)};vo.prototype.fromSVG=function(r,e={}){return this.path.fromSVG(r,e)};vo.prototype.toSVG=function(r,e){let t=this.toPathData.apply(this,[r,e]);return this.path.toSVG(r,t)};vo.prototype.toDOMElement=function(r,e){r=Object.assign({},{variation:e&&e.defaultRenderOptions.variation},r);let t=this.path;return e&&e.variation&&(t=e.variation.getTransform(this,r.variation).path),t.toDOMElement(r)};var b_=vo;function Hy(r,e,t){Object.defineProperty(r,e,{get:function(){return typeof r[t]>"u"&&r.path,r[t]},set:function(n){r[t]=n},enumerable:!0,configurable:!0})}function rC(r,e){if(this.font=r,this.glyphs={},Array.isArray(e))for(let t=0;t<e.length;t++){let n=e[t];n.path.unitsPerEm=r.unitsPerEm,this.glyphs[t]=n}this.length=e&&e.length||0}typeof Symbol<"u"&&Symbol.iterator&&(rC.prototype[Symbol.iterator]=function(){let r=-1;return{next:(function(){r++;let e=r>=this.length-1;return{value:this.get(r),done:e}}).bind(this)}});rC.prototype.get=function(r){if(this.font._push&&this.glyphs[r]===void 0){this.font._push(r),typeof this.glyphs[r]=="function"&&(this.glyphs[r]=this.glyphs[r]());let e=this.glyphs[r],t=this.font._IndexToUnicodeMap[r];if(t)for(let n=0;n<t.unicodes.length;n++)e.addUnicode(t.unicodes[n]);this.font.cffEncoding?e.name=this.font.cffEncoding.charset[r]:this.font.glyphNames.names&&(e.name=this.font.glyphNames.glyphIndexToName(r)),this.glyphs[r].advanceWidth=this.font._hmtxTableData[r].advanceWidth,this.glyphs[r].leftSideBearing=this.font._hmtxTableData[r].leftSideBearing}else typeof this.glyphs[r]=="function"&&(this.glyphs[r]=this.glyphs[r]());return this.glyphs[r]};rC.prototype.push=function(r,e){this.glyphs[r]=e,this.length++};function r1e(r,e){return new b_({index:e,font:r})}function i1e(r,e,t,n,i,o){return function(){let a=new b_({index:e,font:r});return a.path=function(){t(a,n,i);let s=o(r.glyphs,a);return s.unitsPerEm=r.unitsPerEm,s},Hy(a,"numberOfContours","_numberOfContours"),Hy(a,"xMin","_xMin"),Hy(a,"xMax","_xMax"),Hy(a,"yMin","_yMin"),Hy(a,"yMax","_yMax"),Hy(a,"points","_points"),a}}function o1e(r,e,t,n,i){return function(){let o=new b_({index:e,font:r});return o.path=function(){let a=t(r,o,n,i);return a.unitsPerEm=r.unitsPerEm,a},o}}var Mc={GlyphSet:rC,glyphLoader:r1e,ttfGlyphLoader:i1e,cffGlyphLoader:o1e};function pK(r,e){if(r===e)return!0;if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t+=1)if(!pK(r[t],e[t]))return!1;return!0}else return!1}var pY=10;function XE(r){let e;return r.length<1240?e=107:r.length<33900?e=1131:e=32768,e}function wc(r,e,t,n){let i=[],o=[],a=n>1?qe.getULong(r,e):qe.getCard16(r,e),s=n>1?4:2,l,c;if(a!==0){let u=qe.getByte(r,e+s);l=e+(a+1)*u+s;let h=e+s+1;for(let d=0;d<a+1;d+=1)i.push(qe.getOffset(r,h,u)),h+=u;c=l+i[a]}else c=e+s;for(let u=0;u<i.length-1;u+=1){let h=qe.getBytes(r,l+i[u],l+i[u+1]);t&&(h=t(h,r,e,n)),o.push(h)}return{objects:o,startOffset:e,endOffset:c}}function a1e(r,e,t){let n=[],i=t>1?qe.getULong(r,e):qe.getCard16(r,e),o=t>1?4:2,a,s;if(i!==0){let l=qe.getByte(r,e+o);a=e+(i+1)*l+o;let c=e+o+1;for(let u=0;u<i+1;u+=1)n.push(qe.getOffset(r,c,l)),c+=l;s=a+n[i]}else s=e+o;return{offsets:n,startOffset:e,endOffset:s}}function s1e(r,e,t,n,i,o){let a=o>1?qe.getULong(t,n):qe.getCard16(t,n),s=o>1?4:2,l=0;if(a!==0){let c=qe.getByte(t,n+s);l=n+(a+1)*c+s}return qe.getBytes(t,l+e[r],l+e[r+1])}function l1e(r){let e="",t=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){let n=r.parseByte(),i=n>>4,o=n&15;if(i===15||(e+=t[i],o===15))break;e+=t[o]}return parseFloat(e)}function c1e(r,e){let t,n,i,o;if(e===28)return t=r.parseByte(),n=r.parseByte(),t<<8|n;if(e===29)return t=r.parseByte(),n=r.parseByte(),i=r.parseByte(),o=r.parseByte(),t<<24|n<<16|i<<8|o;if(e===30)return l1e(r);if(e>=32&&e<=246)return e-139;if(e>=247&&e<=250)return t=r.parseByte(),(e-247)*256+t+108;if(e>=251&&e<=254)return t=r.parseByte(),-(e-251)*256-t-108;throw new Error("Invalid b0 "+e)}function u1e(r){let e={};for(let t=0;t<r.length;t+=1){let n=r[t][0],i=r[t][1],o;if(i.length===1?o=i[0]:o=i,Object.prototype.hasOwnProperty.call(e,n)&&!isNaN(e[n]))throw new Error("Object "+e+" already has key "+n);e[n]=o}return e}function NB(r,e,t,n){e=e!==void 0?e:0;let i=new qe.Parser(r,e),o=[],a=[];t=t!==void 0?t:r.byteLength;let s=n<2?22:28;for(;i.relativeOffset<t;){let l=i.parseByte();if(l<s){if(l===12&&(l=1200+i.parseByte()),n>1&&l===23){x1e(a);continue}o.push([l,a]),a=[]}else a.push(c1e(i,l))}return u1e(o)}function p_(r,e){return e<=390?e=AE[e]:r?e=r[e-391]:e=void 0,e}function zB(r,e,t){let n={},i;for(let o=0;o<e.length;o+=1){let a=e[o];if(Array.isArray(a.type)){let s=[];s.length=a.type.length;for(let l=0;l<a.type.length;l++)i=r[a.op]!==void 0?r[a.op][l]:void 0,i===void 0&&(i=a.value!==void 0&&a.value[l]!==void 0?a.value[l]:null),a.type[l]==="SID"&&(i=p_(t,i)),s[l]=i;n[a.name]=s}else i=r[a.op],i===void 0&&(i=a.value!==void 0?a.value:null),a.type==="SID"&&(i=p_(t,i)),n[a.name]=i}return n}function h1e(r,e){let t={};if(t.formatMajor=qe.getCard8(r,e),t.formatMinor=qe.getCard8(r,e+1),t.formatMajor>2)throw new Error(`Unsupported CFF table version ${t.formatMajor}.${t.formatMinor}`);return t.size=qe.getCard8(r,e+2),t.formatMajor<2?(t.offsetSize=qe.getCard8(r,e+3),t.startOffset=e,t.endOffset=e+4):(t.topDictLength=qe.getCard16(r,e+3),t.endOffset=e+8),t}var fK=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],d1e=[{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"charStrings",op:17,type:"offset"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"vstore",op:24,type:"offset"}],mK=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}],p1e=[{name:"blueValues",op:6,type:"delta"},{name:"otherBlues",op:7,type:"delta"},{name:"familyBlues",op:7,type:"delta"},{name:"familyBlues",op:8,type:"delta"},{name:"familyOtherBlues",op:9,type:"delta"},{name:"blueScale",op:1209,type:"number",value:.039625},{name:"blueShift",op:1210,type:"number",value:7},{name:"blueFuzz",op:1211,type:"number",value:1},{name:"stdHW",op:10,type:"number"},{name:"stdVW",op:11,type:"number"},{name:"stemSnapH",op:1212,type:"number"},{name:"stemSnapV",op:1213,type:"number"},{name:"languageGroup",op:1217,type:"number",value:0},{name:"expansionFactor",op:1218,type:"number",value:.06},{name:"vsindex",op:22,type:"number",value:0},{name:"subrs",op:19,type:"offset"}],f1e=[{name:"private",op:18,type:["number","offset"],value:[0,0]}];function m1e(r,e,t,n){let i=NB(r,e,r.byteLength,n);return zB(i,n>1?d1e:fK,t)}function UB(r,e,t,n,i){let o=NB(r,e,t,i);return zB(o,i>1?p1e:mK,n)}function g1e(r,e,t){let n=NB(r,e,void 0,t);return zB(n,f1e)}function y1e(r,e,t){let n=[];for(let i=0;i<t.length;i++){let o=new DataView(new Uint8Array(t[i]).buffer),a=g1e(o,0,2),s=a.private[0],l=a.private[1];if(s!==0&&l!==0){let c=UB(r,l+e,s,[],2);if(c.subrs){let u=l+c.subrs,h=wc(r,u+e,void 0,2);a._subrs=h.objects,a._subrsBias=XE(a._subrs)}a._privateDict=c}n.push(a)}return n}function T4(r,e,t,n,i){let o=[];for(let a=0;a<t.length;a+=1){let s=new DataView(new Uint8Array(t[a]).buffer),l=m1e(s,0,n,i);l._subrs=[],l._subrsBias=0,l._defaultWidthX=0,l._nominalWidthX=0;let c=i<2?l.private[0]:0,u=i<2?l.private[1]:0;if(c!==0&&u!==0){let h=UB(r,u+e,c,n,i);if(l._defaultWidthX=h.defaultWidthX,l._nominalWidthX=h.nominalWidthX,h.subrs!==0){let d=u+h.subrs,p=wc(r,d+e,void 0,i);l._subrs=p.objects,l._subrsBias=XE(l._subrs)}l._privateDict=h}o.push(l)}return o}function b1e(r,e,t,n,i){let o,a,s=new qe.Parser(r,e);t-=1;let l=[".notdef"],c=s.parseCard8();if(c===0)for(let u=0;u<t;u+=1)o=s.parseSID(),i?l.push(o):l.push(p_(n,o)||o);else if(c===1)for(;l.length<=t;){o=s.parseSID(),a=s.parseCard8();for(let u=0;u<=a;u+=1)i?l.push("cid"+("00000"+o).slice(-5)):l.push(p_(n,o)||o),o+=1}else if(c===2)for(;l.length<=t;){o=s.parseSID(),a=s.parseCard16();for(let u=0;u<=a;u+=1)i?l.push("cid"+("00000"+o).slice(-5)):l.push(p_(n,o)||o),o+=1}else throw new Error("Unknown charset format "+c);return l}function v1e(r,e){let t,n={},i=new qe.Parser(r,e),o=i.parseCard8();if(o===0){let a=i.parseCard8();for(let s=0;s<a;s+=1)t=i.parseCard8(),n[t]=s}else if(o===1){let a=i.parseCard8();t=1;for(let s=0;s<a;s+=1){let l=i.parseCard8(),c=i.parseCard8();for(let u=l;u<=l+c;u+=1)n[u]=t,t+=1}}else throw new Error("Unknown encoding format "+o);return n}function x1e(r){let e=r.pop();for(;r.length>e;)r.pop()}function gK(r,e){let t=r.tables.cff&&r.tables.cff.topDict&&r.tables.cff.topDict.paintType||0;return t===2&&(e.fill=null,e.stroke="black",e.strokeWidth=r.tables.cff.topDict.strokeWidth||0),t}function fB(r,e,t,n,i){let o,a,s,l,c=new Zy,u=[],h=0,d=!1,p=!1,f=0,m=0,g,y,b,v,x=0,w=[],_,A=0,E=r.tables.cff2||r.tables.cff;if(b=E.topDict._defaultWidthX,v=E.topDict._nominalWidthX,i=i||r.variation&&r.variation.get(),e.getBlendPath||(e.getBlendPath=function(D){return fB(r,e,t,n,D)}),r.isCIDFont||n>1){let D=E.topDict._fdSelect?E.topDict._fdSelect[e.index]:0,z=E.topDict._fdArray[D];g=z._subrs,y=z._subrsBias,n>1?(w=E.topDict._vstore.itemVariationStore,x=z._privateDict.vsindex):(b=z._defaultWidthX,v=z._nominalWidthX)}else g=E.topDict._subrs,y=E.topDict._subrsBias;let S=gK(r,c),M=b;function T(D,z){p&&S!==2&&c.closePath(),c.moveTo(D,z),p=!0}function L(){let D;D=(u.length&1)!==0,D&&!d&&(M=u.shift()+v),h+=u.length>>1,u.length=0,d=!0}function O(D){let z,N,J,X,Q,ce,H,de,Se,te,ue,ve,se=0;for(;se<D.length;){let $=D[se];switch(se+=1,$){case 1:L();break;case 3:L();break;case 4:u.length>1&&!d&&(M=u.shift()+v,d=!0),m+=u.pop(),T(f,m);break;case 5:for(;u.length>0;)f+=u.shift(),m+=u.shift(),c.lineTo(f,m);break;case 6:for(;u.length>0&&(f+=u.shift(),c.lineTo(f,m),u.length!==0);)m+=u.shift(),c.lineTo(f,m);break;case 7:for(;u.length>0&&(m+=u.shift(),c.lineTo(f,m),u.length!==0);)f+=u.shift(),c.lineTo(f,m);break;case 8:for(;u.length>0;)o=f+u.shift(),a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),f=s+u.shift(),m=l+u.shift(),c.curveTo(o,a,s,l,f,m);break;case 10:if(Q=u.pop()+y,ce=g[Q],ce){if(A>=pY){console.warn("CFF charstring subroutine call depth exceeded, skipping callsubr");break}A++,O(ce),A--}break;case 11:if(n>1){console.error("CFF CharString operator return (11) is not supported in CFF2");break}return;case 12:switch($=D[se],se+=1,$){case 35:o=f+u.shift(),a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),H=s+u.shift(),de=l+u.shift(),Se=H+u.shift(),te=de+u.shift(),ue=Se+u.shift(),ve=te+u.shift(),f=ue+u.shift(),m=ve+u.shift(),u.shift(),c.curveTo(o,a,s,l,H,de),c.curveTo(Se,te,ue,ve,f,m);break;case 34:o=f+u.shift(),a=m,s=o+u.shift(),l=a+u.shift(),H=s+u.shift(),de=l,Se=H+u.shift(),te=l,ue=Se+u.shift(),ve=m,f=ue+u.shift(),c.curveTo(o,a,s,l,H,de),c.curveTo(Se,te,ue,ve,f,m);break;case 36:o=f+u.shift(),a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),H=s+u.shift(),de=l,Se=H+u.shift(),te=l,ue=Se+u.shift(),ve=te+u.shift(),f=ue+u.shift(),c.curveTo(o,a,s,l,H,de),c.curveTo(Se,te,ue,ve,f,m);break;case 37:o=f+u.shift(),a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),H=s+u.shift(),de=l+u.shift(),Se=H+u.shift(),te=de+u.shift(),ue=Se+u.shift(),ve=te+u.shift(),Math.abs(ue-f)>Math.abs(ve-m)?f=ue+u.shift():m=ve+u.shift(),c.curveTo(o,a,s,l,H,de),c.curveTo(Se,te,ue,ve,f,m);break;default:console.log("Glyph "+e.index+": unknown operator 1200"+$),u.length=0}break;case 14:if(n>1){console.error("CFF CharString operator endchar (14) is not supported in CFF2");break}if(u.length>=4){let yt=pB[u.pop()],C=pB[u.pop()],I=u.pop(),B=u.pop();if(yt&&C){e.isComposite=!0,e.components=[];let K=r.cffEncoding.charset.indexOf(yt),q=r.cffEncoding.charset.indexOf(C);e.components.push({glyphIndex:q,dx:0,dy:0}),e.components.push({glyphIndex:K,dx:B,dy:I}),c.extend(r.glyphs.get(q).path);let F=r.glyphs.get(K),R=JSON.parse(JSON.stringify(F.path.commands));for(let ee=0;ee<R.length;ee+=1){let fe=R[ee];fe.type!=="Z"&&(fe.x+=B,fe.y+=I),(fe.type==="Q"||fe.type==="C")&&(fe.x1+=B,fe.y1+=I),fe.type==="C"&&(fe.x2+=B,fe.y2+=I)}c.extend(R)}}else u.length>0&&!d&&(M=u.shift()+v,d=!0);p&&S!==2&&(c.closePath(),p=!1);break;case 15:if(n<2){console.error("CFF2 CharString operator vsindex (15) is not supported in CFF");break}x=u.pop();break;case 16:if(n<2){console.error("CFF2 CharString operator blend (16) is not supported in CFF");break}_||(_=r.variation&&i&&r.variation.process.getBlendVector(w,x,i));var we=u.pop(),pe=_?_.length:w.itemVariationSubtables[x].regionIndexes.length,Ee=we*pe,Oe=u.length-Ee,Pe=Oe-we;if(_)for(let yt=0;yt<we;yt++){var Xe=u[Pe+yt];for(let C=0;C<pe;C++)Xe+=_[C]*u[Oe++];u[Pe+yt]=Xe}for(;Ee--;)u.pop();break;case 18:L();break;case 19:case 20:L(),se+=h+7>>3;break;case 21:u.length>2&&!d&&(M=u.shift()+v,d=!0),m+=u.pop(),f+=u.pop(),T(f,m);break;case 22:u.length>1&&!d&&(M=u.shift()+v,d=!0),f+=u.pop(),T(f,m);break;case 23:L();break;case 24:for(;u.length>2;)o=f+u.shift(),a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),f=s+u.shift(),m=l+u.shift(),c.curveTo(o,a,s,l,f,m);f+=u.shift(),m+=u.shift(),c.lineTo(f,m);break;case 25:for(;u.length>6;)f+=u.shift(),m+=u.shift(),c.lineTo(f,m);o=f+u.shift(),a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),f=s+u.shift(),m=l+u.shift(),c.curveTo(o,a,s,l,f,m);break;case 26:for(u.length&1&&(f+=u.shift());u.length>0;)o=f,a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),f=s,m=l+u.shift(),c.curveTo(o,a,s,l,f,m);break;case 27:for(u.length&1&&(m+=u.shift());u.length>0;)o=f+u.shift(),a=m,s=o+u.shift(),l=a+u.shift(),f=s+u.shift(),m=l,c.curveTo(o,a,s,l,f,m);break;case 28:z=D[se],N=D[se+1],u.push((z<<24|N<<16)>>16),se+=2;break;case 29:if(Q=u.pop()+r.gsubrsBias,ce=r.gsubrs[Q],ce){if(A>=pY){console.warn("CFF charstring subroutine call depth exceeded, skipping callgsubr");break}A++,O(ce),A--}break;case 30:for(;u.length>0&&(o=f,a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),f=s+u.shift(),m=l+(u.length===1?u.shift():0),c.curveTo(o,a,s,l,f,m),u.length!==0);)o=f+u.shift(),a=m,s=o+u.shift(),l=a+u.shift(),m=l+u.shift(),f=s+(u.length===1?u.shift():0),c.curveTo(o,a,s,l,f,m);break;case 31:for(;u.length>0&&(o=f+u.shift(),a=m,s=o+u.shift(),l=a+u.shift(),m=l+u.shift(),f=s+(u.length===1?u.shift():0),c.curveTo(o,a,s,l,f,m),u.length!==0);)o=f,a=m+u.shift(),s=o+u.shift(),l=a+u.shift(),f=s+u.shift(),m=l+(u.length===1?u.shift():0),c.curveTo(o,a,s,l,f,m);break;default:$<32?console.log("Glyph "+e.index+": unknown operator "+$):$<247?u.push($-139):$<251?(z=D[se],se+=1,u.push(($-247)*256+z+108)):$<255?(z=D[se],se+=1,u.push(-($-251)*256-z-108)):(z=D[se],N=D[se+1],J=D[se+2],X=D[se+3],se+=4,u.push((z<<24|N<<16|J<<8|X)/65536))}}}return O(t),r.variation&&i&&(c.commands=c.commands.map(D=>{let z=Object.keys(D);for(let N=0;N<z.length;N++){let J=z[N];J!=="type"&&(D[J]=Math.round(D[J]))}return D})),d&&(e.advanceWidth=M),c}function fY(r,e,t,n,i){let o=[],a,s=new qe.Parser(r,e),l=s.parseCard8();if(l===0)for(let c=0;c<t;c++){if(a=s.parseCard8(),a>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+n+")");o.push(a)}else if(l===3||i>1&&l===4){let c=l===4?s.parseULong():s.parseCard16(),u=l===4?s.parseULong():s.parseCard16();if(u!==0)throw new Error(`CFF Table CID Font FDSelect format ${l} range has bad initial GID ${u}`);let h;for(let d=0;d<c;d++){if(a=l===4?s.parseUShort():s.parseCard8(),h=l===4?s.parseULong():s.parseCard16(),a>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+n+")");if(h>t)throw new Error(`CFF Table CID Font FDSelect format ${i} range has bad GID ${h}`);for(;u<h;u++)o.push(a);u=h}if(h!==t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final (Sentinal) GID "+h)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+l);return o}function w1e(r,e,t,n){let i,o=h1e(r,e);o.formatMajor===2?i=t.tables.cff2={}:i=t.tables.cff={};let a=o.formatMajor>1?null:wc(r,o.endOffset,qe.bytesToString),s=o.formatMajor>1?null:wc(r,a.endOffset),l=o.formatMajor>1?null:wc(r,s.endOffset,qe.bytesToString),c=wc(r,o.formatMajor>1?e+o.size+o.topDictLength:l.endOffset,void 0,o.formatMajor);t.gsubrs=c.objects,t.gsubrsBias=XE(t.gsubrs);let u;if(o.formatMajor>1){let d=e+o.size,p=qe.getBytes(r,d,d+o.topDictLength);u=T4(r,0,[p],void 0,o.formatMajor)[0]}else{let d=T4(r,e,s.objects,l.objects,o.formatMajor);if(d.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+d.length);u=d[0]}if(i.topDict=u,u._privateDict&&(t.defaultWidthX=u._privateDict.defaultWidthX,t.nominalWidthX=u._privateDict.nominalWidthX),o.formatMajor<2&&u.ros[0]!==void 0&&u.ros[1]!==void 0&&(t.isCIDFont=!0),o.formatMajor>1){let d=u.fdArray,p=u.fdSelect;if(!d)throw new Error("This is a CFF2 font, but FDArray information is missing");let f=wc(r,e+d,null,o.formatMajor),m=y1e(r,e,f.objects);u._fdArray=m,p&&(u._fdSelect=fY(r,e+p,t.numGlyphs,m.length,o.formatMajor))}else if(t.isCIDFont){let d=u.fdArray,p=u.fdSelect;if(d===0||p===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");d+=e;let f=wc(r,d),m=T4(r,e,f.objects,l.objects,o.formatMajor);u._fdArray=m,p+=e,u._fdSelect=fY(r,p,t.numGlyphs,m.length,o.formatMajor)}if(o.formatMajor<2){let d=e+u.private[1],p=UB(r,d,u.private[0],l.objects,o.formatMajor);if(t.defaultWidthX=p.defaultWidthX,t.nominalWidthX=p.nominalWidthX,p.subrs!==0){let f=d+p.subrs,m=wc(r,f);t.subrs=m.objects,t.subrsBias=XE(t.subrs)}else t.subrs=[],t.subrsBias=0}let h;if(n.lowMemory?(h=a1e(r,e+u.charStrings,o.formatMajor),t.nGlyphs=h.offsets.length-(o.formatMajor>1?1:0)):(h=wc(r,e+u.charStrings,null,o.formatMajor),t.nGlyphs=h.objects.length),o.formatMajor>1&&t.tables.maxp&&t.nGlyphs!==t.tables.maxp.numGlyphs&&console.error(`Glyph count in the CFF2 table (${t.nGlyphs}) must correspond to the glyph count in the maxp table (${t.tables.maxp.numGlyphs})`),o.formatMajor<2){let d=[],p=[];u.charset===0?d=H_e:u.charset===1?d=W_e:u.charset===2?d=X_e:d=b1e(r,e+u.charset,t.nGlyphs,l.objects,t.isCIDFont),u.encoding===0?p=pB:u.encoding===1?p=Y_e:p=v1e(r,e+u.encoding),t.cffEncoding=new cK(p,d),t.encoding=t.encoding||t.cffEncoding}if(t.glyphs=new Mc.GlyphSet(t),n.lowMemory)t._push=function(d){let p=s1e(d,h.offsets,r,e+u.charStrings,void 0,o.formatMajor);t.glyphs.push(d,Mc.cffGlyphLoader(t,d,fB,p,o.formatMajor))};else for(let d=0;d<t.nGlyphs;d+=1){let p=h.objects[d];t.glyphs.push(d,Mc.cffGlyphLoader(t,d,fB,p,o.formatMajor))}if(u.vstore){let d=new qe.Parser(r,e+u.vstore);u._vstore=d.parseVariationStore()}}function yK(r,e){let t,n=AE.indexOf(r);return n>=0&&(t=n),n=e.indexOf(r),n>=0?t=n+AE.length:(t=AE.length+e.length,e.push(r)),t}function _1e(){return new Fe.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function S1e(r){let e=new Fe.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);e.names=[];for(let t=0;t<r.length;t+=1)e.names.push({name:"name_"+t,type:"NAME",value:r[t]});return e}function bK(r,e,t){let n={};for(let i=0;i<r.length;i+=1){let o=r[i],a=e[o.name];a!==void 0&&!pK(a,o.value)&&(o.type==="SID"&&(a=yK(a,t)),n[o.op]={name:o.name,type:o.type,value:a})}return n}function mY(r,e,t){let n=new Fe.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=bK(fK,r,e),n}function gY(r){let e=new Fe.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return e.topDicts=[{name:"topDict_0",type:"TABLE",value:r}],e}function A1e(r){let e=new Fe.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);e.strings=[];for(let t=0;t<r.length;t+=1)e.strings.push({name:"string_"+t,type:"STRING",value:r[t]});return e}function M1e(){return new Fe.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function P1e(r,e){let t=new Fe.Record("Charsets",[{name:"format",type:"Card8",value:0}]);for(let n=0;n<r.length;n+=1){let i=r[n],o=yK(i,e);t.fields.push({name:"glyph_"+n,type:"SID",value:o})}return t}function E1e(r,e){let t=[],n=r.path;t.push({name:"width",type:"NUMBER",value:r.advanceWidth});let i=0,o=0;for(let a=0;a<n.commands.length;a+=1){let s,l,c=n.commands[a];if(c.type==="Q"){let u=.3333333333333333,h=2/3;c={type:"C",x:c.x,y:c.y,x1:Math.round(u*i+h*c.x1),y1:Math.round(u*o+h*c.y1),x2:Math.round(u*c.x+h*c.x1),y2:Math.round(u*c.y+h*c.y1)}}if(c.type==="M")s=Math.round(c.x-i),l=Math.round(c.y-o),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:l}),t.push({name:"rmoveto",type:"OP",value:21}),i=Math.round(c.x),o=Math.round(c.y);else if(c.type==="L")s=Math.round(c.x-i),l=Math.round(c.y-o),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:l}),t.push({name:"rlineto",type:"OP",value:5}),i=Math.round(c.x),o=Math.round(c.y);else if(c.type==="C"){let u=Math.round(c.x1-i),h=Math.round(c.y1-o),d=Math.round(c.x2-c.x1),p=Math.round(c.y2-c.y1);s=Math.round(c.x-c.x2),l=Math.round(c.y-c.y2),t.push({name:"dx1",type:"NUMBER",value:u}),t.push({name:"dy1",type:"NUMBER",value:h}),t.push({name:"dx2",type:"NUMBER",value:d}),t.push({name:"dy2",type:"NUMBER",value:p}),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:l}),t.push({name:"rrcurveto",type:"OP",value:8}),i=Math.round(c.x),o=Math.round(c.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}function C1e(r,e){let t=new Fe.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]);for(let n=0;n<r.length;n+=1){let i=r.get(n),o=E1e(i);t.charStrings.push({name:i.name,type:"CHARSTRING",value:o})}return t}function T1e(r,e,t){let n=new Fe.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=bK(mK,r,e),n}function k1e(r,e){let t=new Fe.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/e.unitsPerEm,i={version:e.version,fullName:e.fullName,familyName:e.familyName,weight:e.weightName,fontBBox:e.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},o=e&&e.topDict||{};o.paintType&&(i.paintType=o.paintType,i.strokeWidth=o.strokeWidth||0);let a={},s=[],l;for(let d=1;d<r.length;d+=1)l=r.get(d),s.push(l.name);let c=[];t.header=_1e(),t.nameIndex=S1e([e.postScriptName]);let u=mY(i,c);t.topDictIndex=gY(u),t.globalSubrIndex=M1e(),t.charsets=P1e(s,c),t.charStringsIndex=C1e(r),t.privateDict=T1e(a,c),t.stringIndex=A1e(c);let h=t.header.sizeOf()+t.nameIndex.sizeOf()+t.topDictIndex.sizeOf()+t.stringIndex.sizeOf()+t.globalSubrIndex.sizeOf();return i.charset=h,i.encoding=0,i.charStrings=i.charset+t.charsets.sizeOf(),i.private[1]=i.charStrings+t.charStringsIndex.sizeOf(),u=mY(i,c),t.topDictIndex=gY(u),t}var mB={parse:w1e,make:k1e};function I1e(r,e){let t={},n=new qe.Parser(r,e);return t.version=n.parseVersion(),t.fontRevision=Math.round(n.parseFixed()*1e3)/1e3,t.checkSumAdjustment=n.parseULong(),t.magicNumber=n.parseULong(),mt.argument(t.magicNumber===1594834165,"Font header has wrong magic number."),t.flags=n.parseUShort(),t.unitsPerEm=n.parseUShort(),t.created=n.parseLongDateTime(),t.modified=n.parseLongDateTime(),t.xMin=n.parseShort(),t.yMin=n.parseShort(),t.xMax=n.parseShort(),t.yMax=n.parseShort(),t.macStyle=n.parseUShort(),t.lowestRecPPEM=n.parseUShort(),t.fontDirectionHint=n.parseShort(),t.indexToLocFormat=n.parseShort(),t.glyphDataFormat=n.parseShort(),t}function L1e(r){let e=Math.round(new Date().getTime()/1e3)+2082844800,t=e,n=r.macStyle||0;return r.createdTimestamp&&(t=r.createdTimestamp+2082844800),new Fe.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:t},{name:"modified",type:"LONGDATETIME",value:e},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:n},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],r)}var vK={parse:I1e,make:L1e};function O1e(r,e){let t={},n=new qe.Parser(r,e);return t.version=n.parseVersion(),t.ascender=n.parseShort(),t.descender=n.parseShort(),t.lineGap=n.parseShort(),t.advanceWidthMax=n.parseUShort(),t.minLeftSideBearing=n.parseShort(),t.minRightSideBearing=n.parseShort(),t.xMaxExtent=n.parseShort(),t.caretSlopeRise=n.parseShort(),t.caretSlopeRun=n.parseShort(),t.caretOffset=n.parseShort(),n.relativeOffset+=8,t.metricDataFormat=n.parseShort(),t.numberOfHMetrics=n.parseUShort(),t}function D1e(r){return new Fe.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],r)}var xK={parse:O1e,make:D1e};function R1e(r,e,t,n,i){let o,a,s=new qe.Parser(r,e);for(let l=0;l<n;l+=1){l<t&&(o=s.parseUShort(),a=s.parseShort());let c=i.get(l);c.advanceWidth=o,c.leftSideBearing=a}}function B1e(r,e,t,n,i){r._hmtxTableData={};let o,a,s=new qe.Parser(e,t);for(let l=0;l<i;l+=1)l<n&&(o=s.parseUShort(),a=s.parseShort()),r._hmtxTableData[l]={advanceWidth:o,leftSideBearing:a}}function F1e(r,e,t,n,i,o,a){a.lowMemory?B1e(r,e,t,n,i):R1e(e,t,n,i,o)}function N1e(r){let e=new Fe.Table("hmtx",[]);for(let t=0;t<r.length;t+=1){let n=r.get(t),i=n.advanceWidth||0,o=n.leftSideBearing||0;e.fields.push({name:"advanceWidth_"+t,type:"USHORT",value:i}),e.fields.push({name:"leftSideBearing_"+t,type:"SHORT",value:o})}return e}var wK={parse:F1e,make:N1e};function z1e(r){let e=new Fe.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:r.length}]),t="",n=12+r.length*4;for(let i=0;i<r.length;++i){let o=t.indexOf(r[i]);o<0&&(o=t.length,t+=r[i]),e.fields.push({name:"offset "+i,type:"USHORT",value:n+o}),e.fields.push({name:"length "+i,type:"USHORT",value:r[i].length})}return e.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),e}function U1e(r,e){let t=new qe.Parser(r,e),n=t.parseULong();mt.argument(n===1,"Unsupported ltag table version."),t.skip("uLong",1);let i=t.parseULong(),o=[];for(let a=0;a<i;a++){let s="",l=e+t.parseUShort(),c=t.parseUShort();for(let u=l;u<l+c;++u)s+=String.fromCharCode(r.getInt8(u));o.push(s)}return o}var _K={make:z1e,parse:U1e};function j1e(r,e){let t={},n=new qe.Parser(r,e);return t.version=n.parseVersion(),t.numGlyphs=n.parseUShort(),t.version===1&&(t.maxPoints=n.parseUShort(),t.maxContours=n.parseUShort(),t.maxCompositePoints=n.parseUShort(),t.maxCompositeContours=n.parseUShort(),t.maxZones=n.parseUShort(),t.maxTwilightPoints=n.parseUShort(),t.maxStorage=n.parseUShort(),t.maxFunctionDefs=n.parseUShort(),t.maxInstructionDefs=n.parseUShort(),t.maxStackElements=n.parseUShort(),t.maxSizeOfInstructions=n.parseUShort(),t.maxComponentElements=n.parseUShort(),t.maxComponentDepth=n.parseUShort()),t}function V1e(r){return new Fe.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:r}])}var SK={parse:j1e,make:V1e},gB=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function G1e(r){for(let e=0;e<gB.length;e+=1){let t=gB[e];if(r>=t.begin&&r<t.end)return e}return-1}function H1e(r,e){let t={},n=new qe.Parser(r,e);t.version=n.parseUShort(),t.xAvgCharWidth=n.parseShort(),t.usWeightClass=n.parseUShort(),t.usWidthClass=n.parseUShort(),t.fsType=n.parseUShort(),t.ySubscriptXSize=n.parseShort(),t.ySubscriptYSize=n.parseShort(),t.ySubscriptXOffset=n.parseShort(),t.ySubscriptYOffset=n.parseShort(),t.ySuperscriptXSize=n.parseShort(),t.ySuperscriptYSize=n.parseShort(),t.ySuperscriptXOffset=n.parseShort(),t.ySuperscriptYOffset=n.parseShort(),t.yStrikeoutSize=n.parseShort(),t.yStrikeoutPosition=n.parseShort(),t.sFamilyClass=n.parseShort(),t.panose=[];for(let i=0;i<10;i++)t.panose[i]=n.parseByte();return t.ulUnicodeRange1=n.parseULong(),t.ulUnicodeRange2=n.parseULong(),t.ulUnicodeRange3=n.parseULong(),t.ulUnicodeRange4=n.parseULong(),t.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),t.fsSelection=n.parseUShort(),t.usFirstCharIndex=n.parseUShort(),t.usLastCharIndex=n.parseUShort(),t.sTypoAscender=n.parseShort(),t.sTypoDescender=n.parseShort(),t.sTypoLineGap=n.parseShort(),t.usWinAscent=n.parseUShort(),t.usWinDescent=n.parseUShort(),t.version>=1&&(t.ulCodePageRange1=n.parseULong(),t.ulCodePageRange2=n.parseULong()),t.version>=2&&(t.sxHeight=n.parseShort(),t.sCapHeight=n.parseShort(),t.usDefaultChar=n.parseUShort(),t.usBreakChar=n.parseUShort(),t.usMaxContent=n.parseUShort()),t}function W1e(r){return new Fe.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],r)}var yB={parse:H1e,make:W1e,unicodeRanges:gB,getUnicodeRange:G1e};function X1e(r,e){let t={},n=new qe.Parser(r,e);switch(t.version=n.parseVersion(),t.italicAngle=n.parseFixed(),t.underlinePosition=n.parseShort(),t.underlineThickness=n.parseShort(),t.isFixedPitch=n.parseULong(),t.minMemType42=n.parseULong(),t.maxMemType42=n.parseULong(),t.minMemType1=n.parseULong(),t.maxMemType1=n.parseULong(),t.version){case 1:t.names=Af.slice();break;case 2:t.numberOfGlyphs=n.parseUShort(),t.glyphNameIndex=new Array(t.numberOfGlyphs);for(let i=0;i<t.numberOfGlyphs;i++)t.glyphNameIndex[i]=n.parseUShort();t.names=[];for(let i=0;i<t.numberOfGlyphs;i++)if(t.glyphNameIndex[i]>=Af.length){let o=n.parseChar();t.names.push(n.parseString(o))}break;case 2.5:t.numberOfGlyphs=n.parseUShort(),t.offset=new Array(t.numberOfGlyphs);for(let i=0;i<t.numberOfGlyphs;i++)t.offset[i]=n.parseChar();break}return t}function Y1e(r){let{italicAngle:e=Math.round((r.italicAngle||0)*65536),underlinePosition:t=0,underlineThickness:n=0,isFixedPitch:i=0,minMemType42:o=0,maxMemType42:a=0,minMemType1:s=0,maxMemType1:l=0}=r.tables.post||{};return new Fe.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:e},{name:"underlinePosition",type:"FWORD",value:t},{name:"underlineThickness",type:"FWORD",value:n},{name:"isFixedPitch",type:"ULONG",value:i},{name:"minMemType42",type:"ULONG",value:o},{name:"maxMemType42",type:"ULONG",value:a},{name:"minMemType1",type:"ULONG",value:s},{name:"maxMemType1",type:"ULONG",value:l}])}var AK={parse:X1e,make:Y1e},_l=new Array(9);_l[1]=function(){let r=this.offset+this.relativeOffset,e=this.parseUShort();if(e===1)return{substFormat:1,coverage:this.parsePointer(ie.coverage),deltaGlyphId:this.parseShort()};if(e===2)return{substFormat:2,coverage:this.parsePointer(ie.coverage),substitute:this.parseOffset16List()};mt.assert(!1,"0x"+r.toString(16)+": lookup type 1 format must be 1 or 2.")};_l[2]=function(){let r=this.parseUShort();return mt.argument(r===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(ie.coverage),sequences:this.parseListOfLists()}};_l[3]=function(){let r=this.parseUShort();return mt.argument(r===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(ie.coverage),alternateSets:this.parseListOfLists()}};_l[4]=function(){let r=this.parseUShort();return mt.argument(r===1,"GSUB ligature table identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(ie.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var Yy={sequenceIndex:ie.uShort,lookupListIndex:ie.uShort};_l[5]=function(){let r=this.offset+this.relativeOffset,e=this.parseUShort();if(e===1)return{substFormat:e,coverage:this.parsePointer(ie.coverage),ruleSets:this.parseListOfLists(function(){let t=this.parseUShort(),n=this.parseUShort();return{input:this.parseUShortList(t-1),lookupRecords:this.parseRecordList(n,Yy)}})};if(e===2)return{substFormat:e,coverage:this.parsePointer(ie.coverage),classDef:this.parsePointer(ie.classDef),classSets:this.parseListOfLists(function(){let t=this.parseUShort(),n=this.parseUShort();return{classes:this.parseUShortList(t-1),lookupRecords:this.parseRecordList(n,Yy)}})};if(e===3){let t=this.parseUShort(),n=this.parseUShort();return{substFormat:e,coverages:this.parseList(t,ie.pointer(ie.coverage)),lookupRecords:this.parseRecordList(n,Yy)}}mt.assert(!1,"0x"+r.toString(16)+": lookup type 5 format must be 1, 2 or 3.")};_l[6]=function(){let r=this.offset+this.relativeOffset,e=this.parseUShort();if(e===1)return{substFormat:1,coverage:this.parsePointer(ie.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Yy)}})};if(e===2)return{substFormat:2,coverage:this.parsePointer(ie.coverage),backtrackClassDef:this.parsePointer(ie.classDef),inputClassDef:this.parsePointer(ie.classDef),lookaheadClassDef:this.parsePointer(ie.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Yy)}})};if(e===3)return{substFormat:3,backtrackCoverage:this.parseList(ie.pointer(ie.coverage)),inputCoverage:this.parseList(ie.pointer(ie.coverage)),lookaheadCoverage:this.parseList(ie.pointer(ie.coverage)),lookupRecords:this.parseRecordList(Yy)};mt.assert(!1,"0x"+r.toString(16)+": lookup type 6 format must be 1, 2 or 3.")};_l[7]=function(){let r=this.parseUShort();mt.argument(r===1,"GSUB Extension Substitution subtable identifier-format must be 1");let e=this.parseUShort(),t=new ie(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:e,extension:_l[e].call(t)}};_l[8]=function(){let r=this.parseUShort();return mt.argument(r===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(ie.coverage),backtrackCoverage:this.parseList(ie.pointer(ie.coverage)),lookaheadCoverage:this.parseList(ie.pointer(ie.coverage)),substitutes:this.parseUShortList()}};function $1e(r,e){e=e||0;let t=new ie(r,e),n=t.parseVersion(1);return mt.argument(n===1||n===1.1,"Unsupported GSUB table version."),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(_l)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(_l),variations:t.parseFeatureVariationsList()}}var Lf=new Array(9);Lf[1]=function(r){if(r.substFormat===1)return new Fe.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)},{name:"deltaGlyphID",type:"SHORT",value:r.deltaGlyphId}]);if(r.substFormat===2)return new Fe.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)}].concat(Fe.ushortList("substitute",r.substitute)));mt.fail("Lookup type 1 substFormat must be 1 or 2.")};Lf[2]=function(r){return mt.assert(r.substFormat===1,"Lookup type 2 substFormat must be 1."),new Fe.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)}].concat(Fe.tableList("seqSet",r.sequences,function(e){return new Fe.Table("sequenceSetTable",Fe.ushortList("sequence",e))})))};Lf[3]=function(r){return mt.assert(r.substFormat===1,"Lookup type 3 substFormat must be 1."),new Fe.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)}].concat(Fe.tableList("altSet",r.alternateSets,function(e){return new Fe.Table("alternateSetTable",Fe.ushortList("alternate",e))})))};Lf[4]=function(r){return mt.assert(r.substFormat===1,"Lookup type 4 substFormat must be 1."),new Fe.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)}].concat(Fe.tableList("ligSet",r.ligatureSets,function(e){return new Fe.Table("ligatureSetTable",Fe.tableList("ligature",e,function(t){return new Fe.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:t.ligGlyph}].concat(Fe.ushortList("component",t.components,t.components.length+1)))}))})))};Lf[5]=function(r){if(r.substFormat===1)return new Fe.Table("contextualSubstitutionTable",[{name:"substFormat",type:"USHORT",value:r.substFormat},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)}].concat(Fe.tableList("sequenceRuleSet",r.ruleSets,function(e){return e?new Fe.Table("sequenceRuleSetTable",Fe.tableList("sequenceRule",e,function(t){let n=Fe.ushortList("seqLookup",[],t.lookupRecords.length).concat(Fe.ushortList("inputSequence",t.input,t.input.length+1));[n[0],n[1]]=[n[1],n[0]];for(let i=0;i<t.lookupRecords.length;i++){let o=t.lookupRecords[i];n=n.concat({name:"sequenceIndex"+i,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+i,type:"USHORT",value:o.lookupListIndex})}return new Fe.Table("sequenceRuleTable",n)})):new Fe.Table("NULL",null)})));if(r.substFormat===2)return new Fe.Table("contextualSubstitutionTable",[{name:"substFormat",type:"USHORT",value:r.substFormat},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)},{name:"classDef",type:"TABLE",value:new Fe.ClassDef(r.classDef)}].concat(Fe.tableList("classSeqRuleSet",r.classSets,function(e){return e?new Fe.Table("classSeqRuleSetTable",Fe.tableList("classSeqRule",e,function(t){let n=Fe.ushortList("classes",t.classes,t.classes.length+1).concat(Fe.ushortList("seqLookupCount",[],t.lookupRecords.length));for(let i=0;i<t.lookupRecords.length;i++){let o=t.lookupRecords[i];n=n.concat({name:"sequenceIndex"+i,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+i,type:"USHORT",value:o.lookupListIndex})}return new Fe.Table("classSeqRuleTable",n)})):new Fe.Table("NULL",null)})));if(r.substFormat===3){let e=[{name:"substFormat",type:"USHORT",value:r.substFormat}];e.push({name:"inputGlyphCount",type:"USHORT",value:r.coverages.length}),e.push({name:"substitutionCount",type:"USHORT",value:r.lookupRecords.length});for(let t=0;t<r.coverages.length;t++){let n=r.coverages[t];e.push({name:"inputCoverage"+t,type:"TABLE",value:new Fe.Coverage(n)})}for(let t=0;t<r.lookupRecords.length;t++){let n=r.lookupRecords[t];e=e.concat({name:"sequenceIndex"+t,type:"USHORT",value:n.sequenceIndex}).concat({name:"lookupListIndex"+t,type:"USHORT",value:n.lookupListIndex})}return new Fe.Table("contextualSubstitutionTable",e)}mt.assert(!1,"lookup type 5 format must be 1, 2 or 3.")};Lf[6]=function(r){if(r.substFormat===1)return new Fe.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:r.substFormat},{name:"coverage",type:"TABLE",value:new Fe.Coverage(r.coverage)}].concat(Fe.tableList("chainRuleSet",r.chainRuleSets,function(e){return new Fe.Table("chainRuleSetTable",Fe.tableList("chainRule",e,function(t){let n=Fe.ushortList("backtrackGlyph",t.backtrack,t.backtrack.length).concat(Fe.ushortList("inputGlyph",t.input,t.input.length+1)).concat(Fe.ushortList("lookaheadGlyph",t.lookahead,t.lookahead.length)).concat(Fe.ushortList("substitution",[],t.lookupRecords.length));for(let i=0;i<t.lookupRecords.length;i++){let o=t.lookupRecords[i];n=n.concat({name:"sequenceIndex"+i,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+i,type:"USHORT",value:o.lookupListIndex})}return new Fe.Table("chainRuleTable",n)}))})));if(r.substFormat===2)mt.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(r.substFormat===3){let e=[{name:"substFormat",type:"USHORT",value:r.substFormat}];e.push({name:"backtrackGlyphCount",type:"USHORT",value:r.backtrackCoverage.length});for(let t=0;t<r.backtrackCoverage.length;t++){let n=r.backtrackCoverage[t];e.push({name:"backtrackCoverage"+t,type:"TABLE",value:new Fe.Coverage(n)})}e.push({name:"inputGlyphCount",type:"USHORT",value:r.inputCoverage.length});for(let t=0;t<r.inputCoverage.length;t++){let n=r.inputCoverage[t];e.push({name:"inputCoverage"+t,type:"TABLE",value:new Fe.Coverage(n)})}e.push({name:"lookaheadGlyphCount",type:"USHORT",value:r.lookaheadCoverage.length});for(let t=0;t<r.lookaheadCoverage.length;t++){let n=r.lookaheadCoverage[t];e.push({name:"lookaheadCoverage"+t,type:"TABLE",value:new Fe.Coverage(n)})}e.push({name:"substitutionCount",type:"USHORT",value:r.lookupRecords.length});for(let t=0;t<r.lookupRecords.length;t++){let n=r.lookupRecords[t];e=e.concat({name:"sequenceIndex"+t,type:"USHORT",value:n.sequenceIndex}).concat({name:"lookupListIndex"+t,type:"USHORT",value:n.lookupListIndex})}return new Fe.Table("chainContextTable",e)}mt.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};function K1e(r){return new Fe.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new Fe.ScriptList(r.scripts)},{name:"features",type:"TABLE",value:new Fe.FeatureList(r.features)},{name:"lookups",type:"TABLE",value:new Fe.LookupList(r.lookups,Lf)}])}var MK={parse:$1e,make:K1e};function q1e(r,e){let t=new qe.Parser(r,e),n=t.parseULong();mt.argument(n===1,"Unsupported META table version."),t.parseULong(),t.parseULong();let i=t.parseULong(),o={};for(let a=0;a<i;a++){let s=t.parseTag(),l=t.parseULong(),c=t.parseULong();if(s==="appl"||s==="bild")continue;let u=Jy.UTF8(r,e+l,c);o[s]=u}return o}function Z1e(r){let e=Object.keys(r).length,t="",n=16+e*12,i=new Fe.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:e}]);for(let o in r){let a=t.length;t+=r[o],i.fields.push({name:"tag "+o,type:"TAG",value:o}),i.fields.push({name:"offset "+o,type:"ULONG",value:n+a}),i.fields.push({name:"length "+o,type:"ULONG",value:r[o].length})}return i.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),i}var PK={parse:q1e,make:Z1e};function J1e(r,e){let t=new ie(r,e),n=t.parseUShort();n!==0&&console.warn("Only COLRv0 is currently fully supported. A subset of color glyphs might be available in this font if provided in the v0 format.");let i=t.parseUShort(),o=t.parseOffset32(),a=t.parseOffset32(),s=t.parseUShort();t.relativeOffset=o;let l=t.parseRecordList(i,{glyphID:ie.uShort,firstLayerIndex:ie.uShort,numLayers:ie.uShort});t.relativeOffset=a;let c=t.parseRecordList(s,{glyphID:ie.uShort,paletteIndex:ie.uShort});return{version:n,baseGlyphRecords:l,layerRecords:c}}function Q1e({version:r=0,baseGlyphRecords:e=[],layerRecords:t=[]}){mt.argument(r===0,"Only COLRv0 supported.");let n=14,i=n+e.length*6;return new Fe.Table("COLR",[{name:"version",type:"USHORT",value:r},{name:"numBaseGlyphRecords",type:"USHORT",value:e.length},{name:"baseGlyphRecordsOffset",type:"ULONG",value:n},{name:"layerRecordsOffset",type:"ULONG",value:i},{name:"numLayerRecords",type:"USHORT",value:t.length},...e.map((o,a)=>[{name:"glyphID_"+a,type:"USHORT",value:o.glyphID},{name:"firstLayerIndex_"+a,type:"USHORT",value:o.firstLayerIndex},{name:"numLayers_"+a,type:"USHORT",value:o.numLayers}]).flat(),...t.map((o,a)=>[{name:"LayerGlyphID_"+a,type:"USHORT",value:o.glyphID},{name:"paletteIndex_"+a,type:"USHORT",value:o.paletteIndex}]).flat()])}var EK={parse:J1e,make:Q1e};function eSe(r,e){return[{name:"tag_"+r,type:"TAG",value:e.tag},{name:"minValue_"+r,type:"FIXED",value:e.minValue<<16},{name:"defaultValue_"+r,type:"FIXED",value:e.defaultValue<<16},{name:"maxValue_"+r,type:"FIXED",value:e.maxValue<<16},{name:"flags_"+r,type:"USHORT",value:0},{name:"nameID_"+r,type:"USHORT",value:e.axisNameID}]}function tSe(r,e,t){let n={},i=new qe.Parser(r,e);n.tag=i.parseTag(),n.minValue=i.parseFixed(),n.defaultValue=i.parseFixed(),n.maxValue=i.parseFixed(),i.skip("uShort",1);let o=i.parseUShort();return n.axisNameID=o,n.name=HE(t,o),n}function nSe(r,e,t,n={}){let i=[{name:"nameID_"+r,type:"USHORT",value:e.subfamilyNameID},{name:"flags_"+r,type:"USHORT",value:0}];for(let o=0;o<t.length;++o){let a=t[o].tag;i.push({name:"axis_"+r+" "+a,type:"FIXED",value:e.coordinates[a]<<16})}return n&&n.postScriptNameID&&i.push({name:"postScriptNameID_",type:"USHORT",value:e.postScriptNameID!==void 0?e.postScriptNameID:65535}),i}function rSe(r,e,t,n,i){let o={},a=new qe.Parser(r,e),s=a.parseUShort();o.subfamilyNameID=s,o.name=HE(n,s,[2,17]),a.skip("uShort",1),o.coordinates={};for(let c=0;c<t.length;++c)o.coordinates[t[c].tag]=a.parseFixed();if(a.relativeOffset===i)return o.postScriptNameID=void 0,o.postScriptName=void 0,o;let l=a.parseUShort();return o.postScriptNameID=l==65535?void 0:l,o.postScriptName=o.postScriptNameID!==void 0?HE(n,l,[6]):"",o}function iSe(r,e){let t=new Fe.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:r.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:r.instances.length},{name:"instanceSize",type:"USHORT",value:4+r.axes.length*4}]);t.offsetToData=t.sizeOf();for(let i=0;i<r.axes.length;i++)t.fields=t.fields.concat(eSe(i,r.axes[i]));let n={};for(let i=0;i<r.instances.length;i++)if(r.instances[i].postScriptNameID!==void 0){t.instanceSize+=2,n.postScriptNameID=!0;break}for(let i=0;i<r.instances.length;i++)t.fields=t.fields.concat(nSe(i,r.instances[i],r.axes,n));return t}function oSe(r,e,t){let n=new qe.Parser(r,e),i=n.parseULong();mt.argument(i===65536,"Unsupported fvar table version.");let o=n.parseOffset16();n.skip("uShort",1);let a=n.parseUShort(),s=n.parseUShort(),l=n.parseUShort(),c=n.parseUShort(),u=[];for(let p=0;p<a;p++)u.push(tSe(r,e+o+p*s,t));let h=[],d=e+o+a*s;for(let p=0;p<l;p++)h.push(rSe(r,d+p*c,u,t,c));return{axes:u,instances:h}}var CK={make:iSe,parse:oSe},aSe={tag:ie.tag,nameID:ie.uShort,ordering:ie.uShort},__=new Array(5);__[1]=function(){return{axisIndex:this.parseUShort(),flags:this.parseUShort(),valueNameID:this.parseUShort(),value:this.parseFixed()}};__[2]=function(){return{axisIndex:this.parseUShort(),flags:this.parseUShort(),valueNameID:this.parseUShort(),nominalValue:this.parseFixed(),rangeMinValue:this.parseFixed(),rangeMaxValue:this.parseFixed()}};__[3]=function(){return{axisIndex:this.parseUShort(),flags:this.parseUShort(),valueNameID:this.parseUShort(),value:this.parseFixed(),linkedValue:this.parseFixed()}};__[4]=function(){let r=this.parseUShort();return{flags:this.parseUShort(),valueNameID:this.parseUShort(),axisValues:this.parseList(r,function(){return{axisIndex:this.parseUShort(),value:this.parseFixed()}})}};function sSe(){let r=this.parseUShort(),e=__[r],t={format:r};return e===void 0?(console.warn(`Unknown axis value table format ${r}`),t):Object.assign(t,this.parseStruct(e.bind(this)))}function lSe(r,e,t){e||(e=0);let n=new qe.Parser(r,e),i=n.parseUShort(),o=n.parseUShort();i!==1&&console.warn(`Unsupported STAT table version ${i}.${o}`);let a=[i,o],s=n.parseUShort(),l=n.parseUShort(),c=n.parseOffset32(),u=n.parseUShort(),h=n.parseOffset32(),d=i>1||o>0?n.parseUShort():void 0;t!==void 0&&mt.argument(l>=t.axes.length,"STAT axis count must be greater than or equal to fvar axis count"),u>0&&mt.argument(l>=0,"STAT axis count must be greater than 0 if STAT axis value count is greater than 0");let p=[];for(let g=0;g<l;g++)n.offset=e+c,n.relativeOffset=g*s,p.push(n.parseStruct(aSe));n.offset=e,n.relativeOffset=h;let f=n.parseUShortList(u),m=[];for(let g=0;g<u;g++)n.offset=e+h,n.relativeOffset=f[g],m.push(sSe.apply(n));return{version:a,axes:p,values:m,elidedFallbackNameID:d}}var S_=new Array(5);S_[1]=function(r,e){return[{name:`format${r}`,type:"USHORT",value:1},{name:`axisIndex${r}`,type:"USHORT",value:e.axisIndex},{name:`flags${r}`,type:"USHORT",value:e.flags},{name:`valueNameID${r}`,type:"USHORT",value:e.valueNameID},{name:`value${r}`,type:"FLOAT",value:e.value}]};S_[2]=function(r,e){return[{name:`format${r}`,type:"USHORT",value:2},{name:`axisIndex${r}`,type:"USHORT",value:e.axisIndex},{name:`flags${r}`,type:"USHORT",value:e.flags},{name:`valueNameID${r}`,type:"USHORT",value:e.valueNameID},{name:`nominalValue${r}`,type:"FLOAT",value:e.nominalValue},{name:`rangeMinValue${r}`,type:"FLOAT",value:e.rangeMinValue},{name:`rangeMaxValue${r}`,type:"FLOAT",value:e.rangeMaxValue}]};S_[3]=function(r,e){return[{name:`format${r}`,type:"USHORT",value:3},{name:`axisIndex${r}`,type:"USHORT",value:e.axisIndex},{name:`flags${r}`,type:"USHORT",value:e.flags},{name:`valueNameID${r}`,type:"USHORT",value:e.valueNameID},{name:`value${r}`,type:"FLOAT",value:e.value},{name:`linkedValue${r}`,type:"FLOAT",value:e.linkedValue}]};S_[4]=function(r,e){let t=[{name:`format${r}`,type:"USHORT",value:4},{name:`axisCount${r}`,type:"USHORT",value:e.axisValues.length},{name:`flags${r}`,type:"USHORT",value:e.flags},{name:`valueNameID${r}`,type:"USHORT",value:e.valueNameID}];for(let n=0;n<e.axisValues.length;n++)t=t.concat([{name:`format${r}axisIndex${n}`,type:"USHORT",value:e.axisValues[n].axisIndex},{name:`format${r}value${n}`,type:"FLOAT",value:e.axisValues[n].value}]);return t};function cSe(r,e){return new Fe.Record("axisRecord_"+r,[{name:"axisTag_"+r,type:"TAG",value:e.tag},{name:"axisNameID_"+r,type:"USHORT",value:e.nameID},{name:"axisOrdering_"+r,type:"USHORT",value:e.ordering}])}function uSe(r,e){let t=e.format,n=S_[t];mt.argument(n!==void 0,`Unknown axis value table format ${t}`);let i=n(r,e);return new Fe.Table("axisValueTable_"+r,i)}function hSe(r){let e=new Fe.Table("STAT",[{name:"majorVersion",type:"USHORT",value:1},{name:"minorVersion",type:"USHORT",value:2},{name:"designAxisSize",type:"USHORT",value:8},{name:"designAxisCount",type:"USHORT",value:r.axes.length},{name:"designAxesOffset",type:"ULONG",value:0},{name:"axisValueCount",type:"USHORT",value:r.values.length},{name:"offsetToAxisValueOffsets",type:"ULONG",value:0},{name:"elidedFallbackNameID",type:"USHORT",value:r.elidedFallbackNameID}]);e.designAxesOffset=e.offsetToAxisValueOffsets=e.sizeOf();for(let o=0;o<r.axes.length;o++){let a=cSe(o,r.axes[o]);e.offsetToAxisValueOffsets+=a.sizeOf(),e.fields=e.fields.concat(a.fields)}let t=[],n=[],i=r.values.length*2;for(let o=0;o<r.values.length;o++){let a=uSe(o,r.values[o]);t.push({name:"offset_"+o,type:"USHORT",value:i}),i+=a.sizeOf(),n=n.concat(a.fields)}return e.fields=e.fields.concat(t),e.fields=e.fields.concat(n),e}var TK={make:hSe,parse:lSe};function dSe(r,e){return new Fe.Record("axisValueMap_"+r,[{name:"fromCoordinate_"+r,type:"F2DOT14",value:e.fromCoordinate},{name:"toCoordinate_"+r,type:"F2DOT14",value:e.toCoordinate}])}function pSe(r,e){let t=new Fe.Record("segmentMap_"+r,[{name:"positionMapCount_"+r,type:"USHORT",value:e.axisValueMaps.length}]),n=[];for(let i=0;i<e.axisValueMaps.length;i++){let o=dSe(`${r}_${i}`,e.axisValueMaps[i]);n=n.concat(o.fields)}return t.fields=t.fields.concat(n),t}function fSe(r,e){mt.argument(r.axisSegmentMaps.length===e.axes.length,"avar axis count must correspond to fvar axis count");let t=new Fe.Table("avar",[{name:"majorVersion",type:"USHORT",value:1},{name:"minorVersion",type:"USHORT",value:0},{name:"reserved",type:"USHORT",value:0},{name:"axisCount",type:"USHORT",value:r.axisSegmentMaps.length}]);for(let n=0;n<r.axisSegmentMaps.length;n++){let i=pSe(n,r.axisSegmentMaps[n]);t.fields=t.fields.concat(i.fields)}return t}function mSe(r,e,t){e||(e=0);let n=new ie(r,e),i=n.parseUShort(),o=n.parseUShort();i!==1&&console.warn(`Unsupported avar table version ${i}.${o}`),n.skip("uShort",1);let a=n.parseUShort();mt.argument(a===t.axes.length,"avar axis count must correspond to fvar axis count");let s=[];for(let l=0;l<a;l++){let c=[],u=n.parseUShort();for(let h=0;h<u;h++){let d=n.parseF2Dot14(),p=n.parseF2Dot14();c.push({fromCoordinate:d,toCoordinate:p})}s.push({axisValueMaps:c})}return{version:[i,o],axisSegmentMaps:s}}var kK={make:fSe,parse:mSe};function gSe(r,e,t,n){let i=new qe.Parser(r,e),o=i.parseTupleVariationStore(i.relativeOffset,t.axes.length,"cvar",n),a=i.parseUShort(),s=i.parseUShort();return a!==1&&console.warn(`Unsupported cvar table version ${a}.${s}`),{version:[a,s],...o}}function ySe(){console.warn("Writing of cvar tables is not yet supported.")}var IK={make:ySe,parse:gSe};function bSe(r,e,t,n){let i=new qe.Parser(r,e),o=i.parseUShort(),a=i.parseUShort();o!==1&&console.warn(`Unsupported gvar table version ${o}.${a}`);let s=i.parseUShort();s!==t.axes.length&&console.warn(`axisCount ${s} in gvar table does not match the number of axes ${t.axes.length} in the fvar table!`);let l=i.parseUShort(),c=i.parsePointer32(function(){return this.parseTupleRecords(l,s)}),u=i.parseTupleVariationStoreList(s,"gvar",n);return{version:[o,a],sharedTuples:c,glyphVariations:u}}function vSe(){console.warn("Writing of gvar tables is not yet supported.")}var LK={make:vSe,parse:bSe};function xSe(r,e){let t={},n=new qe.Parser(r,e);t.version=n.parseUShort(),mt.argument(t.version<=1,"Unsupported gasp table version."),t.numRanges=n.parseUShort(),t.gaspRanges=[];for(let i=0;i<t.numRanges;i++)t.gaspRanges[i]={rangeMaxPPEM:n.parseUShort(),rangeGaspBehavior:n.parseUShort()};return t}function wSe(r){let e=new Fe.Table("gasp",[{name:"version",type:"USHORT",value:1},{name:"numRanges",type:"USHORT",value:r.numRanges}]);for(let t in r.gaspRanges)e.fields.push({name:"rangeMaxPPEM",type:"USHORT",value:r.gaspRanges[t].rangeMaxPPEM}),e.fields.push({name:"rangeGaspBehavior",type:"USHORT",value:r.gaspRanges[t].rangeGaspBehavior});return e}var OK={parse:xSe,make:wSe};function _Se(r,e){let t=new Map,n=r.buffer,i=new ie(r,e);if(i.parseUShort()!==0)return t;i.relativeOffset=i.parseOffset32();let o=r.byteOffset+e+i.relativeOffset,a=i.parseUShort(),s=new Map;for(let l=0;l<a;l++){let c=i.parseUShort(),u=i.parseUShort(),h=o+i.parseOffset32(),d=i.parseULong(),p=s.get(h);p===void 0&&(p=new Uint8Array(n,h,d),s.set(h,p));for(let f=c;f<=u;f++)t.set(f,p)}return t}function SSe(r){let e=Array.from(r.keys()).sort(),t=[],n=[],i=new Map,o=0,a={endGlyphID:null};for(let d=0,p=e.length;d<p;d++){let f=e[d],m=r.get(f),g=i.get(m);g===void 0&&(g=o,n.push(m),i.set(m,g),o+=m.byteLength),f-1===a.endGlyphID&&g===a.svgDocOffset?a.endGlyphID=f:(a={startGlyphID:f,endGlyphID:f,svgDocOffset:g,svgDocLength:m.byteLength},t.push(a))}let s=t.length,l=n.length,c=2+s*12,u=new Array(4+s*4+l),h=0;u[h++]={name:"version",type:"USHORT",value:0},u[h++]={name:"svgDocumentListOffset",type:"ULONG",value:10},u[h++]={name:"reserved",type:"ULONG",value:0},u[h++]={name:"numEntries",type:"USHORT",value:s};for(let d=0;d<s;d++){let p="documentRecord_"+d,{startGlyphID:f,endGlyphID:m,svgDocOffset:g,svgDocLength:y}=t[d];u[h++]={name:p+"_startGlyphID",type:"USHORT",value:f},u[h++]={name:p+"_endGlyphID",type:"USHORT",value:m},u[h++]={name:p+"_svgDocOffset",type:"ULONG",value:c+g},u[h++]={name:p+"_svgDocLength",type:"ULONG",value:y}}for(let d=0;d<l;d++)u[h++]={name:"svgDoc_"+d,type:"LITERAL",value:n[d]};return new Fe.Table("SVG ",u)}var DK={make:SSe,parse:_Se};function yY(r){return Math.log(r)/Math.log(2)|0}function jB(r){for(;r.length%4!==0;)r.push(0);let e=0;for(let t=0;t<r.length;t+=4)e+=(r[t]<<24)+(r[t+1]<<16)+(r[t+2]<<8)+r[t+3];return e%=Math.pow(2,32),e}function bY(r,e,t,n){return new Fe.Record("Table Record",[{name:"tag",type:"TAG",value:r!==void 0?r:""},{name:"checkSum",type:"ULONG",value:e!==void 0?e:0},{name:"offset",type:"ULONG",value:t!==void 0?t:0},{name:"length",type:"ULONG",value:n!==void 0?n:0}])}function RK(r){let e=new Fe.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);e.tables=r,e.numTables=r.length;let t=Math.pow(2,yY(e.numTables));e.searchRange=16*t,e.entrySelector=yY(t),e.rangeShift=e.numTables*16-e.searchRange;let n=[],i=[],o=e.sizeOf()+bY().sizeOf()*e.numTables;for(;o%4!==0;)o+=1,i.push({name:"padding",type:"BYTE",value:0});for(let a=0;a<r.length;a+=1){let s=r[a];mt.argument(s.tableName.length===4,"Table name"+s.tableName+" is invalid.");let l=s.sizeOf(),c=bY(s.tableName,jB(s.encode()),o,l);for(n.push({name:c.tag+" Table Record",type:"RECORD",value:c}),i.push({name:s.tableName+" table",type:"RECORD",value:s}),o+=l,mt.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!==0;)o+=1,i.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(a,s){return a.value.tag>s.value.tag?1:-1}),e.fields=e.fields.concat(n),e.fields=e.fields.concat(i),e}function vY(r,e,t){for(let n=0;n<e.length;n+=1){let i=r.charToGlyphIndex(e[n]);if(i>0)return r.glyphs.get(i).getMetrics()}return t}function ASe(r){let e=0;for(let t=0;t<r.length;t+=1)e+=r[t];return e/r.length}function MSe(r){let e=[],t=[],n=[],i=[],o=[],a=[],s=[],l,c=0,u=0,h=0,d=0,p=0;for(let we=0;we<r.glyphs.length;we+=1){let pe=r.glyphs.get(we),Ee=pe.unicode|0;if(isNaN(pe.advanceWidth))throw new Error("Glyph "+pe.name+" ("+we+"): advanceWidth is not a number.");(l>Ee||l===void 0)&&Ee>0&&(l=Ee),c<Ee&&(c=Ee);let Oe=yB.getUnicodeRange(Ee);if(Oe<32)u|=1<<Oe;else if(Oe<64)h|=1<<Oe-32;else if(Oe<96)d|=1<<Oe-64;else if(Oe<123)p|=1<<Oe-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(pe.name===".notdef")continue;let Pe=pe.getMetrics();e.push(Pe.xMin),t.push(Pe.yMin),n.push(Pe.xMax),i.push(Pe.yMax),a.push(Pe.leftSideBearing),s.push(Pe.rightSideBearing),o.push(pe.advanceWidth)}let f={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,i),advanceWidthMax:Math.max.apply(null,o),advanceWidthAvg:ASe(o),minLeftSideBearing:Math.min.apply(null,a),maxLeftSideBearing:Math.max.apply(null,a),minRightSideBearing:Math.min.apply(null,s)};f.ascender=r.ascender,f.descender=r.descender;let m=0;r.weightClass>=600&&(m|=r.macStyleValues.BOLD),r.italicAngle<0&&(m|=r.macStyleValues.ITALIC);let g=vK.make({flags:3,unitsPerEm:r.unitsPerEm,xMin:f.xMin,yMin:f.yMin,xMax:f.xMax,yMax:f.yMax,lowestRecPPEM:3,macStyle:m,createdTimestamp:r.createdTimestamp}),y=xK.make({ascender:f.ascender,descender:f.descender,advanceWidthMax:f.advanceWidthMax,minLeftSideBearing:f.minLeftSideBearing,minRightSideBearing:f.minRightSideBearing,xMaxExtent:f.maxLeftSideBearing+(f.xMax-f.xMin),numberOfHMetrics:r.glyphs.length}),b=SK.make(r.glyphs.length),v=yB.make(Object.assign({xAvgCharWidth:Math.round(f.advanceWidthAvg),usFirstCharIndex:l,usLastCharIndex:c,ulUnicodeRange1:u,ulUnicodeRange2:h,ulUnicodeRange3:d,ulUnicodeRange4:p,sTypoAscender:f.ascender,sTypoDescender:f.descender,sTypoLineGap:0,usWinAscent:f.yMax,usWinDescent:Math.abs(f.yMin),ulCodePageRange1:1,sxHeight:vY(r,"xyvw",{yMax:Math.round(f.ascender/2)}).yMax,sCapHeight:vY(r,"HIKLEFJMNTZBDPRAGOQSUVWXY",f).yMax,usDefaultChar:r.hasChar(" ")?32:0,usBreakChar:r.hasChar(" ")?32:0},r.tables.os2)),x=wK.make(r.glyphs),w=aK.make(r.glyphs),_=r.getEnglishName("fontFamily"),A=r.getEnglishName("fontSubfamily"),E=_+" "+A,S=r.getEnglishName("postScriptName");S||(S=_.replace(/\s/g,"")+"-"+A);let M={};for(let we in r.names)M[we]=r.names[we];M.unicode=M.unicode||{},M.macintosh=M.macintosh||{},M.windows=M.windows||{};let T=r.names.unicode||{},L=r.names.macintosh||{},O=r.names.windows||{};for(let we in M){if(M[we]=M[we]||{},!M[we].uniqueID){let pe=r.getEnglishName("manufacturer")||"";M[we].uniqueID={en:`${pe}: ${E}`}}M[we].postScriptName||(M[we].postScriptName={en:S})}M.unicode.preferredFamily||(M.unicode.preferredFamily=T.fontFamily||L.fontFamily||O.fontFamily),M.macintosh.preferredFamily||(M.macintosh.preferredFamily=L.fontFamily||T.fontFamily||O.fontFamily),M.windows.preferredFamily||(M.windows.preferredFamily=O.fontFamily||T.fontFamily||L.fontFamily),M.unicode.preferredSubfamily||(M.unicode.preferredSubfamily=T.fontSubfamily||L.fontSubfamily||O.fontSubfamily),M.macintosh.preferredSubfamily||(M.macintosh.preferredSubfamily=L.fontSubfamily||T.fontSubfamily||O.fontSubfamily),M.windows.preferredSubfamily||(M.windows.preferredSubfamily=O.fontSubfamily||T.fontSubfamily||L.fontSubfamily);let D=[],z=oK.make(M,D),N=D.length>0?_K.make(D):void 0,J=AK.make(r),X=mB.make(r.glyphs,{version:r.getEnglishName("version"),fullName:E,familyName:_,weightName:A,postScriptName:S,unitsPerEm:r.unitsPerEm,fontBBox:[0,f.yMin,f.ascender,f.advanceWidthMax],topDict:r.tables.cff&&r.tables.cff.topDict||{}}),Q=r.metas&&Object.keys(r.metas).length>0?PK.make(r.metas):void 0,ce=[g,y,b,v,z,w,J,X,x];N&&ce.push(N);let H={gsub:MK,cpal:dK,colr:EK,stat:TK,avar:kK,cvar:IK,fvar:CK,gvar:LK,gasp:OK,svg:DK},de={avar:[r.tables.fvar],fvar:[r.names]};for(let we in H){let pe=r.tables[we];if(pe){let Ee=H[we].make.call(r,pe,...de[we]||[]);Ee&&ce.push(Ee)}}Q&&ce.push(Q);let Se=RK(ce),te=Se.encode(),ue=jB(te),ve=Se.fields,se=!1;for(let we=0;we<ve.length;we+=1)if(ve[we].name==="head table"){ve[we].value.checkSumAdjustment=2981146554-ue,se=!0;break}if(!se)throw new Error("Could not find head table with checkSum to adjust.");return Se}var PSe={make:RK,fontToTable:MSe,computeCheckSum:jB};function k4(r,e){let t=0,n=r.length-1;for(;t<=n;){let i=t+n>>>1,o=r[i].tag;if(o===e)return i;o<e?t=i+1:n=i-1}return-t-1}function xY(r,e){let t=0,n=r.length-1;for(;t<=n;){let i=t+n>>>1,o=r[i];if(o===e)return i;o<e?t=i+1:n=i-1}return-t-1}function wY(r,e){let t,n=0,i=r.length-1;for(;n<=i;){let o=n+i>>>1;t=r[o];let a=t.start;if(a===e)return t;a<e?n=o+1:i=o-1}if(n>0)return t=r[n-1],e>t.end?0:t}function BK(r,e){this.font=r,this.tableName=e}BK.prototype={searchTag:k4,binSearch:xY,getTable:function(r){let e=this.font.tables[this.tableName];return!e&&r&&(e=this.font.tables[this.tableName]=this.createDefaultTable()),e},getScriptNames:function(){let r=this.getTable();return r?r.scripts.map(function(e){return e.tag}):[]},getDefaultScriptName:function(){let r=this.getTable();if(!r)return;let e=!1;for(let t=0;t<r.scripts.length;t++){let n=r.scripts[t].tag;if(n==="DFLT")return n;n==="latn"&&(e=!0)}if(e)return"latn"},getScriptTable:function(r,e){let t=this.getTable(e);if(t){r=r||"DFLT";let n=t.scripts,i=k4(t.scripts,r);if(i>=0)return n[i].script;if(e){let o={tag:r,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-i,0,o),o.script}}},getLangSysTable:function(r,e,t){let n=this.getScriptTable(r,t);if(n){if(!e||e==="dflt"||e==="DFLT")return n.defaultLangSys;let i=k4(n.langSysRecords,e);if(i>=0)return n.langSysRecords[i].langSys;if(t){let o={tag:e,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-i,0,o),o.langSys}}},getFeatureTable:function(r,e,t,n){let i=this.getLangSysTable(r,e,n);if(i){let o,a=i.featureIndexes,s=this.font.tables[this.tableName].features;for(let l=0;l<a.length;l++)if(o=s[a[l]],o.tag===t)return o.feature;if(n){let l=s.length;return mt.assert(l===0||t>=s[l-1].tag,"Features must be added in alphabetical order."),o={tag:t,feature:{params:0,lookupListIndexes:[]}},s.push(o),a.push(l),o.feature}}},getLookupTables:function(r,e,t,n,i){let o=this.getFeatureTable(r,e,t,i),a=[];if(o){let s,l=o.lookupListIndexes,c=this.font.tables[this.tableName].lookups;for(let u=0;u<l.length;u++)s=c[l[u]],s.lookupType===n&&a.push(s);if(a.length===0&&i){s={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};let u=c.length;return c.push(s),l.push(u),[s]}}return a},getGlyphClass:function(r,e){switch(r.format){case 1:return r.startGlyph<=e&&e<r.startGlyph+r.classes.length?r.classes[e-r.startGlyph]:0;case 2:{let t=wY(r.ranges,e);return t?t.classId:0}}},getCoverageIndex:function(r,e){switch(r.format){case 1:{let t=xY(r.glyphs,e);return t>=0?t:-1}case 2:{let t=wY(r.ranges,e);return t?t.index+e-t.start:-1}}},expandCoverage:function(r){if(r.format===1)return r.glyphs;{let e=[],t=r.ranges;for(let n=0;n<t.length;n++){let i=t[n],o=i.start,a=i.end;for(let s=o;s<=a;s++)e.push(s)}return e}}};var iC=BK;function A_(r){iC.call(this,r,"gpos")}A_.prototype=iC.prototype;A_.prototype.init=function(){let r=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(r)};A_.prototype.getKerningValue=function(r,e,t){for(let n=0;n<r.length;n++){let i=r[n].subtables;for(let o=0;o<i.length;o++){let a=i[o],s=this.getCoverageIndex(a.coverage,e);if(!(s<0))switch(a.posFormat){case 1:{let l=a.pairSets[s];for(let c=0;c<l.length;c++){let u=l[c];if(u.secondGlyph===t)return u.value1&&u.value1.xAdvance||0}break}case 2:{let l=this.getGlyphClass(a.classDef1,e),c=this.getGlyphClass(a.classDef2,t),u=a.classRecords[l][c];return u.value1&&u.value1.xAdvance||0}}}}return 0};A_.prototype.getKerningTables=function(r,e){if(this.font.tables.gpos)return this.getLookupTables(r,e,"kern",2)};var ESe=A_;function CSe(r,e){let t=r.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function TSe(r,e,t){let n=0,i=r.length-1,o=null;for(;n<=i;){let a=Math.floor((n+i)/2),s=r[a],l=s[e];if(l<t)n=a+1;else if(l>t)i=a-1;else{o=s;break}}return o}function kSe(r,e,t){let n=0,i=r.length-1;for(;n<=i;){let o=Math.floor((n+i)/2),a=r[o];if(a[e]<t)n=o+1;else if(a[e]>t)i=o-1;else return o}return-1}function ISe(r,e,t){let n=0,i=r.length,o=(a,s)=>a[e]-s[e];for(;n<i;){let a=n+i>>>1;o(r[a],t)<0?n=a+1:i=a}return r.splice(n,0,t),n}function FK(r){return r[0]===31&&r[1]===139&&r[2]===8}function LSe(r){let e=new DataView(r.buffer,r.byteOffset,r.byteLength),t=10,n=r.byteLength-8,i=e.getInt8(3);if(i&4&&(t+=2+e.getUint16(t,!0)),i&8)for(;t<n&&r[t++]!==0;);if(i&16)for(;t<n&&r[t++]!==0;);if(i&2&&(t+=2),t>=n)throw new Error("Can't find compressed blocks");let o=e.getUint32(e.byteLength-4,!0);return K$(r.subarray(t,n),new Uint8Array(o))}function _Y(r){return{x:r.x,y:r.y,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour}}function OSe(r){return{glyphIndex:r.glyphIndex,xScale:r.xScale,scale01:r.scale01,scale10:r.scale10,yScale:r.yScale,dx:r.dx,dy:r.dy}}function Xa(r){iC.call(this,r,"gsub")}function VB(r,e,t){let n=r.subtables;for(let i=0;i<n.length;i++){let o=n[i];if(o.substFormat===e)return o}if(t)return n.push(t),t}Xa.prototype=iC.prototype;Xa.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}};Xa.prototype.getSingle=function(r,e,t){let n=[],i=this.getLookupTables(e,t,r,1);for(let o=0;o<i.length;o++){let a=i[o].subtables;for(let s=0;s<a.length;s++){let l=a[s],c=this.expandCoverage(l.coverage),u;if(l.substFormat===1){let h=l.deltaGlyphId;for(u=0;u<c.length;u++){let d=c[u];n.push({sub:d,by:d+h})}}else{let h=l.substitute;for(u=0;u<c.length;u++)n.push({sub:c[u],by:h[u]})}}}return n};Xa.prototype.getMultiple=function(r,e,t){let n=[],i=this.getLookupTables(e,t,r,2);for(let o=0;o<i.length;o++){let a=i[o].subtables;for(let s=0;s<a.length;s++){let l=a[s],c=this.expandCoverage(l.coverage),u;for(u=0;u<c.length;u++){let h=c[u],d=l.sequences[u];n.push({sub:h,by:d})}}}return n};Xa.prototype.getAlternates=function(r,e,t){let n=[],i=this.getLookupTables(e,t,r,3);for(let o=0;o<i.length;o++){let a=i[o].subtables;for(let s=0;s<a.length;s++){let l=a[s],c=this.expandCoverage(l.coverage),u=l.alternateSets;for(let h=0;h<c.length;h++)n.push({sub:c[h],by:u[h]})}}return n};Xa.prototype.getLigatures=function(r,e,t){let n=[],i=this.getLookupTables(e,t,r,4);for(let o=0;o<i.length;o++){let a=i[o].subtables;for(let s=0;s<a.length;s++){let l=a[s],c=this.expandCoverage(l.coverage),u=l.ligatureSets;for(let h=0;h<c.length;h++){let d=c[h],p=u[h];for(let f=0;f<p.length;f++){let m=p[f];n.push({sub:[d].concat(m.components),by:m.ligGlyph})}}}}return n};Xa.prototype.addSingle=function(r,e,t,n){let i=this.getLookupTables(t,n,r,1,!0)[0],o=VB(i,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});mt.assert(o.coverage.format===1,"Single: unable to modify coverage table format "+o.coverage.format);let a=e.sub,s=this.binSearch(o.coverage.glyphs,a);s<0&&(s=-1-s,o.coverage.glyphs.splice(s,0,a),o.substitute.splice(s,0,0)),o.substitute[s]=e.by};Xa.prototype.addMultiple=function(r,e,t,n){mt.assert(e.by instanceof Array&&e.by.length>1,'Multiple: "by" must be an array of two or more ids');let i=this.getLookupTables(t,n,r,2,!0)[0],o=VB(i,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});mt.assert(o.coverage.format===1,"Multiple: unable to modify coverage table format "+o.coverage.format);let a=e.sub,s=this.binSearch(o.coverage.glyphs,a);s<0&&(s=-1-s,o.coverage.glyphs.splice(s,0,a),o.sequences.splice(s,0,0)),o.sequences[s]=e.by};Xa.prototype.addAlternate=function(r,e,t,n){let i=this.getLookupTables(t,n,r,3,!0)[0],o=VB(i,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});mt.assert(o.coverage.format===1,"Alternate: unable to modify coverage table format "+o.coverage.format);let a=e.sub,s=this.binSearch(o.coverage.glyphs,a);s<0&&(s=-1-s,o.coverage.glyphs.splice(s,0,a),o.alternateSets.splice(s,0,0)),o.alternateSets[s]=e.by};Xa.prototype.addLigature=function(r,e,t,n){let i=this.getLookupTables(t,n,r,4,!0)[0],o=i.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},i.subtables[0]=o),mt.assert(o.coverage.format===1,"Ligature: unable to modify coverage table format "+o.coverage.format);let a=e.sub[0],s=e.sub.slice(1),l={ligGlyph:e.by,components:s},c=this.binSearch(o.coverage.glyphs,a);if(c>=0){let u=o.ligatureSets[c];for(let h=0;h<u.length;h++)if(CSe(u[h].components,s))return;u.push(l)}else c=-1-c,o.coverage.glyphs.splice(c,0,a),o.ligatureSets.splice(c,0,[l])};Xa.prototype.getFeature=function(r,e,t){if(/ss\d\d/.test(r))return this.getSingle(r,e,t);switch(r){case"aalt":case"salt":return this.getSingle(r,e,t).concat(this.getAlternates(r,e,t));case"dlig":case"liga":case"rlig":return this.getLigatures(r,e,t);case"ccmp":return this.getMultiple(r,e,t).concat(this.getLigatures(r,e,t));case"stch":return this.getMultiple(r,e,t)}};Xa.prototype.add=function(r,e,t,n){if(/ss\d\d/.test(r))return this.addSingle(r,e,t,n);switch(r){case"aalt":case"salt":return typeof e.by=="number"?this.addSingle(r,e,t,n):this.addAlternate(r,e,t,n);case"dlig":case"liga":case"rlig":return this.addLigature(r,e,t,n);case"ccmp":return e.by instanceof Array?this.addMultiple(r,e,t,n):this.addLigature(r,e,t,n)}};var DSe=Xa,NK=class{constructor(r){this.defaultValue=255,this.font=r}cpal(){return this.font.tables&&this.font.tables.cpal?this.font.tables.cpal:!1}getAll(r){let e=[],t=this.cpal();if(!t)return e;for(let n=0;n<t.colorRecordIndices.length;n++){let i=t.colorRecordIndices[n],o=[];for(let a=i;a<i+t.numPaletteEntries;a++)o.push(tb(t.colorRecords[a],r||"hexa"));e.push(o)}return e}toCPALcolor(r){return Array.isArray(r)?r.map(e=>WE(e,"raw")):WE(r,"raw")}fillPalette(r,e=[],t=this.cpal().numPaletteEntries){return r=Number.isInteger(r)?this.get(r,"raw"):r,Object.assign(Array(t).fill(this.defaultValue),this.toCPALcolor(r).concat(this.toCPALcolor(e)))}extend(r){if(this.ensureCPAL(Array(r).fill(this.defaultValue)))return;let e=this.cpal(),t=e.numPaletteEntries+r,n=this.getAll().map(i=>this.fillPalette(i,[],t));e.numPaletteEntries=t,e.colorRecords=this.toCPALcolor(n.flat()),this.updateIndices()}get(r,e="hexa"){return this.getAll(e)[r]||null}getColor(r,e=0,t="hexa"){return FB(this.font,r,e,t)}setColor(r,e,t=0){r=parseInt(r),t=parseInt(t);let n=this.getAll("raw"),i=n[t];if(!i)throw Error(`paletteIndex ${t} out of range`);let o=this.cpal(),a=o.numPaletteEntries;Array.isArray(e)||(e=[e]),e.length+r>a&&(this.extend(e.length+r-a),n=this.getAll("raw"),i=n[t]);for(let s=0;s<e.length;s++)i[s+r]=this.toCPALcolor(e[s]);o.colorRecords=n.flat(),this.updateIndices()}add(r){if(this.ensureCPAL(r))return;let e=this.cpal(),t=e.numPaletteEntries;r&&r.length?(r=this.toCPALcolor(r),r.length>t?this.extend(r.length-t):r.length<t&&(r=this.fillPalette(r)),e.colorRecordIndices.push(e.colorRecords.length),e.colorRecords.push(...r)):(e.colorRecordIndices.push(e.colorRecords.length),e.colorRecords.push(...Array(t).fill(this.defaultValue)))}delete(r){let e=this.getAll("raw");delete e[r];let t=this.cpal();t.colorRecordIndices.pop(),t.colorRecords=e.flat()}deleteColor(r,e){if(r===e)throw Error("replacementIndex cannot be the same as colorIndex");let t=this.cpal(),n=this.getAll("raw"),i=[];if(e>t.numPaletteEntries-1)throw Error(`Replacement index out of range: numPaletteEntries after deletion: ${t.numPaletteEntries-1}, replacementIndex: ${e})`);for(let s=0;s<n.length;s++){let l=n[s].filter((c,u)=>u!==r);i.push(l)}let o=this.font.tables.colr;if(o){let s=o.layerRecords;for(let l=0;l<s.length;l++){let c=s[l].paletteIndex;if(c>r)s[l].paletteIndex-=1;else if(c===r){let u=0;for(let h=0;h<n.length;h++)if(e>r&&e<=r+n[h].length){u++;break}s[l].paletteIndex=e-u}}this.font.tables.colr={...o,layerRecords:s}}let a=i.flat();for(let s=0;s<n.length;s++)t.colorRecordIndices[s]-=s;t.numPaletteEntries=Math.max(0,t.numPaletteEntries-1),t.colorRecords=this.toCPALcolor(a)}ensureCPAL(r){return this.cpal()?!1:(!r||!r.length?r=[this.defaultValue]:r=this.toCPALcolor(r),this.font.tables.cpal={version:0,numPaletteEntries:r.length,colorRecords:r,colorRecordIndices:[0]},!0)}updateIndices(){let r=this.cpal(),e=Math.ceil(r.colorRecords.length/r.numPaletteEntries);r.colorRecordIndices=[];for(let t=0;t<e;t++)r.colorRecordIndices.push(t*r.numPaletteEntries)}},RSe=class{constructor(r){this.font=r}ensureCOLR(){return this.font.tables.colr||(this.font.tables.colr={version:0,baseGlyphRecords:[],layerRecords:[]}),this.font}get(r){let e=this.font,t=[],n=e.tables.colr,i=e.tables.cpal;if(!n||!i)return t;let o=TSe(n.baseGlyphRecords,"glyphID",r);if(!o)return t;let a=o.firstLayerIndex,s=o.numLayers;for(let l=0;l<s;l++){let c=n.layerRecords[a+l];t.push({glyph:e.glyphs.get(c.glyphID),paletteIndex:c.paletteIndex})}return t}add(r,e,t){let n=this.get(r);e=Array.isArray(e)?e:[e],t===void 0||t===1/0||t>n.length?t=n.length:t<0&&(t=n.length+1+t%(n.length+1),t>=n.length+1&&(t-=n.length+1));let i=[];for(let o=0;o<t;o++){let a=Number.isInteger(n[o].glyph)?n[o].glyph:n[o].glyph.index;i.push({glyphID:a,paletteIndex:n[o].paletteIndex})}for(let o of e){let a=Number.isInteger(o.glyph)?o.glyph:o.glyph.index;i.push({glyphID:a,paletteIndex:o.paletteIndex})}for(let o=t;o<n.length;o++){let a=Number.isInteger(n[o].glyph)?n[o].glyph:n[o].glyph.index;i.push({glyphID:a,paletteIndex:n[o].paletteIndex})}this.updateColrTable(r,i)}setPaletteIndex(r,e,t){let n=this.get(r);n[e]?(n=n.map((i,o)=>({glyphID:i.glyph.index,paletteIndex:o===e?t:i.paletteIndex})),this.updateColrTable(r,n)):console.error("Invalid layer index")}remove(r,e,t=e){let n=this.get(r);n=n.map(i=>({glyphID:i.glyph.index,paletteIndex:i.paletteIndex})),n.splice(e,t-e+1),this.updateColrTable(r,n)}updateColrTable(r,e){this.ensureCOLR();let t=this.font.tables.colr,n=kSe(t.baseGlyphRecords,"glyphID",r);if(n===-1){let l={glyphID:r,firstLayerIndex:t.layerRecords.length,numLayers:0};n=ISe(t.baseGlyphRecords,"glyphID",l)}let i=t.baseGlyphRecords[n],o=i.numLayers,a=e.length,s=a-o;if(s>0){let l=e.slice(o).map(c=>({glyphID:c.glyphID,paletteIndex:c.paletteIndex}));t.layerRecords.splice(i.firstLayerIndex+o,0,...l)}else s<0&&t.layerRecords.splice(i.firstLayerIndex+a,-s);for(let l=0;l<Math.min(o,a);l++)t.layerRecords[i.firstLayerIndex+l]={glyphID:e[l].glyphID,paletteIndex:e[l].paletteIndex};if(i.numLayers=a,s!==0)for(let l=0;l<t.baseGlyphRecords.length;l++){let c=t.baseGlyphRecords[l];l===n||c.firstLayerIndex<i.firstLayerIndex||(t.baseGlyphRecords[l].firstLayerIndex+=s)}}},BSe=class{constructor(r){this.font=r,this.cache=new WeakMap}get(r){let e=this.getOrCreateSvgImageCacheEntry(r);return e&&e.image}getAsync(r){let e=this.getOrCreateSvgImageCacheEntry(r);return e&&e.promise}getOrCreateSvgImageCacheEntry(r){let e=this.font.tables.svg;if(e===void 0)return;let t=e.get(r);if(t===void 0)return;let n=this.cache.get(t);n===void 0&&(n=FSe(t),this.cache.set(t,n));let i=n.images.get(r);return i===void 0&&(i=NSe(this.font,n.template,r),i.promise.then(o=>{if(i.image=o,typeof this.font.onGlyphUpdated=="function")try{this.font.onGlyphUpdated(r)}catch(a){console.error("font.onGlyphUpdated",r,a)}}),n.images.set(r,i)),i}};function FSe(r){return{template:zSe(r).then(VSe),images:new Map}}function NSe(r,e,t){return{promise:e.then(n=>{let i;typeof n=="string"?i=n:(n[4]=t,i=n.join(""));let o=GSe(i,r.unitsPerEm);return o.image.decode().then(()=>o)}),image:void 0}}var zSe=typeof DecompressionStream=="function"?jSe:USe;function USe(r){try{return Promise.resolve(new TextDecoder().decode(FK(r)?LSe(r):r))}catch(e){return Promise.reject(e)}}function jSe(r){if(FK(r))return new Response(new Response(r).body.pipeThrough(new DecompressionStream("gzip"))).text();try{return Promise.resolve(new TextDecoder().decode(r))}catch(e){return Promise.reject(e)}}function VSe(r){let e=r.indexOf("<svg"),t=r.indexOf(">",e+4)+1;if(/ id=['"]glyph\d+['"]/.test(r.substring(e,t)))return r;let n=r.lastIndexOf("</svg>");return[r.substring(0,t),"<defs>",r.substring(t,n),'</defs><use href="#glyph',"",'"/>',r.substring(n)]}function GSe(r,e){let t=new DOMParser().parseFromString(r,"image/svg+xml").documentElement,n=t.viewBox.baseVal,i=t.width.baseVal,o=t.height.baseVal,a=1,s=1;n.width>0&&n.height>0&&(i.unitType===1?(a=i.valueInSpecifiedUnits/n.width,s=o.unitType===1?o.valueInSpecifiedUnits/n.height:a):o.unitType===1?(s=o.valueInSpecifiedUnits/n.height,a=s):e&&(a=e/n.width,s=e/n.height));let l=document.createElement("div");l.style.position="fixed",l.style.visibility="hidden",l.appendChild(t),document.body.appendChild(l);let c=t.getBBox();document.body.removeChild(l);let u=(c.x-n.x)*a,h=(n.y-c.y)*s,d=c.width*a,p=c.height*s;t.setAttribute("viewBox",[c.x,c.y,c.width,c.height].join(" ")),a!==1&&t.setAttribute("width",d),s!==1&&t.setAttribute("height",p);let f=new Image(d,p);return f.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(t.outerHTML),{leftSideBearing:u,baseline:h,image:f}}var I4=new WeakMap;function SY(r,e,t,n,i){let o;return(e&n)>0?(o=r.parseByte(),e&i||(o=-o),o=t+o):(e&i)>0?o=t:o=t+r.parseShort(),o}function zK(r,e,t){let n=new qe.Parser(e,t);r._numberOfContours=n.parseShort(),r._xMin=n.parseShort(),r._yMin=n.parseShort(),r._xMax=n.parseShort(),r._yMax=n.parseShort();let i,o;if(r._numberOfContours>0){let a=r.endPointIndices=[];for(let l=0;l<r._numberOfContours;l+=1)a.push(n.parseUShort());r.instructionLength=n.parseUShort(),r.instructions=[];for(let l=0;l<r.instructionLength;l+=1)r.instructions.push(n.parseByte());let s=a[a.length-1]+1;i=[];for(let l=0;l<s;l+=1)if(o=n.parseByte(),i.push(o),(o&8)>0){let c=n.parseByte();for(let u=0;u<c;u+=1)i.push(o),l+=1}if(mt.argument(i.length===s,"Bad flags."),a.length>0){let l=[],c;if(s>0){for(let d=0;d<s;d+=1)o=i[d],c={},c.onCurve=!!(o&1),c.lastPointOfContour=a.indexOf(d)>=0,l.push(c);let u=0;for(let d=0;d<s;d+=1)o=i[d],c=l[d],c.x=SY(n,o,u,2,16),u=c.x;let h=0;for(let d=0;d<s;d+=1)o=i[d],c=l[d],c.y=SY(n,o,h,4,32),h=c.y}r.points=l}else r.points=[]}else if(r._numberOfContours===0)r.points=[];else{r.isComposite=!0,r.points=[],r.components=[];let a=!0;for(;a;){i=n.parseUShort();let s={glyphIndex:n.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(i&1)>0?(i&2)>0?(s.dx=n.parseShort(),s.dy=n.parseShort()):s.matchedPoints=[n.parseUShort(),n.parseUShort()]:(i&2)>0?(s.dx=n.parseChar(),s.dy=n.parseChar()):s.matchedPoints=[n.parseByte(),n.parseByte()],(i&8)>0?s.xScale=s.yScale=n.parseF2Dot14():(i&64)>0?(s.xScale=n.parseF2Dot14(),s.yScale=n.parseF2Dot14()):(i&128)>0&&(s.xScale=n.parseF2Dot14(),s.scale01=n.parseF2Dot14(),s.scale10=n.parseF2Dot14(),s.yScale=n.parseF2Dot14()),r.components.push(s),a=!!(i&32)}if(i&256){r.instructionLength=n.parseUShort(),r.instructions=[];for(let s=0;s<r.instructionLength;s+=1)r.instructions.push(n.parseByte())}}}function ME(r,e){let t=[];for(let n=0;n<r.length;n+=1){let i=r[n],o={x:e.xScale*i.x+e.scale10*i.y+e.dx,y:e.scale01*i.x+e.yScale*i.y+e.dy,onCurve:i.onCurve,lastPointOfContour:i.lastPointOfContour};t.push(o)}return t}function HSe(r){let e=[],t=[];for(let n=0;n<r.length;n+=1){let i=r[n];t.push(i),i.lastPointOfContour&&(e.push(t),t=[])}return mt.argument(t.length===0,"There are still points left in the current contour."),e}function GB(r){let e=new Zy;if(!r)return e;let t=HSe(r);for(let n=0;n<t.length;++n){let i=t[n],o=i[i.length-1],a=i[0];if(o.onCurve)e.moveTo(o.x,o.y);else if(a.onCurve)e.moveTo(a.x,a.y);else{let s={x:(o.x+a.x)*.5,y:(o.y+a.y)*.5};e.moveTo(s.x,s.y)}for(let s=0;s<i.length;++s)if(o=a,a=i[(s+1)%i.length],o.onCurve)e.lineTo(o.x,o.y);else{let l=a;a.onCurve||(l={x:(o.x+a.x)*.5,y:(o.y+a.y)*.5}),e.quadraticCurveTo(o.x,o.y,l.x,l.y)}e.closePath()}return e}function UK(r,e){if(e.isComposite){I4.has(r)||I4.set(r,new Set);let t=I4.get(r);t.add(e.index);try{for(let n=0;n<e.components.length;n+=1){let i=e.components[n];if(t.has(i.glyphIndex))continue;let o=r.get(i.glyphIndex);if(o.getPath(),o.points){let a;if(i.matchedPoints===void 0)a=ME(o.points,i);else{if(i.matchedPoints[0]>e.points.length-1||i.matchedPoints[1]>o.points.length-1)throw Error("Matched points out of range in "+e.name);let s=e.points[i.matchedPoints[0]],l=o.points[i.matchedPoints[1]],c={xScale:i.xScale,scale01:i.scale01,scale10:i.scale10,yScale:i.yScale,dx:0,dy:0};l=ME([l],c)[0],c.dx=s.x-l.x,c.dy=s.y-l.y,a=ME(o.points,c)}e.points=e.points.concat(a)}}}finally{t.delete(e.index)}}return GB(e.points)}function WSe(r,e,t,n){let i=new Mc.GlyphSet(n);for(let o=0;o<t.length-1;o+=1){let a=t[o],s=t[o+1];a!==s?i.push(o,Mc.ttfGlyphLoader(n,o,zK,r,e+a,UK)):i.push(o,Mc.glyphLoader(n,o))}return i}function XSe(r,e,t,n){let i=new Mc.GlyphSet(n);return n._push=function(o){let a=t[o],s=t[o+1];a!==s?i.push(o,Mc.ttfGlyphLoader(n,o,zK,r,e+a,UK)):i.push(o,Mc.glyphLoader(n,o))},i}function YSe(r,e,t,n,i){return i.lowMemory?XSe(r,e,t,n):WSe(r,e,t,n)}var jK={getPath:GB,parse:YSe},$Se=class{constructor(r){this.font=r}normalizeCoordTags(r){for(let e in r)if(e.length<4){let t=e.padEnd(4," ");r[t]===void 0&&(r[t]=r[e]),delete r[e]}}getNormalizedCoords(r){r||(r=this.font.variation.get());let e=[];this.normalizeCoordTags(r);for(let t=0;t<this.fvar().axes.length;t++){let n=this.fvar().axes[t],i=r[n.tag];i===void 0&&(i=n.defaultValue),i<n.defaultValue?e.push((i-n.defaultValue+Number.EPSILON)/(n.defaultValue-n.minValue+Number.EPSILON)):e.push((i-n.defaultValue+Number.EPSILON)/(n.maxValue-n.defaultValue+Number.EPSILON))}if(this.avar())for(let t=0;t<this.avar().axisSegmentMaps.length;t++){let n=this.avar().axisSegmentMaps[t];for(let i=0;i<n.axisValueMaps.length;i++){let o=n.axisValueMaps[i];if(i>=1&&e[t]<o.fromCoordinate){let a=n.axisValueMaps[i-1];e[t]=((e[t]-a.fromCoordinate)*(o.toCoordinate-a.toCoordinate)+Number.EPSILON)/(o.fromCoordinate-a.fromCoordinate+Number.EPSILON)+a.toCoordinate;break}}}return e}interpolatePoints(r,e,t){if(r.length===0)return;let n=0;for(;n<r.length;){let i=n,o=n,a=r[o];for(;!a.lastPointOfContour;)a=r[++o];for(;n<=o&&!t[n];)n++;if(n>o)continue;let s=n,l=n;for(n++;n<=o;)t[n]&&(this.deltaInterpolate(l+1,n-1,l,n,e,r),l=n),n++;l===s?this.deltaShift(i,o,l,e,r):(this.deltaInterpolate(l+1,o,l,s,e,r),s>0&&this.deltaInterpolate(i,s-1,l,s,e,r)),n=o+1}}deltaInterpolate(r,e,t,n,i,o){if(r>e)return;let a=["x","y"];for(let l=0;l<a.length;l++){let c=a[l];if(i[t][c]>i[n][c]){var s=t;t=n,n=s}let u=i[t][c],h=i[n][c],d=o[t][c],p=o[n][c];if(u!==h||d===p){let f=u===h?0:(p-d)/(h-u);for(let m=r;m<=e;m++){let g=i[m][c];g<=u?g+=d-u:g>=h?g+=p-h:g=d+(g-u)*f,o[m][c]=g}}}}deltaShift(r,e,t,n,i){let o=i[t].x-n[t].x,a=i[t].y-n[t].y;if(!(o===0&&a===0))for(let s=r;s<=e;s++)s!==t&&(i[s].x+=o,i[s].y+=a)}transformComponents(r,e,t,n,i,o){let a=0;for(let s=0;s<r.components.length;s++){let l=r.components[s],c=this.font.glyphs.get(l.glyphIndex),u=OSe(l),h=n.indexOf(s);h>-1&&(u.dx+=Math.round(i.deltas[h]*o),u.dy+=Math.round(i.deltasY[h]*o));let d=ME(this.getTransform(c,t).points,u);e.splice(a,d.length,...d),a+=c.points.length}}applyTupleVariationStore(r,e,t,n="gvar",i={}){t||(t=this.font.variation.get());let o=this.getNormalizedCoords(t),{headers:a,sharedPoints:s}=r,l=this.fvar().axes.length,c;n==="gvar"?c=e.map(_Y):n==="cvar"&&(c=[...e]);for(let u=0;u<a.length;u++){let h=a[u],d=1;for(let f=0;f<l;f++){let m=[0];switch(n){case"gvar":m=h.peakTuple?h.peakTuple:this.gvar().sharedTuples[h.sharedTupleRecordsIndex];break;case"cvar":m=h.peakTuple;break}if(m[f]!==0){if(o[f]===0){d=0;break}if(h.intermediateStartTuple)if(o[f]<h.intermediateStartTuple[f]||o[f]>h.intermediateEndTuple[f]){d=0;break}else o[f]<m[f]?d=d*(o[f]-h.intermediateStartTuple[f]+Number.EPSILON)/(m[f]-h.intermediateStartTuple[f]+Number.EPSILON):d=d*(h.intermediateEndTuple[f]-o[f]+Number.EPSILON)/(h.intermediateEndTuple[f]-m[f]+Number.EPSILON);else{if(o[f]<Math.min(0,m[f])||o[f]>Math.max(0,m[f])){d=0;break}d=(d*o[f]+Number.EPSILON)/(m[f]+Number.EPSILON)}}}if(d===0)continue;let p=h.privatePoints.length?h.privatePoints:s;if(n==="gvar"&&i.glyph&&i.glyph.isComposite)this.transformComponents(i.glyph,c,t,p,h,d);else if(p.length===0)for(let f=0;f<c.length;f++){let m=c[f];n==="gvar"?c[f]={x:Math.round(m.x+h.deltas[f]*d),y:Math.round(m.y+h.deltasY[f]*d),onCurve:m.onCurve,lastPointOfContour:m.lastPointOfContour}:n==="cvar"&&(c[f]=Math.round(m+h.deltas[f]*d))}else{let f;n==="gvar"?f=c.map(_Y):n==="cvar"&&(f=c);let m=Array(e.length).fill(!1);for(let g=0;g<p.length;g++){let y=p[g];if(y<e.length){let b=f[y];n==="gvar"?(m[y]=!0,b.x+=h.deltas[g]*d,b.y+=h.deltasY[g]*d):n==="cvar"&&(c[y]=Math.round(b+h.deltas[g]*d))}}if(n==="gvar"){this.interpolatePoints(f,c,m);for(let g=0;g<e.length;g++){let y=f[g].x-c[g].x,b=f[g].y-c[g].y;c[g].x=Math.round(c[g].x+y),c[g].y=Math.round(c[g].y+b)}}}}return c}getTransform(r,e){Number.isInteger(r)&&(r=this.font.glyphs.get(r));let t=r.getBlendPath,n=!!(r.points&&r.points.length),i=r;if(t||n){if(e||(e=this.font.variation.get()),n){let o=this.gvar()&&this.gvar().glyphVariations[r.index];if(o){let a=r.points,s=this.applyTupleVariationStore(o,a,e,"gvar",{glyph:r});i=new b_(Object.assign({},r,{points:s,path:GB(s)}))}}else if(t){let o=r.getBlendPath(e);i=new b_(Object.assign({},r,{path:o}))}}return this.font.tables.hvar&&(r._advanceWidth=typeof r._advanceWidth<"u"?r._advanceWidth:r.advanceWidth,r.advanceWidth=i.advanceWidth=Math.round(r._advanceWidth+this.getVariableAdjustment(i.index,"hvar","advanceWidth",e)),r._leftSideBearing=typeof r._leftSideBearing<"u"?r._leftSideBearing:r.leftSideBearing,r.leftSideBearing=i.leftSideBearing=Math.round(r._leftSideBearing+this.getVariableAdjustment(i.index,"hvar","lsb",e))),i}getCvarTransform(r){let e=this.font.tables.cvt,t=this.cvar();return!e||!e.length||!t||!t.headers.length?e:this.applyTupleVariationStore(t,e,r,"cvar")}getVariableAdjustment(r,e,t,n){n=n||this.font.variation.get();let i,o,a=this.font.tables[e];if(!a)throw Error(`trying to get variation adjustment from non-existent table "${a}"`);if(!a.itemVariationStore)throw Error(`trying to get variation adjustment from table "${a}" which does not have an itemVariationStore`);let s=a[t]&&a[t].map.length;if(s){let l=r;l>=s&&(l=s-1),{outerIndex:i,innerIndex:o}=a[t].map[l]}else i=0,o=r;return this.getDelta(a.itemVariationStore,i,o,n)}getDelta(r,e,t,n){if(e>=r.itemVariationSubtables.length)return 0;let i=r.itemVariationSubtables[e];if(t>=i.deltaSets.length)return 0;let o=i.deltaSets[t],a=this.getBlendVector(r,e,n),s=0;for(let l=0;l<i.regionIndexes.length;l++)s+=o[l]*a[l];return s}getBlendVector(r,e,t){t||(t=this.font.variation.get());let n=r.itemVariationSubtables[e],i=this.getNormalizedCoords(t),o=[];for(let a=0;a<n.regionIndexes.length;a++){let s=1,l=n.regionIndexes[a],c=r.variationRegions[l].regionAxes;for(let u=0;u<c.length;u++){let h=c[u],d;h.startCoord>h.peakCoord||h.peakCoord>h.endCoord||h.startCoord<0&&h.endCoord>0&&h.peakCoord!==0||h.peakCoord===0?d=1:i[u]<h.startCoord||i[u]>h.endCoord?d=0:i[u]===h.peakCoord?d=1:i[u]<h.peakCoord?d=(i[u]-h.startCoord+Number.EPSILON)/(h.peakCoord-h.startCoord+Number.EPSILON):d=(h.endCoord-i[u]+Number.EPSILON)/(h.endCoord-h.peakCoord+Number.EPSILON),s*=d}o[a]=s}return o}avar(){return this.font.tables.avar}cvar(){return this.font.tables.cvar}fvar(){return this.font.tables.fvar}gvar(){return this.font.tables.gvar}hvar(){return this.font.tables.hvar}},KSe=class{constructor(r){this.font=r,this.process=new $Se(this.font),this.activateDefaultVariation(),this.getTransform=this.process.getTransform.bind(this.process)}activateDefaultVariation(){let r=this.getDefaultInstanceIndex();r>-1?this.set(r):this.set(this.getDefaultCoordinates())}getDefaultCoordinates(){return this.fvar().axes.reduce((r,e)=>(r[e.tag]=e.defaultValue,r),{})}getDefaultInstanceIndex(){let r=this.getDefaultCoordinates(),e=this.getInstanceIndex(r);return e<0&&(e=this.fvar().instances.findIndex(t=>t.name&&t.name.en==="Regular")),e}getInstanceIndex(r){return this.fvar().instances.findIndex(e=>Object.keys(r).every(t=>e.coordinates[t]===r[t]))}getInstance(r){return this.fvar().instances&&this.fvar().instances[r]}set(r){let e;if(Number.isInteger(r)){let t=this.getInstance(r);if(!t)throw Error(`Invalid instance index ${r}`);e={...t.coordinates}}else e=r,this.process.normalizeCoordTags(e);e=Object.assign({},this.font.defaultRenderOptions.variation,e),this.font.defaultRenderOptions=Object.assign({},this.font.defaultRenderOptions,{variation:e})}get(){return Object.assign({},this.font.defaultRenderOptions.variation)}avar(){return this.font.tables.avar}cvar(){return this.font.tables.cvar}fvar(){return this.font.tables.fvar}gvar(){return this.font.tables.gvar}hvar(){return this.font.tables.hvar}},AY=1e6,YE=64,$E=1e4,VK,Cf,GK,bB;function HK(r){this.font=r,this.getCommands=function(e){return jK.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function qSe(r){return r}function WK(r){return Math.sign(r)*Math.round(Math.abs(r))}function ZSe(r){return Math.sign(r)*Math.round(Math.abs(r*2))/2}function JSe(r){return Math.sign(r)*(Math.round(Math.abs(r)+.5)-.5)}function QSe(r){return Math.sign(r)*Math.ceil(Math.abs(r))}function eAe(r){return Math.sign(r)*Math.floor(Math.abs(r))}var XK=function(r){let e=this.srPeriod,t=this.srPhase,n=this.srThreshold,i=1;return r<0&&(r=-r,i=-1),r+=n-t,r=Math.trunc(r/e)*e,r+=t,r<0?t*i:r*i},Ac={x:1,y:0,axis:"x",distance:function(r,e,t,n){return(t?r.xo:r.x)-(n?e.xo:e.x)},interpolate:function(r,e,t,n){let i,o,a,s,l,c,u;if(!n||n===this){if(i=r.xo-e.xo,o=r.xo-t.xo,l=e.x-e.xo,c=t.x-t.xo,a=Math.abs(i),s=Math.abs(o),u=a+s,u===0){r.x=r.xo+(l+c)/2;return}r.x=r.xo+(l*s+c*a)/u;return}if(i=n.distance(r,e,!0,!0),o=n.distance(r,t,!0,!0),l=n.distance(e,e,!1,!0),c=n.distance(t,t,!1,!0),a=Math.abs(i),s=Math.abs(o),u=a+s,u===0){Ac.setRelative(r,r,(l+c)/2,n,!0);return}Ac.setRelative(r,r,(l*s+c*a)/u,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(r,e,t,n,i){if(!n||n===this){r.x=(i?e.xo:e.x)+t;return}let o=i?e.xo:e.x,a=i?e.yo:e.y,s=o+t*n.x,l=a+t*n.y;r.x=s+(r.y-l)/n.normalSlope},slope:0,touch:function(r){r.xTouched=!0},touched:function(r){return r.xTouched},untouch:function(r){r.xTouched=!1}},Qu={x:0,y:1,axis:"y",distance:function(r,e,t,n){return(t?r.yo:r.y)-(n?e.yo:e.y)},interpolate:function(r,e,t,n){let i,o,a,s,l,c,u;if(!n||n===this){if(i=r.yo-e.yo,o=r.yo-t.yo,l=e.y-e.yo,c=t.y-t.yo,a=Math.abs(i),s=Math.abs(o),u=a+s,u===0){r.y=r.yo+(l+c)/2;return}r.y=r.yo+(l*s+c*a)/u;return}if(i=n.distance(r,e,!0,!0),o=n.distance(r,t,!0,!0),l=n.distance(e,e,!1,!0),c=n.distance(t,t,!1,!0),a=Math.abs(i),s=Math.abs(o),u=a+s,u===0){Qu.setRelative(r,r,(l+c)/2,n,!0);return}Qu.setRelative(r,r,(l*s+c*a)/u,n,!0)},normalSlope:0,setRelative:function(r,e,t,n,i){if(!n||n===this){r.y=(i?e.yo:e.y)+t;return}let o=i?e.xo:e.x,a=i?e.yo:e.y,s=o+t*n.x,l=a+t*n.y;r.y=l+n.normalSlope*(r.x-s)},slope:Number.POSITIVE_INFINITY,touch:function(r){r.yTouched=!0},touched:function(r){return r.yTouched},untouch:function(r){r.yTouched=!1}};Object.freeze(Ac);Object.freeze(Qu);function M_(r,e){this.x=r,this.y=e,this.axis=void 0,this.slope=e/r,this.normalSlope=-r/e,Object.freeze(this)}M_.prototype.distance=function(r,e,t,n){return this.x*Ac.distance(r,e,t,n)+this.y*Qu.distance(r,e,t,n)};M_.prototype.interpolate=function(r,e,t,n){let i,o,a,s,l,c,u;if(a=n.distance(r,e,!0,!0),s=n.distance(r,t,!0,!0),i=n.distance(e,e,!1,!0),o=n.distance(t,t,!1,!0),l=Math.abs(a),c=Math.abs(s),u=l+c,u===0){this.setRelative(r,r,(i+o)/2,n,!0);return}this.setRelative(r,r,(i*c+o*l)/u,n,!0)};M_.prototype.setRelative=function(r,e,t,n,i){n=n||this;let o=i?e.xo:e.x,a=i?e.yo:e.y,s=o+t*n.x,l=a+t*n.y,c=n.normalSlope,u=this.slope,h=r.x,d=r.y;r.x=(u*h-c*s+l-d)/(u-c),r.y=u*(r.x-h)+d};M_.prototype.touch=function(r){r.xTouched=!0,r.yTouched=!0};function P_(r,e){let t=Math.sqrt(r*r+e*e);return r/=t,e/=t,r===1&&e===0?Ac:r===0&&e===1?Qu:new M_(r,e)}function eh(r,e,t,n){this.x=this.xo=Math.round(r*64)/64,this.y=this.yo=Math.round(e*64)/64,this.lastPointOfContour=t,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}eh.prototype.nextTouched=function(r){let e=this.nextPointOnContour;for(;!r.touched(e)&&e!==this;)e=e.nextPointOnContour;return e};eh.prototype.prevTouched=function(r){let e=this.prevPointOnContour;for(;!r.touched(e)&&e!==this;)e=e.prevPointOnContour;return e};var v_=Object.freeze(new eh(0,0)),tAe={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function sd(r,e){switch(this.env=r,this.stack=[],this.prog=e,r){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Ac,this.round=WK}}HK.prototype.exec=function(r,e){if(typeof e!="number")throw new Error("Point size is not a number!");if(this._errorState>2)return;let t=this.font,n=this._prepState;if(!n||n.ppem!==e){let i=this._fpgmState;if(!i){sd.prototype=tAe,i=this._fpgmState=new sd("fpgm",t.tables.fpgm),i.funcs=[],i.font=t,i.instructionCount=0,i.callDepth=0;try{Cf(i)}catch(a){console.log("Hinting error in FPGM:"+a),this._errorState=3;return}}sd.prototype=i,n=this._prepState=new sd("prep",t.tables.prep),n.ppem=e,n.instructionCount=0,n.callDepth=0;let o=t.variation&&t.variation.process.getCvarTransform()||t.tables.cvt;if(o){let a=n.cvt=new Array(o.length),s=e/t.unitsPerEm;for(let l=0;l<o.length;l++)a[l]=o[l]*s}else n.cvt=[];try{Cf(n)}catch(a){this._errorState<2&&console.log("Hinting error in PREP:"+a),this._errorState=2}}if(!(this._errorState>1))try{return GK(r,n)}catch(i){this._errorState<1&&(console.log("Hinting error:"+i),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}};GK=function(r,e){let t=e.ppem/e.font.unitsPerEm,n=t,i=r.components,o,a,s;if(sd.prototype=e,!i)s=new sd("glyf",r.instructions),s.instructionCount=0,s.callDepth=0,bB(r,s,t,n),a=s.gZone;else{let l=e.font;a=[],o=[];for(let c=0;c<i.length;c++){let u=i[c],h=l.glyphs.get(u.glyphIndex);s=new sd("glyf",h.instructions),s.instructionCount=0,s.callDepth=0,bB(h,s,t,n);let d=Math.round(u.dx*t),p=Math.round(u.dy*n),f=s.gZone,m=s.contours;for(let y=0;y<f.length;y++){let b=f[y];b.xTouched=b.yTouched=!1,b.xo=b.x=b.x+d,b.yo=b.y=b.y+p}let g=a.length;a.push.apply(a,f);for(let y=0;y<m.length;y++)o.push(m[y]+g)}r.instructions&&!s.inhibitGridFit&&(s=new sd("glyf",r.instructions),s.gZone=s.z0=s.z1=s.z2=a,s.contours=o,a.push(new eh(0,0),new eh(Math.round(r.advanceWidth*t),0)),Cf(s),a.length-=2)}return a};bB=function(r,e,t,n){let i=r.points||[],o=i.length,a=e.gZone=e.z0=e.z1=e.z2=[],s=e.contours=[],l;for(let h=0;h<o;h++)l=i[h],a[h]=new eh(l.x*t,l.y*n,l.lastPointOfContour,l.onCurve);let c,u;for(let h=0;h<o;h++)l=a[h],c||(c=l,s.push(h)),l.lastPointOfContour?(l.nextPointOnContour=c,c.prevPointOnContour=l,c=void 0):(u=a[h+1],l.nextPointOnContour=u,u.prevPointOnContour=l);e.inhibitGridFit||(a.push(new eh(0,0),new eh(Math.round(r.advanceWidth*t),0)),Cf(e),a.length-=2)};Cf=function(r){let e=r.prog;if(!e)return;let t=e.length,n;for(r.ip=0;r.ip<t;r.ip++){if(++r.instructionCount>AY)throw new Error("Hinting instructions exceeded maximum of "+AY);if(n=VK[e[r.ip]],!n)throw new Error("unknown instruction: 0x"+Number(e[r.ip]).toString(16));n(r)}};function oC(r){let e=r.tZone=new Array(r.gZone.length);for(let t=0;t<e.length;t++)e[t]=new eh(0,0)}function YK(r,e){let t=r.prog,n=r.ip,i=1,o;do if(o=t[++n],o===88)i++;else if(o===89)i--;else if(o===64)n+=t[n+1]+1;else if(o===65)n+=2*t[n+1]+1;else if(o>=176&&o<=183)n+=o-176+1;else if(o>=184&&o<=191)n+=(o-184+1)*2;else if(e&&i===1&&o===27)break;while(i>0);r.ip=n}function MY(r,e){e.fv=e.pv=e.dpv=r}function PY(r,e){e.pv=e.dpv=r}function EY(r,e){e.fv=r}function CY(r,e){let t=e.stack,n=t.pop(),i=t.pop(),o=e.z2[n],a=e.z1[i],s,l;r?(s=o.y-a.y,l=a.x-o.x):(s=a.x-o.x,l=a.y-o.y),e.pv=e.dpv=P_(s,l)}function TY(r,e){let t=e.stack,n=t.pop(),i=t.pop(),o=e.z2[n],a=e.z1[i],s,l;r?(s=o.y-a.y,l=a.x-o.x):(s=a.x-o.x,l=a.y-o.y),e.fv=P_(s,l)}function nAe(r){let e=r.stack,t=e.pop(),n=e.pop();r.pv=r.dpv=P_(n,t)}function rAe(r){let e=r.stack,t=e.pop(),n=e.pop();r.fv=P_(n,t)}function iAe(r){let e=r.stack,t=r.pv;e.push(t.x*16384),e.push(t.y*16384)}function oAe(r){let e=r.stack,t=r.fv;e.push(t.x*16384),e.push(t.y*16384)}function aAe(r){r.fv=r.pv}function sAe(r){let e=r.stack,t=e.pop(),n=e.pop(),i=e.pop(),o=e.pop(),a=e.pop(),s=r.z0,l=r.z1,c=s[t],u=s[n],h=l[i],d=l[o],p=r.z2[a],f=c.x,m=c.y,g=u.x,y=u.y,b=h.x,v=h.y,x=d.x,w=d.y,_=(f-g)*(v-w)-(m-y)*(b-x),A=f*y-m*g,E=b*w-v*x;p.x=(A*(b-x)-E*(f-g))/_,p.y=(A*(v-w)-E*(m-y))/_}function lAe(r){r.rp0=r.stack.pop()}function cAe(r){r.rp1=r.stack.pop()}function uAe(r){r.rp2=r.stack.pop()}function hAe(r){let e=r.stack.pop();switch(r.zp0=e,e){case 0:r.tZone||oC(r),r.z0=r.tZone;break;case 1:r.z0=r.gZone;break;default:throw new Error("Invalid zone pointer")}}function dAe(r){let e=r.stack.pop();switch(r.zp1=e,e){case 0:r.tZone||oC(r),r.z1=r.tZone;break;case 1:r.z1=r.gZone;break;default:throw new Error("Invalid zone pointer")}}function pAe(r){let e=r.stack.pop();switch(r.zp2=e,e){case 0:r.tZone||oC(r),r.z2=r.tZone;break;case 1:r.z2=r.gZone;break;default:throw new Error("Invalid zone pointer")}}function fAe(r){let e=r.stack.pop();switch(r.zp0=r.zp1=r.zp2=e,e){case 0:r.tZone||oC(r),r.z0=r.z1=r.z2=r.tZone;break;case 1:r.z0=r.z1=r.z2=r.gZone;break;default:throw new Error("Invalid zone pointer")}}function mAe(r){r.loop=r.stack.pop(),r.loop>$E&&(r.loop=$E)}function gAe(r){r.round=WK}function yAe(r){r.round=JSe}function bAe(r){let e=r.stack.pop();r.minDis=e/64}function vAe(r){YK(r,!1)}function xAe(r){let e=r.stack.pop();r.ip+=e-1}function wAe(r){let e=r.stack.pop();r.cvCutIn=e/64}function _Ae(r){let e=r.stack;e.push(e[e.length-1])}function L4(r){r.stack.pop()}function SAe(r){r.stack.length=0}function AAe(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(t),e.push(n)}function MAe(r){let e=r.stack;e.push(e.length)}function PAe(r){let e=r.stack,t=e.pop(),n=e.pop();if(n>$E&&(n=$E),++r.callDepth>YE)throw new Error("Hinting call depth exceeded maximum of "+YE);let i=r.ip,o=r.prog;r.prog=r.funcs[t];for(let a=0;a<n;a++)Cf(r);r.ip=i,r.prog=o,r.callDepth--}function EAe(r){let e=r.stack.pop();if(++r.callDepth>YE)throw new Error("Hinting call depth exceeded maximum of "+YE);let t=r.ip,n=r.prog;r.prog=r.funcs[e],Cf(r),r.ip=t,r.prog=n,r.callDepth--}function CAe(r){let e=r.stack,t=e.pop();e.push(e[e.length-t])}function TAe(r){let e=r.stack,t=e.pop();e.push(e.splice(e.length-t,1)[0])}function kAe(r){if(r.env!=="fpgm")throw new Error("FDEF not allowed here");let e=r.stack,t=r.prog,n=r.ip,i=e.pop(),o=n;for(;t[++n]!==45;);r.ip=n,r.funcs[i]=t.slice(o+1,n)}function kY(r,e){let t=e.stack.pop(),n=e.z0[t],i=e.fv,o=e.pv,a=o.distance(n,v_);r&&(a=e.round(a)),i.setRelative(n,v_,a,o),i.touch(n),e.rp0=e.rp1=t}function IY(r,e){let t=e.z2,n=t.length-2,i,o,a;for(let s=0;s<n;s++)i=t[s],!r.touched(i)&&(o=i.prevTouched(r),o!==i&&(a=i.nextTouched(r),o===a&&r.setRelative(i,i,r.distance(o,o,!1,!0),r,!0),r.interpolate(i,o,a,r)))}function LY(r,e){let t=e.stack,n=r?e.rp1:e.rp2,i=(r?e.z0:e.z1)[n],o=e.fv,a=e.pv,s=e.loop,l=e.z2;for(;s--;){let c=t.pop(),u=l[c],h=a.distance(i,i,!1,!0);o.setRelative(u,u,h,a),o.touch(u)}e.loop=1}function OY(r,e){let t=e.stack,n=r?e.rp1:e.rp2,i=(r?e.z0:e.z1)[n],o=e.fv,a=e.pv,s=t.pop(),l=e.z2[e.contours[s]],c=l,u=a.distance(i,i,!1,!0);do c!==i&&o.setRelative(c,c,u,a),c=c.nextPointOnContour;while(c!==l)}function DY(r,e){let t=e.stack,n=r?e.rp1:e.rp2,i=(r?e.z0:e.z1)[n],o=e.fv,a=e.pv,s=t.pop(),l;switch(s){case 0:l=e.tZone;break;case 1:l=e.gZone;break;default:throw new Error("Invalid zone")}let c,u=a.distance(i,i,!1,!0),h=l.length-2;for(let d=0;d<h;d++)c=l[d],o.setRelative(c,c,u,a)}function IAe(r){let e=r.stack,t=r.loop,n=r.fv,i=e.pop()/64,o=r.z2;for(;t--;){let a=e.pop(),s=o[a];n.setRelative(s,s,i),n.touch(s)}r.loop=1}function LAe(r){let e=r.stack,t=r.rp1,n=r.rp2,i=r.loop,o=r.z0[t],a=r.z1[n],s=r.fv,l=r.dpv,c=r.z2;for(;i--;){let u=e.pop(),h=c[u];s.interpolate(h,o,a,l),s.touch(h)}r.loop=1}function RY(r,e){let t=e.stack,n=t.pop()/64,i=t.pop(),o=e.z1[i],a=e.z0[e.rp0],s=e.fv,l=e.pv;s.setRelative(o,a,n,l),s.touch(o),e.rp1=e.rp0,e.rp2=i,r&&(e.rp0=i)}function OAe(r){let e=r.stack,t=r.rp0,n=r.z0[t],i=r.loop,o=r.fv,a=r.pv,s=r.z1;for(;i--;){let l=e.pop(),c=s[l];o.setRelative(c,n,0,a),o.touch(c)}r.loop=1}function DAe(r){r.round=ZSe}function BY(r,e){let t=e.stack,n=t.pop(),i=t.pop(),o=e.z0[i],a=e.fv,s=e.pv,l=e.cvt[n],c=s.distance(o,v_);r&&(Math.abs(c-l)<e.cvCutIn&&(c=l),c=e.round(c)),a.setRelative(o,v_,c,s),e.zp0===0&&(o.xo=o.x,o.yo=o.y),a.touch(o),e.rp0=e.rp1=i}function RAe(r){let e=r.prog,t=r.ip,n=r.stack,i=e[++t];for(let o=0;o<i;o++)n.push(e[++t]);r.ip=t}function BAe(r){let e=r.ip,t=r.prog,n=r.stack,i=t[++e];for(let o=0;o<i;o++){let a=t[++e]<<8|t[++e];a&32768&&(a=-((a^65535)+1)),n.push(a)}r.ip=e}function FAe(r){let e=r.stack,t=r.store;t||(t=r.store=[]);let n=e.pop(),i=e.pop();t[i]=n}function NAe(r){let e=r.stack,t=r.store,n=e.pop(),i=t&&t[n]||0;e.push(i)}function zAe(r){let e=r.stack,t=e.pop(),n=e.pop();r.cvt[n]=t/64}function UAe(r){let e=r.stack,t=e.pop();e.push(r.cvt[t]*64)}function FY(r,e){let t=e.stack,n=t.pop(),i=e.z2[n];t.push(e.dpv.distance(i,v_,r,!1)*64)}function NY(r,e){let t=e.stack,n=t.pop(),i=t.pop(),o=e.z1[n],a=e.z0[i],s=e.dpv.distance(a,o,r,r);e.stack.push(Math.round(s*64))}function jAe(r){r.stack.push(r.ppem)}function VAe(r){r.autoFlip=!0}function GAe(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n<t?1:0)}function HAe(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n<=t?1:0)}function WAe(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n>t?1:0)}function XAe(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n>=t?1:0)}function YAe(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(t===n?1:0)}function $Ae(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(t!==n?1:0)}function KAe(r){let e=r.stack,t=e.pop();e.push(Math.trunc(t)&1?1:0)}function qAe(r){let e=r.stack,t=e.pop();e.push(Math.trunc(t)&1?0:1)}function ZAe(r){r.stack.pop()||YK(r,!0)}function JAe(r){}function QAe(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(t&&n?1:0)}function e2e(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(t||n?1:0)}function t2e(r){let e=r.stack,t=e.pop();e.push(t?0:1)}function O4(r,e){let t=e.stack,n=t.pop(),i=e.fv,o=e.pv,a=e.ppem,s=e.deltaBase+(r-1)*16,l=e.deltaShift,c=e.z0;for(let u=0;u<n;u++){let h=t.pop(),d=t.pop();if(s+((d&240)>>4)!==a)continue;let p=(d&15)-8;p>=0&&p++;let f=c[h];i.setRelative(f,f,p*l,o)}}function n2e(r){let e=r.stack.pop();r.deltaBase=e}function r2e(r){let e=r.stack.pop();r.deltaShift=Math.pow(.5,e)}function i2e(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n+t)}function o2e(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n-t)}function a2e(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n*64/t)}function s2e(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(n*t/64)}function l2e(r){let e=r.stack,t=e.pop();e.push(Math.abs(t))}function c2e(r){let e=r.stack,t=e.pop();e.push(-t)}function u2e(r){let e=r.stack,t=e.pop();e.push(Math.floor(t/64)*64)}function h2e(r){let e=r.stack,t=e.pop();e.push(Math.ceil(t/64)*64)}function xE(r,e){let t=e.stack,n=t.pop();t.push(e.round(n/64)*64)}function d2e(r){let e=r.stack,t=e.pop(),n=e.pop();r.cvt[n]=t*r.ppem/r.font.unitsPerEm}function D4(r,e){let t=e.stack,n=t.pop(),i=e.ppem,o=e.deltaBase+(r-1)*16,a=e.deltaShift;for(let s=0;s<n;s++){let l=t.pop(),c=t.pop();if(o+((c&240)>>4)!==i)continue;let u=(c&15)-8;u>=0&&u++;let h=u*a;e.cvt[l]+=h}}function p2e(r){let e=r.stack.pop();r.round=XK;let t;switch(e&192){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(r.srPeriod=t,e&48){case 0:r.srPhase=0;break;case 16:r.srPhase=.25*t;break;case 32:r.srPhase=.5*t;break;case 48:r.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}e&=15,e===0?r.srThreshold=0:r.srThreshold=(e/8-.5)*t}function f2e(r){let e=r.stack.pop();r.round=XK;let t;switch(e&192){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(r.srPeriod=t,e&48){case 0:r.srPhase=0;break;case 16:r.srPhase=.25*t;break;case 32:r.srPhase=.5*t;break;case 48:r.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}e&=15,e===0?r.srThreshold=0:r.srThreshold=(e/8-.5)*t}function m2e(r){r.round=qSe}function g2e(r){r.round=QSe}function y2e(r){r.round=eAe}function b2e(r){r.stack.pop()}function zY(r,e){let t=e.stack,n=t.pop(),i=t.pop(),o=e.z2[n],a=e.z1[i],s,l;r?(s=o.y-a.y,l=a.x-o.x):(s=a.x-o.x,l=a.y-o.y),e.dpv=P_(s,l)}function v2e(r){let e=r.stack,t=e.pop(),n=0;t&1&&(n=35),t&32&&(n|=4096),e.push(n)}function x2e(r){let e=r.stack,t=e.pop(),n=e.pop(),i=e.pop();e.push(n),e.push(t),e.push(i)}function w2e(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(Math.max(n,t))}function _2e(r){let e=r.stack,t=e.pop(),n=e.pop();e.push(Math.min(n,t))}function S2e(r){r.stack.pop()}function A2e(r){let e=r.stack.pop(),t=r.stack.pop();switch(e){case 1:r.inhibitGridFit=!!t;return;case 2:r.ignoreCvt=!!t;return;default:throw new Error("invalid INSTCTRL[] selector")}}function id(r,e){let t=e.stack,n=e.prog,i=e.ip;for(let o=0;o<r;o++)t.push(n[++i]);e.ip=i}function od(r,e){let t=e.ip,n=e.prog,i=e.stack;for(let o=0;o<r;o++){let a=n[++t]<<8|n[++t];a&32768&&(a=-((a^65535)+1)),i.push(a)}e.ip=t}function ht(r,e,t,n,i,o){let a=o.stack,s=r&&a.pop(),l=a.pop(),c=o.rp0,u=o.z0[c],h=o.z1[l],d=o.minDis,p=o.fv,f=o.dpv,m,g,y;m=f.distance(h,u,!0,!0),g=m>=0?1:-1,m=Math.abs(m),r&&(y=o.cvt[s],n&&Math.abs(m-y)<o.cvCutIn&&(m=y)),t&&m<d&&(m=d),n&&(m=o.round(m)),p.setRelative(h,u,g*m,f),p.touch(h),o.rp1=o.rp0,o.rp2=l,e&&(o.rp0=l)}VK=[MY.bind(void 0,Qu),MY.bind(void 0,Ac),PY.bind(void 0,Qu),PY.bind(void 0,Ac),EY.bind(void 0,Qu),EY.bind(void 0,Ac),CY.bind(void 0,0),CY.bind(void 0,1),TY.bind(void 0,0),TY.bind(void 0,1),nAe,rAe,iAe,oAe,aAe,sAe,lAe,cAe,uAe,hAe,dAe,pAe,fAe,mAe,gAe,yAe,bAe,vAe,xAe,wAe,void 0,void 0,_Ae,L4,SAe,AAe,MAe,CAe,TAe,void 0,void 0,void 0,PAe,EAe,kAe,void 0,kY.bind(void 0,0),kY.bind(void 0,1),IY.bind(void 0,Qu),IY.bind(void 0,Ac),LY.bind(void 0,0),LY.bind(void 0,1),OY.bind(void 0,0),OY.bind(void 0,1),DY.bind(void 0,0),DY.bind(void 0,1),IAe,LAe,RY.bind(void 0,0),RY.bind(void 0,1),OAe,DAe,BY.bind(void 0,0),BY.bind(void 0,1),RAe,BAe,FAe,NAe,zAe,UAe,FY.bind(void 0,0),FY.bind(void 0,1),void 0,NY.bind(void 0,0),NY.bind(void 0,1),jAe,void 0,VAe,void 0,void 0,GAe,HAe,WAe,XAe,YAe,$Ae,KAe,qAe,ZAe,JAe,QAe,e2e,t2e,O4.bind(void 0,1),n2e,r2e,i2e,o2e,a2e,s2e,l2e,c2e,u2e,h2e,xE.bind(void 0,0),xE.bind(void 0,1),xE.bind(void 0,2),xE.bind(void 0,3),void 0,void 0,void 0,void 0,d2e,O4.bind(void 0,2),O4.bind(void 0,3),D4.bind(void 0,1),D4.bind(void 0,2),D4.bind(void 0,3),p2e,f2e,void 0,void 0,m2e,void 0,g2e,y2e,L4,L4,void 0,void 0,void 0,void 0,void 0,b2e,zY.bind(void 0,0),zY.bind(void 0,1),v2e,void 0,x2e,w2e,_2e,S2e,A2e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,id.bind(void 0,1),id.bind(void 0,2),id.bind(void 0,3),id.bind(void 0,4),id.bind(void 0,5),id.bind(void 0,6),id.bind(void 0,7),id.bind(void 0,8),od.bind(void 0,1),od.bind(void 0,2),od.bind(void 0,3),od.bind(void 0,4),od.bind(void 0,5),od.bind(void 0,6),od.bind(void 0,7),od.bind(void 0,8),ht.bind(void 0,0,0,0,0,0),ht.bind(void 0,0,0,0,0,1),ht.bind(void 0,0,0,0,0,2),ht.bind(void 0,0,0,0,0,3),ht.bind(void 0,0,0,0,1,0),ht.bind(void 0,0,0,0,1,1),ht.bind(void 0,0,0,0,1,2),ht.bind(void 0,0,0,0,1,3),ht.bind(void 0,0,0,1,0,0),ht.bind(void 0,0,0,1,0,1),ht.bind(void 0,0,0,1,0,2),ht.bind(void 0,0,0,1,0,3),ht.bind(void 0,0,0,1,1,0),ht.bind(void 0,0,0,1,1,1),ht.bind(void 0,0,0,1,1,2),ht.bind(void 0,0,0,1,1,3),ht.bind(void 0,0,1,0,0,0),ht.bind(void 0,0,1,0,0,1),ht.bind(void 0,0,1,0,0,2),ht.bind(void 0,0,1,0,0,3),ht.bind(void 0,0,1,0,1,0),ht.bind(void 0,0,1,0,1,1),ht.bind(void 0,0,1,0,1,2),ht.bind(void 0,0,1,0,1,3),ht.bind(void 0,0,1,1,0,0),ht.bind(void 0,0,1,1,0,1),ht.bind(void 0,0,1,1,0,2),ht.bind(void 0,0,1,1,0,3),ht.bind(void 0,0,1,1,1,0),ht.bind(void 0,0,1,1,1,1),ht.bind(void 0,0,1,1,1,2),ht.bind(void 0,0,1,1,1,3),ht.bind(void 0,1,0,0,0,0),ht.bind(void 0,1,0,0,0,1),ht.bind(void 0,1,0,0,0,2),ht.bind(void 0,1,0,0,0,3),ht.bind(void 0,1,0,0,1,0),ht.bind(void 0,1,0,0,1,1),ht.bind(void 0,1,0,0,1,2),ht.bind(void 0,1,0,0,1,3),ht.bind(void 0,1,0,1,0,0),ht.bind(void 0,1,0,1,0,1),ht.bind(void 0,1,0,1,0,2),ht.bind(void 0,1,0,1,0,3),ht.bind(void 0,1,0,1,1,0),ht.bind(void 0,1,0,1,1,1),ht.bind(void 0,1,0,1,1,2),ht.bind(void 0,1,0,1,1,3),ht.bind(void 0,1,1,0,0,0),ht.bind(void 0,1,1,0,0,1),ht.bind(void 0,1,1,0,0,2),ht.bind(void 0,1,1,0,0,3),ht.bind(void 0,1,1,0,1,0),ht.bind(void 0,1,1,0,1,1),ht.bind(void 0,1,1,0,1,2),ht.bind(void 0,1,1,0,1,3),ht.bind(void 0,1,1,1,0,0),ht.bind(void 0,1,1,1,0,1),ht.bind(void 0,1,1,1,0,2),ht.bind(void 0,1,1,1,0,3),ht.bind(void 0,1,1,1,1,0),ht.bind(void 0,1,1,1,1,1),ht.bind(void 0,1,1,1,1,2),ht.bind(void 0,1,1,1,1,3)];var M2e=HK;function nb(r){this.char=r,this.state={},this.activeState=null}function HB(r,e,t){this.contextName=t,this.startIndex=r,this.endOffset=e}function P2e(r,e,t){this.contextName=r,this.openRange=null,this.ranges=[],this.checkStart=e,this.checkEnd=t}function Wo(r,e){this.context=r,this.index=e,this.length=r.length,this.current=r[e],this.backtrack=r.slice(0,e),this.lookahead=r.slice(e+1)}function aC(r){this.eventId=r,this.subscribers=[]}function E2e(r){let e=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];for(let n=0;n<e.length;n++){let i=e[n];Object.defineProperty(this.events,i,{value:new aC(i)})}if(r)for(let n=0;n<e.length;n++){let i=e[n],o=r[i];typeof o=="function"&&this.events[i].subscribe(o)}let t=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];for(let n=0;n<t.length;n++){let i=t[n];this.events[i].subscribe(this.updateContextsRanges)}}function Dr(r){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],E2e.call(this,r)}nb.prototype.setState=function(r,e){return this.state[r]=e,this.activeState={key:r,value:this.state[r]},this.activeState};nb.prototype.getState=function(r){return this.state[r]||null};Dr.prototype.inboundIndex=function(r){return r>=0&&r<this.tokens.length};Dr.prototype.composeRUD=function(r){let e=r.map(n=>this[n[0]].apply(this,n.slice(1).concat(!0))),t=n=>typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"FAIL");if(e.every(t))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:e.filter(t)};this.dispatch("composeRUD",[e.filter(n=>!t(n))])};Dr.prototype.replaceRange=function(r,e,t,n){e=e!==null?e:this.tokens.length;let i=t.every(o=>o instanceof nb);if(!isNaN(r)&&this.inboundIndex(r)&&i){let o=this.tokens.splice.apply(this.tokens,[r,e].concat(t));return n||this.dispatch("replaceToken",[r,e,t]),[o,t]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}};Dr.prototype.replaceToken=function(r,e,t){if(!isNaN(r)&&this.inboundIndex(r)&&e instanceof nb){let n=this.tokens.splice(r,1,e);return t||this.dispatch("replaceToken",[r,e]),[n[0],e]}else return{FAIL:"replaceToken: invalid token or index."}};Dr.prototype.removeRange=function(r,e,t){e=isNaN(e)?this.tokens.length:e;let n=this.tokens.splice(r,e);return t||this.dispatch("removeRange",[n,r,e]),n};Dr.prototype.removeToken=function(r,e){if(!isNaN(r)&&this.inboundIndex(r)){let t=this.tokens.splice(r,1);return e||this.dispatch("removeToken",[t,r]),t}else return{FAIL:"removeToken: invalid token index."}};Dr.prototype.insertToken=function(r,e,t){return r.every(n=>n instanceof nb)?(this.tokens.splice.apply(this.tokens,[e,0].concat(r)),t||this.dispatch("insertToken",[r,e]),r):{FAIL:"insertToken: invalid token(s)."}};Dr.prototype.registerModifier=function(r,e,t){this.events.newToken.subscribe(function(n,i){let o=[n,i],a=e===null||e.apply(this,o)===!0,s=[n,i];if(a){let l=t.apply(this,s);n.setState(r,l)}}),this.registeredModifiers.push(r)};aC.prototype.subscribe=function(r){return typeof r=="function"?this.subscribers.push(r)-1:{FAIL:`invalid '${this.eventId}' event handler`}};aC.prototype.unsubscribe=function(r){this.subscribers.splice(r,1)};Wo.prototype.setCurrentIndex=function(r){this.index=r,this.current=this.context[r],this.backtrack=this.context.slice(0,r),this.lookahead=this.context.slice(r+1)};Wo.prototype.get=function(r){switch(!0){case r===0:return this.current;case(r<0&&Math.abs(r)<=this.backtrack.length):return this.backtrack.slice(r)[0];case(r>0&&r<=this.lookahead.length):return this.lookahead[r-1];default:return null}};Dr.prototype.rangeToText=function(r){if(r instanceof HB)return this.getRangeTokens(r).map(e=>e.char).join("")};Dr.prototype.getText=function(){return this.tokens.map(r=>r.char).join("")};Dr.prototype.getContext=function(r){return this.registeredContexts[r]||null};Dr.prototype.on=function(r,e){let t=this.events[r];return t?t.subscribe(e):null};Dr.prototype.dispatch=function(r,e){let t=this.events[r];if(t instanceof aC)for(let n=0;n<t.subscribers.length;n++)t.subscribers[n].apply(this,e||[])};Dr.prototype.registerContextChecker=function(r,e,t){if(this.getContext(r))return{FAIL:`context name '${r}' is already registered.`};if(typeof e!="function")return{FAIL:"missing context start check."};if(typeof t!="function")return{FAIL:"missing context end check."};let n=new P2e(r,e,t);return this.registeredContexts[r]=n,this.contextCheckers.push(n),n};Dr.prototype.getRangeTokens=function(r){let e=r.startIndex+r.endOffset;return[].concat(this.tokens.slice(r.startIndex,e))};Dr.prototype.getContextRanges=function(r){let e=this.getContext(r);return e?e.ranges:{FAIL:`context checker '${r}' is not registered.`}};Dr.prototype.resetContextsRanges=function(){let r=this.registeredContexts;for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)){let t=r[e];t.ranges=[]}};Dr.prototype.updateContextsRanges=function(){this.resetContextsRanges();let r=this.tokens.map(e=>e.char);for(let e=0;e<r.length;e++){let t=new Wo(r,e);this.runContextCheck(t)}this.dispatch("updateContextsRanges",[this.registeredContexts])};Dr.prototype.setEndOffset=function(r,e){let t=this.getContext(e).openRange.startIndex,n=new HB(t,r,e),i=this.getContext(e).ranges;return n.rangeId=`${e}.${i.length}`,i.push(n),this.getContext(e).openRange=null,n};Dr.prototype.runContextCheck=function(r){let e=r.index;for(let t=0;t<this.contextCheckers.length;t++){let n=this.contextCheckers[t],i=n.contextName,o=this.getContext(i).openRange;if(!o&&n.checkStart(r)&&(o=new HB(e,null,i),this.getContext(i).openRange=o,this.dispatch("contextStart",[i,e])),o&&n.checkEnd(r)){let a=e-o.startIndex+1,s=this.setEndOffset(a,i);this.dispatch("contextEnd",[i,s])}}};Dr.prototype.tokenize=function(r){this.tokens=[],this.resetContextsRanges();let e=Array.from(r);this.dispatch("start");for(let t=0;t<e.length;t++){let n=e[t],i=new Wo(e,t);this.dispatch("next",[i]),this.runContextCheck(i);let o=new nb(n);this.tokens.push(o),this.dispatch("newToken",[o,i])}return this.dispatch("end",[this.tokens]),this.tokens};var C2e=Dr;function ld(r){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(r)}function $K(r){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(r)}function ud(r){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(r)}function PE(r){return/[\u0E00-\u0E7F]/.test(r)}function EE(r){return/[A-z]/.test(r)}function T2e(r){return/\s/.test(r)}function Ya(r){this.font=r,this.features={}}function ad(r){this.id=r.id,this.tag=r.tag,this.substitution=r.substitution}function hd(r,e){if(!r)return-1;switch(e.format){case 1:return e.glyphs.indexOf(r);case 2:{let t=e.ranges;for(let n=0;n<t.length;n++){let i=t[n];if(r>=i.start&&r<=i.end){let o=r-i.start;return i.index+o}}break}default:return-1}return-1}function k2e(r,e){return hd(r,e.coverage)===-1?null:r+e.deltaGlyphId}function I2e(r,e){let t=hd(r,e.coverage);return t===-1?null:e.substitute[t]}function R4(r,e){let t=[];for(let n=0;n<r.length;n++){let i=r[n],o=e.current;o=Array.isArray(o)?o[0]:o;let a=hd(o,i);a!==-1&&t.push(a)}return t.length!==r.length?-1:t}function L2e(r,e){let t=e.inputCoverage.length+e.lookaheadCoverage.length+e.backtrackCoverage.length;if(r.context.length<t)return[];let n=R4(e.inputCoverage,r);if(n===-1)return[];let i=e.inputCoverage.length-1;if(r.lookahead.length<e.lookaheadCoverage.length)return[];let o=r.lookahead.slice(i);for(;o.length&&ud(o[0].char);)o.shift();let a=new Wo(o,0),s=R4(e.lookaheadCoverage,a),l=[].concat(r.backtrack);for(l.reverse();l.length&&ud(l[0].char);)l.shift();if(l.length<e.backtrackCoverage.length)return[];let c=new Wo(l,0),u=R4(e.backtrackCoverage,c),h=n.length===e.inputCoverage.length&&s.length===e.lookaheadCoverage.length&&u.length===e.backtrackCoverage.length,d=[];if(h)for(let p=0;p<e.lookupRecords.length;p++){let f=e.lookupRecords[p],m=f.lookupListIndex,g=this.getLookupByIndex(m);for(let y=0;y<g.subtables.length;y++){let b=g.subtables[y],v,x=this.getSubstitutionType(g,b);if(x==="71"?(x=this.getSubstitutionType(b,b.extension),v=this.getLookupMethod(b,b.extension),b=b.extension):v=this.getLookupMethod(g,b),x==="12"){let w=r.get(f.sequenceIndex),_=v(w);_&&d.push(_)}else if(x==="21"){let w=r.get(f.sequenceIndex),_=v(w);_&&d.push(_)}else throw new Error(`Substitution type ${x} is not supported in chaining substitution`)}}return d}function O2e(r,e){let t=r.current,n=hd(t,e.coverage);if(n===-1)return null;let i,o=e.ligatureSets[n];for(let a=0;a<o.length;a++){i=o[a];for(let s=0;s<i.components.length;s++){let l=r.lookahead[s],c=i.components[s];if(l!==c)break;if(s===i.components.length-1)return i}}return null}function D2e(r,e){let t=r.current;if(hd(t,e.coverage)===-1)return null;for(let n of e.ruleSets)for(let i of n){let o=!0;for(let a=0;a<i.input.length;a++)if(r.lookahead[a]!==i.input[a]){o=!1;break}if(o){let a=[];a.push(t);for(let l=0;l<i.input.length;l++)a.push(i.input[l]);let s=(l,c)=>{let{lookupListIndex:u,sequenceIndex:h}=c,{subtables:d}=this.getLookupByIndex(u);for(let p of d)hd(l[h],p.coverage)!==-1&&(l[h]=p.deltaGlyphId)};for(let l=0;l<i.lookupRecords.length;l++){let c=i.lookupRecords[l];s(a,c)}return a}}return null}function R2e(r,e){if(r.context.length<e.coverages.length)return[];for(let n=0;n<e.coverages.length;n++){let i=r.get(n);if(i=Array.isArray(i)?i[0]:i,hd(i,e.coverages[n])===-1)return[]}let t=[];for(let n=0;n<e.lookupRecords.length;n++){let i=e.lookupRecords[n],o=i.lookupListIndex,a=this.getLookupByIndex(o);for(let s=0;s<a.subtables.length;s++){let l=a.subtables[s],c,u=this.getSubstitutionType(a,l);if(u==="71"?(u=this.getSubstitutionType(l,l.extension),c=this.getLookupMethod(l,l.extension),l=l.extension):c=this.getLookupMethod(a,l),u==="12"){let h=r.get(i.sequenceIndex),d=c(h);d&&t.push(d)}else if(u==="21"){let h=r.get(i.sequenceIndex),d=c(h);d&&t.push(d)}}}return t}function B2e(r,e){let t=hd(r,e.coverage);return t===-1?null:e.sequences[t]}Ya.prototype.getDefaultScriptFeaturesIndexes=function(){let r=this.font.tables.gsub.scripts;for(let e=0;e<r.length;e++){let t=r[e];if(t.tag==="DFLT")return t.script.defaultLangSys.featureIndexes}return[]};Ya.prototype.getScriptFeaturesIndexes=function(r){if(!this.font.tables.gsub)return[];if(!r)return this.getDefaultScriptFeaturesIndexes();let e=this.font.tables.gsub.scripts;for(let t=0;t<e.length;t++){let n=e[t];if(n.tag===r&&n.script.defaultLangSys)return n.script.defaultLangSys.featureIndexes;{let i=n.langSysRecords;if(i)for(let o=0;o<i.length;o++){let a=i[o];if(a.tag===r)return a.langSys.featureIndexes}}}return this.getDefaultScriptFeaturesIndexes()};Ya.prototype.mapTagsToFeatures=function(r,e){let t={};for(let n=0;n<r.length;n++){let i=r[n].tag,o=r[n].feature;t[i]=o}this.features[e].tags=t};Ya.prototype.getScriptFeatures=function(r){let e=this.features[r];if(Object.prototype.hasOwnProperty.call(this.features,r))return e;let t=this.getScriptFeaturesIndexes(r);if(!t)return null;let n=this.font.tables.gsub;return e=t.map(i=>n.features[i]),this.features[r]=e,this.mapTagsToFeatures(e,r),e};Ya.prototype.getSubstitutionType=function(r,e){let t=r.lookupType.toString(),n=e.substFormat.toString();return t+n};Ya.prototype.getLookupMethod=function(r,e){let t=this.getSubstitutionType(r,e);switch(t){case"11":return n=>k2e.apply(this,[n,e]);case"12":return n=>I2e.apply(this,[n,e]);case"63":return n=>L2e.apply(this,[n,e]);case"41":return n=>O2e.apply(this,[n,e]);case"21":return n=>B2e.apply(this,[n,e]);case"51":return n=>D2e.apply(this,[n,e]);case"53":return n=>R2e.apply(this,[n,e]);default:throw new Error(`substitutionType : ${t} lookupType: ${r.lookupType} - substFormat: ${e.substFormat} is not yet supported`)}};Ya.prototype.lookupFeature=function(r){let e=r.contextParams,t=e.index,n=this.getFeature({tag:r.tag,script:r.script});if(!n)return new Error(`font '${(this.font.names.unicode||this.font.names.windows||this.font.names.macintosh).fullName.en}' doesn't support feature '${r.tag}' for script '${r.script}'.`);let i=this.getFeatureLookups(n),o=[].concat(e.context);for(let a=0;a<i.length;a++){let s=i[a],l=this.getLookupSubtables(s);for(let c=0;c<l.length;c++){let u=l[c],h=this.getSubstitutionType(s,u),d;h==="71"?(h=this.getSubstitutionType(u,u.extension),d=this.getLookupMethod(u,u.extension),u=u.extension):d=this.getLookupMethod(s,u);let p;switch(h){case"11":p=d(e.current),p&&o.splice(t,1,new ad({id:11,tag:r.tag,substitution:p}));break;case"12":p=d(e.current),p&&o.splice(t,1,new ad({id:12,tag:r.tag,substitution:p}));break;case"63":p=d(e),Array.isArray(p)&&p.length&&o.splice(t,1,new ad({id:63,tag:r.tag,substitution:p}));break;case"41":p=d(e),p&&o.splice(t,1,new ad({id:41,tag:r.tag,substitution:p}));break;case"21":p=d(e.current),p&&o.splice(t,1,new ad({id:21,tag:r.tag,substitution:p}));break;case"51":case"53":p=d(e),Array.isArray(p)&&p.length&&o.splice(t,1,new ad({id:parseInt(h),tag:r.tag,substitution:p}));break}e=new Wo(o,t),!(Array.isArray(p)&&!p.length)&&(p=null)}}return o.length?o:null};Ya.prototype.supports=function(r){if(!r.script)return!1;this.getScriptFeatures(r.script);let e=Object.prototype.hasOwnProperty.call(this.features,r.script);if(!r.tag)return e;let t=this.features[r.script].some(n=>n.tag===r.tag);return e&&t};Ya.prototype.getLookupSubtables=function(r){return r.subtables||null};Ya.prototype.getLookupByIndex=function(r){return this.font.tables.gsub.lookups[r]||null};Ya.prototype.getFeatureLookups=function(r){return r.lookupListIndexes.map(this.getLookupByIndex.bind(this))};Ya.prototype.getFeature=function(r){if(!this.font)return{FAIL:"No font was found"};Object.prototype.hasOwnProperty.call(this.features,r.script)||this.getScriptFeatures(r.script);let e=this.features[r.script];return e?e.tags[r.tag]?this.features[r.script].tags[r.tag]:null:{FAIL:`No feature for script ${r.script}`}};var F2e=Ya;function N2e(r){let e=r.current,t=r.get(-1);return t===null&&ld(e)||!ld(t)&&ld(e)}function z2e(r){let e=r.get(1);return e===null||!ld(e)}var U2e={startCheck:N2e,endCheck:z2e};function j2e(r){let e=r.current,t=r.get(-1);return(ld(e)||ud(e))&&!ld(t)}function V2e(r){let e=r.get(1);switch(!0){case e===null:return!0;case(!ld(e)&&!ud(e)):{let t=T2e(e);if(!t)return!0;if(t){let n=!1;if(n=r.lookahead.some(i=>ld(i)||ud(i)),!n)return!0}break}default:return!1}}var G2e={startCheck:j2e,endCheck:V2e};function H2e(r,e,t){e[t].setState(r.tag,r.substitution)}function W2e(r,e,t){e[t].setState(r.tag,r.substitution)}function B4(r,e,t){for(let n=0;n<r.substitution.length;n++){let i=r.substitution[n],o=e[t+n];if(Array.isArray(i)){i.length?o.setState(r.tag,i[0]):o.setState("deleted",!0);continue}o.setState(r.tag,i)}}function X2e(r,e,t){let n=e[t];n.setState(r.tag,r.substitution.ligGlyph);let i=r.substitution.components.length;for(let o=0;o<i;o++)n=e[t+o+1],n.setState("deleted",!0)}var UY={11:H2e,12:W2e,63:B4,41:X2e,51:B4,53:B4};function Y2e(r,e,t){r instanceof ad&&UY[r.id]&&UY[r.id](r,e,t)}var Of=Y2e;function $2e(r){let e=[].concat(r.backtrack);for(let t=e.length-1;t>=0;t--){let n=e[t],i=$K(n),o=ud(n);if(!i&&!o)return!0;if(i)return!1}return!1}function K2e(r){if($K(r.current))return!1;for(let e=0;e<r.lookahead.length;e++){let t=r.lookahead[e];if(!ud(t))return!0}return!1}function q2e(r){let e="arab",t=this.featuresTags[e],n=this.tokenizer.getRangeTokens(r);if(n.length===1)return;let i=new Wo(n.map(a=>a.getState("glyphIndex")),0),o=new Wo(n.map(a=>a.char),0);for(let a=0;a<n.length;a++){let s=n[a];if(ud(s.char))continue;i.setCurrentIndex(a),o.setCurrentIndex(a);let l=0;$2e(o)&&(l|=1),K2e(o)&&(l|=2);let c;switch(l){case 1:c="fina";break;case 2:c="init";break;case 3:c="medi";break}if(t.indexOf(c)===-1)continue;let u=this.query.lookupFeature({tag:c,script:e,contextParams:i});if(u instanceof Error){console.info(u.message);continue}for(let h=0;h<u.length;h++){let d=u[h];d instanceof ad&&(Of(d,n,h),i.context[h]=d.substitution)}}}var Z2e=q2e;function jY(r,e){let t=r.map(n=>n.activeState.value);return new Wo(t,0)}function J2e(r){let e="arab",t=this.tokenizer.getRangeTokens(r),n=jY(t);for(let i=0;i<n.context.length;i++){n.setCurrentIndex(i);let o=this.query.lookupFeature({tag:"rlig",script:e,contextParams:n});if(o.length){for(let a=0;a<o.length;a++){let s=o[a];Of(s,t,i)}n=jY(t)}}}var Q2e=J2e;function eMe(r){return r.index===0&&r.context.length>1}function tMe(r){return r.index===r.context.length-1}var nMe={startCheck:eMe,endCheck:tMe};function VY(r,e){let t=r.map(n=>n.activeState.value);return new Wo(t,0)}function rMe(r){let e="delf",t="ccmp",n=this.tokenizer.getRangeTokens(r),i=VY(n);for(let o=0;o<i.context.length;o++){if(!this.query.getFeature({tag:t,script:e,contextParams:i}))continue;i.setCurrentIndex(o);let a=this.query.lookupFeature({tag:t,script:e,contextParams:i});if(a.length){for(let s=0;s<a.length;s++){let l=a[s];Of(l,n,o)}i=VY(n)}}}var iMe=rMe;function oMe(r){let e=r.current,t=r.get(-1);return t===null&&EE(e)||!EE(t)&&EE(e)}function aMe(r){let e=r.get(1);return e===null||!EE(e)}var sMe={startCheck:oMe,endCheck:aMe};function GY(r,e){let t=r.map(n=>n.activeState.value);return new Wo(t,0)}function lMe(r){let e="latn",t=this.tokenizer.getRangeTokens(r),n=GY(t);for(let i=0;i<n.context.length;i++){n.setCurrentIndex(i);let o=this.query.lookupFeature({tag:"liga",script:e,contextParams:n});if(o.length){for(let a=0;a<o.length;a++){let s=o[a];Of(s,t,i)}n=GY(t)}}}var cMe=lMe;function uMe(r){let e=r.current,t=r.get(-1);return t===null&&PE(e)||!PE(t)&&PE(e)}function hMe(r){let e=r.get(1);return e===null||!PE(e)}var dMe={startCheck:uMe,endCheck:hMe};function HY(r,e){let t=r.map(n=>n.activeState.value);return new Wo(t,e||0)}function pMe(r){let e="thai",t=this.tokenizer.getRangeTokens(r),n=HY(t,0);for(let i=0;i<n.context.length;i++){n.setCurrentIndex(i);let o=this.query.lookupFeature({tag:"ccmp",script:e,contextParams:n});if(o.length){for(let a=0;a<o.length;a++){let s=o[a];Of(s,t,i)}n=HY(t,i)}}}var fMe=pMe;function WY(r,e){let t=r.map(n=>n.activeState.value);return new Wo(t,e||0)}function mMe(r){let e="thai",t=this.tokenizer.getRangeTokens(r),n=WY(t,0);for(let i=0;i<n.context.length;i++){n.setCurrentIndex(i);let o=this.query.lookupFeature({tag:"liga",script:e,contextParams:n});if(o.length){for(let a=0;a<o.length;a++){let s=o[a];Of(s,t,i)}n=WY(t,i)}}}var gMe=mMe;function XY(r,e){let t=r.map(n=>n.activeState.value);return new Wo(t,e||0)}function yMe(r){let e="thai",t=this.tokenizer.getRangeTokens(r),n=XY(t,0);for(let i=0;i<n.context.length;i++){n.setCurrentIndex(i);let o=this.query.lookupFeature({tag:"rlig",script:e,contextParams:n});if(o.length){for(let a=0;a<o.length;a++){let s=o[a];Of(s,t,i)}n=XY(t,i)}}}var bMe=yMe;function vB(r){if(r===null)return!1;let e=r.codePointAt(0);return e>=6155&&e<=6157||e>=65024&&e<=65039||e>=917760&&e<=917999}function vMe(r){let e=r.current,t=r.get(1);return t===null&&vB(e)||vB(t)}function xMe(r){let e=r.get(1);return e===null||!vB(e)}var wMe={startCheck:vMe,endCheck:xMe};function _Me(r){let e=this.query.font,t=this.tokenizer.getRangeTokens(r);if(t[1].setState("deleted",!0),e.tables.cmap&&e.tables.cmap.varSelectorList){let n=t[0].char.codePointAt(0),i=t[1].char.codePointAt(0),o=e.tables.cmap.varSelectorList[i];if(o!==void 0&&o.nonDefaultUVS){let a=o.nonDefaultUVS.uvsMappings;if(a[n]){let s=a[n].glyphID;e.glyphs.glyphs[s]!==void 0&&t[0].setState("glyphIndex",s)}}}}var SMe=_Me;function Os(r){this.baseDir=r||"ltr",this.tokenizer=new C2e,this.featuresTags={}}Os.prototype.setText=function(r){this.text=r};Os.prototype.contextChecks={ccmpReplacementCheck:nMe,latinWordCheck:sMe,arabicWordCheck:U2e,arabicSentenceCheck:G2e,thaiWordCheck:dMe,unicodeVariationSequenceCheck:wMe};function Wy(r){let e=this.contextChecks[`${r}Check`];return this.tokenizer.registerContextChecker(r,e.startCheck,e.endCheck)}function AMe(){return Wy.call(this,"ccmpReplacement"),Wy.call(this,"latinWord"),Wy.call(this,"arabicWord"),Wy.call(this,"arabicSentence"),Wy.call(this,"thaiWord"),Wy.call(this,"unicodeVariationSequence"),this.tokenizer.tokenize(this.text)}function MMe(){let r=this.tokenizer.getContextRanges("arabicSentence");for(let e=0;e<r.length;e++){let t=r[e],n=this.tokenizer.getRangeTokens(t);this.tokenizer.replaceRange(t.startIndex,t.endOffset,n.reverse())}}Os.prototype.registerFeatures=function(r,e){let t=e.filter(n=>this.query.supports({script:r,tag:n}));Object.prototype.hasOwnProperty.call(this.featuresTags,r)?this.featuresTags[r]=this.featuresTags[r].concat(t):this.featuresTags[r]=t};Os.prototype.applyFeatures=function(r,e){if(!r)throw new Error("No valid font was provided to apply features");this.query||(this.query=new F2e(r));for(let t=0;t<e.length;t++){let n=e[t];this.query.supports({script:n.script})&&this.registerFeatures(n.script,n.tags)}};Os.prototype.registerModifier=function(r,e,t){this.tokenizer.registerModifier(r,e,t)};function E_(){if(this.tokenizer.registeredModifiers.indexOf("glyphIndex")===-1)throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function PMe(){if(!Object.prototype.hasOwnProperty.call(this.featuresTags,"arab"))return;E_.call(this);let r=this.tokenizer.getContextRanges("arabicWord");for(let e=0;e<r.length;e++){let t=r[e];Z2e.call(this,t)}}function EMe(){E_.call(this);let r=this.tokenizer.getContextRanges("ccmpReplacement");for(let e=0;e<r.length;e++){let t=r[e];iMe.call(this,t)}}function CMe(){if(!this.hasFeatureEnabled("arab","rlig"))return;E_.call(this);let r=this.tokenizer.getContextRanges("arabicWord");for(let e=0;e<r.length;e++){let t=r[e];Q2e.call(this,t)}}function TMe(){if(!this.hasFeatureEnabled("latn","liga"))return;E_.call(this);let r=this.tokenizer.getContextRanges("latinWord");for(let e=0;e<r.length;e++){let t=r[e];cMe.call(this,t)}}function kMe(){let r=this.tokenizer.getContextRanges("unicodeVariationSequence");for(let e=0;e<r.length;e++){let t=r[e];SMe.call(this,t)}}function IMe(){E_.call(this);let r=this.tokenizer.getContextRanges("thaiWord");for(let e=0;e<r.length;e++){let t=r[e];this.hasFeatureEnabled("thai","liga")&&gMe.call(this,t),this.hasFeatureEnabled("thai","rlig")&&bMe.call(this,t),this.hasFeatureEnabled("thai","ccmp")&&fMe.call(this,t)}}Os.prototype.checkContextReady=function(r){return!!this.tokenizer.getContext(r)};Os.prototype.applyFeaturesToContexts=function(){this.checkContextReady("ccmpReplacement")&&EMe.call(this),this.checkContextReady("arabicWord")&&(PMe.call(this),CMe.call(this)),this.checkContextReady("latinWord")&&TMe.call(this),this.checkContextReady("arabicSentence")&&MMe.call(this),this.checkContextReady("thaiWord")&&IMe.call(this),this.checkContextReady("unicodeVariationSequence")&&kMe.call(this)};Os.prototype.hasFeatureEnabled=function(r,e){return(this.featuresTags[r]||[]).indexOf(e)!==-1};Os.prototype.processText=function(r){(!this.text||this.text!==r)&&(this.setText(r),AMe.call(this),this.applyFeaturesToContexts())};Os.prototype.getBidiText=function(r){return this.processText(r),this.tokenizer.getText()};Os.prototype.getTextGlyphs=function(r){this.processText(r);let e=[];for(let t=0;t<this.tokenizer.tokens.length;t++){let n=this.tokenizer.tokens[t];if(n.state.deleted)continue;let i=n.activeState.value;e.push(Array.isArray(i)?i[0]:i)}return e};var LMe=Os;function F4(r){return{fontFamily:{en:r.familyName||" "},fontSubfamily:{en:r.styleName||" "},fullName:{en:r.fullName||r.familyName+" "+r.styleName},postScriptName:{en:r.postScriptName||(r.familyName+r.styleName).replace(/\s/g,"")},designer:{en:r.designer||" "},designerURL:{en:r.designerURL||" "},manufacturer:{en:r.manufacturer||" "},manufacturerURL:{en:r.manufacturerURL||" "},license:{en:r.license||" "},licenseURL:{en:r.licenseURL||" "},version:{en:r.version||"Version 0.1"},description:{en:r.description||" "},copyright:{en:r.copyright||" "},trademark:{en:r.trademark||" "}}}function Un(r){if(r=r||{},r.tables=r.tables||{},!r.empty){if(!r.familyName)throw new Error("When creating a new Font object, familyName is required.");if(!r.styleName)throw new Error("When creating a new Font object, styleName is required.");if(!r.unitsPerEm)throw new Error("When creating a new Font object, unitsPerEm is required.");if(!r.ascender)throw new Error("When creating a new Font object, ascender is required.");if(r.descender>0)throw new Error("When creating a new Font object, negative descender value is required.");this.names={},this.names.unicode=F4(r),this.names.macintosh=F4(r),this.names.windows=F4(r),this.unitsPerEm=r.unitsPerEm||1e3,this.ascender=r.ascender,this.descender=r.descender,this.createdTimestamp=r.createdTimestamp,this.italicAngle=r.italicAngle||0,this.weightClass=r.weightClass||0;let e=0;r.fsSelection?e=r.fsSelection:(this.italicAngle<0?e|=this.fsSelectionValues.ITALIC:this.italicAngle>0&&(e|=this.fsSelectionValues.OBLIQUE),this.weightClass>=600&&(e|=this.fsSelectionValues.BOLD),e===0&&(e=this.fsSelectionValues.REGULAR)),(!r.panose||!Array.isArray(r.panose))&&(r.panose=[0,0,0,0,0,0,0,0,0]),this.tables=Object.assign(r.tables,{os2:Object.assign({usWeightClass:r.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:r.widthClass||this.usWidthClasses.MEDIUM,bFamilyType:r.panose[0]||0,bSerifStyle:r.panose[1]||0,bWeight:r.panose[2]||0,bProportion:r.panose[3]||0,bContrast:r.panose[4]||0,bStrokeVariation:r.panose[5]||0,bArmStyle:r.panose[6]||0,bLetterform:r.panose[7]||0,bMidline:r.panose[8]||0,bXHeight:r.panose[9]||0,fsSelection:e},r.tables.os2)})}this.supported=!0,this.glyphs=new Mc.GlyphSet(this,r.glyphs||[]),this.encoding=new sK(this),this.position=new ESe(this),this.substitution=new DSe(this),this.tables=this.tables||{},this.tables=new Proxy(this.tables,{set:(e,t,n)=>(e[t]=n,e.fvar&&(e.gvar||e.cff2)&&!this.variation&&(this.variation=new KSe(this)),!0)}),this.palettes=new NK(this),this.layers=new RSe(this),this.svgImages=new BSe(this),this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:this.outlinesFormat==="truetype"?this._hinting=new M2e(this):null}})}Un.prototype.hasChar=function(r){return this.encoding.charToGlyphIndex(r)>0};Un.prototype.charToGlyphIndex=function(r){return this.encoding.charToGlyphIndex(r)};Un.prototype.charToGlyph=function(r){let e=this.charToGlyphIndex(r),t=this.glyphs.get(e);return t||(t=this.glyphs.get(0)),t};Un.prototype.updateFeatures=function(r){return this.defaultRenderOptions.features.map(e=>e.script==="latn"?{script:"latn",tags:e.tags.filter(t=>r[t])}:e)};Un.prototype.stringToGlyphIndexes=function(r,e){let t=new LMe,n=o=>this.charToGlyphIndex(o.char);t.registerModifier("glyphIndex",null,n);let i=e?this.updateFeatures(e.features):this.defaultRenderOptions.features;return t.applyFeatures(this,i),t.getTextGlyphs(r)};Un.prototype.stringToGlyphs=function(r,e){let t=this.stringToGlyphIndexes(r,e),n=t.length,i=new Array(n),o=this.glyphs.get(0);for(let a=0;a<n;a+=1)i[a]=this.glyphs.get(t[a])||o;return i};Un.prototype.nameToGlyphIndex=function(r){return this.glyphNames.nameToGlyphIndex(r)};Un.prototype.nameToGlyph=function(r){let e=this.nameToGlyphIndex(r),t=this.glyphs.get(e);return t||(t=this.glyphs.get(0)),t};Un.prototype.glyphIndexToName=function(r){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(r):""};Un.prototype.getKerningValue=function(r,e){r=r.index||r,e=e.index||e;let t=this.position.defaultKerningTables;return t?this.position.getKerningValue(t,r,e):this.kerningPairs[r+","+e]||0};Un.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]},{script:"thai",tags:["liga","rlig","ccmp"]}],hinting:!1,usePalette:0,drawLayers:!0,drawSVG:!0};Un.prototype.forEachGlyph=function(r,e,t,n,i,o){e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:72,i=Object.assign({},this.defaultRenderOptions,i);let a=1/this.unitsPerEm*n,s=this.stringToGlyphs(r,i),l;if(i.kerning){let c=i.script||this.position.getDefaultScriptName();l=this.position.getKerningTables(c,i.language)}for(let c=0;c<s.length;c+=1){let u=s[c];if(o.call(this,u,e,t,n,i),u.advanceWidth&&(e+=u.advanceWidth*a),i.kerning&&c<s.length-1){let h=l?this.position.getKerningValue(l,u.index,s[c+1].index):this.getKerningValue(u,s[c+1]);e+=h*a}i.letterSpacing?e+=i.letterSpacing*n:i.tracking&&(e+=i.tracking/1e3*n)}return e};Un.prototype.getPath=function(r,e,t,n,i){i=Object.assign({},this.defaultRenderOptions,i);let o=new Zy;if(o._layers=[],gK(this,o),o.stroke){let a=1/(o.unitsPerEm||1e3)*n;o.strokeWidth*=a}return this.forEachGlyph(r,e,t,n,i,(a,s,l,c)=>{let u=a.getPath(s,l,c,i,this);if(i.drawSVG||i.drawLayers){let h=u._layers;if(h&&h.length){for(let d=0;d<h.length;d++){let p=h[d];o._layers.push(p)}return}}o.extend(u)}),o};Un.prototype.getPaths=function(r,e,t,n,i){i=Object.assign({},this.defaultRenderOptions,i);let o=[];return this.forEachGlyph(r,e,t,n,i,function(a,s,l,c){let u=a.getPath(s,l,c,i,this);o.push(u)}),o};Un.prototype.getAdvanceWidth=function(r,e,t){return t=Object.assign({},this.defaultRenderOptions,t),this.forEachGlyph(r,0,0,e,t,function(){})};Un.prototype.draw=function(r,e,t,n,i,o){this.getPath(e,t,n,i,o).draw(r)};Un.prototype.drawPoints=function(r,e,t,n,i,o){o=Object.assign({},this.defaultRenderOptions,o),this.forEachGlyph(e,t,n,i,o,function(a,s,l,c){a.drawPoints(r,s,l,c,o,this)})};Un.prototype.drawMetrics=function(r,e,t,n,i,o){o=Object.assign({},this.defaultRenderOptions,o),this.forEachGlyph(e,t,n,i,o,function(a,s,l,c){a.drawMetrics(r,s,l,c)})};Un.prototype.getEnglishName=function(r){let e=(this.names.unicode||this.names.macintosh||this.names.windows)[r];if(e)return e.en};Un.prototype.validate=function(){let r=[],e=this;function t(i,o){i||(console.warn(`[opentype.js] ${o}`),r.push(o))}function n(i){let o=e.getEnglishName(i);t(o&&o.trim().length>0,"No English "+i+" specified.")}if(n("fontFamily"),n("weightName"),n("manufacturer"),n("copyright"),n("version"),t(this.unitsPerEm>0,"No unitsPerEm specified."),this.tables.colr){let i=this.tables.colr.baseGlyphRecords,o=-1;for(let a=0;a<i.length;a++){let s=i[a].glyphID;if(t(o<i[a].glyphID,`baseGlyphs must be sorted by GlyphID in ascending order, but glyphID ${s} comes after ${o}`),o>i[a].glyphID)break;o=s}}return r};Un.prototype.toTables=function(){return PSe.fontToTable(this)};Un.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()};Un.prototype.toArrayBuffer=function(){let r=this.toTables().encode(),e=new ArrayBuffer(r.length),t=new Uint8Array(e);for(let n=0;n<r.length;n++)t[n]=r[n];return e};Un.prototype.download=function(){console.error("DEPRECATED: platform-specific actions are to be implemented on user-side")};Un.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512};Un.prototype.macStyleValues={BOLD:1,ITALIC:2,UNDERLINE:4,OUTLINED:8,SHADOW:16,CONDENSED:32,EXTENDED:64};Un.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9};Un.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var OMe=Un;function DMe(r,e){let t=new qe.Parser(r,e),n=t.parseUShort(),i=t.parseUShort();n!==1&&console.warn(`Unsupported hvar table version ${n}.${i}`);let o=[n,i],a=t.parsePointer32(function(){return this.parseItemVariationStore()}),s=t.parsePointer32(function(){return this.parseDeltaSetIndexMap()}),l=t.parsePointer32(function(){return this.parseDeltaSetIndexMap()}),c=t.parsePointer32(function(){return this.parseDeltaSetIndexMap()});return{version:o,itemVariationStore:a,advanceWidth:s,lsb:l,rsb:c}}function RMe(){console.warn("Writing of hvar tables is not yet supported.")}var BMe={make:RMe,parse:DMe},FMe=function(){return{coverage:this.parsePointer(ie.coverage),attachPoints:this.parseList(ie.pointer(ie.uShortList))}},NMe=function(){var r=this.parseUShort();if(mt.argument(r===1||r===2||r===3,"Unsupported CaretValue table version."),r===1)return{coordinate:this.parseShort()};if(r===2)return{pointindex:this.parseShort()};if(r===3)return{coordinate:this.parseShort()}},zMe=function(){return this.parseList(ie.pointer(NMe))},UMe=function(){return{coverage:this.parsePointer(ie.coverage),ligGlyphs:this.parseList(ie.pointer(zMe))}},jMe=function(){return this.parseUShort(),this.parseList(ie.pointer(ie.coverage))};function VMe(r,e){e=e||0;let t=new ie(r,e),n=t.parseVersion(1);mt.argument(n===1||n===1.2||n===1.3,"Unsupported GDEF table version.");var i={version:n,classDef:t.parsePointer(ie.classDef),attachList:t.parsePointer(FMe),ligCaretList:t.parsePointer(UMe),markAttachClassDef:t.parsePointer(ie.classDef)};return n>=1.2&&(i.markGlyphSets=t.parsePointer(jMe)),i}var GMe={parse:VMe},Sl=new Array(10);Sl[1]=function(){let r=this.offset+this.relativeOffset,e=this.parseUShort();if(e===1)return{posFormat:1,coverage:this.parsePointer(ie.coverage),value:this.parseValueRecord()};if(e===2)return{posFormat:2,coverage:this.parsePointer(ie.coverage),values:this.parseValueRecordList()};mt.assert(!1,"0x"+r.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")};Sl[2]=function(){let r=this.offset+this.relativeOffset,e=this.parseUShort();mt.assert(e===1||e===2,"0x"+r.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");let t=this.parsePointer(ie.coverage),n=this.parseUShort(),i=this.parseUShort();if(e===1)return{posFormat:e,coverage:t,valueFormat1:n,valueFormat2:i,pairSets:this.parseList(ie.pointer(ie.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(n),value2:this.parseValueRecord(i)}})))};if(e===2){let o=this.parsePointer(ie.classDef),a=this.parsePointer(ie.classDef),s=this.parseUShort(),l=this.parseUShort();return{posFormat:e,coverage:t,valueFormat1:n,valueFormat2:i,classDef1:o,classDef2:a,class1Count:s,class2Count:l,classRecords:this.parseList(s,ie.list(l,function(){return{value1:this.parseValueRecord(n),value2:this.parseValueRecord(i)}}))}}};Sl[3]=function(){return{error:"GPOS Lookup 3 not supported"}};Sl[4]=function(){return{error:"GPOS Lookup 4 not supported"}};Sl[5]=function(){return{error:"GPOS Lookup 5 not supported"}};Sl[6]=function(){return{error:"GPOS Lookup 6 not supported"}};Sl[7]=function(){return{error:"GPOS Lookup 7 not supported"}};Sl[8]=function(){return{error:"GPOS Lookup 8 not supported"}};Sl[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function HMe(r,e){e=e||0;let t=new ie(r,e),n=t.parseVersion(1);return mt.argument(n===1||n===1.1,"Unsupported GPOS table version "+n),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Sl)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Sl),variations:t.parseFeatureVariationsList()}}var WMe=new Array(10);function XMe(r){return new Fe.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new Fe.ScriptList(r.scripts)},{name:"features",type:"TABLE",value:new Fe.FeatureList(r.features)},{name:"lookups",type:"TABLE",value:new Fe.LookupList(r.lookups,WMe)}])}var YMe={parse:HMe,make:XMe};function $Me(r){let e={};r.skip("uShort");let t=r.parseUShort();mt.argument(t===0,"Unsupported kern sub-table version."),r.skip("uShort",2);let n=r.parseUShort();r.skip("uShort",3);for(let i=0;i<n;i+=1){let o=r.parseUShort(),a=r.parseUShort(),s=r.parseShort();e[o+","+a]=s}return e}function KMe(r){let e={};r.skip("uShort"),r.parseULong()>1&&console.warn("Only the first kern subtable is supported."),r.skip("uLong");let t=r.parseUShort()&255;if(r.skip("uShort"),t===0){let n=r.parseUShort();r.skip("uShort",3);for(let i=0;i<n;i+=1){let o=r.parseUShort(),a=r.parseUShort(),s=r.parseShort();e[o+","+a]=s}}return e}function qMe(r,e){let t=new qe.Parser(r,e),n=t.parseUShort();if(n===0)return $Me(t);if(n===1)return KMe(t);throw new Error("Unsupported kern table version ("+n+").")}var ZMe={parse:qMe};function JMe(r,e,t,n){let i=new qe.Parser(r,e),o=n?i.parseUShort:i.parseULong,a=[];for(let s=0;s<t+1;s+=1){let l=o.call(i);n&&(l*=2),a.push(l)}return a}var QMe={parse:JMe};function YY(r,e){let t=[],n=12;for(let i=0;i<e;i+=1){let o=qe.getTag(r,n),a=qe.getULong(r,n+4),s=qe.getULong(r,n+8),l=qe.getULong(r,n+12);t.push({tag:o,checksum:a,offset:s,length:l,compression:!1}),n+=16}return t}function ePe(r,e){let t=[],n=44;for(let i=0;i<e;i+=1){let o=qe.getTag(r,n),a=qe.getULong(r,n+4),s=qe.getULong(r,n+8),l=qe.getULong(r,n+12),c;s<l?c="WOFF":c=!1,t.push({tag:o,offset:a,compression:c,compressedLength:s,length:l}),n+=20}return t}function Tn(r,e){if(e.compression==="WOFF"){let t=new Uint8Array(r.buffer,e.offset+2,e.compressedLength-2),n=new Uint8Array(e.length);if(K$(t,n),n.byteLength!==e.length)throw new Error("Decompression error: "+e.tag+" decompressed length doesn't match recorded length");return{data:new DataView(n.buffer,0),offset:0}}else return{data:r,offset:e.offset}}function tPe(r,e={}){let t,n,i=new OMe({empty:!0});r.constructor!==ArrayBuffer&&(r=new Uint8Array(r).buffer);let o=new DataView(r,0),a,s=[],l=qe.getTag(o,0);if(l==="\0\0\0"||l==="true"||l==="typ1")i.outlinesFormat="truetype",a=qe.getUShort(o,4),s=YY(o,a);else if(l==="OTTO")i.outlinesFormat="cff",a=qe.getUShort(o,4),s=YY(o,a);else if(l==="wOFF"){let O=qe.getTag(o,4);if(O==="\0\0\0")i.outlinesFormat="truetype";else if(O==="OTTO")i.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+l);a=qe.getUShort(o,12),s=ePe(o,a)}else if(l==="wOF2"){let O="https://github.com/opentypejs/opentype.js/issues/183#issuecomment-1147228025";throw new Error("WOFF2 require an external decompressor library, see examples at: "+O)}else throw new Error("Unsupported OpenType signature "+l);let c,u,h,d,p,f,m,g,y,b,v,x,w,_,A,E,S,M;for(let O=0;O<a;O+=1){let D=s[O],z;switch(D.tag){case"avar":m=D;break;case"cmap":z=Tn(o,D),i.tables.cmap=aK.parse(z.data,z.offset),i.encoding=new lK(i.tables.cmap);break;case"cvt ":z=Tn(o,D),M=new qe.Parser(z.data,z.offset),i.tables.cvt=M.parseShortList(D.length/2);break;case"fvar":h=D;break;case"STAT":d=D;break;case"gvar":p=D;break;case"cvar":f=D;break;case"fpgm":z=Tn(o,D),M=new qe.Parser(z.data,z.offset),i.tables.fpgm=M.parseByteList(D.length);break;case"head":z=Tn(o,D),i.tables.head=vK.parse(z.data,z.offset),i.unitsPerEm=i.tables.head.unitsPerEm,t=i.tables.head.indexToLocFormat;break;case"hhea":z=Tn(o,D),i.tables.hhea=xK.parse(z.data,z.offset),i.ascender=i.tables.hhea.ascender,i.descender=i.tables.hhea.descender,i.numberOfHMetrics=i.tables.hhea.numberOfHMetrics;break;case"HVAR":w=D;break;case"hmtx":x=D;break;case"ltag":z=Tn(o,D),n=_K.parse(z.data,z.offset);break;case"COLR":z=Tn(o,D),i.tables.colr=EK.parse(z.data,z.offset);break;case"CPAL":z=Tn(o,D),i.tables.cpal=dK.parse(z.data,z.offset);break;case"maxp":z=Tn(o,D),i.tables.maxp=SK.parse(z.data,z.offset),i.numGlyphs=i.tables.maxp.numGlyphs;break;case"name":E=D;break;case"OS/2":z=Tn(o,D),i.tables.os2=yB.parse(z.data,z.offset);break;case"post":z=Tn(o,D),i.tables.post=AK.parse(z.data,z.offset),i.glyphNames=new BB(i.tables.post);break;case"prep":z=Tn(o,D),M=new qe.Parser(z.data,z.offset),i.tables.prep=M.parseByteList(D.length);break;case"glyf":g=D;break;case"loca":A=D;break;case"CFF ":c=D;break;case"CFF2":u=D;break;case"kern":_=D;break;case"GDEF":y=D;break;case"GPOS":b=D;break;case"GSUB":v=D;break;case"meta":S=D;break;case"gasp":try{z=Tn(o,D),i.tables.gasp=OK.parse(z.data,z.offset)}catch(N){console.warn("Failed to parse gasp table, skipping."),console.warn(N)}break;case"SVG ":z=Tn(o,D),i.tables.svg=DK.parse(z.data,z.offset);break}}let T=Tn(o,E);if(i.tables.name=oK.parse(T.data,T.offset,n),i.names=i.tables.name,g&&A){let O=t===0,D=Tn(o,A),z=QMe.parse(D.data,D.offset,i.numGlyphs,O),N=Tn(o,g);i.glyphs=jK.parse(N.data,N.offset,z,i,e)}else if(c){let O=Tn(o,c);mB.parse(O.data,O.offset,i,e)}else if(u){let O=Tn(o,u);mB.parse(O.data,O.offset,i,e)}else throw new Error("Font doesn't contain TrueType, CFF or CFF2 outlines.");let L=Tn(o,x);if(wK.parse(i,L.data,L.offset,i.numberOfHMetrics,i.numGlyphs,i.glyphs,e),q_e(i,e),_){let O=Tn(o,_);i.kerningPairs=ZMe.parse(O.data,O.offset)}else i.kerningPairs={};if(y){let O=Tn(o,y);i.tables.gdef=GMe.parse(O.data,O.offset)}if(b){let O=Tn(o,b);i.tables.gpos=YMe.parse(O.data,O.offset),i.position.init()}if(v){let O=Tn(o,v);i.tables.gsub=MK.parse(O.data,O.offset)}if(h){let O=Tn(o,h);i.tables.fvar=CK.parse(O.data,O.offset,i.names)}if(d){let O=Tn(o,d);i.tables.stat=TK.parse(O.data,O.offset,i.tables.fvar)}if(p){h||console.warn("This font provides a gvar table, but no fvar table, which is required for variable fonts."),g||console.warn("This font provides a gvar table, but no glyf table. Glyph variation only works with TrueType outlines.");let O=Tn(o,p);i.tables.gvar=LK.parse(O.data,O.offset,i.tables.fvar,i.glyphs)}if(f){h||console.warn("This font provides a cvar table, but no fvar table, which is required for variable fonts."),i.tables.cvt||console.warn("This font provides a cvar table, but no cvt table which could be made variable."),g||console.warn("This font provides a gvar table, but no glyf table. Glyph variation only works with TrueType outlines.");let O=Tn(o,f);i.tables.cvar=IK.parse(O.data,O.offset,i.tables.fvar,i.tables.cvt||[])}if(m){h||console.warn("This font provides an avar table, but no fvar table, which is required for variable fonts.");let O=Tn(o,m);i.tables.avar=kK.parse(O.data,O.offset,i.tables.fvar)}if(w){h||console.warn("This font provides an HVAR table, but no fvar table, which is required for variable fonts."),x||console.warn("This font provides an HVAR table, but no hmtx table to vary.");let O=Tn(o,w);i.tables.hvar=BMe.parse(O.data,O.offset,i.tables.fvar)}if(S){let O=Tn(o,S);i.tables.meta=PK.parse(O.data,O.offset),i.metas=i.tables.meta}return i.palettes=new NK(i),i}function nPe(r){var e;let t=r.unitsPerEm||1e3,n=r.charToGlyphIndex("A");if(n==null||n<=0)return 1;let i=(e=r.charToGlyph("A"))==null?void 0:e.yMax;return!i||i<=0?1:t/i}var KK="isMeshGlyph",xf=1,$Y="stroke",qK=4;function KY(r){var e;return((e=r.userData)==null?void 0:e[KK])===!0?!0:r.type==="ShapeGeometry"}function ZK(r){r.userData[KK]=!0}function qY(r){let e=new ot,t=r.getAttribute("position");t&&e.setAttribute("position",t.clone());let n=r.getIndex();return n&&e.setIndex(n.clone()),r.dispose(),e}function ZY(r){let e=r.getAttribute("position");if(!e||e.count===0)return!0;let t=e.array;for(let n=0;n<t.length;n++)if(!Number.isFinite(t[n]))return!1;return!0}var xB=class extends OE{constructor(e,t,n){super(),this.isFound=!1,this.char=e,this.fontSize=t,this.font=n,this.width=this.getCharWidth(e,t,n)}get geometryScale(){return this.fontSize/xf}toGeometry(){let e=this.char.codePointAt(0)??this.char.charCodeAt(0),t=this.font.cache.getGeometry(e,xf);if(t==null){let n=this.font.generateShapes(this.char,xf);if(t=new Jh(n,qK),!ZY(t))return t.dispose(),new ot;t.hasAttribute("uv")&&t.deleteAttribute("uv"),t.hasAttribute("normal")&&t.deleteAttribute("normal"),t=qY(t),ZK(t),this.font.cache.setGeometry(e,xf,t)}return t}toStrokeGeometry(){let e=this.char.codePointAt(0)??this.char.charCodeAt(0),t=this.font.cache.getGeometry(e,xf,$Y);if(t==null){if(t=this.font.generateStrokeGeometry(this.char,xf),!ZY(t))return t.dispose(),new ot;t=qY(t),this.font.cache.setGeometry(e,xf,t,$Y)}return t}hasStrokeGeometry(){return this.isFound&&this.width>0}getCharWidth(e,t,n){let i=n.data.glyphs[e];return i?(this.isFound=!0,i.ha*t/n.data.resolution):(this.isFound=!1,0)}},wB=class{constructor(e){this.isFont=!0,this.type="Font",this.data=e}generateShapes(e,t=100){let n=[],i=rPe(e,t,this.data);for(let o=0,a=i.length;o<a;o++)n.push(...i[o].toShapes());return n}};function rPe(r,e,t){let n=Array.from(r),i=e/t.resolution,o=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*i,a=[],s=0,l=0;for(let c=0;c<n.length;c++){let u=n[c];if(u===`
  3978. `)s=0,l-=o;else{let h=iPe(u,i,s,l,t);s+=h.offsetX,a.push(h.path)}}return a}function iPe(r,e,t,n,i){let o=i.glyphs[r]||i.glyphs["?"];if(!o){console.error('THREE.Font: character "'+r+'" does not exists in font family '+i.familyName+".");return}let a=new Ry,s,l,c,u,h,d,p,f;if(o.o){let m=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let g=0,y=m.length;g<y;)switch(m[g++]){case"m":s=m[g++]*e+t,l=m[g++]*e+n,a.moveTo(s,l);break;case"l":s=m[g++]*e+t,l=m[g++]*e+n,a.lineTo(s,l);break;case"q":c=m[g++]*e+t,u=m[g++]*e+n,h=m[g++]*e+t,d=m[g++]*e+n,a.quadraticCurveTo(h,d,c,u);break;case"b":c=m[g++]*e+t,u=m[g++]*e+n,h=m[g++]*e+t,d=m[g++]*e+n,p=m[g++]*e+t,f=m[g++]*e+n,a.bezierCurveTo(h,d,p,f,c,u);break}}return{offsetX:o.ha*e,path:a}}var _B=class extends wB{generateShapes(e,t=100,n="ltr"){let i=[];return JY(e,t,this.data,n).forEach(o=>{i.push(...dPe(o))}),i}generateStrokeGeometry(e,t=100,n="ltr",i=qK){let o=JY(e,t,this.data,n);return oPe(o,i)}};function oPe(r,e){let t=[],n=[],i=0,o=1e-8;for(let s of r)for(let l of s.subPaths){let c=l.getPoints(e);if(c.length<2)continue;let u=i;for(let f of c)t.push(f.x,f.y,0),i++;let h=c[0],d=c[c.length-1],p=Math.abs(h.x-d.x)<=o&&Math.abs(h.y-d.y)<=o;for(let f=0;f<c.length-1;f++)n.push(u+f,u+f+1);p||n.push(i-1,u)}let a=new ot;return t.length===0||(a.setAttribute("position",new Jt(t,3)),a.setIndex(n)),a}function JY(r,e,t,n="ltr"){let i=Array.from(r),o=e/t.resolution,a=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*o,s=[],l=0,c=0;(n==="rtl"||n==="tb")&&i.reverse();for(let u of i)if(u===`
  3979. `)l=0,c-=a;else{let h=aPe(u,o,l,c,t);if(!h)continue;n==="tb"?(l=0,c+=t.ascender*o):l+=h.offsetX,s.push(h.path)}return s}function aPe(r,e,t,n,i){let o=i.glyphs[r]||i.glyphs["?"];if(!o){console.error(`THREE.Font: character "${r}" does not exist in font family ${i.familyName}.`);return}let a=new Ry;if(o.o){let s=o.o.split(" "),l=0;for(;l<s.length;){let c=s[l++],u,h,d,p,f,m,g,y;switch(c){case"m":u=parseFloat(s[l++])*e+t,h=parseFloat(s[l++])*e+n,a.moveTo(u,h);break;case"l":u=parseFloat(s[l++])*e+t,h=parseFloat(s[l++])*e+n,a.lineTo(u,h);break;case"q":d=parseFloat(s[l++])*e+t,p=parseFloat(s[l++])*e+n,f=parseFloat(s[l++])*e+t,m=parseFloat(s[l++])*e+n,a.quadraticCurveTo(f,m,d,p);break;case"b":d=parseFloat(s[l++])*e+t,p=parseFloat(s[l++])*e+n,f=parseFloat(s[l++])*e+t,m=parseFloat(s[l++])*e+n,g=parseFloat(s[l++])*e+t,y=parseFloat(s[l++])*e+n,a.bezierCurveTo(f,m,g,y,d,p);break}}}return{offsetX:o.ha*e,path:a}}function sPe(r,e){let t=!1,{x:n,y:i}=r,o=e.length;for(let a=0,s=o-1;a<o;s=a++){let l=e[a].x,c=e[a].y,u=e[s].x,h=e[s].y;c>i!=h>i&&n<(u-l)*(i-c)/(h-c)+l&&(t=!t)}return t}function lPe(r){let e=r.length,t=Array(e).fill(null);for(let n=0;n<e;n++){let i=null,o=1/0;for(let a=0;a<e;a++)if(n!==a&&r[n].every(s=>sPe(s,r[a]))){let s=Math.abs(dc.area(r[a]));s<o&&(o=s,i=a)}t[n]=i}return t}function cPe(r){let e=r.length,t=Array.from({length:e},()=>[]);for(let n=0;n<e;n++){let i=r[n];i!==null&&t[i].push(n)}return t}function uPe(r){return r.map((e,t)=>e===null?t:-1).filter(e=>e>=0)}function hPe(r){let e=[];for(let t=r.length-1;t>=0;t--){let n=r[t];if(n instanceof Wu)e.push(new Wu(n.v2.clone(),n.v1.clone()));else if(n instanceof qh)e.push(new qh(n.v2.clone(),n.v1.clone(),n.v0.clone()));else if(n instanceof Kh)e.push(new Kh(n.v3.clone(),n.v2.clone(),n.v1.clone(),n.v0.clone()));else if(n instanceof Hu)e.push(new Hu(n.aX,n.aY,n.xRadius,n.yRadius,n.aEndAngle,n.aStartAngle,!n.aClockwise,n.aRotation));else if(typeof n.getPoints=="function"){let i=n.getPoints(8);for(let o=i.length-1;o>0;o--)e.push(new Wu(i[o].clone(),i[o-1].clone()))}}return e}function QY(r,e){let t=dc.area(r.getPoints(32))>0,n=e===t?r.curves.slice():hPe(r.curves),i=new Vo;return i.curves.push(...n),i}function dPe(r,e=32){let t=r.subPaths;if(!t||t.length===0)return[];let n=t.map(p=>p.getPoints(e)),i=lPe(n),o=cPe(i),a=uPe(i),s=t.length,l=Array(s).fill(-1),c=Array(s).fill(-1);for(let p of a){let f=[{idx:p,d:0}];for(;f.length;){let m=f.pop();l[m.idx]=m.d,c[m.idx]=p;for(let g of o[m.idx])f.push({idx:g,d:m.d+1})}}let u=[],h=new Set;function d(p){let f=QY(t[p],!0);h.add(p);for(let m of o[p])if(!h.has(m)&&l[m]===l[p]+1){let g=QY(t[m],!1);f.holes.push(g),h.add(m)}u.push(f)}for(let p of a)d(p);for(let p=0;p<s;p++)h.has(p)||d(p);return u}var pPe=61440,SB=class extends LE{constructor(e){super(e),this.type="mesh",this.glyphCache=new m_(512,(n,i)=>{this.data.glyphs[n]===i&&delete this.data.glyphs[n]});let t=e.data;if(t instanceof ArrayBuffer){let n=this.parseMeshFont(t);this.data=n.data,this.opentypeFont=n.font}else throw new Error("Invalid font cache data. Please remove font cache database named 'mlightcad' in IndexedDB and try again!");this.font=new _B(this.data)}parseMeshFont(e){let t=tPe(e),n=Math.round,i=nPe(t),o={glyphs:{},familyName:t.getEnglishName("fullName"),ascender:n(t.ascender),descender:n(t.descender),underlinePosition:t.tables.post.underlinePosition,underlineThickness:t.tables.post.underlineThickness,boundingBox:{xMin:t.tables.head.xMin,xMax:t.tables.head.xMax,yMin:t.tables.head.yMin,yMax:t.tables.head.yMax},resolution:t.unitsPerEm||1e3,scaleFactor:i,original_font_information:t.tables.name};return{font:t,data:o}}opentypeLookupChar(e){if(!this.opentypeFont||e.length!==1)return e;let t=e.charCodeAt(0),n=this.opentypeFont.charToGlyphIndex(e);if(n!=null&&n>0)return e;if(t>=32&&t<=126){let i=String.fromCharCode(pPe+t),o=this.opentypeFont.charToGlyphIndex(i);if(o!=null&&o>0)return i}return e}opentypeHasGlyph(e){if(!this.opentypeFont)return!1;let t=this.opentypeLookupChar(e),n=this.opentypeFont.charToGlyphIndex(t);return n!=null&&n>0}hasChar(e){return this.opentypeHasGlyph(e)}hasCode(e){return this.hasChar(String.fromCodePoint(e))}_loadGlyphIfNeeded(e){if(this.data.glyphs[e]){this.glyphCache.get(e);return}if(!this.opentypeFont)return;let t=this.glyphCache.get(e);if(t){this.data.glyphs[e]=t;return}if(this.opentypeHasGlyph(e)){let n=this.opentypeLookupChar(e),i=this.opentypeFont.charToGlyph(n);if(!i||!i.path)return;let o=Math.round,a={ha:o(i.advanceWidth??0),x_min:o(i.xMin??0),x_max:o(i.xMax??0),o:""};i.path.commands.forEach(s=>{let l=s.type.toLowerCase();l==="c"&&(l="b"),a.o+=l+" ",s.x!==void 0&&s.y!==void 0&&(a.o+=o(s.x)+" "+o(s.y)+" "),s.x1!==void 0&&s.y1!==void 0&&(a.o+=o(s.x1)+" "+o(s.y1)+" "),s.x2!==void 0&&s.y2!==void 0&&(a.o+=o(s.x2)+" "+o(s.y2)+" ")}),this.data.glyphs[e]=a,this.glyphCache.set(e,a)}}generateShapes(e,t){for(let n of e)this._loadGlyphIfNeeded(n);return this.font.generateShapes(e,t)}generateStrokeGeometry(e,t){for(let n of e)this._loadGlyphIfNeeded(n);return this.font.generateStrokeGeometry(e,t)}getCharShape(e,t){if(this._loadGlyphIfNeeded(e),!this.data.glyphs[e]){this.addUnsupportedChar(e);return}return new xB(e,t,this)}getCodeShape(e,t){return this.getCharShape(String.fromCodePoint(e),t)}getScaleFactor(){return this.scaleFactor==null?(this.scaleFactor=this.data.scaleFactor,this.scaleFactor):this.scaleFactor}getNotFoundTextShape(e){return this.getCharShape("?",e)}estimateMemoryUsage(){var e;let t=this.cache.getStats(),n=0,i=Object.keys(this.data.glyphs);for(let s of i)n+=Mwe((e=this.data.glyphs[s])==null?void 0:e.o);let o=Math.round(this.sourceByteLength*i_e),a=o+n+t.estimatedBytes;return{names:Array.from(this.names),type:"mesh",sourceByteLength:this.sourceByteLength,parsedFontEstimatedBytes:o,charGeometryCache:t,meshGlyphs:{glyphCount:i.length,outlineStringBytes:n},estimatedBytes:a}}dispose(){this.glyphCache.clear(),this.data.glyphs={},super.dispose()}};function fPe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function mPe(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var JK={exports:{}},WB={},sC={};sC.byteLength=yPe;sC.toByteArray=vPe;sC.fromByteArray=_Pe;var Sc=[],ks=[],gPe=typeof Uint8Array<"u"?Uint8Array:Array,N4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(wf=0,e$=N4.length;wf<e$;++wf)Sc[wf]=N4[wf],ks[N4.charCodeAt(wf)]=wf;var wf,e$;ks[45]=62;ks[95]=63;function QK(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function yPe(r){var e=QK(r),t=e[0],n=e[1];return(t+n)*3/4-n}function bPe(r,e,t){return(e+t)*3/4-t}function vPe(r){var e,t=QK(r),n=t[0],i=t[1],o=new gPe(bPe(r,n,i)),a=0,s=i>0?n-4:n,l;for(l=0;l<s;l+=4)e=ks[r.charCodeAt(l)]<<18|ks[r.charCodeAt(l+1)]<<12|ks[r.charCodeAt(l+2)]<<6|ks[r.charCodeAt(l+3)],o[a++]=e>>16&255,o[a++]=e>>8&255,o[a++]=e&255;return i===2&&(e=ks[r.charCodeAt(l)]<<2|ks[r.charCodeAt(l+1)]>>4,o[a++]=e&255),i===1&&(e=ks[r.charCodeAt(l)]<<10|ks[r.charCodeAt(l+1)]<<4|ks[r.charCodeAt(l+2)]>>2,o[a++]=e>>8&255,o[a++]=e&255),o}function xPe(r){return Sc[r>>18&63]+Sc[r>>12&63]+Sc[r>>6&63]+Sc[r&63]}function wPe(r,e,t){for(var n,i=[],o=e;o<t;o+=3)n=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),i.push(xPe(n));return i.join("")}function _Pe(r){for(var e,t=r.length,n=t%3,i=[],o=16383,a=0,s=t-n;a<s;a+=o)i.push(wPe(r,a,a+o>s?s:a+o));return n===1?(e=r[t-1],i.push(Sc[e>>2]+Sc[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(Sc[e>>10]+Sc[e>>4&63]+Sc[e<<2&63]+"=")),i.join("")}var XB={};XB.read=function(r,e,t,n,i){var o,a,s=i*8-n-1,l=(1<<s)-1,c=l>>1,u=-7,h=t?i-1:0,d=t?-1:1,p=r[e+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=o*256+r[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=a*256+r[e+h],h+=d,u-=8);if(o===0)o=1-c;else{if(o===l)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-c}return(p?-1:1)*a*Math.pow(2,o-n)};XB.write=function(r,e,t,n,i,o){var a,s,l,c=o*8-i-1,u=(1<<c)-1,h=u>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+h>=1?e+=d/l:e+=d*Math.pow(2,1-h),e*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a=a+h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;r[t+p]=s&255,p+=f,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;r[t+p]=a&255,p+=f,a/=256,c-=8);r[t+p-f]|=m*128};(function(r){var e=sC,t=XB,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=s,r.SlowBuffer=b,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var C=new Uint8Array(1),I={foo:function(){return 42}};return Object.setPrototypeOf(I,Uint8Array.prototype),Object.setPrototypeOf(C,I),C.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(C){if(C>i)throw new RangeError('The value "'+C+'" is invalid for option "size"');var I=new Uint8Array(C);return Object.setPrototypeOf(I,s.prototype),I}function s(C,I,B){if(typeof C=="number"){if(typeof I=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(C)}return l(C,I,B)}s.poolSize=8192;function l(C,I,B){if(typeof C=="string")return d(C,I);if(ArrayBuffer.isView(C))return f(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(Xe(C,ArrayBuffer)||C&&Xe(C.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xe(C,SharedArrayBuffer)||C&&Xe(C.buffer,SharedArrayBuffer)))return m(C,I,B);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var K=C.valueOf&&C.valueOf();if(K!=null&&K!==C)return s.from(K,I,B);var q=g(C);if(q)return q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return s.from(C[Symbol.toPrimitive]("string"),I,B);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}s.from=function(C,I,B){return l(C,I,B)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function u(C,I,B){return c(C),C<=0?a(C):I!==void 0?typeof B=="string"?a(C).fill(I,B):a(C).fill(I):a(C)}s.alloc=function(C,I,B){return u(C,I,B)};function h(C){return c(C),a(C<0?0:y(C)|0)}s.allocUnsafe=function(C){return h(C)},s.allocUnsafeSlow=function(C){return h(C)};function d(C,I){if((typeof I!="string"||I==="")&&(I="utf8"),!s.isEncoding(I))throw new TypeError("Unknown encoding: "+I);var B=v(C,I)|0,K=a(B),q=K.write(C,I);return q!==B&&(K=K.slice(0,q)),K}function p(C){for(var I=C.length<0?0:y(C.length)|0,B=a(I),K=0;K<I;K+=1)B[K]=C[K]&255;return B}function f(C){if(Xe(C,Uint8Array)){var I=new Uint8Array(C);return m(I.buffer,I.byteOffset,I.byteLength)}return p(C)}function m(C,I,B){if(I<0||C.byteLength<I)throw new RangeError('"offset" is outside of buffer bounds');if(C.byteLength<I+(B||0))throw new RangeError('"length" is outside of buffer bounds');var K;return I===void 0&&B===void 0?K=new Uint8Array(C):B===void 0?K=new Uint8Array(C,I):K=new Uint8Array(C,I,B),Object.setPrototypeOf(K,s.prototype),K}function g(C){if(s.isBuffer(C)){var I=y(C.length)|0,B=a(I);return B.length===0||C.copy(B,0,0,I),B}if(C.length!==void 0)return typeof C.length!="number"||$(C.length)?a(0):p(C);if(C.type==="Buffer"&&Array.isArray(C.data))return p(C.data)}function y(C){if(C>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return C|0}function b(C){return+C!=C&&(C=0),s.alloc(+C)}s.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==s.prototype},s.compare=function(C,I){if(Xe(C,Uint8Array)&&(C=s.from(C,C.offset,C.byteLength)),Xe(I,Uint8Array)&&(I=s.from(I,I.offset,I.byteLength)),!s.isBuffer(C)||!s.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===I)return 0;for(var B=C.length,K=I.length,q=0,F=Math.min(B,K);q<F;++q)if(C[q]!==I[q]){B=C[q],K=I[q];break}return B<K?-1:K<B?1:0},s.isEncoding=function(C){switch(String(C).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(C,I){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return s.alloc(0);var B;if(I===void 0)for(I=0,B=0;B<C.length;++B)I+=C[B].length;var K=s.allocUnsafe(I),q=0;for(B=0;B<C.length;++B){var F=C[B];if(Xe(F,Uint8Array))q+F.length>K.length?s.from(F).copy(K,q):Uint8Array.prototype.set.call(K,F,q);else if(s.isBuffer(F))F.copy(K,q);else throw new TypeError('"list" argument must be an Array of Buffers');q+=F.length}return K};function v(C,I){if(s.isBuffer(C))return C.length;if(ArrayBuffer.isView(C)||Xe(C,ArrayBuffer))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);var B=C.length,K=arguments.length>2&&arguments[2]===!0;if(!K&&B===0)return 0;for(var q=!1;;)switch(I){case"ascii":case"latin1":case"binary":return B;case"utf8":case"utf-8":return we(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B*2;case"hex":return B>>>1;case"base64":return Oe(C).length;default:if(q)return K?-1:we(C).length;I=(""+I).toLowerCase(),q=!0}}s.byteLength=v;function x(C,I,B){var K=!1;if((I===void 0||I<0)&&(I=0),I>this.length||((B===void 0||B>this.length)&&(B=this.length),B<=0)||(B>>>=0,I>>>=0,B<=I))return"";for(C||(C="utf8");;)switch(C){case"hex":return Q(this,I,B);case"utf8":case"utf-8":return D(this,I,B);case"ascii":return J(this,I,B);case"latin1":case"binary":return X(this,I,B);case"base64":return O(this,I,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,I,B);default:if(K)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),K=!0}}s.prototype._isBuffer=!0;function w(C,I,B){var K=C[I];C[I]=C[B],C[B]=K}s.prototype.swap16=function(){var C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var I=0;I<C;I+=2)w(this,I,I+1);return this},s.prototype.swap32=function(){var C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var I=0;I<C;I+=4)w(this,I,I+3),w(this,I+1,I+2);return this},s.prototype.swap64=function(){var C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var I=0;I<C;I+=8)w(this,I,I+7),w(this,I+1,I+6),w(this,I+2,I+5),w(this,I+3,I+4);return this},s.prototype.toString=function(){var C=this.length;return C===0?"":arguments.length===0?D(this,0,C):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(C){if(!s.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:s.compare(this,C)===0},s.prototype.inspect=function(){var C="",I=r.INSPECT_MAX_BYTES;return C=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(C+=" ... "),"<Buffer "+C+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(C,I,B,K,q){if(Xe(C,Uint8Array)&&(C=s.from(C,C.offset,C.byteLength)),!s.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(I===void 0&&(I=0),B===void 0&&(B=C?C.length:0),K===void 0&&(K=0),q===void 0&&(q=this.length),I<0||B>C.length||K<0||q>this.length)throw new RangeError("out of range index");if(K>=q&&I>=B)return 0;if(K>=q)return-1;if(I>=B)return 1;if(I>>>=0,B>>>=0,K>>>=0,q>>>=0,this===C)return 0;for(var F=q-K,R=B-I,ee=Math.min(F,R),fe=this.slice(K,q),ge=C.slice(I,B),ye=0;ye<ee;++ye)if(fe[ye]!==ge[ye]){F=fe[ye],R=ge[ye];break}return F<R?-1:R<F?1:0};function _(C,I,B,K,q){if(C.length===0)return-1;if(typeof B=="string"?(K=B,B=0):B>2147483647?B=2147483647:B<-2147483648&&(B=-2147483648),B=+B,$(B)&&(B=q?0:C.length-1),B<0&&(B=C.length+B),B>=C.length){if(q)return-1;B=C.length-1}else if(B<0)if(q)B=0;else return-1;if(typeof I=="string"&&(I=s.from(I,K)),s.isBuffer(I))return I.length===0?-1:A(C,I,B,K,q);if(typeof I=="number")return I=I&255,typeof Uint8Array.prototype.indexOf=="function"?q?Uint8Array.prototype.indexOf.call(C,I,B):Uint8Array.prototype.lastIndexOf.call(C,I,B):A(C,[I],B,K,q);throw new TypeError("val must be string, number or Buffer")}function A(C,I,B,K,q){var F=1,R=C.length,ee=I.length;if(K!==void 0&&(K=String(K).toLowerCase(),K==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(C.length<2||I.length<2)return-1;F=2,R/=2,ee/=2,B/=2}function fe(nt,ln){return F===1?nt[ln]:nt.readUInt16BE(ln*F)}var ge;if(q){var ye=-1;for(ge=B;ge<R;ge++)if(fe(C,ge)===fe(I,ye===-1?0:ge-ye)){if(ye===-1&&(ye=ge),ge-ye+1===ee)return ye*F}else ye!==-1&&(ge-=ge-ye),ye=-1}else for(B+ee>R&&(B=R-ee),ge=B;ge>=0;ge--){for(var Re=!0,Te=0;Te<ee;Te++)if(fe(C,ge+Te)!==fe(I,Te)){Re=!1;break}if(Re)return ge}return-1}s.prototype.includes=function(C,I,B){return this.indexOf(C,I,B)!==-1},s.prototype.indexOf=function(C,I,B){return _(this,C,I,B,!0)},s.prototype.lastIndexOf=function(C,I,B){return _(this,C,I,B,!1)};function E(C,I,B,K){B=Number(B)||0;var q=C.length-B;K?(K=Number(K),K>q&&(K=q)):K=q;var F=I.length;K>F/2&&(K=F/2);for(var R=0;R<K;++R){var ee=parseInt(I.substr(R*2,2),16);if($(ee))return R;C[B+R]=ee}return R}function S(C,I,B,K){return Pe(we(I,C.length-B),C,B,K)}function M(C,I,B,K){return Pe(pe(I),C,B,K)}function T(C,I,B,K){return Pe(Oe(I),C,B,K)}function L(C,I,B,K){return Pe(Ee(I,C.length-B),C,B,K)}s.prototype.write=function(C,I,B,K){if(I===void 0)K="utf8",B=this.length,I=0;else if(B===void 0&&typeof I=="string")K=I,B=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var q=this.length-I;if((B===void 0||B>q)&&(B=q),C.length>0&&(B<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");for(var F=!1;;)switch(K){case"hex":return E(this,C,I,B);case"utf8":case"utf-8":return S(this,C,I,B);case"ascii":case"latin1":case"binary":return M(this,C,I,B);case"base64":return T(this,C,I,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,C,I,B);default:if(F)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),F=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(C,I,B){return I===0&&B===C.length?e.fromByteArray(C):e.fromByteArray(C.slice(I,B))}function D(C,I,B){B=Math.min(C.length,B);for(var K=[],q=I;q<B;){var F=C[q],R=null,ee=F>239?4:F>223?3:F>191?2:1;if(q+ee<=B){var fe,ge,ye,Re;switch(ee){case 1:F<128&&(R=F);break;case 2:fe=C[q+1],(fe&192)===128&&(Re=(F&31)<<6|fe&63,Re>127&&(R=Re));break;case 3:fe=C[q+1],ge=C[q+2],(fe&192)===128&&(ge&192)===128&&(Re=(F&15)<<12|(fe&63)<<6|ge&63,Re>2047&&(Re<55296||Re>57343)&&(R=Re));break;case 4:fe=C[q+1],ge=C[q+2],ye=C[q+3],(fe&192)===128&&(ge&192)===128&&(ye&192)===128&&(Re=(F&15)<<18|(fe&63)<<12|(ge&63)<<6|ye&63,Re>65535&&Re<1114112&&(R=Re))}}R===null?(R=65533,ee=1):R>65535&&(R-=65536,K.push(R>>>10&1023|55296),R=56320|R&1023),K.push(R),q+=ee}return N(K)}var z=4096;function N(C){var I=C.length;if(I<=z)return String.fromCharCode.apply(String,C);for(var B="",K=0;K<I;)B+=String.fromCharCode.apply(String,C.slice(K,K+=z));return B}function J(C,I,B){var K="";B=Math.min(C.length,B);for(var q=I;q<B;++q)K+=String.fromCharCode(C[q]&127);return K}function X(C,I,B){var K="";B=Math.min(C.length,B);for(var q=I;q<B;++q)K+=String.fromCharCode(C[q]);return K}function Q(C,I,B){var K=C.length;(!I||I<0)&&(I=0),(!B||B<0||B>K)&&(B=K);for(var q="",F=I;F<B;++F)q+=yt[C[F]];return q}function ce(C,I,B){for(var K=C.slice(I,B),q="",F=0;F<K.length-1;F+=2)q+=String.fromCharCode(K[F]+K[F+1]*256);return q}s.prototype.slice=function(C,I){var B=this.length;C=~~C,I=I===void 0?B:~~I,C<0?(C+=B,C<0&&(C=0)):C>B&&(C=B),I<0?(I+=B,I<0&&(I=0)):I>B&&(I=B),I<C&&(I=C);var K=this.subarray(C,I);return Object.setPrototypeOf(K,s.prototype),K};function H(C,I,B){if(C%1!==0||C<0)throw new RangeError("offset is not uint");if(C+I>B)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(C,I,B){C=C>>>0,I=I>>>0,B||H(C,I,this.length);for(var K=this[C],q=1,F=0;++F<I&&(q*=256);)K+=this[C+F]*q;return K},s.prototype.readUintBE=s.prototype.readUIntBE=function(C,I,B){C=C>>>0,I=I>>>0,B||H(C,I,this.length);for(var K=this[C+--I],q=1;I>0&&(q*=256);)K+=this[C+--I]*q;return K},s.prototype.readUint8=s.prototype.readUInt8=function(C,I){return C=C>>>0,I||H(C,1,this.length),this[C]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(C,I){return C=C>>>0,I||H(C,2,this.length),this[C]|this[C+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(C,I){return C=C>>>0,I||H(C,2,this.length),this[C]<<8|this[C+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(C,I){return C=C>>>0,I||H(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(C,I){return C=C>>>0,I||H(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},s.prototype.readIntLE=function(C,I,B){C=C>>>0,I=I>>>0,B||H(C,I,this.length);for(var K=this[C],q=1,F=0;++F<I&&(q*=256);)K+=this[C+F]*q;return q*=128,K>=q&&(K-=Math.pow(2,8*I)),K},s.prototype.readIntBE=function(C,I,B){C=C>>>0,I=I>>>0,B||H(C,I,this.length);for(var K=I,q=1,F=this[C+--K];K>0&&(q*=256);)F+=this[C+--K]*q;return q*=128,F>=q&&(F-=Math.pow(2,8*I)),F},s.prototype.readInt8=function(C,I){return C=C>>>0,I||H(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},s.prototype.readInt16LE=function(C,I){C=C>>>0,I||H(C,2,this.length);var B=this[C]|this[C+1]<<8;return B&32768?B|4294901760:B},s.prototype.readInt16BE=function(C,I){C=C>>>0,I||H(C,2,this.length);var B=this[C+1]|this[C]<<8;return B&32768?B|4294901760:B},s.prototype.readInt32LE=function(C,I){return C=C>>>0,I||H(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},s.prototype.readInt32BE=function(C,I){return C=C>>>0,I||H(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},s.prototype.readFloatLE=function(C,I){return C=C>>>0,I||H(C,4,this.length),t.read(this,C,!0,23,4)},s.prototype.readFloatBE=function(C,I){return C=C>>>0,I||H(C,4,this.length),t.read(this,C,!1,23,4)},s.prototype.readDoubleLE=function(C,I){return C=C>>>0,I||H(C,8,this.length),t.read(this,C,!0,52,8)},s.prototype.readDoubleBE=function(C,I){return C=C>>>0,I||H(C,8,this.length),t.read(this,C,!1,52,8)};function de(C,I,B,K,q,F){if(!s.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(I>q||I<F)throw new RangeError('"value" argument is out of bounds');if(B+K>C.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(C,I,B,K){if(C=+C,I=I>>>0,B=B>>>0,!K){var q=Math.pow(2,8*B)-1;de(this,C,I,B,q,0)}var F=1,R=0;for(this[I]=C&255;++R<B&&(F*=256);)this[I+R]=C/F&255;return I+B},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(C,I,B,K){if(C=+C,I=I>>>0,B=B>>>0,!K){var q=Math.pow(2,8*B)-1;de(this,C,I,B,q,0)}var F=B-1,R=1;for(this[I+F]=C&255;--F>=0&&(R*=256);)this[I+F]=C/R&255;return I+B},s.prototype.writeUint8=s.prototype.writeUInt8=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,1,255,0),this[I]=C&255,I+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,2,65535,0),this[I]=C&255,this[I+1]=C>>>8,I+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,2,65535,0),this[I]=C>>>8,this[I+1]=C&255,I+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,4,4294967295,0),this[I+3]=C>>>24,this[I+2]=C>>>16,this[I+1]=C>>>8,this[I]=C&255,I+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,4,4294967295,0),this[I]=C>>>24,this[I+1]=C>>>16,this[I+2]=C>>>8,this[I+3]=C&255,I+4},s.prototype.writeIntLE=function(C,I,B,K){if(C=+C,I=I>>>0,!K){var q=Math.pow(2,8*B-1);de(this,C,I,B,q-1,-q)}var F=0,R=1,ee=0;for(this[I]=C&255;++F<B&&(R*=256);)C<0&&ee===0&&this[I+F-1]!==0&&(ee=1),this[I+F]=(C/R>>0)-ee&255;return I+B},s.prototype.writeIntBE=function(C,I,B,K){if(C=+C,I=I>>>0,!K){var q=Math.pow(2,8*B-1);de(this,C,I,B,q-1,-q)}var F=B-1,R=1,ee=0;for(this[I+F]=C&255;--F>=0&&(R*=256);)C<0&&ee===0&&this[I+F+1]!==0&&(ee=1),this[I+F]=(C/R>>0)-ee&255;return I+B},s.prototype.writeInt8=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,1,127,-128),C<0&&(C=255+C+1),this[I]=C&255,I+1},s.prototype.writeInt16LE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,2,32767,-32768),this[I]=C&255,this[I+1]=C>>>8,I+2},s.prototype.writeInt16BE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,2,32767,-32768),this[I]=C>>>8,this[I+1]=C&255,I+2},s.prototype.writeInt32LE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,4,2147483647,-2147483648),this[I]=C&255,this[I+1]=C>>>8,this[I+2]=C>>>16,this[I+3]=C>>>24,I+4},s.prototype.writeInt32BE=function(C,I,B){return C=+C,I=I>>>0,B||de(this,C,I,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[I]=C>>>24,this[I+1]=C>>>16,this[I+2]=C>>>8,this[I+3]=C&255,I+4};function Se(C,I,B,K,q,F){if(B+K>C.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("Index out of range")}function te(C,I,B,K,q){return I=+I,B=B>>>0,q||Se(C,I,B,4),t.write(C,I,B,K,23,4),B+4}s.prototype.writeFloatLE=function(C,I,B){return te(this,C,I,!0,B)},s.prototype.writeFloatBE=function(C,I,B){return te(this,C,I,!1,B)};function ue(C,I,B,K,q){return I=+I,B=B>>>0,q||Se(C,I,B,8),t.write(C,I,B,K,52,8),B+8}s.prototype.writeDoubleLE=function(C,I,B){return ue(this,C,I,!0,B)},s.prototype.writeDoubleBE=function(C,I,B){return ue(this,C,I,!1,B)},s.prototype.copy=function(C,I,B,K){if(!s.isBuffer(C))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),I>=C.length&&(I=C.length),I||(I=0),K>0&&K<B&&(K=B),K===B||C.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),C.length-I<K-B&&(K=C.length-I+B);var q=K-B;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(I,B,K):Uint8Array.prototype.set.call(C,this.subarray(B,K),I),q},s.prototype.fill=function(C,I,B,K){if(typeof C=="string"){if(typeof I=="string"?(K=I,I=0,B=this.length):typeof B=="string"&&(K=B,B=this.length),K!==void 0&&typeof K!="string")throw new TypeError("encoding must be a string");if(typeof K=="string"&&!s.isEncoding(K))throw new TypeError("Unknown encoding: "+K);if(C.length===1){var q=C.charCodeAt(0);(K==="utf8"&&q<128||K==="latin1")&&(C=q)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(I<0||this.length<I||this.length<B)throw new RangeError("Out of range index");if(B<=I)return this;I=I>>>0,B=B===void 0?this.length:B>>>0,C||(C=0);var F;if(typeof C=="number")for(F=I;F<B;++F)this[F]=C;else{var R=s.isBuffer(C)?C:s.from(C,K),ee=R.length;if(ee===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(F=0;F<B-I;++F)this[F+I]=R[F%ee]}return this};var ve=/[^+/0-9A-Za-z-_]/g;function se(C){if(C=C.split("=")[0],C=C.trim().replace(ve,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function we(C,I){I=I||1/0;for(var B,K=C.length,q=null,F=[],R=0;R<K;++R){if(B=C.charCodeAt(R),B>55295&&B<57344){if(!q){if(B>56319){(I-=3)>-1&&F.push(239,191,189);continue}else if(R+1===K){(I-=3)>-1&&F.push(239,191,189);continue}q=B;continue}if(B<56320){(I-=3)>-1&&F.push(239,191,189),q=B;continue}B=(q-55296<<10|B-56320)+65536}else q&&(I-=3)>-1&&F.push(239,191,189);if(q=null,B<128){if((I-=1)<0)break;F.push(B)}else if(B<2048){if((I-=2)<0)break;F.push(B>>6|192,B&63|128)}else if(B<65536){if((I-=3)<0)break;F.push(B>>12|224,B>>6&63|128,B&63|128)}else if(B<1114112){if((I-=4)<0)break;F.push(B>>18|240,B>>12&63|128,B>>6&63|128,B&63|128)}else throw new Error("Invalid code point")}return F}function pe(C){for(var I=[],B=0;B<C.length;++B)I.push(C.charCodeAt(B)&255);return I}function Ee(C,I){for(var B,K,q,F=[],R=0;R<C.length&&!((I-=2)<0);++R)B=C.charCodeAt(R),K=B>>8,q=B%256,F.push(q),F.push(K);return F}function Oe(C){return e.toByteArray(se(C))}function Pe(C,I,B,K){for(var q=0;q<K&&!(q+B>=I.length||q>=C.length);++q)I[q+B]=C[q];return q}function Xe(C,I){return C instanceof I||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===I.name}function $(C){return C!==C}var yt=(function(){for(var C="0123456789abcdef",I=new Array(256),B=0;B<16;++B)for(var K=B*16,q=0;q<16;++q)I[K+q]=C[B]+C[q];return I})()})(WB);var CE=WB,$y=CE.Buffer,Is={},Ls;for(Ls in CE)CE.hasOwnProperty(Ls)&&(Ls==="SlowBuffer"||Ls==="Buffer"||(Is[Ls]=CE[Ls]));var Ky=Is.Buffer={};for(Ls in $y)$y.hasOwnProperty(Ls)&&(Ls==="allocUnsafe"||Ls==="allocUnsafeSlow"||(Ky[Ls]=$y[Ls]));Is.Buffer.prototype=$y.prototype;(!Ky.from||Ky.from===Uint8Array.from)&&(Ky.from=function(r,e,t){if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof r);if(r&&typeof r.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);return $y(r,e,t)});Ky.alloc||(Ky.alloc=function(r,e,t){if(typeof r!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof r);if(r<0||r>=2*(1<<30))throw new RangeError('The value "'+r+'" is invalid for option "size"');var n=$y(r);return!e||e.length===0?n.fill(0):typeof t=="string"?n.fill(e,t):n.fill(e),n});if(!Is.kStringMaxLength)try{Is.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Is.constants||(Is.constants={MAX_LENGTH:Is.kMaxLength},Is.kStringMaxLength&&(Is.constants.MAX_STRING_LENGTH=Is.kStringMaxLength));var dd=Is,YB={},eq="\uFEFF";YB.PrependBOM=$B;function $B(r,e){this.encoder=r,this.addBOM=!0}$B.prototype.write=function(r){return this.addBOM&&(r=eq+r,this.addBOM=!1),this.encoder.write(r)};$B.prototype.end=function(){return this.encoder.end()};YB.StripBOM=KB;function KB(r,e){this.decoder=r,this.pass=!1,this.options=e||{}}KB.prototype.write=function(r){var e=this.decoder.write(r);return this.pass||!e||(e[0]===eq&&(e=e.slice(1),typeof this.options.stripBOM=="function"&&this.options.stripBOM()),this.pass=!0),e};KB.prototype.end=function(){return this.decoder.end()};var SPe=typeof Object.hasOwn>"u"?Function.call.bind(Object.prototype.hasOwnProperty):Object.hasOwn;function APe(r,e){for(var t in e)SPe(e,t)&&(r[t]=e[t])}var tq=APe,t$={},z4={},U4={exports:{}};var n$;function MPe(){return n$||(n$=1,(function(r,e){var t=WB,n=t.Buffer;function i(a,s){for(var l in a)s[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=o);function o(a,s,l){return n(a,s,l)}o.prototype=Object.create(n.prototype),i(n,o),o.from=function(a,s,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,l)},o.alloc=function(a,s,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var c=n(a);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(a)}})(U4,U4.exports)),U4.exports}var r$;function PPe(){if(r$)return z4;r$=1;var r=MPe().Buffer,e=r.isEncoding||function(y){switch(y=""+y,y&&y.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(y){if(!y)return"utf8";for(var b;;)switch(y){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return y;default:if(b)return;y=(""+y).toLowerCase(),b=!0}}function n(y){var b=t(y);if(typeof b!="string"&&(r.isEncoding===e||!e(y)))throw new Error("Unknown encoding: "+y);return b||y}z4.StringDecoder=i;function i(y){this.encoding=n(y);var b;switch(this.encoding){case"utf16le":this.text=h,this.end=d,b=4;break;case"utf8":this.fillLast=l,b=4;break;case"base64":this.text=p,this.end=f,b=3;break;default:this.write=m,this.end=g;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(b)}i.prototype.write=function(y){if(y.length===0)return"";var b,v;if(this.lastNeed){if(b=this.fillLast(y),b===void 0)return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v<y.length?b?b+this.text(y,v):this.text(y,v):b||""},i.prototype.end=u,i.prototype.text=c,i.prototype.fillLast=function(y){if(this.lastNeed<=y.length)return y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,y.length),this.lastNeed-=y.length};function o(y){return y<=127?0:y>>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function a(y,b,v){var x=b.length-1;if(x<v)return 0;var w=o(b[x]);return w>=0?(w>0&&(y.lastNeed=w-1),w):--x<v||w===-2?0:(w=o(b[x]),w>=0?(w>0&&(y.lastNeed=w-2),w):--x<v||w===-2?0:(w=o(b[x]),w>=0?(w>0&&(w===2?w=0:y.lastNeed=w-3),w):0))}function s(y,b,v){if((b[0]&192)!==128)return y.lastNeed=0,"\uFFFD";if(y.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return y.lastNeed=1,"\uFFFD";if(y.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return y.lastNeed=2,"\uFFFD"}}function l(y){var b=this.lastTotal-this.lastNeed,v=s(this,y);if(v!==void 0)return v;if(this.lastNeed<=y.length)return y.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,b,0,y.length),this.lastNeed-=y.length}function c(y,b){var v=a(this,y,b);if(!this.lastNeed)return y.toString("utf8",b);this.lastTotal=v;var x=y.length-(v-this.lastNeed);return y.copy(this.lastChar,0,x),y.toString("utf8",b,x)}function u(y){var b=y&&y.length?this.write(y):"";return this.lastNeed?b+"\uFFFD":b}function h(y,b){if((y.length-b)%2===0){var v=y.toString("utf16le",b);if(v){var x=v.charCodeAt(v.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",b,y.length-1)}function d(y){var b=y&&y.length?this.write(y):"";if(this.lastNeed){var v=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,v)}return b}function p(y,b){var v=(y.length-b)%3;return v===0?y.toString("base64",b):(this.lastNeed=3-v,this.lastTotal=3,v===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",b,y.length-v))}function f(y){var b=y&&y.length?this.write(y):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function m(y){return y.toString(this.encoding)}function g(y){return y&&y.length?this.write(y):""}return z4}var j4,i$;function EPe(){if(i$)return j4;i$=1;var r=dd.Buffer;j4={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:e};function e(c,u){this.enc=c.encodingName,this.bomAware=c.bomAware,this.enc==="base64"?this.encoder=o:this.enc==="utf8"?this.encoder=l:this.enc==="cesu8"&&(this.enc="utf8",this.encoder=a,r.from("eda0bdedb2a9","hex").toString()!=="\u{1F4A9}"&&(this.decoder=s,this.defaultCharUnicode=u.defaultCharUnicode))}e.prototype.encoder=i,e.prototype.decoder=n;var t=PPe().StringDecoder;function n(c,u){this.decoder=new t(u.enc)}n.prototype.write=function(c){return r.isBuffer(c)||(c=r.from(c)),this.decoder.write(c)},n.prototype.end=function(){return this.decoder.end()};function i(c,u){this.enc=u.enc}i.prototype.write=function(c){return r.from(c,this.enc)},i.prototype.end=function(){};function o(c,u){this.prevStr=""}o.prototype.write=function(c){c=this.prevStr+c;var u=c.length-c.length%4;return this.prevStr=c.slice(u),c=c.slice(0,u),r.from(c,"base64")},o.prototype.end=function(){return r.from(this.prevStr,"base64")};function a(c,u){}a.prototype.write=function(c){for(var u=r.alloc(c.length*3),h=0,d=0;d<c.length;d++){var p=c.charCodeAt(d);p<128?u[h++]=p:p<2048?(u[h++]=192+(p>>>6),u[h++]=128+(p&63)):(u[h++]=224+(p>>>12),u[h++]=128+(p>>>6&63),u[h++]=128+(p&63))}return u.slice(0,h)},a.prototype.end=function(){};function s(c,u){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=u.defaultCharUnicode}s.prototype.write=function(c){for(var u=this.acc,h=this.contBytes,d=this.accBytes,p="",f=0;f<c.length;f++){var m=c[f];(m&192)!==128?(h>0&&(p+=this.defaultCharUnicode,h=0),m<128?p+=String.fromCharCode(m):m<224?(u=m&31,h=1,d=1):m<240?(u=m&15,h=2,d=1):p+=this.defaultCharUnicode):h>0?(u=u<<6|m&63,h--,d++,h===0&&(d===2&&u<128&&u>0?p+=this.defaultCharUnicode:d===3&&u<2048?p+=this.defaultCharUnicode:p+=String.fromCharCode(u))):p+=this.defaultCharUnicode}return this.acc=u,this.contBytes=h,this.accBytes=d,p},s.prototype.end=function(){var c=0;return this.contBytes>0&&(c+=this.defaultCharUnicode),c};function l(c,u){this.highSurrogate=""}return l.prototype.write=function(c){if(this.highSurrogate&&(c=this.highSurrogate+c,this.highSurrogate=""),c.length>0){var u=c.charCodeAt(c.length-1);u>=55296&&u<56320&&(this.highSurrogate=c[c.length-1],c=c.slice(0,c.length-1))}return r.from(c,this.enc)},l.prototype.end=function(){if(this.highSurrogate){var c=this.highSurrogate;return this.highSurrogate="",r.from(c,this.enc)}},j4}var Ku={},o$;function CPe(){if(o$)return Ku;o$=1;var r=dd.Buffer;Ku._utf32=e;function e(c,u){this.iconv=u,this.bomAware=!0,this.isLE=c.isLE}Ku.utf32le={type:"_utf32",isLE:!0},Ku.utf32be={type:"_utf32",isLE:!1},Ku.ucs4le="utf32le",Ku.ucs4be="utf32be",e.prototype.encoder=t,e.prototype.decoder=n;function t(c,u){this.isLE=u.isLE,this.highSurrogate=0}t.prototype.write=function(c){for(var u=r.from(c,"ucs2"),h=r.alloc(u.length*2),d=this.isLE?h.writeUInt32LE:h.writeUInt32BE,p=0,f=0;f<u.length;f+=2){var m=u.readUInt16LE(f),g=m>=55296&&m<56320,y=m>=56320&&m<57344;if(this.highSurrogate)if(g||!y)d.call(h,this.highSurrogate,p),p+=4;else{var b=(this.highSurrogate-55296<<10|m-56320)+65536;d.call(h,b,p),p+=4,this.highSurrogate=0;continue}g?this.highSurrogate=m:(d.call(h,m,p),p+=4,this.highSurrogate=0)}return p<h.length&&(h=h.slice(0,p)),h},t.prototype.end=function(){if(this.highSurrogate){var c=r.alloc(4);return this.isLE?c.writeUInt32LE(this.highSurrogate,0):c.writeUInt32BE(this.highSurrogate,0),this.highSurrogate=0,c}};function n(c,u){this.isLE=u.isLE,this.badChar=u.iconv.defaultCharUnicode.charCodeAt(0),this.overflow=[]}n.prototype.write=function(c){if(c.length===0)return"";var u=0,h=0,d=r.alloc(c.length+4),p=0,f=this.isLE,m=this.overflow,g=this.badChar;if(m.length>0){for(;u<c.length&&m.length<4;u++)m.push(c[u]);m.length===4&&(f?h=m[u]|m[u+1]<<8|m[u+2]<<16|m[u+3]<<24:h=m[u+3]|m[u+2]<<8|m[u+1]<<16|m[u]<<24,m.length=0,p=i(d,p,h,g))}for(;u<c.length-3;u+=4)f?h=c[u]|c[u+1]<<8|c[u+2]<<16|c[u+3]<<24:h=c[u+3]|c[u+2]<<8|c[u+1]<<16|c[u]<<24,p=i(d,p,h,g);for(;u<c.length;u++)m.push(c[u]);return d.slice(0,p).toString("ucs2")};function i(c,u,h,d){if((h<0||h>1114111)&&(h=d),h>=65536){h-=65536;var p=55296|h>>10;c[u++]=p&255,c[u++]=p>>8;var h=56320|h&1023}return c[u++]=h&255,c[u++]=h>>8,u}n.prototype.end=function(){this.overflow.length=0},Ku.utf32=o,Ku.ucs4="utf32";function o(c,u){this.iconv=u}o.prototype.encoder=a,o.prototype.decoder=s;function a(c,u){c=c||{},c.addBOM===void 0&&(c.addBOM=!0),this.encoder=u.iconv.getEncoder(c.defaultEncoding||"utf-32le",c)}a.prototype.write=function(c){return this.encoder.write(c)},a.prototype.end=function(){return this.encoder.end()};function s(c,u){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=c||{},this.iconv=u.iconv}s.prototype.write=function(c){if(!this.decoder){if(this.initialBufs.push(c),this.initialBufsLen+=c.length,this.initialBufsLen<32)return"";var u=l(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(u,this.options);for(var h="",d=0;d<this.initialBufs.length;d++)h+=this.decoder.write(this.initialBufs[d]);return this.initialBufs.length=this.initialBufsLen=0,h}return this.decoder.write(c)},s.prototype.end=function(){if(!this.decoder){var c=l(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(c,this.options);for(var u="",h=0;h<this.initialBufs.length;h++)u+=this.decoder.write(this.initialBufs[h]);var d=this.decoder.end();return d&&(u+=d),this.initialBufs.length=this.initialBufsLen=0,u}return this.decoder.end()};function l(c,u){var h=[],d=0,p=0,f=0,m=0,g=0;e:for(var y=0;y<c.length;y++)for(var b=c[y],v=0;v<b.length;v++)if(h.push(b[v]),h.length===4){if(d===0){if(h[0]===255&&h[1]===254&&h[2]===0&&h[3]===0)return"utf-32le";if(h[0]===0&&h[1]===0&&h[2]===254&&h[3]===255)return"utf-32be"}if((h[0]!==0||h[1]>16)&&f++,(h[3]!==0||h[2]>16)&&p++,h[0]===0&&h[1]===0&&(h[2]!==0||h[3]!==0)&&g++,(h[0]!==0||h[1]!==0)&&h[2]===0&&h[3]===0&&m++,h.length=0,d++,d>=100)break e}return g-f>m-p?"utf-32be":g-f<m-p?"utf-32le":u||"utf-32le"}return Ku}var wE={},a$;function TPe(){if(a$)return wE;a$=1;var r=dd.Buffer;wE.utf16be=e;function e(){}e.prototype.encoder=t,e.prototype.decoder=n,e.prototype.bomAware=!0;function t(){}t.prototype.write=function(l){for(var c=r.from(l,"ucs2"),u=0;u<c.length;u+=2){var h=c[u];c[u]=c[u+1],c[u+1]=h}return c},t.prototype.end=function(){};function n(){this.overflowByte=-1}n.prototype.write=function(l){if(l.length==0)return"";var c=r.alloc(l.length+1),u=0,h=0;for(this.overflowByte!==-1&&(c[0]=l[0],c[1]=this.overflowByte,u=1,h=2);u<l.length-1;u+=2,h+=2)c[h]=l[u+1],c[h+1]=l[u];return this.overflowByte=u==l.length-1?l[l.length-1]:-1,c.slice(0,h).toString("ucs2")},n.prototype.end=function(){this.overflowByte=-1},wE.utf16=i;function i(l,c){this.iconv=c}i.prototype.encoder=o,i.prototype.decoder=a;function o(l,c){l=l||{},l.addBOM===void 0&&(l.addBOM=!0),this.encoder=c.iconv.getEncoder("utf-16le",l)}o.prototype.write=function(l){return this.encoder.write(l)},o.prototype.end=function(){return this.encoder.end()};function a(l,c){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=l||{},this.iconv=c.iconv}a.prototype.write=function(l){if(!this.decoder){if(this.initialBufs.push(l),this.initialBufsLen+=l.length,this.initialBufsLen<16)return"";var c=s(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(c,this.options);for(var u="",h=0;h<this.initialBufs.length;h++)u+=this.decoder.write(this.initialBufs[h]);return this.initialBufs.length=this.initialBufsLen=0,u}return this.decoder.write(l)},a.prototype.end=function(){if(!this.decoder){var l=s(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(l,this.options);for(var c="",u=0;u<this.initialBufs.length;u++)c+=this.decoder.write(this.initialBufs[u]);var h=this.decoder.end();return h&&(c+=h),this.initialBufs.length=this.initialBufsLen=0,c}return this.decoder.end()};function s(l,c){var u=[],h=0,d=0,p=0;e:for(var f=0;f<l.length;f++)for(var m=l[f],g=0;g<m.length;g++)if(u.push(m[g]),u.length===2){if(h===0){if(u[0]===255&&u[1]===254)return"utf-16le";if(u[0]===254&&u[1]===255)return"utf-16be"}if(u[0]===0&&u[1]!==0&&p++,u[0]!==0&&u[1]===0&&d++,u.length=0,h++,h>=100)break e}return p>d?"utf-16be":p<d?"utf-16le":c||"utf-16le"}return wE}var c_={},s$;function kPe(){if(s$)return c_;s$=1;var r=dd.Buffer;c_.utf7=e,c_.unicode11utf7="utf7";function e(m,g){this.iconv=g}e.prototype.encoder=n,e.prototype.decoder=i,e.prototype.bomAware=!0;var t=/[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;function n(m,g){this.iconv=g.iconv}n.prototype.write=function(m){return r.from(m.replace(t,(function(g){return"+"+(g==="+"?"":this.iconv.encode(g,"utf16-be").toString("base64").replace(/=+$/,""))+"-"}).bind(this)))},n.prototype.end=function(){};function i(m,g){this.iconv=g.iconv,this.inBase64=!1,this.base64Accum=""}for(var o=/[A-Za-z0-9\/+]/,a=[],s=0;s<256;s++)a[s]=o.test(String.fromCharCode(s));var l=43,c=45,u=38;i.prototype.write=function(m){for(var g="",y=0,b=this.inBase64,v=this.base64Accum,x=0;x<m.length;x++)if(!b)m[x]==l&&(g+=this.iconv.decode(m.slice(y,x),"ascii"),y=x+1,b=!0);else if(!a[m[x]]){if(x==y&&m[x]==c)g+="+";else{var w=v+this.iconv.decode(m.slice(y,x),"ascii");g+=this.iconv.decode(r.from(w,"base64"),"utf16-be")}m[x]!=c&&x--,y=x+1,b=!1,v=""}if(!b)g+=this.iconv.decode(m.slice(y),"ascii");else{var w=v+this.iconv.decode(m.slice(y),"ascii"),_=w.length-w.length%8;v=w.slice(_),w=w.slice(0,_),g+=this.iconv.decode(r.from(w,"base64"),"utf16-be")}return this.inBase64=b,this.base64Accum=v,g},i.prototype.end=function(){var m="";return this.inBase64&&this.base64Accum.length>0&&(m=this.iconv.decode(r.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",m},c_.utf7imap=h;function h(m,g){this.iconv=g}h.prototype.encoder=d,h.prototype.decoder=p,h.prototype.bomAware=!0;function d(m,g){this.iconv=g.iconv,this.inBase64=!1,this.base64Accum=r.alloc(6),this.base64AccumIdx=0}d.prototype.write=function(m){for(var g=this.inBase64,y=this.base64Accum,b=this.base64AccumIdx,v=r.alloc(m.length*5+10),x=0,w=0;w<m.length;w++){var _=m.charCodeAt(w);_>=32&&_<=126?(g&&(b>0&&(x+=v.write(y.slice(0,b).toString("base64").replace(/\//g,",").replace(/=+$/,""),x),b=0),v[x++]=c,g=!1),g||(v[x++]=_,_===u&&(v[x++]=c))):(g||(v[x++]=u,g=!0),g&&(y[b++]=_>>8,y[b++]=_&255,b==y.length&&(x+=v.write(y.toString("base64").replace(/\//g,","),x),b=0)))}return this.inBase64=g,this.base64AccumIdx=b,v.slice(0,x)},d.prototype.end=function(){var m=r.alloc(10),g=0;return this.inBase64&&(this.base64AccumIdx>0&&(g+=m.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),g),this.base64AccumIdx=0),m[g++]=c,this.inBase64=!1),m.slice(0,g)};function p(m,g){this.iconv=g.iconv,this.inBase64=!1,this.base64Accum=""}var f=a.slice();return f[44]=!0,p.prototype.write=function(m){for(var g="",y=0,b=this.inBase64,v=this.base64Accum,x=0;x<m.length;x++)if(!b)m[x]==u&&(g+=this.iconv.decode(m.slice(y,x),"ascii"),y=x+1,b=!0);else if(!f[m[x]]){if(x==y&&m[x]==c)g+="&";else{var w=v+this.iconv.decode(m.slice(y,x),"ascii").replace(/,/g,"/");g+=this.iconv.decode(r.from(w,"base64"),"utf16-be")}m[x]!=c&&x--,y=x+1,b=!1,v=""}if(!b)g+=this.iconv.decode(m.slice(y),"ascii");else{var w=v+this.iconv.decode(m.slice(y),"ascii").replace(/,/g,"/"),_=w.length-w.length%8;v=w.slice(_),w=w.slice(0,_),g+=this.iconv.decode(r.from(w,"base64"),"utf16-be")}return this.inBase64=b,this.base64Accum=v,g},p.prototype.end=function(){var m="";return this.inBase64&&this.base64Accum.length>0&&(m=this.iconv.decode(r.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",m},c_}var V4={},l$;function IPe(){if(l$)return V4;l$=1;var r=dd.Buffer;V4._sbcs=e;function e(i,o){if(!i)throw new Error("SBCS codec is called without the data.");if(!i.chars||i.chars.length!==128&&i.chars.length!==256)throw new Error("Encoding '"+i.type+"' has incorrect 'chars' (must be of len 128 or 256)");if(i.chars.length===128){for(var a="",s=0;s<128;s++)a+=String.fromCharCode(s);i.chars=a+i.chars}this.decodeBuf=r.from(i.chars,"ucs2");for(var l=r.alloc(65536,o.defaultCharSingleByte.charCodeAt(0)),s=0;s<i.chars.length;s++)l[i.chars.charCodeAt(s)]=s;this.encodeBuf=l}e.prototype.encoder=t,e.prototype.decoder=n;function t(i,o){this.encodeBuf=o.encodeBuf}t.prototype.write=function(i){for(var o=r.alloc(i.length),a=0;a<i.length;a++)o[a]=this.encodeBuf[i.charCodeAt(a)];return o},t.prototype.end=function(){};function n(i,o){this.decodeBuf=o.decodeBuf}return n.prototype.write=function(i){for(var o=this.decodeBuf,a=r.alloc(i.length*2),s=0,l=0,c=0;c<i.length;c++)s=i[c]*2,l=c*2,a[l]=o[s],a[l+1]=o[s+1];return a.toString("ucs2")},n.prototype.end=function(){},V4}var c$,u$;function LPe(){return u$||(u$=1,c$={10029:"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7"},808:"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},cp720:{type:"_sbcs",chars:"\x80\x81\xE9\xE2\x84\xE0\x86\xE7\xEA\xEB\xE8\xEF\xEE\x8D\x8E\x8F\x90\u0651\u0652\xF4\xA4\u0640\xFB\xF9\u0621\u0622\u0623\u0624\xA3\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0636\u0637\u0638\u0639\u063A\u0641\xB5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u2261\u064B\u064C\u064D\u064E\u064F\u0650\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620",1e4:"macroman",10006:"macgreek",10007:"maccyrillic",10079:"maciceland",10081:"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r",20866:"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u",21866:"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}),c$}var h$,d$;function OPe(){return d$||(d$=1,h$={437:"cp437",737:"cp737",775:"cp775",850:"cp850",852:"cp852",855:"cp855",856:"cp856",857:"cp857",858:"cp858",860:"cp860",861:"cp861",862:"cp862",863:"cp863",864:"cp864",865:"cp865",866:"cp866",869:"cp869",874:"windows874",922:"cp922",1046:"cp1046",1124:"cp1124",1125:"cp1125",1129:"cp1129",1133:"cp1133",1161:"cp1161",1162:"cp1162",1163:"cp1163",1250:"windows1250",1251:"windows1251",1252:"windows1252",1253:"windows1253",1254:"windows1254",1255:"windows1255",1256:"windows1256",1257:"windows1257",1258:"windows1258",28591:"iso88591",28592:"iso88592",28593:"iso88593",28594:"iso88594",28595:"iso88595",28596:"iso88596",28597:"iso88597",28598:"iso88598",28599:"iso88599",28600:"iso885910",28601:"iso885911",28603:"iso885913",28604:"iso885914",28605:"iso885915",28606:"iso885916",windows874:{type:"_sbcs",chars:"\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},win874:"windows874",cp874:"windows874",windows1250:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},win1250:"windows1250",cp1250:"windows1250",windows1251:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},win1251:"windows1251",cp1251:"windows1251",windows1252:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},win1252:"windows1252",cp1252:"windows1252",windows1253:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},win1253:"windows1253",cp1253:"windows1253",windows1254:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},win1254:"windows1254",cp1254:"windows1254",windows1255:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},win1255:"windows1255",cp1255:"windows1255",windows1256:{type:"_sbcs",chars:"\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2"},win1256:"windows1256",cp1256:"windows1256",windows1257:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9"},win1257:"windows1257",cp1257:"windows1257",windows1258:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},win1258:"windows1258",cp1258:"windows1258",iso88591:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28591:"iso88591",iso88592:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},cp28592:"iso88592",iso88593:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9"},cp28593:"iso88593",iso88594:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9"},cp28594:"iso88594",iso88595:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},cp28595:"iso88595",iso88596:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},cp28596:"iso88596",iso88597:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},cp28597:"iso88597",iso88598:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},cp28598:"iso88598",iso88599:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},cp28599:"iso88599",iso885910:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138"},cp28600:"iso885910",iso885911:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},cp28601:"iso885911",iso885913:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019"},cp28603:"iso885913",iso885914:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF"},cp28604:"iso885914",iso885915:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28605:"iso885915",iso885916:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF"},cp28606:"iso885916",cp437:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm437:"cp437",csibm437:"cp437",cp737:{type:"_sbcs",chars:"\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm737:"cp737",csibm737:"cp737",cp775:{type:"_sbcs",chars:"\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm775:"cp775",csibm775:"cp775",cp850:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm850:"cp850",csibm850:"cp850",cp852:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0"},ibm852:"cp852",csibm852:"cp852",cp855:{type:"_sbcs",chars:"\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0"},ibm855:"cp855",csibm855:"cp855",cp856:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm856:"cp856",csibm856:"cp856",cp857:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm857:"cp857",csibm857:"cp857",cp858:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm858:"cp858",csibm858:"cp858",cp860:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm860:"cp860",csibm860:"cp860",cp861:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm861:"cp861",csibm861:"cp861",cp862:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm862:"cp862",csibm862:"cp862",cp863:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm863:"cp863",csibm863:"cp863",cp864:{type:"_sbcs",chars:`\0\x07\b
  3980. \v\f\r\x1B !"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0E8D\u0E94\u0E95\u0E96\u0E97\u0E99\u0E9A\u0E9B\u0E9C\u0E9D\u0E9E\u0E9F\u0EA1\u0EA2\u0EA3\u0EA5\u0EA7\u0EAB\u0EAD\u0EAE\uFFFD\uFFFD\uFFFD\u0EAF\u0EB0\u0EB2\u0EB3\u0EB4\u0EB5\u0EB6\u0EB7\u0EB8\u0EB9\u0EBC\u0EB1\u0EBB\u0EBD\uFFFD\uFFFD\uFFFD\u0EC0\u0EC1\u0EC2\u0EC3\u0EC4\u0EC8\u0EC9\u0ECA\u0ECB\u0ECC\u0ECD\u0EC6\uFFFD\u0EDC\u0EDD\u20AD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\uFFFD\uFFFD\xA2\xAC\xA6\uFFFD"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E48\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\u0E49\u0E4A\u0E4B\u20AC\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\xA2\xAC\xA6\xA0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20AC\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u2126\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uFFFD\xA9\u2044\xA4\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\xA2\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},macgreek:{type:"_sbcs",chars:"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\xAD\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\u0387\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\uFFFD"},maciceland:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macroman:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macromania:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u015E\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\u0103\u015F\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\u0162\u0163\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macthai:{type:"_sbcs",chars:"\xAB\xBB\u2026\uF88C\uF88F\uF892\uF895\uF898\uF88B\uF88E\uF891\uF894\uF897\u201C\u201D\uF899\uFFFD\u2022\uF884\uF889\uF885\uF886\uF887\uF888\uF88A\uF88D\uF890\uF893\uF896\u2018\u2019\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFEFF\u200B\u2013\u2014\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u2122\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\xAE\xA9\uFFFD\uFFFD\uFFFD\uFFFD"},macturkish:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\uFFFD\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255A\u255B\u255C\u255D\u255E\u255F\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256A\u256B\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u255D\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u045E\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u040E\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8t:{type:"_sbcs",chars:"\u049B\u0493\u201A\u0492\u201E\u2026\u2020\u2021\uFFFD\u2030\u04B3\u2039\u04B2\u04B7\u04B6\uFFFD\u049A\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04EF\u04EE\u0451\xA4\u04E3\xA6\xA7\uFFFD\uFFFD\uFFFD\xAB\xAC\xAD\xAE\uFFFD\xB0\xB1\xB2\u0401\uFFFD\u04E2\xB6\xB7\uFFFD\u2116\uFFFD\xBB\uFFFD\uFFFD\uFFFD\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\u0587\u0589)(\xBB\xAB\u2014.\u055D,-\u058A\u2026\u055C\u055B\u055E\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053A\u056A\u053B\u056B\u053C\u056C\u053D\u056D\u053E\u056E\u053F\u056F\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054A\u057A\u054B\u057B\u054C\u057C\u054D\u057D\u054E\u057E\u054F\u057F\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055A\uFFFD"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u049A\u04BA\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u049B\u04BB\u045F\xA0\u04B0\u04B1\u04D8\xA4\u04E8\xA6\xA7\u0401\xA9\u0492\xAB\xAC\xAD\xAE\u04AE\xB0\xB1\u0406\u0456\u04E9\xB5\xB6\xB7\u0451\u2116\u0493\xBB\u04D9\u04A2\u04A3\u04AF\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},tcvn:{type:"_sbcs",chars:`\0\xDA\u1EE4\u1EEA\u1EEC\u1EEE\x07\b
  3981. \v\f\r\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0`},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},viscii:{type:"_sbcs",chars:`\0\u1EB2\u1EB4\u1EAA\x07\b
  3982. \v\f\r\u1EF6\u1EF8\x1B\u1EF4 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE`},iso646cn:{type:"_sbcs",chars:`\0\x07\b
  3983. \v\f\r\x1B !"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},iso646jp:{type:"_sbcs",chars:`\0\x07\b
  3984. \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}),h$}var G4={},p$;function DPe(){if(p$)return G4;p$=1;var r=dd.Buffer;G4._dbcs=l;for(var e=-1,t=-2,n=-10,i=-1e3,o=new Array(256),a=-1,s=0;s<256;s++)o[s]=e;function l(d,p){if(this.encodingName=d.encodingName,!d)throw new Error("DBCS codec is called without the data.");if(!d.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var f=d.table();this.decodeTables=[],this.decodeTables[0]=o.slice(0),this.decodeTableSeq=[];for(var m=0;m<f.length;m++)this._addDecodeChunk(f[m]);if(typeof d.gb18030=="function"){this.gb18030=d.gb18030();var g=this.decodeTables.length;this.decodeTables.push(o.slice(0));var y=this.decodeTables.length;this.decodeTables.push(o.slice(0));for(var b=this.decodeTables[0],m=129;m<=254;m++)for(var v=this.decodeTables[i-b[m]],x=48;x<=57;x++){if(v[x]===e)v[x]=i-g;else if(v[x]>i)throw new Error("gb18030 decode tables conflict at byte 2");for(var w=this.decodeTables[i-v[x]],_=129;_<=254;_++){if(w[_]===e)w[_]=i-y;else{if(w[_]===i-y)continue;if(w[_]>i)throw new Error("gb18030 decode tables conflict at byte 3")}for(var A=this.decodeTables[i-w[_]],E=48;E<=57;E++)A[E]===e&&(A[E]=t)}}}this.defaultCharUnicode=p.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var S={};if(d.encodeSkipVals)for(var m=0;m<d.encodeSkipVals.length;m++){var M=d.encodeSkipVals[m];if(typeof M=="number")S[M]=!0;else for(var x=M.from;x<=M.to;x++)S[x]=!0}if(this._fillEncodeTable(0,0,S),d.encodeAdd)for(var T in d.encodeAdd)Object.prototype.hasOwnProperty.call(d.encodeAdd,T)&&this._setEncodeChar(T.charCodeAt(0),d.encodeAdd[T]);this.defCharSB=this.encodeTable[0][p.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===e&&(this.defCharSB=this.encodeTable[0]["?"]),this.defCharSB===e&&(this.defCharSB=63)}l.prototype.encoder=c,l.prototype.decoder=u,l.prototype._getDecodeTrieNode=function(d){for(var p=[];d>0;d>>>=8)p.push(d&255);p.length==0&&p.push(0);for(var f=this.decodeTables[0],m=p.length-1;m>0;m--){var g=f[p[m]];if(g==e)f[p[m]]=i-this.decodeTables.length,this.decodeTables.push(f=o.slice(0));else if(g<=i)f=this.decodeTables[i-g];else throw new Error("Overwrite byte in "+this.encodingName+", addr: "+d.toString(16))}return f},l.prototype._addDecodeChunk=function(d){var p=parseInt(d[0],16),f=this._getDecodeTrieNode(p);p=p&255;for(var m=1;m<d.length;m++){var g=d[m];if(typeof g=="string")for(var y=0;y<g.length;){var b=g.charCodeAt(y++);if(b>=55296&&b<56320){var v=g.charCodeAt(y++);if(v>=56320&&v<57344)f[p++]=65536+(b-55296)*1024+(v-56320);else throw new Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+d[0])}else if(b>4080&&b<=4095){for(var x=4095-b+2,w=[],_=0;_<x;_++)w.push(g.charCodeAt(y++));f[p++]=n-this.decodeTableSeq.length,this.decodeTableSeq.push(w)}else f[p++]=b}else if(typeof g=="number")for(var A=f[p-1]+1,y=0;y<g;y++)f[p++]=A++;else throw new Error("Incorrect type '"+typeof g+"' given in "+this.encodingName+" at chunk "+d[0])}if(p>255)throw new Error("Incorrect chunk in "+this.encodingName+" at addr "+d[0]+": too long"+p)},l.prototype._getEncodeBucket=function(d){var p=d>>8;return this.encodeTable[p]===void 0&&(this.encodeTable[p]=o.slice(0)),this.encodeTable[p]},l.prototype._setEncodeChar=function(d,p){var f=this._getEncodeBucket(d),m=d&255;f[m]<=n?this.encodeTableSeq[n-f[m]][a]=p:f[m]==e&&(f[m]=p)},l.prototype._setEncodeSequence=function(d,p){var f=d[0],m=this._getEncodeBucket(f),g=f&255,y;m[g]<=n?y=this.encodeTableSeq[n-m[g]]:(y={},m[g]!==e&&(y[a]=m[g]),m[g]=n-this.encodeTableSeq.length,this.encodeTableSeq.push(y));for(var b=1;b<d.length-1;b++){var v=y[f];typeof v=="object"?y=v:(y=y[f]={},v!==void 0&&(y[a]=v))}f=d[d.length-1],y[f]=p},l.prototype._fillEncodeTable=function(d,p,f){for(var m=this.decodeTables[d],g=!1,y={},b=0;b<256;b++){var v=m[b],x=p+b;if(!f[x])if(v>=0)this._setEncodeChar(v,x),g=!0;else if(v<=i){var w=i-v;if(!y[w]){var _=x<<8>>>0;this._fillEncodeTable(w,_,f)?g=!0:y[w]=!0}}else v<=n&&(this._setEncodeSequence(this.decodeTableSeq[n-v],x),g=!0)}return g};function c(d,p){this.leadSurrogate=-1,this.seqObj=void 0,this.encodeTable=p.encodeTable,this.encodeTableSeq=p.encodeTableSeq,this.defaultCharSingleByte=p.defCharSB,this.gb18030=p.gb18030}c.prototype.write=function(d){for(var p=r.alloc(d.length*(this.gb18030?4:3)),f=this.leadSurrogate,m=this.seqObj,g=-1,y=0,b=0;;){if(g===-1){if(y==d.length)break;var v=d.charCodeAt(y++)}else{var v=g;g=-1}if(v>=55296&&v<57344)if(v<56320)if(f===-1){f=v;continue}else f=v,v=e;else f!==-1?(v=65536+(f-55296)*1024+(v-56320),f=-1):v=e;else f!==-1&&(g=v,v=e,f=-1);var x=e;if(m!==void 0&&v!=e){var w=m[v];if(typeof w=="object"){m=w;continue}else typeof w=="number"?x=w:w==null&&(w=m[a],w!==void 0&&(x=w,g=v));m=void 0}else if(v>=0){var _=this.encodeTable[v>>8];if(_!==void 0&&(x=_[v&255]),x<=n){m=this.encodeTableSeq[n-x];continue}if(x==e&&this.gb18030){var A=h(this.gb18030.uChars,v);if(A!=-1){var x=this.gb18030.gbChars[A]+(v-this.gb18030.uChars[A]);p[b++]=129+Math.floor(x/12600),x=x%12600,p[b++]=48+Math.floor(x/1260),x=x%1260,p[b++]=129+Math.floor(x/10),x=x%10,p[b++]=48+x;continue}}}x===e&&(x=this.defaultCharSingleByte),x<256?p[b++]=x:x<65536?(p[b++]=x>>8,p[b++]=x&255):x<16777216?(p[b++]=x>>16,p[b++]=x>>8&255,p[b++]=x&255):(p[b++]=x>>>24,p[b++]=x>>>16&255,p[b++]=x>>>8&255,p[b++]=x&255)}return this.seqObj=m,this.leadSurrogate=f,p.slice(0,b)},c.prototype.end=function(){if(!(this.leadSurrogate===-1&&this.seqObj===void 0)){var d=r.alloc(10),p=0;if(this.seqObj){var f=this.seqObj[a];f!==void 0&&(f<256?d[p++]=f:(d[p++]=f>>8,d[p++]=f&255)),this.seqObj=void 0}return this.leadSurrogate!==-1&&(d[p++]=this.defaultCharSingleByte,this.leadSurrogate=-1),d.slice(0,p)}},c.prototype.findIdx=h;function u(d,p){this.nodeIdx=0,this.prevBytes=[],this.decodeTables=p.decodeTables,this.decodeTableSeq=p.decodeTableSeq,this.defaultCharUnicode=p.defaultCharUnicode,this.gb18030=p.gb18030}u.prototype.write=function(d){for(var p=r.alloc(d.length*2),f=this.nodeIdx,m=this.prevBytes,g=this.prevBytes.length,y=-this.prevBytes.length,b,v=0,x=0;v<d.length;v++){var w=v>=0?d[v]:m[v+g],b=this.decodeTables[f][w];if(!(b>=0))if(b===e)b=this.defaultCharUnicode.charCodeAt(0),v=y;else if(b===t){if(v>=3)var _=(d[v-3]-129)*12600+(d[v-2]-48)*1260+(d[v-1]-129)*10+(w-48);else var _=(m[v-3+g]-129)*12600+((v-2>=0?d[v-2]:m[v-2+g])-48)*1260+((v-1>=0?d[v-1]:m[v-1+g])-129)*10+(w-48);var A=h(this.gb18030.gbChars,_);b=this.gb18030.uChars[A]+_-this.gb18030.gbChars[A]}else if(b<=i){f=i-b;continue}else if(b<=n){for(var E=this.decodeTableSeq[n-b],S=0;S<E.length-1;S++)b=E[S],p[x++]=b&255,p[x++]=b>>8;b=E[E.length-1]}else throw new Error("iconv-lite internal error: invalid decoding table value "+b+" at "+f+"/"+w);if(b>=65536){b-=65536;var M=55296|b>>10;p[x++]=M&255,p[x++]=M>>8,b=56320|b&1023}p[x++]=b&255,p[x++]=b>>8,f=0,y=v+1}return this.nodeIdx=f,this.prevBytes=y>=0?Array.prototype.slice.call(d,y):m.slice(y+g).concat(Array.prototype.slice.call(d)),p.slice(0,x).toString("ucs2")},u.prototype.end=function(){for(var d="";this.prevBytes.length>0;){d+=this.defaultCharUnicode;var p=this.prevBytes.slice(1);this.prevBytes=[],this.nodeIdx=0,p.length>0&&(d+=this.write(p))}return this.prevBytes=[],this.nodeIdx=0,d};function h(d,p){if(d[0]>p)return-1;for(var f=0,m=d.length;f<m-1;){var g=f+(m-f+1>>1);d[g]<=p?f=g:m=g}return f}return G4}var RPe=[["0","\0",128],["a1","\uFF61",62],["8140","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7"],["8180","\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["81b8","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["81c8","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["81da","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["81f0","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["81fc","\u25EF"],["824f","\uFF10",9],["8260","\uFF21",25],["8281","\uFF41",25],["829f","\u3041",82],["8340","\u30A1",62],["8380","\u30E0",22],["839f","\u0391",16,"\u03A3",6],["83bf","\u03B1",16,"\u03C3",6],["8440","\u0410",5,"\u0401\u0416",25],["8470","\u0430",5,"\u0451\u0436",7],["8480","\u043E",17],["849f","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["8740","\u2460",19,"\u2160",9],["875f","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["877e","\u337B"],["8780","\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["889f","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["8940","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186"],["8980","\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["8a40","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B"],["8a80","\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["8b40","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551"],["8b80","\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["8c40","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8"],["8c80","\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["8d40","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D"],["8d80","\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["8e40","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62"],["8e80","\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["8f40","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3"],["8f80","\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["9040","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8"],["9080","\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["9140","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB"],["9180","\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["9240","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4"],["9280","\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["9340","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC"],["9380","\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["9440","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885"],["9480","\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["9540","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577"],["9580","\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["9640","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6"],["9680","\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["9740","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32"],["9780","\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["9840","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["989f","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["9940","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED"],["9980","\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["9a40","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638"],["9a80","\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["9b40","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80"],["9b80","\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["9c40","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060"],["9c80","\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["9d40","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B"],["9d80","\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["9e40","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E"],["9e80","\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["9f40","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF"],["9f80","\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["e040","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD"],["e080","\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e140","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF"],["e180","\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e240","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0"],["e280","\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e340","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37"],["e380","\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e440","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264"],["e480","\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e540","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC"],["e580","\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["e640","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7"],["e680","\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["e740","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C"],["e780","\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["e840","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599"],["e880","\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["e940","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43"],["e980","\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["ea40","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF"],["ea80","\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0\u582F\u69C7\u9059\u7464\u51DC\u7199"],["ed40","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F"],["ed80","\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["ee40","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559"],["ee80","\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["eeef","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["f040","\uE000",62],["f080","\uE03F",124],["f140","\uE0BC",62],["f180","\uE0FB",124],["f240","\uE178",62],["f280","\uE1B7",124],["f340","\uE234",62],["f380","\uE273",124],["f440","\uE2F0",62],["f480","\uE32F",124],["f540","\uE3AC",62],["f580","\uE3EB",124],["f640","\uE468",62],["f680","\uE4A7",124],["f740","\uE524",62],["f780","\uE563",124],["f840","\uE5E0",62],["f880","\uE61F",124],["f940","\uE69C"],["fa40","\u2170",9,"\u2160",9,"\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u2235\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A"],["fa80","\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F"],["fb40","\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19"],["fb80","\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"],["fc40","\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"]],BPe=[["0","\0",127],["8ea1","\uFF61",62],["a1a1","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7"],["a2a1","\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["a2ba","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["a2ca","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["a2dc","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["a2f2","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["a2fe","\u25EF"],["a3b0","\uFF10",9],["a3c1","\uFF21",25],["a3e1","\uFF41",25],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a8a1","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["ada1","\u2460",19,"\u2160",9],["adc0","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["addf","\u337B\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["b0a1","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["b1a1","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC"],["b2a1","\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["b3a1","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431"],["b4a1","\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["b5a1","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC"],["b6a1","\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["b7a1","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372"],["b8a1","\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["b9a1","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC"],["baa1","\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["bba1","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642"],["bca1","\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["bda1","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F"],["bea1","\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["bfa1","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE"],["c0a1","\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["c1a1","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E"],["c2a1","\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["c3a1","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5"],["c4a1","\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["c5a1","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230"],["c6a1","\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["c7a1","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6"],["c8a1","\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["c9a1","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D"],["caa1","\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["cba1","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80"],["cca1","\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["cda1","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483"],["cea1","\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["cfa1","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["d0a1","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["d1a1","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8"],["d2a1","\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["d3a1","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709"],["d4a1","\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["d5a1","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53"],["d6a1","\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["d7a1","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A"],["d8a1","\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["d9a1","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC"],["daa1","\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["dba1","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD"],["dca1","\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["dda1","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE"],["dea1","\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["dfa1","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC"],["e0a1","\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e1a1","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670"],["e2a1","\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e3a1","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50"],["e4a1","\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e5a1","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A"],["e6a1","\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e7a1","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9"],["e8a1","\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e9a1","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759"],["eaa1","\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["eba1","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B"],["eca1","\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["eda1","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8"],["eea1","\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["efa1","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E"],["f0a1","\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["f1a1","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7"],["f2a1","\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["f3a1","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0"],["f4a1","\u582F\u69C7\u9059\u7464\u51DC\u7199"],["f9a1","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7"],["faa1","\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["fba1","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA"],["fca1","\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["fcf1","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["8fa2af","\u02D8\u02C7\xB8\u02D9\u02DD\xAF\u02DB\u02DA\uFF5E\u0384\u0385"],["8fa2c2","\xA1\xA6\xBF"],["8fa2eb","\xBA\xAA\xA9\xAE\u2122\xA4\u2116"],["8fa6e1","\u0386\u0388\u0389\u038A\u03AA"],["8fa6e7","\u038C"],["8fa6e9","\u038E\u03AB"],["8fa6ec","\u038F"],["8fa6f1","\u03AC\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03C2\u03CD\u03CB\u03B0\u03CE"],["8fa7c2","\u0402",10,"\u040E\u040F"],["8fa7f2","\u0452",10,"\u045E\u045F"],["8fa9a1","\xC6\u0110"],["8fa9a4","\u0126"],["8fa9a6","\u0132"],["8fa9a8","\u0141\u013F"],["8fa9ab","\u014A\xD8\u0152"],["8fa9af","\u0166\xDE"],["8fa9c1","\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0142\u0140\u0149\u014B\xF8\u0153\xDF\u0167\xFE"],["8faaa1","\xC1\xC0\xC4\xC2\u0102\u01CD\u0100\u0104\xC5\xC3\u0106\u0108\u010C\xC7\u010A\u010E\xC9\xC8\xCB\xCA\u011A\u0116\u0112\u0118"],["8faaba","\u011C\u011E\u0122\u0120\u0124\xCD\xCC\xCF\xCE\u01CF\u0130\u012A\u012E\u0128\u0134\u0136\u0139\u013D\u013B\u0143\u0147\u0145\xD1\xD3\xD2\xD6\xD4\u01D1\u0150\u014C\xD5\u0154\u0158\u0156\u015A\u015C\u0160\u015E\u0164\u0162\xDA\xD9\xDC\xDB\u016C\u01D3\u0170\u016A\u0172\u016E\u0168\u01D7\u01DB\u01D9\u01D5\u0174\xDD\u0178\u0176\u0179\u017D\u017B"],["8faba1","\xE1\xE0\xE4\xE2\u0103\u01CE\u0101\u0105\xE5\xE3\u0107\u0109\u010D\xE7\u010B\u010F\xE9\xE8\xEB\xEA\u011B\u0117\u0113\u0119\u01F5\u011D\u011F"],["8fabbd","\u0121\u0125\xED\xEC\xEF\xEE\u01D0"],["8fabc5","\u012B\u012F\u0129\u0135\u0137\u013A\u013E\u013C\u0144\u0148\u0146\xF1\xF3\xF2\xF6\xF4\u01D2\u0151\u014D\xF5\u0155\u0159\u0157\u015B\u015D\u0161\u015F\u0165\u0163\xFA\xF9\xFC\xFB\u016D\u01D4\u0171\u016B\u0173\u016F\u0169\u01D8\u01DC\u01DA\u01D6\u0175\xFD\xFF\u0177\u017A\u017E\u017C"],["8fb0a1","\u4E02\u4E04\u4E05\u4E0C\u4E12\u4E1F\u4E23\u4E24\u4E28\u4E2B\u4E2E\u4E2F\u4E30\u4E35\u4E40\u4E41\u4E44\u4E47\u4E51\u4E5A\u4E5C\u4E63\u4E68\u4E69\u4E74\u4E75\u4E79\u4E7F\u4E8D\u4E96\u4E97\u4E9D\u4EAF\u4EB9\u4EC3\u4ED0\u4EDA\u4EDB\u4EE0\u4EE1\u4EE2\u4EE8\u4EEF\u4EF1\u4EF3\u4EF5\u4EFD\u4EFE\u4EFF\u4F00\u4F02\u4F03\u4F08\u4F0B\u4F0C\u4F12\u4F15\u4F16\u4F17\u4F19\u4F2E\u4F31\u4F60\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F40\u4F42\u4F48\u4F49\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F58\u4F5F\u4F63\u4F6A\u4F6C\u4F6E\u4F71\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F7E\u4F81\u4F82\u4F84"],["8fb1a1","\u4F85\u4F89\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F94\u4F97\u4F99\u4F9A\u4F9E\u4F9F\u4FB2\u4FB7\u4FB9\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC5\u4FC6\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FCF\u4FD2\u4FDC\u4FE0\u4FE2\u4FF0\u4FF2\u4FFC\u4FFD\u4FFF\u5000\u5001\u5004\u5007\u500A\u500C\u500E\u5010\u5013\u5017\u5018\u501B\u501C\u501D\u501E\u5022\u5027\u502E\u5030\u5032\u5033\u5035\u5040\u5041\u5042\u5045\u5046\u504A\u504C\u504E\u5051\u5052\u5053\u5057\u5059\u505F\u5060\u5062\u5063\u5066\u5067\u506A\u506D\u5070\u5071\u503B\u5081\u5083\u5084\u5086\u508A\u508E\u508F\u5090"],["8fb2a1","\u5092\u5093\u5094\u5096\u509B\u509C\u509E",4,"\u50AA\u50AF\u50B0\u50B9\u50BA\u50BD\u50C0\u50C3\u50C4\u50C7\u50CC\u50CE\u50D0\u50D3\u50D4\u50D8\u50DC\u50DD\u50DF\u50E2\u50E4\u50E6\u50E8\u50E9\u50EF\u50F1\u50F6\u50FA\u50FE\u5103\u5106\u5107\u5108\u510B\u510C\u510D\u510E\u50F2\u5110\u5117\u5119\u511B\u511C\u511D\u511E\u5123\u5127\u5128\u512C\u512D\u512F\u5131\u5133\u5134\u5135\u5138\u5139\u5142\u514A\u514F\u5153\u5155\u5157\u5158\u515F\u5164\u5166\u517E\u5183\u5184\u518B\u518E\u5198\u519D\u51A1\u51A3\u51AD\u51B8\u51BA\u51BC\u51BE\u51BF\u51C2"],["8fb3a1","\u51C8\u51CF\u51D1\u51D2\u51D3\u51D5\u51D8\u51DE\u51E2\u51E5\u51EE\u51F2\u51F3\u51F4\u51F7\u5201\u5202\u5205\u5212\u5213\u5215\u5216\u5218\u5222\u5228\u5231\u5232\u5235\u523C\u5245\u5249\u5255\u5257\u5258\u525A\u525C\u525F\u5260\u5261\u5266\u526E\u5277\u5278\u5279\u5280\u5282\u5285\u528A\u528C\u5293\u5295\u5296\u5297\u5298\u529A\u529C\u52A4\u52A5\u52A6\u52A7\u52AF\u52B0\u52B6\u52B7\u52B8\u52BA\u52BB\u52BD\u52C0\u52C4\u52C6\u52C8\u52CC\u52CF\u52D1\u52D4\u52D6\u52DB\u52DC\u52E1\u52E5\u52E8\u52E9\u52EA\u52EC\u52F0\u52F1\u52F4\u52F6\u52F7\u5300\u5303\u530A\u530B"],["8fb4a1","\u530C\u5311\u5313\u5318\u531B\u531C\u531E\u531F\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u5330\u5332\u5335\u533C\u533D\u533E\u5342\u534C\u534B\u5359\u535B\u5361\u5363\u5365\u536C\u536D\u5372\u5379\u537E\u5383\u5387\u5388\u538E\u5393\u5394\u5399\u539D\u53A1\u53A4\u53AA\u53AB\u53AF\u53B2\u53B4\u53B5\u53B7\u53B8\u53BA\u53BD\u53C0\u53C5\u53CF\u53D2\u53D3\u53D5\u53DA\u53DD\u53DE\u53E0\u53E6\u53E7\u53F5\u5402\u5413\u541A\u5421\u5427\u5428\u542A\u542F\u5431\u5434\u5435\u5443\u5444\u5447\u544D\u544F\u545E\u5462\u5464\u5466\u5467\u5469\u546B\u546D\u546E\u5474\u547F"],["8fb5a1","\u5481\u5483\u5485\u5488\u5489\u548D\u5491\u5495\u5496\u549C\u549F\u54A1\u54A6\u54A7\u54A9\u54AA\u54AD\u54AE\u54B1\u54B7\u54B9\u54BA\u54BB\u54BF\u54C6\u54CA\u54CD\u54CE\u54E0\u54EA\u54EC\u54EF\u54F6\u54FC\u54FE\u54FF\u5500\u5501\u5505\u5508\u5509\u550C\u550D\u550E\u5515\u552A\u552B\u5532\u5535\u5536\u553B\u553C\u553D\u5541\u5547\u5549\u554A\u554D\u5550\u5551\u5558\u555A\u555B\u555E\u5560\u5561\u5564\u5566\u557F\u5581\u5582\u5586\u5588\u558E\u558F\u5591\u5592\u5593\u5594\u5597\u55A3\u55A4\u55AD\u55B2\u55BF\u55C1\u55C3\u55C6\u55C9\u55CB\u55CC\u55CE\u55D1\u55D2"],["8fb6a1","\u55D3\u55D7\u55D8\u55DB\u55DE\u55E2\u55E9\u55F6\u55FF\u5605\u5608\u560A\u560D",5,"\u5619\u562C\u5630\u5633\u5635\u5637\u5639\u563B\u563C\u563D\u563F\u5640\u5641\u5643\u5644\u5646\u5649\u564B\u564D\u564F\u5654\u565E\u5660\u5661\u5662\u5663\u5666\u5669\u566D\u566F\u5671\u5672\u5675\u5684\u5685\u5688\u568B\u568C\u5695\u5699\u569A\u569D\u569E\u569F\u56A6\u56A7\u56A8\u56A9\u56AB\u56AC\u56AD\u56B1\u56B3\u56B7\u56BE\u56C5\u56C9\u56CA\u56CB\u56CF\u56D0\u56CC\u56CD\u56D9\u56DC\u56DD\u56DF\u56E1\u56E4",4,"\u56F1\u56EB\u56ED"],["8fb7a1","\u56F6\u56F7\u5701\u5702\u5707\u570A\u570C\u5711\u5715\u571A\u571B\u571D\u5720\u5722\u5723\u5724\u5725\u5729\u572A\u572C\u572E\u572F\u5733\u5734\u573D\u573E\u573F\u5745\u5746\u574C\u574D\u5752\u5762\u5765\u5767\u5768\u576B\u576D",4,"\u5773\u5774\u5775\u5777\u5779\u577A\u577B\u577C\u577E\u5781\u5783\u578C\u5794\u5797\u5799\u579A\u579C\u579D\u579E\u579F\u57A1\u5795\u57A7\u57A8\u57A9\u57AC\u57B8\u57BD\u57C7\u57C8\u57CC\u57CF\u57D5\u57DD\u57DE\u57E4\u57E6\u57E7\u57E9\u57ED\u57F0\u57F5\u57F6\u57F8\u57FD\u57FE\u57FF\u5803\u5804\u5808\u5809\u57E1"],["8fb8a1","\u580C\u580D\u581B\u581E\u581F\u5820\u5826\u5827\u582D\u5832\u5839\u583F\u5849\u584C\u584D\u584F\u5850\u5855\u585F\u5861\u5864\u5867\u5868\u5878\u587C\u587F\u5880\u5881\u5887\u5888\u5889\u588A\u588C\u588D\u588F\u5890\u5894\u5896\u589D\u58A0\u58A1\u58A2\u58A6\u58A9\u58B1\u58B2\u58C4\u58BC\u58C2\u58C8\u58CD\u58CE\u58D0\u58D2\u58D4\u58D6\u58DA\u58DD\u58E1\u58E2\u58E9\u58F3\u5905\u5906\u590B\u590C\u5912\u5913\u5914\u8641\u591D\u5921\u5923\u5924\u5928\u592F\u5930\u5933\u5935\u5936\u593F\u5943\u5946\u5952\u5953\u5959\u595B\u595D\u595E\u595F\u5961\u5963\u596B\u596D"],["8fb9a1","\u596F\u5972\u5975\u5976\u5979\u597B\u597C\u598B\u598C\u598E\u5992\u5995\u5997\u599F\u59A4\u59A7\u59AD\u59AE\u59AF\u59B0\u59B3\u59B7\u59BA\u59BC\u59C1\u59C3\u59C4\u59C8\u59CA\u59CD\u59D2\u59DD\u59DE\u59DF\u59E3\u59E4\u59E7\u59EE\u59EF\u59F1\u59F2\u59F4\u59F7\u5A00\u5A04\u5A0C\u5A0D\u5A0E\u5A12\u5A13\u5A1E\u5A23\u5A24\u5A27\u5A28\u5A2A\u5A2D\u5A30\u5A44\u5A45\u5A47\u5A48\u5A4C\u5A50\u5A55\u5A5E\u5A63\u5A65\u5A67\u5A6D\u5A77\u5A7A\u5A7B\u5A7E\u5A8B\u5A90\u5A93\u5A96\u5A99\u5A9C\u5A9E\u5A9F\u5AA0\u5AA2\u5AA7\u5AAC\u5AB1\u5AB2\u5AB3\u5AB5\u5AB8\u5ABA\u5ABB\u5ABF"],["8fbaa1","\u5AC4\u5AC6\u5AC8\u5ACF\u5ADA\u5ADC\u5AE0\u5AE5\u5AEA\u5AEE\u5AF5\u5AF6\u5AFD\u5B00\u5B01\u5B08\u5B17\u5B34\u5B19\u5B1B\u5B1D\u5B21\u5B25\u5B2D\u5B38\u5B41\u5B4B\u5B4C\u5B52\u5B56\u5B5E\u5B68\u5B6E\u5B6F\u5B7C\u5B7D\u5B7E\u5B7F\u5B81\u5B84\u5B86\u5B8A\u5B8E\u5B90\u5B91\u5B93\u5B94\u5B96\u5BA8\u5BA9\u5BAC\u5BAD\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBC\u5BC0\u5BC1\u5BCD\u5BCF\u5BD6",4,"\u5BE0\u5BEF\u5BF1\u5BF4\u5BFD\u5C0C\u5C17\u5C1E\u5C1F\u5C23\u5C26\u5C29\u5C2B\u5C2C\u5C2E\u5C30\u5C32\u5C35\u5C36\u5C59\u5C5A\u5C5C\u5C62\u5C63\u5C67\u5C68\u5C69"],["8fbba1","\u5C6D\u5C70\u5C74\u5C75\u5C7A\u5C7B\u5C7C\u5C7D\u5C87\u5C88\u5C8A\u5C8F\u5C92\u5C9D\u5C9F\u5CA0\u5CA2\u5CA3\u5CA6\u5CAA\u5CB2\u5CB4\u5CB5\u5CBA\u5CC9\u5CCB\u5CD2\u5CDD\u5CD7\u5CEE\u5CF1\u5CF2\u5CF4\u5D01\u5D06\u5D0D\u5D12\u5D2B\u5D23\u5D24\u5D26\u5D27\u5D31\u5D34\u5D39\u5D3D\u5D3F\u5D42\u5D43\u5D46\u5D48\u5D55\u5D51\u5D59\u5D4A\u5D5F\u5D60\u5D61\u5D62\u5D64\u5D6A\u5D6D\u5D70\u5D79\u5D7A\u5D7E\u5D7F\u5D81\u5D83\u5D88\u5D8A\u5D92\u5D93\u5D94\u5D95\u5D99\u5D9B\u5D9F\u5DA0\u5DA7\u5DAB\u5DB0\u5DB4\u5DB8\u5DB9\u5DC3\u5DC7\u5DCB\u5DD0\u5DCE\u5DD8\u5DD9\u5DE0\u5DE4"],["8fbca1","\u5DE9\u5DF8\u5DF9\u5E00\u5E07\u5E0D\u5E12\u5E14\u5E15\u5E18\u5E1F\u5E20\u5E2E\u5E28\u5E32\u5E35\u5E3E\u5E4B\u5E50\u5E49\u5E51\u5E56\u5E58\u5E5B\u5E5C\u5E5E\u5E68\u5E6A",4,"\u5E70\u5E80\u5E8B\u5E8E\u5EA2\u5EA4\u5EA5\u5EA8\u5EAA\u5EAC\u5EB1\u5EB3\u5EBD\u5EBE\u5EBF\u5EC6\u5ECC\u5ECB\u5ECE\u5ED1\u5ED2\u5ED4\u5ED5\u5EDC\u5EDE\u5EE5\u5EEB\u5F02\u5F06\u5F07\u5F08\u5F0E\u5F19\u5F1C\u5F1D\u5F21\u5F22\u5F23\u5F24\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F34\u5F36\u5F3B\u5F3D\u5F3F\u5F40\u5F44\u5F45\u5F47\u5F4D\u5F50\u5F54\u5F58\u5F5B\u5F60\u5F63\u5F64\u5F67"],["8fbda1","\u5F6F\u5F72\u5F74\u5F75\u5F78\u5F7A\u5F7D\u5F7E\u5F89\u5F8D\u5F8F\u5F96\u5F9C\u5F9D\u5FA2\u5FA7\u5FAB\u5FA4\u5FAC\u5FAF\u5FB0\u5FB1\u5FB8\u5FC4\u5FC7\u5FC8\u5FC9\u5FCB\u5FD0",4,"\u5FDE\u5FE1\u5FE2\u5FE8\u5FE9\u5FEA\u5FEC\u5FED\u5FEE\u5FEF\u5FF2\u5FF3\u5FF6\u5FFA\u5FFC\u6007\u600A\u600D\u6013\u6014\u6017\u6018\u601A\u601F\u6024\u602D\u6033\u6035\u6040\u6047\u6048\u6049\u604C\u6051\u6054\u6056\u6057\u605D\u6061\u6067\u6071\u607E\u607F\u6082\u6086\u6088\u608A\u608E\u6091\u6093\u6095\u6098\u609D\u609E\u60A2\u60A4\u60A5\u60A8\u60B0\u60B1\u60B7"],["8fbea1","\u60BB\u60BE\u60C2\u60C4\u60C8\u60C9\u60CA\u60CB\u60CE\u60CF\u60D4\u60D5\u60D9\u60DB\u60DD\u60DE\u60E2\u60E5\u60F2\u60F5\u60F8\u60FC\u60FD\u6102\u6107\u610A\u610C\u6110",4,"\u6116\u6117\u6119\u611C\u611E\u6122\u612A\u612B\u6130\u6131\u6135\u6136\u6137\u6139\u6141\u6145\u6146\u6149\u615E\u6160\u616C\u6172\u6178\u617B\u617C\u617F\u6180\u6181\u6183\u6184\u618B\u618D\u6192\u6193\u6197\u6198\u619C\u619D\u619F\u61A0\u61A5\u61A8\u61AA\u61AD\u61B8\u61B9\u61BC\u61C0\u61C1\u61C2\u61CE\u61CF\u61D5\u61DC\u61DD\u61DE\u61DF\u61E1\u61E2\u61E7\u61E9\u61E5"],["8fbfa1","\u61EC\u61ED\u61EF\u6201\u6203\u6204\u6207\u6213\u6215\u621C\u6220\u6222\u6223\u6227\u6229\u622B\u6239\u623D\u6242\u6243\u6244\u6246\u624C\u6250\u6251\u6252\u6254\u6256\u625A\u625C\u6264\u626D\u626F\u6273\u627A\u627D\u628D\u628E\u628F\u6290\u62A6\u62A8\u62B3\u62B6\u62B7\u62BA\u62BE\u62BF\u62C4\u62CE\u62D5\u62D6\u62DA\u62EA\u62F2\u62F4\u62FC\u62FD\u6303\u6304\u630A\u630B\u630D\u6310\u6313\u6316\u6318\u6329\u632A\u632D\u6335\u6336\u6339\u633C\u6341\u6342\u6343\u6344\u6346\u634A\u634B\u634E\u6352\u6353\u6354\u6358\u635B\u6365\u6366\u636C\u636D\u6371\u6374\u6375"],["8fc0a1","\u6378\u637C\u637D\u637F\u6382\u6384\u6387\u638A\u6390\u6394\u6395\u6399\u639A\u639E\u63A4\u63A6\u63AD\u63AE\u63AF\u63BD\u63C1\u63C5\u63C8\u63CE\u63D1\u63D3\u63D4\u63D5\u63DC\u63E0\u63E5\u63EA\u63EC\u63F2\u63F3\u63F5\u63F8\u63F9\u6409\u640A\u6410\u6412\u6414\u6418\u641E\u6420\u6422\u6424\u6425\u6429\u642A\u642F\u6430\u6435\u643D\u643F\u644B\u644F\u6451\u6452\u6453\u6454\u645A\u645B\u645C\u645D\u645F\u6460\u6461\u6463\u646D\u6473\u6474\u647B\u647D\u6485\u6487\u648F\u6490\u6491\u6498\u6499\u649B\u649D\u649F\u64A1\u64A3\u64A6\u64A8\u64AC\u64B3\u64BD\u64BE\u64BF"],["8fc1a1","\u64C4\u64C9\u64CA\u64CB\u64CC\u64CE\u64D0\u64D1\u64D5\u64D7\u64E4\u64E5\u64E9\u64EA\u64ED\u64F0\u64F5\u64F7\u64FB\u64FF\u6501\u6504\u6508\u6509\u650A\u650F\u6513\u6514\u6516\u6519\u651B\u651E\u651F\u6522\u6526\u6529\u652E\u6531\u653A\u653C\u653D\u6543\u6547\u6549\u6550\u6552\u6554\u655F\u6560\u6567\u656B\u657A\u657D\u6581\u6585\u658A\u6592\u6595\u6598\u659D\u65A0\u65A3\u65A6\u65AE\u65B2\u65B3\u65B4\u65BF\u65C2\u65C8\u65C9\u65CE\u65D0\u65D4\u65D6\u65D8\u65DF\u65F0\u65F2\u65F4\u65F5\u65F9\u65FE\u65FF\u6600\u6604\u6608\u6609\u660D\u6611\u6612\u6615\u6616\u661D"],["8fc2a1","\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6631\u6633\u6639\u6637\u6640\u6645\u6646\u664A\u664C\u6651\u664E\u6657\u6658\u6659\u665B\u665C\u6660\u6661\u66FB\u666A\u666B\u666C\u667E\u6673\u6675\u667F\u6677\u6678\u6679\u667B\u6680\u667C\u668B\u668C\u668D\u6690\u6692\u6699\u669A\u669B\u669C\u669F\u66A0\u66A4\u66AD\u66B1\u66B2\u66B5\u66BB\u66BF\u66C0\u66C2\u66C3\u66C8\u66CC\u66CE\u66CF\u66D4\u66DB\u66DF\u66E8\u66EB\u66EC\u66EE\u66FA\u6705\u6707\u670E\u6713\u6719\u671C\u6720\u6722\u6733\u673E\u6745\u6747\u6748\u674C\u6754\u6755\u675D"],["8fc3a1","\u6766\u676C\u676E\u6774\u6776\u677B\u6781\u6784\u678E\u678F\u6791\u6793\u6796\u6798\u6799\u679B\u67B0\u67B1\u67B2\u67B5\u67BB\u67BC\u67BD\u67F9\u67C0\u67C2\u67C3\u67C5\u67C8\u67C9\u67D2\u67D7\u67D9\u67DC\u67E1\u67E6\u67F0\u67F2\u67F6\u67F7\u6852\u6814\u6819\u681D\u681F\u6828\u6827\u682C\u682D\u682F\u6830\u6831\u6833\u683B\u683F\u6844\u6845\u684A\u684C\u6855\u6857\u6858\u685B\u686B\u686E",4,"\u6875\u6879\u687A\u687B\u687C\u6882\u6884\u6886\u6888\u6896\u6898\u689A\u689C\u68A1\u68A3\u68A5\u68A9\u68AA\u68AE\u68B2\u68BB\u68C5\u68C8\u68CC\u68CF"],["8fc4a1","\u68D0\u68D1\u68D3\u68D6\u68D9\u68DC\u68DD\u68E5\u68E8\u68EA\u68EB\u68EC\u68ED\u68F0\u68F1\u68F5\u68F6\u68FB\u68FC\u68FD\u6906\u6909\u690A\u6910\u6911\u6913\u6916\u6917\u6931\u6933\u6935\u6938\u693B\u6942\u6945\u6949\u694E\u6957\u695B\u6963\u6964\u6965\u6966\u6968\u6969\u696C\u6970\u6971\u6972\u697A\u697B\u697F\u6980\u698D\u6992\u6996\u6998\u69A1\u69A5\u69A6\u69A8\u69AB\u69AD\u69AF\u69B7\u69B8\u69BA\u69BC\u69C5\u69C8\u69D1\u69D6\u69D7\u69E2\u69E5\u69EE\u69EF\u69F1\u69F3\u69F5\u69FE\u6A00\u6A01\u6A03\u6A0F\u6A11\u6A15\u6A1A\u6A1D\u6A20\u6A24\u6A28\u6A30\u6A32"],["8fc5a1","\u6A34\u6A37\u6A3B\u6A3E\u6A3F\u6A45\u6A46\u6A49\u6A4A\u6A4E\u6A50\u6A51\u6A52\u6A55\u6A56\u6A5B\u6A64\u6A67\u6A6A\u6A71\u6A73\u6A7E\u6A81\u6A83\u6A86\u6A87\u6A89\u6A8B\u6A91\u6A9B\u6A9D\u6A9E\u6A9F\u6AA5\u6AAB\u6AAF\u6AB0\u6AB1\u6AB4\u6ABD\u6ABE\u6ABF\u6AC6\u6AC9\u6AC8\u6ACC\u6AD0\u6AD4\u6AD5\u6AD6\u6ADC\u6ADD\u6AE4\u6AE7\u6AEC\u6AF0\u6AF1\u6AF2\u6AFC\u6AFD\u6B02\u6B03\u6B06\u6B07\u6B09\u6B0F\u6B10\u6B11\u6B17\u6B1B\u6B1E\u6B24\u6B28\u6B2B\u6B2C\u6B2F\u6B35\u6B36\u6B3B\u6B3F\u6B46\u6B4A\u6B4D\u6B52\u6B56\u6B58\u6B5D\u6B60\u6B67\u6B6B\u6B6E\u6B70\u6B75\u6B7D"],["8fc6a1","\u6B7E\u6B82\u6B85\u6B97\u6B9B\u6B9F\u6BA0\u6BA2\u6BA3\u6BA8\u6BA9\u6BAC\u6BAD\u6BAE\u6BB0\u6BB8\u6BB9\u6BBD\u6BBE\u6BC3\u6BC4\u6BC9\u6BCC\u6BD6\u6BDA\u6BE1\u6BE3\u6BE6\u6BE7\u6BEE\u6BF1\u6BF7\u6BF9\u6BFF\u6C02\u6C04\u6C05\u6C09\u6C0D\u6C0E\u6C10\u6C12\u6C19\u6C1F\u6C26\u6C27\u6C28\u6C2C\u6C2E\u6C33\u6C35\u6C36\u6C3A\u6C3B\u6C3F\u6C4A\u6C4B\u6C4D\u6C4F\u6C52\u6C54\u6C59\u6C5B\u6C5C\u6C6B\u6C6D\u6C6F\u6C74\u6C76\u6C78\u6C79\u6C7B\u6C85\u6C86\u6C87\u6C89\u6C94\u6C95\u6C97\u6C98\u6C9C\u6C9F\u6CB0\u6CB2\u6CB4\u6CC2\u6CC6\u6CCD\u6CCF\u6CD0\u6CD1\u6CD2\u6CD4\u6CD6"],["8fc7a1","\u6CDA\u6CDC\u6CE0\u6CE7\u6CE9\u6CEB\u6CEC\u6CEE\u6CF2\u6CF4\u6D04\u6D07\u6D0A\u6D0E\u6D0F\u6D11\u6D13\u6D1A\u6D26\u6D27\u6D28\u6C67\u6D2E\u6D2F\u6D31\u6D39\u6D3C\u6D3F\u6D57\u6D5E\u6D5F\u6D61\u6D65\u6D67\u6D6F\u6D70\u6D7C\u6D82\u6D87\u6D91\u6D92\u6D94\u6D96\u6D97\u6D98\u6DAA\u6DAC\u6DB4\u6DB7\u6DB9\u6DBD\u6DBF\u6DC4\u6DC8\u6DCA\u6DCE\u6DCF\u6DD6\u6DDB\u6DDD\u6DDF\u6DE0\u6DE2\u6DE5\u6DE9\u6DEF\u6DF0\u6DF4\u6DF6\u6DFC\u6E00\u6E04\u6E1E\u6E22\u6E27\u6E32\u6E36\u6E39\u6E3B\u6E3C\u6E44\u6E45\u6E48\u6E49\u6E4B\u6E4F\u6E51\u6E52\u6E53\u6E54\u6E57\u6E5C\u6E5D\u6E5E"],["8fc8a1","\u6E62\u6E63\u6E68\u6E73\u6E7B\u6E7D\u6E8D\u6E93\u6E99\u6EA0\u6EA7\u6EAD\u6EAE\u6EB1\u6EB3\u6EBB\u6EBF\u6EC0\u6EC1\u6EC3\u6EC7\u6EC8\u6ECA\u6ECD\u6ECE\u6ECF\u6EEB\u6EED\u6EEE\u6EF9\u6EFB\u6EFD\u6F04\u6F08\u6F0A\u6F0C\u6F0D\u6F16\u6F18\u6F1A\u6F1B\u6F26\u6F29\u6F2A\u6F2F\u6F30\u6F33\u6F36\u6F3B\u6F3C\u6F2D\u6F4F\u6F51\u6F52\u6F53\u6F57\u6F59\u6F5A\u6F5D\u6F5E\u6F61\u6F62\u6F68\u6F6C\u6F7D\u6F7E\u6F83\u6F87\u6F88\u6F8B\u6F8C\u6F8D\u6F90\u6F92\u6F93\u6F94\u6F96\u6F9A\u6F9F\u6FA0\u6FA5\u6FA6\u6FA7\u6FA8\u6FAE\u6FAF\u6FB0\u6FB5\u6FB6\u6FBC\u6FC5\u6FC7\u6FC8\u6FCA"],["8fc9a1","\u6FDA\u6FDE\u6FE8\u6FE9\u6FF0\u6FF5\u6FF9\u6FFC\u6FFD\u7000\u7005\u7006\u7007\u700D\u7017\u7020\u7023\u702F\u7034\u7037\u7039\u703C\u7043\u7044\u7048\u7049\u704A\u704B\u7054\u7055\u705D\u705E\u704E\u7064\u7065\u706C\u706E\u7075\u7076\u707E\u7081\u7085\u7086\u7094",4,"\u709B\u70A4\u70AB\u70B0\u70B1\u70B4\u70B7\u70CA\u70D1\u70D3\u70D4\u70D5\u70D6\u70D8\u70DC\u70E4\u70FA\u7103",4,"\u710B\u710C\u710F\u711E\u7120\u712B\u712D\u712F\u7130\u7131\u7138\u7141\u7145\u7146\u7147\u714A\u714B\u7150\u7152\u7157\u715A\u715C\u715E\u7160"],["8fcaa1","\u7168\u7179\u7180\u7185\u7187\u718C\u7192\u719A\u719B\u71A0\u71A2\u71AF\u71B0\u71B2\u71B3\u71BA\u71BF\u71C0\u71C1\u71C4\u71CB\u71CC\u71D3\u71D6\u71D9\u71DA\u71DC\u71F8\u71FE\u7200\u7207\u7208\u7209\u7213\u7217\u721A\u721D\u721F\u7224\u722B\u722F\u7234\u7238\u7239\u7241\u7242\u7243\u7245\u724E\u724F\u7250\u7253\u7255\u7256\u725A\u725C\u725E\u7260\u7263\u7268\u726B\u726E\u726F\u7271\u7277\u7278\u727B\u727C\u727F\u7284\u7289\u728D\u728E\u7293\u729B\u72A8\u72AD\u72AE\u72B1\u72B4\u72BE\u72C1\u72C7\u72C9\u72CC\u72D5\u72D6\u72D8\u72DF\u72E5\u72F3\u72F4\u72FA\u72FB"],["8fcba1","\u72FE\u7302\u7304\u7305\u7307\u730B\u730D\u7312\u7313\u7318\u7319\u731E\u7322\u7324\u7327\u7328\u732C\u7331\u7332\u7335\u733A\u733B\u733D\u7343\u734D\u7350\u7352\u7356\u7358\u735D\u735E\u735F\u7360\u7366\u7367\u7369\u736B\u736C\u736E\u736F\u7371\u7377\u7379\u737C\u7380\u7381\u7383\u7385\u7386\u738E\u7390\u7393\u7395\u7397\u7398\u739C\u739E\u739F\u73A0\u73A2\u73A5\u73A6\u73AA\u73AB\u73AD\u73B5\u73B7\u73B9\u73BC\u73BD\u73BF\u73C5\u73C6\u73C9\u73CB\u73CC\u73CF\u73D2\u73D3\u73D6\u73D9\u73DD\u73E1\u73E3\u73E6\u73E7\u73E9\u73F4\u73F5\u73F7\u73F9\u73FA\u73FB\u73FD"],["8fcca1","\u73FF\u7400\u7401\u7404\u7407\u740A\u7411\u741A\u741B\u7424\u7426\u7428",9,"\u7439\u7440\u7443\u7444\u7446\u7447\u744B\u744D\u7451\u7452\u7457\u745D\u7462\u7466\u7467\u7468\u746B\u746D\u746E\u7471\u7472\u7480\u7481\u7485\u7486\u7487\u7489\u748F\u7490\u7491\u7492\u7498\u7499\u749A\u749C\u749F\u74A0\u74A1\u74A3\u74A6\u74A8\u74A9\u74AA\u74AB\u74AE\u74AF\u74B1\u74B2\u74B5\u74B9\u74BB\u74BF\u74C8\u74C9\u74CC\u74D0\u74D3\u74D8\u74DA\u74DB\u74DE\u74DF\u74E4\u74E8\u74EA\u74EB\u74EF\u74F4\u74FA\u74FB\u74FC\u74FF\u7506"],["8fcda1","\u7512\u7516\u7517\u7520\u7521\u7524\u7527\u7529\u752A\u752F\u7536\u7539\u753D\u753E\u753F\u7540\u7543\u7547\u7548\u754E\u7550\u7552\u7557\u755E\u755F\u7561\u756F\u7571\u7579",5,"\u7581\u7585\u7590\u7592\u7593\u7595\u7599\u759C\u75A2\u75A4\u75B4\u75BA\u75BF\u75C0\u75C1\u75C4\u75C6\u75CC\u75CE\u75CF\u75D7\u75DC\u75DF\u75E0\u75E1\u75E4\u75E7\u75EC\u75EE\u75EF\u75F1\u75F9\u7600\u7602\u7603\u7604\u7607\u7608\u760A\u760C\u760F\u7612\u7613\u7615\u7616\u7619\u761B\u761C\u761D\u761E\u7623\u7625\u7626\u7629\u762D\u7632\u7633\u7635\u7638\u7639"],["8fcea1","\u763A\u763C\u764A\u7640\u7641\u7643\u7644\u7645\u7649\u764B\u7655\u7659\u765F\u7664\u7665\u766D\u766E\u766F\u7671\u7674\u7681\u7685\u768C\u768D\u7695\u769B\u769C\u769D\u769F\u76A0\u76A2",6,"\u76AA\u76AD\u76BD\u76C1\u76C5\u76C9\u76CB\u76CC\u76CE\u76D4\u76D9\u76E0\u76E6\u76E8\u76EC\u76F0\u76F1\u76F6\u76F9\u76FC\u7700\u7706\u770A\u770E\u7712\u7714\u7715\u7717\u7719\u771A\u771C\u7722\u7728\u772D\u772E\u772F\u7734\u7735\u7736\u7739\u773D\u773E\u7742\u7745\u7746\u774A\u774D\u774E\u774F\u7752\u7756\u7757\u775C\u775E\u775F\u7760\u7762"],["8fcfa1","\u7764\u7767\u776A\u776C\u7770\u7772\u7773\u7774\u777A\u777D\u7780\u7784\u778C\u778D\u7794\u7795\u7796\u779A\u779F\u77A2\u77A7\u77AA\u77AE\u77AF\u77B1\u77B5\u77BE\u77C3\u77C9\u77D1\u77D2\u77D5\u77D9\u77DE\u77DF\u77E0\u77E4\u77E6\u77EA\u77EC\u77F0\u77F1\u77F4\u77F8\u77FB\u7805\u7806\u7809\u780D\u780E\u7811\u781D\u7821\u7822\u7823\u782D\u782E\u7830\u7835\u7837\u7843\u7844\u7847\u7848\u784C\u784E\u7852\u785C\u785E\u7860\u7861\u7863\u7864\u7868\u786A\u786E\u787A\u787E\u788A\u788F\u7894\u7898\u78A1\u789D\u789E\u789F\u78A4\u78A8\u78AC\u78AD\u78B0\u78B1\u78B2\u78B3"],["8fd0a1","\u78BB\u78BD\u78BF\u78C7\u78C8\u78C9\u78CC\u78CE\u78D2\u78D3\u78D5\u78D6\u78E4\u78DB\u78DF\u78E0\u78E1\u78E6\u78EA\u78F2\u78F3\u7900\u78F6\u78F7\u78FA\u78FB\u78FF\u7906\u790C\u7910\u791A\u791C\u791E\u791F\u7920\u7925\u7927\u7929\u792D\u7931\u7934\u7935\u793B\u793D\u793F\u7944\u7945\u7946\u794A\u794B\u794F\u7951\u7954\u7958\u795B\u795C\u7967\u7969\u796B\u7972\u7979\u797B\u797C\u797E\u798B\u798C\u7991\u7993\u7994\u7995\u7996\u7998\u799B\u799C\u79A1\u79A8\u79A9\u79AB\u79AF\u79B1\u79B4\u79B8\u79BB\u79C2\u79C4\u79C7\u79C8\u79CA\u79CF\u79D4\u79D6\u79DA\u79DD\u79DE"],["8fd1a1","\u79E0\u79E2\u79E5\u79EA\u79EB\u79ED\u79F1\u79F8\u79FC\u7A02\u7A03\u7A07\u7A09\u7A0A\u7A0C\u7A11\u7A15\u7A1B\u7A1E\u7A21\u7A27\u7A2B\u7A2D\u7A2F\u7A30\u7A34\u7A35\u7A38\u7A39\u7A3A\u7A44\u7A45\u7A47\u7A48\u7A4C\u7A55\u7A56\u7A59\u7A5C\u7A5D\u7A5F\u7A60\u7A65\u7A67\u7A6A\u7A6D\u7A75\u7A78\u7A7E\u7A80\u7A82\u7A85\u7A86\u7A8A\u7A8B\u7A90\u7A91\u7A94\u7A9E\u7AA0\u7AA3\u7AAC\u7AB3\u7AB5\u7AB9\u7ABB\u7ABC\u7AC6\u7AC9\u7ACC\u7ACE\u7AD1\u7ADB\u7AE8\u7AE9\u7AEB\u7AEC\u7AF1\u7AF4\u7AFB\u7AFD\u7AFE\u7B07\u7B14\u7B1F\u7B23\u7B27\u7B29\u7B2A\u7B2B\u7B2D\u7B2E\u7B2F\u7B30"],["8fd2a1","\u7B31\u7B34\u7B3D\u7B3F\u7B40\u7B41\u7B47\u7B4E\u7B55\u7B60\u7B64\u7B66\u7B69\u7B6A\u7B6D\u7B6F\u7B72\u7B73\u7B77\u7B84\u7B89\u7B8E\u7B90\u7B91\u7B96\u7B9B\u7B9E\u7BA0\u7BA5\u7BAC\u7BAF\u7BB0\u7BB2\u7BB5\u7BB6\u7BBA\u7BBB\u7BBC\u7BBD\u7BC2\u7BC5\u7BC8\u7BCA\u7BD4\u7BD6\u7BD7\u7BD9\u7BDA\u7BDB\u7BE8\u7BEA\u7BF2\u7BF4\u7BF5\u7BF8\u7BF9\u7BFA\u7BFC\u7BFE\u7C01\u7C02\u7C03\u7C04\u7C06\u7C09\u7C0B\u7C0C\u7C0E\u7C0F\u7C19\u7C1B\u7C20\u7C25\u7C26\u7C28\u7C2C\u7C31\u7C33\u7C34\u7C36\u7C39\u7C3A\u7C46\u7C4A\u7C55\u7C51\u7C52\u7C53\u7C59",5],["8fd3a1","\u7C61\u7C63\u7C67\u7C69\u7C6D\u7C6E\u7C70\u7C72\u7C79\u7C7C\u7C7D\u7C86\u7C87\u7C8F\u7C94\u7C9E\u7CA0\u7CA6\u7CB0\u7CB6\u7CB7\u7CBA\u7CBB\u7CBC\u7CBF\u7CC4\u7CC7\u7CC8\u7CC9\u7CCD\u7CCF\u7CD3\u7CD4\u7CD5\u7CD7\u7CD9\u7CDA\u7CDD\u7CE6\u7CE9\u7CEB\u7CF5\u7D03\u7D07\u7D08\u7D09\u7D0F\u7D11\u7D12\u7D13\u7D16\u7D1D\u7D1E\u7D23\u7D26\u7D2A\u7D2D\u7D31\u7D3C\u7D3D\u7D3E\u7D40\u7D41\u7D47\u7D48\u7D4D\u7D51\u7D53\u7D57\u7D59\u7D5A\u7D5C\u7D5D\u7D65\u7D67\u7D6A\u7D70\u7D78\u7D7A\u7D7B\u7D7F\u7D81\u7D82\u7D83\u7D85\u7D86\u7D88\u7D8B\u7D8C\u7D8D\u7D91\u7D96\u7D97\u7D9D"],["8fd4a1","\u7D9E\u7DA6\u7DA7\u7DAA\u7DB3\u7DB6\u7DB7\u7DB9\u7DC2",4,"\u7DCC\u7DCD\u7DCE\u7DD7\u7DD9\u7E00\u7DE2\u7DE5\u7DE6\u7DEA\u7DEB\u7DED\u7DF1\u7DF5\u7DF6\u7DF9\u7DFA\u7E08\u7E10\u7E11\u7E15\u7E17\u7E1C\u7E1D\u7E20\u7E27\u7E28\u7E2C\u7E2D\u7E2F\u7E33\u7E36\u7E3F\u7E44\u7E45\u7E47\u7E4E\u7E50\u7E52\u7E58\u7E5F\u7E61\u7E62\u7E65\u7E6B\u7E6E\u7E6F\u7E73\u7E78\u7E7E\u7E81\u7E86\u7E87\u7E8A\u7E8D\u7E91\u7E95\u7E98\u7E9A\u7E9D\u7E9E\u7F3C\u7F3B\u7F3D\u7F3E\u7F3F\u7F43\u7F44\u7F47\u7F4F\u7F52\u7F53\u7F5B\u7F5C\u7F5D\u7F61\u7F63\u7F64\u7F65\u7F66\u7F6D"],["8fd5a1","\u7F71\u7F7D\u7F7E\u7F7F\u7F80\u7F8B\u7F8D\u7F8F\u7F90\u7F91\u7F96\u7F97\u7F9C\u7FA1\u7FA2\u7FA6\u7FAA\u7FAD\u7FB4\u7FBC\u7FBF\u7FC0\u7FC3\u7FC8\u7FCE\u7FCF\u7FDB\u7FDF\u7FE3\u7FE5\u7FE8\u7FEC\u7FEE\u7FEF\u7FF2\u7FFA\u7FFD\u7FFE\u7FFF\u8007\u8008\u800A\u800D\u800E\u800F\u8011\u8013\u8014\u8016\u801D\u801E\u801F\u8020\u8024\u8026\u802C\u802E\u8030\u8034\u8035\u8037\u8039\u803A\u803C\u803E\u8040\u8044\u8060\u8064\u8066\u806D\u8071\u8075\u8081\u8088\u808E\u809C\u809E\u80A6\u80A7\u80AB\u80B8\u80B9\u80C8\u80CD\u80CF\u80D2\u80D4\u80D5\u80D7\u80D8\u80E0\u80ED\u80EE"],["8fd6a1","\u80F0\u80F2\u80F3\u80F6\u80F9\u80FA\u80FE\u8103\u810B\u8116\u8117\u8118\u811C\u811E\u8120\u8124\u8127\u812C\u8130\u8135\u813A\u813C\u8145\u8147\u814A\u814C\u8152\u8157\u8160\u8161\u8167\u8168\u8169\u816D\u816F\u8177\u8181\u8190\u8184\u8185\u8186\u818B\u818E\u8196\u8198\u819B\u819E\u81A2\u81AE\u81B2\u81B4\u81BB\u81CB\u81C3\u81C5\u81CA\u81CE\u81CF\u81D5\u81D7\u81DB\u81DD\u81DE\u81E1\u81E4\u81EB\u81EC\u81F0\u81F1\u81F2\u81F5\u81F6\u81F8\u81F9\u81FD\u81FF\u8200\u8203\u820F\u8213\u8214\u8219\u821A\u821D\u8221\u8222\u8228\u8232\u8234\u823A\u8243\u8244\u8245\u8246"],["8fd7a1","\u824B\u824E\u824F\u8251\u8256\u825C\u8260\u8263\u8267\u826D\u8274\u827B\u827D\u827F\u8280\u8281\u8283\u8284\u8287\u8289\u828A\u828E\u8291\u8294\u8296\u8298\u829A\u829B\u82A0\u82A1\u82A3\u82A4\u82A7\u82A8\u82A9\u82AA\u82AE\u82B0\u82B2\u82B4\u82B7\u82BA\u82BC\u82BE\u82BF\u82C6\u82D0\u82D5\u82DA\u82E0\u82E2\u82E4\u82E8\u82EA\u82ED\u82EF\u82F6\u82F7\u82FD\u82FE\u8300\u8301\u8307\u8308\u830A\u830B\u8354\u831B\u831D\u831E\u831F\u8321\u8322\u832C\u832D\u832E\u8330\u8333\u8337\u833A\u833C\u833D\u8342\u8343\u8344\u8347\u834D\u834E\u8351\u8355\u8356\u8357\u8370\u8378"],["8fd8a1","\u837D\u837F\u8380\u8382\u8384\u8386\u838D\u8392\u8394\u8395\u8398\u8399\u839B\u839C\u839D\u83A6\u83A7\u83A9\u83AC\u83BE\u83BF\u83C0\u83C7\u83C9\u83CF\u83D0\u83D1\u83D4\u83DD\u8353\u83E8\u83EA\u83F6\u83F8\u83F9\u83FC\u8401\u8406\u840A\u840F\u8411\u8415\u8419\u83AD\u842F\u8439\u8445\u8447\u8448\u844A\u844D\u844F\u8451\u8452\u8456\u8458\u8459\u845A\u845C\u8460\u8464\u8465\u8467\u846A\u8470\u8473\u8474\u8476\u8478\u847C\u847D\u8481\u8485\u8492\u8493\u8495\u849E\u84A6\u84A8\u84A9\u84AA\u84AF\u84B1\u84B4\u84BA\u84BD\u84BE\u84C0\u84C2\u84C7\u84C8\u84CC\u84CF\u84D3"],["8fd9a1","\u84DC\u84E7\u84EA\u84EF\u84F0\u84F1\u84F2\u84F7\u8532\u84FA\u84FB\u84FD\u8502\u8503\u8507\u850C\u850E\u8510\u851C\u851E\u8522\u8523\u8524\u8525\u8527\u852A\u852B\u852F\u8533\u8534\u8536\u853F\u8546\u854F",4,"\u8556\u8559\u855C",6,"\u8564\u856B\u856F\u8579\u857A\u857B\u857D\u857F\u8581\u8585\u8586\u8589\u858B\u858C\u858F\u8593\u8598\u859D\u859F\u85A0\u85A2\u85A5\u85A7\u85B4\u85B6\u85B7\u85B8\u85BC\u85BD\u85BE\u85BF\u85C2\u85C7\u85CA\u85CB\u85CE\u85AD\u85D8\u85DA\u85DF\u85E0\u85E6\u85E8\u85ED\u85F3\u85F6\u85FC"],["8fdaa1","\u85FF\u8600\u8604\u8605\u860D\u860E\u8610\u8611\u8612\u8618\u8619\u861B\u861E\u8621\u8627\u8629\u8636\u8638\u863A\u863C\u863D\u8640\u8642\u8646\u8652\u8653\u8656\u8657\u8658\u8659\u865D\u8660",4,"\u8669\u866C\u866F\u8675\u8676\u8677\u867A\u868D\u8691\u8696\u8698\u869A\u869C\u86A1\u86A6\u86A7\u86A8\u86AD\u86B1\u86B3\u86B4\u86B5\u86B7\u86B8\u86B9\u86BF\u86C0\u86C1\u86C3\u86C5\u86D1\u86D2\u86D5\u86D7\u86DA\u86DC\u86E0\u86E3\u86E5\u86E7\u8688\u86FA\u86FC\u86FD\u8704\u8705\u8707\u870B\u870E\u870F\u8710\u8713\u8714\u8719\u871E\u871F\u8721\u8723"],["8fdba1","\u8728\u872E\u872F\u8731\u8732\u8739\u873A\u873C\u873D\u873E\u8740\u8743\u8745\u874D\u8758\u875D\u8761\u8764\u8765\u876F\u8771\u8772\u877B\u8783",6,"\u878B\u878C\u8790\u8793\u8795\u8797\u8798\u8799\u879E\u87A0\u87A3\u87A7\u87AC\u87AD\u87AE\u87B1\u87B5\u87BE\u87BF\u87C1\u87C8\u87C9\u87CA\u87CE\u87D5\u87D6\u87D9\u87DA\u87DC\u87DF\u87E2\u87E3\u87E4\u87EA\u87EB\u87ED\u87F1\u87F3\u87F8\u87FA\u87FF\u8801\u8803\u8806\u8809\u880A\u880B\u8810\u8819\u8812\u8813\u8814\u8818\u881A\u881B\u881C\u881E\u881F\u8828\u882D\u882E\u8830\u8832\u8835"],["8fdca1","\u883A\u883C\u8841\u8843\u8845\u8848\u8849\u884A\u884B\u884E\u8851\u8855\u8856\u8858\u885A\u885C\u885F\u8860\u8864\u8869\u8871\u8879\u887B\u8880\u8898\u889A\u889B\u889C\u889F\u88A0\u88A8\u88AA\u88BA\u88BD\u88BE\u88C0\u88CA",4,"\u88D1\u88D2\u88D3\u88DB\u88DE\u88E7\u88EF\u88F0\u88F1\u88F5\u88F7\u8901\u8906\u890D\u890E\u890F\u8915\u8916\u8918\u8919\u891A\u891C\u8920\u8926\u8927\u8928\u8930\u8931\u8932\u8935\u8939\u893A\u893E\u8940\u8942\u8945\u8946\u8949\u894F\u8952\u8957\u895A\u895B\u895C\u8961\u8962\u8963\u896B\u896E\u8970\u8973\u8975\u897A"],["8fdda1","\u897B\u897C\u897D\u8989\u898D\u8990\u8994\u8995\u899B\u899C\u899F\u89A0\u89A5\u89B0\u89B4\u89B5\u89B6\u89B7\u89BC\u89D4",4,"\u89E5\u89E9\u89EB\u89ED\u89F1\u89F3\u89F6\u89F9\u89FD\u89FF\u8A04\u8A05\u8A07\u8A0F\u8A11\u8A12\u8A14\u8A15\u8A1E\u8A20\u8A22\u8A24\u8A26\u8A2B\u8A2C\u8A2F\u8A35\u8A37\u8A3D\u8A3E\u8A40\u8A43\u8A45\u8A47\u8A49\u8A4D\u8A4E\u8A53\u8A56\u8A57\u8A58\u8A5C\u8A5D\u8A61\u8A65\u8A67\u8A75\u8A76\u8A77\u8A79\u8A7A\u8A7B\u8A7E\u8A7F\u8A80\u8A83\u8A86\u8A8B\u8A8F\u8A90\u8A92\u8A96\u8A97\u8A99\u8A9F\u8AA7\u8AA9\u8AAE\u8AAF\u8AB3"],["8fdea1","\u8AB6\u8AB7\u8ABB\u8ABE\u8AC3\u8AC6\u8AC8\u8AC9\u8ACA\u8AD1\u8AD3\u8AD4\u8AD5\u8AD7\u8ADD\u8ADF\u8AEC\u8AF0\u8AF4\u8AF5\u8AF6\u8AFC\u8AFF\u8B05\u8B06\u8B0B\u8B11\u8B1C\u8B1E\u8B1F\u8B0A\u8B2D\u8B30\u8B37\u8B3C\u8B42",4,"\u8B48\u8B52\u8B53\u8B54\u8B59\u8B4D\u8B5E\u8B63\u8B6D\u8B76\u8B78\u8B79\u8B7C\u8B7E\u8B81\u8B84\u8B85\u8B8B\u8B8D\u8B8F\u8B94\u8B95\u8B9C\u8B9E\u8B9F\u8C38\u8C39\u8C3D\u8C3E\u8C45\u8C47\u8C49\u8C4B\u8C4F\u8C51\u8C53\u8C54\u8C57\u8C58\u8C5B\u8C5D\u8C59\u8C63\u8C64\u8C66\u8C68\u8C69\u8C6D\u8C73\u8C75\u8C76\u8C7B\u8C7E\u8C86"],["8fdfa1","\u8C87\u8C8B\u8C90\u8C92\u8C93\u8C99\u8C9B\u8C9C\u8CA4\u8CB9\u8CBA\u8CC5\u8CC6\u8CC9\u8CCB\u8CCF\u8CD6\u8CD5\u8CD9\u8CDD\u8CE1\u8CE8\u8CEC\u8CEF\u8CF0\u8CF2\u8CF5\u8CF7\u8CF8\u8CFE\u8CFF\u8D01\u8D03\u8D09\u8D12\u8D17\u8D1B\u8D65\u8D69\u8D6C\u8D6E\u8D7F\u8D82\u8D84\u8D88\u8D8D\u8D90\u8D91\u8D95\u8D9E\u8D9F\u8DA0\u8DA6\u8DAB\u8DAC\u8DAF\u8DB2\u8DB5\u8DB7\u8DB9\u8DBB\u8DC0\u8DC5\u8DC6\u8DC7\u8DC8\u8DCA\u8DCE\u8DD1\u8DD4\u8DD5\u8DD7\u8DD9\u8DE4\u8DE5\u8DE7\u8DEC\u8DF0\u8DBC\u8DF1\u8DF2\u8DF4\u8DFD\u8E01\u8E04\u8E05\u8E06\u8E0B\u8E11\u8E14\u8E16\u8E20\u8E21\u8E22"],["8fe0a1","\u8E23\u8E26\u8E27\u8E31\u8E33\u8E36\u8E37\u8E38\u8E39\u8E3D\u8E40\u8E41\u8E4B\u8E4D\u8E4E\u8E4F\u8E54\u8E5B\u8E5C\u8E5D\u8E5E\u8E61\u8E62\u8E69\u8E6C\u8E6D\u8E6F\u8E70\u8E71\u8E79\u8E7A\u8E7B\u8E82\u8E83\u8E89\u8E90\u8E92\u8E95\u8E9A\u8E9B\u8E9D\u8E9E\u8EA2\u8EA7\u8EA9\u8EAD\u8EAE\u8EB3\u8EB5\u8EBA\u8EBB\u8EC0\u8EC1\u8EC3\u8EC4\u8EC7\u8ECF\u8ED1\u8ED4\u8EDC\u8EE8\u8EEE\u8EF0\u8EF1\u8EF7\u8EF9\u8EFA\u8EED\u8F00\u8F02\u8F07\u8F08\u8F0F\u8F10\u8F16\u8F17\u8F18\u8F1E\u8F20\u8F21\u8F23\u8F25\u8F27\u8F28\u8F2C\u8F2D\u8F2E\u8F34\u8F35\u8F36\u8F37\u8F3A\u8F40\u8F41"],["8fe1a1","\u8F43\u8F47\u8F4F\u8F51",4,"\u8F58\u8F5D\u8F5E\u8F65\u8F9D\u8FA0\u8FA1\u8FA4\u8FA5\u8FA6\u8FB5\u8FB6\u8FB8\u8FBE\u8FC0\u8FC1\u8FC6\u8FCA\u8FCB\u8FCD\u8FD0\u8FD2\u8FD3\u8FD5\u8FE0\u8FE3\u8FE4\u8FE8\u8FEE\u8FF1\u8FF5\u8FF6\u8FFB\u8FFE\u9002\u9004\u9008\u900C\u9018\u901B\u9028\u9029\u902F\u902A\u902C\u902D\u9033\u9034\u9037\u903F\u9043\u9044\u904C\u905B\u905D\u9062\u9066\u9067\u906C\u9070\u9074\u9079\u9085\u9088\u908B\u908C\u908E\u9090\u9095\u9097\u9098\u9099\u909B\u90A0\u90A1\u90A2\u90A5\u90B0\u90B2\u90B3\u90B4\u90B6\u90BD\u90CC\u90BE\u90C3"],["8fe2a1","\u90C4\u90C5\u90C7\u90C8\u90D5\u90D7\u90D8\u90D9\u90DC\u90DD\u90DF\u90E5\u90D2\u90F6\u90EB\u90EF\u90F0\u90F4\u90FE\u90FF\u9100\u9104\u9105\u9106\u9108\u910D\u9110\u9114\u9116\u9117\u9118\u911A\u911C\u911E\u9120\u9125\u9122\u9123\u9127\u9129\u912E\u912F\u9131\u9134\u9136\u9137\u9139\u913A\u913C\u913D\u9143\u9147\u9148\u914F\u9153\u9157\u9159\u915A\u915B\u9161\u9164\u9167\u916D\u9174\u9179\u917A\u917B\u9181\u9183\u9185\u9186\u918A\u918E\u9191\u9193\u9194\u9195\u9198\u919E\u91A1\u91A6\u91A8\u91AC\u91AD\u91AE\u91B0\u91B1\u91B2\u91B3\u91B6\u91BB\u91BC\u91BD\u91BF"],["8fe3a1","\u91C2\u91C3\u91C5\u91D3\u91D4\u91D7\u91D9\u91DA\u91DE\u91E4\u91E5\u91E9\u91EA\u91EC",5,"\u91F7\u91F9\u91FB\u91FD\u9200\u9201\u9204\u9205\u9206\u9207\u9209\u920A\u920C\u9210\u9212\u9213\u9216\u9218\u921C\u921D\u9223\u9224\u9225\u9226\u9228\u922E\u922F\u9230\u9233\u9235\u9236\u9238\u9239\u923A\u923C\u923E\u9240\u9242\u9243\u9246\u9247\u924A\u924D\u924E\u924F\u9251\u9258\u9259\u925C\u925D\u9260\u9261\u9265\u9267\u9268\u9269\u926E\u926F\u9270\u9275",4,"\u927B\u927C\u927D\u927F\u9288\u9289\u928A\u928D\u928E\u9292\u9297"],["8fe4a1","\u9299\u929F\u92A0\u92A4\u92A5\u92A7\u92A8\u92AB\u92AF\u92B2\u92B6\u92B8\u92BA\u92BB\u92BC\u92BD\u92BF",4,"\u92C5\u92C6\u92C7\u92C8\u92CB\u92CC\u92CD\u92CE\u92D0\u92D3\u92D5\u92D7\u92D8\u92D9\u92DC\u92DD\u92DF\u92E0\u92E1\u92E3\u92E5\u92E7\u92E8\u92EC\u92EE\u92F0\u92F9\u92FB\u92FF\u9300\u9302\u9308\u930D\u9311\u9314\u9315\u931C\u931D\u931E\u931F\u9321\u9324\u9325\u9327\u9329\u932A\u9333\u9334\u9336\u9337\u9347\u9348\u9349\u9350\u9351\u9352\u9355\u9357\u9358\u935A\u935E\u9364\u9365\u9367\u9369\u936A\u936D\u936F\u9370\u9371\u9373\u9374\u9376"],["8fe5a1","\u937A\u937D\u937F\u9380\u9381\u9382\u9388\u938A\u938B\u938D\u938F\u9392\u9395\u9398\u939B\u939E\u93A1\u93A3\u93A4\u93A6\u93A8\u93AB\u93B4\u93B5\u93B6\u93BA\u93A9\u93C1\u93C4\u93C5\u93C6\u93C7\u93C9",4,"\u93D3\u93D9\u93DC\u93DE\u93DF\u93E2\u93E6\u93E7\u93F9\u93F7\u93F8\u93FA\u93FB\u93FD\u9401\u9402\u9404\u9408\u9409\u940D\u940E\u940F\u9415\u9416\u9417\u941F\u942E\u942F\u9431\u9432\u9433\u9434\u943B\u943F\u943D\u9443\u9445\u9448\u944A\u944C\u9455\u9459\u945C\u945F\u9461\u9463\u9468\u946B\u946D\u946E\u946F\u9471\u9472\u9484\u9483\u9578\u9579"],["8fe6a1","\u957E\u9584\u9588\u958C\u958D\u958E\u959D\u959E\u959F\u95A1\u95A6\u95A9\u95AB\u95AC\u95B4\u95B6\u95BA\u95BD\u95BF\u95C6\u95C8\u95C9\u95CB\u95D0\u95D1\u95D2\u95D3\u95D9\u95DA\u95DD\u95DE\u95DF\u95E0\u95E4\u95E6\u961D\u961E\u9622\u9624\u9625\u9626\u962C\u9631\u9633\u9637\u9638\u9639\u963A\u963C\u963D\u9641\u9652\u9654\u9656\u9657\u9658\u9661\u966E\u9674\u967B\u967C\u967E\u967F\u9681\u9682\u9683\u9684\u9689\u9691\u9696\u969A\u969D\u969F\u96A4\u96A5\u96A6\u96A9\u96AE\u96AF\u96B3\u96BA\u96CA\u96D2\u5DB2\u96D8\u96DA\u96DD\u96DE\u96DF\u96E9\u96EF\u96F1\u96FA\u9702"],["8fe7a1","\u9703\u9705\u9709\u971A\u971B\u971D\u9721\u9722\u9723\u9728\u9731\u9733\u9741\u9743\u974A\u974E\u974F\u9755\u9757\u9758\u975A\u975B\u9763\u9767\u976A\u976E\u9773\u9776\u9777\u9778\u977B\u977D\u977F\u9780\u9789\u9795\u9796\u9797\u9799\u979A\u979E\u979F\u97A2\u97AC\u97AE\u97B1\u97B2\u97B5\u97B6\u97B8\u97B9\u97BA\u97BC\u97BE\u97BF\u97C1\u97C4\u97C5\u97C7\u97C9\u97CA\u97CC\u97CD\u97CE\u97D0\u97D1\u97D4\u97D7\u97D8\u97D9\u97DD\u97DE\u97E0\u97DB\u97E1\u97E4\u97EF\u97F1\u97F4\u97F7\u97F8\u97FA\u9807\u980A\u9819\u980D\u980E\u9814\u9816\u981C\u981E\u9820\u9823\u9826"],["8fe8a1","\u982B\u982E\u982F\u9830\u9832\u9833\u9835\u9825\u983E\u9844\u9847\u984A\u9851\u9852\u9853\u9856\u9857\u9859\u985A\u9862\u9863\u9865\u9866\u986A\u986C\u98AB\u98AD\u98AE\u98B0\u98B4\u98B7\u98B8\u98BA\u98BB\u98BF\u98C2\u98C5\u98C8\u98CC\u98E1\u98E3\u98E5\u98E6\u98E7\u98EA\u98F3\u98F6\u9902\u9907\u9908\u9911\u9915\u9916\u9917\u991A\u991B\u991C\u991F\u9922\u9926\u9927\u992B\u9931",4,"\u9939\u993A\u993B\u993C\u9940\u9941\u9946\u9947\u9948\u994D\u994E\u9954\u9958\u9959\u995B\u995C\u995E\u995F\u9960\u999B\u999D\u999F\u99A6\u99B0\u99B1\u99B2\u99B5"],["8fe9a1","\u99B9\u99BA\u99BD\u99BF\u99C3\u99C9\u99D3\u99D4\u99D9\u99DA\u99DC\u99DE\u99E7\u99EA\u99EB\u99EC\u99F0\u99F4\u99F5\u99F9\u99FD\u99FE\u9A02\u9A03\u9A04\u9A0B\u9A0C\u9A10\u9A11\u9A16\u9A1E\u9A20\u9A22\u9A23\u9A24\u9A27\u9A2D\u9A2E\u9A33\u9A35\u9A36\u9A38\u9A47\u9A41\u9A44\u9A4A\u9A4B\u9A4C\u9A4E\u9A51\u9A54\u9A56\u9A5D\u9AAA\u9AAC\u9AAE\u9AAF\u9AB2\u9AB4\u9AB5\u9AB6\u9AB9\u9ABB\u9ABE\u9ABF\u9AC1\u9AC3\u9AC6\u9AC8\u9ACE\u9AD0\u9AD2\u9AD5\u9AD6\u9AD7\u9ADB\u9ADC\u9AE0\u9AE4\u9AE5\u9AE7\u9AE9\u9AEC\u9AF2\u9AF3\u9AF5\u9AF9\u9AFA\u9AFD\u9AFF",4],["8feaa1","\u9B04\u9B05\u9B08\u9B09\u9B0B\u9B0C\u9B0D\u9B0E\u9B10\u9B12\u9B16\u9B19\u9B1B\u9B1C\u9B20\u9B26\u9B2B\u9B2D\u9B33\u9B34\u9B35\u9B37\u9B39\u9B3A\u9B3D\u9B48\u9B4B\u9B4C\u9B55\u9B56\u9B57\u9B5B\u9B5E\u9B61\u9B63\u9B65\u9B66\u9B68\u9B6A",4,"\u9B73\u9B75\u9B77\u9B78\u9B79\u9B7F\u9B80\u9B84\u9B85\u9B86\u9B87\u9B89\u9B8A\u9B8B\u9B8D\u9B8F\u9B90\u9B94\u9B9A\u9B9D\u9B9E\u9BA6\u9BA7\u9BA9\u9BAC\u9BB0\u9BB1\u9BB2\u9BB7\u9BB8\u9BBB\u9BBC\u9BBE\u9BBF\u9BC1\u9BC7\u9BC8\u9BCE\u9BD0\u9BD7\u9BD8\u9BDD\u9BDF\u9BE5\u9BE7\u9BEA\u9BEB\u9BEF\u9BF3\u9BF7\u9BF8"],["8feba1","\u9BF9\u9BFA\u9BFD\u9BFF\u9C00\u9C02\u9C0B\u9C0F\u9C11\u9C16\u9C18\u9C19\u9C1A\u9C1C\u9C1E\u9C22\u9C23\u9C26",4,"\u9C31\u9C35\u9C36\u9C37\u9C3D\u9C41\u9C43\u9C44\u9C45\u9C49\u9C4A\u9C4E\u9C4F\u9C50\u9C53\u9C54\u9C56\u9C58\u9C5B\u9C5D\u9C5E\u9C5F\u9C63\u9C69\u9C6A\u9C5C\u9C6B\u9C68\u9C6E\u9C70\u9C72\u9C75\u9C77\u9C7B\u9CE6\u9CF2\u9CF7\u9CF9\u9D0B\u9D02\u9D11\u9D17\u9D18\u9D1C\u9D1D\u9D1E\u9D2F\u9D30\u9D32\u9D33\u9D34\u9D3A\u9D3C\u9D45\u9D3D\u9D42\u9D43\u9D47\u9D4A\u9D53\u9D54\u9D5F\u9D63\u9D62\u9D65\u9D69\u9D6A\u9D6B\u9D70\u9D76\u9D77\u9D7B"],["8feca1","\u9D7C\u9D7E\u9D83\u9D84\u9D86\u9D8A\u9D8D\u9D8E\u9D92\u9D93\u9D95\u9D96\u9D97\u9D98\u9DA1\u9DAA\u9DAC\u9DAE\u9DB1\u9DB5\u9DB9\u9DBC\u9DBF\u9DC3\u9DC7\u9DC9\u9DCA\u9DD4\u9DD5\u9DD6\u9DD7\u9DDA\u9DDE\u9DDF\u9DE0\u9DE5\u9DE7\u9DE9\u9DEB\u9DEE\u9DF0\u9DF3\u9DF4\u9DFE\u9E0A\u9E02\u9E07\u9E0E\u9E10\u9E11\u9E12\u9E15\u9E16\u9E19\u9E1C\u9E1D\u9E7A\u9E7B\u9E7C\u9E80\u9E82\u9E83\u9E84\u9E85\u9E87\u9E8E\u9E8F\u9E96\u9E98\u9E9B\u9E9E\u9EA4\u9EA8\u9EAC\u9EAE\u9EAF\u9EB0\u9EB3\u9EB4\u9EB5\u9EC6\u9EC8\u9ECB\u9ED5\u9EDF\u9EE4\u9EE7\u9EEC\u9EED\u9EEE\u9EF0\u9EF1\u9EF2\u9EF5"],["8feda1","\u9EF8\u9EFF\u9F02\u9F03\u9F09\u9F0F\u9F10\u9F11\u9F12\u9F14\u9F16\u9F17\u9F19\u9F1A\u9F1B\u9F1F\u9F22\u9F26\u9F2A\u9F2B\u9F2F\u9F31\u9F32\u9F34\u9F37\u9F39\u9F3A\u9F3C\u9F3D\u9F3F\u9F41\u9F43",4,"\u9F53\u9F55\u9F56\u9F57\u9F58\u9F5A\u9F5D\u9F5E\u9F68\u9F69\u9F6D",4,"\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5"]],H4=[["0","\0",127,"\u20AC"],["8140","\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A",5,"\u4E72\u4E74",9,"\u4E7F",6,"\u4E87\u4E8A"],["8180","\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02",6,"\u4F0B\u4F0C\u4F12",4,"\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E",4,"\u4F44\u4F45\u4F47",5,"\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2"],["8240","\u4FA4\u4FAB\u4FAD\u4FB0",4,"\u4FB6",8,"\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2",4,"\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF",11],["8280","\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F",10,"\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050",4,"\u5056\u5057\u5058\u5059\u505B\u505D",7,"\u5066",5,"\u506D",8,"\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E",20,"\u50A4\u50A6\u50AA\u50AB\u50AD",4,"\u50B3",6,"\u50BC"],["8340","\u50BD",17,"\u50D0",5,"\u50D7\u50D8\u50D9\u50DB",10,"\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6",4,"\u50FC",9,"\u5108"],["8380","\u5109\u510A\u510C",5,"\u5113",13,"\u5122",28,"\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D",4,"\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6",4,"\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2",5],["8440","\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5",5,"\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244",5,"\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258"],["8480","\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273",9,"\u527E\u5280\u5283",4,"\u5289",6,"\u5291\u5292\u5294",6,"\u529C\u52A4\u52A5\u52A6\u52A7\u52AE\u52AF\u52B0\u52B4",9,"\u52C0\u52C1\u52C2\u52C4\u52C5\u52C6\u52C8\u52CA\u52CC\u52CD\u52CE\u52CF\u52D1\u52D3\u52D4\u52D5\u52D7\u52D9",5,"\u52E0\u52E1\u52E2\u52E3\u52E5",10,"\u52F1",7,"\u52FB\u52FC\u52FD\u5301\u5302\u5303\u5304\u5307\u5309\u530A\u530B\u530C\u530E"],["8540","\u5311\u5312\u5313\u5314\u5318\u531B\u531C\u531E\u531F\u5322\u5324\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u532F",9,"\u533C\u533D\u5340\u5342\u5344\u5346\u534B\u534C\u534D\u5350\u5354\u5358\u5359\u535B\u535D\u5365\u5368\u536A\u536C\u536D\u5372\u5376\u5379\u537B\u537C\u537D\u537E\u5380\u5381\u5383\u5387\u5388\u538A\u538E\u538F"],["8580","\u5390",4,"\u5396\u5397\u5399\u539B\u539C\u539E\u53A0\u53A1\u53A4\u53A7\u53AA\u53AB\u53AC\u53AD\u53AF",6,"\u53B7\u53B8\u53B9\u53BA\u53BC\u53BD\u53BE\u53C0\u53C3",4,"\u53CE\u53CF\u53D0\u53D2\u53D3\u53D5\u53DA\u53DC\u53DD\u53DE\u53E1\u53E2\u53E7\u53F4\u53FA\u53FE\u53FF\u5400\u5402\u5405\u5407\u540B\u5414\u5418\u5419\u541A\u541C\u5422\u5424\u5425\u542A\u5430\u5433\u5436\u5437\u543A\u543D\u543F\u5441\u5442\u5444\u5445\u5447\u5449\u544C\u544D\u544E\u544F\u5451\u545A\u545D",4,"\u5463\u5465\u5467\u5469",7,"\u5474\u5479\u547A\u547E\u547F\u5481\u5483\u5485\u5487\u5488\u5489\u548A\u548D\u5491\u5493\u5497\u5498\u549C\u549E\u549F\u54A0\u54A1"],["8640","\u54A2\u54A5\u54AE\u54B0\u54B2\u54B5\u54B6\u54B7\u54B9\u54BA\u54BC\u54BE\u54C3\u54C5\u54CA\u54CB\u54D6\u54D8\u54DB\u54E0",4,"\u54EB\u54EC\u54EF\u54F0\u54F1\u54F4",5,"\u54FB\u54FE\u5500\u5502\u5503\u5504\u5505\u5508\u550A",4,"\u5512\u5513\u5515",5,"\u551C\u551D\u551E\u551F\u5521\u5525\u5526"],["8680","\u5528\u5529\u552B\u552D\u5532\u5534\u5535\u5536\u5538\u5539\u553A\u553B\u553D\u5540\u5542\u5545\u5547\u5548\u554B",4,"\u5551\u5552\u5553\u5554\u5557",4,"\u555D\u555E\u555F\u5560\u5562\u5563\u5568\u5569\u556B\u556F",5,"\u5579\u557A\u557D\u557F\u5585\u5586\u558C\u558D\u558E\u5590\u5592\u5593\u5595\u5596\u5597\u559A\u559B\u559E\u55A0",6,"\u55A8",8,"\u55B2\u55B4\u55B6\u55B8\u55BA\u55BC\u55BF",4,"\u55C6\u55C7\u55C8\u55CA\u55CB\u55CE\u55CF\u55D0\u55D5\u55D7",4,"\u55DE\u55E0\u55E2\u55E7\u55E9\u55ED\u55EE\u55F0\u55F1\u55F4\u55F6\u55F8",4,"\u55FF\u5602\u5603\u5604\u5605"],["8740","\u5606\u5607\u560A\u560B\u560D\u5610",7,"\u5619\u561A\u561C\u561D\u5620\u5621\u5622\u5625\u5626\u5628\u5629\u562A\u562B\u562E\u562F\u5630\u5633\u5635\u5637\u5638\u563A\u563C\u563D\u563E\u5640",11,"\u564F",4,"\u5655\u5656\u565A\u565B\u565D",4],["8780","\u5663\u5665\u5666\u5667\u566D\u566E\u566F\u5670\u5672\u5673\u5674\u5675\u5677\u5678\u5679\u567A\u567D",7,"\u5687",6,"\u5690\u5691\u5692\u5694",14,"\u56A4",10,"\u56B0",6,"\u56B8\u56B9\u56BA\u56BB\u56BD",12,"\u56CB",8,"\u56D5\u56D6\u56D8\u56D9\u56DC\u56E3\u56E5",5,"\u56EC\u56EE\u56EF\u56F2\u56F3\u56F6\u56F7\u56F8\u56FB\u56FC\u5700\u5701\u5702\u5705\u5707\u570B",6],["8840","\u5712",9,"\u571D\u571E\u5720\u5721\u5722\u5724\u5725\u5726\u5727\u572B\u5731\u5732\u5734",4,"\u573C\u573D\u573F\u5741\u5743\u5744\u5745\u5746\u5748\u5749\u574B\u5752",4,"\u5758\u5759\u5762\u5763\u5765\u5767\u576C\u576E\u5770\u5771\u5772\u5774\u5775\u5778\u5779\u577A\u577D\u577E\u577F\u5780"],["8880","\u5781\u5787\u5788\u5789\u578A\u578D",4,"\u5794",6,"\u579C\u579D\u579E\u579F\u57A5\u57A8\u57AA\u57AC\u57AF\u57B0\u57B1\u57B3\u57B5\u57B6\u57B7\u57B9",8,"\u57C4",6,"\u57CC\u57CD\u57D0\u57D1\u57D3\u57D6\u57D7\u57DB\u57DC\u57DE\u57E1\u57E2\u57E3\u57E5",7,"\u57EE\u57F0\u57F1\u57F2\u57F3\u57F5\u57F6\u57F7\u57FB\u57FC\u57FE\u57FF\u5801\u5803\u5804\u5805\u5808\u5809\u580A\u580C\u580E\u580F\u5810\u5812\u5813\u5814\u5816\u5817\u5818\u581A\u581B\u581C\u581D\u581F\u5822\u5823\u5825",4,"\u582B",4,"\u5831\u5832\u5833\u5834\u5836",7],["8940","\u583E",5,"\u5845",6,"\u584E\u584F\u5850\u5852\u5853\u5855\u5856\u5857\u5859",4,"\u585F",5,"\u5866",4,"\u586D",16,"\u587F\u5882\u5884\u5886\u5887\u5888\u588A\u588B\u588C"],["8980","\u588D",4,"\u5894",4,"\u589B\u589C\u589D\u58A0",7,"\u58AA",17,"\u58BD\u58BE\u58BF\u58C0\u58C2\u58C3\u58C4\u58C6",10,"\u58D2\u58D3\u58D4\u58D6",13,"\u58E5",5,"\u58ED\u58EF\u58F1\u58F2\u58F4\u58F5\u58F7\u58F8\u58FA",7,"\u5903\u5905\u5906\u5908",4,"\u590E\u5910\u5911\u5912\u5913\u5917\u5918\u591B\u591D\u591E\u5920\u5921\u5922\u5923\u5926\u5928\u592C\u5930\u5932\u5933\u5935\u5936\u593B"],["8a40","\u593D\u593E\u593F\u5940\u5943\u5945\u5946\u594A\u594C\u594D\u5950\u5952\u5953\u5959\u595B",4,"\u5961\u5963\u5964\u5966",12,"\u5975\u5977\u597A\u597B\u597C\u597E\u597F\u5980\u5985\u5989\u598B\u598C\u598E\u598F\u5990\u5991\u5994\u5995\u5998\u599A\u599B\u599C\u599D\u599F\u59A0\u59A1\u59A2\u59A6"],["8a80","\u59A7\u59AC\u59AD\u59B0\u59B1\u59B3",5,"\u59BA\u59BC\u59BD\u59BF",6,"\u59C7\u59C8\u59C9\u59CC\u59CD\u59CE\u59CF\u59D5\u59D6\u59D9\u59DB\u59DE",4,"\u59E4\u59E6\u59E7\u59E9\u59EA\u59EB\u59ED",11,"\u59FA\u59FC\u59FD\u59FE\u5A00\u5A02\u5A0A\u5A0B\u5A0D\u5A0E\u5A0F\u5A10\u5A12\u5A14\u5A15\u5A16\u5A17\u5A19\u5A1A\u5A1B\u5A1D\u5A1E\u5A21\u5A22\u5A24\u5A26\u5A27\u5A28\u5A2A",6,"\u5A33\u5A35\u5A37",4,"\u5A3D\u5A3E\u5A3F\u5A41",4,"\u5A47\u5A48\u5A4B",9,"\u5A56\u5A57\u5A58\u5A59\u5A5B",5],["8b40","\u5A61\u5A63\u5A64\u5A65\u5A66\u5A68\u5A69\u5A6B",8,"\u5A78\u5A79\u5A7B\u5A7C\u5A7D\u5A7E\u5A80",17,"\u5A93",6,"\u5A9C",13,"\u5AAB\u5AAC"],["8b80","\u5AAD",4,"\u5AB4\u5AB6\u5AB7\u5AB9",4,"\u5ABF\u5AC0\u5AC3",5,"\u5ACA\u5ACB\u5ACD",4,"\u5AD3\u5AD5\u5AD7\u5AD9\u5ADA\u5ADB\u5ADD\u5ADE\u5ADF\u5AE2\u5AE4\u5AE5\u5AE7\u5AE8\u5AEA\u5AEC",4,"\u5AF2",22,"\u5B0A",11,"\u5B18",25,"\u5B33\u5B35\u5B36\u5B38",7,"\u5B41",6],["8c40","\u5B48",7,"\u5B52\u5B56\u5B5E\u5B60\u5B61\u5B67\u5B68\u5B6B\u5B6D\u5B6E\u5B6F\u5B72\u5B74\u5B76\u5B77\u5B78\u5B79\u5B7B\u5B7C\u5B7E\u5B7F\u5B82\u5B86\u5B8A\u5B8D\u5B8E\u5B90\u5B91\u5B92\u5B94\u5B96\u5B9F\u5BA7\u5BA8\u5BA9\u5BAC\u5BAD\u5BAE\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBB\u5BBC\u5BC0\u5BC1\u5BC3\u5BC8\u5BC9\u5BCA\u5BCB\u5BCD\u5BCE\u5BCF"],["8c80","\u5BD1\u5BD4",8,"\u5BE0\u5BE2\u5BE3\u5BE6\u5BE7\u5BE9",4,"\u5BEF\u5BF1",6,"\u5BFD\u5BFE\u5C00\u5C02\u5C03\u5C05\u5C07\u5C08\u5C0B\u5C0C\u5C0D\u5C0E\u5C10\u5C12\u5C13\u5C17\u5C19\u5C1B\u5C1E\u5C1F\u5C20\u5C21\u5C23\u5C26\u5C28\u5C29\u5C2A\u5C2B\u5C2D\u5C2E\u5C2F\u5C30\u5C32\u5C33\u5C35\u5C36\u5C37\u5C43\u5C44\u5C46\u5C47\u5C4C\u5C4D\u5C52\u5C53\u5C54\u5C56\u5C57\u5C58\u5C5A\u5C5B\u5C5C\u5C5D\u5C5F\u5C62\u5C64\u5C67",6,"\u5C70\u5C72",6,"\u5C7B\u5C7C\u5C7D\u5C7E\u5C80\u5C83",4,"\u5C89\u5C8A\u5C8B\u5C8E\u5C8F\u5C92\u5C93\u5C95\u5C9D",4,"\u5CA4",4],["8d40","\u5CAA\u5CAE\u5CAF\u5CB0\u5CB2\u5CB4\u5CB6\u5CB9\u5CBA\u5CBB\u5CBC\u5CBE\u5CC0\u5CC2\u5CC3\u5CC5",5,"\u5CCC",5,"\u5CD3",5,"\u5CDA",6,"\u5CE2\u5CE3\u5CE7\u5CE9\u5CEB\u5CEC\u5CEE\u5CEF\u5CF1",9,"\u5CFC",4],["8d80","\u5D01\u5D04\u5D05\u5D08",5,"\u5D0F",4,"\u5D15\u5D17\u5D18\u5D19\u5D1A\u5D1C\u5D1D\u5D1F",4,"\u5D25\u5D28\u5D2A\u5D2B\u5D2C\u5D2F",4,"\u5D35",7,"\u5D3F",7,"\u5D48\u5D49\u5D4D",10,"\u5D59\u5D5A\u5D5C\u5D5E",10,"\u5D6A\u5D6D\u5D6E\u5D70\u5D71\u5D72\u5D73\u5D75",12,"\u5D83",21,"\u5D9A\u5D9B\u5D9C\u5D9E\u5D9F\u5DA0"],["8e40","\u5DA1",21,"\u5DB8",12,"\u5DC6",6,"\u5DCE",12,"\u5DDC\u5DDF\u5DE0\u5DE3\u5DE4\u5DEA\u5DEC\u5DED"],["8e80","\u5DF0\u5DF5\u5DF6\u5DF8",4,"\u5DFF\u5E00\u5E04\u5E07\u5E09\u5E0A\u5E0B\u5E0D\u5E0E\u5E12\u5E13\u5E17\u5E1E",7,"\u5E28",4,"\u5E2F\u5E30\u5E32",4,"\u5E39\u5E3A\u5E3E\u5E3F\u5E40\u5E41\u5E43\u5E46",5,"\u5E4D",6,"\u5E56",4,"\u5E5C\u5E5D\u5E5F\u5E60\u5E63",14,"\u5E75\u5E77\u5E79\u5E7E\u5E81\u5E82\u5E83\u5E85\u5E88\u5E89\u5E8C\u5E8D\u5E8E\u5E92\u5E98\u5E9B\u5E9D\u5EA1\u5EA2\u5EA3\u5EA4\u5EA8",4,"\u5EAE",4,"\u5EB4\u5EBA\u5EBB\u5EBC\u5EBD\u5EBF",6],["8f40","\u5EC6\u5EC7\u5EC8\u5ECB",5,"\u5ED4\u5ED5\u5ED7\u5ED8\u5ED9\u5EDA\u5EDC",11,"\u5EE9\u5EEB",8,"\u5EF5\u5EF8\u5EF9\u5EFB\u5EFC\u5EFD\u5F05\u5F06\u5F07\u5F09\u5F0C\u5F0D\u5F0E\u5F10\u5F12\u5F14\u5F16\u5F19\u5F1A\u5F1C\u5F1D\u5F1E\u5F21\u5F22\u5F23\u5F24"],["8f80","\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F32",6,"\u5F3B\u5F3D\u5F3E\u5F3F\u5F41",14,"\u5F51\u5F54\u5F59\u5F5A\u5F5B\u5F5C\u5F5E\u5F5F\u5F60\u5F63\u5F65\u5F67\u5F68\u5F6B\u5F6E\u5F6F\u5F72\u5F74\u5F75\u5F76\u5F78\u5F7A\u5F7D\u5F7E\u5F7F\u5F83\u5F86\u5F8D\u5F8E\u5F8F\u5F91\u5F93\u5F94\u5F96\u5F9A\u5F9B\u5F9D\u5F9E\u5F9F\u5FA0\u5FA2",5,"\u5FA9\u5FAB\u5FAC\u5FAF",5,"\u5FB6\u5FB8\u5FB9\u5FBA\u5FBB\u5FBE",4,"\u5FC7\u5FC8\u5FCA\u5FCB\u5FCE\u5FD3\u5FD4\u5FD5\u5FDA\u5FDB\u5FDC\u5FDE\u5FDF\u5FE2\u5FE3\u5FE5\u5FE6\u5FE8\u5FE9\u5FEC\u5FEF\u5FF0\u5FF2\u5FF3\u5FF4\u5FF6\u5FF7\u5FF9\u5FFA\u5FFC\u6007"],["9040","\u6008\u6009\u600B\u600C\u6010\u6011\u6013\u6017\u6018\u601A\u601E\u601F\u6022\u6023\u6024\u602C\u602D\u602E\u6030",4,"\u6036",4,"\u603D\u603E\u6040\u6044",6,"\u604C\u604E\u604F\u6051\u6053\u6054\u6056\u6057\u6058\u605B\u605C\u605E\u605F\u6060\u6061\u6065\u6066\u606E\u6071\u6072\u6074\u6075\u6077\u607E\u6080"],["9080","\u6081\u6082\u6085\u6086\u6087\u6088\u608A\u608B\u608E\u608F\u6090\u6091\u6093\u6095\u6097\u6098\u6099\u609C\u609E\u60A1\u60A2\u60A4\u60A5\u60A7\u60A9\u60AA\u60AE\u60B0\u60B3\u60B5\u60B6\u60B7\u60B9\u60BA\u60BD",7,"\u60C7\u60C8\u60C9\u60CC",4,"\u60D2\u60D3\u60D4\u60D6\u60D7\u60D9\u60DB\u60DE\u60E1",4,"\u60EA\u60F1\u60F2\u60F5\u60F7\u60F8\u60FB",4,"\u6102\u6103\u6104\u6105\u6107\u610A\u610B\u610C\u6110",4,"\u6116\u6117\u6118\u6119\u611B\u611C\u611D\u611E\u6121\u6122\u6125\u6128\u6129\u612A\u612C",18,"\u6140",6],["9140","\u6147\u6149\u614B\u614D\u614F\u6150\u6152\u6153\u6154\u6156",6,"\u615E\u615F\u6160\u6161\u6163\u6164\u6165\u6166\u6169",6,"\u6171\u6172\u6173\u6174\u6176\u6178",18,"\u618C\u618D\u618F",4,"\u6195"],["9180","\u6196",6,"\u619E",8,"\u61AA\u61AB\u61AD",9,"\u61B8",5,"\u61BF\u61C0\u61C1\u61C3",4,"\u61C9\u61CC",4,"\u61D3\u61D5",16,"\u61E7",13,"\u61F6",8,"\u6200",5,"\u6207\u6209\u6213\u6214\u6219\u621C\u621D\u621E\u6220\u6223\u6226\u6227\u6228\u6229\u622B\u622D\u622F\u6230\u6231\u6232\u6235\u6236\u6238",4,"\u6242\u6244\u6245\u6246\u624A"],["9240","\u624F\u6250\u6255\u6256\u6257\u6259\u625A\u625C",6,"\u6264\u6265\u6268\u6271\u6272\u6274\u6275\u6277\u6278\u627A\u627B\u627D\u6281\u6282\u6283\u6285\u6286\u6287\u6288\u628B",5,"\u6294\u6299\u629C\u629D\u629E\u62A3\u62A6\u62A7\u62A9\u62AA\u62AD\u62AE\u62AF\u62B0\u62B2\u62B3\u62B4\u62B6\u62B7\u62B8\u62BA\u62BE\u62C0\u62C1"],["9280","\u62C3\u62CB\u62CF\u62D1\u62D5\u62DD\u62DE\u62E0\u62E1\u62E4\u62EA\u62EB\u62F0\u62F2\u62F5\u62F8\u62F9\u62FA\u62FB\u6300\u6303\u6304\u6305\u6306\u630A\u630B\u630C\u630D\u630F\u6310\u6312\u6313\u6314\u6315\u6317\u6318\u6319\u631C\u6326\u6327\u6329\u632C\u632D\u632E\u6330\u6331\u6333",5,"\u633B\u633C\u633E\u633F\u6340\u6341\u6344\u6347\u6348\u634A\u6351\u6352\u6353\u6354\u6356",7,"\u6360\u6364\u6365\u6366\u6368\u636A\u636B\u636C\u636F\u6370\u6372\u6373\u6374\u6375\u6378\u6379\u637C\u637D\u637E\u637F\u6381\u6383\u6384\u6385\u6386\u638B\u638D\u6391\u6393\u6394\u6395\u6397\u6399",6,"\u63A1\u63A4\u63A6\u63AB\u63AF\u63B1\u63B2\u63B5\u63B6\u63B9\u63BB\u63BD\u63BF\u63C0"],["9340","\u63C1\u63C2\u63C3\u63C5\u63C7\u63C8\u63CA\u63CB\u63CC\u63D1\u63D3\u63D4\u63D5\u63D7",6,"\u63DF\u63E2\u63E4",4,"\u63EB\u63EC\u63EE\u63EF\u63F0\u63F1\u63F3\u63F5\u63F7\u63F9\u63FA\u63FB\u63FC\u63FE\u6403\u6404\u6406",4,"\u640D\u640E\u6411\u6412\u6415",5,"\u641D\u641F\u6422\u6423\u6424"],["9380","\u6425\u6427\u6428\u6429\u642B\u642E",5,"\u6435",4,"\u643B\u643C\u643E\u6440\u6442\u6443\u6449\u644B",6,"\u6453\u6455\u6456\u6457\u6459",4,"\u645F",7,"\u6468\u646A\u646B\u646C\u646E",9,"\u647B",6,"\u6483\u6486\u6488",8,"\u6493\u6494\u6497\u6498\u649A\u649B\u649C\u649D\u649F",4,"\u64A5\u64A6\u64A7\u64A8\u64AA\u64AB\u64AF\u64B1\u64B2\u64B3\u64B4\u64B6\u64B9\u64BB\u64BD\u64BE\u64BF\u64C1\u64C3\u64C4\u64C6",6,"\u64CF\u64D1\u64D3\u64D4\u64D5\u64D6\u64D9\u64DA"],["9440","\u64DB\u64DC\u64DD\u64DF\u64E0\u64E1\u64E3\u64E5\u64E7",24,"\u6501",7,"\u650A",7,"\u6513",4,"\u6519",8],["9480","\u6522\u6523\u6524\u6526",4,"\u652C\u652D\u6530\u6531\u6532\u6533\u6537\u653A\u653C\u653D\u6540",4,"\u6546\u6547\u654A\u654B\u654D\u654E\u6550\u6552\u6553\u6554\u6557\u6558\u655A\u655C\u655F\u6560\u6561\u6564\u6565\u6567\u6568\u6569\u656A\u656D\u656E\u656F\u6571\u6573\u6575\u6576\u6578",14,"\u6588\u6589\u658A\u658D\u658E\u658F\u6592\u6594\u6595\u6596\u6598\u659A\u659D\u659E\u65A0\u65A2\u65A3\u65A6\u65A8\u65AA\u65AC\u65AE\u65B1",7,"\u65BA\u65BB\u65BE\u65BF\u65C0\u65C2\u65C7\u65C8\u65C9\u65CA\u65CD\u65D0\u65D1\u65D3\u65D4\u65D5\u65D8",7,"\u65E1\u65E3\u65E4\u65EA\u65EB"],["9540","\u65F2\u65F3\u65F4\u65F5\u65F8\u65F9\u65FB",4,"\u6601\u6604\u6605\u6607\u6608\u6609\u660B\u660D\u6610\u6611\u6612\u6616\u6617\u6618\u661A\u661B\u661C\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6632\u6633\u6637",4,"\u663D\u663F\u6640\u6642\u6644",6,"\u664D\u664E\u6650\u6651\u6658"],["9580","\u6659\u665B\u665C\u665D\u665E\u6660\u6662\u6663\u6665\u6667\u6669",4,"\u6671\u6672\u6673\u6675\u6678\u6679\u667B\u667C\u667D\u667F\u6680\u6681\u6683\u6685\u6686\u6688\u6689\u668A\u668B\u668D\u668E\u668F\u6690\u6692\u6693\u6694\u6695\u6698",4,"\u669E",8,"\u66A9",4,"\u66AF",4,"\u66B5\u66B6\u66B7\u66B8\u66BA\u66BB\u66BC\u66BD\u66BF",25,"\u66DA\u66DE",7,"\u66E7\u66E8\u66EA",5,"\u66F1\u66F5\u66F6\u66F8\u66FA\u66FB\u66FD\u6701\u6702\u6703"],["9640","\u6704\u6705\u6706\u6707\u670C\u670E\u670F\u6711\u6712\u6713\u6716\u6718\u6719\u671A\u671C\u671E\u6720",5,"\u6727\u6729\u672E\u6730\u6732\u6733\u6736\u6737\u6738\u6739\u673B\u673C\u673E\u673F\u6741\u6744\u6745\u6747\u674A\u674B\u674D\u6752\u6754\u6755\u6757",4,"\u675D\u6762\u6763\u6764\u6766\u6767\u676B\u676C\u676E\u6771\u6774\u6776"],["9680","\u6778\u6779\u677A\u677B\u677D\u6780\u6782\u6783\u6785\u6786\u6788\u678A\u678C\u678D\u678E\u678F\u6791\u6792\u6793\u6794\u6796\u6799\u679B\u679F\u67A0\u67A1\u67A4\u67A6\u67A9\u67AC\u67AE\u67B1\u67B2\u67B4\u67B9",7,"\u67C2\u67C5",9,"\u67D5\u67D6\u67D7\u67DB\u67DF\u67E1\u67E3\u67E4\u67E6\u67E7\u67E8\u67EA\u67EB\u67ED\u67EE\u67F2\u67F5",7,"\u67FE\u6801\u6802\u6803\u6804\u6806\u680D\u6810\u6812\u6814\u6815\u6818",4,"\u681E\u681F\u6820\u6822",6,"\u682B",6,"\u6834\u6835\u6836\u683A\u683B\u683F\u6847\u684B\u684D\u684F\u6852\u6856",5],["9740","\u685C\u685D\u685E\u685F\u686A\u686C",7,"\u6875\u6878",8,"\u6882\u6884\u6887",7,"\u6890\u6891\u6892\u6894\u6895\u6896\u6898",9,"\u68A3\u68A4\u68A5\u68A9\u68AA\u68AB\u68AC\u68AE\u68B1\u68B2\u68B4\u68B6\u68B7\u68B8"],["9780","\u68B9",6,"\u68C1\u68C3",5,"\u68CA\u68CC\u68CE\u68CF\u68D0\u68D1\u68D3\u68D4\u68D6\u68D7\u68D9\u68DB",4,"\u68E1\u68E2\u68E4",9,"\u68EF\u68F2\u68F3\u68F4\u68F6\u68F7\u68F8\u68FB\u68FD\u68FE\u68FF\u6900\u6902\u6903\u6904\u6906",4,"\u690C\u690F\u6911\u6913",11,"\u6921\u6922\u6923\u6925",7,"\u692E\u692F\u6931\u6932\u6933\u6935\u6936\u6937\u6938\u693A\u693B\u693C\u693E\u6940\u6941\u6943",16,"\u6955\u6956\u6958\u6959\u695B\u695C\u695F"],["9840","\u6961\u6962\u6964\u6965\u6967\u6968\u6969\u696A\u696C\u696D\u696F\u6970\u6972",4,"\u697A\u697B\u697D\u697E\u697F\u6981\u6983\u6985\u698A\u698B\u698C\u698E",5,"\u6996\u6997\u6999\u699A\u699D",9,"\u69A9\u69AA\u69AC\u69AE\u69AF\u69B0\u69B2\u69B3\u69B5\u69B6\u69B8\u69B9\u69BA\u69BC\u69BD"],["9880","\u69BE\u69BF\u69C0\u69C2",7,"\u69CB\u69CD\u69CF\u69D1\u69D2\u69D3\u69D5",5,"\u69DC\u69DD\u69DE\u69E1",11,"\u69EE\u69EF\u69F0\u69F1\u69F3",9,"\u69FE\u6A00",9,"\u6A0B",11,"\u6A19",5,"\u6A20\u6A22",5,"\u6A29\u6A2B\u6A2C\u6A2D\u6A2E\u6A30\u6A32\u6A33\u6A34\u6A36",6,"\u6A3F",4,"\u6A45\u6A46\u6A48",7,"\u6A51",6,"\u6A5A"],["9940","\u6A5C",4,"\u6A62\u6A63\u6A64\u6A66",10,"\u6A72",6,"\u6A7A\u6A7B\u6A7D\u6A7E\u6A7F\u6A81\u6A82\u6A83\u6A85",8,"\u6A8F\u6A92",4,"\u6A98",7,"\u6AA1",5],["9980","\u6AA7\u6AA8\u6AAA\u6AAD",114,"\u6B25\u6B26\u6B28",6],["9a40","\u6B2F\u6B30\u6B31\u6B33\u6B34\u6B35\u6B36\u6B38\u6B3B\u6B3C\u6B3D\u6B3F\u6B40\u6B41\u6B42\u6B44\u6B45\u6B48\u6B4A\u6B4B\u6B4D",11,"\u6B5A",7,"\u6B68\u6B69\u6B6B",13,"\u6B7A\u6B7D\u6B7E\u6B7F\u6B80\u6B85\u6B88"],["9a80","\u6B8C\u6B8E\u6B8F\u6B90\u6B91\u6B94\u6B95\u6B97\u6B98\u6B99\u6B9C",4,"\u6BA2",7,"\u6BAB",7,"\u6BB6\u6BB8",6,"\u6BC0\u6BC3\u6BC4\u6BC6",4,"\u6BCC\u6BCE\u6BD0\u6BD1\u6BD8\u6BDA\u6BDC",4,"\u6BE2",7,"\u6BEC\u6BED\u6BEE\u6BF0\u6BF1\u6BF2\u6BF4\u6BF6\u6BF7\u6BF8\u6BFA\u6BFB\u6BFC\u6BFE",6,"\u6C08",4,"\u6C0E\u6C12\u6C17\u6C1C\u6C1D\u6C1E\u6C20\u6C23\u6C25\u6C2B\u6C2C\u6C2D\u6C31\u6C33\u6C36\u6C37\u6C39\u6C3A\u6C3B\u6C3C\u6C3E\u6C3F\u6C43\u6C44\u6C45\u6C48\u6C4B",4,"\u6C51\u6C52\u6C53\u6C56\u6C58"],["9b40","\u6C59\u6C5A\u6C62\u6C63\u6C65\u6C66\u6C67\u6C6B",4,"\u6C71\u6C73\u6C75\u6C77\u6C78\u6C7A\u6C7B\u6C7C\u6C7F\u6C80\u6C84\u6C87\u6C8A\u6C8B\u6C8D\u6C8E\u6C91\u6C92\u6C95\u6C96\u6C97\u6C98\u6C9A\u6C9C\u6C9D\u6C9E\u6CA0\u6CA2\u6CA8\u6CAC\u6CAF\u6CB0\u6CB4\u6CB5\u6CB6\u6CB7\u6CBA\u6CC0\u6CC1\u6CC2\u6CC3\u6CC6\u6CC7\u6CC8\u6CCB\u6CCD\u6CCE\u6CCF\u6CD1\u6CD2\u6CD8"],["9b80","\u6CD9\u6CDA\u6CDC\u6CDD\u6CDF\u6CE4\u6CE6\u6CE7\u6CE9\u6CEC\u6CED\u6CF2\u6CF4\u6CF9\u6CFF\u6D00\u6D02\u6D03\u6D05\u6D06\u6D08\u6D09\u6D0A\u6D0D\u6D0F\u6D10\u6D11\u6D13\u6D14\u6D15\u6D16\u6D18\u6D1C\u6D1D\u6D1F",5,"\u6D26\u6D28\u6D29\u6D2C\u6D2D\u6D2F\u6D30\u6D34\u6D36\u6D37\u6D38\u6D3A\u6D3F\u6D40\u6D42\u6D44\u6D49\u6D4C\u6D50\u6D55\u6D56\u6D57\u6D58\u6D5B\u6D5D\u6D5F\u6D61\u6D62\u6D64\u6D65\u6D67\u6D68\u6D6B\u6D6C\u6D6D\u6D70\u6D71\u6D72\u6D73\u6D75\u6D76\u6D79\u6D7A\u6D7B\u6D7D",4,"\u6D83\u6D84\u6D86\u6D87\u6D8A\u6D8B\u6D8D\u6D8F\u6D90\u6D92\u6D96",4,"\u6D9C\u6DA2\u6DA5\u6DAC\u6DAD\u6DB0\u6DB1\u6DB3\u6DB4\u6DB6\u6DB7\u6DB9",5,"\u6DC1\u6DC2\u6DC3\u6DC8\u6DC9\u6DCA"],["9c40","\u6DCD\u6DCE\u6DCF\u6DD0\u6DD2\u6DD3\u6DD4\u6DD5\u6DD7\u6DDA\u6DDB\u6DDC\u6DDF\u6DE2\u6DE3\u6DE5\u6DE7\u6DE8\u6DE9\u6DEA\u6DED\u6DEF\u6DF0\u6DF2\u6DF4\u6DF5\u6DF6\u6DF8\u6DFA\u6DFD",7,"\u6E06\u6E07\u6E08\u6E09\u6E0B\u6E0F\u6E12\u6E13\u6E15\u6E18\u6E19\u6E1B\u6E1C\u6E1E\u6E1F\u6E22\u6E26\u6E27\u6E28\u6E2A\u6E2C\u6E2E\u6E30\u6E31\u6E33\u6E35"],["9c80","\u6E36\u6E37\u6E39\u6E3B",7,"\u6E45",7,"\u6E4F\u6E50\u6E51\u6E52\u6E55\u6E57\u6E59\u6E5A\u6E5C\u6E5D\u6E5E\u6E60",10,"\u6E6C\u6E6D\u6E6F",14,"\u6E80\u6E81\u6E82\u6E84\u6E87\u6E88\u6E8A",4,"\u6E91",6,"\u6E99\u6E9A\u6E9B\u6E9D\u6E9E\u6EA0\u6EA1\u6EA3\u6EA4\u6EA6\u6EA8\u6EA9\u6EAB\u6EAC\u6EAD\u6EAE\u6EB0\u6EB3\u6EB5\u6EB8\u6EB9\u6EBC\u6EBE\u6EBF\u6EC0\u6EC3\u6EC4\u6EC5\u6EC6\u6EC8\u6EC9\u6ECA\u6ECC\u6ECD\u6ECE\u6ED0\u6ED2\u6ED6\u6ED8\u6ED9\u6EDB\u6EDC\u6EDD\u6EE3\u6EE7\u6EEA",5],["9d40","\u6EF0\u6EF1\u6EF2\u6EF3\u6EF5\u6EF6\u6EF7\u6EF8\u6EFA",7,"\u6F03\u6F04\u6F05\u6F07\u6F08\u6F0A",4,"\u6F10\u6F11\u6F12\u6F16",9,"\u6F21\u6F22\u6F23\u6F25\u6F26\u6F27\u6F28\u6F2C\u6F2E\u6F30\u6F32\u6F34\u6F35\u6F37",6,"\u6F3F\u6F40\u6F41\u6F42"],["9d80","\u6F43\u6F44\u6F45\u6F48\u6F49\u6F4A\u6F4C\u6F4E",9,"\u6F59\u6F5A\u6F5B\u6F5D\u6F5F\u6F60\u6F61\u6F63\u6F64\u6F65\u6F67",5,"\u6F6F\u6F70\u6F71\u6F73\u6F75\u6F76\u6F77\u6F79\u6F7B\u6F7D",6,"\u6F85\u6F86\u6F87\u6F8A\u6F8B\u6F8F",12,"\u6F9D\u6F9E\u6F9F\u6FA0\u6FA2",4,"\u6FA8",10,"\u6FB4\u6FB5\u6FB7\u6FB8\u6FBA",5,"\u6FC1\u6FC3",5,"\u6FCA",6,"\u6FD3",10,"\u6FDF\u6FE2\u6FE3\u6FE4\u6FE5"],["9e40","\u6FE6",7,"\u6FF0",32,"\u7012",7,"\u701C",6,"\u7024",6],["9e80","\u702B",9,"\u7036\u7037\u7038\u703A",17,"\u704D\u704E\u7050",13,"\u705F",11,"\u706E\u7071\u7072\u7073\u7074\u7077\u7079\u707A\u707B\u707D\u7081\u7082\u7083\u7084\u7086\u7087\u7088\u708B\u708C\u708D\u708F\u7090\u7091\u7093\u7097\u7098\u709A\u709B\u709E",12,"\u70B0\u70B2\u70B4\u70B5\u70B6\u70BA\u70BE\u70BF\u70C4\u70C5\u70C6\u70C7\u70C9\u70CB",12,"\u70DA"],["9f40","\u70DC\u70DD\u70DE\u70E0\u70E1\u70E2\u70E3\u70E5\u70EA\u70EE\u70F0",6,"\u70F8\u70FA\u70FB\u70FC\u70FE",10,"\u710B",4,"\u7111\u7112\u7114\u7117\u711B",10,"\u7127",7,"\u7132\u7133\u7134"],["9f80","\u7135\u7137",13,"\u7146\u7147\u7148\u7149\u714B\u714D\u714F",12,"\u715D\u715F",4,"\u7165\u7169",4,"\u716F\u7170\u7171\u7174\u7175\u7176\u7177\u7179\u717B\u717C\u717E",5,"\u7185",4,"\u718B\u718C\u718D\u718E\u7190\u7191\u7192\u7193\u7195\u7196\u7197\u719A",4,"\u71A1",6,"\u71A9\u71AA\u71AB\u71AD",5,"\u71B4\u71B6\u71B7\u71B8\u71BA",8,"\u71C4",9,"\u71CF",4],["a040","\u71D6",9,"\u71E1\u71E2\u71E3\u71E4\u71E6\u71E8",5,"\u71EF",9,"\u71FA",11,"\u7207",19],["a080","\u721B\u721C\u721E",9,"\u7229\u722B\u722D\u722E\u722F\u7232\u7233\u7234\u723A\u723C\u723E\u7240",6,"\u7249\u724A\u724B\u724E\u724F\u7250\u7251\u7253\u7254\u7255\u7257\u7258\u725A\u725C\u725E\u7260\u7263\u7264\u7265\u7268\u726A\u726B\u726C\u726D\u7270\u7271\u7273\u7274\u7276\u7277\u7278\u727B\u727C\u727D\u7282\u7283\u7285",4,"\u728C\u728E\u7290\u7291\u7293",11,"\u72A0",11,"\u72AE\u72B1\u72B2\u72B3\u72B5\u72BA",6,"\u72C5\u72C6\u72C7\u72C9\u72CA\u72CB\u72CC\u72CF\u72D1\u72D3\u72D4\u72D5\u72D6\u72D8\u72DA\u72DB"],["a1a1","\u3000\u3001\u3002\xB7\u02C9\u02C7\xA8\u3003\u3005\u2014\uFF5E\u2016\u2026\u2018\u2019\u201C\u201D\u3014\u3015\u3008",7,"\u3016\u3017\u3010\u3011\xB1\xD7\xF7\u2236\u2227\u2228\u2211\u220F\u222A\u2229\u2208\u2237\u221A\u22A5\u2225\u2220\u2312\u2299\u222B\u222E\u2261\u224C\u2248\u223D\u221D\u2260\u226E\u226F\u2264\u2265\u221E\u2235\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFF04\xA4\uFFE0\uFFE1\u2030\xA7\u2116\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u203B\u2192\u2190\u2191\u2193\u3013"],["a2a1","\u2170",9],["a2b1","\u2488",19,"\u2474",19,"\u2460",9],["a2e5","\u3220",9],["a2f1","\u2160",11],["a3a1","\uFF01\uFF02\uFF03\uFFE5\uFF05",88,"\uFFE3"],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a6e0","\uFE35\uFE36\uFE39\uFE3A\uFE3F\uFE40\uFE3D\uFE3E\uFE41\uFE42\uFE43\uFE44"],["a6ee","\uFE3B\uFE3C\uFE37\uFE38\uFE31"],["a6f4","\uFE33\uFE34"],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a840","\u02CA\u02CB\u02D9\u2013\u2015\u2025\u2035\u2105\u2109\u2196\u2197\u2198\u2199\u2215\u221F\u2223\u2252\u2266\u2267\u22BF\u2550",35,"\u2581",6],["a880","\u2588",7,"\u2593\u2594\u2595\u25BC\u25BD\u25E2\u25E3\u25E4\u25E5\u2609\u2295\u3012\u301D\u301E"],["a8a1","\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA\u01DC\xFC\xEA\u0251"],["a8bd","\u0144\u0148"],["a8c0","\u0261"],["a8c5","\u3105",36],["a940","\u3021",8,"\u32A3\u338E\u338F\u339C\u339D\u339E\u33A1\u33C4\u33CE\u33D1\u33D2\u33D5\uFE30\uFFE2\uFFE4"],["a959","\u2121\u3231"],["a95c","\u2010"],["a960","\u30FC\u309B\u309C\u30FD\u30FE\u3006\u309D\u309E\uFE49",9,"\uFE54\uFE55\uFE56\uFE57\uFE59",8],["a980","\uFE62",4,"\uFE68\uFE69\uFE6A\uFE6B"],["a996","\u3007"],["a9a4","\u2500",75],["aa40","\u72DC\u72DD\u72DF\u72E2",5,"\u72EA\u72EB\u72F5\u72F6\u72F9\u72FD\u72FE\u72FF\u7300\u7302\u7304",5,"\u730B\u730C\u730D\u730F\u7310\u7311\u7312\u7314\u7318\u7319\u731A\u731F\u7320\u7323\u7324\u7326\u7327\u7328\u732D\u732F\u7330\u7332\u7333\u7335\u7336\u733A\u733B\u733C\u733D\u7340",8],["aa80","\u7349\u734A\u734B\u734C\u734E\u734F\u7351\u7353\u7354\u7355\u7356\u7358",7,"\u7361",10,"\u736E\u7370\u7371"],["ab40","\u7372",11,"\u737F",4,"\u7385\u7386\u7388\u738A\u738C\u738D\u738F\u7390\u7392\u7393\u7394\u7395\u7397\u7398\u7399\u739A\u739C\u739D\u739E\u73A0\u73A1\u73A3",5,"\u73AA\u73AC\u73AD\u73B1\u73B4\u73B5\u73B6\u73B8\u73B9\u73BC\u73BD\u73BE\u73BF\u73C1\u73C3",4],["ab80","\u73CB\u73CC\u73CE\u73D2",6,"\u73DA\u73DB\u73DC\u73DD\u73DF\u73E1\u73E2\u73E3\u73E4\u73E6\u73E8\u73EA\u73EB\u73EC\u73EE\u73EF\u73F0\u73F1\u73F3",4],["ac40","\u73F8",10,"\u7404\u7407\u7408\u740B\u740C\u740D\u740E\u7411",8,"\u741C",5,"\u7423\u7424\u7427\u7429\u742B\u742D\u742F\u7431\u7432\u7437",4,"\u743D\u743E\u743F\u7440\u7442",11],["ac80","\u744E",6,"\u7456\u7458\u745D\u7460",12,"\u746E\u746F\u7471",4,"\u7478\u7479\u747A"],["ad40","\u747B\u747C\u747D\u747F\u7482\u7484\u7485\u7486\u7488\u7489\u748A\u748C\u748D\u748F\u7491",10,"\u749D\u749F",7,"\u74AA",15,"\u74BB",12],["ad80","\u74C8",9,"\u74D3",8,"\u74DD\u74DF\u74E1\u74E5\u74E7",6,"\u74F0\u74F1\u74F2"],["ae40","\u74F3\u74F5\u74F8",6,"\u7500\u7501\u7502\u7503\u7505",7,"\u750E\u7510\u7512\u7514\u7515\u7516\u7517\u751B\u751D\u751E\u7520",4,"\u7526\u7527\u752A\u752E\u7534\u7536\u7539\u753C\u753D\u753F\u7541\u7542\u7543\u7544\u7546\u7547\u7549\u754A\u754D\u7550\u7551\u7552\u7553\u7555\u7556\u7557\u7558"],["ae80","\u755D",7,"\u7567\u7568\u7569\u756B",6,"\u7573\u7575\u7576\u7577\u757A",4,"\u7580\u7581\u7582\u7584\u7585\u7587"],["af40","\u7588\u7589\u758A\u758C\u758D\u758E\u7590\u7593\u7595\u7598\u759B\u759C\u759E\u75A2\u75A6",4,"\u75AD\u75B6\u75B7\u75BA\u75BB\u75BF\u75C0\u75C1\u75C6\u75CB\u75CC\u75CE\u75CF\u75D0\u75D1\u75D3\u75D7\u75D9\u75DA\u75DC\u75DD\u75DF\u75E0\u75E1\u75E5\u75E9\u75EC\u75ED\u75EE\u75EF\u75F2\u75F3\u75F5\u75F6\u75F7\u75F8\u75FA\u75FB\u75FD\u75FE\u7602\u7604\u7606\u7607"],["af80","\u7608\u7609\u760B\u760D\u760E\u760F\u7611\u7612\u7613\u7614\u7616\u761A\u761C\u761D\u761E\u7621\u7623\u7627\u7628\u762C\u762E\u762F\u7631\u7632\u7636\u7637\u7639\u763A\u763B\u763D\u7641\u7642\u7644"],["b040","\u7645",6,"\u764E",5,"\u7655\u7657",4,"\u765D\u765F\u7660\u7661\u7662\u7664",6,"\u766C\u766D\u766E\u7670",7,"\u7679\u767A\u767C\u767F\u7680\u7681\u7683\u7685\u7689\u768A\u768C\u768D\u768F\u7690\u7692\u7694\u7695\u7697\u7698\u769A\u769B"],["b080","\u769C",7,"\u76A5",8,"\u76AF\u76B0\u76B3\u76B5",9,"\u76C0\u76C1\u76C3\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265"],["b140","\u76C4\u76C7\u76C9\u76CB\u76CC\u76D3\u76D5\u76D9\u76DA\u76DC\u76DD\u76DE\u76E0",4,"\u76E6",7,"\u76F0\u76F3\u76F5\u76F6\u76F7\u76FA\u76FB\u76FD\u76FF\u7700\u7702\u7703\u7705\u7706\u770A\u770C\u770E",10,"\u771B\u771C\u771D\u771E\u7721\u7723\u7724\u7725\u7727\u772A\u772B"],["b180","\u772C\u772E\u7730",4,"\u7739\u773B\u773D\u773E\u773F\u7742\u7744\u7745\u7746\u7748",7,"\u7752",7,"\u775C\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3"],["b240","\u775D\u775E\u775F\u7760\u7764\u7767\u7769\u776A\u776D",11,"\u777A\u777B\u777C\u7781\u7782\u7783\u7786",5,"\u778F\u7790\u7793",11,"\u77A1\u77A3\u77A4\u77A6\u77A8\u77AB\u77AD\u77AE\u77AF\u77B1\u77B2\u77B4\u77B6",4],["b280","\u77BC\u77BE\u77C0",12,"\u77CE",8,"\u77D8\u77D9\u77DA\u77DD",4,"\u77E4\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316"],["b340","\u77E6\u77E8\u77EA\u77EF\u77F0\u77F1\u77F2\u77F4\u77F5\u77F7\u77F9\u77FA\u77FB\u77FC\u7803",5,"\u780A\u780B\u780E\u780F\u7810\u7813\u7815\u7819\u781B\u781E\u7820\u7821\u7822\u7824\u7828\u782A\u782B\u782E\u782F\u7831\u7832\u7833\u7835\u7836\u783D\u783F\u7841\u7842\u7843\u7844\u7846\u7848\u7849\u784A\u784B\u784D\u784F\u7851\u7853\u7854\u7858\u7859\u785A"],["b380","\u785B\u785C\u785E",11,"\u786F",7,"\u7878\u7879\u787A\u787B\u787D",6,"\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A"],["b440","\u7884\u7885\u7886\u7888\u788A\u788B\u788F\u7890\u7892\u7894\u7895\u7896\u7899\u789D\u789E\u78A0\u78A2\u78A4\u78A6\u78A8",7,"\u78B5\u78B6\u78B7\u78B8\u78BA\u78BB\u78BC\u78BD\u78BF\u78C0\u78C2\u78C3\u78C4\u78C6\u78C7\u78C8\u78CC\u78CD\u78CE\u78CF\u78D1\u78D2\u78D3\u78D6\u78D7\u78D8\u78DA",9],["b480","\u78E4\u78E5\u78E6\u78E7\u78E9\u78EA\u78EB\u78ED",4,"\u78F3\u78F5\u78F6\u78F8\u78F9\u78FB",5,"\u7902\u7903\u7904\u7906",6,"\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E"],["b540","\u790D",5,"\u7914",9,"\u791F",4,"\u7925",14,"\u7935",4,"\u793D\u793F\u7942\u7943\u7944\u7945\u7947\u794A",8,"\u7954\u7955\u7958\u7959\u7961\u7963"],["b580","\u7964\u7966\u7969\u796A\u796B\u796C\u796E\u7970",6,"\u7979\u797B",4,"\u7982\u7983\u7986\u7987\u7988\u7989\u798B\u798C\u798D\u798E\u7990\u7991\u7992\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0"],["b640","\u7993",6,"\u799B",11,"\u79A8",10,"\u79B4",4,"\u79BC\u79BF\u79C2\u79C4\u79C5\u79C7\u79C8\u79CA\u79CC\u79CE\u79CF\u79D0\u79D3\u79D4\u79D6\u79D7\u79D9",5,"\u79E0\u79E1\u79E2\u79E5\u79E8\u79EA"],["b680","\u79EC\u79EE\u79F1",6,"\u79F9\u79FA\u79FC\u79FE\u79FF\u7A01\u7A04\u7A05\u7A07\u7A08\u7A09\u7A0A\u7A0C\u7A0F",4,"\u7A15\u7A16\u7A18\u7A19\u7A1B\u7A1C\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C"],["b740","\u7A1D\u7A1F\u7A21\u7A22\u7A24",14,"\u7A34\u7A35\u7A36\u7A38\u7A3A\u7A3E\u7A40",5,"\u7A47",9,"\u7A52",4,"\u7A58",16],["b780","\u7A69",6,"\u7A71\u7A72\u7A73\u7A75\u7A7B\u7A7C\u7A7D\u7A7E\u7A82\u7A85\u7A87\u7A89\u7A8A\u7A8B\u7A8C\u7A8E\u7A8F\u7A90\u7A93\u7A94\u7A99\u7A9A\u7A9B\u7A9E\u7AA1\u7AA2\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D"],["b840","\u7AA3\u7AA4\u7AA7\u7AA9\u7AAA\u7AAB\u7AAE",4,"\u7AB4",10,"\u7AC0",10,"\u7ACC",9,"\u7AD7\u7AD8\u7ADA\u7ADB\u7ADC\u7ADD\u7AE1\u7AE2\u7AE4\u7AE7",5,"\u7AEE\u7AF0\u7AF1\u7AF2\u7AF3"],["b880","\u7AF4",4,"\u7AFB\u7AFC\u7AFE\u7B00\u7B01\u7B02\u7B05\u7B07\u7B09\u7B0C\u7B0D\u7B0E\u7B10\u7B12\u7B13\u7B16\u7B17\u7B18\u7B1A\u7B1C\u7B1D\u7B1F\u7B21\u7B22\u7B23\u7B27\u7B29\u7B2D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9"],["b940","\u7B2F\u7B30\u7B32\u7B34\u7B35\u7B36\u7B37\u7B39\u7B3B\u7B3D\u7B3F",5,"\u7B46\u7B48\u7B4A\u7B4D\u7B4E\u7B53\u7B55\u7B57\u7B59\u7B5C\u7B5E\u7B5F\u7B61\u7B63",10,"\u7B6F\u7B70\u7B73\u7B74\u7B76\u7B78\u7B7A\u7B7C\u7B7D\u7B7F\u7B81\u7B82\u7B83\u7B84\u7B86",6,"\u7B8E\u7B8F"],["b980","\u7B91\u7B92\u7B93\u7B96\u7B98\u7B99\u7B9A\u7B9B\u7B9E\u7B9F\u7BA0\u7BA3\u7BA4\u7BA5\u7BAE\u7BAF\u7BB0\u7BB2\u7BB3\u7BB5\u7BB6\u7BB7\u7BB9",7,"\u7BC2\u7BC3\u7BC4\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8"],["ba40","\u7BC5\u7BC8\u7BC9\u7BCA\u7BCB\u7BCD\u7BCE\u7BCF\u7BD0\u7BD2\u7BD4",4,"\u7BDB\u7BDC\u7BDE\u7BDF\u7BE0\u7BE2\u7BE3\u7BE4\u7BE7\u7BE8\u7BE9\u7BEB\u7BEC\u7BED\u7BEF\u7BF0\u7BF2",4,"\u7BF8\u7BF9\u7BFA\u7BFB\u7BFD\u7BFF",7,"\u7C08\u7C09\u7C0A\u7C0D\u7C0E\u7C10",5,"\u7C17\u7C18\u7C19"],["ba80","\u7C1A",4,"\u7C20",5,"\u7C28\u7C29\u7C2B",12,"\u7C39",5,"\u7C42\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56"],["bb40","\u7C43",9,"\u7C4E",36,"\u7C75",5,"\u7C7E",9],["bb80","\u7C88\u7C8A",6,"\u7C93\u7C94\u7C96\u7C99\u7C9A\u7C9B\u7CA0\u7CA1\u7CA3\u7CA6\u7CA7\u7CA8\u7CA9\u7CAB\u7CAC\u7CAD\u7CAF\u7CB0\u7CB4",4,"\u7CBA\u7CBB\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95"],["bc40","\u7CBF\u7CC0\u7CC2\u7CC3\u7CC4\u7CC6\u7CC9\u7CCB\u7CCE",6,"\u7CD8\u7CDA\u7CDB\u7CDD\u7CDE\u7CE1",6,"\u7CE9",5,"\u7CF0",7,"\u7CF9\u7CFA\u7CFC",13,"\u7D0B",5],["bc80","\u7D11",14,"\u7D21\u7D23\u7D24\u7D25\u7D26\u7D28\u7D29\u7D2A\u7D2C\u7D2D\u7D2E\u7D30",6,"\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u5993\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6"],["bd40","\u7D37",54,"\u7D6F",7],["bd80","\u7D78",32,"\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78"],["be40","\u7D99",12,"\u7DA7",6,"\u7DAF",42],["be80","\u7DDA",32,"\u5C3D\u52B2\u8346\u5162\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB"],["bf40","\u7DFB",62],["bf80","\u7E3A\u7E3C",4,"\u7E42",4,"\u7E48",21,"\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080"],["c040","\u7E5E",35,"\u7E83",23,"\u7E9C\u7E9D\u7E9E"],["c080","\u7EAE\u7EB4\u7EBB\u7EBC\u7ED6\u7EE4\u7EEC\u7EF9\u7F0A\u7F10\u7F1E\u7F37\u7F39\u7F3B",6,"\u7F43\u7F46",9,"\u7F52\u7F53\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0"],["c140","\u7F56\u7F59\u7F5B\u7F5C\u7F5D\u7F5E\u7F60\u7F63",4,"\u7F6B\u7F6C\u7F6D\u7F6F\u7F70\u7F73\u7F75\u7F76\u7F77\u7F78\u7F7A\u7F7B\u7F7C\u7F7D\u7F7F\u7F80\u7F82",7,"\u7F8B\u7F8D\u7F8F",4,"\u7F95",4,"\u7F9B\u7F9C\u7FA0\u7FA2\u7FA3\u7FA5\u7FA6\u7FA8",6,"\u7FB1"],["c180","\u7FB3",4,"\u7FBA\u7FBB\u7FBE\u7FC0\u7FC2\u7FC3\u7FC4\u7FC6\u7FC7\u7FC8\u7FC9\u7FCB\u7FCD\u7FCF",4,"\u7FD6\u7FD7\u7FD9",5,"\u7FE2\u7FE3\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF"],["c240","\u7FE4\u7FE7\u7FE8\u7FEA\u7FEB\u7FEC\u7FED\u7FEF\u7FF2\u7FF4",6,"\u7FFD\u7FFE\u7FFF\u8002\u8007\u8008\u8009\u800A\u800E\u800F\u8011\u8013\u801A\u801B\u801D\u801E\u801F\u8021\u8023\u8024\u802B",5,"\u8032\u8034\u8039\u803A\u803C\u803E\u8040\u8041\u8044\u8045\u8047\u8048\u8049\u804E\u804F\u8050\u8051\u8053\u8055\u8056\u8057"],["c280","\u8059\u805B",13,"\u806B",5,"\u8072",11,"\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B"],["c340","\u807E\u8081\u8082\u8085\u8088\u808A\u808D",5,"\u8094\u8095\u8097\u8099\u809E\u80A3\u80A6\u80A7\u80A8\u80AC\u80B0\u80B3\u80B5\u80B6\u80B8\u80B9\u80BB\u80C5\u80C7",4,"\u80CF",6,"\u80D8\u80DF\u80E0\u80E2\u80E3\u80E6\u80EE\u80F5\u80F7\u80F9\u80FB\u80FE\u80FF\u8100\u8101\u8103\u8104\u8105\u8107\u8108\u810B"],["c380","\u810C\u8115\u8117\u8119\u811B\u811C\u811D\u811F",12,"\u812D\u812E\u8130\u8133\u8134\u8135\u8137\u8139",4,"\u813F\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478"],["c440","\u8140",5,"\u8147\u8149\u814D\u814E\u814F\u8152\u8156\u8157\u8158\u815B",4,"\u8161\u8162\u8163\u8164\u8166\u8168\u816A\u816B\u816C\u816F\u8172\u8173\u8175\u8176\u8177\u8178\u8181\u8183",4,"\u8189\u818B\u818C\u818D\u818E\u8190\u8192",5,"\u8199\u819A\u819E",4,"\u81A4\u81A5"],["c480","\u81A7\u81A9\u81AB",7,"\u81B4",5,"\u81BC\u81BD\u81BE\u81BF\u81C4\u81C5\u81C7\u81C8\u81C9\u81CB\u81CD",6,"\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81"],["c540","\u81D4",14,"\u81E4\u81E5\u81E6\u81E8\u81E9\u81EB\u81EE",4,"\u81F5",5,"\u81FD\u81FF\u8203\u8207",4,"\u820E\u820F\u8211\u8213\u8215",5,"\u821D\u8220\u8224\u8225\u8226\u8227\u8229\u822E\u8232\u823A\u823C\u823D\u823F"],["c580","\u8240\u8241\u8242\u8243\u8245\u8246\u8248\u824A\u824C\u824D\u824E\u8250",7,"\u8259\u825B\u825C\u825D\u825E\u8260",7,"\u8269\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7"],["c640","\u826A\u826B\u826C\u826D\u8271\u8275\u8276\u8277\u8278\u827B\u827C\u8280\u8281\u8283\u8285\u8286\u8287\u8289\u828C\u8290\u8293\u8294\u8295\u8296\u829A\u829B\u829E\u82A0\u82A2\u82A3\u82A7\u82B2\u82B5\u82B6\u82BA\u82BB\u82BC\u82BF\u82C0\u82C2\u82C3\u82C5\u82C6\u82C9\u82D0\u82D6\u82D9\u82DA\u82DD\u82E2\u82E7\u82E8\u82E9\u82EA\u82EC\u82ED\u82EE\u82F0\u82F2\u82F3\u82F5\u82F6\u82F8"],["c680","\u82FA\u82FC",4,"\u830A\u830B\u830D\u8310\u8312\u8313\u8316\u8318\u8319\u831D",9,"\u8329\u832A\u832E\u8330\u8332\u8337\u833B\u833D\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390"],["c740","\u833E\u833F\u8341\u8342\u8344\u8345\u8348\u834A",4,"\u8353\u8355",4,"\u835D\u8362\u8370",6,"\u8379\u837A\u837E",6,"\u8387\u8388\u838A\u838B\u838C\u838D\u838F\u8390\u8391\u8394\u8395\u8396\u8397\u8399\u839A\u839D\u839F\u83A1",6,"\u83AC\u83AD\u83AE"],["c780","\u83AF\u83B5\u83BB\u83BE\u83BF\u83C2\u83C3\u83C4\u83C6\u83C8\u83C9\u83CB\u83CD\u83CE\u83D0\u83D1\u83D2\u83D3\u83D5\u83D7\u83D9\u83DA\u83DB\u83DE\u83E2\u83E3\u83E4\u83E6\u83E7\u83E8\u83EB\u83EC\u83ED\u6070\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20"],["c840","\u83EE\u83EF\u83F3",4,"\u83FA\u83FB\u83FC\u83FE\u83FF\u8400\u8402\u8405\u8407\u8408\u8409\u840A\u8410\u8412",5,"\u8419\u841A\u841B\u841E",5,"\u8429",7,"\u8432",5,"\u8439\u843A\u843B\u843E",7,"\u8447\u8448\u8449"],["c880","\u844A",6,"\u8452",4,"\u8458\u845D\u845E\u845F\u8460\u8462\u8464",4,"\u846A\u846E\u846F\u8470\u8472\u8474\u8477\u8479\u847B\u847C\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1"],["c940","\u847D",4,"\u8483\u8484\u8485\u8486\u848A\u848D\u848F",7,"\u8498\u849A\u849B\u849D\u849E\u849F\u84A0\u84A2",12,"\u84B0\u84B1\u84B3\u84B5\u84B6\u84B7\u84BB\u84BC\u84BE\u84C0\u84C2\u84C3\u84C5\u84C6\u84C7\u84C8\u84CB\u84CC\u84CE\u84CF\u84D2\u84D4\u84D5\u84D7"],["c980","\u84D8",4,"\u84DE\u84E1\u84E2\u84E4\u84E7",4,"\u84ED\u84EE\u84EF\u84F1",10,"\u84FD\u84FE\u8500\u8501\u8502\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3"],["ca40","\u8503",8,"\u850D\u850E\u850F\u8510\u8512\u8514\u8515\u8516\u8518\u8519\u851B\u851C\u851D\u851E\u8520\u8522",8,"\u852D",9,"\u853E",4,"\u8544\u8545\u8546\u8547\u854B",10],["ca80","\u8557\u8558\u855A\u855B\u855C\u855D\u855F",4,"\u8565\u8566\u8567\u8569",8,"\u8573\u8575\u8576\u8577\u8578\u857C\u857D\u857F\u8580\u8581\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31"],["cb40","\u8582\u8583\u8586\u8588",6,"\u8590",10,"\u859D",6,"\u85A5\u85A6\u85A7\u85A9\u85AB\u85AC\u85AD\u85B1",5,"\u85B8\u85BA",6,"\u85C2",6,"\u85CA",4,"\u85D1\u85D2"],["cb80","\u85D4\u85D6",5,"\u85DD",6,"\u85E5\u85E6\u85E7\u85E8\u85EA",14,"\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854"],["cc40","\u85F9\u85FA\u85FC\u85FD\u85FE\u8600",4,"\u8606",10,"\u8612\u8613\u8614\u8615\u8617",15,"\u8628\u862A",13,"\u8639\u863A\u863B\u863D\u863E\u863F\u8640"],["cc80","\u8641",11,"\u8652\u8653\u8655",4,"\u865B\u865C\u865D\u865F\u8660\u8661\u8663",7,"\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3"],["cd40","\u866D\u866F\u8670\u8672",6,"\u8683",6,"\u868E",4,"\u8694\u8696",5,"\u869E",4,"\u86A5\u86A6\u86AB\u86AD\u86AE\u86B2\u86B3\u86B7\u86B8\u86B9\u86BB",4,"\u86C1\u86C2\u86C3\u86C5\u86C8\u86CC\u86CD\u86D2\u86D3\u86D5\u86D6\u86D7\u86DA\u86DC"],["cd80","\u86DD\u86E0\u86E1\u86E2\u86E3\u86E5\u86E6\u86E7\u86E8\u86EA\u86EB\u86EC\u86EF\u86F5\u86F6\u86F7\u86FA\u86FB\u86FC\u86FD\u86FF\u8701\u8704\u8705\u8706\u870B\u870C\u870E\u870F\u8710\u8711\u8714\u8716\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01"],["ce40","\u8719\u871B\u871D\u871F\u8720\u8724\u8726\u8727\u8728\u872A\u872B\u872C\u872D\u872F\u8730\u8732\u8733\u8735\u8736\u8738\u8739\u873A\u873C\u873D\u8740",6,"\u874A\u874B\u874D\u874F\u8750\u8751\u8752\u8754\u8755\u8756\u8758\u875A",5,"\u8761\u8762\u8766",7,"\u876F\u8771\u8772\u8773\u8775"],["ce80","\u8777\u8778\u8779\u877A\u877F\u8780\u8781\u8784\u8786\u8787\u8789\u878A\u878C\u878E",4,"\u8794\u8795\u8796\u8798",6,"\u87A0",4,"\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A"],["cf40","\u87A5\u87A6\u87A7\u87A9\u87AA\u87AE\u87B0\u87B1\u87B2\u87B4\u87B6\u87B7\u87B8\u87B9\u87BB\u87BC\u87BE\u87BF\u87C1",4,"\u87C7\u87C8\u87C9\u87CC",4,"\u87D4",6,"\u87DC\u87DD\u87DE\u87DF\u87E1\u87E2\u87E3\u87E4\u87E6\u87E7\u87E8\u87E9\u87EB\u87EC\u87ED\u87EF",9],["cf80","\u87FA\u87FB\u87FC\u87FD\u87FF\u8800\u8801\u8802\u8804",5,"\u880B",7,"\u8814\u8817\u8818\u8819\u881A\u881C",4,"\u8823\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653"],["d040","\u8824",13,"\u8833",5,"\u883A\u883B\u883D\u883E\u883F\u8841\u8842\u8843\u8846",5,"\u884E",5,"\u8855\u8856\u8858\u885A",6,"\u8866\u8867\u886A\u886D\u886F\u8871\u8873\u8874\u8875\u8876\u8878\u8879\u887A"],["d080","\u887B\u887C\u8880\u8883\u8886\u8887\u8889\u888A\u888C\u888E\u888F\u8890\u8891\u8893\u8894\u8895\u8897",4,"\u889D",4,"\u88A3\u88A5",5,"\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384"],["d140","\u88AC\u88AE\u88AF\u88B0\u88B2",4,"\u88B8\u88B9\u88BA\u88BB\u88BD\u88BE\u88BF\u88C0\u88C3\u88C4\u88C7\u88C8\u88CA\u88CB\u88CC\u88CD\u88CF\u88D0\u88D1\u88D3\u88D6\u88D7\u88DA",4,"\u88E0\u88E1\u88E6\u88E7\u88E9",6,"\u88F2\u88F5\u88F6\u88F7\u88FA\u88FB\u88FD\u88FF\u8900\u8901\u8903",5],["d180","\u8909\u890B",4,"\u8911\u8914",4,"\u891C",4,"\u8922\u8923\u8924\u8926\u8927\u8928\u8929\u892C\u892D\u892E\u892F\u8931\u8932\u8933\u8935\u8937\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476"],["d240","\u8938",8,"\u8942\u8943\u8945",24,"\u8960",5,"\u8967",19,"\u897C"],["d280","\u897D\u897E\u8980\u8982\u8984\u8985\u8987",26,"\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690"],["d340","\u89A2",30,"\u89C3\u89CD\u89D3\u89D4\u89D5\u89D7\u89D8\u89D9\u89DB\u89DD\u89DF\u89E0\u89E1\u89E2\u89E4\u89E7\u89E8\u89E9\u89EA\u89EC\u89ED\u89EE\u89F0\u89F1\u89F2\u89F4",6],["d380","\u89FB",4,"\u8A01",5,"\u8A08",21,"\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89"],["d440","\u8A1E",31,"\u8A3F",8,"\u8A49",21],["d480","\u8A5F",25,"\u8A7A",6,"\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67"],["d540","\u8A81",7,"\u8A8B",7,"\u8A94",46],["d580","\u8AC3",32,"\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F"],["d640","\u8AE4",34,"\u8B08",27],["d680","\u8B24\u8B25\u8B27",30,"\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51"],["d740","\u8B46",31,"\u8B67",4,"\u8B6D",25],["d780","\u8B87",24,"\u8BAC\u8BB1\u8BBB\u8BC7\u8BD0\u8BEA\u8C09\u8C1E\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7"],["d840","\u8C38",8,"\u8C42\u8C43\u8C44\u8C45\u8C48\u8C4A\u8C4B\u8C4D",7,"\u8C56\u8C57\u8C58\u8C59\u8C5B",5,"\u8C63",6,"\u8C6C",6,"\u8C74\u8C75\u8C76\u8C77\u8C7B",6,"\u8C83\u8C84\u8C86\u8C87"],["d880","\u8C88\u8C8B\u8C8D",6,"\u8C95\u8C96\u8C97\u8C99",20,"\u4E8D\u4E0C\u5140\u4E10\u5EFF\u5345\u4E15\u4E98\u4E1E\u9B32\u5B6C\u5669\u4E28\u79BA\u4E3F\u5315\u4E47\u592D\u723B\u536E\u6C10\u56DF\u80E4\u9997\u6BD3\u777E\u9F17\u4E36\u4E9F\u9F10\u4E5C\u4E69\u4E93\u8288\u5B5B\u556C\u560F\u4EC4\u538D\u539D\u53A3\u53A5\u53AE\u9765\u8D5D\u531A\u53F5\u5326\u532E\u533E\u8D5C\u5366\u5363\u5202\u5208\u520E\u522D\u5233\u523F\u5240\u524C\u525E\u5261\u525C\u84AF\u527D\u5282\u5281\u5290\u5293\u5182\u7F54\u4EBB\u4EC3\u4EC9\u4EC2\u4EE8\u4EE1\u4EEB\u4EDE\u4F1B\u4EF3\u4F22\u4F64\u4EF5\u4F25\u4F27\u4F09\u4F2B\u4F5E\u4F67\u6538\u4F5A\u4F5D"],["d940","\u8CAE",62],["d980","\u8CED",32,"\u4F5F\u4F57\u4F32\u4F3D\u4F76\u4F74\u4F91\u4F89\u4F83\u4F8F\u4F7E\u4F7B\u4FAA\u4F7C\u4FAC\u4F94\u4FE6\u4FE8\u4FEA\u4FC5\u4FDA\u4FE3\u4FDC\u4FD1\u4FDF\u4FF8\u5029\u504C\u4FF3\u502C\u500F\u502E\u502D\u4FFE\u501C\u500C\u5025\u5028\u507E\u5043\u5055\u5048\u504E\u506C\u507B\u50A5\u50A7\u50A9\u50BA\u50D6\u5106\u50ED\u50EC\u50E6\u50EE\u5107\u510B\u4EDD\u6C3D\u4F58\u4F65\u4FCE\u9FA0\u6C46\u7C74\u516E\u5DFD\u9EC9\u9998\u5181\u5914\u52F9\u530D\u8A07\u5310\u51EB\u5919\u5155\u4EA0\u5156\u4EB3\u886E\u88A4\u4EB5\u8114\u88D2\u7980\u5B34\u8803\u7FB8\u51AB\u51B1\u51BD\u51BC"],["da40","\u8D0E",14,"\u8D20\u8D51\u8D52\u8D57\u8D5F\u8D65\u8D68\u8D69\u8D6A\u8D6C\u8D6E\u8D6F\u8D71\u8D72\u8D78",8,"\u8D82\u8D83\u8D86\u8D87\u8D88\u8D89\u8D8C",4,"\u8D92\u8D93\u8D95",9,"\u8DA0\u8DA1"],["da80","\u8DA2\u8DA4",12,"\u8DB2\u8DB6\u8DB7\u8DB9\u8DBB\u8DBD\u8DC0\u8DC1\u8DC2\u8DC5\u8DC7\u8DC8\u8DC9\u8DCA\u8DCD\u8DD0\u8DD2\u8DD3\u8DD4\u51C7\u5196\u51A2\u51A5\u8BA0\u8BA6\u8BA7\u8BAA\u8BB4\u8BB5\u8BB7\u8BC2\u8BC3\u8BCB\u8BCF\u8BCE\u8BD2\u8BD3\u8BD4\u8BD6\u8BD8\u8BD9\u8BDC\u8BDF\u8BE0\u8BE4\u8BE8\u8BE9\u8BEE\u8BF0\u8BF3\u8BF6\u8BF9\u8BFC\u8BFF\u8C00\u8C02\u8C04\u8C07\u8C0C\u8C0F\u8C11\u8C12\u8C14\u8C15\u8C16\u8C19\u8C1B\u8C18\u8C1D\u8C1F\u8C20\u8C21\u8C25\u8C27\u8C2A\u8C2B\u8C2E\u8C2F\u8C32\u8C33\u8C35\u8C36\u5369\u537A\u961D\u9622\u9621\u9631\u962A\u963D\u963C\u9642\u9649\u9654\u965F\u9667\u966C\u9672\u9674\u9688\u968D\u9697\u96B0\u9097\u909B\u909D\u9099\u90AC\u90A1\u90B4\u90B3\u90B6\u90BA"],["db40","\u8DD5\u8DD8\u8DD9\u8DDC\u8DE0\u8DE1\u8DE2\u8DE5\u8DE6\u8DE7\u8DE9\u8DED\u8DEE\u8DF0\u8DF1\u8DF2\u8DF4\u8DF6\u8DFC\u8DFE",6,"\u8E06\u8E07\u8E08\u8E0B\u8E0D\u8E0E\u8E10\u8E11\u8E12\u8E13\u8E15",7,"\u8E20\u8E21\u8E24",4,"\u8E2B\u8E2D\u8E30\u8E32\u8E33\u8E34\u8E36\u8E37\u8E38\u8E3B\u8E3C\u8E3E"],["db80","\u8E3F\u8E43\u8E45\u8E46\u8E4C",4,"\u8E53",5,"\u8E5A",11,"\u8E67\u8E68\u8E6A\u8E6B\u8E6E\u8E71\u90B8\u90B0\u90CF\u90C5\u90BE\u90D0\u90C4\u90C7\u90D3\u90E6\u90E2\u90DC\u90D7\u90DB\u90EB\u90EF\u90FE\u9104\u9122\u911E\u9123\u9131\u912F\u9139\u9143\u9146\u520D\u5942\u52A2\u52AC\u52AD\u52BE\u54FF\u52D0\u52D6\u52F0\u53DF\u71EE\u77CD\u5EF4\u51F5\u51FC\u9B2F\u53B6\u5F01\u755A\u5DEF\u574C\u57A9\u57A1\u587E\u58BC\u58C5\u58D1\u5729\u572C\u572A\u5733\u5739\u572E\u572F\u575C\u573B\u5742\u5769\u5785\u576B\u5786\u577C\u577B\u5768\u576D\u5776\u5773\u57AD\u57A4\u578C\u57B2\u57CF\u57A7\u57B4\u5793\u57A0\u57D5\u57D8\u57DA\u57D9\u57D2\u57B8\u57F4\u57EF\u57F8\u57E4\u57DD"],["dc40","\u8E73\u8E75\u8E77",4,"\u8E7D\u8E7E\u8E80\u8E82\u8E83\u8E84\u8E86\u8E88",6,"\u8E91\u8E92\u8E93\u8E95",6,"\u8E9D\u8E9F",11,"\u8EAD\u8EAE\u8EB0\u8EB1\u8EB3",6,"\u8EBB",7],["dc80","\u8EC3",10,"\u8ECF",21,"\u580B\u580D\u57FD\u57ED\u5800\u581E\u5819\u5844\u5820\u5865\u586C\u5881\u5889\u589A\u5880\u99A8\u9F19\u61FF\u8279\u827D\u827F\u828F\u828A\u82A8\u8284\u828E\u8291\u8297\u8299\u82AB\u82B8\u82BE\u82B0\u82C8\u82CA\u82E3\u8298\u82B7\u82AE\u82CB\u82CC\u82C1\u82A9\u82B4\u82A1\u82AA\u829F\u82C4\u82CE\u82A4\u82E1\u8309\u82F7\u82E4\u830F\u8307\u82DC\u82F4\u82D2\u82D8\u830C\u82FB\u82D3\u8311\u831A\u8306\u8314\u8315\u82E0\u82D5\u831C\u8351\u835B\u835C\u8308\u8392\u833C\u8334\u8331\u839B\u835E\u832F\u834F\u8347\u8343\u835F\u8340\u8317\u8360\u832D\u833A\u8333\u8366\u8365"],["dd40","\u8EE5",62],["dd80","\u8F24",32,"\u8368\u831B\u8369\u836C\u836A\u836D\u836E\u83B0\u8378\u83B3\u83B4\u83A0\u83AA\u8393\u839C\u8385\u837C\u83B6\u83A9\u837D\u83B8\u837B\u8398\u839E\u83A8\u83BA\u83BC\u83C1\u8401\u83E5\u83D8\u5807\u8418\u840B\u83DD\u83FD\u83D6\u841C\u8438\u8411\u8406\u83D4\u83DF\u840F\u8403\u83F8\u83F9\u83EA\u83C5\u83C0\u8426\u83F0\u83E1\u845C\u8451\u845A\u8459\u8473\u8487\u8488\u847A\u8489\u8478\u843C\u8446\u8469\u8476\u848C\u848E\u8431\u846D\u84C1\u84CD\u84D0\u84E6\u84BD\u84D3\u84CA\u84BF\u84BA\u84E0\u84A1\u84B9\u84B4\u8497\u84E5\u84E3\u850C\u750D\u8538\u84F0\u8539\u851F\u853A"],["de40","\u8F45",32,"\u8F6A\u8F80\u8F8C\u8F92\u8F9D\u8FA0\u8FA1\u8FA2\u8FA4\u8FA5\u8FA6\u8FA7\u8FAA\u8FAC\u8FAD\u8FAE\u8FAF\u8FB2\u8FB3\u8FB4\u8FB5\u8FB7\u8FB8\u8FBA\u8FBB\u8FBC\u8FBF\u8FC0\u8FC3\u8FC6"],["de80","\u8FC9",4,"\u8FCF\u8FD2\u8FD6\u8FD7\u8FDA\u8FE0\u8FE1\u8FE3\u8FE7\u8FEC\u8FEF\u8FF1\u8FF2\u8FF4\u8FF5\u8FF6\u8FFA\u8FFB\u8FFC\u8FFE\u8FFF\u9007\u9008\u900C\u900E\u9013\u9015\u9018\u8556\u853B\u84FF\u84FC\u8559\u8548\u8568\u8564\u855E\u857A\u77A2\u8543\u8572\u857B\u85A4\u85A8\u8587\u858F\u8579\u85AE\u859C\u8585\u85B9\u85B7\u85B0\u85D3\u85C1\u85DC\u85FF\u8627\u8605\u8629\u8616\u863C\u5EFE\u5F08\u593C\u5941\u8037\u5955\u595A\u5958\u530F\u5C22\u5C25\u5C2C\u5C34\u624C\u626A\u629F\u62BB\u62CA\u62DA\u62D7\u62EE\u6322\u62F6\u6339\u634B\u6343\u63AD\u63F6\u6371\u637A\u638E\u63B4\u636D\u63AC\u638A\u6369\u63AE\u63BC\u63F2\u63F8\u63E0\u63FF\u63C4\u63DE\u63CE\u6452\u63C6\u63BE\u6445\u6441\u640B\u641B\u6420\u640C\u6426\u6421\u645E\u6484\u646D\u6496"],["df40","\u9019\u901C\u9023\u9024\u9025\u9027",5,"\u9030",4,"\u9037\u9039\u903A\u903D\u903F\u9040\u9043\u9045\u9046\u9048",4,"\u904E\u9054\u9055\u9056\u9059\u905A\u905C",5,"\u9064\u9066\u9067\u9069\u906A\u906B\u906C\u906F",4,"\u9076",6,"\u907E\u9081"],["df80","\u9084\u9085\u9086\u9087\u9089\u908A\u908C",4,"\u9092\u9094\u9096\u9098\u909A\u909C\u909E\u909F\u90A0\u90A4\u90A5\u90A7\u90A8\u90A9\u90AB\u90AD\u90B2\u90B7\u90BC\u90BD\u90BF\u90C0\u647A\u64B7\u64B8\u6499\u64BA\u64C0\u64D0\u64D7\u64E4\u64E2\u6509\u6525\u652E\u5F0B\u5FD2\u7519\u5F11\u535F\u53F1\u53FD\u53E9\u53E8\u53FB\u5412\u5416\u5406\u544B\u5452\u5453\u5454\u5456\u5443\u5421\u5457\u5459\u5423\u5432\u5482\u5494\u5477\u5471\u5464\u549A\u549B\u5484\u5476\u5466\u549D\u54D0\u54AD\u54C2\u54B4\u54D2\u54A7\u54A6\u54D3\u54D4\u5472\u54A3\u54D5\u54BB\u54BF\u54CC\u54D9\u54DA\u54DC\u54A9\u54AA\u54A4\u54DD\u54CF\u54DE\u551B\u54E7\u5520\u54FD\u5514\u54F3\u5522\u5523\u550F\u5511\u5527\u552A\u5567\u558F\u55B5\u5549\u556D\u5541\u5555\u553F\u5550\u553C"],["e040","\u90C2\u90C3\u90C6\u90C8\u90C9\u90CB\u90CC\u90CD\u90D2\u90D4\u90D5\u90D6\u90D8\u90D9\u90DA\u90DE\u90DF\u90E0\u90E3\u90E4\u90E5\u90E9\u90EA\u90EC\u90EE\u90F0\u90F1\u90F2\u90F3\u90F5\u90F6\u90F7\u90F9\u90FA\u90FB\u90FC\u90FF\u9100\u9101\u9103\u9105",19,"\u911A\u911B\u911C"],["e080","\u911D\u911F\u9120\u9121\u9124",10,"\u9130\u9132",6,"\u913A",8,"\u9144\u5537\u5556\u5575\u5576\u5577\u5533\u5530\u555C\u558B\u55D2\u5583\u55B1\u55B9\u5588\u5581\u559F\u557E\u55D6\u5591\u557B\u55DF\u55BD\u55BE\u5594\u5599\u55EA\u55F7\u55C9\u561F\u55D1\u55EB\u55EC\u55D4\u55E6\u55DD\u55C4\u55EF\u55E5\u55F2\u55F3\u55CC\u55CD\u55E8\u55F5\u55E4\u8F94\u561E\u5608\u560C\u5601\u5624\u5623\u55FE\u5600\u5627\u562D\u5658\u5639\u5657\u562C\u564D\u5662\u5659\u565C\u564C\u5654\u5686\u5664\u5671\u566B\u567B\u567C\u5685\u5693\u56AF\u56D4\u56D7\u56DD\u56E1\u56F5\u56EB\u56F9\u56FF\u5704\u570A\u5709\u571C\u5E0F\u5E19\u5E14\u5E11\u5E31\u5E3B\u5E3C"],["e140","\u9145\u9147\u9148\u9151\u9153\u9154\u9155\u9156\u9158\u9159\u915B\u915C\u915F\u9160\u9166\u9167\u9168\u916B\u916D\u9173\u917A\u917B\u917C\u9180",4,"\u9186\u9188\u918A\u918E\u918F\u9193",6,"\u919C",5,"\u91A4",5,"\u91AB\u91AC\u91B0\u91B1\u91B2\u91B3\u91B6\u91B7\u91B8\u91B9\u91BB"],["e180","\u91BC",10,"\u91C8\u91CB\u91D0\u91D2",9,"\u91DD",8,"\u5E37\u5E44\u5E54\u5E5B\u5E5E\u5E61\u5C8C\u5C7A\u5C8D\u5C90\u5C96\u5C88\u5C98\u5C99\u5C91\u5C9A\u5C9C\u5CB5\u5CA2\u5CBD\u5CAC\u5CAB\u5CB1\u5CA3\u5CC1\u5CB7\u5CC4\u5CD2\u5CE4\u5CCB\u5CE5\u5D02\u5D03\u5D27\u5D26\u5D2E\u5D24\u5D1E\u5D06\u5D1B\u5D58\u5D3E\u5D34\u5D3D\u5D6C\u5D5B\u5D6F\u5D5D\u5D6B\u5D4B\u5D4A\u5D69\u5D74\u5D82\u5D99\u5D9D\u8C73\u5DB7\u5DC5\u5F73\u5F77\u5F82\u5F87\u5F89\u5F8C\u5F95\u5F99\u5F9C\u5FA8\u5FAD\u5FB5\u5FBC\u8862\u5F61\u72AD\u72B0\u72B4\u72B7\u72B8\u72C3\u72C1\u72CE\u72CD\u72D2\u72E8\u72EF\u72E9\u72F2\u72F4\u72F7\u7301\u72F3\u7303\u72FA"],["e240","\u91E6",62],["e280","\u9225",32,"\u72FB\u7317\u7313\u7321\u730A\u731E\u731D\u7315\u7322\u7339\u7325\u732C\u7338\u7331\u7350\u734D\u7357\u7360\u736C\u736F\u737E\u821B\u5925\u98E7\u5924\u5902\u9963\u9967",5,"\u9974\u9977\u997D\u9980\u9984\u9987\u998A\u998D\u9990\u9991\u9993\u9994\u9995\u5E80\u5E91\u5E8B\u5E96\u5EA5\u5EA0\u5EB9\u5EB5\u5EBE\u5EB3\u8D53\u5ED2\u5ED1\u5EDB\u5EE8\u5EEA\u81BA\u5FC4\u5FC9\u5FD6\u5FCF\u6003\u5FEE\u6004\u5FE1\u5FE4\u5FFE\u6005\u6006\u5FEA\u5FED\u5FF8\u6019\u6035\u6026\u601B\u600F\u600D\u6029\u602B\u600A\u603F\u6021\u6078\u6079\u607B\u607A\u6042"],["e340","\u9246",45,"\u9275",16],["e380","\u9286",7,"\u928F",24,"\u606A\u607D\u6096\u609A\u60AD\u609D\u6083\u6092\u608C\u609B\u60EC\u60BB\u60B1\u60DD\u60D8\u60C6\u60DA\u60B4\u6120\u6126\u6115\u6123\u60F4\u6100\u610E\u612B\u614A\u6175\u61AC\u6194\u61A7\u61B7\u61D4\u61F5\u5FDD\u96B3\u95E9\u95EB\u95F1\u95F3\u95F5\u95F6\u95FC\u95FE\u9603\u9604\u9606\u9608\u960A\u960B\u960C\u960D\u960F\u9612\u9615\u9616\u9617\u9619\u961A\u4E2C\u723F\u6215\u6C35\u6C54\u6C5C\u6C4A\u6CA3\u6C85\u6C90\u6C94\u6C8C\u6C68\u6C69\u6C74\u6C76\u6C86\u6CA9\u6CD0\u6CD4\u6CAD\u6CF7\u6CF8\u6CF1\u6CD7\u6CB2\u6CE0\u6CD6\u6CFA\u6CEB\u6CEE\u6CB1\u6CD3\u6CEF\u6CFE"],["e440","\u92A8",5,"\u92AF",24,"\u92C9",31],["e480","\u92E9",32,"\u6D39\u6D27\u6D0C\u6D43\u6D48\u6D07\u6D04\u6D19\u6D0E\u6D2B\u6D4D\u6D2E\u6D35\u6D1A\u6D4F\u6D52\u6D54\u6D33\u6D91\u6D6F\u6D9E\u6DA0\u6D5E\u6D93\u6D94\u6D5C\u6D60\u6D7C\u6D63\u6E1A\u6DC7\u6DC5\u6DDE\u6E0E\u6DBF\u6DE0\u6E11\u6DE6\u6DDD\u6DD9\u6E16\u6DAB\u6E0C\u6DAE\u6E2B\u6E6E\u6E4E\u6E6B\u6EB2\u6E5F\u6E86\u6E53\u6E54\u6E32\u6E25\u6E44\u6EDF\u6EB1\u6E98\u6EE0\u6F2D\u6EE2\u6EA5\u6EA7\u6EBD\u6EBB\u6EB7\u6ED7\u6EB4\u6ECF\u6E8F\u6EC2\u6E9F\u6F62\u6F46\u6F47\u6F24\u6F15\u6EF9\u6F2F\u6F36\u6F4B\u6F74\u6F2A\u6F09\u6F29\u6F89\u6F8D\u6F8C\u6F78\u6F72\u6F7C\u6F7A\u6FD1"],["e540","\u930A",51,"\u933F",10],["e580","\u934A",31,"\u936B\u6FC9\u6FA7\u6FB9\u6FB6\u6FC2\u6FE1\u6FEE\u6FDE\u6FE0\u6FEF\u701A\u7023\u701B\u7039\u7035\u704F\u705E\u5B80\u5B84\u5B95\u5B93\u5BA5\u5BB8\u752F\u9A9E\u6434\u5BE4\u5BEE\u8930\u5BF0\u8E47\u8B07\u8FB6\u8FD3\u8FD5\u8FE5\u8FEE\u8FE4\u8FE9\u8FE6\u8FF3\u8FE8\u9005\u9004\u900B\u9026\u9011\u900D\u9016\u9021\u9035\u9036\u902D\u902F\u9044\u9051\u9052\u9050\u9068\u9058\u9062\u905B\u66B9\u9074\u907D\u9082\u9088\u9083\u908B\u5F50\u5F57\u5F56\u5F58\u5C3B\u54AB\u5C50\u5C59\u5B71\u5C63\u5C66\u7FBC\u5F2A\u5F29\u5F2D\u8274\u5F3C\u9B3B\u5C6E\u5981\u5983\u598D\u59A9\u59AA\u59A3"],["e640","\u936C",34,"\u9390",27],["e680","\u93AC",29,"\u93CB\u93CC\u93CD\u5997\u59CA\u59AB\u599E\u59A4\u59D2\u59B2\u59AF\u59D7\u59BE\u5A05\u5A06\u59DD\u5A08\u59E3\u59D8\u59F9\u5A0C\u5A09\u5A32\u5A34\u5A11\u5A23\u5A13\u5A40\u5A67\u5A4A\u5A55\u5A3C\u5A62\u5A75\u80EC\u5AAA\u5A9B\u5A77\u5A7A\u5ABE\u5AEB\u5AB2\u5AD2\u5AD4\u5AB8\u5AE0\u5AE3\u5AF1\u5AD6\u5AE6\u5AD8\u5ADC\u5B09\u5B17\u5B16\u5B32\u5B37\u5B40\u5C15\u5C1C\u5B5A\u5B65\u5B73\u5B51\u5B53\u5B62\u9A75\u9A77\u9A78\u9A7A\u9A7F\u9A7D\u9A80\u9A81\u9A85\u9A88\u9A8A\u9A90\u9A92\u9A93\u9A96\u9A98\u9A9B\u9A9C\u9A9D\u9A9F\u9AA0\u9AA2\u9AA3\u9AA5\u9AA7\u7E9F\u7EA1\u7EA3\u7EA5\u7EA8\u7EA9"],["e740","\u93CE",7,"\u93D7",54],["e780","\u940E",32,"\u7EAD\u7EB0\u7EBE\u7EC0\u7EC1\u7EC2\u7EC9\u7ECB\u7ECC\u7ED0\u7ED4\u7ED7\u7EDB\u7EE0\u7EE1\u7EE8\u7EEB\u7EEE\u7EEF\u7EF1\u7EF2\u7F0D\u7EF6\u7EFA\u7EFB\u7EFE\u7F01\u7F02\u7F03\u7F07\u7F08\u7F0B\u7F0C\u7F0F\u7F11\u7F12\u7F17\u7F19\u7F1C\u7F1B\u7F1F\u7F21",6,"\u7F2A\u7F2B\u7F2C\u7F2D\u7F2F",4,"\u7F35\u5E7A\u757F\u5DDB\u753E\u9095\u738E\u7391\u73AE\u73A2\u739F\u73CF\u73C2\u73D1\u73B7\u73B3\u73C0\u73C9\u73C8\u73E5\u73D9\u987C\u740A\u73E9\u73E7\u73DE\u73BA\u73F2\u740F\u742A\u745B\u7426\u7425\u7428\u7430\u742E\u742C"],["e840","\u942F",14,"\u943F",43,"\u946C\u946D\u946E\u946F"],["e880","\u9470",20,"\u9491\u9496\u9498\u94C7\u94CF\u94D3\u94D4\u94DA\u94E6\u94FB\u951C\u9520\u741B\u741A\u7441\u745C\u7457\u7455\u7459\u7477\u746D\u747E\u749C\u748E\u7480\u7481\u7487\u748B\u749E\u74A8\u74A9\u7490\u74A7\u74D2\u74BA\u97EA\u97EB\u97EC\u674C\u6753\u675E\u6748\u6769\u67A5\u6787\u676A\u6773\u6798\u67A7\u6775\u67A8\u679E\u67AD\u678B\u6777\u677C\u67F0\u6809\u67D8\u680A\u67E9\u67B0\u680C\u67D9\u67B5\u67DA\u67B3\u67DD\u6800\u67C3\u67B8\u67E2\u680E\u67C1\u67FD\u6832\u6833\u6860\u6861\u684E\u6862\u6844\u6864\u6883\u681D\u6855\u6866\u6841\u6867\u6840\u683E\u684A\u6849\u6829\u68B5\u688F\u6874\u6877\u6893\u686B\u68C2\u696E\u68FC\u691F\u6920\u68F9"],["e940","\u9527\u9533\u953D\u9543\u9548\u954B\u9555\u955A\u9560\u956E\u9574\u9575\u9577",7,"\u9580",42],["e980","\u95AB",32,"\u6924\u68F0\u690B\u6901\u6957\u68E3\u6910\u6971\u6939\u6960\u6942\u695D\u6984\u696B\u6980\u6998\u6978\u6934\u69CC\u6987\u6988\u69CE\u6989\u6966\u6963\u6979\u699B\u69A7\u69BB\u69AB\u69AD\u69D4\u69B1\u69C1\u69CA\u69DF\u6995\u69E0\u698D\u69FF\u6A2F\u69ED\u6A17\u6A18\u6A65\u69F2\u6A44\u6A3E\u6AA0\u6A50\u6A5B\u6A35\u6A8E\u6A79\u6A3D\u6A28\u6A58\u6A7C\u6A91\u6A90\u6AA9\u6A97\u6AAB\u7337\u7352\u6B81\u6B82\u6B87\u6B84\u6B92\u6B93\u6B8D\u6B9A\u6B9B\u6BA1\u6BAA\u8F6B\u8F6D\u8F71\u8F72\u8F73\u8F75\u8F76\u8F78\u8F77\u8F79\u8F7A\u8F7C\u8F7E\u8F81\u8F82\u8F84\u8F87\u8F8B"],["ea40","\u95CC",27,"\u95EC\u95FF\u9607\u9613\u9618\u961B\u961E\u9620\u9623",6,"\u962B\u962C\u962D\u962F\u9630\u9637\u9638\u9639\u963A\u963E\u9641\u9643\u964A\u964E\u964F\u9651\u9652\u9653\u9656\u9657"],["ea80","\u9658\u9659\u965A\u965C\u965D\u965E\u9660\u9663\u9665\u9666\u966B\u966D",4,"\u9673\u9678",12,"\u9687\u9689\u968A\u8F8D\u8F8E\u8F8F\u8F98\u8F9A\u8ECE\u620B\u6217\u621B\u621F\u6222\u6221\u6225\u6224\u622C\u81E7\u74EF\u74F4\u74FF\u750F\u7511\u7513\u6534\u65EE\u65EF\u65F0\u660A\u6619\u6772\u6603\u6615\u6600\u7085\u66F7\u661D\u6634\u6631\u6636\u6635\u8006\u665F\u6654\u6641\u664F\u6656\u6661\u6657\u6677\u6684\u668C\u66A7\u669D\u66BE\u66DB\u66DC\u66E6\u66E9\u8D32\u8D33\u8D36\u8D3B\u8D3D\u8D40\u8D45\u8D46\u8D48\u8D49\u8D47\u8D4D\u8D55\u8D59\u89C7\u89CA\u89CB\u89CC\u89CE\u89CF\u89D0\u89D1\u726E\u729F\u725D\u7266\u726F\u727E\u727F\u7284\u728B\u728D\u728F\u7292\u6308\u6332\u63B0"],["eb40","\u968C\u968E\u9691\u9692\u9693\u9695\u9696\u969A\u969B\u969D",9,"\u96A8",7,"\u96B1\u96B2\u96B4\u96B5\u96B7\u96B8\u96BA\u96BB\u96BF\u96C2\u96C3\u96C8\u96CA\u96CB\u96D0\u96D1\u96D3\u96D4\u96D6",9,"\u96E1",6,"\u96EB"],["eb80","\u96EC\u96ED\u96EE\u96F0\u96F1\u96F2\u96F4\u96F5\u96F8\u96FA\u96FB\u96FC\u96FD\u96FF\u9702\u9703\u9705\u970A\u970B\u970C\u9710\u9711\u9712\u9714\u9715\u9717",4,"\u971D\u971F\u9720\u643F\u64D8\u8004\u6BEA\u6BF3\u6BFD\u6BF5\u6BF9\u6C05\u6C07\u6C06\u6C0D\u6C15\u6C18\u6C19\u6C1A\u6C21\u6C29\u6C24\u6C2A\u6C32\u6535\u6555\u656B\u724D\u7252\u7256\u7230\u8662\u5216\u809F\u809C\u8093\u80BC\u670A\u80BD\u80B1\u80AB\u80AD\u80B4\u80B7\u80E7\u80E8\u80E9\u80EA\u80DB\u80C2\u80C4\u80D9\u80CD\u80D7\u6710\u80DD\u80EB\u80F1\u80F4\u80ED\u810D\u810E\u80F2\u80FC\u6715\u8112\u8C5A\u8136\u811E\u812C\u8118\u8132\u8148\u814C\u8153\u8174\u8159\u815A\u8171\u8160\u8169\u817C\u817D\u816D\u8167\u584D\u5AB5\u8188\u8182\u8191\u6ED5\u81A3\u81AA\u81CC\u6726\u81CA\u81BB"],["ec40","\u9721",8,"\u972B\u972C\u972E\u972F\u9731\u9733",4,"\u973A\u973B\u973C\u973D\u973F",18,"\u9754\u9755\u9757\u9758\u975A\u975C\u975D\u975F\u9763\u9764\u9766\u9767\u9768\u976A",7],["ec80","\u9772\u9775\u9777",4,"\u977D",7,"\u9786",4,"\u978C\u978E\u978F\u9790\u9793\u9795\u9796\u9797\u9799",4,"\u81C1\u81A6\u6B24\u6B37\u6B39\u6B43\u6B46\u6B59\u98D1\u98D2\u98D3\u98D5\u98D9\u98DA\u6BB3\u5F40\u6BC2\u89F3\u6590\u9F51\u6593\u65BC\u65C6\u65C4\u65C3\u65CC\u65CE\u65D2\u65D6\u7080\u709C\u7096\u709D\u70BB\u70C0\u70B7\u70AB\u70B1\u70E8\u70CA\u7110\u7113\u7116\u712F\u7131\u7173\u715C\u7168\u7145\u7172\u714A\u7178\u717A\u7198\u71B3\u71B5\u71A8\u71A0\u71E0\u71D4\u71E7\u71F9\u721D\u7228\u706C\u7118\u7166\u71B9\u623E\u623D\u6243\u6248\u6249\u793B\u7940\u7946\u7949\u795B\u795C\u7953\u795A\u7962\u7957\u7960\u796F\u7967\u797A\u7985\u798A\u799A\u79A7\u79B3\u5FD1\u5FD0"],["ed40","\u979E\u979F\u97A1\u97A2\u97A4",6,"\u97AC\u97AE\u97B0\u97B1\u97B3\u97B5",46],["ed80","\u97E4\u97E5\u97E8\u97EE",4,"\u97F4\u97F7",23,"\u603C\u605D\u605A\u6067\u6041\u6059\u6063\u60AB\u6106\u610D\u615D\u61A9\u619D\u61CB\u61D1\u6206\u8080\u807F\u6C93\u6CF6\u6DFC\u77F6\u77F8\u7800\u7809\u7817\u7818\u7811\u65AB\u782D\u781C\u781D\u7839\u783A\u783B\u781F\u783C\u7825\u782C\u7823\u7829\u784E\u786D\u7856\u7857\u7826\u7850\u7847\u784C\u786A\u789B\u7893\u789A\u7887\u789C\u78A1\u78A3\u78B2\u78B9\u78A5\u78D4\u78D9\u78C9\u78EC\u78F2\u7905\u78F4\u7913\u7924\u791E\u7934\u9F9B\u9EF9\u9EFB\u9EFC\u76F1\u7704\u770D\u76F9\u7707\u7708\u771A\u7722\u7719\u772D\u7726\u7735\u7738\u7750\u7751\u7747\u7743\u775A\u7768"],["ee40","\u980F",62],["ee80","\u984E",32,"\u7762\u7765\u777F\u778D\u777D\u7780\u778C\u7791\u779F\u77A0\u77B0\u77B5\u77BD\u753A\u7540\u754E\u754B\u7548\u755B\u7572\u7579\u7583\u7F58\u7F61\u7F5F\u8A48\u7F68\u7F74\u7F71\u7F79\u7F81\u7F7E\u76CD\u76E5\u8832\u9485\u9486\u9487\u948B\u948A\u948C\u948D\u948F\u9490\u9494\u9497\u9495\u949A\u949B\u949C\u94A3\u94A4\u94AB\u94AA\u94AD\u94AC\u94AF\u94B0\u94B2\u94B4\u94B6",4,"\u94BC\u94BD\u94BF\u94C4\u94C8",6,"\u94D0\u94D1\u94D2\u94D5\u94D6\u94D7\u94D9\u94D8\u94DB\u94DE\u94DF\u94E0\u94E2\u94E4\u94E5\u94E7\u94E8\u94EA"],["ef40","\u986F",5,"\u988B\u988E\u9892\u9895\u9899\u98A3\u98A8",37,"\u98CF\u98D0\u98D4\u98D6\u98D7\u98DB\u98DC\u98DD\u98E0",4],["ef80","\u98E5\u98E6\u98E9",30,"\u94E9\u94EB\u94EE\u94EF\u94F3\u94F4\u94F5\u94F7\u94F9\u94FC\u94FD\u94FF\u9503\u9502\u9506\u9507\u9509\u950A\u950D\u950E\u950F\u9512",4,"\u9518\u951B\u951D\u951E\u951F\u9522\u952A\u952B\u9529\u952C\u9531\u9532\u9534\u9536\u9537\u9538\u953C\u953E\u953F\u9542\u9535\u9544\u9545\u9546\u9549\u954C\u954E\u954F\u9552\u9553\u9554\u9556\u9557\u9558\u9559\u955B\u955E\u955F\u955D\u9561\u9562\u9564",8,"\u956F\u9571\u9572\u9573\u953A\u77E7\u77EC\u96C9\u79D5\u79ED\u79E3\u79EB\u7A06\u5D47\u7A03\u7A02\u7A1E\u7A14"],["f040","\u9908",4,"\u990E\u990F\u9911",28,"\u992F",26],["f080","\u994A",9,"\u9956",12,"\u9964\u9966\u9973\u9978\u9979\u997B\u997E\u9982\u9983\u9989\u7A39\u7A37\u7A51\u9ECF\u99A5\u7A70\u7688\u768E\u7693\u7699\u76A4\u74DE\u74E0\u752C\u9E20\u9E22\u9E28",4,"\u9E32\u9E31\u9E36\u9E38\u9E37\u9E39\u9E3A\u9E3E\u9E41\u9E42\u9E44\u9E46\u9E47\u9E48\u9E49\u9E4B\u9E4C\u9E4E\u9E51\u9E55\u9E57\u9E5A\u9E5B\u9E5C\u9E5E\u9E63\u9E66",6,"\u9E71\u9E6D\u9E73\u7592\u7594\u7596\u75A0\u759D\u75AC\u75A3\u75B3\u75B4\u75B8\u75C4\u75B1\u75B0\u75C3\u75C2\u75D6\u75CD\u75E3\u75E8\u75E6\u75E4\u75EB\u75E7\u7603\u75F1\u75FC\u75FF\u7610\u7600\u7605\u760C\u7617\u760A\u7625\u7618\u7615\u7619"],["f140","\u998C\u998E\u999A",10,"\u99A6\u99A7\u99A9",47],["f180","\u99D9",32,"\u761B\u763C\u7622\u7620\u7640\u762D\u7630\u763F\u7635\u7643\u763E\u7633\u764D\u765E\u7654\u765C\u7656\u766B\u766F\u7FCA\u7AE6\u7A78\u7A79\u7A80\u7A86\u7A88\u7A95\u7AA6\u7AA0\u7AAC\u7AA8\u7AAD\u7AB3\u8864\u8869\u8872\u887D\u887F\u8882\u88A2\u88C6\u88B7\u88BC\u88C9\u88E2\u88CE\u88E3\u88E5\u88F1\u891A\u88FC\u88E8\u88FE\u88F0\u8921\u8919\u8913\u891B\u890A\u8934\u892B\u8936\u8941\u8966\u897B\u758B\u80E5\u76B2\u76B4\u77DC\u8012\u8014\u8016\u801C\u8020\u8022\u8025\u8026\u8027\u8029\u8028\u8031\u800B\u8035\u8043\u8046\u804D\u8052\u8069\u8071\u8983\u9878\u9880\u9883"],["f240","\u99FA",62],["f280","\u9A39",32,"\u9889\u988C\u988D\u988F\u9894\u989A\u989B\u989E\u989F\u98A1\u98A2\u98A5\u98A6\u864D\u8654\u866C\u866E\u867F\u867A\u867C\u867B\u86A8\u868D\u868B\u86AC\u869D\u86A7\u86A3\u86AA\u8693\u86A9\u86B6\u86C4\u86B5\u86CE\u86B0\u86BA\u86B1\u86AF\u86C9\u86CF\u86B4\u86E9\u86F1\u86F2\u86ED\u86F3\u86D0\u8713\u86DE\u86F4\u86DF\u86D8\u86D1\u8703\u8707\u86F8\u8708\u870A\u870D\u8709\u8723\u873B\u871E\u8725\u872E\u871A\u873E\u8748\u8734\u8731\u8729\u8737\u873F\u8782\u8722\u877D\u877E\u877B\u8760\u8770\u874C\u876E\u878B\u8753\u8763\u877C\u8764\u8759\u8765\u8793\u87AF\u87A8\u87D2"],["f340","\u9A5A",17,"\u9A72\u9A83\u9A89\u9A8D\u9A8E\u9A94\u9A95\u9A99\u9AA6\u9AA9",6,"\u9AB2\u9AB3\u9AB4\u9AB5\u9AB9\u9ABB\u9ABD\u9ABE\u9ABF\u9AC3\u9AC4\u9AC6",4,"\u9ACD\u9ACE\u9ACF\u9AD0\u9AD2\u9AD4\u9AD5\u9AD6\u9AD7\u9AD9\u9ADA\u9ADB\u9ADC"],["f380","\u9ADD\u9ADE\u9AE0\u9AE2\u9AE3\u9AE4\u9AE5\u9AE7\u9AE8\u9AE9\u9AEA\u9AEC\u9AEE\u9AF0",8,"\u9AFA\u9AFC",6,"\u9B04\u9B05\u9B06\u87C6\u8788\u8785\u87AD\u8797\u8783\u87AB\u87E5\u87AC\u87B5\u87B3\u87CB\u87D3\u87BD\u87D1\u87C0\u87CA\u87DB\u87EA\u87E0\u87EE\u8816\u8813\u87FE\u880A\u881B\u8821\u8839\u883C\u7F36\u7F42\u7F44\u7F45\u8210\u7AFA\u7AFD\u7B08\u7B03\u7B04\u7B15\u7B0A\u7B2B\u7B0F\u7B47\u7B38\u7B2A\u7B19\u7B2E\u7B31\u7B20\u7B25\u7B24\u7B33\u7B3E\u7B1E\u7B58\u7B5A\u7B45\u7B75\u7B4C\u7B5D\u7B60\u7B6E\u7B7B\u7B62\u7B72\u7B71\u7B90\u7BA6\u7BA7\u7BB8\u7BAC\u7B9D\u7BA8\u7B85\u7BAA\u7B9C\u7BA2\u7BAB\u7BB4\u7BD1\u7BC1\u7BCC\u7BDD\u7BDA\u7BE5\u7BE6\u7BEA\u7C0C\u7BFE\u7BFC\u7C0F\u7C16\u7C0B"],["f440","\u9B07\u9B09",5,"\u9B10\u9B11\u9B12\u9B14",10,"\u9B20\u9B21\u9B22\u9B24",10,"\u9B30\u9B31\u9B33",7,"\u9B3D\u9B3E\u9B3F\u9B40\u9B46\u9B4A\u9B4B\u9B4C\u9B4E\u9B50\u9B52\u9B53\u9B55",5],["f480","\u9B5B",32,"\u7C1F\u7C2A\u7C26\u7C38\u7C41\u7C40\u81FE\u8201\u8202\u8204\u81EC\u8844\u8221\u8222\u8223\u822D\u822F\u8228\u822B\u8238\u823B\u8233\u8234\u823E\u8244\u8249\u824B\u824F\u825A\u825F\u8268\u887E\u8885\u8888\u88D8\u88DF\u895E\u7F9D\u7F9F\u7FA7\u7FAF\u7FB0\u7FB2\u7C7C\u6549\u7C91\u7C9D\u7C9C\u7C9E\u7CA2\u7CB2\u7CBC\u7CBD\u7CC1\u7CC7\u7CCC\u7CCD\u7CC8\u7CC5\u7CD7\u7CE8\u826E\u66A8\u7FBF\u7FCE\u7FD5\u7FE5\u7FE1\u7FE6\u7FE9\u7FEE\u7FF3\u7CF8\u7D77\u7DA6\u7DAE\u7E47\u7E9B\u9EB8\u9EB4\u8D73\u8D84\u8D94\u8D91\u8DB1\u8D67\u8D6D\u8C47\u8C49\u914A\u9150\u914E\u914F\u9164"],["f540","\u9B7C",62],["f580","\u9BBB",32,"\u9162\u9161\u9170\u9169\u916F\u917D\u917E\u9172\u9174\u9179\u918C\u9185\u9190\u918D\u9191\u91A2\u91A3\u91AA\u91AD\u91AE\u91AF\u91B5\u91B4\u91BA\u8C55\u9E7E\u8DB8\u8DEB\u8E05\u8E59\u8E69\u8DB5\u8DBF\u8DBC\u8DBA\u8DC4\u8DD6\u8DD7\u8DDA\u8DDE\u8DCE\u8DCF\u8DDB\u8DC6\u8DEC\u8DF7\u8DF8\u8DE3\u8DF9\u8DFB\u8DE4\u8E09\u8DFD\u8E14\u8E1D\u8E1F\u8E2C\u8E2E\u8E23\u8E2F\u8E3A\u8E40\u8E39\u8E35\u8E3D\u8E31\u8E49\u8E41\u8E42\u8E51\u8E52\u8E4A\u8E70\u8E76\u8E7C\u8E6F\u8E74\u8E85\u8E8F\u8E94\u8E90\u8E9C\u8E9E\u8C78\u8C82\u8C8A\u8C85\u8C98\u8C94\u659B\u89D6\u89DE\u89DA\u89DC"],["f640","\u9BDC",62],["f680","\u9C1B",32,"\u89E5\u89EB\u89EF\u8A3E\u8B26\u9753\u96E9\u96F3\u96EF\u9706\u9701\u9708\u970F\u970E\u972A\u972D\u9730\u973E\u9F80\u9F83\u9F85",5,"\u9F8C\u9EFE\u9F0B\u9F0D\u96B9\u96BC\u96BD\u96CE\u96D2\u77BF\u96E0\u928E\u92AE\u92C8\u933E\u936A\u93CA\u938F\u943E\u946B\u9C7F\u9C82\u9C85\u9C86\u9C87\u9C88\u7A23\u9C8B\u9C8E\u9C90\u9C91\u9C92\u9C94\u9C95\u9C9A\u9C9B\u9C9E",5,"\u9CA5",4,"\u9CAB\u9CAD\u9CAE\u9CB0",7,"\u9CBA\u9CBB\u9CBC\u9CBD\u9CC4\u9CC5\u9CC6\u9CC7\u9CCA\u9CCB"],["f740","\u9C3C",62],["f780","\u9C7B\u9C7D\u9C7E\u9C80\u9C83\u9C84\u9C89\u9C8A\u9C8C\u9C8F\u9C93\u9C96\u9C97\u9C98\u9C99\u9C9D\u9CAA\u9CAC\u9CAF\u9CB9\u9CBE",4,"\u9CC8\u9CC9\u9CD1\u9CD2\u9CDA\u9CDB\u9CE0\u9CE1\u9CCC",4,"\u9CD3\u9CD4\u9CD5\u9CD7\u9CD8\u9CD9\u9CDC\u9CDD\u9CDF\u9CE2\u977C\u9785\u9791\u9792\u9794\u97AF\u97AB\u97A3\u97B2\u97B4\u9AB1\u9AB0\u9AB7\u9E58\u9AB6\u9ABA\u9ABC\u9AC1\u9AC0\u9AC5\u9AC2\u9ACB\u9ACC\u9AD1\u9B45\u9B43\u9B47\u9B49\u9B48\u9B4D\u9B51\u98E8\u990D\u992E\u9955\u9954\u9ADF\u9AE1\u9AE6\u9AEF\u9AEB\u9AFB\u9AED\u9AF9\u9B08\u9B0F\u9B13\u9B1F\u9B23\u9EBD\u9EBE\u7E3B\u9E82\u9E87\u9E88\u9E8B\u9E92\u93D6\u9E9D\u9E9F\u9EDB\u9EDC\u9EDD\u9EE0\u9EDF\u9EE2\u9EE9\u9EE7\u9EE5\u9EEA\u9EEF\u9F22\u9F2C\u9F2F\u9F39\u9F37\u9F3D\u9F3E\u9F44"],["f840","\u9CE3",62],["f880","\u9D22",32],["f940","\u9D43",62],["f980","\u9D82",32],["fa40","\u9DA3",62],["fa80","\u9DE2",32],["fb40","\u9E03",27,"\u9E24\u9E27\u9E2E\u9E30\u9E34\u9E3B\u9E3C\u9E40\u9E4D\u9E50\u9E52\u9E53\u9E54\u9E56\u9E59\u9E5D\u9E5F\u9E60\u9E61\u9E62\u9E65\u9E6E\u9E6F\u9E72\u9E74",9,"\u9E80"],["fb80","\u9E81\u9E83\u9E84\u9E85\u9E86\u9E89\u9E8A\u9E8C",5,"\u9E94",8,"\u9E9E\u9EA0",5,"\u9EA7\u9EA8\u9EA9\u9EAA"],["fc40","\u9EAB",8,"\u9EB5\u9EB6\u9EB7\u9EB9\u9EBA\u9EBC\u9EBF",4,"\u9EC5\u9EC6\u9EC7\u9EC8\u9ECA\u9ECB\u9ECC\u9ED0\u9ED2\u9ED3\u9ED5\u9ED6\u9ED7\u9ED9\u9EDA\u9EDE\u9EE1\u9EE3\u9EE4\u9EE6\u9EE8\u9EEB\u9EEC\u9EED\u9EEE\u9EF0",8,"\u9EFA\u9EFD\u9EFF",6],["fc80","\u9F06",4,"\u9F0C\u9F0F\u9F11\u9F12\u9F14\u9F15\u9F16\u9F18\u9F1A",5,"\u9F21\u9F23",8,"\u9F2D\u9F2E\u9F30\u9F31"],["fd40","\u9F32",4,"\u9F38\u9F3A\u9F3C\u9F3F",4,"\u9F45",10,"\u9F52",38],["fd80","\u9F79",5,"\u9F81\u9F82\u9F8D",11,"\u9F9C\u9F9D\u9F9E\u9FA1",4,"\uF92C\uF979\uF995\uF9E7\uF9F1"],["fe40","\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"]],f$=[["a140","\uE4C6",62],["a180","\uE505",32],["a240","\uE526",62],["a280","\uE565",32],["a2ab","\uE766",5],["a2e3","\u20AC\uE76D"],["a2ef","\uE76E\uE76F"],["a2fd","\uE770\uE771"],["a340","\uE586",62],["a380","\uE5C5",31,"\u3000"],["a440","\uE5E6",62],["a480","\uE625",32],["a4f4","\uE772",10],["a540","\uE646",62],["a580","\uE685",32],["a5f7","\uE77D",7],["a640","\uE6A6",62],["a680","\uE6E5",32],["a6b9","\uE785",7],["a6d9","\uE78D",6],["a6ec","\uE794\uE795"],["a6f3","\uE796"],["a6f6","\uE797",8],["a740","\uE706",62],["a780","\uE745",32],["a7c2","\uE7A0",14],["a7f2","\uE7AF",12],["a896","\uE7BC",10],["a8bc","\u1E3F"],["a8bf","\u01F9"],["a8c1","\uE7C9\uE7CA\uE7CB\uE7CC"],["a8ea","\uE7CD",20],["a958","\uE7E2"],["a95b","\uE7E3"],["a95d","\uE7E4\uE7E5\uE7E6"],["a989","\u303E\u2FF0",11],["a997","\uE7F4",12],["a9f0","\uE801",14],["aaa1","\uE000",93],["aba1","\uE05E",93],["aca1","\uE0BC",93],["ada1","\uE11A",93],["aea1","\uE178",93],["afa1","\uE1D6",93],["d7fa","\uE810",4],["f8a1","\uE234",93],["f9a1","\uE292",93],["faa1","\uE2F0",93],["fba1","\uE34E",93],["fca1","\uE3AC",93],["fda1","\uE40A",93],["fe50","\u2E81\uE816\uE817\uE818\u2E84\u3473\u3447\u2E88\u2E8B\uE81E\u359E\u361A\u360E\u2E8C\u2E97\u396E\u3918\uE826\u39CF\u39DF\u3A73\u39D0\uE82B\uE82C\u3B4E\u3C6E\u3CE0\u2EA7\uE831\uE832\u2EAA\u4056\u415F\u2EAE\u4337\u2EB3\u2EB6\u2EB7\uE83B\u43B1\u43AC\u2EBB\u43DD\u44D6\u4661\u464C\uE843"],["fe80","\u4723\u4729\u477C\u478D\u2ECA\u4947\u497A\u497D\u4982\u4983\u4985\u4986\u499F\u499B\u49B7\u49B6\uE854\uE855\u4CA3\u4C9F\u4CA0\u4CA1\u4C77\u4CA2\u4D13",6,"\u4DAE\uE864\uE468",93],["8135f437","\uE7C7"]],FPe=[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],NPe=[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189e3],zPe={uChars:FPe,gbChars:NPe},UPe=[["0","\0",127],["8141","\uAC02\uAC03\uAC05\uAC06\uAC0B",4,"\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25",6,"\uAC2E\uAC32\uAC33\uAC34"],["8161","\uAC35\uAC36\uAC37\uAC3A\uAC3B\uAC3D\uAC3E\uAC3F\uAC41",9,"\uAC4C\uAC4E",5,"\uAC55"],["8181","\uAC56\uAC57\uAC59\uAC5A\uAC5B\uAC5D",18,"\uAC72\uAC73\uAC75\uAC76\uAC79\uAC7B",4,"\uAC82\uAC87\uAC88\uAC8D\uAC8E\uAC8F\uAC91\uAC92\uAC93\uAC95",6,"\uAC9E\uACA2",5,"\uACAB\uACAD\uACAE\uACB1",6,"\uACBA\uACBE\uACBF\uACC0\uACC2\uACC3\uACC5\uACC6\uACC7\uACC9\uACCA\uACCB\uACCD",7,"\uACD6\uACD8",7,"\uACE2\uACE3\uACE5\uACE6\uACE9\uACEB\uACED\uACEE\uACF2\uACF4\uACF7",4,"\uACFE\uACFF\uAD01\uAD02\uAD03\uAD05\uAD07",4,"\uAD0E\uAD10\uAD12\uAD13"],["8241","\uAD14\uAD15\uAD16\uAD17\uAD19\uAD1A\uAD1B\uAD1D\uAD1E\uAD1F\uAD21",7,"\uAD2A\uAD2B\uAD2E",5],["8261","\uAD36\uAD37\uAD39\uAD3A\uAD3B\uAD3D",6,"\uAD46\uAD48\uAD4A",5,"\uAD51\uAD52\uAD53\uAD55\uAD56\uAD57"],["8281","\uAD59",7,"\uAD62\uAD64",7,"\uAD6E\uAD6F\uAD71\uAD72\uAD77\uAD78\uAD79\uAD7A\uAD7E\uAD80\uAD83",4,"\uAD8A\uAD8B\uAD8D\uAD8E\uAD8F\uAD91",10,"\uAD9E",5,"\uADA5",17,"\uADB8",7,"\uADC2\uADC3\uADC5\uADC6\uADC7\uADC9",6,"\uADD2\uADD4",7,"\uADDD\uADDE\uADDF\uADE1\uADE2\uADE3\uADE5",18],["8341","\uADFA\uADFB\uADFD\uADFE\uAE02",5,"\uAE0A\uAE0C\uAE0E",5,"\uAE15",7],["8361","\uAE1D",18,"\uAE32\uAE33\uAE35\uAE36\uAE39\uAE3B\uAE3C"],["8381","\uAE3D\uAE3E\uAE3F\uAE42\uAE44\uAE47\uAE48\uAE49\uAE4B\uAE4F\uAE51\uAE52\uAE53\uAE55\uAE57",4,"\uAE5E\uAE62\uAE63\uAE64\uAE66\uAE67\uAE6A\uAE6B\uAE6D\uAE6E\uAE6F\uAE71",6,"\uAE7A\uAE7E",5,"\uAE86",5,"\uAE8D",46,"\uAEBF\uAEC1\uAEC2\uAEC3\uAEC5",6,"\uAECE\uAED2",5,"\uAEDA\uAEDB\uAEDD",8],["8441","\uAEE6\uAEE7\uAEE9\uAEEA\uAEEC\uAEEE",5,"\uAEF5\uAEF6\uAEF7\uAEF9\uAEFA\uAEFB\uAEFD",8],["8461","\uAF06\uAF09\uAF0A\uAF0B\uAF0C\uAF0E\uAF0F\uAF11",18],["8481","\uAF24",7,"\uAF2E\uAF2F\uAF31\uAF33\uAF35",6,"\uAF3E\uAF40\uAF44\uAF45\uAF46\uAF47\uAF4A",5,"\uAF51",10,"\uAF5E",5,"\uAF66",18,"\uAF7A",5,"\uAF81\uAF82\uAF83\uAF85\uAF86\uAF87\uAF89",6,"\uAF92\uAF93\uAF94\uAF96",5,"\uAF9D",26,"\uAFBA\uAFBB\uAFBD\uAFBE"],["8541","\uAFBF\uAFC1",5,"\uAFCA\uAFCC\uAFCF",4,"\uAFD5",6,"\uAFDD",4],["8561","\uAFE2",5,"\uAFEA",5,"\uAFF2\uAFF3\uAFF5\uAFF6\uAFF7\uAFF9",6,"\uB002\uB003"],["8581","\uB005",6,"\uB00D\uB00E\uB00F\uB011\uB012\uB013\uB015",6,"\uB01E",9,"\uB029",26,"\uB046\uB047\uB049\uB04B\uB04D\uB04F\uB050\uB051\uB052\uB056\uB058\uB05A\uB05B\uB05C\uB05E",29,"\uB07E\uB07F\uB081\uB082\uB083\uB085",6,"\uB08E\uB090\uB092",5,"\uB09B\uB09D\uB09E\uB0A3\uB0A4"],["8641","\uB0A5\uB0A6\uB0A7\uB0AA\uB0B0\uB0B2\uB0B6\uB0B7\uB0B9\uB0BA\uB0BB\uB0BD",6,"\uB0C6\uB0CA",5,"\uB0D2"],["8661","\uB0D3\uB0D5\uB0D6\uB0D7\uB0D9",6,"\uB0E1\uB0E2\uB0E3\uB0E4\uB0E6",10],["8681","\uB0F1",22,"\uB10A\uB10D\uB10E\uB10F\uB111\uB114\uB115\uB116\uB117\uB11A\uB11E",4,"\uB126\uB127\uB129\uB12A\uB12B\uB12D",6,"\uB136\uB13A",5,"\uB142\uB143\uB145\uB146\uB147\uB149",6,"\uB152\uB153\uB156\uB157\uB159\uB15A\uB15B\uB15D\uB15E\uB15F\uB161",22,"\uB17A\uB17B\uB17D\uB17E\uB17F\uB181\uB183",4,"\uB18A\uB18C\uB18E\uB18F\uB190\uB191\uB195\uB196\uB197\uB199\uB19A\uB19B\uB19D"],["8741","\uB19E",9,"\uB1A9",15],["8761","\uB1B9",18,"\uB1CD\uB1CE\uB1CF\uB1D1\uB1D2\uB1D3\uB1D5"],["8781","\uB1D6",5,"\uB1DE\uB1E0",7,"\uB1EA\uB1EB\uB1ED\uB1EE\uB1EF\uB1F1",7,"\uB1FA\uB1FC\uB1FE",5,"\uB206\uB207\uB209\uB20A\uB20D",6,"\uB216\uB218\uB21A",5,"\uB221",18,"\uB235",6,"\uB23D",26,"\uB259\uB25A\uB25B\uB25D\uB25E\uB25F\uB261",6,"\uB26A",4],["8841","\uB26F",4,"\uB276",5,"\uB27D",6,"\uB286\uB287\uB288\uB28A",4],["8861","\uB28F\uB292\uB293\uB295\uB296\uB297\uB29B",4,"\uB2A2\uB2A4\uB2A7\uB2A8\uB2A9\uB2AB\uB2AD\uB2AE\uB2AF\uB2B1\uB2B2\uB2B3\uB2B5\uB2B6\uB2B7"],["8881","\uB2B8",15,"\uB2CA\uB2CB\uB2CD\uB2CE\uB2CF\uB2D1\uB2D3",4,"\uB2DA\uB2DC\uB2DE\uB2DF\uB2E0\uB2E1\uB2E3\uB2E7\uB2E9\uB2EA\uB2F0\uB2F1\uB2F2\uB2F6\uB2FC\uB2FD\uB2FE\uB302\uB303\uB305\uB306\uB307\uB309",6,"\uB312\uB316",5,"\uB31D",54,"\uB357\uB359\uB35A\uB35D\uB360\uB361\uB362\uB363"],["8941","\uB366\uB368\uB36A\uB36C\uB36D\uB36F\uB372\uB373\uB375\uB376\uB377\uB379",6,"\uB382\uB386",5,"\uB38D"],["8961","\uB38E\uB38F\uB391\uB392\uB393\uB395",10,"\uB3A2",5,"\uB3A9\uB3AA\uB3AB\uB3AD"],["8981","\uB3AE",21,"\uB3C6\uB3C7\uB3C9\uB3CA\uB3CD\uB3CF\uB3D1\uB3D2\uB3D3\uB3D6\uB3D8\uB3DA\uB3DC\uB3DE\uB3DF\uB3E1\uB3E2\uB3E3\uB3E5\uB3E6\uB3E7\uB3E9",18,"\uB3FD",18,"\uB411",6,"\uB419\uB41A\uB41B\uB41D\uB41E\uB41F\uB421",6,"\uB42A\uB42C",7,"\uB435",15],["8a41","\uB445",10,"\uB452\uB453\uB455\uB456\uB457\uB459",6,"\uB462\uB464\uB466"],["8a61","\uB467",4,"\uB46D",18,"\uB481\uB482"],["8a81","\uB483",4,"\uB489",19,"\uB49E",5,"\uB4A5\uB4A6\uB4A7\uB4A9\uB4AA\uB4AB\uB4AD",7,"\uB4B6\uB4B8\uB4BA",5,"\uB4C1\uB4C2\uB4C3\uB4C5\uB4C6\uB4C7\uB4C9",6,"\uB4D1\uB4D2\uB4D3\uB4D4\uB4D6",5,"\uB4DE\uB4DF\uB4E1\uB4E2\uB4E5\uB4E7",4,"\uB4EE\uB4F0\uB4F2",5,"\uB4F9",26,"\uB516\uB517\uB519\uB51A\uB51D"],["8b41","\uB51E",5,"\uB526\uB52B",4,"\uB532\uB533\uB535\uB536\uB537\uB539",6,"\uB542\uB546"],["8b61","\uB547\uB548\uB549\uB54A\uB54E\uB54F\uB551\uB552\uB553\uB555",6,"\uB55E\uB562",8],["8b81","\uB56B",52,"\uB5A2\uB5A3\uB5A5\uB5A6\uB5A7\uB5A9\uB5AC\uB5AD\uB5AE\uB5AF\uB5B2\uB5B6",4,"\uB5BE\uB5BF\uB5C1\uB5C2\uB5C3\uB5C5",6,"\uB5CE\uB5D2",5,"\uB5D9",18,"\uB5ED",18],["8c41","\uB600",15,"\uB612\uB613\uB615\uB616\uB617\uB619",4],["8c61","\uB61E",6,"\uB626",5,"\uB62D",6,"\uB635",5],["8c81","\uB63B",12,"\uB649",26,"\uB665\uB666\uB667\uB669",50,"\uB69E\uB69F\uB6A1\uB6A2\uB6A3\uB6A5",5,"\uB6AD\uB6AE\uB6AF\uB6B0\uB6B2",16],["8d41","\uB6C3",16,"\uB6D5",8],["8d61","\uB6DE",17,"\uB6F1\uB6F2\uB6F3\uB6F5\uB6F6\uB6F7\uB6F9\uB6FA"],["8d81","\uB6FB",4,"\uB702\uB703\uB704\uB706",33,"\uB72A\uB72B\uB72D\uB72E\uB731",6,"\uB73A\uB73C",7,"\uB745\uB746\uB747\uB749\uB74A\uB74B\uB74D",6,"\uB756",9,"\uB761\uB762\uB763\uB765\uB766\uB767\uB769",6,"\uB772\uB774\uB776",5,"\uB77E\uB77F\uB781\uB782\uB783\uB785",6,"\uB78E\uB793\uB794\uB795\uB79A\uB79B\uB79D\uB79E"],["8e41","\uB79F\uB7A1",6,"\uB7AA\uB7AE",5,"\uB7B6\uB7B7\uB7B9",8],["8e61","\uB7C2",4,"\uB7C8\uB7CA",19],["8e81","\uB7DE",13,"\uB7EE\uB7EF\uB7F1\uB7F2\uB7F3\uB7F5",6,"\uB7FE\uB802",4,"\uB80A\uB80B\uB80D\uB80E\uB80F\uB811",6,"\uB81A\uB81C\uB81E",5,"\uB826\uB827\uB829\uB82A\uB82B\uB82D",6,"\uB836\uB83A",5,"\uB841\uB842\uB843\uB845",11,"\uB852\uB854",7,"\uB85E\uB85F\uB861\uB862\uB863\uB865",6,"\uB86E\uB870\uB872",5,"\uB879\uB87A\uB87B\uB87D",7],["8f41","\uB885",7,"\uB88E",17],["8f61","\uB8A0",7,"\uB8A9",6,"\uB8B1\uB8B2\uB8B3\uB8B5\uB8B6\uB8B7\uB8B9",4],["8f81","\uB8BE\uB8BF\uB8C2\uB8C4\uB8C6",5,"\uB8CD\uB8CE\uB8CF\uB8D1\uB8D2\uB8D3\uB8D5",7,"\uB8DE\uB8E0\uB8E2",5,"\uB8EA\uB8EB\uB8ED\uB8EE\uB8EF\uB8F1",6,"\uB8FA\uB8FC\uB8FE",5,"\uB905",18,"\uB919",6,"\uB921",26,"\uB93E\uB93F\uB941\uB942\uB943\uB945",6,"\uB94D\uB94E\uB950\uB952",5],["9041","\uB95A\uB95B\uB95D\uB95E\uB95F\uB961",6,"\uB96A\uB96C\uB96E",5,"\uB976\uB977\uB979\uB97A\uB97B\uB97D"],["9061","\uB97E",5,"\uB986\uB988\uB98B\uB98C\uB98F",15],["9081","\uB99F",12,"\uB9AE\uB9AF\uB9B1\uB9B2\uB9B3\uB9B5",6,"\uB9BE\uB9C0\uB9C2",5,"\uB9CA\uB9CB\uB9CD\uB9D3",4,"\uB9DA\uB9DC\uB9DF\uB9E0\uB9E2\uB9E6\uB9E7\uB9E9\uB9EA\uB9EB\uB9ED",6,"\uB9F6\uB9FB",4,"\uBA02",5,"\uBA09",11,"\uBA16",33,"\uBA3A\uBA3B\uBA3D\uBA3E\uBA3F\uBA41\uBA43\uBA44\uBA45\uBA46"],["9141","\uBA47\uBA4A\uBA4C\uBA4F\uBA50\uBA51\uBA52\uBA56\uBA57\uBA59\uBA5A\uBA5B\uBA5D",6,"\uBA66\uBA6A",5],["9161","\uBA72\uBA73\uBA75\uBA76\uBA77\uBA79",9,"\uBA86\uBA88\uBA89\uBA8A\uBA8B\uBA8D",5],["9181","\uBA93",20,"\uBAAA\uBAAD\uBAAE\uBAAF\uBAB1\uBAB3",4,"\uBABA\uBABC\uBABE",5,"\uBAC5\uBAC6\uBAC7\uBAC9",14,"\uBADA",33,"\uBAFD\uBAFE\uBAFF\uBB01\uBB02\uBB03\uBB05",7,"\uBB0E\uBB10\uBB12",5,"\uBB19\uBB1A\uBB1B\uBB1D\uBB1E\uBB1F\uBB21",6],["9241","\uBB28\uBB2A\uBB2C",7,"\uBB37\uBB39\uBB3A\uBB3F",4,"\uBB46\uBB48\uBB4A\uBB4B\uBB4C\uBB4E\uBB51\uBB52"],["9261","\uBB53\uBB55\uBB56\uBB57\uBB59",7,"\uBB62\uBB64",7,"\uBB6D",4],["9281","\uBB72",21,"\uBB89\uBB8A\uBB8B\uBB8D\uBB8E\uBB8F\uBB91",18,"\uBBA5\uBBA6\uBBA7\uBBA9\uBBAA\uBBAB\uBBAD",6,"\uBBB5\uBBB6\uBBB8",7,"\uBBC1\uBBC2\uBBC3\uBBC5\uBBC6\uBBC7\uBBC9",6,"\uBBD1\uBBD2\uBBD4",35,"\uBBFA\uBBFB\uBBFD\uBBFE\uBC01"],["9341","\uBC03",4,"\uBC0A\uBC0E\uBC10\uBC12\uBC13\uBC19\uBC1A\uBC20\uBC21\uBC22\uBC23\uBC26\uBC28\uBC2A\uBC2B\uBC2C\uBC2E\uBC2F\uBC32\uBC33\uBC35"],["9361","\uBC36\uBC37\uBC39",6,"\uBC42\uBC46\uBC47\uBC48\uBC4A\uBC4B\uBC4E\uBC4F\uBC51",8],["9381","\uBC5A\uBC5B\uBC5C\uBC5E",37,"\uBC86\uBC87\uBC89\uBC8A\uBC8D\uBC8F",4,"\uBC96\uBC98\uBC9B",4,"\uBCA2\uBCA3\uBCA5\uBCA6\uBCA9",6,"\uBCB2\uBCB6",5,"\uBCBE\uBCBF\uBCC1\uBCC2\uBCC3\uBCC5",7,"\uBCCE\uBCD2\uBCD3\uBCD4\uBCD6\uBCD7\uBCD9\uBCDA\uBCDB\uBCDD",22,"\uBCF7\uBCF9\uBCFA\uBCFB\uBCFD"],["9441","\uBCFE",5,"\uBD06\uBD08\uBD0A",5,"\uBD11\uBD12\uBD13\uBD15",8],["9461","\uBD1E",5,"\uBD25",6,"\uBD2D",12],["9481","\uBD3A",5,"\uBD41",6,"\uBD4A\uBD4B\uBD4D\uBD4E\uBD4F\uBD51",6,"\uBD5A",9,"\uBD65\uBD66\uBD67\uBD69",22,"\uBD82\uBD83\uBD85\uBD86\uBD8B",4,"\uBD92\uBD94\uBD96\uBD97\uBD98\uBD9B\uBD9D",6,"\uBDA5",10,"\uBDB1",6,"\uBDB9",24],["9541","\uBDD2\uBDD3\uBDD6\uBDD7\uBDD9\uBDDA\uBDDB\uBDDD",11,"\uBDEA",5,"\uBDF1"],["9561","\uBDF2\uBDF3\uBDF5\uBDF6\uBDF7\uBDF9",6,"\uBE01\uBE02\uBE04\uBE06",5,"\uBE0E\uBE0F\uBE11\uBE12\uBE13"],["9581","\uBE15",6,"\uBE1E\uBE20",35,"\uBE46\uBE47\uBE49\uBE4A\uBE4B\uBE4D\uBE4F",4,"\uBE56\uBE58\uBE5C\uBE5D\uBE5E\uBE5F\uBE62\uBE63\uBE65\uBE66\uBE67\uBE69\uBE6B",4,"\uBE72\uBE76",4,"\uBE7E\uBE7F\uBE81\uBE82\uBE83\uBE85",6,"\uBE8E\uBE92",5,"\uBE9A",13,"\uBEA9",14],["9641","\uBEB8",23,"\uBED2\uBED3"],["9661","\uBED5\uBED6\uBED9",6,"\uBEE1\uBEE2\uBEE6",5,"\uBEED",8],["9681","\uBEF6",10,"\uBF02",5,"\uBF0A",13,"\uBF1A\uBF1E",33,"\uBF42\uBF43\uBF45\uBF46\uBF47\uBF49",6,"\uBF52\uBF53\uBF54\uBF56",44],["9741","\uBF83",16,"\uBF95",8],["9761","\uBF9E",17,"\uBFB1",7],["9781","\uBFB9",11,"\uBFC6",5,"\uBFCE\uBFCF\uBFD1\uBFD2\uBFD3\uBFD5",6,"\uBFDD\uBFDE\uBFE0\uBFE2",89,"\uC03D\uC03E\uC03F"],["9841","\uC040",16,"\uC052",5,"\uC059\uC05A\uC05B"],["9861","\uC05D\uC05E\uC05F\uC061",6,"\uC06A",15],["9881","\uC07A",21,"\uC092\uC093\uC095\uC096\uC097\uC099",6,"\uC0A2\uC0A4\uC0A6",5,"\uC0AE\uC0B1\uC0B2\uC0B7",4,"\uC0BE\uC0C2\uC0C3\uC0C4\uC0C6\uC0C7\uC0CA\uC0CB\uC0CD\uC0CE\uC0CF\uC0D1",6,"\uC0DA\uC0DE",5,"\uC0E6\uC0E7\uC0E9\uC0EA\uC0EB\uC0ED",6,"\uC0F6\uC0F8\uC0FA",5,"\uC101\uC102\uC103\uC105\uC106\uC107\uC109",6,"\uC111\uC112\uC113\uC114\uC116",5,"\uC121\uC122\uC125\uC128\uC129\uC12A\uC12B\uC12E"],["9941","\uC132\uC133\uC134\uC135\uC137\uC13A\uC13B\uC13D\uC13E\uC13F\uC141",6,"\uC14A\uC14E",5,"\uC156\uC157"],["9961","\uC159\uC15A\uC15B\uC15D",6,"\uC166\uC16A",5,"\uC171\uC172\uC173\uC175\uC176\uC177\uC179\uC17A\uC17B"],["9981","\uC17C",8,"\uC186",5,"\uC18F\uC191\uC192\uC193\uC195\uC197",4,"\uC19E\uC1A0\uC1A2\uC1A3\uC1A4\uC1A6\uC1A7\uC1AA\uC1AB\uC1AD\uC1AE\uC1AF\uC1B1",11,"\uC1BE",5,"\uC1C5\uC1C6\uC1C7\uC1C9\uC1CA\uC1CB\uC1CD",6,"\uC1D5\uC1D6\uC1D9",6,"\uC1E1\uC1E2\uC1E3\uC1E5\uC1E6\uC1E7\uC1E9",6,"\uC1F2\uC1F4",7,"\uC1FE\uC1FF\uC201\uC202\uC203\uC205",6,"\uC20E\uC210\uC212",5,"\uC21A\uC21B\uC21D\uC21E\uC221\uC222\uC223"],["9a41","\uC224\uC225\uC226\uC227\uC22A\uC22C\uC22E\uC230\uC233\uC235",16],["9a61","\uC246\uC247\uC249",6,"\uC252\uC253\uC255\uC256\uC257\uC259",6,"\uC261\uC262\uC263\uC264\uC266"],["9a81","\uC267",4,"\uC26E\uC26F\uC271\uC272\uC273\uC275",6,"\uC27E\uC280\uC282",5,"\uC28A",5,"\uC291",6,"\uC299\uC29A\uC29C\uC29E",5,"\uC2A6\uC2A7\uC2A9\uC2AA\uC2AB\uC2AE",5,"\uC2B6\uC2B8\uC2BA",33,"\uC2DE\uC2DF\uC2E1\uC2E2\uC2E5",5,"\uC2EE\uC2F0\uC2F2\uC2F3\uC2F4\uC2F5\uC2F7\uC2FA\uC2FD\uC2FE\uC2FF\uC301",6,"\uC30A\uC30B\uC30E\uC30F"],["9b41","\uC310\uC311\uC312\uC316\uC317\uC319\uC31A\uC31B\uC31D",6,"\uC326\uC327\uC32A",8],["9b61","\uC333",17,"\uC346",7],["9b81","\uC34E",25,"\uC36A\uC36B\uC36D\uC36E\uC36F\uC371\uC373",4,"\uC37A\uC37B\uC37E",5,"\uC385\uC386\uC387\uC389\uC38A\uC38B\uC38D",50,"\uC3C1",22,"\uC3DA"],["9c41","\uC3DB\uC3DD\uC3DE\uC3E1\uC3E3",4,"\uC3EA\uC3EB\uC3EC\uC3EE",5,"\uC3F6\uC3F7\uC3F9",5],["9c61","\uC3FF",8,"\uC409",6,"\uC411",9],["9c81","\uC41B",8,"\uC425",6,"\uC42D\uC42E\uC42F\uC431\uC432\uC433\uC435",6,"\uC43E",9,"\uC449",26,"\uC466\uC467\uC469\uC46A\uC46B\uC46D",6,"\uC476\uC477\uC478\uC47A",5,"\uC481",18,"\uC495",6,"\uC49D",12],["9d41","\uC4AA",13,"\uC4B9\uC4BA\uC4BB\uC4BD",8],["9d61","\uC4C6",25],["9d81","\uC4E0",8,"\uC4EA",5,"\uC4F2\uC4F3\uC4F5\uC4F6\uC4F7\uC4F9\uC4FB\uC4FC\uC4FD\uC4FE\uC502",9,"\uC50D\uC50E\uC50F\uC511\uC512\uC513\uC515",6,"\uC51D",10,"\uC52A\uC52B\uC52D\uC52E\uC52F\uC531",6,"\uC53A\uC53C\uC53E",5,"\uC546\uC547\uC54B\uC54F\uC550\uC551\uC552\uC556\uC55A\uC55B\uC55C\uC55F\uC562\uC563\uC565\uC566\uC567\uC569",6,"\uC572\uC576",5,"\uC57E\uC57F\uC581\uC582\uC583\uC585\uC586\uC588\uC589\uC58A\uC58B\uC58E\uC590\uC592\uC593\uC594"],["9e41","\uC596\uC599\uC59A\uC59B\uC59D\uC59E\uC59F\uC5A1",7,"\uC5AA",9,"\uC5B6"],["9e61","\uC5B7\uC5BA\uC5BF",4,"\uC5CB\uC5CD\uC5CF\uC5D2\uC5D3\uC5D5\uC5D6\uC5D7\uC5D9",6,"\uC5E2\uC5E4\uC5E6\uC5E7"],["9e81","\uC5E8\uC5E9\uC5EA\uC5EB\uC5EF\uC5F1\uC5F2\uC5F3\uC5F5\uC5F8\uC5F9\uC5FA\uC5FB\uC602\uC603\uC604\uC609\uC60A\uC60B\uC60D\uC60E\uC60F\uC611",6,"\uC61A\uC61D",6,"\uC626\uC627\uC629\uC62A\uC62B\uC62F\uC631\uC632\uC636\uC638\uC63A\uC63C\uC63D\uC63E\uC63F\uC642\uC643\uC645\uC646\uC647\uC649",6,"\uC652\uC656",5,"\uC65E\uC65F\uC661",10,"\uC66D\uC66E\uC670\uC672",5,"\uC67A\uC67B\uC67D\uC67E\uC67F\uC681",6,"\uC68A\uC68C\uC68E",5,"\uC696\uC697\uC699\uC69A\uC69B\uC69D",6,"\uC6A6"],["9f41","\uC6A8\uC6AA",5,"\uC6B2\uC6B3\uC6B5\uC6B6\uC6B7\uC6BB",4,"\uC6C2\uC6C4\uC6C6",5,"\uC6CE"],["9f61","\uC6CF\uC6D1\uC6D2\uC6D3\uC6D5",6,"\uC6DE\uC6DF\uC6E2",5,"\uC6EA\uC6EB\uC6ED\uC6EE\uC6EF\uC6F1\uC6F2"],["9f81","\uC6F3",4,"\uC6FA\uC6FB\uC6FC\uC6FE",5,"\uC706\uC707\uC709\uC70A\uC70B\uC70D",6,"\uC716\uC718\uC71A",5,"\uC722\uC723\uC725\uC726\uC727\uC729",6,"\uC732\uC734\uC736\uC738\uC739\uC73A\uC73B\uC73E\uC73F\uC741\uC742\uC743\uC745",4,"\uC74B\uC74E\uC750\uC759\uC75A\uC75B\uC75D\uC75E\uC75F\uC761",6,"\uC769\uC76A\uC76C",7,"\uC776\uC777\uC779\uC77A\uC77B\uC77F\uC780\uC781\uC782\uC786\uC78B\uC78C\uC78D\uC78F\uC792\uC793\uC795\uC799\uC79B",4,"\uC7A2\uC7A7",4,"\uC7AE\uC7AF\uC7B1\uC7B2\uC7B3\uC7B5\uC7B6\uC7B7"],["a041","\uC7B8\uC7B9\uC7BA\uC7BB\uC7BE\uC7C2",5,"\uC7CA\uC7CB\uC7CD\uC7CF\uC7D1",6,"\uC7D9\uC7DA\uC7DB\uC7DC"],["a061","\uC7DE",5,"\uC7E5\uC7E6\uC7E7\uC7E9\uC7EA\uC7EB\uC7ED",13],["a081","\uC7FB",4,"\uC802\uC803\uC805\uC806\uC807\uC809\uC80B",4,"\uC812\uC814\uC817",4,"\uC81E\uC81F\uC821\uC822\uC823\uC825",6,"\uC82E\uC830\uC832",5,"\uC839\uC83A\uC83B\uC83D\uC83E\uC83F\uC841",6,"\uC84A\uC84B\uC84E",5,"\uC855",26,"\uC872\uC873\uC875\uC876\uC877\uC879\uC87B",4,"\uC882\uC884\uC888\uC889\uC88A\uC88E",5,"\uC895",7,"\uC89E\uC8A0\uC8A2\uC8A3\uC8A4"],["a141","\uC8A5\uC8A6\uC8A7\uC8A9",18,"\uC8BE\uC8BF\uC8C0\uC8C1"],["a161","\uC8C2\uC8C3\uC8C5\uC8C6\uC8C7\uC8C9\uC8CA\uC8CB\uC8CD",6,"\uC8D6\uC8D8\uC8DA",5,"\uC8E2\uC8E3\uC8E5"],["a181","\uC8E6",14,"\uC8F6",5,"\uC8FE\uC8FF\uC901\uC902\uC903\uC907",4,"\uC90E\u3000\u3001\u3002\xB7\u2025\u2026\xA8\u3003\xAD\u2015\u2225\uFF3C\u223C\u2018\u2019\u201C\u201D\u3014\u3015\u3008",9,"\xB1\xD7\xF7\u2260\u2264\u2265\u221E\u2234\xB0\u2032\u2033\u2103\u212B\uFFE0\uFFE1\uFFE5\u2642\u2640\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\xA7\u203B\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u2192\u2190\u2191\u2193\u2194\u3013\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229\u2227\u2228\uFFE2"],["a241","\uC910\uC912",5,"\uC919",18],["a261","\uC92D",6,"\uC935",18],["a281","\uC948",7,"\uC952\uC953\uC955\uC956\uC957\uC959",6,"\uC962\uC964",7,"\uC96D\uC96E\uC96F\u21D2\u21D4\u2200\u2203\xB4\uFF5E\u02C7\u02D8\u02DD\u02DA\u02D9\xB8\u02DB\xA1\xBF\u02D0\u222E\u2211\u220F\xA4\u2109\u2030\u25C1\u25C0\u25B7\u25B6\u2664\u2660\u2661\u2665\u2667\u2663\u2299\u25C8\u25A3\u25D0\u25D1\u2592\u25A4\u25A5\u25A8\u25A7\u25A6\u25A9\u2668\u260F\u260E\u261C\u261E\xB6\u2020\u2021\u2195\u2197\u2199\u2196\u2198\u266D\u2669\u266A\u266C\u327F\u321C\u2116\u33C7\u2122\u33C2\u33D8\u2121\u20AC\xAE"],["a341","\uC971\uC972\uC973\uC975",6,"\uC97D",10,"\uC98A\uC98B\uC98D\uC98E\uC98F"],["a361","\uC991",6,"\uC99A\uC99C\uC99E",16],["a381","\uC9AF",16,"\uC9C2\uC9C3\uC9C5\uC9C6\uC9C9\uC9CB",4,"\uC9D2\uC9D4\uC9D7\uC9D8\uC9DB\uFF01",58,"\uFFE6\uFF3D",32,"\uFFE3"],["a441","\uC9DE\uC9DF\uC9E1\uC9E3\uC9E5\uC9E6\uC9E8\uC9E9\uC9EA\uC9EB\uC9EE\uC9F2",5,"\uC9FA\uC9FB\uC9FD\uC9FE\uC9FF\uCA01\uCA02\uCA03\uCA04"],["a461","\uCA05\uCA06\uCA07\uCA0A\uCA0E",5,"\uCA15\uCA16\uCA17\uCA19",12],["a481","\uCA26\uCA27\uCA28\uCA2A",28,"\u3131",93],["a541","\uCA47",4,"\uCA4E\uCA4F\uCA51\uCA52\uCA53\uCA55",6,"\uCA5E\uCA62",5,"\uCA69\uCA6A"],["a561","\uCA6B",17,"\uCA7E",5,"\uCA85\uCA86"],["a581","\uCA87",16,"\uCA99",14,"\u2170",9],["a5b0","\u2160",9],["a5c1","\u0391",16,"\u03A3",6],["a5e1","\u03B1",16,"\u03C3",6],["a641","\uCAA8",19,"\uCABE\uCABF\uCAC1\uCAC2\uCAC3\uCAC5"],["a661","\uCAC6",5,"\uCACE\uCAD0\uCAD2\uCAD4\uCAD5\uCAD6\uCAD7\uCADA",5,"\uCAE1",6],["a681","\uCAE8\uCAE9\uCAEA\uCAEB\uCAED",6,"\uCAF5",18,"\uCB09\uCB0A\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542\u2512\u2511\u251A\u2519\u2516\u2515\u250E\u250D\u251E\u251F\u2521\u2522\u2526\u2527\u2529\u252A\u252D\u252E\u2531\u2532\u2535\u2536\u2539\u253A\u253D\u253E\u2540\u2541\u2543",7],["a741","\uCB0B",4,"\uCB11\uCB12\uCB13\uCB15\uCB16\uCB17\uCB19",6,"\uCB22",7],["a761","\uCB2A",22,"\uCB42\uCB43\uCB44"],["a781","\uCB45\uCB46\uCB47\uCB4A\uCB4B\uCB4D\uCB4E\uCB4F\uCB51",6,"\uCB5A\uCB5B\uCB5C\uCB5E",5,"\uCB65",7,"\u3395\u3396\u3397\u2113\u3398\u33C4\u33A3\u33A4\u33A5\u33A6\u3399",9,"\u33CA\u338D\u338E\u338F\u33CF\u3388\u3389\u33C8\u33A7\u33A8\u33B0",9,"\u3380",4,"\u33BA",5,"\u3390",4,"\u2126\u33C0\u33C1\u338A\u338B\u338C\u33D6\u33C5\u33AD\u33AE\u33AF\u33DB\u33A9\u33AA\u33AB\u33AC\u33DD\u33D0\u33D3\u33C3\u33C9\u33DC\u33C6"],["a841","\uCB6D",10,"\uCB7A",14],["a861","\uCB89",18,"\uCB9D",6],["a881","\uCBA4",19,"\uCBB9",11,"\xC6\xD0\xAA\u0126"],["a8a6","\u0132"],["a8a8","\u013F\u0141\xD8\u0152\xBA\xDE\u0166\u014A"],["a8b1","\u3260",27,"\u24D0",25,"\u2460",14,"\xBD\u2153\u2154\xBC\xBE\u215B\u215C\u215D\u215E"],["a941","\uCBC5",14,"\uCBD5",10],["a961","\uCBE0\uCBE1\uCBE2\uCBE3\uCBE5\uCBE6\uCBE8\uCBEA",18],["a981","\uCBFD",14,"\uCC0E\uCC0F\uCC11\uCC12\uCC13\uCC15",6,"\uCC1E\uCC1F\uCC20\uCC23\uCC24\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0140\u0142\xF8\u0153\xDF\xFE\u0167\u014B\u0149\u3200",27,"\u249C",25,"\u2474",14,"\xB9\xB2\xB3\u2074\u207F\u2081\u2082\u2083\u2084"],["aa41","\uCC25\uCC26\uCC2A\uCC2B\uCC2D\uCC2F\uCC31",6,"\uCC3A\uCC3F",4,"\uCC46\uCC47\uCC49\uCC4A\uCC4B\uCC4D\uCC4E"],["aa61","\uCC4F",4,"\uCC56\uCC5A",5,"\uCC61\uCC62\uCC63\uCC65\uCC67\uCC69",6,"\uCC71\uCC72"],["aa81","\uCC73\uCC74\uCC76",29,"\u3041",82],["ab41","\uCC94\uCC95\uCC96\uCC97\uCC9A\uCC9B\uCC9D\uCC9E\uCC9F\uCCA1",6,"\uCCAA\uCCAE",5,"\uCCB6\uCCB7\uCCB9"],["ab61","\uCCBA\uCCBB\uCCBD",6,"\uCCC6\uCCC8\uCCCA",5,"\uCCD1\uCCD2\uCCD3\uCCD5",5],["ab81","\uCCDB",8,"\uCCE5",6,"\uCCED\uCCEE\uCCEF\uCCF1",12,"\u30A1",85],["ac41","\uCCFE\uCCFF\uCD00\uCD02",5,"\uCD0A\uCD0B\uCD0D\uCD0E\uCD0F\uCD11",6,"\uCD1A\uCD1C\uCD1E\uCD1F\uCD20"],["ac61","\uCD21\uCD22\uCD23\uCD25\uCD26\uCD27\uCD29\uCD2A\uCD2B\uCD2D",11,"\uCD3A",4],["ac81","\uCD3F",28,"\uCD5D\uCD5E\uCD5F\u0410",5,"\u0401\u0416",25],["acd1","\u0430",5,"\u0451\u0436",25],["ad41","\uCD61\uCD62\uCD63\uCD65",6,"\uCD6E\uCD70\uCD72",5,"\uCD79",7],["ad61","\uCD81",6,"\uCD89",10,"\uCD96\uCD97\uCD99\uCD9A\uCD9B\uCD9D\uCD9E\uCD9F"],["ad81","\uCDA0\uCDA1\uCDA2\uCDA3\uCDA6\uCDA8\uCDAA",5,"\uCDB1",18,"\uCDC5"],["ae41","\uCDC6",5,"\uCDCD\uCDCE\uCDCF\uCDD1",16],["ae61","\uCDE2",5,"\uCDE9\uCDEA\uCDEB\uCDED\uCDEE\uCDEF\uCDF1",6,"\uCDFA\uCDFC\uCDFE",4],["ae81","\uCE03\uCE05\uCE06\uCE07\uCE09\uCE0A\uCE0B\uCE0D",6,"\uCE15\uCE16\uCE17\uCE18\uCE1A",5,"\uCE22\uCE23\uCE25\uCE26\uCE27\uCE29\uCE2A\uCE2B"],["af41","\uCE2C\uCE2D\uCE2E\uCE2F\uCE32\uCE34\uCE36",19],["af61","\uCE4A",13,"\uCE5A\uCE5B\uCE5D\uCE5E\uCE62",5,"\uCE6A\uCE6C"],["af81","\uCE6E",5,"\uCE76\uCE77\uCE79\uCE7A\uCE7B\uCE7D",6,"\uCE86\uCE88\uCE8A",5,"\uCE92\uCE93\uCE95\uCE96\uCE97\uCE99"],["b041","\uCE9A",5,"\uCEA2\uCEA6",5,"\uCEAE",12],["b061","\uCEBB",5,"\uCEC2",19],["b081","\uCED6",13,"\uCEE6\uCEE7\uCEE9\uCEEA\uCEED",6,"\uCEF6\uCEFA",5,"\uAC00\uAC01\uAC04\uAC07\uAC08\uAC09\uAC0A\uAC10",7,"\uAC19",4,"\uAC20\uAC24\uAC2C\uAC2D\uAC2F\uAC30\uAC31\uAC38\uAC39\uAC3C\uAC40\uAC4B\uAC4D\uAC54\uAC58\uAC5C\uAC70\uAC71\uAC74\uAC77\uAC78\uAC7A\uAC80\uAC81\uAC83\uAC84\uAC85\uAC86\uAC89\uAC8A\uAC8B\uAC8C\uAC90\uAC94\uAC9C\uAC9D\uAC9F\uACA0\uACA1\uACA8\uACA9\uACAA\uACAC\uACAF\uACB0\uACB8\uACB9\uACBB\uACBC\uACBD\uACC1\uACC4\uACC8\uACCC\uACD5\uACD7\uACE0\uACE1\uACE4\uACE7\uACE8\uACEA\uACEC\uACEF\uACF0\uACF1\uACF3\uACF5\uACF6\uACFC\uACFD\uAD00\uAD04\uAD06"],["b141","\uCF02\uCF03\uCF05\uCF06\uCF07\uCF09",6,"\uCF12\uCF14\uCF16",5,"\uCF1D\uCF1E\uCF1F\uCF21\uCF22\uCF23"],["b161","\uCF25",6,"\uCF2E\uCF32",5,"\uCF39",11],["b181","\uCF45",14,"\uCF56\uCF57\uCF59\uCF5A\uCF5B\uCF5D",6,"\uCF66\uCF68\uCF6A\uCF6B\uCF6C\uAD0C\uAD0D\uAD0F\uAD11\uAD18\uAD1C\uAD20\uAD29\uAD2C\uAD2D\uAD34\uAD35\uAD38\uAD3C\uAD44\uAD45\uAD47\uAD49\uAD50\uAD54\uAD58\uAD61\uAD63\uAD6C\uAD6D\uAD70\uAD73\uAD74\uAD75\uAD76\uAD7B\uAD7C\uAD7D\uAD7F\uAD81\uAD82\uAD88\uAD89\uAD8C\uAD90\uAD9C\uAD9D\uADA4\uADB7\uADC0\uADC1\uADC4\uADC8\uADD0\uADD1\uADD3\uADDC\uADE0\uADE4\uADF8\uADF9\uADFC\uADFF\uAE00\uAE01\uAE08\uAE09\uAE0B\uAE0D\uAE14\uAE30\uAE31\uAE34\uAE37\uAE38\uAE3A\uAE40\uAE41\uAE43\uAE45\uAE46\uAE4A\uAE4C\uAE4D\uAE4E\uAE50\uAE54\uAE56\uAE5C\uAE5D\uAE5F\uAE60\uAE61\uAE65\uAE68\uAE69\uAE6C\uAE70\uAE78"],["b241","\uCF6D\uCF6E\uCF6F\uCF72\uCF73\uCF75\uCF76\uCF77\uCF79",6,"\uCF81\uCF82\uCF83\uCF84\uCF86",5,"\uCF8D"],["b261","\uCF8E",18,"\uCFA2",5,"\uCFA9"],["b281","\uCFAA",5,"\uCFB1",18,"\uCFC5",6,"\uAE79\uAE7B\uAE7C\uAE7D\uAE84\uAE85\uAE8C\uAEBC\uAEBD\uAEBE\uAEC0\uAEC4\uAECC\uAECD\uAECF\uAED0\uAED1\uAED8\uAED9\uAEDC\uAEE8\uAEEB\uAEED\uAEF4\uAEF8\uAEFC\uAF07\uAF08\uAF0D\uAF10\uAF2C\uAF2D\uAF30\uAF32\uAF34\uAF3C\uAF3D\uAF3F\uAF41\uAF42\uAF43\uAF48\uAF49\uAF50\uAF5C\uAF5D\uAF64\uAF65\uAF79\uAF80\uAF84\uAF88\uAF90\uAF91\uAF95\uAF9C\uAFB8\uAFB9\uAFBC\uAFC0\uAFC7\uAFC8\uAFC9\uAFCB\uAFCD\uAFCE\uAFD4\uAFDC\uAFE8\uAFE9\uAFF0\uAFF1\uAFF4\uAFF8\uB000\uB001\uB004\uB00C\uB010\uB014\uB01C\uB01D\uB028\uB044\uB045\uB048\uB04A\uB04C\uB04E\uB053\uB054\uB055\uB057\uB059"],["b341","\uCFCC",19,"\uCFE2\uCFE3\uCFE5\uCFE6\uCFE7\uCFE9"],["b361","\uCFEA",5,"\uCFF2\uCFF4\uCFF6",5,"\uCFFD\uCFFE\uCFFF\uD001\uD002\uD003\uD005",5],["b381","\uD00B",5,"\uD012",5,"\uD019",19,"\uB05D\uB07C\uB07D\uB080\uB084\uB08C\uB08D\uB08F\uB091\uB098\uB099\uB09A\uB09C\uB09F\uB0A0\uB0A1\uB0A2\uB0A8\uB0A9\uB0AB",4,"\uB0B1\uB0B3\uB0B4\uB0B5\uB0B8\uB0BC\uB0C4\uB0C5\uB0C7\uB0C8\uB0C9\uB0D0\uB0D1\uB0D4\uB0D8\uB0E0\uB0E5\uB108\uB109\uB10B\uB10C\uB110\uB112\uB113\uB118\uB119\uB11B\uB11C\uB11D\uB123\uB124\uB125\uB128\uB12C\uB134\uB135\uB137\uB138\uB139\uB140\uB141\uB144\uB148\uB150\uB151\uB154\uB155\uB158\uB15C\uB160\uB178\uB179\uB17C\uB180\uB182\uB188\uB189\uB18B\uB18D\uB192\uB193\uB194\uB198\uB19C\uB1A8\uB1CC\uB1D0\uB1D4\uB1DC\uB1DD"],["b441","\uD02E",5,"\uD036\uD037\uD039\uD03A\uD03B\uD03D",6,"\uD046\uD048\uD04A",5],["b461","\uD051\uD052\uD053\uD055\uD056\uD057\uD059",6,"\uD061",10,"\uD06E\uD06F"],["b481","\uD071\uD072\uD073\uD075",6,"\uD07E\uD07F\uD080\uD082",18,"\uB1DF\uB1E8\uB1E9\uB1EC\uB1F0\uB1F9\uB1FB\uB1FD\uB204\uB205\uB208\uB20B\uB20C\uB214\uB215\uB217\uB219\uB220\uB234\uB23C\uB258\uB25C\uB260\uB268\uB269\uB274\uB275\uB27C\uB284\uB285\uB289\uB290\uB291\uB294\uB298\uB299\uB29A\uB2A0\uB2A1\uB2A3\uB2A5\uB2A6\uB2AA\uB2AC\uB2B0\uB2B4\uB2C8\uB2C9\uB2CC\uB2D0\uB2D2\uB2D8\uB2D9\uB2DB\uB2DD\uB2E2\uB2E4\uB2E5\uB2E6\uB2E8\uB2EB",4,"\uB2F3\uB2F4\uB2F5\uB2F7",4,"\uB2FF\uB300\uB301\uB304\uB308\uB310\uB311\uB313\uB314\uB315\uB31C\uB354\uB355\uB356\uB358\uB35B\uB35C\uB35E\uB35F\uB364\uB365"],["b541","\uD095",14,"\uD0A6\uD0A7\uD0A9\uD0AA\uD0AB\uD0AD",5],["b561","\uD0B3\uD0B6\uD0B8\uD0BA",5,"\uD0C2\uD0C3\uD0C5\uD0C6\uD0C7\uD0CA",5,"\uD0D2\uD0D6",4],["b581","\uD0DB\uD0DE\uD0DF\uD0E1\uD0E2\uD0E3\uD0E5",6,"\uD0EE\uD0F2",5,"\uD0F9",11,"\uB367\uB369\uB36B\uB36E\uB370\uB371\uB374\uB378\uB380\uB381\uB383\uB384\uB385\uB38C\uB390\uB394\uB3A0\uB3A1\uB3A8\uB3AC\uB3C4\uB3C5\uB3C8\uB3CB\uB3CC\uB3CE\uB3D0\uB3D4\uB3D5\uB3D7\uB3D9\uB3DB\uB3DD\uB3E0\uB3E4\uB3E8\uB3FC\uB410\uB418\uB41C\uB420\uB428\uB429\uB42B\uB434\uB450\uB451\uB454\uB458\uB460\uB461\uB463\uB465\uB46C\uB480\uB488\uB49D\uB4A4\uB4A8\uB4AC\uB4B5\uB4B7\uB4B9\uB4C0\uB4C4\uB4C8\uB4D0\uB4D5\uB4DC\uB4DD\uB4E0\uB4E3\uB4E4\uB4E6\uB4EC\uB4ED\uB4EF\uB4F1\uB4F8\uB514\uB515\uB518\uB51B\uB51C\uB524\uB525\uB527\uB528\uB529\uB52A\uB530\uB531\uB534\uB538"],["b641","\uD105",7,"\uD10E",17],["b661","\uD120",15,"\uD132\uD133\uD135\uD136\uD137\uD139\uD13B\uD13C\uD13D\uD13E"],["b681","\uD13F\uD142\uD146",5,"\uD14E\uD14F\uD151\uD152\uD153\uD155",6,"\uD15E\uD160\uD162",5,"\uD169\uD16A\uD16B\uD16D\uB540\uB541\uB543\uB544\uB545\uB54B\uB54C\uB54D\uB550\uB554\uB55C\uB55D\uB55F\uB560\uB561\uB5A0\uB5A1\uB5A4\uB5A8\uB5AA\uB5AB\uB5B0\uB5B1\uB5B3\uB5B4\uB5B5\uB5BB\uB5BC\uB5BD\uB5C0\uB5C4\uB5CC\uB5CD\uB5CF\uB5D0\uB5D1\uB5D8\uB5EC\uB610\uB611\uB614\uB618\uB625\uB62C\uB634\uB648\uB664\uB668\uB69C\uB69D\uB6A0\uB6A4\uB6AB\uB6AC\uB6B1\uB6D4\uB6F0\uB6F4\uB6F8\uB700\uB701\uB705\uB728\uB729\uB72C\uB72F\uB730\uB738\uB739\uB73B\uB744\uB748\uB74C\uB754\uB755\uB760\uB764\uB768\uB770\uB771\uB773\uB775\uB77C\uB77D\uB780\uB784\uB78C\uB78D\uB78F\uB790\uB791\uB792\uB796\uB797"],["b741","\uD16E",13,"\uD17D",6,"\uD185\uD186\uD187\uD189\uD18A"],["b761","\uD18B",20,"\uD1A2\uD1A3\uD1A5\uD1A6\uD1A7"],["b781","\uD1A9",6,"\uD1B2\uD1B4\uD1B6\uD1B7\uD1B8\uD1B9\uD1BB\uD1BD\uD1BE\uD1BF\uD1C1",14,"\uB798\uB799\uB79C\uB7A0\uB7A8\uB7A9\uB7AB\uB7AC\uB7AD\uB7B4\uB7B5\uB7B8\uB7C7\uB7C9\uB7EC\uB7ED\uB7F0\uB7F4\uB7FC\uB7FD\uB7FF\uB800\uB801\uB807\uB808\uB809\uB80C\uB810\uB818\uB819\uB81B\uB81D\uB824\uB825\uB828\uB82C\uB834\uB835\uB837\uB838\uB839\uB840\uB844\uB851\uB853\uB85C\uB85D\uB860\uB864\uB86C\uB86D\uB86F\uB871\uB878\uB87C\uB88D\uB8A8\uB8B0\uB8B4\uB8B8\uB8C0\uB8C1\uB8C3\uB8C5\uB8CC\uB8D0\uB8D4\uB8DD\uB8DF\uB8E1\uB8E8\uB8E9\uB8EC\uB8F0\uB8F8\uB8F9\uB8FB\uB8FD\uB904\uB918\uB920\uB93C\uB93D\uB940\uB944\uB94C\uB94F\uB951\uB958\uB959\uB95C\uB960\uB968\uB969"],["b841","\uD1D0",7,"\uD1D9",17],["b861","\uD1EB",8,"\uD1F5\uD1F6\uD1F7\uD1F9",13],["b881","\uD208\uD20A",5,"\uD211",24,"\uB96B\uB96D\uB974\uB975\uB978\uB97C\uB984\uB985\uB987\uB989\uB98A\uB98D\uB98E\uB9AC\uB9AD\uB9B0\uB9B4\uB9BC\uB9BD\uB9BF\uB9C1\uB9C8\uB9C9\uB9CC\uB9CE",4,"\uB9D8\uB9D9\uB9DB\uB9DD\uB9DE\uB9E1\uB9E3\uB9E4\uB9E5\uB9E8\uB9EC\uB9F4\uB9F5\uB9F7\uB9F8\uB9F9\uB9FA\uBA00\uBA01\uBA08\uBA15\uBA38\uBA39\uBA3C\uBA40\uBA42\uBA48\uBA49\uBA4B\uBA4D\uBA4E\uBA53\uBA54\uBA55\uBA58\uBA5C\uBA64\uBA65\uBA67\uBA68\uBA69\uBA70\uBA71\uBA74\uBA78\uBA83\uBA84\uBA85\uBA87\uBA8C\uBAA8\uBAA9\uBAAB\uBAAC\uBAB0\uBAB2\uBAB8\uBAB9\uBABB\uBABD\uBAC4\uBAC8\uBAD8\uBAD9\uBAFC"],["b941","\uD22A\uD22B\uD22E\uD22F\uD231\uD232\uD233\uD235",6,"\uD23E\uD240\uD242",5,"\uD249\uD24A\uD24B\uD24C"],["b961","\uD24D",14,"\uD25D",6,"\uD265\uD266\uD267\uD268"],["b981","\uD269",22,"\uD282\uD283\uD285\uD286\uD287\uD289\uD28A\uD28B\uD28C\uBB00\uBB04\uBB0D\uBB0F\uBB11\uBB18\uBB1C\uBB20\uBB29\uBB2B\uBB34\uBB35\uBB36\uBB38\uBB3B\uBB3C\uBB3D\uBB3E\uBB44\uBB45\uBB47\uBB49\uBB4D\uBB4F\uBB50\uBB54\uBB58\uBB61\uBB63\uBB6C\uBB88\uBB8C\uBB90\uBBA4\uBBA8\uBBAC\uBBB4\uBBB7\uBBC0\uBBC4\uBBC8\uBBD0\uBBD3\uBBF8\uBBF9\uBBFC\uBBFF\uBC00\uBC02\uBC08\uBC09\uBC0B\uBC0C\uBC0D\uBC0F\uBC11\uBC14",4,"\uBC1B",4,"\uBC24\uBC25\uBC27\uBC29\uBC2D\uBC30\uBC31\uBC34\uBC38\uBC40\uBC41\uBC43\uBC44\uBC45\uBC49\uBC4C\uBC4D\uBC50\uBC5D\uBC84\uBC85\uBC88\uBC8B\uBC8C\uBC8E\uBC94\uBC95\uBC97"],["ba41","\uD28D\uD28E\uD28F\uD292\uD293\uD294\uD296",5,"\uD29D\uD29E\uD29F\uD2A1\uD2A2\uD2A3\uD2A5",6,"\uD2AD"],["ba61","\uD2AE\uD2AF\uD2B0\uD2B2",5,"\uD2BA\uD2BB\uD2BD\uD2BE\uD2C1\uD2C3",4,"\uD2CA\uD2CC",5],["ba81","\uD2D2\uD2D3\uD2D5\uD2D6\uD2D7\uD2D9\uD2DA\uD2DB\uD2DD",6,"\uD2E6",9,"\uD2F2\uD2F3\uD2F5\uD2F6\uD2F7\uD2F9\uD2FA\uBC99\uBC9A\uBCA0\uBCA1\uBCA4\uBCA7\uBCA8\uBCB0\uBCB1\uBCB3\uBCB4\uBCB5\uBCBC\uBCBD\uBCC0\uBCC4\uBCCD\uBCCF\uBCD0\uBCD1\uBCD5\uBCD8\uBCDC\uBCF4\uBCF5\uBCF6\uBCF8\uBCFC\uBD04\uBD05\uBD07\uBD09\uBD10\uBD14\uBD24\uBD2C\uBD40\uBD48\uBD49\uBD4C\uBD50\uBD58\uBD59\uBD64\uBD68\uBD80\uBD81\uBD84\uBD87\uBD88\uBD89\uBD8A\uBD90\uBD91\uBD93\uBD95\uBD99\uBD9A\uBD9C\uBDA4\uBDB0\uBDB8\uBDD4\uBDD5\uBDD8\uBDDC\uBDE9\uBDF0\uBDF4\uBDF8\uBE00\uBE03\uBE05\uBE0C\uBE0D\uBE10\uBE14\uBE1C\uBE1D\uBE1F\uBE44\uBE45\uBE48\uBE4C\uBE4E\uBE54\uBE55\uBE57\uBE59\uBE5A\uBE5B\uBE60\uBE61\uBE64"],["bb41","\uD2FB",4,"\uD302\uD304\uD306",5,"\uD30F\uD311\uD312\uD313\uD315\uD317",4,"\uD31E\uD322\uD323"],["bb61","\uD324\uD326\uD327\uD32A\uD32B\uD32D\uD32E\uD32F\uD331",6,"\uD33A\uD33E",5,"\uD346\uD347\uD348\uD349"],["bb81","\uD34A",31,"\uBE68\uBE6A\uBE70\uBE71\uBE73\uBE74\uBE75\uBE7B\uBE7C\uBE7D\uBE80\uBE84\uBE8C\uBE8D\uBE8F\uBE90\uBE91\uBE98\uBE99\uBEA8\uBED0\uBED1\uBED4\uBED7\uBED8\uBEE0\uBEE3\uBEE4\uBEE5\uBEEC\uBF01\uBF08\uBF09\uBF18\uBF19\uBF1B\uBF1C\uBF1D\uBF40\uBF41\uBF44\uBF48\uBF50\uBF51\uBF55\uBF94\uBFB0\uBFC5\uBFCC\uBFCD\uBFD0\uBFD4\uBFDC\uBFDF\uBFE1\uC03C\uC051\uC058\uC05C\uC060\uC068\uC069\uC090\uC091\uC094\uC098\uC0A0\uC0A1\uC0A3\uC0A5\uC0AC\uC0AD\uC0AF\uC0B0\uC0B3\uC0B4\uC0B5\uC0B6\uC0BC\uC0BD\uC0BF\uC0C0\uC0C1\uC0C5\uC0C8\uC0C9\uC0CC\uC0D0\uC0D8\uC0D9\uC0DB\uC0DC\uC0DD\uC0E4"],["bc41","\uD36A",17,"\uD37E\uD37F\uD381\uD382\uD383\uD385\uD386\uD387"],["bc61","\uD388\uD389\uD38A\uD38B\uD38E\uD392",5,"\uD39A\uD39B\uD39D\uD39E\uD39F\uD3A1",6,"\uD3AA\uD3AC\uD3AE"],["bc81","\uD3AF",4,"\uD3B5\uD3B6\uD3B7\uD3B9\uD3BA\uD3BB\uD3BD",6,"\uD3C6\uD3C7\uD3CA",5,"\uD3D1",5,"\uC0E5\uC0E8\uC0EC\uC0F4\uC0F5\uC0F7\uC0F9\uC100\uC104\uC108\uC110\uC115\uC11C",4,"\uC123\uC124\uC126\uC127\uC12C\uC12D\uC12F\uC130\uC131\uC136\uC138\uC139\uC13C\uC140\uC148\uC149\uC14B\uC14C\uC14D\uC154\uC155\uC158\uC15C\uC164\uC165\uC167\uC168\uC169\uC170\uC174\uC178\uC185\uC18C\uC18D\uC18E\uC190\uC194\uC196\uC19C\uC19D\uC19F\uC1A1\uC1A5\uC1A8\uC1A9\uC1AC\uC1B0\uC1BD\uC1C4\uC1C8\uC1CC\uC1D4\uC1D7\uC1D8\uC1E0\uC1E4\uC1E8\uC1F0\uC1F1\uC1F3\uC1FC\uC1FD\uC200\uC204\uC20C\uC20D\uC20F\uC211\uC218\uC219\uC21C\uC21F\uC220\uC228\uC229\uC22B\uC22D"],["bd41","\uD3D7\uD3D9",7,"\uD3E2\uD3E4",7,"\uD3EE\uD3EF\uD3F1\uD3F2\uD3F3\uD3F5\uD3F6\uD3F7"],["bd61","\uD3F8\uD3F9\uD3FA\uD3FB\uD3FE\uD400\uD402",5,"\uD409",13],["bd81","\uD417",5,"\uD41E",25,"\uC22F\uC231\uC232\uC234\uC248\uC250\uC251\uC254\uC258\uC260\uC265\uC26C\uC26D\uC270\uC274\uC27C\uC27D\uC27F\uC281\uC288\uC289\uC290\uC298\uC29B\uC29D\uC2A4\uC2A5\uC2A8\uC2AC\uC2AD\uC2B4\uC2B5\uC2B7\uC2B9\uC2DC\uC2DD\uC2E0\uC2E3\uC2E4\uC2EB\uC2EC\uC2ED\uC2EF\uC2F1\uC2F6\uC2F8\uC2F9\uC2FB\uC2FC\uC300\uC308\uC309\uC30C\uC30D\uC313\uC314\uC315\uC318\uC31C\uC324\uC325\uC328\uC329\uC345\uC368\uC369\uC36C\uC370\uC372\uC378\uC379\uC37C\uC37D\uC384\uC388\uC38C\uC3C0\uC3D8\uC3D9\uC3DC\uC3DF\uC3E0\uC3E2\uC3E8\uC3E9\uC3ED\uC3F4\uC3F5\uC3F8\uC408\uC410\uC424\uC42C\uC430"],["be41","\uD438",7,"\uD441\uD442\uD443\uD445",14],["be61","\uD454",7,"\uD45D\uD45E\uD45F\uD461\uD462\uD463\uD465",7,"\uD46E\uD470\uD471\uD472"],["be81","\uD473",4,"\uD47A\uD47B\uD47D\uD47E\uD481\uD483",4,"\uD48A\uD48C\uD48E",5,"\uD495",8,"\uC434\uC43C\uC43D\uC448\uC464\uC465\uC468\uC46C\uC474\uC475\uC479\uC480\uC494\uC49C\uC4B8\uC4BC\uC4E9\uC4F0\uC4F1\uC4F4\uC4F8\uC4FA\uC4FF\uC500\uC501\uC50C\uC510\uC514\uC51C\uC528\uC529\uC52C\uC530\uC538\uC539\uC53B\uC53D\uC544\uC545\uC548\uC549\uC54A\uC54C\uC54D\uC54E\uC553\uC554\uC555\uC557\uC558\uC559\uC55D\uC55E\uC560\uC561\uC564\uC568\uC570\uC571\uC573\uC574\uC575\uC57C\uC57D\uC580\uC584\uC587\uC58C\uC58D\uC58F\uC591\uC595\uC597\uC598\uC59C\uC5A0\uC5A9\uC5B4\uC5B5\uC5B8\uC5B9\uC5BB\uC5BC\uC5BD\uC5BE\uC5C4",6,"\uC5CC\uC5CE"],["bf41","\uD49E",10,"\uD4AA",14],["bf61","\uD4B9",18,"\uD4CD\uD4CE\uD4CF\uD4D1\uD4D2\uD4D3\uD4D5"],["bf81","\uD4D6",5,"\uD4DD\uD4DE\uD4E0",7,"\uD4E9\uD4EA\uD4EB\uD4ED\uD4EE\uD4EF\uD4F1",6,"\uD4F9\uD4FA\uD4FC\uC5D0\uC5D1\uC5D4\uC5D8\uC5E0\uC5E1\uC5E3\uC5E5\uC5EC\uC5ED\uC5EE\uC5F0\uC5F4\uC5F6\uC5F7\uC5FC",5,"\uC605\uC606\uC607\uC608\uC60C\uC610\uC618\uC619\uC61B\uC61C\uC624\uC625\uC628\uC62C\uC62D\uC62E\uC630\uC633\uC634\uC635\uC637\uC639\uC63B\uC640\uC641\uC644\uC648\uC650\uC651\uC653\uC654\uC655\uC65C\uC65D\uC660\uC66C\uC66F\uC671\uC678\uC679\uC67C\uC680\uC688\uC689\uC68B\uC68D\uC694\uC695\uC698\uC69C\uC6A4\uC6A5\uC6A7\uC6A9\uC6B0\uC6B1\uC6B4\uC6B8\uC6B9\uC6BA\uC6C0\uC6C1\uC6C3\uC6C5\uC6CC\uC6CD\uC6D0\uC6D4\uC6DC\uC6DD\uC6E0\uC6E1\uC6E8"],["c041","\uD4FE",5,"\uD505\uD506\uD507\uD509\uD50A\uD50B\uD50D",6,"\uD516\uD518",5],["c061","\uD51E",25],["c081","\uD538\uD539\uD53A\uD53B\uD53E\uD53F\uD541\uD542\uD543\uD545",6,"\uD54E\uD550\uD552",5,"\uD55A\uD55B\uD55D\uD55E\uD55F\uD561\uD562\uD563\uC6E9\uC6EC\uC6F0\uC6F8\uC6F9\uC6FD\uC704\uC705\uC708\uC70C\uC714\uC715\uC717\uC719\uC720\uC721\uC724\uC728\uC730\uC731\uC733\uC735\uC737\uC73C\uC73D\uC740\uC744\uC74A\uC74C\uC74D\uC74F\uC751",7,"\uC75C\uC760\uC768\uC76B\uC774\uC775\uC778\uC77C\uC77D\uC77E\uC783\uC784\uC785\uC787\uC788\uC789\uC78A\uC78E\uC790\uC791\uC794\uC796\uC797\uC798\uC79A\uC7A0\uC7A1\uC7A3\uC7A4\uC7A5\uC7A6\uC7AC\uC7AD\uC7B0\uC7B4\uC7BC\uC7BD\uC7BF\uC7C0\uC7C1\uC7C8\uC7C9\uC7CC\uC7CE\uC7D0\uC7D8\uC7DD\uC7E4\uC7E8\uC7EC\uC800\uC801\uC804\uC808\uC80A"],["c141","\uD564\uD566\uD567\uD56A\uD56C\uD56E",5,"\uD576\uD577\uD579\uD57A\uD57B\uD57D",6,"\uD586\uD58A\uD58B"],["c161","\uD58C\uD58D\uD58E\uD58F\uD591",19,"\uD5A6\uD5A7"],["c181","\uD5A8",31,"\uC810\uC811\uC813\uC815\uC816\uC81C\uC81D\uC820\uC824\uC82C\uC82D\uC82F\uC831\uC838\uC83C\uC840\uC848\uC849\uC84C\uC84D\uC854\uC870\uC871\uC874\uC878\uC87A\uC880\uC881\uC883\uC885\uC886\uC887\uC88B\uC88C\uC88D\uC894\uC89D\uC89F\uC8A1\uC8A8\uC8BC\uC8BD\uC8C4\uC8C8\uC8CC\uC8D4\uC8D5\uC8D7\uC8D9\uC8E0\uC8E1\uC8E4\uC8F5\uC8FC\uC8FD\uC900\uC904\uC905\uC906\uC90C\uC90D\uC90F\uC911\uC918\uC92C\uC934\uC950\uC951\uC954\uC958\uC960\uC961\uC963\uC96C\uC970\uC974\uC97C\uC988\uC989\uC98C\uC990\uC998\uC999\uC99B\uC99D\uC9C0\uC9C1\uC9C4\uC9C7\uC9C8\uC9CA\uC9D0\uC9D1\uC9D3"],["c241","\uD5CA\uD5CB\uD5CD\uD5CE\uD5CF\uD5D1\uD5D3",4,"\uD5DA\uD5DC\uD5DE",5,"\uD5E6\uD5E7\uD5E9\uD5EA\uD5EB\uD5ED\uD5EE"],["c261","\uD5EF",4,"\uD5F6\uD5F8\uD5FA",5,"\uD602\uD603\uD605\uD606\uD607\uD609",6,"\uD612"],["c281","\uD616",5,"\uD61D\uD61E\uD61F\uD621\uD622\uD623\uD625",7,"\uD62E",9,"\uD63A\uD63B\uC9D5\uC9D6\uC9D9\uC9DA\uC9DC\uC9DD\uC9E0\uC9E2\uC9E4\uC9E7\uC9EC\uC9ED\uC9EF\uC9F0\uC9F1\uC9F8\uC9F9\uC9FC\uCA00\uCA08\uCA09\uCA0B\uCA0C\uCA0D\uCA14\uCA18\uCA29\uCA4C\uCA4D\uCA50\uCA54\uCA5C\uCA5D\uCA5F\uCA60\uCA61\uCA68\uCA7D\uCA84\uCA98\uCABC\uCABD\uCAC0\uCAC4\uCACC\uCACD\uCACF\uCAD1\uCAD3\uCAD8\uCAD9\uCAE0\uCAEC\uCAF4\uCB08\uCB10\uCB14\uCB18\uCB20\uCB21\uCB41\uCB48\uCB49\uCB4C\uCB50\uCB58\uCB59\uCB5D\uCB64\uCB78\uCB79\uCB9C\uCBB8\uCBD4\uCBE4\uCBE7\uCBE9\uCC0C\uCC0D\uCC10\uCC14\uCC1C\uCC1D\uCC21\uCC22\uCC27\uCC28\uCC29\uCC2C\uCC2E\uCC30\uCC38\uCC39\uCC3B"],["c341","\uD63D\uD63E\uD63F\uD641\uD642\uD643\uD644\uD646\uD647\uD64A\uD64C\uD64E\uD64F\uD650\uD652\uD653\uD656\uD657\uD659\uD65A\uD65B\uD65D",4],["c361","\uD662",4,"\uD668\uD66A",5,"\uD672\uD673\uD675",11],["c381","\uD681\uD682\uD684\uD686",5,"\uD68E\uD68F\uD691\uD692\uD693\uD695",7,"\uD69E\uD6A0\uD6A2",5,"\uD6A9\uD6AA\uCC3C\uCC3D\uCC3E\uCC44\uCC45\uCC48\uCC4C\uCC54\uCC55\uCC57\uCC58\uCC59\uCC60\uCC64\uCC66\uCC68\uCC70\uCC75\uCC98\uCC99\uCC9C\uCCA0\uCCA8\uCCA9\uCCAB\uCCAC\uCCAD\uCCB4\uCCB5\uCCB8\uCCBC\uCCC4\uCCC5\uCCC7\uCCC9\uCCD0\uCCD4\uCCE4\uCCEC\uCCF0\uCD01\uCD08\uCD09\uCD0C\uCD10\uCD18\uCD19\uCD1B\uCD1D\uCD24\uCD28\uCD2C\uCD39\uCD5C\uCD60\uCD64\uCD6C\uCD6D\uCD6F\uCD71\uCD78\uCD88\uCD94\uCD95\uCD98\uCD9C\uCDA4\uCDA5\uCDA7\uCDA9\uCDB0\uCDC4\uCDCC\uCDD0\uCDE8\uCDEC\uCDF0\uCDF8\uCDF9\uCDFB\uCDFD\uCE04\uCE08\uCE0C\uCE14\uCE19\uCE20\uCE21\uCE24\uCE28\uCE30\uCE31\uCE33\uCE35"],["c441","\uD6AB\uD6AD\uD6AE\uD6AF\uD6B1",7,"\uD6BA\uD6BC",7,"\uD6C6\uD6C7\uD6C9\uD6CA\uD6CB"],["c461","\uD6CD\uD6CE\uD6CF\uD6D0\uD6D2\uD6D3\uD6D5\uD6D6\uD6D8\uD6DA",5,"\uD6E1\uD6E2\uD6E3\uD6E5\uD6E6\uD6E7\uD6E9",4],["c481","\uD6EE\uD6EF\uD6F1\uD6F2\uD6F3\uD6F4\uD6F6",5,"\uD6FE\uD6FF\uD701\uD702\uD703\uD705",11,"\uD712\uD713\uD714\uCE58\uCE59\uCE5C\uCE5F\uCE60\uCE61\uCE68\uCE69\uCE6B\uCE6D\uCE74\uCE75\uCE78\uCE7C\uCE84\uCE85\uCE87\uCE89\uCE90\uCE91\uCE94\uCE98\uCEA0\uCEA1\uCEA3\uCEA4\uCEA5\uCEAC\uCEAD\uCEC1\uCEE4\uCEE5\uCEE8\uCEEB\uCEEC\uCEF4\uCEF5\uCEF7\uCEF8\uCEF9\uCF00\uCF01\uCF04\uCF08\uCF10\uCF11\uCF13\uCF15\uCF1C\uCF20\uCF24\uCF2C\uCF2D\uCF2F\uCF30\uCF31\uCF38\uCF54\uCF55\uCF58\uCF5C\uCF64\uCF65\uCF67\uCF69\uCF70\uCF71\uCF74\uCF78\uCF80\uCF85\uCF8C\uCFA1\uCFA8\uCFB0\uCFC4\uCFE0\uCFE1\uCFE4\uCFE8\uCFF0\uCFF1\uCFF3\uCFF5\uCFFC\uD000\uD004\uD011\uD018\uD02D\uD034\uD035\uD038\uD03C"],["c541","\uD715\uD716\uD717\uD71A\uD71B\uD71D\uD71E\uD71F\uD721",6,"\uD72A\uD72C\uD72E",5,"\uD736\uD737\uD739"],["c561","\uD73A\uD73B\uD73D",6,"\uD745\uD746\uD748\uD74A",5,"\uD752\uD753\uD755\uD75A",4],["c581","\uD75F\uD762\uD764\uD766\uD767\uD768\uD76A\uD76B\uD76D\uD76E\uD76F\uD771\uD772\uD773\uD775",6,"\uD77E\uD77F\uD780\uD782",5,"\uD78A\uD78B\uD044\uD045\uD047\uD049\uD050\uD054\uD058\uD060\uD06C\uD06D\uD070\uD074\uD07C\uD07D\uD081\uD0A4\uD0A5\uD0A8\uD0AC\uD0B4\uD0B5\uD0B7\uD0B9\uD0C0\uD0C1\uD0C4\uD0C8\uD0C9\uD0D0\uD0D1\uD0D3\uD0D4\uD0D5\uD0DC\uD0DD\uD0E0\uD0E4\uD0EC\uD0ED\uD0EF\uD0F0\uD0F1\uD0F8\uD10D\uD130\uD131\uD134\uD138\uD13A\uD140\uD141\uD143\uD144\uD145\uD14C\uD14D\uD150\uD154\uD15C\uD15D\uD15F\uD161\uD168\uD16C\uD17C\uD184\uD188\uD1A0\uD1A1\uD1A4\uD1A8\uD1B0\uD1B1\uD1B3\uD1B5\uD1BA\uD1BC\uD1C0\uD1D8\uD1F4\uD1F8\uD207\uD209\uD210\uD22C\uD22D\uD230\uD234\uD23C\uD23D\uD23F\uD241\uD248\uD25C"],["c641","\uD78D\uD78E\uD78F\uD791",6,"\uD79A\uD79C\uD79E",5],["c6a1","\uD264\uD280\uD281\uD284\uD288\uD290\uD291\uD295\uD29C\uD2A0\uD2A4\uD2AC\uD2B1\uD2B8\uD2B9\uD2BC\uD2BF\uD2C0\uD2C2\uD2C8\uD2C9\uD2CB\uD2D4\uD2D8\uD2DC\uD2E4\uD2E5\uD2F0\uD2F1\uD2F4\uD2F8\uD300\uD301\uD303\uD305\uD30C\uD30D\uD30E\uD310\uD314\uD316\uD31C\uD31D\uD31F\uD320\uD321\uD325\uD328\uD329\uD32C\uD330\uD338\uD339\uD33B\uD33C\uD33D\uD344\uD345\uD37C\uD37D\uD380\uD384\uD38C\uD38D\uD38F\uD390\uD391\uD398\uD399\uD39C\uD3A0\uD3A8\uD3A9\uD3AB\uD3AD\uD3B4\uD3B8\uD3BC\uD3C4\uD3C5\uD3C8\uD3C9\uD3D0\uD3D8\uD3E1\uD3E3\uD3EC\uD3ED\uD3F0\uD3F4\uD3FC\uD3FD\uD3FF\uD401"],["c7a1","\uD408\uD41D\uD440\uD444\uD45C\uD460\uD464\uD46D\uD46F\uD478\uD479\uD47C\uD47F\uD480\uD482\uD488\uD489\uD48B\uD48D\uD494\uD4A9\uD4CC\uD4D0\uD4D4\uD4DC\uD4DF\uD4E8\uD4EC\uD4F0\uD4F8\uD4FB\uD4FD\uD504\uD508\uD50C\uD514\uD515\uD517\uD53C\uD53D\uD540\uD544\uD54C\uD54D\uD54F\uD551\uD558\uD559\uD55C\uD560\uD565\uD568\uD569\uD56B\uD56D\uD574\uD575\uD578\uD57C\uD584\uD585\uD587\uD588\uD589\uD590\uD5A5\uD5C8\uD5C9\uD5CC\uD5D0\uD5D2\uD5D8\uD5D9\uD5DB\uD5DD\uD5E4\uD5E5\uD5E8\uD5EC\uD5F4\uD5F5\uD5F7\uD5F9\uD600\uD601\uD604\uD608\uD610\uD611\uD613\uD614\uD615\uD61C\uD620"],["c8a1","\uD624\uD62D\uD638\uD639\uD63C\uD640\uD645\uD648\uD649\uD64B\uD64D\uD651\uD654\uD655\uD658\uD65C\uD667\uD669\uD670\uD671\uD674\uD683\uD685\uD68C\uD68D\uD690\uD694\uD69D\uD69F\uD6A1\uD6A8\uD6AC\uD6B0\uD6B9\uD6BB\uD6C4\uD6C5\uD6C8\uD6CC\uD6D1\uD6D4\uD6D7\uD6D9\uD6E0\uD6E4\uD6E8\uD6F0\uD6F5\uD6FC\uD6FD\uD700\uD704\uD711\uD718\uD719\uD71C\uD720\uD728\uD729\uD72B\uD72D\uD734\uD735\uD738\uD73C\uD744\uD747\uD749\uD750\uD751\uD754\uD756\uD757\uD758\uD759\uD760\uD761\uD763\uD765\uD769\uD76C\uD770\uD774\uD77C\uD77D\uD781\uD788\uD789\uD78C\uD790\uD798\uD799\uD79B\uD79D"],["caa1","\u4F3D\u4F73\u5047\u50F9\u52A0\u53EF\u5475\u54E5\u5609\u5AC1\u5BB6\u6687\u67B6\u67B7\u67EF\u6B4C\u73C2\u75C2\u7A3C\u82DB\u8304\u8857\u8888\u8A36\u8CC8\u8DCF\u8EFB\u8FE6\u99D5\u523B\u5374\u5404\u606A\u6164\u6BBC\u73CF\u811A\u89BA\u89D2\u95A3\u4F83\u520A\u58BE\u5978\u59E6\u5E72\u5E79\u61C7\u63C0\u6746\u67EC\u687F\u6F97\u764E\u770B\u78F5\u7A08\u7AFF\u7C21\u809D\u826E\u8271\u8AEB\u9593\u4E6B\u559D\u66F7\u6E34\u78A3\u7AED\u845B\u8910\u874E\u97A8\u52D8\u574E\u582A\u5D4C\u611F\u61BE\u6221\u6562\u67D1\u6A44\u6E1B\u7518\u75B3\u76E3\u77B0\u7D3A\u90AF\u9451\u9452\u9F95"],["cba1","\u5323\u5CAC\u7532\u80DB\u9240\u9598\u525B\u5808\u59DC\u5CA1\u5D17\u5EB7\u5F3A\u5F4A\u6177\u6C5F\u757A\u7586\u7CE0\u7D73\u7DB1\u7F8C\u8154\u8221\u8591\u8941\u8B1B\u92FC\u964D\u9C47\u4ECB\u4EF7\u500B\u51F1\u584F\u6137\u613E\u6168\u6539\u69EA\u6F11\u75A5\u7686\u76D6\u7B87\u82A5\u84CB\uF900\u93A7\u958B\u5580\u5BA2\u5751\uF901\u7CB3\u7FB9\u91B5\u5028\u53BB\u5C45\u5DE8\u62D2\u636E\u64DA\u64E7\u6E20\u70AC\u795B\u8DDD\u8E1E\uF902\u907D\u9245\u92F8\u4E7E\u4EF6\u5065\u5DFE\u5EFA\u6106\u6957\u8171\u8654\u8E47\u9375\u9A2B\u4E5E\u5091\u6770\u6840\u5109\u528D\u5292\u6AA2"],["cca1","\u77BC\u9210\u9ED4\u52AB\u602F\u8FF2\u5048\u61A9\u63ED\u64CA\u683C\u6A84\u6FC0\u8188\u89A1\u9694\u5805\u727D\u72AC\u7504\u7D79\u7E6D\u80A9\u898B\u8B74\u9063\u9D51\u6289\u6C7A\u6F54\u7D50\u7F3A\u8A23\u517C\u614A\u7B9D\u8B19\u9257\u938C\u4EAC\u4FD3\u501E\u50BE\u5106\u52C1\u52CD\u537F\u5770\u5883\u5E9A\u5F91\u6176\u61AC\u64CE\u656C\u666F\u66BB\u66F4\u6897\u6D87\u7085\u70F1\u749F\u74A5\u74CA\u75D9\u786C\u78EC\u7ADF\u7AF6\u7D45\u7D93\u8015\u803F\u811B\u8396\u8B66\u8F15\u9015\u93E1\u9803\u9838\u9A5A\u9BE8\u4FC2\u5553\u583A\u5951\u5B63\u5C46\u60B8\u6212\u6842\u68B0"],["cda1","\u68E8\u6EAA\u754C\u7678\u78CE\u7A3D\u7CFB\u7E6B\u7E7C\u8A08\u8AA1\u8C3F\u968E\u9DC4\u53E4\u53E9\u544A\u5471\u56FA\u59D1\u5B64\u5C3B\u5EAB\u62F7\u6537\u6545\u6572\u66A0\u67AF\u69C1\u6CBD\u75FC\u7690\u777E\u7A3F\u7F94\u8003\u80A1\u818F\u82E6\u82FD\u83F0\u85C1\u8831\u88B4\u8AA5\uF903\u8F9C\u932E\u96C7\u9867\u9AD8\u9F13\u54ED\u659B\u66F2\u688F\u7A40\u8C37\u9D60\u56F0\u5764\u5D11\u6606\u68B1\u68CD\u6EFE\u7428\u889E\u9BE4\u6C68\uF904\u9AA8\u4F9B\u516C\u5171\u529F\u5B54\u5DE5\u6050\u606D\u62F1\u63A7\u653B\u73D9\u7A7A\u86A3\u8CA2\u978F\u4E32\u5BE1\u6208\u679C\u74DC"],["cea1","\u79D1\u83D3\u8A87\u8AB2\u8DE8\u904E\u934B\u9846\u5ED3\u69E8\u85FF\u90ED\uF905\u51A0\u5B98\u5BEC\u6163\u68FA\u6B3E\u704C\u742F\u74D8\u7BA1\u7F50\u83C5\u89C0\u8CAB\u95DC\u9928\u522E\u605D\u62EC\u9002\u4F8A\u5149\u5321\u58D9\u5EE3\u66E0\u6D38\u709A\u72C2\u73D6\u7B50\u80F1\u945B\u5366\u639B\u7F6B\u4E56\u5080\u584A\u58DE\u602A\u6127\u62D0\u69D0\u9B41\u5B8F\u7D18\u80B1\u8F5F\u4EA4\u50D1\u54AC\u55AC\u5B0C\u5DA0\u5DE7\u652A\u654E\u6821\u6A4B\u72E1\u768E\u77EF\u7D5E\u7FF9\u81A0\u854E\u86DF\u8F03\u8F4E\u90CA\u9903\u9A55\u9BAB\u4E18\u4E45\u4E5D\u4EC7\u4FF1\u5177\u52FE"],["cfa1","\u5340\u53E3\u53E5\u548E\u5614\u5775\u57A2\u5BC7\u5D87\u5ED0\u61FC\u62D8\u6551\u67B8\u67E9\u69CB\u6B50\u6BC6\u6BEC\u6C42\u6E9D\u7078\u72D7\u7396\u7403\u77BF\u77E9\u7A76\u7D7F\u8009\u81FC\u8205\u820A\u82DF\u8862\u8B33\u8CFC\u8EC0\u9011\u90B1\u9264\u92B6\u99D2\u9A45\u9CE9\u9DD7\u9F9C\u570B\u5C40\u83CA\u97A0\u97AB\u9EB4\u541B\u7A98\u7FA4\u88D9\u8ECD\u90E1\u5800\u5C48\u6398\u7A9F\u5BAE\u5F13\u7A79\u7AAE\u828E\u8EAC\u5026\u5238\u52F8\u5377\u5708\u62F3\u6372\u6B0A\u6DC3\u7737\u53A5\u7357\u8568\u8E76\u95D5\u673A\u6AC3\u6F70\u8A6D\u8ECC\u994B\uF906\u6677\u6B78\u8CB4"],["d0a1","\u9B3C\uF907\u53EB\u572D\u594E\u63C6\u69FB\u73EA\u7845\u7ABA\u7AC5\u7CFE\u8475\u898F\u8D73\u9035\u95A8\u52FB\u5747\u7547\u7B60\u83CC\u921E\uF908\u6A58\u514B\u524B\u5287\u621F\u68D8\u6975\u9699\u50C5\u52A4\u52E4\u61C3\u65A4\u6839\u69FF\u747E\u7B4B\u82B9\u83EB\u89B2\u8B39\u8FD1\u9949\uF909\u4ECA\u5997\u64D2\u6611\u6A8E\u7434\u7981\u79BD\u82A9\u887E\u887F\u895F\uF90A\u9326\u4F0B\u53CA\u6025\u6271\u6C72\u7D1A\u7D66\u4E98\u5162\u77DC\u80AF\u4F01\u4F0E\u5176\u5180\u55DC\u5668\u573B\u57FA\u57FC\u5914\u5947\u5993\u5BC4\u5C90\u5D0E\u5DF1\u5E7E\u5FCC\u6280\u65D7\u65E3"],["d1a1","\u671E\u671F\u675E\u68CB\u68C4\u6A5F\u6B3A\u6C23\u6C7D\u6C82\u6DC7\u7398\u7426\u742A\u7482\u74A3\u7578\u757F\u7881\u78EF\u7941\u7947\u7948\u797A\u7B95\u7D00\u7DBA\u7F88\u8006\u802D\u808C\u8A18\u8B4F\u8C48\u8D77\u9321\u9324\u98E2\u9951\u9A0E\u9A0F\u9A65\u9E92\u7DCA\u4F76\u5409\u62EE\u6854\u91D1\u55AB\u513A\uF90B\uF90C\u5A1C\u61E6\uF90D\u62CF\u62FF\uF90E",5,"\u90A3\uF914",4,"\u8AFE\uF919\uF91A\uF91B\uF91C\u6696\uF91D\u7156\uF91E\uF91F\u96E3\uF920\u634F\u637A\u5357\uF921\u678F\u6960\u6E73\uF922\u7537\uF923\uF924\uF925"],["d2a1","\u7D0D\uF926\uF927\u8872\u56CA\u5A18\uF928",4,"\u4E43\uF92D\u5167\u5948\u67F0\u8010\uF92E\u5973\u5E74\u649A\u79CA\u5FF5\u606C\u62C8\u637B\u5BE7\u5BD7\u52AA\uF92F\u5974\u5F29\u6012\uF930\uF931\uF932\u7459\uF933",5,"\u99D1\uF939",10,"\u6FC3\uF944\uF945\u81BF\u8FB2\u60F1\uF946\uF947\u8166\uF948\uF949\u5C3F\uF94A",7,"\u5AE9\u8A25\u677B\u7D10\uF952",5,"\u80FD\uF958\uF959\u5C3C\u6CE5\u533F\u6EBA\u591A\u8336"],["d3a1","\u4E39\u4EB6\u4F46\u55AE\u5718\u58C7\u5F56\u65B7\u65E6\u6A80\u6BB5\u6E4D\u77ED\u7AEF\u7C1E\u7DDE\u86CB\u8892\u9132\u935B\u64BB\u6FBE\u737A\u75B8\u9054\u5556\u574D\u61BA\u64D4\u66C7\u6DE1\u6E5B\u6F6D\u6FB9\u75F0\u8043\u81BD\u8541\u8983\u8AC7\u8B5A\u931F\u6C93\u7553\u7B54\u8E0F\u905D\u5510\u5802\u5858\u5E62\u6207\u649E\u68E0\u7576\u7CD6\u87B3\u9EE8\u4EE3\u5788\u576E\u5927\u5C0D\u5CB1\u5E36\u5F85\u6234\u64E1\u73B3\u81FA\u888B\u8CB8\u968A\u9EDB\u5B85\u5FB7\u60B3\u5012\u5200\u5230\u5716\u5835\u5857\u5C0E\u5C60\u5CF6\u5D8B\u5EA6\u5F92\u60BC\u6311\u6389\u6417\u6843"],["d4a1","\u68F9\u6AC2\u6DD8\u6E21\u6ED4\u6FE4\u71FE\u76DC\u7779\u79B1\u7A3B\u8404\u89A9\u8CED\u8DF3\u8E48\u9003\u9014\u9053\u90FD\u934D\u9676\u97DC\u6BD2\u7006\u7258\u72A2\u7368\u7763\u79BF\u7BE4\u7E9B\u8B80\u58A9\u60C7\u6566\u65FD\u66BE\u6C8C\u711E\u71C9\u8C5A\u9813\u4E6D\u7A81\u4EDD\u51AC\u51CD\u52D5\u540C\u61A7\u6771\u6850\u68DF\u6D1E\u6F7C\u75BC\u77B3\u7AE5\u80F4\u8463\u9285\u515C\u6597\u675C\u6793\u75D8\u7AC7\u8373\uF95A\u8C46\u9017\u982D\u5C6F\u81C0\u829A\u9041\u906F\u920D\u5F97\u5D9D\u6A59\u71C8\u767B\u7B49\u85E4\u8B04\u9127\u9A30\u5587\u61F6\uF95B\u7669\u7F85"],["d5a1","\u863F\u87BA\u88F8\u908F\uF95C\u6D1B\u70D9\u73DE\u7D61\u843D\uF95D\u916A\u99F1\uF95E\u4E82\u5375\u6B04\u6B12\u703E\u721B\u862D\u9E1E\u524C\u8FA3\u5D50\u64E5\u652C\u6B16\u6FEB\u7C43\u7E9C\u85CD\u8964\u89BD\u62C9\u81D8\u881F\u5ECA\u6717\u6D6A\u72FC\u7405\u746F\u8782\u90DE\u4F86\u5D0D\u5FA0\u840A\u51B7\u63A0\u7565\u4EAE\u5006\u5169\u51C9\u6881\u6A11\u7CAE\u7CB1\u7CE7\u826F\u8AD2\u8F1B\u91CF\u4FB6\u5137\u52F5\u5442\u5EEC\u616E\u623E\u65C5\u6ADA\u6FFE\u792A\u85DC\u8823\u95AD\u9A62\u9A6A\u9E97\u9ECE\u529B\u66C6\u6B77\u701D\u792B\u8F62\u9742\u6190\u6200\u6523\u6F23"],["d6a1","\u7149\u7489\u7DF4\u806F\u84EE\u8F26\u9023\u934A\u51BD\u5217\u52A3\u6D0C\u70C8\u88C2\u5EC9\u6582\u6BAE\u6FC2\u7C3E\u7375\u4EE4\u4F36\u56F9\uF95F\u5CBA\u5DBA\u601C\u73B2\u7B2D\u7F9A\u7FCE\u8046\u901E\u9234\u96F6\u9748\u9818\u9F61\u4F8B\u6FA7\u79AE\u91B4\u96B7\u52DE\uF960\u6488\u64C4\u6AD3\u6F5E\u7018\u7210\u76E7\u8001\u8606\u865C\u8DEF\u8F05\u9732\u9B6F\u9DFA\u9E75\u788C\u797F\u7DA0\u83C9\u9304\u9E7F\u9E93\u8AD6\u58DF\u5F04\u6727\u7027\u74CF\u7C60\u807E\u5121\u7028\u7262\u78CA\u8CC2\u8CDA\u8CF4\u96F7\u4E86\u50DA\u5BEE\u5ED6\u6599\u71CE\u7642\u77AD\u804A\u84FC"],["d7a1","\u907C\u9B27\u9F8D\u58D8\u5A41\u5C62\u6A13\u6DDA\u6F0F\u763B\u7D2F\u7E37\u851E\u8938\u93E4\u964B\u5289\u65D2\u67F3\u69B4\u6D41\u6E9C\u700F\u7409\u7460\u7559\u7624\u786B\u8B2C\u985E\u516D\u622E\u9678\u4F96\u502B\u5D19\u6DEA\u7DB8\u8F2A\u5F8B\u6144\u6817\uF961\u9686\u52D2\u808B\u51DC\u51CC\u695E\u7A1C\u7DBE\u83F1\u9675\u4FDA\u5229\u5398\u540F\u550E\u5C65\u60A7\u674E\u68A8\u6D6C\u7281\u72F8\u7406\u7483\uF962\u75E2\u7C6C\u7F79\u7FB8\u8389\u88CF\u88E1\u91CC\u91D0\u96E2\u9BC9\u541D\u6F7E\u71D0\u7498\u85FA\u8EAA\u96A3\u9C57\u9E9F\u6797\u6DCB\u7433\u81E8\u9716\u782C"],["d8a1","\u7ACB\u7B20\u7C92\u6469\u746A\u75F2\u78BC\u78E8\u99AC\u9B54\u9EBB\u5BDE\u5E55\u6F20\u819C\u83AB\u9088\u4E07\u534D\u5A29\u5DD2\u5F4E\u6162\u633D\u6669\u66FC\u6EFF\u6F2B\u7063\u779E\u842C\u8513\u883B\u8F13\u9945\u9C3B\u551C\u62B9\u672B\u6CAB\u8309\u896A\u977A\u4EA1\u5984\u5FD8\u5FD9\u671B\u7DB2\u7F54\u8292\u832B\u83BD\u8F1E\u9099\u57CB\u59B9\u5A92\u5BD0\u6627\u679A\u6885\u6BCF\u7164\u7F75\u8CB7\u8CE3\u9081\u9B45\u8108\u8C8A\u964C\u9A40\u9EA5\u5B5F\u6C13\u731B\u76F2\u76DF\u840C\u51AA\u8993\u514D\u5195\u52C9\u68C9\u6C94\u7704\u7720\u7DBF\u7DEC\u9762\u9EB5\u6EC5"],["d9a1","\u8511\u51A5\u540D\u547D\u660E\u669D\u6927\u6E9F\u76BF\u7791\u8317\u84C2\u879F\u9169\u9298\u9CF4\u8882\u4FAE\u5192\u52DF\u59C6\u5E3D\u6155\u6478\u6479\u66AE\u67D0\u6A21\u6BCD\u6BDB\u725F\u7261\u7441\u7738\u77DB\u8017\u82BC\u8305\u8B00\u8B28\u8C8C\u6728\u6C90\u7267\u76EE\u7766\u7A46\u9DA9\u6B7F\u6C92\u5922\u6726\u8499\u536F\u5893\u5999\u5EDF\u63CF\u6634\u6773\u6E3A\u732B\u7AD7\u82D7\u9328\u52D9\u5DEB\u61AE\u61CB\u620A\u62C7\u64AB\u65E0\u6959\u6B66\u6BCB\u7121\u73F7\u755D\u7E46\u821E\u8302\u856A\u8AA3\u8CBF\u9727\u9D61\u58A8\u9ED8\u5011\u520E\u543B\u554F\u6587"],["daa1","\u6C76\u7D0A\u7D0B\u805E\u868A\u9580\u96EF\u52FF\u6C95\u7269\u5473\u5A9A\u5C3E\u5D4B\u5F4C\u5FAE\u672A\u68B6\u6963\u6E3C\u6E44\u7709\u7C73\u7F8E\u8587\u8B0E\u8FF7\u9761\u9EF4\u5CB7\u60B6\u610D\u61AB\u654F\u65FB\u65FC\u6C11\u6CEF\u739F\u73C9\u7DE1\u9594\u5BC6\u871C\u8B10\u525D\u535A\u62CD\u640F\u64B2\u6734\u6A38\u6CCA\u73C0\u749E\u7B94\u7C95\u7E1B\u818A\u8236\u8584\u8FEB\u96F9\u99C1\u4F34\u534A\u53CD\u53DB\u62CC\u642C\u6500\u6591\u69C3\u6CEE\u6F58\u73ED\u7554\u7622\u76E4\u76FC\u78D0\u78FB\u792C\u7D46\u822C\u87E0\u8FD4\u9812\u98EF\u52C3\u62D4\u64A5\u6E24\u6F51"],["dba1","\u767C\u8DCB\u91B1\u9262\u9AEE\u9B43\u5023\u508D\u574A\u59A8\u5C28\u5E47\u5F77\u623F\u653E\u65B9\u65C1\u6609\u678B\u699C\u6EC2\u78C5\u7D21\u80AA\u8180\u822B\u82B3\u84A1\u868C\u8A2A\u8B17\u90A6\u9632\u9F90\u500D\u4FF3\uF963\u57F9\u5F98\u62DC\u6392\u676F\u6E43\u7119\u76C3\u80CC\u80DA\u88F4\u88F5\u8919\u8CE0\u8F29\u914D\u966A\u4F2F\u4F70\u5E1B\u67CF\u6822\u767D\u767E\u9B44\u5E61\u6A0A\u7169\u71D4\u756A\uF964\u7E41\u8543\u85E9\u98DC\u4F10\u7B4F\u7F70\u95A5\u51E1\u5E06\u68B5\u6C3E\u6C4E\u6CDB\u72AF\u7BC4\u8303\u6CD5\u743A\u50FB\u5288\u58C1\u64D8\u6A97\u74A7\u7656"],["dca1","\u78A7\u8617\u95E2\u9739\uF965\u535E\u5F01\u8B8A\u8FA8\u8FAF\u908A\u5225\u77A5\u9C49\u9F08\u4E19\u5002\u5175\u5C5B\u5E77\u661E\u663A\u67C4\u68C5\u70B3\u7501\u75C5\u79C9\u7ADD\u8F27\u9920\u9A08\u4FDD\u5821\u5831\u5BF6\u666E\u6B65\u6D11\u6E7A\u6F7D\u73E4\u752B\u83E9\u88DC\u8913\u8B5C\u8F14\u4F0F\u50D5\u5310\u535C\u5B93\u5FA9\u670D\u798F\u8179\u832F\u8514\u8907\u8986\u8F39\u8F3B\u99A5\u9C12\u672C\u4E76\u4FF8\u5949\u5C01\u5CEF\u5CF0\u6367\u68D2\u70FD\u71A2\u742B\u7E2B\u84EC\u8702\u9022\u92D2\u9CF3\u4E0D\u4ED8\u4FEF\u5085\u5256\u526F\u5426\u5490\u57E0\u592B\u5A66"],["dda1","\u5B5A\u5B75\u5BCC\u5E9C\uF966\u6276\u6577\u65A7\u6D6E\u6EA5\u7236\u7B26\u7C3F\u7F36\u8150\u8151\u819A\u8240\u8299\u83A9\u8A03\u8CA0\u8CE6\u8CFB\u8D74\u8DBA\u90E8\u91DC\u961C\u9644\u99D9\u9CE7\u5317\u5206\u5429\u5674\u58B3\u5954\u596E\u5FFF\u61A4\u626E\u6610\u6C7E\u711A\u76C6\u7C89\u7CDE\u7D1B\u82AC\u8CC1\u96F0\uF967\u4F5B\u5F17\u5F7F\u62C2\u5D29\u670B\u68DA\u787C\u7E43\u9D6C\u4E15\u5099\u5315\u532A\u5351\u5983\u5A62\u5E87\u60B2\u618A\u6249\u6279\u6590\u6787\u69A7\u6BD4\u6BD6\u6BD7\u6BD8\u6CB8\uF968\u7435\u75FA\u7812\u7891\u79D5\u79D8\u7C83\u7DCB\u7FE1\u80A5"],["dea1","\u813E\u81C2\u83F2\u871A\u88E8\u8AB9\u8B6C\u8CBB\u9119\u975E\u98DB\u9F3B\u56AC\u5B2A\u5F6C\u658C\u6AB3\u6BAF\u6D5C\u6FF1\u7015\u725D\u73AD\u8CA7\u8CD3\u983B\u6191\u6C37\u8058\u9A01\u4E4D\u4E8B\u4E9B\u4ED5\u4F3A\u4F3C\u4F7F\u4FDF\u50FF\u53F2\u53F8\u5506\u55E3\u56DB\u58EB\u5962\u5A11\u5BEB\u5BFA\u5C04\u5DF3\u5E2B\u5F99\u601D\u6368\u659C\u65AF\u67F6\u67FB\u68AD\u6B7B\u6C99\u6CD7\u6E23\u7009\u7345\u7802\u793E\u7940\u7960\u79C1\u7BE9\u7D17\u7D72\u8086\u820D\u838E\u84D1\u86C7\u88DF\u8A50\u8A5E\u8B1D\u8CDC\u8D66\u8FAD\u90AA\u98FC\u99DF\u9E9D\u524A\uF969\u6714\uF96A"],["dfa1","\u5098\u522A\u5C71\u6563\u6C55\u73CA\u7523\u759D\u7B97\u849C\u9178\u9730\u4E77\u6492\u6BBA\u715E\u85A9\u4E09\uF96B\u6749\u68EE\u6E17\u829F\u8518\u886B\u63F7\u6F81\u9212\u98AF\u4E0A\u50B7\u50CF\u511F\u5546\u55AA\u5617\u5B40\u5C19\u5CE0\u5E38\u5E8A\u5EA0\u5EC2\u60F3\u6851\u6A61\u6E58\u723D\u7240\u72C0\u76F8\u7965\u7BB1\u7FD4\u88F3\u89F4\u8A73\u8C61\u8CDE\u971C\u585E\u74BD\u8CFD\u55C7\uF96C\u7A61\u7D22\u8272\u7272\u751F\u7525\uF96D\u7B19\u5885\u58FB\u5DBC\u5E8F\u5EB6\u5F90\u6055\u6292\u637F\u654D\u6691\u66D9\u66F8\u6816\u68F2\u7280\u745E\u7B6E\u7D6E\u7DD6\u7F72"],["e0a1","\u80E5\u8212\u85AF\u897F\u8A93\u901D\u92E4\u9ECD\u9F20\u5915\u596D\u5E2D\u60DC\u6614\u6673\u6790\u6C50\u6DC5\u6F5F\u77F3\u78A9\u84C6\u91CB\u932B\u4ED9\u50CA\u5148\u5584\u5B0B\u5BA3\u6247\u657E\u65CB\u6E32\u717D\u7401\u7444\u7487\u74BF\u766C\u79AA\u7DDA\u7E55\u7FA8\u817A\u81B3\u8239\u861A\u87EC\u8A75\u8DE3\u9078\u9291\u9425\u994D\u9BAE\u5368\u5C51\u6954\u6CC4\u6D29\u6E2B\u820C\u859B\u893B\u8A2D\u8AAA\u96EA\u9F67\u5261\u66B9\u6BB2\u7E96\u87FE\u8D0D\u9583\u965D\u651D\u6D89\u71EE\uF96E\u57CE\u59D3\u5BAC\u6027\u60FA\u6210\u661F\u665F\u7329\u73F9\u76DB\u7701\u7B6C"],["e1a1","\u8056\u8072\u8165\u8AA0\u9192\u4E16\u52E2\u6B72\u6D17\u7A05\u7B39\u7D30\uF96F\u8CB0\u53EC\u562F\u5851\u5BB5\u5C0F\u5C11\u5DE2\u6240\u6383\u6414\u662D\u68B3\u6CBC\u6D88\u6EAF\u701F\u70A4\u71D2\u7526\u758F\u758E\u7619\u7B11\u7BE0\u7C2B\u7D20\u7D39\u852C\u856D\u8607\u8A34\u900D\u9061\u90B5\u92B7\u97F6\u9A37\u4FD7\u5C6C\u675F\u6D91\u7C9F\u7E8C\u8B16\u8D16\u901F\u5B6B\u5DFD\u640D\u84C0\u905C\u98E1\u7387\u5B8B\u609A\u677E\u6DDE\u8A1F\u8AA6\u9001\u980C\u5237\uF970\u7051\u788E\u9396\u8870\u91D7\u4FEE\u53D7\u55FD\u56DA\u5782\u58FD\u5AC2\u5B88\u5CAB\u5CC0\u5E25\u6101"],["e2a1","\u620D\u624B\u6388\u641C\u6536\u6578\u6A39\u6B8A\u6C34\u6D19\u6F31\u71E7\u72E9\u7378\u7407\u74B2\u7626\u7761\u79C0\u7A57\u7AEA\u7CB9\u7D8F\u7DAC\u7E61\u7F9E\u8129\u8331\u8490\u84DA\u85EA\u8896\u8AB0\u8B90\u8F38\u9042\u9083\u916C\u9296\u92B9\u968B\u96A7\u96A8\u96D6\u9700\u9808\u9996\u9AD3\u9B1A\u53D4\u587E\u5919\u5B70\u5BBF\u6DD1\u6F5A\u719F\u7421\u74B9\u8085\u83FD\u5DE1\u5F87\u5FAA\u6042\u65EC\u6812\u696F\u6A53\u6B89\u6D35\u6DF3\u73E3\u76FE\u77AC\u7B4D\u7D14\u8123\u821C\u8340\u84F4\u8563\u8A62\u8AC4\u9187\u931E\u9806\u99B4\u620C\u8853\u8FF0\u9265\u5D07\u5D27"],["e3a1","\u5D69\u745F\u819D\u8768\u6FD5\u62FE\u7FD2\u8936\u8972\u4E1E\u4E58\u50E7\u52DD\u5347\u627F\u6607\u7E69\u8805\u965E\u4F8D\u5319\u5636\u59CB\u5AA4\u5C38\u5C4E\u5C4D\u5E02\u5F11\u6043\u65BD\u662F\u6642\u67BE\u67F4\u731C\u77E2\u793A\u7FC5\u8494\u84CD\u8996\u8A66\u8A69\u8AE1\u8C55\u8C7A\u57F4\u5BD4\u5F0F\u606F\u62ED\u690D\u6B96\u6E5C\u7184\u7BD2\u8755\u8B58\u8EFE\u98DF\u98FE\u4F38\u4F81\u4FE1\u547B\u5A20\u5BB8\u613C\u65B0\u6668\u71FC\u7533\u795E\u7D33\u814E\u81E3\u8398\u85AA\u85CE\u8703\u8A0A\u8EAB\u8F9B\uF971\u8FC5\u5931\u5BA4\u5BE6\u6089\u5BE9\u5C0B\u5FC3\u6C81"],["e4a1","\uF972\u6DF1\u700B\u751A\u82AF\u8AF6\u4EC0\u5341\uF973\u96D9\u6C0F\u4E9E\u4FC4\u5152\u555E\u5A25\u5CE8\u6211\u7259\u82BD\u83AA\u86FE\u8859\u8A1D\u963F\u96C5\u9913\u9D09\u9D5D\u580A\u5CB3\u5DBD\u5E44\u60E1\u6115\u63E1\u6A02\u6E25\u9102\u9354\u984E\u9C10\u9F77\u5B89\u5CB8\u6309\u664F\u6848\u773C\u96C1\u978D\u9854\u9B9F\u65A1\u8B01\u8ECB\u95BC\u5535\u5CA9\u5DD6\u5EB5\u6697\u764C\u83F4\u95C7\u58D3\u62BC\u72CE\u9D28\u4EF0\u592E\u600F\u663B\u6B83\u79E7\u9D26\u5393\u54C0\u57C3\u5D16\u611B\u66D6\u6DAF\u788D\u827E\u9698\u9744\u5384\u627C\u6396\u6DB2\u7E0A\u814B\u984D"],["e5a1","\u6AFB\u7F4C\u9DAF\u9E1A\u4E5F\u503B\u51B6\u591C\u60F9\u63F6\u6930\u723A\u8036\uF974\u91CE\u5F31\uF975\uF976\u7D04\u82E5\u846F\u84BB\u85E5\u8E8D\uF977\u4F6F\uF978\uF979\u58E4\u5B43\u6059\u63DA\u6518\u656D\u6698\uF97A\u694A\u6A23\u6D0B\u7001\u716C\u75D2\u760D\u79B3\u7A70\uF97B\u7F8A\uF97C\u8944\uF97D\u8B93\u91C0\u967D\uF97E\u990A\u5704\u5FA1\u65BC\u6F01\u7600\u79A6\u8A9E\u99AD\u9B5A\u9F6C\u5104\u61B6\u6291\u6A8D\u81C6\u5043\u5830\u5F66\u7109\u8A00\u8AFA\u5B7C\u8616\u4FFA\u513C\u56B4\u5944\u63A9\u6DF9\u5DAA\u696D\u5186\u4E88\u4F59\uF97F\uF980\uF981\u5982\uF982"],["e6a1","\uF983\u6B5F\u6C5D\uF984\u74B5\u7916\uF985\u8207\u8245\u8339\u8F3F\u8F5D\uF986\u9918\uF987\uF988\uF989\u4EA6\uF98A\u57DF\u5F79\u6613\uF98B\uF98C\u75AB\u7E79\u8B6F\uF98D\u9006\u9A5B\u56A5\u5827\u59F8\u5A1F\u5BB4\uF98E\u5EF6\uF98F\uF990\u6350\u633B\uF991\u693D\u6C87\u6CBF\u6D8E\u6D93\u6DF5\u6F14\uF992\u70DF\u7136\u7159\uF993\u71C3\u71D5\uF994\u784F\u786F\uF995\u7B75\u7DE3\uF996\u7E2F\uF997\u884D\u8EDF\uF998\uF999\uF99A\u925B\uF99B\u9CF6\uF99C\uF99D\uF99E\u6085\u6D85\uF99F\u71B1\uF9A0\uF9A1\u95B1\u53AD\uF9A2\uF9A3\uF9A4\u67D3\uF9A5\u708E\u7130\u7430\u8276\u82D2"],["e7a1","\uF9A6\u95BB\u9AE5\u9E7D\u66C4\uF9A7\u71C1\u8449\uF9A8\uF9A9\u584B\uF9AA\uF9AB\u5DB8\u5F71\uF9AC\u6620\u668E\u6979\u69AE\u6C38\u6CF3\u6E36\u6F41\u6FDA\u701B\u702F\u7150\u71DF\u7370\uF9AD\u745B\uF9AE\u74D4\u76C8\u7A4E\u7E93\uF9AF\uF9B0\u82F1\u8A60\u8FCE\uF9B1\u9348\uF9B2\u9719\uF9B3\uF9B4\u4E42\u502A\uF9B5\u5208\u53E1\u66F3\u6C6D\u6FCA\u730A\u777F\u7A62\u82AE\u85DD\u8602\uF9B6\u88D4\u8A63\u8B7D\u8C6B\uF9B7\u92B3\uF9B8\u9713\u9810\u4E94\u4F0D\u4FC9\u50B2\u5348\u543E\u5433\u55DA\u5862\u58BA\u5967\u5A1B\u5BE4\u609F\uF9B9\u61CA\u6556\u65FF\u6664\u68A7\u6C5A\u6FB3"],["e8a1","\u70CF\u71AC\u7352\u7B7D\u8708\u8AA4\u9C32\u9F07\u5C4B\u6C83\u7344\u7389\u923A\u6EAB\u7465\u761F\u7A69\u7E15\u860A\u5140\u58C5\u64C1\u74EE\u7515\u7670\u7FC1\u9095\u96CD\u9954\u6E26\u74E6\u7AA9\u7AAA\u81E5\u86D9\u8778\u8A1B\u5A49\u5B8C\u5B9B\u68A1\u6900\u6D63\u73A9\u7413\u742C\u7897\u7DE9\u7FEB\u8118\u8155\u839E\u8C4C\u962E\u9811\u66F0\u5F80\u65FA\u6789\u6C6A\u738B\u502D\u5A03\u6B6A\u77EE\u5916\u5D6C\u5DCD\u7325\u754F\uF9BA\uF9BB\u50E5\u51F9\u582F\u592D\u5996\u59DA\u5BE5\uF9BC\uF9BD\u5DA2\u62D7\u6416\u6493\u64FE\uF9BE\u66DC\uF9BF\u6A48\uF9C0\u71FF\u7464\uF9C1"],["e9a1","\u7A88\u7AAF\u7E47\u7E5E\u8000\u8170\uF9C2\u87EF\u8981\u8B20\u9059\uF9C3\u9080\u9952\u617E\u6B32\u6D74\u7E1F\u8925\u8FB1\u4FD1\u50AD\u5197\u52C7\u57C7\u5889\u5BB9\u5EB8\u6142\u6995\u6D8C\u6E67\u6EB6\u7194\u7462\u7528\u752C\u8073\u8338\u84C9\u8E0A\u9394\u93DE\uF9C4\u4E8E\u4F51\u5076\u512A\u53C8\u53CB\u53F3\u5B87\u5BD3\u5C24\u611A\u6182\u65F4\u725B\u7397\u7440\u76C2\u7950\u7991\u79B9\u7D06\u7FBD\u828B\u85D5\u865E\u8FC2\u9047\u90F5\u91EA\u9685\u96E8\u96E9\u52D6\u5F67\u65ED\u6631\u682F\u715C\u7A36\u90C1\u980A\u4E91\uF9C5\u6A52\u6B9E\u6F90\u7189\u8018\u82B8\u8553"],["eaa1","\u904B\u9695\u96F2\u97FB\u851A\u9B31\u4E90\u718A\u96C4\u5143\u539F\u54E1\u5713\u5712\u57A3\u5A9B\u5AC4\u5BC3\u6028\u613F\u63F4\u6C85\u6D39\u6E72\u6E90\u7230\u733F\u7457\u82D1\u8881\u8F45\u9060\uF9C6\u9662\u9858\u9D1B\u6708\u8D8A\u925E\u4F4D\u5049\u50DE\u5371\u570D\u59D4\u5A01\u5C09\u6170\u6690\u6E2D\u7232\u744B\u7DEF\u80C3\u840E\u8466\u853F\u875F\u885B\u8918\u8B02\u9055\u97CB\u9B4F\u4E73\u4F91\u5112\u516A\uF9C7\u552F\u55A9\u5B7A\u5BA5\u5E7C\u5E7D\u5EBE\u60A0\u60DF\u6108\u6109\u63C4\u6538\u6709\uF9C8\u67D4\u67DA\uF9C9\u6961\u6962\u6CB9\u6D27\uF9CA\u6E38\uF9CB"],["eba1","\u6FE1\u7336\u7337\uF9CC\u745C\u7531\uF9CD\u7652\uF9CE\uF9CF\u7DAD\u81FE\u8438\u88D5\u8A98\u8ADB\u8AED\u8E30\u8E42\u904A\u903E\u907A\u9149\u91C9\u936E\uF9D0\uF9D1\u5809\uF9D2\u6BD3\u8089\u80B2\uF9D3\uF9D4\u5141\u596B\u5C39\uF9D5\uF9D6\u6F64\u73A7\u80E4\u8D07\uF9D7\u9217\u958F\uF9D8\uF9D9\uF9DA\uF9DB\u807F\u620E\u701C\u7D68\u878D\uF9DC\u57A0\u6069\u6147\u6BB7\u8ABE\u9280\u96B1\u4E59\u541F\u6DEB\u852D\u9670\u97F3\u98EE\u63D6\u6CE3\u9091\u51DD\u61C9\u81BA\u9DF9\u4F9D\u501A\u5100\u5B9C\u610F\u61FF\u64EC\u6905\u6BC5\u7591\u77E3\u7FA9\u8264\u858F\u87FB\u8863\u8ABC"],["eca1","\u8B70\u91AB\u4E8C\u4EE5\u4F0A\uF9DD\uF9DE\u5937\u59E8\uF9DF\u5DF2\u5F1B\u5F5B\u6021\uF9E0\uF9E1\uF9E2\uF9E3\u723E\u73E5\uF9E4\u7570\u75CD\uF9E5\u79FB\uF9E6\u800C\u8033\u8084\u82E1\u8351\uF9E7\uF9E8\u8CBD\u8CB3\u9087\uF9E9\uF9EA\u98F4\u990C\uF9EB\uF9EC\u7037\u76CA\u7FCA\u7FCC\u7FFC\u8B1A\u4EBA\u4EC1\u5203\u5370\uF9ED\u54BD\u56E0\u59FB\u5BC5\u5F15\u5FCD\u6E6E\uF9EE\uF9EF\u7D6A\u8335\uF9F0\u8693\u8A8D\uF9F1\u976D\u9777\uF9F2\uF9F3\u4E00\u4F5A\u4F7E\u58F9\u65E5\u6EA2\u9038\u93B0\u99B9\u4EFB\u58EC\u598A\u59D9\u6041\uF9F4\uF9F5\u7A14\uF9F6\u834F\u8CC3\u5165\u5344"],["eda1","\uF9F7\uF9F8\uF9F9\u4ECD\u5269\u5B55\u82BF\u4ED4\u523A\u54A8\u59C9\u59FF\u5B50\u5B57\u5B5C\u6063\u6148\u6ECB\u7099\u716E\u7386\u74F7\u75B5\u78C1\u7D2B\u8005\u81EA\u8328\u8517\u85C9\u8AEE\u8CC7\u96CC\u4F5C\u52FA\u56BC\u65AB\u6628\u707C\u70B8\u7235\u7DBD\u828D\u914C\u96C0\u9D72\u5B71\u68E7\u6B98\u6F7A\u76DE\u5C91\u66AB\u6F5B\u7BB4\u7C2A\u8836\u96DC\u4E08\u4ED7\u5320\u5834\u58BB\u58EF\u596C\u5C07\u5E33\u5E84\u5F35\u638C\u66B2\u6756\u6A1F\u6AA3\u6B0C\u6F3F\u7246\uF9FA\u7350\u748B\u7AE0\u7CA7\u8178\u81DF\u81E7\u838A\u846C\u8523\u8594\u85CF\u88DD\u8D13\u91AC\u9577"],["eea1","\u969C\u518D\u54C9\u5728\u5BB0\u624D\u6750\u683D\u6893\u6E3D\u6ED3\u707D\u7E21\u88C1\u8CA1\u8F09\u9F4B\u9F4E\u722D\u7B8F\u8ACD\u931A\u4F47\u4F4E\u5132\u5480\u59D0\u5E95\u62B5\u6775\u696E\u6A17\u6CAE\u6E1A\u72D9\u732A\u75BD\u7BB8\u7D35\u82E7\u83F9\u8457\u85F7\u8A5B\u8CAF\u8E87\u9019\u90B8\u96CE\u9F5F\u52E3\u540A\u5AE1\u5BC2\u6458\u6575\u6EF4\u72C4\uF9FB\u7684\u7A4D\u7B1B\u7C4D\u7E3E\u7FDF\u837B\u8B2B\u8CCA\u8D64\u8DE1\u8E5F\u8FEA\u8FF9\u9069\u93D1\u4F43\u4F7A\u50B3\u5168\u5178\u524D\u526A\u5861\u587C\u5960\u5C08\u5C55\u5EDB\u609B\u6230\u6813\u6BBF\u6C08\u6FB1"],["efa1","\u714E\u7420\u7530\u7538\u7551\u7672\u7B4C\u7B8B\u7BAD\u7BC6\u7E8F\u8A6E\u8F3E\u8F49\u923F\u9293\u9322\u942B\u96FB\u985A\u986B\u991E\u5207\u622A\u6298\u6D59\u7664\u7ACA\u7BC0\u7D76\u5360\u5CBE\u5E97\u6F38\u70B9\u7C98\u9711\u9B8E\u9EDE\u63A5\u647A\u8776\u4E01\u4E95\u4EAD\u505C\u5075\u5448\u59C3\u5B9A\u5E40\u5EAD\u5EF7\u5F81\u60C5\u633A\u653F\u6574\u65CC\u6676\u6678\u67FE\u6968\u6A89\u6B63\u6C40\u6DC0\u6DE8\u6E1F\u6E5E\u701E\u70A1\u738E\u73FD\u753A\u775B\u7887\u798E\u7A0B\u7A7D\u7CBE\u7D8E\u8247\u8A02\u8AEA\u8C9E\u912D\u914A\u91D8\u9266\u92CC\u9320\u9706\u9756"],["f0a1","\u975C\u9802\u9F0E\u5236\u5291\u557C\u5824\u5E1D\u5F1F\u608C\u63D0\u68AF\u6FDF\u796D\u7B2C\u81CD\u85BA\u88FD\u8AF8\u8E44\u918D\u9664\u969B\u973D\u984C\u9F4A\u4FCE\u5146\u51CB\u52A9\u5632\u5F14\u5F6B\u63AA\u64CD\u65E9\u6641\u66FA\u66F9\u671D\u689D\u68D7\u69FD\u6F15\u6F6E\u7167\u71E5\u722A\u74AA\u773A\u7956\u795A\u79DF\u7A20\u7A95\u7C97\u7CDF\u7D44\u7E70\u8087\u85FB\u86A4\u8A54\u8ABF\u8D99\u8E81\u9020\u906D\u91E3\u963B\u96D5\u9CE5\u65CF\u7C07\u8DB3\u93C3\u5B58\u5C0A\u5352\u62D9\u731D\u5027\u5B97\u5F9E\u60B0\u616B\u68D5\u6DD9\u742E\u7A2E\u7D42\u7D9C\u7E31\u816B"],["f1a1","\u8E2A\u8E35\u937E\u9418\u4F50\u5750\u5DE6\u5EA7\u632B\u7F6A\u4E3B\u4F4F\u4F8F\u505A\u59DD\u80C4\u546A\u5468\u55FE\u594F\u5B99\u5DDE\u5EDA\u665D\u6731\u67F1\u682A\u6CE8\u6D32\u6E4A\u6F8D\u70B7\u73E0\u7587\u7C4C\u7D02\u7D2C\u7DA2\u821F\u86DB\u8A3B\u8A85\u8D70\u8E8A\u8F33\u9031\u914E\u9152\u9444\u99D0\u7AF9\u7CA5\u4FCA\u5101\u51C6\u57C8\u5BEF\u5CFB\u6659\u6A3D\u6D5A\u6E96\u6FEC\u710C\u756F\u7AE3\u8822\u9021\u9075\u96CB\u99FF\u8301\u4E2D\u4EF2\u8846\u91CD\u537D\u6ADB\u696B\u6C41\u847A\u589E\u618E\u66FE\u62EF\u70DD\u7511\u75C7\u7E52\u84B8\u8B49\u8D08\u4E4B\u53EA"],["f2a1","\u54AB\u5730\u5740\u5FD7\u6301\u6307\u646F\u652F\u65E8\u667A\u679D\u67B3\u6B62\u6C60\u6C9A\u6F2C\u77E5\u7825\u7949\u7957\u7D19\u80A2\u8102\u81F3\u829D\u82B7\u8718\u8A8C\uF9FC\u8D04\u8DBE\u9072\u76F4\u7A19\u7A37\u7E54\u8077\u5507\u55D4\u5875\u632F\u6422\u6649\u664B\u686D\u699B\u6B84\u6D25\u6EB1\u73CD\u7468\u74A1\u755B\u75B9\u76E1\u771E\u778B\u79E6\u7E09\u7E1D\u81FB\u852F\u8897\u8A3A\u8CD1\u8EEB\u8FB0\u9032\u93AD\u9663\u9673\u9707\u4F84\u53F1\u59EA\u5AC9\u5E19\u684E\u74C6\u75BE\u79E9\u7A92\u81A3\u86ED\u8CEA\u8DCC\u8FED\u659F\u6715\uF9FD\u57F7\u6F57\u7DDD\u8F2F"],["f3a1","\u93F6\u96C6\u5FB5\u61F2\u6F84\u4E14\u4F98\u501F\u53C9\u55DF\u5D6F\u5DEE\u6B21\u6B64\u78CB\u7B9A\uF9FE\u8E49\u8ECA\u906E\u6349\u643E\u7740\u7A84\u932F\u947F\u9F6A\u64B0\u6FAF\u71E6\u74A8\u74DA\u7AC4\u7C12\u7E82\u7CB2\u7E98\u8B9A\u8D0A\u947D\u9910\u994C\u5239\u5BDF\u64E6\u672D\u7D2E\u50ED\u53C3\u5879\u6158\u6159\u61FA\u65AC\u7AD9\u8B92\u8B96\u5009\u5021\u5275\u5531\u5A3C\u5EE0\u5F70\u6134\u655E\u660C\u6636\u66A2\u69CD\u6EC4\u6F32\u7316\u7621\u7A93\u8139\u8259\u83D6\u84BC\u50B5\u57F0\u5BC0\u5BE8\u5F69\u63A1\u7826\u7DB5\u83DC\u8521\u91C7\u91F5\u518A\u67F5\u7B56"],["f4a1","\u8CAC\u51C4\u59BB\u60BD\u8655\u501C\uF9FF\u5254\u5C3A\u617D\u621A\u62D3\u64F2\u65A5\u6ECC\u7620\u810A\u8E60\u965F\u96BB\u4EDF\u5343\u5598\u5929\u5DDD\u64C5\u6CC9\u6DFA\u7394\u7A7F\u821B\u85A6\u8CE4\u8E10\u9077\u91E7\u95E1\u9621\u97C6\u51F8\u54F2\u5586\u5FB9\u64A4\u6F88\u7DB4\u8F1F\u8F4D\u9435\u50C9\u5C16\u6CBE\u6DFB\u751B\u77BB\u7C3D\u7C64\u8A79\u8AC2\u581E\u59BE\u5E16\u6377\u7252\u758A\u776B\u8ADC\u8CBC\u8F12\u5EF3\u6674\u6DF8\u807D\u83C1\u8ACB\u9751\u9BD6\uFA00\u5243\u66FF\u6D95\u6EEF\u7DE0\u8AE6\u902E\u905E\u9AD4\u521D\u527F\u54E8\u6194\u6284\u62DB\u68A2"],["f5a1","\u6912\u695A\u6A35\u7092\u7126\u785D\u7901\u790E\u79D2\u7A0D\u8096\u8278\u82D5\u8349\u8549\u8C82\u8D85\u9162\u918B\u91AE\u4FC3\u56D1\u71ED\u77D7\u8700\u89F8\u5BF8\u5FD6\u6751\u90A8\u53E2\u585A\u5BF5\u60A4\u6181\u6460\u7E3D\u8070\u8525\u9283\u64AE\u50AC\u5D14\u6700\u589C\u62BD\u63A8\u690E\u6978\u6A1E\u6E6B\u76BA\u79CB\u82BB\u8429\u8ACF\u8DA8\u8FFD\u9112\u914B\u919C\u9310\u9318\u939A\u96DB\u9A36\u9C0D\u4E11\u755C\u795D\u7AFA\u7B51\u7BC9\u7E2E\u84C4\u8E59\u8E74\u8EF8\u9010\u6625\u693F\u7443\u51FA\u672E\u9EDC\u5145\u5FE0\u6C96\u87F2\u885D\u8877\u60B4\u81B5\u8403"],["f6a1","\u8D05\u53D6\u5439\u5634\u5A36\u5C31\u708A\u7FE0\u805A\u8106\u81ED\u8DA3\u9189\u9A5F\u9DF2\u5074\u4EC4\u53A0\u60FB\u6E2C\u5C64\u4F88\u5024\u55E4\u5CD9\u5E5F\u6065\u6894\u6CBB\u6DC4\u71BE\u75D4\u75F4\u7661\u7A1A\u7A49\u7DC7\u7DFB\u7F6E\u81F4\u86A9\u8F1C\u96C9\u99B3\u9F52\u5247\u52C5\u98ED\u89AA\u4E03\u67D2\u6F06\u4FB5\u5BE2\u6795\u6C88\u6D78\u741B\u7827\u91DD\u937C\u87C4\u79E4\u7A31\u5FEB\u4ED6\u54A4\u553E\u58AE\u59A5\u60F0\u6253\u62D6\u6736\u6955\u8235\u9640\u99B1\u99DD\u502C\u5353\u5544\u577C\uFA01\u6258\uFA02\u64E2\u666B\u67DD\u6FC1\u6FEF\u7422\u7438\u8A17"],["f7a1","\u9438\u5451\u5606\u5766\u5F48\u619A\u6B4E\u7058\u70AD\u7DBB\u8A95\u596A\u812B\u63A2\u7708\u803D\u8CAA\u5854\u642D\u69BB\u5B95\u5E11\u6E6F\uFA03\u8569\u514C\u53F0\u592A\u6020\u614B\u6B86\u6C70\u6CF0\u7B1E\u80CE\u82D4\u8DC6\u90B0\u98B1\uFA04\u64C7\u6FA4\u6491\u6504\u514E\u5410\u571F\u8A0E\u615F\u6876\uFA05\u75DB\u7B52\u7D71\u901A\u5806\u69CC\u817F\u892A\u9000\u9839\u5078\u5957\u59AC\u6295\u900F\u9B2A\u615D\u7279\u95D6\u5761\u5A46\u5DF4\u628A\u64AD\u64FA\u6777\u6CE2\u6D3E\u722C\u7436\u7834\u7F77\u82AD\u8DDB\u9817\u5224\u5742\u677F\u7248\u74E3\u8CA9\u8FA6\u9211"],["f8a1","\u962A\u516B\u53ED\u634C\u4F69\u5504\u6096\u6557\u6C9B\u6D7F\u724C\u72FD\u7A17\u8987\u8C9D\u5F6D\u6F8E\u70F9\u81A8\u610E\u4FBF\u504F\u6241\u7247\u7BC7\u7DE8\u7FE9\u904D\u97AD\u9A19\u8CB6\u576A\u5E73\u67B0\u840D\u8A55\u5420\u5B16\u5E63\u5EE2\u5F0A\u6583\u80BA\u853D\u9589\u965B\u4F48\u5305\u530D\u530F\u5486\u54FA\u5703\u5E03\u6016\u629B\u62B1\u6355\uFA06\u6CE1\u6D66\u75B1\u7832\u80DE\u812F\u82DE\u8461\u84B2\u888D\u8912\u900B\u92EA\u98FD\u9B91\u5E45\u66B4\u66DD\u7011\u7206\uFA07\u4FF5\u527D\u5F6A\u6153\u6753\u6A19\u6F02\u74E2\u7968\u8868\u8C79\u98C7\u98C4\u9A43"],["f9a1","\u54C1\u7A1F\u6953\u8AF7\u8C4A\u98A8\u99AE\u5F7C\u62AB\u75B2\u76AE\u88AB\u907F\u9642\u5339\u5F3C\u5FC5\u6CCC\u73CC\u7562\u758B\u7B46\u82FE\u999D\u4E4F\u903C\u4E0B\u4F55\u53A6\u590F\u5EC8\u6630\u6CB3\u7455\u8377\u8766\u8CC0\u9050\u971E\u9C15\u58D1\u5B78\u8650\u8B14\u9DB4\u5BD2\u6068\u608D\u65F1\u6C57\u6F22\u6FA3\u701A\u7F55\u7FF0\u9591\u9592\u9650\u97D3\u5272\u8F44\u51FD\u542B\u54B8\u5563\u558A\u6ABB\u6DB5\u7DD8\u8266\u929C\u9677\u9E79\u5408\u54C8\u76D2\u86E4\u95A4\u95D4\u965C\u4EA2\u4F09\u59EE\u5AE6\u5DF7\u6052\u6297\u676D\u6841\u6C86\u6E2F\u7F38\u809B\u822A"],["faa1","\uFA08\uFA09\u9805\u4EA5\u5055\u54B3\u5793\u595A\u5B69\u5BB3\u61C8\u6977\u6D77\u7023\u87F9\u89E3\u8A72\u8AE7\u9082\u99ED\u9AB8\u52BE\u6838\u5016\u5E78\u674F\u8347\u884C\u4EAB\u5411\u56AE\u73E6\u9115\u97FF\u9909\u9957\u9999\u5653\u589F\u865B\u8A31\u61B2\u6AF6\u737B\u8ED2\u6B47\u96AA\u9A57\u5955\u7200\u8D6B\u9769\u4FD4\u5CF4\u5F26\u61F8\u665B\u6CEB\u70AB\u7384\u73B9\u73FE\u7729\u774D\u7D43\u7D62\u7E23\u8237\u8852\uFA0A\u8CE2\u9249\u986F\u5B51\u7A74\u8840\u9801\u5ACC\u4FE0\u5354\u593E\u5CFD\u633E\u6D79\u72F9\u8105\u8107\u83A2\u92CF\u9830\u4EA8\u5144\u5211\u578B"],["fba1","\u5F62\u6CC2\u6ECE\u7005\u7050\u70AF\u7192\u73E9\u7469\u834A\u87A2\u8861\u9008\u90A2\u93A3\u99A8\u516E\u5F57\u60E0\u6167\u66B3\u8559\u8E4A\u91AF\u978B\u4E4E\u4E92\u547C\u58D5\u58FA\u597D\u5CB5\u5F27\u6236\u6248\u660A\u6667\u6BEB\u6D69\u6DCF\u6E56\u6EF8\u6F94\u6FE0\u6FE9\u705D\u72D0\u7425\u745A\u74E0\u7693\u795C\u7CCA\u7E1E\u80E1\u82A6\u846B\u84BF\u864E\u865F\u8774\u8B77\u8C6A\u93AC\u9800\u9865\u60D1\u6216\u9177\u5A5A\u660F\u6DF7\u6E3E\u743F\u9B42\u5FFD\u60DA\u7B0F\u54C4\u5F18\u6C5E\u6CD3\u6D2A\u70D8\u7D05\u8679\u8A0C\u9D3B\u5316\u548C\u5B05\u6A3A\u706B\u7575"],["fca1","\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"],["fda1","\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"]],m$=[["0","\0",127],["a140","\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"],["a1a1","\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\xA7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\xAF\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\xD7\xF7\xB1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62",4,"\uFF5E\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2295\u2299\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF0F"],["a240","\uFF3C\u2215\uFE68\uFF04\uFFE5\u3012\uFFE0\uFFE1\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\xB0\u5159\u515B\u515E\u515D\u5161\u5163\u55E7\u74E9\u7CCE\u2581",7,"\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D"],["a2a1","\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10",9,"\u2160",9,"\u3021",8,"\u5341\u5344\u5345\uFF21",25,"\uFF41",21],["a340","\uFF57\uFF58\uFF59\uFF5A\u0391",16,"\u03A3",6,"\u03B1",16,"\u03C3",6,"\u3105",10],["a3a1","\u3110",25,"\u02D9\u02C9\u02CA\u02C7\u02CB"],["a3e1","\u20AC"],["a440","\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u5341\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D"],["a4a1","\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u5345\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19"],["a540","\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916"],["a5a1","\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4F09\u4F19\u4F0A\u4F15\u4F0D\u4F10\u4F11\u4F0F\u4EF2\u4EF6\u4EFB\u4EF0\u4EF3\u4EFD\u4F01\u4F0B\u5149\u5147\u5146\u5148\u5168"],["a640","\u5171\u518D\u51B0\u5217\u5211\u5212\u520E\u5216\u52A3\u5308\u5321\u5320\u5370\u5371\u5409\u540F\u540C\u540A\u5410\u5401\u540B\u5404\u5411\u540D\u5408\u5403\u540E\u5406\u5412\u56E0\u56DE\u56DD\u5733\u5730\u5728\u572D\u572C\u572F\u5729\u5919\u591A\u5937\u5938\u5984\u5978\u5983\u597D\u5979\u5982\u5981\u5B57\u5B58\u5B87\u5B88\u5B85\u5B89\u5BFA\u5C16\u5C79\u5DDE\u5E06\u5E76\u5E74"],["a6a1","\u5F0F\u5F1B\u5FD9\u5FD6\u620E\u620C\u620D\u6210\u6263\u625B\u6258\u6536\u65E9\u65E8\u65EC\u65ED\u66F2\u66F3\u6709\u673D\u6734\u6731\u6735\u6B21\u6B64\u6B7B\u6C16\u6C5D\u6C57\u6C59\u6C5F\u6C60\u6C50\u6C55\u6C61\u6C5B\u6C4D\u6C4E\u7070\u725F\u725D\u767E\u7AF9\u7C73\u7CF8\u7F36\u7F8A\u7FBD\u8001\u8003\u800C\u8012\u8033\u807F\u8089\u808B\u808C\u81E3\u81EA\u81F3\u81FC\u820C\u821B\u821F\u826E\u8272\u827E\u866B\u8840\u884C\u8863\u897F\u9621\u4E32\u4EA8\u4F4D\u4F4F\u4F47\u4F57\u4F5E\u4F34\u4F5B\u4F55\u4F30\u4F50\u4F51\u4F3D\u4F3A\u4F38\u4F43\u4F54\u4F3C\u4F46\u4F63"],["a740","\u4F5C\u4F60\u4F2F\u4F4E\u4F36\u4F59\u4F5D\u4F48\u4F5A\u514C\u514B\u514D\u5175\u51B6\u51B7\u5225\u5224\u5229\u522A\u5228\u52AB\u52A9\u52AA\u52AC\u5323\u5373\u5375\u541D\u542D\u541E\u543E\u5426\u544E\u5427\u5446\u5443\u5433\u5448\u5442\u541B\u5429\u544A\u5439\u543B\u5438\u542E\u5435\u5436\u5420\u543C\u5440\u5431\u542B\u541F\u542C\u56EA\u56F0\u56E4\u56EB\u574A\u5751\u5740\u574D"],["a7a1","\u5747\u574E\u573E\u5750\u574F\u573B\u58EF\u593E\u599D\u5992\u59A8\u599E\u59A3\u5999\u5996\u598D\u59A4\u5993\u598A\u59A5\u5B5D\u5B5C\u5B5A\u5B5B\u5B8C\u5B8B\u5B8F\u5C2C\u5C40\u5C41\u5C3F\u5C3E\u5C90\u5C91\u5C94\u5C8C\u5DEB\u5E0C\u5E8F\u5E87\u5E8A\u5EF7\u5F04\u5F1F\u5F64\u5F62\u5F77\u5F79\u5FD8\u5FCC\u5FD7\u5FCD\u5FF1\u5FEB\u5FF8\u5FEA\u6212\u6211\u6284\u6297\u6296\u6280\u6276\u6289\u626D\u628A\u627C\u627E\u6279\u6273\u6292\u626F\u6298\u626E\u6295\u6293\u6291\u6286\u6539\u653B\u6538\u65F1\u66F4\u675F\u674E\u674F\u6750\u6751\u675C\u6756\u675E\u6749\u6746\u6760"],["a840","\u6753\u6757\u6B65\u6BCF\u6C42\u6C5E\u6C99\u6C81\u6C88\u6C89\u6C85\u6C9B\u6C6A\u6C7A\u6C90\u6C70\u6C8C\u6C68\u6C96\u6C92\u6C7D\u6C83\u6C72\u6C7E\u6C74\u6C86\u6C76\u6C8D\u6C94\u6C98\u6C82\u7076\u707C\u707D\u7078\u7262\u7261\u7260\u72C4\u72C2\u7396\u752C\u752B\u7537\u7538\u7682\u76EF\u77E3\u79C1\u79C0\u79BF\u7A76\u7CFB\u7F55\u8096\u8093\u809D\u8098\u809B\u809A\u80B2\u826F\u8292"],["a8a1","\u828B\u828D\u898B\u89D2\u8A00\u8C37\u8C46\u8C55\u8C9D\u8D64\u8D70\u8DB3\u8EAB\u8ECA\u8F9B\u8FB0\u8FC2\u8FC6\u8FC5\u8FC4\u5DE1\u9091\u90A2\u90AA\u90A6\u90A3\u9149\u91C6\u91CC\u9632\u962E\u9631\u962A\u962C\u4E26\u4E56\u4E73\u4E8B\u4E9B\u4E9E\u4EAB\u4EAC\u4F6F\u4F9D\u4F8D\u4F73\u4F7F\u4F6C\u4F9B\u4F8B\u4F86\u4F83\u4F70\u4F75\u4F88\u4F69\u4F7B\u4F96\u4F7E\u4F8F\u4F91\u4F7A\u5154\u5152\u5155\u5169\u5177\u5176\u5178\u51BD\u51FD\u523B\u5238\u5237\u523A\u5230\u522E\u5236\u5241\u52BE\u52BB\u5352\u5354\u5353\u5351\u5366\u5377\u5378\u5379\u53D6\u53D4\u53D7\u5473\u5475"],["a940","\u5496\u5478\u5495\u5480\u547B\u5477\u5484\u5492\u5486\u547C\u5490\u5471\u5476\u548C\u549A\u5462\u5468\u548B\u547D\u548E\u56FA\u5783\u5777\u576A\u5769\u5761\u5766\u5764\u577C\u591C\u5949\u5947\u5948\u5944\u5954\u59BE\u59BB\u59D4\u59B9\u59AE\u59D1\u59C6\u59D0\u59CD\u59CB\u59D3\u59CA\u59AF\u59B3\u59D2\u59C5\u5B5F\u5B64\u5B63\u5B97\u5B9A\u5B98\u5B9C\u5B99\u5B9B\u5C1A\u5C48\u5C45"],["a9a1","\u5C46\u5CB7\u5CA1\u5CB8\u5CA9\u5CAB\u5CB1\u5CB3\u5E18\u5E1A\u5E16\u5E15\u5E1B\u5E11\u5E78\u5E9A\u5E97\u5E9C\u5E95\u5E96\u5EF6\u5F26\u5F27\u5F29\u5F80\u5F81\u5F7F\u5F7C\u5FDD\u5FE0\u5FFD\u5FF5\u5FFF\u600F\u6014\u602F\u6035\u6016\u602A\u6015\u6021\u6027\u6029\u602B\u601B\u6216\u6215\u623F\u623E\u6240\u627F\u62C9\u62CC\u62C4\u62BF\u62C2\u62B9\u62D2\u62DB\u62AB\u62D3\u62D4\u62CB\u62C8\u62A8\u62BD\u62BC\u62D0\u62D9\u62C7\u62CD\u62B5\u62DA\u62B1\u62D8\u62D6\u62D7\u62C6\u62AC\u62CE\u653E\u65A7\u65BC\u65FA\u6614\u6613\u660C\u6606\u6602\u660E\u6600\u660F\u6615\u660A"],["aa40","\u6607\u670D\u670B\u676D\u678B\u6795\u6771\u679C\u6773\u6777\u6787\u679D\u6797\u676F\u6770\u677F\u6789\u677E\u6790\u6775\u679A\u6793\u677C\u676A\u6772\u6B23\u6B66\u6B67\u6B7F\u6C13\u6C1B\u6CE3\u6CE8\u6CF3\u6CB1\u6CCC\u6CE5\u6CB3\u6CBD\u6CBE\u6CBC\u6CE2\u6CAB\u6CD5\u6CD3\u6CB8\u6CC4\u6CB9\u6CC1\u6CAE\u6CD7\u6CC5\u6CF1\u6CBF\u6CBB\u6CE1\u6CDB\u6CCA\u6CAC\u6CEF\u6CDC\u6CD6\u6CE0"],["aaa1","\u7095\u708E\u7092\u708A\u7099\u722C\u722D\u7238\u7248\u7267\u7269\u72C0\u72CE\u72D9\u72D7\u72D0\u73A9\u73A8\u739F\u73AB\u73A5\u753D\u759D\u7599\u759A\u7684\u76C2\u76F2\u76F4\u77E5\u77FD\u793E\u7940\u7941\u79C9\u79C8\u7A7A\u7A79\u7AFA\u7CFE\u7F54\u7F8C\u7F8B\u8005\u80BA\u80A5\u80A2\u80B1\u80A1\u80AB\u80A9\u80B4\u80AA\u80AF\u81E5\u81FE\u820D\u82B3\u829D\u8299\u82AD\u82BD\u829F\u82B9\u82B1\u82AC\u82A5\u82AF\u82B8\u82A3\u82B0\u82BE\u82B7\u864E\u8671\u521D\u8868\u8ECB\u8FCE\u8FD4\u8FD1\u90B5\u90B8\u90B1\u90B6\u91C7\u91D1\u9577\u9580\u961C\u9640\u963F\u963B\u9644"],["ab40","\u9642\u96B9\u96E8\u9752\u975E\u4E9F\u4EAD\u4EAE\u4FE1\u4FB5\u4FAF\u4FBF\u4FE0\u4FD1\u4FCF\u4FDD\u4FC3\u4FB6\u4FD8\u4FDF\u4FCA\u4FD7\u4FAE\u4FD0\u4FC4\u4FC2\u4FDA\u4FCE\u4FDE\u4FB7\u5157\u5192\u5191\u51A0\u524E\u5243\u524A\u524D\u524C\u524B\u5247\u52C7\u52C9\u52C3\u52C1\u530D\u5357\u537B\u539A\u53DB\u54AC\u54C0\u54A8\u54CE\u54C9\u54B8\u54A6\u54B3\u54C7\u54C2\u54BD\u54AA\u54C1"],["aba1","\u54C4\u54C8\u54AF\u54AB\u54B1\u54BB\u54A9\u54A7\u54BF\u56FF\u5782\u578B\u57A0\u57A3\u57A2\u57CE\u57AE\u5793\u5955\u5951\u594F\u594E\u5950\u59DC\u59D8\u59FF\u59E3\u59E8\u5A03\u59E5\u59EA\u59DA\u59E6\u5A01\u59FB\u5B69\u5BA3\u5BA6\u5BA4\u5BA2\u5BA5\u5C01\u5C4E\u5C4F\u5C4D\u5C4B\u5CD9\u5CD2\u5DF7\u5E1D\u5E25\u5E1F\u5E7D\u5EA0\u5EA6\u5EFA\u5F08\u5F2D\u5F65\u5F88\u5F85\u5F8A\u5F8B\u5F87\u5F8C\u5F89\u6012\u601D\u6020\u6025\u600E\u6028\u604D\u6070\u6068\u6062\u6046\u6043\u606C\u606B\u606A\u6064\u6241\u62DC\u6316\u6309\u62FC\u62ED\u6301\u62EE\u62FD\u6307\u62F1\u62F7"],["ac40","\u62EF\u62EC\u62FE\u62F4\u6311\u6302\u653F\u6545\u65AB\u65BD\u65E2\u6625\u662D\u6620\u6627\u662F\u661F\u6628\u6631\u6624\u66F7\u67FF\u67D3\u67F1\u67D4\u67D0\u67EC\u67B6\u67AF\u67F5\u67E9\u67EF\u67C4\u67D1\u67B4\u67DA\u67E5\u67B8\u67CF\u67DE\u67F3\u67B0\u67D9\u67E2\u67DD\u67D2\u6B6A\u6B83\u6B86\u6BB5\u6BD2\u6BD7\u6C1F\u6CC9\u6D0B\u6D32\u6D2A\u6D41\u6D25\u6D0C\u6D31\u6D1E\u6D17"],["aca1","\u6D3B\u6D3D\u6D3E\u6D36\u6D1B\u6CF5\u6D39\u6D27\u6D38\u6D29\u6D2E\u6D35\u6D0E\u6D2B\u70AB\u70BA\u70B3\u70AC\u70AF\u70AD\u70B8\u70AE\u70A4\u7230\u7272\u726F\u7274\u72E9\u72E0\u72E1\u73B7\u73CA\u73BB\u73B2\u73CD\u73C0\u73B3\u751A\u752D\u754F\u754C\u754E\u754B\u75AB\u75A4\u75A5\u75A2\u75A3\u7678\u7686\u7687\u7688\u76C8\u76C6\u76C3\u76C5\u7701\u76F9\u76F8\u7709\u770B\u76FE\u76FC\u7707\u77DC\u7802\u7814\u780C\u780D\u7946\u7949\u7948\u7947\u79B9\u79BA\u79D1\u79D2\u79CB\u7A7F\u7A81\u7AFF\u7AFD\u7C7D\u7D02\u7D05\u7D00\u7D09\u7D07\u7D04\u7D06\u7F38\u7F8E\u7FBF\u8004"],["ad40","\u8010\u800D\u8011\u8036\u80D6\u80E5\u80DA\u80C3\u80C4\u80CC\u80E1\u80DB\u80CE\u80DE\u80E4\u80DD\u81F4\u8222\u82E7\u8303\u8305\u82E3\u82DB\u82E6\u8304\u82E5\u8302\u8309\u82D2\u82D7\u82F1\u8301\u82DC\u82D4\u82D1\u82DE\u82D3\u82DF\u82EF\u8306\u8650\u8679\u867B\u867A\u884D\u886B\u8981\u89D4\u8A08\u8A02\u8A03\u8C9E\u8CA0\u8D74\u8D73\u8DB4\u8ECD\u8ECC\u8FF0\u8FE6\u8FE2\u8FEA\u8FE5"],["ada1","\u8FED\u8FEB\u8FE4\u8FE8\u90CA\u90CE\u90C1\u90C3\u914B\u914A\u91CD\u9582\u9650\u964B\u964C\u964D\u9762\u9769\u97CB\u97ED\u97F3\u9801\u98A8\u98DB\u98DF\u9996\u9999\u4E58\u4EB3\u500C\u500D\u5023\u4FEF\u5026\u5025\u4FF8\u5029\u5016\u5006\u503C\u501F\u501A\u5012\u5011\u4FFA\u5000\u5014\u5028\u4FF1\u5021\u500B\u5019\u5018\u4FF3\u4FEE\u502D\u502A\u4FFE\u502B\u5009\u517C\u51A4\u51A5\u51A2\u51CD\u51CC\u51C6\u51CB\u5256\u525C\u5254\u525B\u525D\u532A\u537F\u539F\u539D\u53DF\u54E8\u5510\u5501\u5537\u54FC\u54E5\u54F2\u5506\u54FA\u5514\u54E9\u54ED\u54E1\u5509\u54EE\u54EA"],["ae40","\u54E6\u5527\u5507\u54FD\u550F\u5703\u5704\u57C2\u57D4\u57CB\u57C3\u5809\u590F\u5957\u5958\u595A\u5A11\u5A18\u5A1C\u5A1F\u5A1B\u5A13\u59EC\u5A20\u5A23\u5A29\u5A25\u5A0C\u5A09\u5B6B\u5C58\u5BB0\u5BB3\u5BB6\u5BB4\u5BAE\u5BB5\u5BB9\u5BB8\u5C04\u5C51\u5C55\u5C50\u5CED\u5CFD\u5CFB\u5CEA\u5CE8\u5CF0\u5CF6\u5D01\u5CF4\u5DEE\u5E2D\u5E2B\u5EAB\u5EAD\u5EA7\u5F31\u5F92\u5F91\u5F90\u6059"],["aea1","\u6063\u6065\u6050\u6055\u606D\u6069\u606F\u6084\u609F\u609A\u608D\u6094\u608C\u6085\u6096\u6247\u62F3\u6308\u62FF\u634E\u633E\u632F\u6355\u6342\u6346\u634F\u6349\u633A\u6350\u633D\u632A\u632B\u6328\u634D\u634C\u6548\u6549\u6599\u65C1\u65C5\u6642\u6649\u664F\u6643\u6652\u664C\u6645\u6641\u66F8\u6714\u6715\u6717\u6821\u6838\u6848\u6846\u6853\u6839\u6842\u6854\u6829\u68B3\u6817\u684C\u6851\u683D\u67F4\u6850\u6840\u683C\u6843\u682A\u6845\u6813\u6818\u6841\u6B8A\u6B89\u6BB7\u6C23\u6C27\u6C28\u6C26\u6C24\u6CF0\u6D6A\u6D95\u6D88\u6D87\u6D66\u6D78\u6D77\u6D59\u6D93"],["af40","\u6D6C\u6D89\u6D6E\u6D5A\u6D74\u6D69\u6D8C\u6D8A\u6D79\u6D85\u6D65\u6D94\u70CA\u70D8\u70E4\u70D9\u70C8\u70CF\u7239\u7279\u72FC\u72F9\u72FD\u72F8\u72F7\u7386\u73ED\u7409\u73EE\u73E0\u73EA\u73DE\u7554\u755D\u755C\u755A\u7559\u75BE\u75C5\u75C7\u75B2\u75B3\u75BD\u75BC\u75B9\u75C2\u75B8\u768B\u76B0\u76CA\u76CD\u76CE\u7729\u771F\u7720\u7728\u77E9\u7830\u7827\u7838\u781D\u7834\u7837"],["afa1","\u7825\u782D\u7820\u781F\u7832\u7955\u7950\u7960\u795F\u7956\u795E\u795D\u7957\u795A\u79E4\u79E3\u79E7\u79DF\u79E6\u79E9\u79D8\u7A84\u7A88\u7AD9\u7B06\u7B11\u7C89\u7D21\u7D17\u7D0B\u7D0A\u7D20\u7D22\u7D14\u7D10\u7D15\u7D1A\u7D1C\u7D0D\u7D19\u7D1B\u7F3A\u7F5F\u7F94\u7FC5\u7FC1\u8006\u8018\u8015\u8019\u8017\u803D\u803F\u80F1\u8102\u80F0\u8105\u80ED\u80F4\u8106\u80F8\u80F3\u8108\u80FD\u810A\u80FC\u80EF\u81ED\u81EC\u8200\u8210\u822A\u822B\u8228\u822C\u82BB\u832B\u8352\u8354\u834A\u8338\u8350\u8349\u8335\u8334\u834F\u8332\u8339\u8336\u8317\u8340\u8331\u8328\u8343"],["b040","\u8654\u868A\u86AA\u8693\u86A4\u86A9\u868C\u86A3\u869C\u8870\u8877\u8881\u8882\u887D\u8879\u8A18\u8A10\u8A0E\u8A0C\u8A15\u8A0A\u8A17\u8A13\u8A16\u8A0F\u8A11\u8C48\u8C7A\u8C79\u8CA1\u8CA2\u8D77\u8EAC\u8ED2\u8ED4\u8ECF\u8FB1\u9001\u9006\u8FF7\u9000\u8FFA\u8FF4\u9003\u8FFD\u9005\u8FF8\u9095\u90E1\u90DD\u90E2\u9152\u914D\u914C\u91D8\u91DD\u91D7\u91DC\u91D9\u9583\u9662\u9663\u9661"],["b0a1","\u965B\u965D\u9664\u9658\u965E\u96BB\u98E2\u99AC\u9AA8\u9AD8\u9B25\u9B32\u9B3C\u4E7E\u507A\u507D\u505C\u5047\u5043\u504C\u505A\u5049\u5065\u5076\u504E\u5055\u5075\u5074\u5077\u504F\u500F\u506F\u506D\u515C\u5195\u51F0\u526A\u526F\u52D2\u52D9\u52D8\u52D5\u5310\u530F\u5319\u533F\u5340\u533E\u53C3\u66FC\u5546\u556A\u5566\u5544\u555E\u5561\u5543\u554A\u5531\u5556\u554F\u5555\u552F\u5564\u5538\u552E\u555C\u552C\u5563\u5533\u5541\u5557\u5708\u570B\u5709\u57DF\u5805\u580A\u5806\u57E0\u57E4\u57FA\u5802\u5835\u57F7\u57F9\u5920\u5962\u5A36\u5A41\u5A49\u5A66\u5A6A\u5A40"],["b140","\u5A3C\u5A62\u5A5A\u5A46\u5A4A\u5B70\u5BC7\u5BC5\u5BC4\u5BC2\u5BBF\u5BC6\u5C09\u5C08\u5C07\u5C60\u5C5C\u5C5D\u5D07\u5D06\u5D0E\u5D1B\u5D16\u5D22\u5D11\u5D29\u5D14\u5D19\u5D24\u5D27\u5D17\u5DE2\u5E38\u5E36\u5E33\u5E37\u5EB7\u5EB8\u5EB6\u5EB5\u5EBE\u5F35\u5F37\u5F57\u5F6C\u5F69\u5F6B\u5F97\u5F99\u5F9E\u5F98\u5FA1\u5FA0\u5F9C\u607F\u60A3\u6089\u60A0\u60A8\u60CB\u60B4\u60E6\u60BD"],["b1a1","\u60C5\u60BB\u60B5\u60DC\u60BC\u60D8\u60D5\u60C6\u60DF\u60B8\u60DA\u60C7\u621A\u621B\u6248\u63A0\u63A7\u6372\u6396\u63A2\u63A5\u6377\u6367\u6398\u63AA\u6371\u63A9\u6389\u6383\u639B\u636B\u63A8\u6384\u6388\u6399\u63A1\u63AC\u6392\u638F\u6380\u637B\u6369\u6368\u637A\u655D\u6556\u6551\u6559\u6557\u555F\u654F\u6558\u6555\u6554\u659C\u659B\u65AC\u65CF\u65CB\u65CC\u65CE\u665D\u665A\u6664\u6668\u6666\u665E\u66F9\u52D7\u671B\u6881\u68AF\u68A2\u6893\u68B5\u687F\u6876\u68B1\u68A7\u6897\u68B0\u6883\u68C4\u68AD\u6886\u6885\u6894\u689D\u68A8\u689F\u68A1\u6882\u6B32\u6BBA"],["b240","\u6BEB\u6BEC\u6C2B\u6D8E\u6DBC\u6DF3\u6DD9\u6DB2\u6DE1\u6DCC\u6DE4\u6DFB\u6DFA\u6E05\u6DC7\u6DCB\u6DAF\u6DD1\u6DAE\u6DDE\u6DF9\u6DB8\u6DF7\u6DF5\u6DC5\u6DD2\u6E1A\u6DB5\u6DDA\u6DEB\u6DD8\u6DEA\u6DF1\u6DEE\u6DE8\u6DC6\u6DC4\u6DAA\u6DEC\u6DBF\u6DE6\u70F9\u7109\u710A\u70FD\u70EF\u723D\u727D\u7281\u731C\u731B\u7316\u7313\u7319\u7387\u7405\u740A\u7403\u7406\u73FE\u740D\u74E0\u74F6"],["b2a1","\u74F7\u751C\u7522\u7565\u7566\u7562\u7570\u758F\u75D4\u75D5\u75B5\u75CA\u75CD\u768E\u76D4\u76D2\u76DB\u7737\u773E\u773C\u7736\u7738\u773A\u786B\u7843\u784E\u7965\u7968\u796D\u79FB\u7A92\u7A95\u7B20\u7B28\u7B1B\u7B2C\u7B26\u7B19\u7B1E\u7B2E\u7C92\u7C97\u7C95\u7D46\u7D43\u7D71\u7D2E\u7D39\u7D3C\u7D40\u7D30\u7D33\u7D44\u7D2F\u7D42\u7D32\u7D31\u7F3D\u7F9E\u7F9A\u7FCC\u7FCE\u7FD2\u801C\u804A\u8046\u812F\u8116\u8123\u812B\u8129\u8130\u8124\u8202\u8235\u8237\u8236\u8239\u838E\u839E\u8398\u8378\u83A2\u8396\u83BD\u83AB\u8392\u838A\u8393\u8389\u83A0\u8377\u837B\u837C"],["b340","\u8386\u83A7\u8655\u5F6A\u86C7\u86C0\u86B6\u86C4\u86B5\u86C6\u86CB\u86B1\u86AF\u86C9\u8853\u889E\u8888\u88AB\u8892\u8896\u888D\u888B\u8993\u898F\u8A2A\u8A1D\u8A23\u8A25\u8A31\u8A2D\u8A1F\u8A1B\u8A22\u8C49\u8C5A\u8CA9\u8CAC\u8CAB\u8CA8\u8CAA\u8CA7\u8D67\u8D66\u8DBE\u8DBA\u8EDB\u8EDF\u9019\u900D\u901A\u9017\u9023\u901F\u901D\u9010\u9015\u901E\u9020\u900F\u9022\u9016\u901B\u9014"],["b3a1","\u90E8\u90ED\u90FD\u9157\u91CE\u91F5\u91E6\u91E3\u91E7\u91ED\u91E9\u9589\u966A\u9675\u9673\u9678\u9670\u9674\u9676\u9677\u966C\u96C0\u96EA\u96E9\u7AE0\u7ADF\u9802\u9803\u9B5A\u9CE5\u9E75\u9E7F\u9EA5\u9EBB\u50A2\u508D\u5085\u5099\u5091\u5080\u5096\u5098\u509A\u6700\u51F1\u5272\u5274\u5275\u5269\u52DE\u52DD\u52DB\u535A\u53A5\u557B\u5580\u55A7\u557C\u558A\u559D\u5598\u5582\u559C\u55AA\u5594\u5587\u558B\u5583\u55B3\u55AE\u559F\u553E\u55B2\u559A\u55BB\u55AC\u55B1\u557E\u5589\u55AB\u5599\u570D\u582F\u582A\u5834\u5824\u5830\u5831\u5821\u581D\u5820\u58F9\u58FA\u5960"],["b440","\u5A77\u5A9A\u5A7F\u5A92\u5A9B\u5AA7\u5B73\u5B71\u5BD2\u5BCC\u5BD3\u5BD0\u5C0A\u5C0B\u5C31\u5D4C\u5D50\u5D34\u5D47\u5DFD\u5E45\u5E3D\u5E40\u5E43\u5E7E\u5ECA\u5EC1\u5EC2\u5EC4\u5F3C\u5F6D\u5FA9\u5FAA\u5FA8\u60D1\u60E1\u60B2\u60B6\u60E0\u611C\u6123\u60FA\u6115\u60F0\u60FB\u60F4\u6168\u60F1\u610E\u60F6\u6109\u6100\u6112\u621F\u6249\u63A3\u638C\u63CF\u63C0\u63E9\u63C9\u63C6\u63CD"],["b4a1","\u63D2\u63E3\u63D0\u63E1\u63D6\u63ED\u63EE\u6376\u63F4\u63EA\u63DB\u6452\u63DA\u63F9\u655E\u6566\u6562\u6563\u6591\u6590\u65AF\u666E\u6670\u6674\u6676\u666F\u6691\u667A\u667E\u6677\u66FE\u66FF\u671F\u671D\u68FA\u68D5\u68E0\u68D8\u68D7\u6905\u68DF\u68F5\u68EE\u68E7\u68F9\u68D2\u68F2\u68E3\u68CB\u68CD\u690D\u6912\u690E\u68C9\u68DA\u696E\u68FB\u6B3E\u6B3A\u6B3D\u6B98\u6B96\u6BBC\u6BEF\u6C2E\u6C2F\u6C2C\u6E2F\u6E38\u6E54\u6E21\u6E32\u6E67\u6E4A\u6E20\u6E25\u6E23\u6E1B\u6E5B\u6E58\u6E24\u6E56\u6E6E\u6E2D\u6E26\u6E6F\u6E34\u6E4D\u6E3A\u6E2C\u6E43\u6E1D\u6E3E\u6ECB"],["b540","\u6E89\u6E19\u6E4E\u6E63\u6E44\u6E72\u6E69\u6E5F\u7119\u711A\u7126\u7130\u7121\u7136\u716E\u711C\u724C\u7284\u7280\u7336\u7325\u7334\u7329\u743A\u742A\u7433\u7422\u7425\u7435\u7436\u7434\u742F\u741B\u7426\u7428\u7525\u7526\u756B\u756A\u75E2\u75DB\u75E3\u75D9\u75D8\u75DE\u75E0\u767B\u767C\u7696\u7693\u76B4\u76DC\u774F\u77ED\u785D\u786C\u786F\u7A0D\u7A08\u7A0B\u7A05\u7A00\u7A98"],["b5a1","\u7A97\u7A96\u7AE5\u7AE3\u7B49\u7B56\u7B46\u7B50\u7B52\u7B54\u7B4D\u7B4B\u7B4F\u7B51\u7C9F\u7CA5\u7D5E\u7D50\u7D68\u7D55\u7D2B\u7D6E\u7D72\u7D61\u7D66\u7D62\u7D70\u7D73\u5584\u7FD4\u7FD5\u800B\u8052\u8085\u8155\u8154\u814B\u8151\u814E\u8139\u8146\u813E\u814C\u8153\u8174\u8212\u821C\u83E9\u8403\u83F8\u840D\u83E0\u83C5\u840B\u83C1\u83EF\u83F1\u83F4\u8457\u840A\u83F0\u840C\u83CC\u83FD\u83F2\u83CA\u8438\u840E\u8404\u83DC\u8407\u83D4\u83DF\u865B\u86DF\u86D9\u86ED\u86D4\u86DB\u86E4\u86D0\u86DE\u8857\u88C1\u88C2\u88B1\u8983\u8996\u8A3B\u8A60\u8A55\u8A5E\u8A3C\u8A41"],["b640","\u8A54\u8A5B\u8A50\u8A46\u8A34\u8A3A\u8A36\u8A56\u8C61\u8C82\u8CAF\u8CBC\u8CB3\u8CBD\u8CC1\u8CBB\u8CC0\u8CB4\u8CB7\u8CB6\u8CBF\u8CB8\u8D8A\u8D85\u8D81\u8DCE\u8DDD\u8DCB\u8DDA\u8DD1\u8DCC\u8DDB\u8DC6\u8EFB\u8EF8\u8EFC\u8F9C\u902E\u9035\u9031\u9038\u9032\u9036\u9102\u90F5\u9109\u90FE\u9163\u9165\u91CF\u9214\u9215\u9223\u9209\u921E\u920D\u9210\u9207\u9211\u9594\u958F\u958B\u9591"],["b6a1","\u9593\u9592\u958E\u968A\u968E\u968B\u967D\u9685\u9686\u968D\u9672\u9684\u96C1\u96C5\u96C4\u96C6\u96C7\u96EF\u96F2\u97CC\u9805\u9806\u9808\u98E7\u98EA\u98EF\u98E9\u98F2\u98ED\u99AE\u99AD\u9EC3\u9ECD\u9ED1\u4E82\u50AD\u50B5\u50B2\u50B3\u50C5\u50BE\u50AC\u50B7\u50BB\u50AF\u50C7\u527F\u5277\u527D\u52DF\u52E6\u52E4\u52E2\u52E3\u532F\u55DF\u55E8\u55D3\u55E6\u55CE\u55DC\u55C7\u55D1\u55E3\u55E4\u55EF\u55DA\u55E1\u55C5\u55C6\u55E5\u55C9\u5712\u5713\u585E\u5851\u5858\u5857\u585A\u5854\u586B\u584C\u586D\u584A\u5862\u5852\u584B\u5967\u5AC1\u5AC9\u5ACC\u5ABE\u5ABD\u5ABC"],["b740","\u5AB3\u5AC2\u5AB2\u5D69\u5D6F\u5E4C\u5E79\u5EC9\u5EC8\u5F12\u5F59\u5FAC\u5FAE\u611A\u610F\u6148\u611F\u60F3\u611B\u60F9\u6101\u6108\u614E\u614C\u6144\u614D\u613E\u6134\u6127\u610D\u6106\u6137\u6221\u6222\u6413\u643E\u641E\u642A\u642D\u643D\u642C\u640F\u641C\u6414\u640D\u6436\u6416\u6417\u6406\u656C\u659F\u65B0\u6697\u6689\u6687\u6688\u6696\u6684\u6698\u668D\u6703\u6994\u696D"],["b7a1","\u695A\u6977\u6960\u6954\u6975\u6930\u6982\u694A\u6968\u696B\u695E\u6953\u6979\u6986\u695D\u6963\u695B\u6B47\u6B72\u6BC0\u6BBF\u6BD3\u6BFD\u6EA2\u6EAF\u6ED3\u6EB6\u6EC2\u6E90\u6E9D\u6EC7\u6EC5\u6EA5\u6E98\u6EBC\u6EBA\u6EAB\u6ED1\u6E96\u6E9C\u6EC4\u6ED4\u6EAA\u6EA7\u6EB4\u714E\u7159\u7169\u7164\u7149\u7167\u715C\u716C\u7166\u714C\u7165\u715E\u7146\u7168\u7156\u723A\u7252\u7337\u7345\u733F\u733E\u746F\u745A\u7455\u745F\u745E\u7441\u743F\u7459\u745B\u745C\u7576\u7578\u7600\u75F0\u7601\u75F2\u75F1\u75FA\u75FF\u75F4\u75F3\u76DE\u76DF\u775B\u776B\u7766\u775E\u7763"],["b840","\u7779\u776A\u776C\u775C\u7765\u7768\u7762\u77EE\u788E\u78B0\u7897\u7898\u788C\u7889\u787C\u7891\u7893\u787F\u797A\u797F\u7981\u842C\u79BD\u7A1C\u7A1A\u7A20\u7A14\u7A1F\u7A1E\u7A9F\u7AA0\u7B77\u7BC0\u7B60\u7B6E\u7B67\u7CB1\u7CB3\u7CB5\u7D93\u7D79\u7D91\u7D81\u7D8F\u7D5B\u7F6E\u7F69\u7F6A\u7F72\u7FA9\u7FA8\u7FA4\u8056\u8058\u8086\u8084\u8171\u8170\u8178\u8165\u816E\u8173\u816B"],["b8a1","\u8179\u817A\u8166\u8205\u8247\u8482\u8477\u843D\u8431\u8475\u8466\u846B\u8449\u846C\u845B\u843C\u8435\u8461\u8463\u8469\u846D\u8446\u865E\u865C\u865F\u86F9\u8713\u8708\u8707\u8700\u86FE\u86FB\u8702\u8703\u8706\u870A\u8859\u88DF\u88D4\u88D9\u88DC\u88D8\u88DD\u88E1\u88CA\u88D5\u88D2\u899C\u89E3\u8A6B\u8A72\u8A73\u8A66\u8A69\u8A70\u8A87\u8A7C\u8A63\u8AA0\u8A71\u8A85\u8A6D\u8A62\u8A6E\u8A6C\u8A79\u8A7B\u8A3E\u8A68\u8C62\u8C8A\u8C89\u8CCA\u8CC7\u8CC8\u8CC4\u8CB2\u8CC3\u8CC2\u8CC5\u8DE1\u8DDF\u8DE8\u8DEF\u8DF3\u8DFA\u8DEA\u8DE4\u8DE6\u8EB2\u8F03\u8F09\u8EFE\u8F0A"],["b940","\u8F9F\u8FB2\u904B\u904A\u9053\u9042\u9054\u903C\u9055\u9050\u9047\u904F\u904E\u904D\u9051\u903E\u9041\u9112\u9117\u916C\u916A\u9169\u91C9\u9237\u9257\u9238\u923D\u9240\u923E\u925B\u924B\u9264\u9251\u9234\u9249\u924D\u9245\u9239\u923F\u925A\u9598\u9698\u9694\u9695\u96CD\u96CB\u96C9\u96CA\u96F7\u96FB\u96F9\u96F6\u9756\u9774\u9776\u9810\u9811\u9813\u980A\u9812\u980C\u98FC\u98F4"],["b9a1","\u98FD\u98FE\u99B3\u99B1\u99B4\u9AE1\u9CE9\u9E82\u9F0E\u9F13\u9F20\u50E7\u50EE\u50E5\u50D6\u50ED\u50DA\u50D5\u50CF\u50D1\u50F1\u50CE\u50E9\u5162\u51F3\u5283\u5282\u5331\u53AD\u55FE\u5600\u561B\u5617\u55FD\u5614\u5606\u5609\u560D\u560E\u55F7\u5616\u561F\u5608\u5610\u55F6\u5718\u5716\u5875\u587E\u5883\u5893\u588A\u5879\u5885\u587D\u58FD\u5925\u5922\u5924\u596A\u5969\u5AE1\u5AE6\u5AE9\u5AD7\u5AD6\u5AD8\u5AE3\u5B75\u5BDE\u5BE7\u5BE1\u5BE5\u5BE6\u5BE8\u5BE2\u5BE4\u5BDF\u5C0D\u5C62\u5D84\u5D87\u5E5B\u5E63\u5E55\u5E57\u5E54\u5ED3\u5ED6\u5F0A\u5F46\u5F70\u5FB9\u6147"],["ba40","\u613F\u614B\u6177\u6162\u6163\u615F\u615A\u6158\u6175\u622A\u6487\u6458\u6454\u64A4\u6478\u645F\u647A\u6451\u6467\u6434\u646D\u647B\u6572\u65A1\u65D7\u65D6\u66A2\u66A8\u669D\u699C\u69A8\u6995\u69C1\u69AE\u69D3\u69CB\u699B\u69B7\u69BB\u69AB\u69B4\u69D0\u69CD\u69AD\u69CC\u69A6\u69C3\u69A3\u6B49\u6B4C\u6C33\u6F33\u6F14\u6EFE\u6F13\u6EF4\u6F29\u6F3E\u6F20\u6F2C\u6F0F\u6F02\u6F22"],["baa1","\u6EFF\u6EEF\u6F06\u6F31\u6F38\u6F32\u6F23\u6F15\u6F2B\u6F2F\u6F88\u6F2A\u6EEC\u6F01\u6EF2\u6ECC\u6EF7\u7194\u7199\u717D\u718A\u7184\u7192\u723E\u7292\u7296\u7344\u7350\u7464\u7463\u746A\u7470\u746D\u7504\u7591\u7627\u760D\u760B\u7609\u7613\u76E1\u76E3\u7784\u777D\u777F\u7761\u78C1\u789F\u78A7\u78B3\u78A9\u78A3\u798E\u798F\u798D\u7A2E\u7A31\u7AAA\u7AA9\u7AED\u7AEF\u7BA1\u7B95\u7B8B\u7B75\u7B97\u7B9D\u7B94\u7B8F\u7BB8\u7B87\u7B84\u7CB9\u7CBD\u7CBE\u7DBB\u7DB0\u7D9C\u7DBD\u7DBE\u7DA0\u7DCA\u7DB4\u7DB2\u7DB1\u7DBA\u7DA2\u7DBF\u7DB5\u7DB8\u7DAD\u7DD2\u7DC7\u7DAC"],["bb40","\u7F70\u7FE0\u7FE1\u7FDF\u805E\u805A\u8087\u8150\u8180\u818F\u8188\u818A\u817F\u8182\u81E7\u81FA\u8207\u8214\u821E\u824B\u84C9\u84BF\u84C6\u84C4\u8499\u849E\u84B2\u849C\u84CB\u84B8\u84C0\u84D3\u8490\u84BC\u84D1\u84CA\u873F\u871C\u873B\u8722\u8725\u8734\u8718\u8755\u8737\u8729\u88F3\u8902\u88F4\u88F9\u88F8\u88FD\u88E8\u891A\u88EF\u8AA6\u8A8C\u8A9E\u8AA3\u8A8D\u8AA1\u8A93\u8AA4"],["bba1","\u8AAA\u8AA5\u8AA8\u8A98\u8A91\u8A9A\u8AA7\u8C6A\u8C8D\u8C8C\u8CD3\u8CD1\u8CD2\u8D6B\u8D99\u8D95\u8DFC\u8F14\u8F12\u8F15\u8F13\u8FA3\u9060\u9058\u905C\u9063\u9059\u905E\u9062\u905D\u905B\u9119\u9118\u911E\u9175\u9178\u9177\u9174\u9278\u9280\u9285\u9298\u9296\u927B\u9293\u929C\u92A8\u927C\u9291\u95A1\u95A8\u95A9\u95A3\u95A5\u95A4\u9699\u969C\u969B\u96CC\u96D2\u9700\u977C\u9785\u97F6\u9817\u9818\u98AF\u98B1\u9903\u9905\u990C\u9909\u99C1\u9AAF\u9AB0\u9AE6\u9B41\u9B42\u9CF4\u9CF6\u9CF3\u9EBC\u9F3B\u9F4A\u5104\u5100\u50FB\u50F5\u50F9\u5102\u5108\u5109\u5105\u51DC"],["bc40","\u5287\u5288\u5289\u528D\u528A\u52F0\u53B2\u562E\u563B\u5639\u5632\u563F\u5634\u5629\u5653\u564E\u5657\u5674\u5636\u562F\u5630\u5880\u589F\u589E\u58B3\u589C\u58AE\u58A9\u58A6\u596D\u5B09\u5AFB\u5B0B\u5AF5\u5B0C\u5B08\u5BEE\u5BEC\u5BE9\u5BEB\u5C64\u5C65\u5D9D\u5D94\u5E62\u5E5F\u5E61\u5EE2\u5EDA\u5EDF\u5EDD\u5EE3\u5EE0\u5F48\u5F71\u5FB7\u5FB5\u6176\u6167\u616E\u615D\u6155\u6182"],["bca1","\u617C\u6170\u616B\u617E\u61A7\u6190\u61AB\u618E\u61AC\u619A\u61A4\u6194\u61AE\u622E\u6469\u646F\u6479\u649E\u64B2\u6488\u6490\u64B0\u64A5\u6493\u6495\u64A9\u6492\u64AE\u64AD\u64AB\u649A\u64AC\u6499\u64A2\u64B3\u6575\u6577\u6578\u66AE\u66AB\u66B4\u66B1\u6A23\u6A1F\u69E8\u6A01\u6A1E\u6A19\u69FD\u6A21\u6A13\u6A0A\u69F3\u6A02\u6A05\u69ED\u6A11\u6B50\u6B4E\u6BA4\u6BC5\u6BC6\u6F3F\u6F7C\u6F84\u6F51\u6F66\u6F54\u6F86\u6F6D\u6F5B\u6F78\u6F6E\u6F8E\u6F7A\u6F70\u6F64\u6F97\u6F58\u6ED5\u6F6F\u6F60\u6F5F\u719F\u71AC\u71B1\u71A8\u7256\u729B\u734E\u7357\u7469\u748B\u7483"],["bd40","\u747E\u7480\u757F\u7620\u7629\u761F\u7624\u7626\u7621\u7622\u769A\u76BA\u76E4\u778E\u7787\u778C\u7791\u778B\u78CB\u78C5\u78BA\u78CA\u78BE\u78D5\u78BC\u78D0\u7A3F\u7A3C\u7A40\u7A3D\u7A37\u7A3B\u7AAF\u7AAE\u7BAD\u7BB1\u7BC4\u7BB4\u7BC6\u7BC7\u7BC1\u7BA0\u7BCC\u7CCA\u7DE0\u7DF4\u7DEF\u7DFB\u7DD8\u7DEC\u7DDD\u7DE8\u7DE3\u7DDA\u7DDE\u7DE9\u7D9E\u7DD9\u7DF2\u7DF9\u7F75\u7F77\u7FAF"],["bda1","\u7FE9\u8026\u819B\u819C\u819D\u81A0\u819A\u8198\u8517\u853D\u851A\u84EE\u852C\u852D\u8513\u8511\u8523\u8521\u8514\u84EC\u8525\u84FF\u8506\u8782\u8774\u8776\u8760\u8766\u8778\u8768\u8759\u8757\u874C\u8753\u885B\u885D\u8910\u8907\u8912\u8913\u8915\u890A\u8ABC\u8AD2\u8AC7\u8AC4\u8A95\u8ACB\u8AF8\u8AB2\u8AC9\u8AC2\u8ABF\u8AB0\u8AD6\u8ACD\u8AB6\u8AB9\u8ADB\u8C4C\u8C4E\u8C6C\u8CE0\u8CDE\u8CE6\u8CE4\u8CEC\u8CED\u8CE2\u8CE3\u8CDC\u8CEA\u8CE1\u8D6D\u8D9F\u8DA3\u8E2B\u8E10\u8E1D\u8E22\u8E0F\u8E29\u8E1F\u8E21\u8E1E\u8EBA\u8F1D\u8F1B\u8F1F\u8F29\u8F26\u8F2A\u8F1C\u8F1E"],["be40","\u8F25\u9069\u906E\u9068\u906D\u9077\u9130\u912D\u9127\u9131\u9187\u9189\u918B\u9183\u92C5\u92BB\u92B7\u92EA\u92AC\u92E4\u92C1\u92B3\u92BC\u92D2\u92C7\u92F0\u92B2\u95AD\u95B1\u9704\u9706\u9707\u9709\u9760\u978D\u978B\u978F\u9821\u982B\u981C\u98B3\u990A\u9913\u9912\u9918\u99DD\u99D0\u99DF\u99DB\u99D1\u99D5\u99D2\u99D9\u9AB7\u9AEE\u9AEF\u9B27\u9B45\u9B44\u9B77\u9B6F\u9D06\u9D09"],["bea1","\u9D03\u9EA9\u9EBE\u9ECE\u58A8\u9F52\u5112\u5118\u5114\u5110\u5115\u5180\u51AA\u51DD\u5291\u5293\u52F3\u5659\u566B\u5679\u5669\u5664\u5678\u566A\u5668\u5665\u5671\u566F\u566C\u5662\u5676\u58C1\u58BE\u58C7\u58C5\u596E\u5B1D\u5B34\u5B78\u5BF0\u5C0E\u5F4A\u61B2\u6191\u61A9\u618A\u61CD\u61B6\u61BE\u61CA\u61C8\u6230\u64C5\u64C1\u64CB\u64BB\u64BC\u64DA\u64C4\u64C7\u64C2\u64CD\u64BF\u64D2\u64D4\u64BE\u6574\u66C6\u66C9\u66B9\u66C4\u66C7\u66B8\u6A3D\u6A38\u6A3A\u6A59\u6A6B\u6A58\u6A39\u6A44\u6A62\u6A61\u6A4B\u6A47\u6A35\u6A5F\u6A48\u6B59\u6B77\u6C05\u6FC2\u6FB1\u6FA1"],["bf40","\u6FC3\u6FA4\u6FC1\u6FA7\u6FB3\u6FC0\u6FB9\u6FB6\u6FA6\u6FA0\u6FB4\u71BE\u71C9\u71D0\u71D2\u71C8\u71D5\u71B9\u71CE\u71D9\u71DC\u71C3\u71C4\u7368\u749C\u74A3\u7498\u749F\u749E\u74E2\u750C\u750D\u7634\u7638\u763A\u76E7\u76E5\u77A0\u779E\u779F\u77A5\u78E8\u78DA\u78EC\u78E7\u79A6\u7A4D\u7A4E\u7A46\u7A4C\u7A4B\u7ABA\u7BD9\u7C11\u7BC9\u7BE4\u7BDB\u7BE1\u7BE9\u7BE6\u7CD5\u7CD6\u7E0A"],["bfa1","\u7E11\u7E08\u7E1B\u7E23\u7E1E\u7E1D\u7E09\u7E10\u7F79\u7FB2\u7FF0\u7FF1\u7FEE\u8028\u81B3\u81A9\u81A8\u81FB\u8208\u8258\u8259\u854A\u8559\u8548\u8568\u8569\u8543\u8549\u856D\u856A\u855E\u8783\u879F\u879E\u87A2\u878D\u8861\u892A\u8932\u8925\u892B\u8921\u89AA\u89A6\u8AE6\u8AFA\u8AEB\u8AF1\u8B00\u8ADC\u8AE7\u8AEE\u8AFE\u8B01\u8B02\u8AF7\u8AED\u8AF3\u8AF6\u8AFC\u8C6B\u8C6D\u8C93\u8CF4\u8E44\u8E31\u8E34\u8E42\u8E39\u8E35\u8F3B\u8F2F\u8F38\u8F33\u8FA8\u8FA6\u9075\u9074\u9078\u9072\u907C\u907A\u9134\u9192\u9320\u9336\u92F8\u9333\u932F\u9322\u92FC\u932B\u9304\u931A"],["c040","\u9310\u9326\u9321\u9315\u932E\u9319\u95BB\u96A7\u96A8\u96AA\u96D5\u970E\u9711\u9716\u970D\u9713\u970F\u975B\u975C\u9766\u9798\u9830\u9838\u983B\u9837\u982D\u9839\u9824\u9910\u9928\u991E\u991B\u9921\u991A\u99ED\u99E2\u99F1\u9AB8\u9ABC\u9AFB\u9AED\u9B28\u9B91\u9D15\u9D23\u9D26\u9D28\u9D12\u9D1B\u9ED8\u9ED4\u9F8D\u9F9C\u512A\u511F\u5121\u5132\u52F5\u568E\u5680\u5690\u5685\u5687"],["c0a1","\u568F\u58D5\u58D3\u58D1\u58CE\u5B30\u5B2A\u5B24\u5B7A\u5C37\u5C68\u5DBC\u5DBA\u5DBD\u5DB8\u5E6B\u5F4C\u5FBD\u61C9\u61C2\u61C7\u61E6\u61CB\u6232\u6234\u64CE\u64CA\u64D8\u64E0\u64F0\u64E6\u64EC\u64F1\u64E2\u64ED\u6582\u6583\u66D9\u66D6\u6A80\u6A94\u6A84\u6AA2\u6A9C\u6ADB\u6AA3\u6A7E\u6A97\u6A90\u6AA0\u6B5C\u6BAE\u6BDA\u6C08\u6FD8\u6FF1\u6FDF\u6FE0\u6FDB\u6FE4\u6FEB\u6FEF\u6F80\u6FEC\u6FE1\u6FE9\u6FD5\u6FEE\u6FF0\u71E7\u71DF\u71EE\u71E6\u71E5\u71ED\u71EC\u71F4\u71E0\u7235\u7246\u7370\u7372\u74A9\u74B0\u74A6\u74A8\u7646\u7642\u764C\u76EA\u77B3\u77AA\u77B0\u77AC"],["c140","\u77A7\u77AD\u77EF\u78F7\u78FA\u78F4\u78EF\u7901\u79A7\u79AA\u7A57\u7ABF\u7C07\u7C0D\u7BFE\u7BF7\u7C0C\u7BE0\u7CE0\u7CDC\u7CDE\u7CE2\u7CDF\u7CD9\u7CDD\u7E2E\u7E3E\u7E46\u7E37\u7E32\u7E43\u7E2B\u7E3D\u7E31\u7E45\u7E41\u7E34\u7E39\u7E48\u7E35\u7E3F\u7E2F\u7F44\u7FF3\u7FFC\u8071\u8072\u8070\u806F\u8073\u81C6\u81C3\u81BA\u81C2\u81C0\u81BF\u81BD\u81C9\u81BE\u81E8\u8209\u8271\u85AA"],["c1a1","\u8584\u857E\u859C\u8591\u8594\u85AF\u859B\u8587\u85A8\u858A\u8667\u87C0\u87D1\u87B3\u87D2\u87C6\u87AB\u87BB\u87BA\u87C8\u87CB\u893B\u8936\u8944\u8938\u893D\u89AC\u8B0E\u8B17\u8B19\u8B1B\u8B0A\u8B20\u8B1D\u8B04\u8B10\u8C41\u8C3F\u8C73\u8CFA\u8CFD\u8CFC\u8CF8\u8CFB\u8DA8\u8E49\u8E4B\u8E48\u8E4A\u8F44\u8F3E\u8F42\u8F45\u8F3F\u907F\u907D\u9084\u9081\u9082\u9080\u9139\u91A3\u919E\u919C\u934D\u9382\u9328\u9375\u934A\u9365\u934B\u9318\u937E\u936C\u935B\u9370\u935A\u9354\u95CA\u95CB\u95CC\u95C8\u95C6\u96B1\u96B8\u96D6\u971C\u971E\u97A0\u97D3\u9846\u98B6\u9935\u9A01"],["c240","\u99FF\u9BAE\u9BAB\u9BAA\u9BAD\u9D3B\u9D3F\u9E8B\u9ECF\u9EDE\u9EDC\u9EDD\u9EDB\u9F3E\u9F4B\u53E2\u5695\u56AE\u58D9\u58D8\u5B38\u5F5D\u61E3\u6233\u64F4\u64F2\u64FE\u6506\u64FA\u64FB\u64F7\u65B7\u66DC\u6726\u6AB3\u6AAC\u6AC3\u6ABB\u6AB8\u6AC2\u6AAE\u6AAF\u6B5F\u6B78\u6BAF\u7009\u700B\u6FFE\u7006\u6FFA\u7011\u700F\u71FB\u71FC\u71FE\u71F8\u7377\u7375\u74A7\u74BF\u7515\u7656\u7658"],["c2a1","\u7652\u77BD\u77BF\u77BB\u77BC\u790E\u79AE\u7A61\u7A62\u7A60\u7AC4\u7AC5\u7C2B\u7C27\u7C2A\u7C1E\u7C23\u7C21\u7CE7\u7E54\u7E55\u7E5E\u7E5A\u7E61\u7E52\u7E59\u7F48\u7FF9\u7FFB\u8077\u8076\u81CD\u81CF\u820A\u85CF\u85A9\u85CD\u85D0\u85C9\u85B0\u85BA\u85B9\u85A6\u87EF\u87EC\u87F2\u87E0\u8986\u89B2\u89F4\u8B28\u8B39\u8B2C\u8B2B\u8C50\u8D05\u8E59\u8E63\u8E66\u8E64\u8E5F\u8E55\u8EC0\u8F49\u8F4D\u9087\u9083\u9088\u91AB\u91AC\u91D0\u9394\u938A\u9396\u93A2\u93B3\u93AE\u93AC\u93B0\u9398\u939A\u9397\u95D4\u95D6\u95D0\u95D5\u96E2\u96DC\u96D9\u96DB\u96DE\u9724\u97A3\u97A6"],["c340","\u97AD\u97F9\u984D\u984F\u984C\u984E\u9853\u98BA\u993E\u993F\u993D\u992E\u99A5\u9A0E\u9AC1\u9B03\u9B06\u9B4F\u9B4E\u9B4D\u9BCA\u9BC9\u9BFD\u9BC8\u9BC0\u9D51\u9D5D\u9D60\u9EE0\u9F15\u9F2C\u5133\u56A5\u58DE\u58DF\u58E2\u5BF5\u9F90\u5EEC\u61F2\u61F7\u61F6\u61F5\u6500\u650F\u66E0\u66DD\u6AE5\u6ADD\u6ADA\u6AD3\u701B\u701F\u7028\u701A\u701D\u7015\u7018\u7206\u720D\u7258\u72A2\u7378"],["c3a1","\u737A\u74BD\u74CA\u74E3\u7587\u7586\u765F\u7661\u77C7\u7919\u79B1\u7A6B\u7A69\u7C3E\u7C3F\u7C38\u7C3D\u7C37\u7C40\u7E6B\u7E6D\u7E79\u7E69\u7E6A\u7F85\u7E73\u7FB6\u7FB9\u7FB8\u81D8\u85E9\u85DD\u85EA\u85D5\u85E4\u85E5\u85F7\u87FB\u8805\u880D\u87F9\u87FE\u8960\u895F\u8956\u895E\u8B41\u8B5C\u8B58\u8B49\u8B5A\u8B4E\u8B4F\u8B46\u8B59\u8D08\u8D0A\u8E7C\u8E72\u8E87\u8E76\u8E6C\u8E7A\u8E74\u8F54\u8F4E\u8FAD\u908A\u908B\u91B1\u91AE\u93E1\u93D1\u93DF\u93C3\u93C8\u93DC\u93DD\u93D6\u93E2\u93CD\u93D8\u93E4\u93D7\u93E8\u95DC\u96B4\u96E3\u972A\u9727\u9761\u97DC\u97FB\u985E"],["c440","\u9858\u985B\u98BC\u9945\u9949\u9A16\u9A19\u9B0D\u9BE8\u9BE7\u9BD6\u9BDB\u9D89\u9D61\u9D72\u9D6A\u9D6C\u9E92\u9E97\u9E93\u9EB4\u52F8\u56A8\u56B7\u56B6\u56B4\u56BC\u58E4\u5B40\u5B43\u5B7D\u5BF6\u5DC9\u61F8\u61FA\u6518\u6514\u6519\u66E6\u6727\u6AEC\u703E\u7030\u7032\u7210\u737B\u74CF\u7662\u7665\u7926\u792A\u792C\u792B\u7AC7\u7AF6\u7C4C\u7C43\u7C4D\u7CEF\u7CF0\u8FAE\u7E7D\u7E7C"],["c4a1","\u7E82\u7F4C\u8000\u81DA\u8266\u85FB\u85F9\u8611\u85FA\u8606\u860B\u8607\u860A\u8814\u8815\u8964\u89BA\u89F8\u8B70\u8B6C\u8B66\u8B6F\u8B5F\u8B6B\u8D0F\u8D0D\u8E89\u8E81\u8E85\u8E82\u91B4\u91CB\u9418\u9403\u93FD\u95E1\u9730\u98C4\u9952\u9951\u99A8\u9A2B\u9A30\u9A37\u9A35\u9C13\u9C0D\u9E79\u9EB5\u9EE8\u9F2F\u9F5F\u9F63\u9F61\u5137\u5138\u56C1\u56C0\u56C2\u5914\u5C6C\u5DCD\u61FC\u61FE\u651D\u651C\u6595\u66E9\u6AFB\u6B04\u6AFA\u6BB2\u704C\u721B\u72A7\u74D6\u74D4\u7669\u77D3\u7C50\u7E8F\u7E8C\u7FBC\u8617\u862D\u861A\u8823\u8822\u8821\u881F\u896A\u896C\u89BD\u8B74"],["c540","\u8B77\u8B7D\u8D13\u8E8A\u8E8D\u8E8B\u8F5F\u8FAF\u91BA\u942E\u9433\u9435\u943A\u9438\u9432\u942B\u95E2\u9738\u9739\u9732\u97FF\u9867\u9865\u9957\u9A45\u9A43\u9A40\u9A3E\u9ACF\u9B54\u9B51\u9C2D\u9C25\u9DAF\u9DB4\u9DC2\u9DB8\u9E9D\u9EEF\u9F19\u9F5C\u9F66\u9F67\u513C\u513B\u56C8\u56CA\u56C9\u5B7F\u5DD4\u5DD2\u5F4E\u61FF\u6524\u6B0A\u6B61\u7051\u7058\u7380\u74E4\u758A\u766E\u766C"],["c5a1","\u79B3\u7C60\u7C5F\u807E\u807D\u81DF\u8972\u896F\u89FC\u8B80\u8D16\u8D17\u8E91\u8E93\u8F61\u9148\u9444\u9451\u9452\u973D\u973E\u97C3\u97C1\u986B\u9955\u9A55\u9A4D\u9AD2\u9B1A\u9C49\u9C31\u9C3E\u9C3B\u9DD3\u9DD7\u9F34\u9F6C\u9F6A\u9F94\u56CC\u5DD6\u6200\u6523\u652B\u652A\u66EC\u6B10\u74DA\u7ACA\u7C64\u7C63\u7C65\u7E93\u7E96\u7E94\u81E2\u8638\u863F\u8831\u8B8A\u9090\u908F\u9463\u9460\u9464\u9768\u986F\u995C\u9A5A\u9A5B\u9A57\u9AD3\u9AD4\u9AD1\u9C54\u9C57\u9C56\u9DE5\u9E9F\u9EF4\u56D1\u58E9\u652C\u705E\u7671\u7672\u77D7\u7F50\u7F88\u8836\u8839\u8862\u8B93\u8B92"],["c640","\u8B96\u8277\u8D1B\u91C0\u946A\u9742\u9748\u9744\u97C6\u9870\u9A5F\u9B22\u9B58\u9C5F\u9DF9\u9DFA\u9E7C\u9E7D\u9F07\u9F77\u9F72\u5EF3\u6B16\u7063\u7C6C\u7C6E\u883B\u89C0\u8EA1\u91C1\u9472\u9470\u9871\u995E\u9AD6\u9B23\u9ECC\u7064\u77DA\u8B9A\u9477\u97C9\u9A62\u9A65\u7E9C\u8B9C\u8EAA\u91C5\u947D\u947E\u947C\u9C77\u9C78\u9EF7\u8C54\u947F\u9E1A\u7228\u9A6A\u9B31\u9E1B\u9E1E\u7C72"],["c940","\u4E42\u4E5C\u51F5\u531A\u5382\u4E07\u4E0C\u4E47\u4E8D\u56D7\uFA0C\u5C6E\u5F73\u4E0F\u5187\u4E0E\u4E2E\u4E93\u4EC2\u4EC9\u4EC8\u5198\u52FC\u536C\u53B9\u5720\u5903\u592C\u5C10\u5DFF\u65E1\u6BB3\u6BCC\u6C14\u723F\u4E31\u4E3C\u4EE8\u4EDC\u4EE9\u4EE1\u4EDD\u4EDA\u520C\u531C\u534C\u5722\u5723\u5917\u592F\u5B81\u5B84\u5C12\u5C3B\u5C74\u5C73\u5E04\u5E80\u5E82\u5FC9\u6209\u6250\u6C15"],["c9a1","\u6C36\u6C43\u6C3F\u6C3B\u72AE\u72B0\u738A\u79B8\u808A\u961E\u4F0E\u4F18\u4F2C\u4EF5\u4F14\u4EF1\u4F00\u4EF7\u4F08\u4F1D\u4F02\u4F05\u4F22\u4F13\u4F04\u4EF4\u4F12\u51B1\u5213\u5209\u5210\u52A6\u5322\u531F\u534D\u538A\u5407\u56E1\u56DF\u572E\u572A\u5734\u593C\u5980\u597C\u5985\u597B\u597E\u5977\u597F\u5B56\u5C15\u5C25\u5C7C\u5C7A\u5C7B\u5C7E\u5DDF\u5E75\u5E84\u5F02\u5F1A\u5F74\u5FD5\u5FD4\u5FCF\u625C\u625E\u6264\u6261\u6266\u6262\u6259\u6260\u625A\u6265\u65EF\u65EE\u673E\u6739\u6738\u673B\u673A\u673F\u673C\u6733\u6C18\u6C46\u6C52\u6C5C\u6C4F\u6C4A\u6C54\u6C4B"],["ca40","\u6C4C\u7071\u725E\u72B4\u72B5\u738E\u752A\u767F\u7A75\u7F51\u8278\u827C\u8280\u827D\u827F\u864D\u897E\u9099\u9097\u9098\u909B\u9094\u9622\u9624\u9620\u9623\u4F56\u4F3B\u4F62\u4F49\u4F53\u4F64\u4F3E\u4F67\u4F52\u4F5F\u4F41\u4F58\u4F2D\u4F33\u4F3F\u4F61\u518F\u51B9\u521C\u521E\u5221\u52AD\u52AE\u5309\u5363\u5372\u538E\u538F\u5430\u5437\u542A\u5454\u5445\u5419\u541C\u5425\u5418"],["caa1","\u543D\u544F\u5441\u5428\u5424\u5447\u56EE\u56E7\u56E5\u5741\u5745\u574C\u5749\u574B\u5752\u5906\u5940\u59A6\u5998\u59A0\u5997\u598E\u59A2\u5990\u598F\u59A7\u59A1\u5B8E\u5B92\u5C28\u5C2A\u5C8D\u5C8F\u5C88\u5C8B\u5C89\u5C92\u5C8A\u5C86\u5C93\u5C95\u5DE0\u5E0A\u5E0E\u5E8B\u5E89\u5E8C\u5E88\u5E8D\u5F05\u5F1D\u5F78\u5F76\u5FD2\u5FD1\u5FD0\u5FED\u5FE8\u5FEE\u5FF3\u5FE1\u5FE4\u5FE3\u5FFA\u5FEF\u5FF7\u5FFB\u6000\u5FF4\u623A\u6283\u628C\u628E\u628F\u6294\u6287\u6271\u627B\u627A\u6270\u6281\u6288\u6277\u627D\u6272\u6274\u6537\u65F0\u65F4\u65F3\u65F2\u65F5\u6745\u6747"],["cb40","\u6759\u6755\u674C\u6748\u675D\u674D\u675A\u674B\u6BD0\u6C19\u6C1A\u6C78\u6C67\u6C6B\u6C84\u6C8B\u6C8F\u6C71\u6C6F\u6C69\u6C9A\u6C6D\u6C87\u6C95\u6C9C\u6C66\u6C73\u6C65\u6C7B\u6C8E\u7074\u707A\u7263\u72BF\u72BD\u72C3\u72C6\u72C1\u72BA\u72C5\u7395\u7397\u7393\u7394\u7392\u753A\u7539\u7594\u7595\u7681\u793D\u8034\u8095\u8099\u8090\u8092\u809C\u8290\u828F\u8285\u828E\u8291\u8293"],["cba1","\u828A\u8283\u8284\u8C78\u8FC9\u8FBF\u909F\u90A1\u90A5\u909E\u90A7\u90A0\u9630\u9628\u962F\u962D\u4E33\u4F98\u4F7C\u4F85\u4F7D\u4F80\u4F87\u4F76\u4F74\u4F89\u4F84\u4F77\u4F4C\u4F97\u4F6A\u4F9A\u4F79\u4F81\u4F78\u4F90\u4F9C\u4F94\u4F9E\u4F92\u4F82\u4F95\u4F6B\u4F6E\u519E\u51BC\u51BE\u5235\u5232\u5233\u5246\u5231\u52BC\u530A\u530B\u533C\u5392\u5394\u5487\u547F\u5481\u5491\u5482\u5488\u546B\u547A\u547E\u5465\u546C\u5474\u5466\u548D\u546F\u5461\u5460\u5498\u5463\u5467\u5464\u56F7\u56F9\u576F\u5772\u576D\u576B\u5771\u5770\u5776\u5780\u5775\u577B\u5773\u5774\u5762"],["cc40","\u5768\u577D\u590C\u5945\u59B5\u59BA\u59CF\u59CE\u59B2\u59CC\u59C1\u59B6\u59BC\u59C3\u59D6\u59B1\u59BD\u59C0\u59C8\u59B4\u59C7\u5B62\u5B65\u5B93\u5B95\u5C44\u5C47\u5CAE\u5CA4\u5CA0\u5CB5\u5CAF\u5CA8\u5CAC\u5C9F\u5CA3\u5CAD\u5CA2\u5CAA\u5CA7\u5C9D\u5CA5\u5CB6\u5CB0\u5CA6\u5E17\u5E14\u5E19\u5F28\u5F22\u5F23\u5F24\u5F54\u5F82\u5F7E\u5F7D\u5FDE\u5FE5\u602D\u6026\u6019\u6032\u600B"],["cca1","\u6034\u600A\u6017\u6033\u601A\u601E\u602C\u6022\u600D\u6010\u602E\u6013\u6011\u600C\u6009\u601C\u6214\u623D\u62AD\u62B4\u62D1\u62BE\u62AA\u62B6\u62CA\u62AE\u62B3\u62AF\u62BB\u62A9\u62B0\u62B8\u653D\u65A8\u65BB\u6609\u65FC\u6604\u6612\u6608\u65FB\u6603\u660B\u660D\u6605\u65FD\u6611\u6610\u66F6\u670A\u6785\u676C\u678E\u6792\u6776\u677B\u6798\u6786\u6784\u6774\u678D\u678C\u677A\u679F\u6791\u6799\u6783\u677D\u6781\u6778\u6779\u6794\u6B25\u6B80\u6B7E\u6BDE\u6C1D\u6C93\u6CEC\u6CEB\u6CEE\u6CD9\u6CB6\u6CD4\u6CAD\u6CE7\u6CB7\u6CD0\u6CC2\u6CBA\u6CC3\u6CC6\u6CED\u6CF2"],["cd40","\u6CD2\u6CDD\u6CB4\u6C8A\u6C9D\u6C80\u6CDE\u6CC0\u6D30\u6CCD\u6CC7\u6CB0\u6CF9\u6CCF\u6CE9\u6CD1\u7094\u7098\u7085\u7093\u7086\u7084\u7091\u7096\u7082\u709A\u7083\u726A\u72D6\u72CB\u72D8\u72C9\u72DC\u72D2\u72D4\u72DA\u72CC\u72D1\u73A4\u73A1\u73AD\u73A6\u73A2\u73A0\u73AC\u739D\u74DD\u74E8\u753F\u7540\u753E\u758C\u7598\u76AF\u76F3\u76F1\u76F0\u76F5\u77F8\u77FC\u77F9\u77FB\u77FA"],["cda1","\u77F7\u7942\u793F\u79C5\u7A78\u7A7B\u7AFB\u7C75\u7CFD\u8035\u808F\u80AE\u80A3\u80B8\u80B5\u80AD\u8220\u82A0\u82C0\u82AB\u829A\u8298\u829B\u82B5\u82A7\u82AE\u82BC\u829E\u82BA\u82B4\u82A8\u82A1\u82A9\u82C2\u82A4\u82C3\u82B6\u82A2\u8670\u866F\u866D\u866E\u8C56\u8FD2\u8FCB\u8FD3\u8FCD\u8FD6\u8FD5\u8FD7\u90B2\u90B4\u90AF\u90B3\u90B0\u9639\u963D\u963C\u963A\u9643\u4FCD\u4FC5\u4FD3\u4FB2\u4FC9\u4FCB\u4FC1\u4FD4\u4FDC\u4FD9\u4FBB\u4FB3\u4FDB\u4FC7\u4FD6\u4FBA\u4FC0\u4FB9\u4FEC\u5244\u5249\u52C0\u52C2\u533D\u537C\u5397\u5396\u5399\u5398\u54BA\u54A1\u54AD\u54A5\u54CF"],["ce40","\u54C3\u830D\u54B7\u54AE\u54D6\u54B6\u54C5\u54C6\u54A0\u5470\u54BC\u54A2\u54BE\u5472\u54DE\u54B0\u57B5\u579E\u579F\u57A4\u578C\u5797\u579D\u579B\u5794\u5798\u578F\u5799\u57A5\u579A\u5795\u58F4\u590D\u5953\u59E1\u59DE\u59EE\u5A00\u59F1\u59DD\u59FA\u59FD\u59FC\u59F6\u59E4\u59F2\u59F7\u59DB\u59E9\u59F3\u59F5\u59E0\u59FE\u59F4\u59ED\u5BA8\u5C4C\u5CD0\u5CD8\u5CCC\u5CD7\u5CCB\u5CDB"],["cea1","\u5CDE\u5CDA\u5CC9\u5CC7\u5CCA\u5CD6\u5CD3\u5CD4\u5CCF\u5CC8\u5CC6\u5CCE\u5CDF\u5CF8\u5DF9\u5E21\u5E22\u5E23\u5E20\u5E24\u5EB0\u5EA4\u5EA2\u5E9B\u5EA3\u5EA5\u5F07\u5F2E\u5F56\u5F86\u6037\u6039\u6054\u6072\u605E\u6045\u6053\u6047\u6049\u605B\u604C\u6040\u6042\u605F\u6024\u6044\u6058\u6066\u606E\u6242\u6243\u62CF\u630D\u630B\u62F5\u630E\u6303\u62EB\u62F9\u630F\u630C\u62F8\u62F6\u6300\u6313\u6314\u62FA\u6315\u62FB\u62F0\u6541\u6543\u65AA\u65BF\u6636\u6621\u6632\u6635\u661C\u6626\u6622\u6633\u662B\u663A\u661D\u6634\u6639\u662E\u670F\u6710\u67C1\u67F2\u67C8\u67BA"],["cf40","\u67DC\u67BB\u67F8\u67D8\u67C0\u67B7\u67C5\u67EB\u67E4\u67DF\u67B5\u67CD\u67B3\u67F7\u67F6\u67EE\u67E3\u67C2\u67B9\u67CE\u67E7\u67F0\u67B2\u67FC\u67C6\u67ED\u67CC\u67AE\u67E6\u67DB\u67FA\u67C9\u67CA\u67C3\u67EA\u67CB\u6B28\u6B82\u6B84\u6BB6\u6BD6\u6BD8\u6BE0\u6C20\u6C21\u6D28\u6D34\u6D2D\u6D1F\u6D3C\u6D3F\u6D12\u6D0A\u6CDA\u6D33\u6D04\u6D19\u6D3A\u6D1A\u6D11\u6D00\u6D1D\u6D42"],["cfa1","\u6D01\u6D18\u6D37\u6D03\u6D0F\u6D40\u6D07\u6D20\u6D2C\u6D08\u6D22\u6D09\u6D10\u70B7\u709F\u70BE\u70B1\u70B0\u70A1\u70B4\u70B5\u70A9\u7241\u7249\u724A\u726C\u7270\u7273\u726E\u72CA\u72E4\u72E8\u72EB\u72DF\u72EA\u72E6\u72E3\u7385\u73CC\u73C2\u73C8\u73C5\u73B9\u73B6\u73B5\u73B4\u73EB\u73BF\u73C7\u73BE\u73C3\u73C6\u73B8\u73CB\u74EC\u74EE\u752E\u7547\u7548\u75A7\u75AA\u7679\u76C4\u7708\u7703\u7704\u7705\u770A\u76F7\u76FB\u76FA\u77E7\u77E8\u7806\u7811\u7812\u7805\u7810\u780F\u780E\u7809\u7803\u7813\u794A\u794C\u794B\u7945\u7944\u79D5\u79CD\u79CF\u79D6\u79CE\u7A80"],["d040","\u7A7E\u7AD1\u7B00\u7B01\u7C7A\u7C78\u7C79\u7C7F\u7C80\u7C81\u7D03\u7D08\u7D01\u7F58\u7F91\u7F8D\u7FBE\u8007\u800E\u800F\u8014\u8037\u80D8\u80C7\u80E0\u80D1\u80C8\u80C2\u80D0\u80C5\u80E3\u80D9\u80DC\u80CA\u80D5\u80C9\u80CF\u80D7\u80E6\u80CD\u81FF\u8221\u8294\u82D9\u82FE\u82F9\u8307\u82E8\u8300\u82D5\u833A\u82EB\u82D6\u82F4\u82EC\u82E1\u82F2\u82F5\u830C\u82FB\u82F6\u82F0\u82EA"],["d0a1","\u82E4\u82E0\u82FA\u82F3\u82ED\u8677\u8674\u867C\u8673\u8841\u884E\u8867\u886A\u8869\u89D3\u8A04\u8A07\u8D72\u8FE3\u8FE1\u8FEE\u8FE0\u90F1\u90BD\u90BF\u90D5\u90C5\u90BE\u90C7\u90CB\u90C8\u91D4\u91D3\u9654\u964F\u9651\u9653\u964A\u964E\u501E\u5005\u5007\u5013\u5022\u5030\u501B\u4FF5\u4FF4\u5033\u5037\u502C\u4FF6\u4FF7\u5017\u501C\u5020\u5027\u5035\u502F\u5031\u500E\u515A\u5194\u5193\u51CA\u51C4\u51C5\u51C8\u51CE\u5261\u525A\u5252\u525E\u525F\u5255\u5262\u52CD\u530E\u539E\u5526\u54E2\u5517\u5512\u54E7\u54F3\u54E4\u551A\u54FF\u5504\u5508\u54EB\u5511\u5505\u54F1"],["d140","\u550A\u54FB\u54F7\u54F8\u54E0\u550E\u5503\u550B\u5701\u5702\u57CC\u5832\u57D5\u57D2\u57BA\u57C6\u57BD\u57BC\u57B8\u57B6\u57BF\u57C7\u57D0\u57B9\u57C1\u590E\u594A\u5A19\u5A16\u5A2D\u5A2E\u5A15\u5A0F\u5A17\u5A0A\u5A1E\u5A33\u5B6C\u5BA7\u5BAD\u5BAC\u5C03\u5C56\u5C54\u5CEC\u5CFF\u5CEE\u5CF1\u5CF7\u5D00\u5CF9\u5E29\u5E28\u5EA8\u5EAE\u5EAA\u5EAC\u5F33\u5F30\u5F67\u605D\u605A\u6067"],["d1a1","\u6041\u60A2\u6088\u6080\u6092\u6081\u609D\u6083\u6095\u609B\u6097\u6087\u609C\u608E\u6219\u6246\u62F2\u6310\u6356\u632C\u6344\u6345\u6336\u6343\u63E4\u6339\u634B\u634A\u633C\u6329\u6341\u6334\u6358\u6354\u6359\u632D\u6347\u6333\u635A\u6351\u6338\u6357\u6340\u6348\u654A\u6546\u65C6\u65C3\u65C4\u65C2\u664A\u665F\u6647\u6651\u6712\u6713\u681F\u681A\u6849\u6832\u6833\u683B\u684B\u684F\u6816\u6831\u681C\u6835\u682B\u682D\u682F\u684E\u6844\u6834\u681D\u6812\u6814\u6826\u6828\u682E\u684D\u683A\u6825\u6820\u6B2C\u6B2F\u6B2D\u6B31\u6B34\u6B6D\u8082\u6B88\u6BE6\u6BE4"],["d240","\u6BE8\u6BE3\u6BE2\u6BE7\u6C25\u6D7A\u6D63\u6D64\u6D76\u6D0D\u6D61\u6D92\u6D58\u6D62\u6D6D\u6D6F\u6D91\u6D8D\u6DEF\u6D7F\u6D86\u6D5E\u6D67\u6D60\u6D97\u6D70\u6D7C\u6D5F\u6D82\u6D98\u6D2F\u6D68\u6D8B\u6D7E\u6D80\u6D84\u6D16\u6D83\u6D7B\u6D7D\u6D75\u6D90\u70DC\u70D3\u70D1\u70DD\u70CB\u7F39\u70E2\u70D7\u70D2\u70DE\u70E0\u70D4\u70CD\u70C5\u70C6\u70C7\u70DA\u70CE\u70E1\u7242\u7278"],["d2a1","\u7277\u7276\u7300\u72FA\u72F4\u72FE\u72F6\u72F3\u72FB\u7301\u73D3\u73D9\u73E5\u73D6\u73BC\u73E7\u73E3\u73E9\u73DC\u73D2\u73DB\u73D4\u73DD\u73DA\u73D7\u73D8\u73E8\u74DE\u74DF\u74F4\u74F5\u7521\u755B\u755F\u75B0\u75C1\u75BB\u75C4\u75C0\u75BF\u75B6\u75BA\u768A\u76C9\u771D\u771B\u7710\u7713\u7712\u7723\u7711\u7715\u7719\u771A\u7722\u7727\u7823\u782C\u7822\u7835\u782F\u7828\u782E\u782B\u7821\u7829\u7833\u782A\u7831\u7954\u795B\u794F\u795C\u7953\u7952\u7951\u79EB\u79EC\u79E0\u79EE\u79ED\u79EA\u79DC\u79DE\u79DD\u7A86\u7A89\u7A85\u7A8B\u7A8C\u7A8A\u7A87\u7AD8\u7B10"],["d340","\u7B04\u7B13\u7B05\u7B0F\u7B08\u7B0A\u7B0E\u7B09\u7B12\u7C84\u7C91\u7C8A\u7C8C\u7C88\u7C8D\u7C85\u7D1E\u7D1D\u7D11\u7D0E\u7D18\u7D16\u7D13\u7D1F\u7D12\u7D0F\u7D0C\u7F5C\u7F61\u7F5E\u7F60\u7F5D\u7F5B\u7F96\u7F92\u7FC3\u7FC2\u7FC0\u8016\u803E\u8039\u80FA\u80F2\u80F9\u80F5\u8101\u80FB\u8100\u8201\u822F\u8225\u8333\u832D\u8344\u8319\u8351\u8325\u8356\u833F\u8341\u8326\u831C\u8322"],["d3a1","\u8342\u834E\u831B\u832A\u8308\u833C\u834D\u8316\u8324\u8320\u8337\u832F\u8329\u8347\u8345\u834C\u8353\u831E\u832C\u834B\u8327\u8348\u8653\u8652\u86A2\u86A8\u8696\u868D\u8691\u869E\u8687\u8697\u8686\u868B\u869A\u8685\u86A5\u8699\u86A1\u86A7\u8695\u8698\u868E\u869D\u8690\u8694\u8843\u8844\u886D\u8875\u8876\u8872\u8880\u8871\u887F\u886F\u8883\u887E\u8874\u887C\u8A12\u8C47\u8C57\u8C7B\u8CA4\u8CA3\u8D76\u8D78\u8DB5\u8DB7\u8DB6\u8ED1\u8ED3\u8FFE\u8FF5\u9002\u8FFF\u8FFB\u9004\u8FFC\u8FF6\u90D6\u90E0\u90D9\u90DA\u90E3\u90DF\u90E5\u90D8\u90DB\u90D7\u90DC\u90E4\u9150"],["d440","\u914E\u914F\u91D5\u91E2\u91DA\u965C\u965F\u96BC\u98E3\u9ADF\u9B2F\u4E7F\u5070\u506A\u5061\u505E\u5060\u5053\u504B\u505D\u5072\u5048\u504D\u5041\u505B\u504A\u5062\u5015\u5045\u505F\u5069\u506B\u5063\u5064\u5046\u5040\u506E\u5073\u5057\u5051\u51D0\u526B\u526D\u526C\u526E\u52D6\u52D3\u532D\u539C\u5575\u5576\u553C\u554D\u5550\u5534\u552A\u5551\u5562\u5536\u5535\u5530\u5552\u5545"],["d4a1","\u550C\u5532\u5565\u554E\u5539\u5548\u552D\u553B\u5540\u554B\u570A\u5707\u57FB\u5814\u57E2\u57F6\u57DC\u57F4\u5800\u57ED\u57FD\u5808\u57F8\u580B\u57F3\u57CF\u5807\u57EE\u57E3\u57F2\u57E5\u57EC\u57E1\u580E\u57FC\u5810\u57E7\u5801\u580C\u57F1\u57E9\u57F0\u580D\u5804\u595C\u5A60\u5A58\u5A55\u5A67\u5A5E\u5A38\u5A35\u5A6D\u5A50\u5A5F\u5A65\u5A6C\u5A53\u5A64\u5A57\u5A43\u5A5D\u5A52\u5A44\u5A5B\u5A48\u5A8E\u5A3E\u5A4D\u5A39\u5A4C\u5A70\u5A69\u5A47\u5A51\u5A56\u5A42\u5A5C\u5B72\u5B6E\u5BC1\u5BC0\u5C59\u5D1E\u5D0B\u5D1D\u5D1A\u5D20\u5D0C\u5D28\u5D0D\u5D26\u5D25\u5D0F"],["d540","\u5D30\u5D12\u5D23\u5D1F\u5D2E\u5E3E\u5E34\u5EB1\u5EB4\u5EB9\u5EB2\u5EB3\u5F36\u5F38\u5F9B\u5F96\u5F9F\u608A\u6090\u6086\u60BE\u60B0\u60BA\u60D3\u60D4\u60CF\u60E4\u60D9\u60DD\u60C8\u60B1\u60DB\u60B7\u60CA\u60BF\u60C3\u60CD\u60C0\u6332\u6365\u638A\u6382\u637D\u63BD\u639E\u63AD\u639D\u6397\u63AB\u638E\u636F\u6387\u6390\u636E\u63AF\u6375\u639C\u636D\u63AE\u637C\u63A4\u633B\u639F"],["d5a1","\u6378\u6385\u6381\u6391\u638D\u6370\u6553\u65CD\u6665\u6661\u665B\u6659\u665C\u6662\u6718\u6879\u6887\u6890\u689C\u686D\u686E\u68AE\u68AB\u6956\u686F\u68A3\u68AC\u68A9\u6875\u6874\u68B2\u688F\u6877\u6892\u687C\u686B\u6872\u68AA\u6880\u6871\u687E\u689B\u6896\u688B\u68A0\u6889\u68A4\u6878\u687B\u6891\u688C\u688A\u687D\u6B36\u6B33\u6B37\u6B38\u6B91\u6B8F\u6B8D\u6B8E\u6B8C\u6C2A\u6DC0\u6DAB\u6DB4\u6DB3\u6E74\u6DAC\u6DE9\u6DE2\u6DB7\u6DF6\u6DD4\u6E00\u6DC8\u6DE0\u6DDF\u6DD6\u6DBE\u6DE5\u6DDC\u6DDD\u6DDB\u6DF4\u6DCA\u6DBD\u6DED\u6DF0\u6DBA\u6DD5\u6DC2\u6DCF\u6DC9"],["d640","\u6DD0\u6DF2\u6DD3\u6DFD\u6DD7\u6DCD\u6DE3\u6DBB\u70FA\u710D\u70F7\u7117\u70F4\u710C\u70F0\u7104\u70F3\u7110\u70FC\u70FF\u7106\u7113\u7100\u70F8\u70F6\u710B\u7102\u710E\u727E\u727B\u727C\u727F\u731D\u7317\u7307\u7311\u7318\u730A\u7308\u72FF\u730F\u731E\u7388\u73F6\u73F8\u73F5\u7404\u7401\u73FD\u7407\u7400\u73FA\u73FC\u73FF\u740C\u740B\u73F4\u7408\u7564\u7563\u75CE\u75D2\u75CF"],["d6a1","\u75CB\u75CC\u75D1\u75D0\u768F\u7689\u76D3\u7739\u772F\u772D\u7731\u7732\u7734\u7733\u773D\u7725\u773B\u7735\u7848\u7852\u7849\u784D\u784A\u784C\u7826\u7845\u7850\u7964\u7967\u7969\u796A\u7963\u796B\u7961\u79BB\u79FA\u79F8\u79F6\u79F7\u7A8F\u7A94\u7A90\u7B35\u7B47\u7B34\u7B25\u7B30\u7B22\u7B24\u7B33\u7B18\u7B2A\u7B1D\u7B31\u7B2B\u7B2D\u7B2F\u7B32\u7B38\u7B1A\u7B23\u7C94\u7C98\u7C96\u7CA3\u7D35\u7D3D\u7D38\u7D36\u7D3A\u7D45\u7D2C\u7D29\u7D41\u7D47\u7D3E\u7D3F\u7D4A\u7D3B\u7D28\u7F63\u7F95\u7F9C\u7F9D\u7F9B\u7FCA\u7FCB\u7FCD\u7FD0\u7FD1\u7FC7\u7FCF\u7FC9\u801F"],["d740","\u801E\u801B\u8047\u8043\u8048\u8118\u8125\u8119\u811B\u812D\u811F\u812C\u811E\u8121\u8115\u8127\u811D\u8122\u8211\u8238\u8233\u823A\u8234\u8232\u8274\u8390\u83A3\u83A8\u838D\u837A\u8373\u83A4\u8374\u838F\u8381\u8395\u8399\u8375\u8394\u83A9\u837D\u8383\u838C\u839D\u839B\u83AA\u838B\u837E\u83A5\u83AF\u8388\u8397\u83B0\u837F\u83A6\u8387\u83AE\u8376\u839A\u8659\u8656\u86BF\u86B7"],["d7a1","\u86C2\u86C1\u86C5\u86BA\u86B0\u86C8\u86B9\u86B3\u86B8\u86CC\u86B4\u86BB\u86BC\u86C3\u86BD\u86BE\u8852\u8889\u8895\u88A8\u88A2\u88AA\u889A\u8891\u88A1\u889F\u8898\u88A7\u8899\u889B\u8897\u88A4\u88AC\u888C\u8893\u888E\u8982\u89D6\u89D9\u89D5\u8A30\u8A27\u8A2C\u8A1E\u8C39\u8C3B\u8C5C\u8C5D\u8C7D\u8CA5\u8D7D\u8D7B\u8D79\u8DBC\u8DC2\u8DB9\u8DBF\u8DC1\u8ED8\u8EDE\u8EDD\u8EDC\u8ED7\u8EE0\u8EE1\u9024\u900B\u9011\u901C\u900C\u9021\u90EF\u90EA\u90F0\u90F4\u90F2\u90F3\u90D4\u90EB\u90EC\u90E9\u9156\u9158\u915A\u9153\u9155\u91EC\u91F4\u91F1\u91F3\u91F8\u91E4\u91F9\u91EA"],["d840","\u91EB\u91F7\u91E8\u91EE\u957A\u9586\u9588\u967C\u966D\u966B\u9671\u966F\u96BF\u976A\u9804\u98E5\u9997\u509B\u5095\u5094\u509E\u508B\u50A3\u5083\u508C\u508E\u509D\u5068\u509C\u5092\u5082\u5087\u515F\u51D4\u5312\u5311\u53A4\u53A7\u5591\u55A8\u55A5\u55AD\u5577\u5645\u55A2\u5593\u5588\u558F\u55B5\u5581\u55A3\u5592\u55A4\u557D\u558C\u55A6\u557F\u5595\u55A1\u558E\u570C\u5829\u5837"],["d8a1","\u5819\u581E\u5827\u5823\u5828\u57F5\u5848\u5825\u581C\u581B\u5833\u583F\u5836\u582E\u5839\u5838\u582D\u582C\u583B\u5961\u5AAF\u5A94\u5A9F\u5A7A\u5AA2\u5A9E\u5A78\u5AA6\u5A7C\u5AA5\u5AAC\u5A95\u5AAE\u5A37\u5A84\u5A8A\u5A97\u5A83\u5A8B\u5AA9\u5A7B\u5A7D\u5A8C\u5A9C\u5A8F\u5A93\u5A9D\u5BEA\u5BCD\u5BCB\u5BD4\u5BD1\u5BCA\u5BCE\u5C0C\u5C30\u5D37\u5D43\u5D6B\u5D41\u5D4B\u5D3F\u5D35\u5D51\u5D4E\u5D55\u5D33\u5D3A\u5D52\u5D3D\u5D31\u5D59\u5D42\u5D39\u5D49\u5D38\u5D3C\u5D32\u5D36\u5D40\u5D45\u5E44\u5E41\u5F58\u5FA6\u5FA5\u5FAB\u60C9\u60B9\u60CC\u60E2\u60CE\u60C4\u6114"],["d940","\u60F2\u610A\u6116\u6105\u60F5\u6113\u60F8\u60FC\u60FE\u60C1\u6103\u6118\u611D\u6110\u60FF\u6104\u610B\u624A\u6394\u63B1\u63B0\u63CE\u63E5\u63E8\u63EF\u63C3\u649D\u63F3\u63CA\u63E0\u63F6\u63D5\u63F2\u63F5\u6461\u63DF\u63BE\u63DD\u63DC\u63C4\u63D8\u63D3\u63C2\u63C7\u63CC\u63CB\u63C8\u63F0\u63D7\u63D9\u6532\u6567\u656A\u6564\u655C\u6568\u6565\u658C\u659D\u659E\u65AE\u65D0\u65D2"],["d9a1","\u667C\u666C\u667B\u6680\u6671\u6679\u666A\u6672\u6701\u690C\u68D3\u6904\u68DC\u692A\u68EC\u68EA\u68F1\u690F\u68D6\u68F7\u68EB\u68E4\u68F6\u6913\u6910\u68F3\u68E1\u6907\u68CC\u6908\u6970\u68B4\u6911\u68EF\u68C6\u6914\u68F8\u68D0\u68FD\u68FC\u68E8\u690B\u690A\u6917\u68CE\u68C8\u68DD\u68DE\u68E6\u68F4\u68D1\u6906\u68D4\u68E9\u6915\u6925\u68C7\u6B39\u6B3B\u6B3F\u6B3C\u6B94\u6B97\u6B99\u6B95\u6BBD\u6BF0\u6BF2\u6BF3\u6C30\u6DFC\u6E46\u6E47\u6E1F\u6E49\u6E88\u6E3C\u6E3D\u6E45\u6E62\u6E2B\u6E3F\u6E41\u6E5D\u6E73\u6E1C\u6E33\u6E4B\u6E40\u6E51\u6E3B\u6E03\u6E2E\u6E5E"],["da40","\u6E68\u6E5C\u6E61\u6E31\u6E28\u6E60\u6E71\u6E6B\u6E39\u6E22\u6E30\u6E53\u6E65\u6E27\u6E78\u6E64\u6E77\u6E55\u6E79\u6E52\u6E66\u6E35\u6E36\u6E5A\u7120\u711E\u712F\u70FB\u712E\u7131\u7123\u7125\u7122\u7132\u711F\u7128\u713A\u711B\u724B\u725A\u7288\u7289\u7286\u7285\u728B\u7312\u730B\u7330\u7322\u7331\u7333\u7327\u7332\u732D\u7326\u7323\u7335\u730C\u742E\u742C\u7430\u742B\u7416"],["daa1","\u741A\u7421\u742D\u7431\u7424\u7423\u741D\u7429\u7420\u7432\u74FB\u752F\u756F\u756C\u75E7\u75DA\u75E1\u75E6\u75DD\u75DF\u75E4\u75D7\u7695\u7692\u76DA\u7746\u7747\u7744\u774D\u7745\u774A\u774E\u774B\u774C\u77DE\u77EC\u7860\u7864\u7865\u785C\u786D\u7871\u786A\u786E\u7870\u7869\u7868\u785E\u7862\u7974\u7973\u7972\u7970\u7A02\u7A0A\u7A03\u7A0C\u7A04\u7A99\u7AE6\u7AE4\u7B4A\u7B3B\u7B44\u7B48\u7B4C\u7B4E\u7B40\u7B58\u7B45\u7CA2\u7C9E\u7CA8\u7CA1\u7D58\u7D6F\u7D63\u7D53\u7D56\u7D67\u7D6A\u7D4F\u7D6D\u7D5C\u7D6B\u7D52\u7D54\u7D69\u7D51\u7D5F\u7D4E\u7F3E\u7F3F\u7F65"],["db40","\u7F66\u7FA2\u7FA0\u7FA1\u7FD7\u8051\u804F\u8050\u80FE\u80D4\u8143\u814A\u8152\u814F\u8147\u813D\u814D\u813A\u81E6\u81EE\u81F7\u81F8\u81F9\u8204\u823C\u823D\u823F\u8275\u833B\u83CF\u83F9\u8423\u83C0\u83E8\u8412\u83E7\u83E4\u83FC\u83F6\u8410\u83C6\u83C8\u83EB\u83E3\u83BF\u8401\u83DD\u83E5\u83D8\u83FF\u83E1\u83CB\u83CE\u83D6\u83F5\u83C9\u8409\u840F\u83DE\u8411\u8406\u83C2\u83F3"],["dba1","\u83D5\u83FA\u83C7\u83D1\u83EA\u8413\u83C3\u83EC\u83EE\u83C4\u83FB\u83D7\u83E2\u841B\u83DB\u83FE\u86D8\u86E2\u86E6\u86D3\u86E3\u86DA\u86EA\u86DD\u86EB\u86DC\u86EC\u86E9\u86D7\u86E8\u86D1\u8848\u8856\u8855\u88BA\u88D7\u88B9\u88B8\u88C0\u88BE\u88B6\u88BC\u88B7\u88BD\u88B2\u8901\u88C9\u8995\u8998\u8997\u89DD\u89DA\u89DB\u8A4E\u8A4D\u8A39\u8A59\u8A40\u8A57\u8A58\u8A44\u8A45\u8A52\u8A48\u8A51\u8A4A\u8A4C\u8A4F\u8C5F\u8C81\u8C80\u8CBA\u8CBE\u8CB0\u8CB9\u8CB5\u8D84\u8D80\u8D89\u8DD8\u8DD3\u8DCD\u8DC7\u8DD6\u8DDC\u8DCF\u8DD5\u8DD9\u8DC8\u8DD7\u8DC5\u8EEF\u8EF7\u8EFA"],["dc40","\u8EF9\u8EE6\u8EEE\u8EE5\u8EF5\u8EE7\u8EE8\u8EF6\u8EEB\u8EF1\u8EEC\u8EF4\u8EE9\u902D\u9034\u902F\u9106\u912C\u9104\u90FF\u90FC\u9108\u90F9\u90FB\u9101\u9100\u9107\u9105\u9103\u9161\u9164\u915F\u9162\u9160\u9201\u920A\u9225\u9203\u921A\u9226\u920F\u920C\u9200\u9212\u91FF\u91FD\u9206\u9204\u9227\u9202\u921C\u9224\u9219\u9217\u9205\u9216\u957B\u958D\u958C\u9590\u9687\u967E\u9688"],["dca1","\u9689\u9683\u9680\u96C2\u96C8\u96C3\u96F1\u96F0\u976C\u9770\u976E\u9807\u98A9\u98EB\u9CE6\u9EF9\u4E83\u4E84\u4EB6\u50BD\u50BF\u50C6\u50AE\u50C4\u50CA\u50B4\u50C8\u50C2\u50B0\u50C1\u50BA\u50B1\u50CB\u50C9\u50B6\u50B8\u51D7\u527A\u5278\u527B\u527C\u55C3\u55DB\u55CC\u55D0\u55CB\u55CA\u55DD\u55C0\u55D4\u55C4\u55E9\u55BF\u55D2\u558D\u55CF\u55D5\u55E2\u55D6\u55C8\u55F2\u55CD\u55D9\u55C2\u5714\u5853\u5868\u5864\u584F\u584D\u5849\u586F\u5855\u584E\u585D\u5859\u5865\u585B\u583D\u5863\u5871\u58FC\u5AC7\u5AC4\u5ACB\u5ABA\u5AB8\u5AB1\u5AB5\u5AB0\u5ABF\u5AC8\u5ABB\u5AC6"],["dd40","\u5AB7\u5AC0\u5ACA\u5AB4\u5AB6\u5ACD\u5AB9\u5A90\u5BD6\u5BD8\u5BD9\u5C1F\u5C33\u5D71\u5D63\u5D4A\u5D65\u5D72\u5D6C\u5D5E\u5D68\u5D67\u5D62\u5DF0\u5E4F\u5E4E\u5E4A\u5E4D\u5E4B\u5EC5\u5ECC\u5EC6\u5ECB\u5EC7\u5F40\u5FAF\u5FAD\u60F7\u6149\u614A\u612B\u6145\u6136\u6132\u612E\u6146\u612F\u614F\u6129\u6140\u6220\u9168\u6223\u6225\u6224\u63C5\u63F1\u63EB\u6410\u6412\u6409\u6420\u6424"],["dda1","\u6433\u6443\u641F\u6415\u6418\u6439\u6437\u6422\u6423\u640C\u6426\u6430\u6428\u6441\u6435\u642F\u640A\u641A\u6440\u6425\u6427\u640B\u63E7\u641B\u642E\u6421\u640E\u656F\u6592\u65D3\u6686\u668C\u6695\u6690\u668B\u668A\u6699\u6694\u6678\u6720\u6966\u695F\u6938\u694E\u6962\u6971\u693F\u6945\u696A\u6939\u6942\u6957\u6959\u697A\u6948\u6949\u6935\u696C\u6933\u693D\u6965\u68F0\u6978\u6934\u6969\u6940\u696F\u6944\u6976\u6958\u6941\u6974\u694C\u693B\u694B\u6937\u695C\u694F\u6951\u6932\u6952\u692F\u697B\u693C\u6B46\u6B45\u6B43\u6B42\u6B48\u6B41\u6B9B\uFA0D\u6BFB\u6BFC"],["de40","\u6BF9\u6BF7\u6BF8\u6E9B\u6ED6\u6EC8\u6E8F\u6EC0\u6E9F\u6E93\u6E94\u6EA0\u6EB1\u6EB9\u6EC6\u6ED2\u6EBD\u6EC1\u6E9E\u6EC9\u6EB7\u6EB0\u6ECD\u6EA6\u6ECF\u6EB2\u6EBE\u6EC3\u6EDC\u6ED8\u6E99\u6E92\u6E8E\u6E8D\u6EA4\u6EA1\u6EBF\u6EB3\u6ED0\u6ECA\u6E97\u6EAE\u6EA3\u7147\u7154\u7152\u7163\u7160\u7141\u715D\u7162\u7172\u7178\u716A\u7161\u7142\u7158\u7143\u714B\u7170\u715F\u7150\u7153"],["dea1","\u7144\u714D\u715A\u724F\u728D\u728C\u7291\u7290\u728E\u733C\u7342\u733B\u733A\u7340\u734A\u7349\u7444\u744A\u744B\u7452\u7451\u7457\u7440\u744F\u7450\u744E\u7442\u7446\u744D\u7454\u74E1\u74FF\u74FE\u74FD\u751D\u7579\u7577\u6983\u75EF\u760F\u7603\u75F7\u75FE\u75FC\u75F9\u75F8\u7610\u75FB\u75F6\u75ED\u75F5\u75FD\u7699\u76B5\u76DD\u7755\u775F\u7760\u7752\u7756\u775A\u7769\u7767\u7754\u7759\u776D\u77E0\u7887\u789A\u7894\u788F\u7884\u7895\u7885\u7886\u78A1\u7883\u7879\u7899\u7880\u7896\u787B\u797C\u7982\u797D\u7979\u7A11\u7A18\u7A19\u7A12\u7A17\u7A15\u7A22\u7A13"],["df40","\u7A1B\u7A10\u7AA3\u7AA2\u7A9E\u7AEB\u7B66\u7B64\u7B6D\u7B74\u7B69\u7B72\u7B65\u7B73\u7B71\u7B70\u7B61\u7B78\u7B76\u7B63\u7CB2\u7CB4\u7CAF\u7D88\u7D86\u7D80\u7D8D\u7D7F\u7D85\u7D7A\u7D8E\u7D7B\u7D83\u7D7C\u7D8C\u7D94\u7D84\u7D7D\u7D92\u7F6D\u7F6B\u7F67\u7F68\u7F6C\u7FA6\u7FA5\u7FA7\u7FDB\u7FDC\u8021\u8164\u8160\u8177\u815C\u8169\u815B\u8162\u8172\u6721\u815E\u8176\u8167\u816F"],["dfa1","\u8144\u8161\u821D\u8249\u8244\u8240\u8242\u8245\u84F1\u843F\u8456\u8476\u8479\u848F\u848D\u8465\u8451\u8440\u8486\u8467\u8430\u844D\u847D\u845A\u8459\u8474\u8473\u845D\u8507\u845E\u8437\u843A\u8434\u847A\u8443\u8478\u8432\u8445\u8429\u83D9\u844B\u842F\u8442\u842D\u845F\u8470\u8439\u844E\u844C\u8452\u846F\u84C5\u848E\u843B\u8447\u8436\u8433\u8468\u847E\u8444\u842B\u8460\u8454\u846E\u8450\u870B\u8704\u86F7\u870C\u86FA\u86D6\u86F5\u874D\u86F8\u870E\u8709\u8701\u86F6\u870D\u8705\u88D6\u88CB\u88CD\u88CE\u88DE\u88DB\u88DA\u88CC\u88D0\u8985\u899B\u89DF\u89E5\u89E4"],["e040","\u89E1\u89E0\u89E2\u89DC\u89E6\u8A76\u8A86\u8A7F\u8A61\u8A3F\u8A77\u8A82\u8A84\u8A75\u8A83\u8A81\u8A74\u8A7A\u8C3C\u8C4B\u8C4A\u8C65\u8C64\u8C66\u8C86\u8C84\u8C85\u8CCC\u8D68\u8D69\u8D91\u8D8C\u8D8E\u8D8F\u8D8D\u8D93\u8D94\u8D90\u8D92\u8DF0\u8DE0\u8DEC\u8DF1\u8DEE\u8DD0\u8DE9\u8DE3\u8DE2\u8DE7\u8DF2\u8DEB\u8DF4\u8F06\u8EFF\u8F01\u8F00\u8F05\u8F07\u8F08\u8F02\u8F0B\u9052\u903F"],["e0a1","\u9044\u9049\u903D\u9110\u910D\u910F\u9111\u9116\u9114\u910B\u910E\u916E\u916F\u9248\u9252\u9230\u923A\u9266\u9233\u9265\u925E\u9283\u922E\u924A\u9246\u926D\u926C\u924F\u9260\u9267\u926F\u9236\u9261\u9270\u9231\u9254\u9263\u9250\u9272\u924E\u9253\u924C\u9256\u9232\u959F\u959C\u959E\u959B\u9692\u9693\u9691\u9697\u96CE\u96FA\u96FD\u96F8\u96F5\u9773\u9777\u9778\u9772\u980F\u980D\u980E\u98AC\u98F6\u98F9\u99AF\u99B2\u99B0\u99B5\u9AAD\u9AAB\u9B5B\u9CEA\u9CED\u9CE7\u9E80\u9EFD\u50E6\u50D4\u50D7\u50E8\u50F3\u50DB\u50EA\u50DD\u50E4\u50D3\u50EC\u50F0\u50EF\u50E3\u50E0"],["e140","\u51D8\u5280\u5281\u52E9\u52EB\u5330\u53AC\u5627\u5615\u560C\u5612\u55FC\u560F\u561C\u5601\u5613\u5602\u55FA\u561D\u5604\u55FF\u55F9\u5889\u587C\u5890\u5898\u5886\u5881\u587F\u5874\u588B\u587A\u5887\u5891\u588E\u5876\u5882\u5888\u587B\u5894\u588F\u58FE\u596B\u5ADC\u5AEE\u5AE5\u5AD5\u5AEA\u5ADA\u5AED\u5AEB\u5AF3\u5AE2\u5AE0\u5ADB\u5AEC\u5ADE\u5ADD\u5AD9\u5AE8\u5ADF\u5B77\u5BE0"],["e1a1","\u5BE3\u5C63\u5D82\u5D80\u5D7D\u5D86\u5D7A\u5D81\u5D77\u5D8A\u5D89\u5D88\u5D7E\u5D7C\u5D8D\u5D79\u5D7F\u5E58\u5E59\u5E53\u5ED8\u5ED1\u5ED7\u5ECE\u5EDC\u5ED5\u5ED9\u5ED2\u5ED4\u5F44\u5F43\u5F6F\u5FB6\u612C\u6128\u6141\u615E\u6171\u6173\u6152\u6153\u6172\u616C\u6180\u6174\u6154\u617A\u615B\u6165\u613B\u616A\u6161\u6156\u6229\u6227\u622B\u642B\u644D\u645B\u645D\u6474\u6476\u6472\u6473\u647D\u6475\u6466\u64A6\u644E\u6482\u645E\u645C\u644B\u6453\u6460\u6450\u647F\u643F\u646C\u646B\u6459\u6465\u6477\u6573\u65A0\u66A1\u66A0\u669F\u6705\u6704\u6722\u69B1\u69B6\u69C9"],["e240","\u69A0\u69CE\u6996\u69B0\u69AC\u69BC\u6991\u6999\u698E\u69A7\u698D\u69A9\u69BE\u69AF\u69BF\u69C4\u69BD\u69A4\u69D4\u69B9\u69CA\u699A\u69CF\u69B3\u6993\u69AA\u69A1\u699E\u69D9\u6997\u6990\u69C2\u69B5\u69A5\u69C6\u6B4A\u6B4D\u6B4B\u6B9E\u6B9F\u6BA0\u6BC3\u6BC4\u6BFE\u6ECE\u6EF5\u6EF1\u6F03\u6F25\u6EF8\u6F37\u6EFB\u6F2E\u6F09\u6F4E\u6F19\u6F1A\u6F27\u6F18\u6F3B\u6F12\u6EED\u6F0A"],["e2a1","\u6F36\u6F73\u6EF9\u6EEE\u6F2D\u6F40\u6F30\u6F3C\u6F35\u6EEB\u6F07\u6F0E\u6F43\u6F05\u6EFD\u6EF6\u6F39\u6F1C\u6EFC\u6F3A\u6F1F\u6F0D\u6F1E\u6F08\u6F21\u7187\u7190\u7189\u7180\u7185\u7182\u718F\u717B\u7186\u7181\u7197\u7244\u7253\u7297\u7295\u7293\u7343\u734D\u7351\u734C\u7462\u7473\u7471\u7475\u7472\u7467\u746E\u7500\u7502\u7503\u757D\u7590\u7616\u7608\u760C\u7615\u7611\u760A\u7614\u76B8\u7781\u777C\u7785\u7782\u776E\u7780\u776F\u777E\u7783\u78B2\u78AA\u78B4\u78AD\u78A8\u787E\u78AB\u789E\u78A5\u78A0\u78AC\u78A2\u78A4\u7998\u798A\u798B\u7996\u7995\u7994\u7993"],["e340","\u7997\u7988\u7992\u7990\u7A2B\u7A4A\u7A30\u7A2F\u7A28\u7A26\u7AA8\u7AAB\u7AAC\u7AEE\u7B88\u7B9C\u7B8A\u7B91\u7B90\u7B96\u7B8D\u7B8C\u7B9B\u7B8E\u7B85\u7B98\u5284\u7B99\u7BA4\u7B82\u7CBB\u7CBF\u7CBC\u7CBA\u7DA7\u7DB7\u7DC2\u7DA3\u7DAA\u7DC1\u7DC0\u7DC5\u7D9D\u7DCE\u7DC4\u7DC6\u7DCB\u7DCC\u7DAF\u7DB9\u7D96\u7DBC\u7D9F\u7DA6\u7DAE\u7DA9\u7DA1\u7DC9\u7F73\u7FE2\u7FE3\u7FE5\u7FDE"],["e3a1","\u8024\u805D\u805C\u8189\u8186\u8183\u8187\u818D\u818C\u818B\u8215\u8497\u84A4\u84A1\u849F\u84BA\u84CE\u84C2\u84AC\u84AE\u84AB\u84B9\u84B4\u84C1\u84CD\u84AA\u849A\u84B1\u84D0\u849D\u84A7\u84BB\u84A2\u8494\u84C7\u84CC\u849B\u84A9\u84AF\u84A8\u84D6\u8498\u84B6\u84CF\u84A0\u84D7\u84D4\u84D2\u84DB\u84B0\u8491\u8661\u8733\u8723\u8728\u876B\u8740\u872E\u871E\u8721\u8719\u871B\u8743\u872C\u8741\u873E\u8746\u8720\u8732\u872A\u872D\u873C\u8712\u873A\u8731\u8735\u8742\u8726\u8727\u8738\u8724\u871A\u8730\u8711\u88F7\u88E7\u88F1\u88F2\u88FA\u88FE\u88EE\u88FC\u88F6\u88FB"],["e440","\u88F0\u88EC\u88EB\u899D\u89A1\u899F\u899E\u89E9\u89EB\u89E8\u8AAB\u8A99\u8A8B\u8A92\u8A8F\u8A96\u8C3D\u8C68\u8C69\u8CD5\u8CCF\u8CD7\u8D96\u8E09\u8E02\u8DFF\u8E0D\u8DFD\u8E0A\u8E03\u8E07\u8E06\u8E05\u8DFE\u8E00\u8E04\u8F10\u8F11\u8F0E\u8F0D\u9123\u911C\u9120\u9122\u911F\u911D\u911A\u9124\u9121\u911B\u917A\u9172\u9179\u9173\u92A5\u92A4\u9276\u929B\u927A\u92A0\u9294\u92AA\u928D"],["e4a1","\u92A6\u929A\u92AB\u9279\u9297\u927F\u92A3\u92EE\u928E\u9282\u9295\u92A2\u927D\u9288\u92A1\u928A\u9286\u928C\u9299\u92A7\u927E\u9287\u92A9\u929D\u928B\u922D\u969E\u96A1\u96FF\u9758\u977D\u977A\u977E\u9783\u9780\u9782\u977B\u9784\u9781\u977F\u97CE\u97CD\u9816\u98AD\u98AE\u9902\u9900\u9907\u999D\u999C\u99C3\u99B9\u99BB\u99BA\u99C2\u99BD\u99C7\u9AB1\u9AE3\u9AE7\u9B3E\u9B3F\u9B60\u9B61\u9B5F\u9CF1\u9CF2\u9CF5\u9EA7\u50FF\u5103\u5130\u50F8\u5106\u5107\u50F6\u50FE\u510B\u510C\u50FD\u510A\u528B\u528C\u52F1\u52EF\u5648\u5642\u564C\u5635\u5641\u564A\u5649\u5646\u5658"],["e540","\u565A\u5640\u5633\u563D\u562C\u563E\u5638\u562A\u563A\u571A\u58AB\u589D\u58B1\u58A0\u58A3\u58AF\u58AC\u58A5\u58A1\u58FF\u5AFF\u5AF4\u5AFD\u5AF7\u5AF6\u5B03\u5AF8\u5B02\u5AF9\u5B01\u5B07\u5B05\u5B0F\u5C67\u5D99\u5D97\u5D9F\u5D92\u5DA2\u5D93\u5D95\u5DA0\u5D9C\u5DA1\u5D9A\u5D9E\u5E69\u5E5D\u5E60\u5E5C\u7DF3\u5EDB\u5EDE\u5EE1\u5F49\u5FB2\u618B\u6183\u6179\u61B1\u61B0\u61A2\u6189"],["e5a1","\u619B\u6193\u61AF\u61AD\u619F\u6192\u61AA\u61A1\u618D\u6166\u61B3\u622D\u646E\u6470\u6496\u64A0\u6485\u6497\u649C\u648F\u648B\u648A\u648C\u64A3\u649F\u6468\u64B1\u6498\u6576\u657A\u6579\u657B\u65B2\u65B3\u66B5\u66B0\u66A9\u66B2\u66B7\u66AA\u66AF\u6A00\u6A06\u6A17\u69E5\u69F8\u6A15\u69F1\u69E4\u6A20\u69FF\u69EC\u69E2\u6A1B\u6A1D\u69FE\u6A27\u69F2\u69EE\u6A14\u69F7\u69E7\u6A40\u6A08\u69E6\u69FB\u6A0D\u69FC\u69EB\u6A09\u6A04\u6A18\u6A25\u6A0F\u69F6\u6A26\u6A07\u69F4\u6A16\u6B51\u6BA5\u6BA3\u6BA2\u6BA6\u6C01\u6C00\u6BFF\u6C02\u6F41\u6F26\u6F7E\u6F87\u6FC6\u6F92"],["e640","\u6F8D\u6F89\u6F8C\u6F62\u6F4F\u6F85\u6F5A\u6F96\u6F76\u6F6C\u6F82\u6F55\u6F72\u6F52\u6F50\u6F57\u6F94\u6F93\u6F5D\u6F00\u6F61\u6F6B\u6F7D\u6F67\u6F90\u6F53\u6F8B\u6F69\u6F7F\u6F95\u6F63\u6F77\u6F6A\u6F7B\u71B2\u71AF\u719B\u71B0\u71A0\u719A\u71A9\u71B5\u719D\u71A5\u719E\u71A4\u71A1\u71AA\u719C\u71A7\u71B3\u7298\u729A\u7358\u7352\u735E\u735F\u7360\u735D\u735B\u7361\u735A\u7359"],["e6a1","\u7362\u7487\u7489\u748A\u7486\u7481\u747D\u7485\u7488\u747C\u7479\u7508\u7507\u757E\u7625\u761E\u7619\u761D\u761C\u7623\u761A\u7628\u761B\u769C\u769D\u769E\u769B\u778D\u778F\u7789\u7788\u78CD\u78BB\u78CF\u78CC\u78D1\u78CE\u78D4\u78C8\u78C3\u78C4\u78C9\u799A\u79A1\u79A0\u799C\u79A2\u799B\u6B76\u7A39\u7AB2\u7AB4\u7AB3\u7BB7\u7BCB\u7BBE\u7BAC\u7BCE\u7BAF\u7BB9\u7BCA\u7BB5\u7CC5\u7CC8\u7CCC\u7CCB\u7DF7\u7DDB\u7DEA\u7DE7\u7DD7\u7DE1\u7E03\u7DFA\u7DE6\u7DF6\u7DF1\u7DF0\u7DEE\u7DDF\u7F76\u7FAC\u7FB0\u7FAD\u7FED\u7FEB\u7FEA\u7FEC\u7FE6\u7FE8\u8064\u8067\u81A3\u819F"],["e740","\u819E\u8195\u81A2\u8199\u8197\u8216\u824F\u8253\u8252\u8250\u824E\u8251\u8524\u853B\u850F\u8500\u8529\u850E\u8509\u850D\u851F\u850A\u8527\u851C\u84FB\u852B\u84FA\u8508\u850C\u84F4\u852A\u84F2\u8515\u84F7\u84EB\u84F3\u84FC\u8512\u84EA\u84E9\u8516\u84FE\u8528\u851D\u852E\u8502\u84FD\u851E\u84F6\u8531\u8526\u84E7\u84E8\u84F0\u84EF\u84F9\u8518\u8520\u8530\u850B\u8519\u852F\u8662"],["e7a1","\u8756\u8763\u8764\u8777\u87E1\u8773\u8758\u8754\u875B\u8752\u8761\u875A\u8751\u875E\u876D\u876A\u8750\u874E\u875F\u875D\u876F\u876C\u877A\u876E\u875C\u8765\u874F\u877B\u8775\u8762\u8767\u8769\u885A\u8905\u890C\u8914\u890B\u8917\u8918\u8919\u8906\u8916\u8911\u890E\u8909\u89A2\u89A4\u89A3\u89ED\u89F0\u89EC\u8ACF\u8AC6\u8AB8\u8AD3\u8AD1\u8AD4\u8AD5\u8ABB\u8AD7\u8ABE\u8AC0\u8AC5\u8AD8\u8AC3\u8ABA\u8ABD\u8AD9\u8C3E\u8C4D\u8C8F\u8CE5\u8CDF\u8CD9\u8CE8\u8CDA\u8CDD\u8CE7\u8DA0\u8D9C\u8DA1\u8D9B\u8E20\u8E23\u8E25\u8E24\u8E2E\u8E15\u8E1B\u8E16\u8E11\u8E19\u8E26\u8E27"],["e840","\u8E14\u8E12\u8E18\u8E13\u8E1C\u8E17\u8E1A\u8F2C\u8F24\u8F18\u8F1A\u8F20\u8F23\u8F16\u8F17\u9073\u9070\u906F\u9067\u906B\u912F\u912B\u9129\u912A\u9132\u9126\u912E\u9185\u9186\u918A\u9181\u9182\u9184\u9180\u92D0\u92C3\u92C4\u92C0\u92D9\u92B6\u92CF\u92F1\u92DF\u92D8\u92E9\u92D7\u92DD\u92CC\u92EF\u92C2\u92E8\u92CA\u92C8\u92CE\u92E6\u92CD\u92D5\u92C9\u92E0\u92DE\u92E7\u92D1\u92D3"],["e8a1","\u92B5\u92E1\u92C6\u92B4\u957C\u95AC\u95AB\u95AE\u95B0\u96A4\u96A2\u96D3\u9705\u9708\u9702\u975A\u978A\u978E\u9788\u97D0\u97CF\u981E\u981D\u9826\u9829\u9828\u9820\u981B\u9827\u98B2\u9908\u98FA\u9911\u9914\u9916\u9917\u9915\u99DC\u99CD\u99CF\u99D3\u99D4\u99CE\u99C9\u99D6\u99D8\u99CB\u99D7\u99CC\u9AB3\u9AEC\u9AEB\u9AF3\u9AF2\u9AF1\u9B46\u9B43\u9B67\u9B74\u9B71\u9B66\u9B76\u9B75\u9B70\u9B68\u9B64\u9B6C\u9CFC\u9CFA\u9CFD\u9CFF\u9CF7\u9D07\u9D00\u9CF9\u9CFB\u9D08\u9D05\u9D04\u9E83\u9ED3\u9F0F\u9F10\u511C\u5113\u5117\u511A\u5111\u51DE\u5334\u53E1\u5670\u5660\u566E"],["e940","\u5673\u5666\u5663\u566D\u5672\u565E\u5677\u571C\u571B\u58C8\u58BD\u58C9\u58BF\u58BA\u58C2\u58BC\u58C6\u5B17\u5B19\u5B1B\u5B21\u5B14\u5B13\u5B10\u5B16\u5B28\u5B1A\u5B20\u5B1E\u5BEF\u5DAC\u5DB1\u5DA9\u5DA7\u5DB5\u5DB0\u5DAE\u5DAA\u5DA8\u5DB2\u5DAD\u5DAF\u5DB4\u5E67\u5E68\u5E66\u5E6F\u5EE9\u5EE7\u5EE6\u5EE8\u5EE5\u5F4B\u5FBC\u619D\u61A8\u6196\u61C5\u61B4\u61C6\u61C1\u61CC\u61BA"],["e9a1","\u61BF\u61B8\u618C\u64D7\u64D6\u64D0\u64CF\u64C9\u64BD\u6489\u64C3\u64DB\u64F3\u64D9\u6533\u657F\u657C\u65A2\u66C8\u66BE\u66C0\u66CA\u66CB\u66CF\u66BD\u66BB\u66BA\u66CC\u6723\u6A34\u6A66\u6A49\u6A67\u6A32\u6A68\u6A3E\u6A5D\u6A6D\u6A76\u6A5B\u6A51\u6A28\u6A5A\u6A3B\u6A3F\u6A41\u6A6A\u6A64\u6A50\u6A4F\u6A54\u6A6F\u6A69\u6A60\u6A3C\u6A5E\u6A56\u6A55\u6A4D\u6A4E\u6A46\u6B55\u6B54\u6B56\u6BA7\u6BAA\u6BAB\u6BC8\u6BC7\u6C04\u6C03\u6C06\u6FAD\u6FCB\u6FA3\u6FC7\u6FBC\u6FCE\u6FC8\u6F5E\u6FC4\u6FBD\u6F9E\u6FCA\u6FA8\u7004\u6FA5\u6FAE\u6FBA\u6FAC\u6FAA\u6FCF\u6FBF\u6FB8"],["ea40","\u6FA2\u6FC9\u6FAB\u6FCD\u6FAF\u6FB2\u6FB0\u71C5\u71C2\u71BF\u71B8\u71D6\u71C0\u71C1\u71CB\u71D4\u71CA\u71C7\u71CF\u71BD\u71D8\u71BC\u71C6\u71DA\u71DB\u729D\u729E\u7369\u7366\u7367\u736C\u7365\u736B\u736A\u747F\u749A\u74A0\u7494\u7492\u7495\u74A1\u750B\u7580\u762F\u762D\u7631\u763D\u7633\u763C\u7635\u7632\u7630\u76BB\u76E6\u779A\u779D\u77A1\u779C\u779B\u77A2\u77A3\u7795\u7799"],["eaa1","\u7797\u78DD\u78E9\u78E5\u78EA\u78DE\u78E3\u78DB\u78E1\u78E2\u78ED\u78DF\u78E0\u79A4\u7A44\u7A48\u7A47\u7AB6\u7AB8\u7AB5\u7AB1\u7AB7\u7BDE\u7BE3\u7BE7\u7BDD\u7BD5\u7BE5\u7BDA\u7BE8\u7BF9\u7BD4\u7BEA\u7BE2\u7BDC\u7BEB\u7BD8\u7BDF\u7CD2\u7CD4\u7CD7\u7CD0\u7CD1\u7E12\u7E21\u7E17\u7E0C\u7E1F\u7E20\u7E13\u7E0E\u7E1C\u7E15\u7E1A\u7E22\u7E0B\u7E0F\u7E16\u7E0D\u7E14\u7E25\u7E24\u7F43\u7F7B\u7F7C\u7F7A\u7FB1\u7FEF\u802A\u8029\u806C\u81B1\u81A6\u81AE\u81B9\u81B5\u81AB\u81B0\u81AC\u81B4\u81B2\u81B7\u81A7\u81F2\u8255\u8256\u8257\u8556\u8545\u856B\u854D\u8553\u8561\u8558"],["eb40","\u8540\u8546\u8564\u8541\u8562\u8544\u8551\u8547\u8563\u853E\u855B\u8571\u854E\u856E\u8575\u8555\u8567\u8560\u858C\u8566\u855D\u8554\u8565\u856C\u8663\u8665\u8664\u879B\u878F\u8797\u8793\u8792\u8788\u8781\u8796\u8798\u8779\u8787\u87A3\u8785\u8790\u8791\u879D\u8784\u8794\u879C\u879A\u8789\u891E\u8926\u8930\u892D\u892E\u8927\u8931\u8922\u8929\u8923\u892F\u892C\u891F\u89F1\u8AE0"],["eba1","\u8AE2\u8AF2\u8AF4\u8AF5\u8ADD\u8B14\u8AE4\u8ADF\u8AF0\u8AC8\u8ADE\u8AE1\u8AE8\u8AFF\u8AEF\u8AFB\u8C91\u8C92\u8C90\u8CF5\u8CEE\u8CF1\u8CF0\u8CF3\u8D6C\u8D6E\u8DA5\u8DA7\u8E33\u8E3E\u8E38\u8E40\u8E45\u8E36\u8E3C\u8E3D\u8E41\u8E30\u8E3F\u8EBD\u8F36\u8F2E\u8F35\u8F32\u8F39\u8F37\u8F34\u9076\u9079\u907B\u9086\u90FA\u9133\u9135\u9136\u9193\u9190\u9191\u918D\u918F\u9327\u931E\u9308\u931F\u9306\u930F\u937A\u9338\u933C\u931B\u9323\u9312\u9301\u9346\u932D\u930E\u930D\u92CB\u931D\u92FA\u9325\u9313\u92F9\u92F7\u9334\u9302\u9324\u92FF\u9329\u9339\u9335\u932A\u9314\u930C"],["ec40","\u930B\u92FE\u9309\u9300\u92FB\u9316\u95BC\u95CD\u95BE\u95B9\u95BA\u95B6\u95BF\u95B5\u95BD\u96A9\u96D4\u970B\u9712\u9710\u9799\u9797\u9794\u97F0\u97F8\u9835\u982F\u9832\u9924\u991F\u9927\u9929\u999E\u99EE\u99EC\u99E5\u99E4\u99F0\u99E3\u99EA\u99E9\u99E7\u9AB9\u9ABF\u9AB4\u9ABB\u9AF6\u9AFA\u9AF9\u9AF7\u9B33\u9B80\u9B85\u9B87\u9B7C\u9B7E\u9B7B\u9B82\u9B93\u9B92\u9B90\u9B7A\u9B95"],["eca1","\u9B7D\u9B88\u9D25\u9D17\u9D20\u9D1E\u9D14\u9D29\u9D1D\u9D18\u9D22\u9D10\u9D19\u9D1F\u9E88\u9E86\u9E87\u9EAE\u9EAD\u9ED5\u9ED6\u9EFA\u9F12\u9F3D\u5126\u5125\u5122\u5124\u5120\u5129\u52F4\u5693\u568C\u568D\u5686\u5684\u5683\u567E\u5682\u567F\u5681\u58D6\u58D4\u58CF\u58D2\u5B2D\u5B25\u5B32\u5B23\u5B2C\u5B27\u5B26\u5B2F\u5B2E\u5B7B\u5BF1\u5BF2\u5DB7\u5E6C\u5E6A\u5FBE\u5FBB\u61C3\u61B5\u61BC\u61E7\u61E0\u61E5\u61E4\u61E8\u61DE\u64EF\u64E9\u64E3\u64EB\u64E4\u64E8\u6581\u6580\u65B6\u65DA\u66D2\u6A8D\u6A96\u6A81\u6AA5\u6A89\u6A9F\u6A9B\u6AA1\u6A9E\u6A87\u6A93\u6A8E"],["ed40","\u6A95\u6A83\u6AA8\u6AA4\u6A91\u6A7F\u6AA6\u6A9A\u6A85\u6A8C\u6A92\u6B5B\u6BAD\u6C09\u6FCC\u6FA9\u6FF4\u6FD4\u6FE3\u6FDC\u6FED\u6FE7\u6FE6\u6FDE\u6FF2\u6FDD\u6FE2\u6FE8\u71E1\u71F1\u71E8\u71F2\u71E4\u71F0\u71E2\u7373\u736E\u736F\u7497\u74B2\u74AB\u7490\u74AA\u74AD\u74B1\u74A5\u74AF\u7510\u7511\u7512\u750F\u7584\u7643\u7648\u7649\u7647\u76A4\u76E9\u77B5\u77AB\u77B2\u77B7\u77B6"],["eda1","\u77B4\u77B1\u77A8\u77F0\u78F3\u78FD\u7902\u78FB\u78FC\u78F2\u7905\u78F9\u78FE\u7904\u79AB\u79A8\u7A5C\u7A5B\u7A56\u7A58\u7A54\u7A5A\u7ABE\u7AC0\u7AC1\u7C05\u7C0F\u7BF2\u7C00\u7BFF\u7BFB\u7C0E\u7BF4\u7C0B\u7BF3\u7C02\u7C09\u7C03\u7C01\u7BF8\u7BFD\u7C06\u7BF0\u7BF1\u7C10\u7C0A\u7CE8\u7E2D\u7E3C\u7E42\u7E33\u9848\u7E38\u7E2A\u7E49\u7E40\u7E47\u7E29\u7E4C\u7E30\u7E3B\u7E36\u7E44\u7E3A\u7F45\u7F7F\u7F7E\u7F7D\u7FF4\u7FF2\u802C\u81BB\u81C4\u81CC\u81CA\u81C5\u81C7\u81BC\u81E9\u825B\u825A\u825C\u8583\u8580\u858F\u85A7\u8595\u85A0\u858B\u85A3\u857B\u85A4\u859A\u859E"],["ee40","\u8577\u857C\u8589\u85A1\u857A\u8578\u8557\u858E\u8596\u8586\u858D\u8599\u859D\u8581\u85A2\u8582\u8588\u8585\u8579\u8576\u8598\u8590\u859F\u8668\u87BE\u87AA\u87AD\u87C5\u87B0\u87AC\u87B9\u87B5\u87BC\u87AE\u87C9\u87C3\u87C2\u87CC\u87B7\u87AF\u87C4\u87CA\u87B4\u87B6\u87BF\u87B8\u87BD\u87DE\u87B2\u8935\u8933\u893C\u893E\u8941\u8952\u8937\u8942\u89AD\u89AF\u89AE\u89F2\u89F3\u8B1E"],["eea1","\u8B18\u8B16\u8B11\u8B05\u8B0B\u8B22\u8B0F\u8B12\u8B15\u8B07\u8B0D\u8B08\u8B06\u8B1C\u8B13\u8B1A\u8C4F\u8C70\u8C72\u8C71\u8C6F\u8C95\u8C94\u8CF9\u8D6F\u8E4E\u8E4D\u8E53\u8E50\u8E4C\u8E47\u8F43\u8F40\u9085\u907E\u9138\u919A\u91A2\u919B\u9199\u919F\u91A1\u919D\u91A0\u93A1\u9383\u93AF\u9364\u9356\u9347\u937C\u9358\u935C\u9376\u9349\u9350\u9351\u9360\u936D\u938F\u934C\u936A\u9379\u9357\u9355\u9352\u934F\u9371\u9377\u937B\u9361\u935E\u9363\u9367\u9380\u934E\u9359\u95C7\u95C0\u95C9\u95C3\u95C5\u95B7\u96AE\u96B0\u96AC\u9720\u971F\u9718\u971D\u9719\u979A\u97A1\u979C"],["ef40","\u979E\u979D\u97D5\u97D4\u97F1\u9841\u9844\u984A\u9849\u9845\u9843\u9925\u992B\u992C\u992A\u9933\u9932\u992F\u992D\u9931\u9930\u9998\u99A3\u99A1\u9A02\u99FA\u99F4\u99F7\u99F9\u99F8\u99F6\u99FB\u99FD\u99FE\u99FC\u9A03\u9ABE\u9AFE\u9AFD\u9B01\u9AFC\u9B48\u9B9A\u9BA8\u9B9E\u9B9B\u9BA6\u9BA1\u9BA5\u9BA4\u9B86\u9BA2\u9BA0\u9BAF\u9D33\u9D41\u9D67\u9D36\u9D2E\u9D2F\u9D31\u9D38\u9D30"],["efa1","\u9D45\u9D42\u9D43\u9D3E\u9D37\u9D40\u9D3D\u7FF5\u9D2D\u9E8A\u9E89\u9E8D\u9EB0\u9EC8\u9EDA\u9EFB\u9EFF\u9F24\u9F23\u9F22\u9F54\u9FA0\u5131\u512D\u512E\u5698\u569C\u5697\u569A\u569D\u5699\u5970\u5B3C\u5C69\u5C6A\u5DC0\u5E6D\u5E6E\u61D8\u61DF\u61ED\u61EE\u61F1\u61EA\u61F0\u61EB\u61D6\u61E9\u64FF\u6504\u64FD\u64F8\u6501\u6503\u64FC\u6594\u65DB\u66DA\u66DB\u66D8\u6AC5\u6AB9\u6ABD\u6AE1\u6AC6\u6ABA\u6AB6\u6AB7\u6AC7\u6AB4\u6AAD\u6B5E\u6BC9\u6C0B\u7007\u700C\u700D\u7001\u7005\u7014\u700E\u6FFF\u7000\u6FFB\u7026\u6FFC\u6FF7\u700A\u7201\u71FF\u71F9\u7203\u71FD\u7376"],["f040","\u74B8\u74C0\u74B5\u74C1\u74BE\u74B6\u74BB\u74C2\u7514\u7513\u765C\u7664\u7659\u7650\u7653\u7657\u765A\u76A6\u76BD\u76EC\u77C2\u77BA\u78FF\u790C\u7913\u7914\u7909\u7910\u7912\u7911\u79AD\u79AC\u7A5F\u7C1C\u7C29\u7C19\u7C20\u7C1F\u7C2D\u7C1D\u7C26\u7C28\u7C22\u7C25\u7C30\u7E5C\u7E50\u7E56\u7E63\u7E58\u7E62\u7E5F\u7E51\u7E60\u7E57\u7E53\u7FB5\u7FB3\u7FF7\u7FF8\u8075\u81D1\u81D2"],["f0a1","\u81D0\u825F\u825E\u85B4\u85C6\u85C0\u85C3\u85C2\u85B3\u85B5\u85BD\u85C7\u85C4\u85BF\u85CB\u85CE\u85C8\u85C5\u85B1\u85B6\u85D2\u8624\u85B8\u85B7\u85BE\u8669\u87E7\u87E6\u87E2\u87DB\u87EB\u87EA\u87E5\u87DF\u87F3\u87E4\u87D4\u87DC\u87D3\u87ED\u87D8\u87E3\u87A4\u87D7\u87D9\u8801\u87F4\u87E8\u87DD\u8953\u894B\u894F\u894C\u8946\u8950\u8951\u8949\u8B2A\u8B27\u8B23\u8B33\u8B30\u8B35\u8B47\u8B2F\u8B3C\u8B3E\u8B31\u8B25\u8B37\u8B26\u8B36\u8B2E\u8B24\u8B3B\u8B3D\u8B3A\u8C42\u8C75\u8C99\u8C98\u8C97\u8CFE\u8D04\u8D02\u8D00\u8E5C\u8E62\u8E60\u8E57\u8E56\u8E5E\u8E65\u8E67"],["f140","\u8E5B\u8E5A\u8E61\u8E5D\u8E69\u8E54\u8F46\u8F47\u8F48\u8F4B\u9128\u913A\u913B\u913E\u91A8\u91A5\u91A7\u91AF\u91AA\u93B5\u938C\u9392\u93B7\u939B\u939D\u9389\u93A7\u938E\u93AA\u939E\u93A6\u9395\u9388\u9399\u939F\u938D\u93B1\u9391\u93B2\u93A4\u93A8\u93B4\u93A3\u93A5\u95D2\u95D3\u95D1\u96B3\u96D7\u96DA\u5DC2\u96DF\u96D8\u96DD\u9723\u9722\u9725\u97AC\u97AE\u97A8\u97AB\u97A4\u97AA"],["f1a1","\u97A2\u97A5\u97D7\u97D9\u97D6\u97D8\u97FA\u9850\u9851\u9852\u98B8\u9941\u993C\u993A\u9A0F\u9A0B\u9A09\u9A0D\u9A04\u9A11\u9A0A\u9A05\u9A07\u9A06\u9AC0\u9ADC\u9B08\u9B04\u9B05\u9B29\u9B35\u9B4A\u9B4C\u9B4B\u9BC7\u9BC6\u9BC3\u9BBF\u9BC1\u9BB5\u9BB8\u9BD3\u9BB6\u9BC4\u9BB9\u9BBD\u9D5C\u9D53\u9D4F\u9D4A\u9D5B\u9D4B\u9D59\u9D56\u9D4C\u9D57\u9D52\u9D54\u9D5F\u9D58\u9D5A\u9E8E\u9E8C\u9EDF\u9F01\u9F00\u9F16\u9F25\u9F2B\u9F2A\u9F29\u9F28\u9F4C\u9F55\u5134\u5135\u5296\u52F7\u53B4\u56AB\u56AD\u56A6\u56A7\u56AA\u56AC\u58DA\u58DD\u58DB\u5912\u5B3D\u5B3E\u5B3F\u5DC3\u5E70"],["f240","\u5FBF\u61FB\u6507\u6510\u650D\u6509\u650C\u650E\u6584\u65DE\u65DD\u66DE\u6AE7\u6AE0\u6ACC\u6AD1\u6AD9\u6ACB\u6ADF\u6ADC\u6AD0\u6AEB\u6ACF\u6ACD\u6ADE\u6B60\u6BB0\u6C0C\u7019\u7027\u7020\u7016\u702B\u7021\u7022\u7023\u7029\u7017\u7024\u701C\u702A\u720C\u720A\u7207\u7202\u7205\u72A5\u72A6\u72A4\u72A3\u72A1\u74CB\u74C5\u74B7\u74C3\u7516\u7660\u77C9\u77CA\u77C4\u77F1\u791D\u791B"],["f2a1","\u7921\u791C\u7917\u791E\u79B0\u7A67\u7A68\u7C33\u7C3C\u7C39\u7C2C\u7C3B\u7CEC\u7CEA\u7E76\u7E75\u7E78\u7E70\u7E77\u7E6F\u7E7A\u7E72\u7E74\u7E68\u7F4B\u7F4A\u7F83\u7F86\u7FB7\u7FFD\u7FFE\u8078\u81D7\u81D5\u8264\u8261\u8263\u85EB\u85F1\u85ED\u85D9\u85E1\u85E8\u85DA\u85D7\u85EC\u85F2\u85F8\u85D8\u85DF\u85E3\u85DC\u85D1\u85F0\u85E6\u85EF\u85DE\u85E2\u8800\u87FA\u8803\u87F6\u87F7\u8809\u880C\u880B\u8806\u87FC\u8808\u87FF\u880A\u8802\u8962\u895A\u895B\u8957\u8961\u895C\u8958\u895D\u8959\u8988\u89B7\u89B6\u89F6\u8B50\u8B48\u8B4A\u8B40\u8B53\u8B56\u8B54\u8B4B\u8B55"],["f340","\u8B51\u8B42\u8B52\u8B57\u8C43\u8C77\u8C76\u8C9A\u8D06\u8D07\u8D09\u8DAC\u8DAA\u8DAD\u8DAB\u8E6D\u8E78\u8E73\u8E6A\u8E6F\u8E7B\u8EC2\u8F52\u8F51\u8F4F\u8F50\u8F53\u8FB4\u9140\u913F\u91B0\u91AD\u93DE\u93C7\u93CF\u93C2\u93DA\u93D0\u93F9\u93EC\u93CC\u93D9\u93A9\u93E6\u93CA\u93D4\u93EE\u93E3\u93D5\u93C4\u93CE\u93C0\u93D2\u93E7\u957D\u95DA\u95DB\u96E1\u9729\u972B\u972C\u9728\u9726"],["f3a1","\u97B3\u97B7\u97B6\u97DD\u97DE\u97DF\u985C\u9859\u985D\u9857\u98BF\u98BD\u98BB\u98BE\u9948\u9947\u9943\u99A6\u99A7\u9A1A\u9A15\u9A25\u9A1D\u9A24\u9A1B\u9A22\u9A20\u9A27\u9A23\u9A1E\u9A1C\u9A14\u9AC2\u9B0B\u9B0A\u9B0E\u9B0C\u9B37\u9BEA\u9BEB\u9BE0\u9BDE\u9BE4\u9BE6\u9BE2\u9BF0\u9BD4\u9BD7\u9BEC\u9BDC\u9BD9\u9BE5\u9BD5\u9BE1\u9BDA\u9D77\u9D81\u9D8A\u9D84\u9D88\u9D71\u9D80\u9D78\u9D86\u9D8B\u9D8C\u9D7D\u9D6B\u9D74\u9D75\u9D70\u9D69\u9D85\u9D73\u9D7B\u9D82\u9D6F\u9D79\u9D7F\u9D87\u9D68\u9E94\u9E91\u9EC0\u9EFC\u9F2D\u9F40\u9F41\u9F4D\u9F56\u9F57\u9F58\u5337\u56B2"],["f440","\u56B5\u56B3\u58E3\u5B45\u5DC6\u5DC7\u5EEE\u5EEF\u5FC0\u5FC1\u61F9\u6517\u6516\u6515\u6513\u65DF\u66E8\u66E3\u66E4\u6AF3\u6AF0\u6AEA\u6AE8\u6AF9\u6AF1\u6AEE\u6AEF\u703C\u7035\u702F\u7037\u7034\u7031\u7042\u7038\u703F\u703A\u7039\u7040\u703B\u7033\u7041\u7213\u7214\u72A8\u737D\u737C\u74BA\u76AB\u76AA\u76BE\u76ED\u77CC\u77CE\u77CF\u77CD\u77F2\u7925\u7923\u7927\u7928\u7924\u7929"],["f4a1","\u79B2\u7A6E\u7A6C\u7A6D\u7AF7\u7C49\u7C48\u7C4A\u7C47\u7C45\u7CEE\u7E7B\u7E7E\u7E81\u7E80\u7FBA\u7FFF\u8079\u81DB\u81D9\u820B\u8268\u8269\u8622\u85FF\u8601\u85FE\u861B\u8600\u85F6\u8604\u8609\u8605\u860C\u85FD\u8819\u8810\u8811\u8817\u8813\u8816\u8963\u8966\u89B9\u89F7\u8B60\u8B6A\u8B5D\u8B68\u8B63\u8B65\u8B67\u8B6D\u8DAE\u8E86\u8E88\u8E84\u8F59\u8F56\u8F57\u8F55\u8F58\u8F5A\u908D\u9143\u9141\u91B7\u91B5\u91B2\u91B3\u940B\u9413\u93FB\u9420\u940F\u9414\u93FE\u9415\u9410\u9428\u9419\u940D\u93F5\u9400\u93F7\u9407\u940E\u9416\u9412\u93FA\u9409\u93F8\u940A\u93FF"],["f540","\u93FC\u940C\u93F6\u9411\u9406\u95DE\u95E0\u95DF\u972E\u972F\u97B9\u97BB\u97FD\u97FE\u9860\u9862\u9863\u985F\u98C1\u98C2\u9950\u994E\u9959\u994C\u994B\u9953\u9A32\u9A34\u9A31\u9A2C\u9A2A\u9A36\u9A29\u9A2E\u9A38\u9A2D\u9AC7\u9ACA\u9AC6\u9B10\u9B12\u9B11\u9C0B\u9C08\u9BF7\u9C05\u9C12\u9BF8\u9C40\u9C07\u9C0E\u9C06\u9C17\u9C14\u9C09\u9D9F\u9D99\u9DA4\u9D9D\u9D92\u9D98\u9D90\u9D9B"],["f5a1","\u9DA0\u9D94\u9D9C\u9DAA\u9D97\u9DA1\u9D9A\u9DA2\u9DA8\u9D9E\u9DA3\u9DBF\u9DA9\u9D96\u9DA6\u9DA7\u9E99\u9E9B\u9E9A\u9EE5\u9EE4\u9EE7\u9EE6\u9F30\u9F2E\u9F5B\u9F60\u9F5E\u9F5D\u9F59\u9F91\u513A\u5139\u5298\u5297\u56C3\u56BD\u56BE\u5B48\u5B47\u5DCB\u5DCF\u5EF1\u61FD\u651B\u6B02\u6AFC\u6B03\u6AF8\u6B00\u7043\u7044\u704A\u7048\u7049\u7045\u7046\u721D\u721A\u7219\u737E\u7517\u766A\u77D0\u792D\u7931\u792F\u7C54\u7C53\u7CF2\u7E8A\u7E87\u7E88\u7E8B\u7E86\u7E8D\u7F4D\u7FBB\u8030\u81DD\u8618\u862A\u8626\u861F\u8623\u861C\u8619\u8627\u862E\u8621\u8620\u8629\u861E\u8625"],["f640","\u8829\u881D\u881B\u8820\u8824\u881C\u882B\u884A\u896D\u8969\u896E\u896B\u89FA\u8B79\u8B78\u8B45\u8B7A\u8B7B\u8D10\u8D14\u8DAF\u8E8E\u8E8C\u8F5E\u8F5B\u8F5D\u9146\u9144\u9145\u91B9\u943F\u943B\u9436\u9429\u943D\u943C\u9430\u9439\u942A\u9437\u942C\u9440\u9431\u95E5\u95E4\u95E3\u9735\u973A\u97BF\u97E1\u9864\u98C9\u98C6\u98C0\u9958\u9956\u9A39\u9A3D\u9A46\u9A44\u9A42\u9A41\u9A3A"],["f6a1","\u9A3F\u9ACD\u9B15\u9B17\u9B18\u9B16\u9B3A\u9B52\u9C2B\u9C1D\u9C1C\u9C2C\u9C23\u9C28\u9C29\u9C24\u9C21\u9DB7\u9DB6\u9DBC\u9DC1\u9DC7\u9DCA\u9DCF\u9DBE\u9DC5\u9DC3\u9DBB\u9DB5\u9DCE\u9DB9\u9DBA\u9DAC\u9DC8\u9DB1\u9DAD\u9DCC\u9DB3\u9DCD\u9DB2\u9E7A\u9E9C\u9EEB\u9EEE\u9EED\u9F1B\u9F18\u9F1A\u9F31\u9F4E\u9F65\u9F64\u9F92\u4EB9\u56C6\u56C5\u56CB\u5971\u5B4B\u5B4C\u5DD5\u5DD1\u5EF2\u6521\u6520\u6526\u6522\u6B0B\u6B08\u6B09\u6C0D\u7055\u7056\u7057\u7052\u721E\u721F\u72A9\u737F\u74D8\u74D5\u74D9\u74D7\u766D\u76AD\u7935\u79B4\u7A70\u7A71\u7C57\u7C5C\u7C59\u7C5B\u7C5A"],["f740","\u7CF4\u7CF1\u7E91\u7F4F\u7F87\u81DE\u826B\u8634\u8635\u8633\u862C\u8632\u8636\u882C\u8828\u8826\u882A\u8825\u8971\u89BF\u89BE\u89FB\u8B7E\u8B84\u8B82\u8B86\u8B85\u8B7F\u8D15\u8E95\u8E94\u8E9A\u8E92\u8E90\u8E96\u8E97\u8F60\u8F62\u9147\u944C\u9450\u944A\u944B\u944F\u9447\u9445\u9448\u9449\u9446\u973F\u97E3\u986A\u9869\u98CB\u9954\u995B\u9A4E\u9A53\u9A54\u9A4C\u9A4F\u9A48\u9A4A"],["f7a1","\u9A49\u9A52\u9A50\u9AD0\u9B19\u9B2B\u9B3B\u9B56\u9B55\u9C46\u9C48\u9C3F\u9C44\u9C39\u9C33\u9C41\u9C3C\u9C37\u9C34\u9C32\u9C3D\u9C36\u9DDB\u9DD2\u9DDE\u9DDA\u9DCB\u9DD0\u9DDC\u9DD1\u9DDF\u9DE9\u9DD9\u9DD8\u9DD6\u9DF5\u9DD5\u9DDD\u9EB6\u9EF0\u9F35\u9F33\u9F32\u9F42\u9F6B\u9F95\u9FA2\u513D\u5299\u58E8\u58E7\u5972\u5B4D\u5DD8\u882F\u5F4F\u6201\u6203\u6204\u6529\u6525\u6596\u66EB\u6B11\u6B12\u6B0F\u6BCA\u705B\u705A\u7222\u7382\u7381\u7383\u7670\u77D4\u7C67\u7C66\u7E95\u826C\u863A\u8640\u8639\u863C\u8631\u863B\u863E\u8830\u8832\u882E\u8833\u8976\u8974\u8973\u89FE"],["f840","\u8B8C\u8B8E\u8B8B\u8B88\u8C45\u8D19\u8E98\u8F64\u8F63\u91BC\u9462\u9455\u945D\u9457\u945E\u97C4\u97C5\u9800\u9A56\u9A59\u9B1E\u9B1F\u9B20\u9C52\u9C58\u9C50\u9C4A\u9C4D\u9C4B\u9C55\u9C59\u9C4C\u9C4E\u9DFB\u9DF7\u9DEF\u9DE3\u9DEB\u9DF8\u9DE4\u9DF6\u9DE1\u9DEE\u9DE6\u9DF2\u9DF0\u9DE2\u9DEC\u9DF4\u9DF3\u9DE8\u9DED\u9EC2\u9ED0\u9EF2\u9EF3\u9F06\u9F1C\u9F38\u9F37\u9F36\u9F43\u9F4F"],["f8a1","\u9F71\u9F70\u9F6E\u9F6F\u56D3\u56CD\u5B4E\u5C6D\u652D\u66ED\u66EE\u6B13\u705F\u7061\u705D\u7060\u7223\u74DB\u74E5\u77D5\u7938\u79B7\u79B6\u7C6A\u7E97\u7F89\u826D\u8643\u8838\u8837\u8835\u884B\u8B94\u8B95\u8E9E\u8E9F\u8EA0\u8E9D\u91BE\u91BD\u91C2\u946B\u9468\u9469\u96E5\u9746\u9743\u9747\u97C7\u97E5\u9A5E\u9AD5\u9B59\u9C63\u9C67\u9C66\u9C62\u9C5E\u9C60\u9E02\u9DFE\u9E07\u9E03\u9E06\u9E05\u9E00\u9E01\u9E09\u9DFF\u9DFD\u9E04\u9EA0\u9F1E\u9F46\u9F74\u9F75\u9F76\u56D4\u652E\u65B8\u6B18\u6B19\u6B17\u6B1A\u7062\u7226\u72AA\u77D8\u77D9\u7939\u7C69\u7C6B\u7CF6\u7E9A"],["f940","\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"],["f9a1","\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"]],jPe=[["8740","\u43F0\u4C32\u4603\u45A6\u4578\u{27267}\u4D77\u45B3\u{27CB1}\u4CE2\u{27CC5}\u3B95\u4736\u4744\u4C47\u4C40\u{242BF}\u{23617}\u{27352}\u{26E8B}\u{270D2}\u4C57\u{2A351}\u474F\u45DA\u4C85\u{27C6C}\u4D07\u4AA4\u46A1\u{26B23}\u7225\u{25A54}\u{21A63}\u{23E06}\u{23F61}\u664D\u56FB"],["8767","\u7D95\u591D\u{28BB9}\u3DF4\u9734\u{27BEF}\u5BDB\u{21D5E}\u5AA4\u3625\u{29EB0}\u5AD1\u5BB7\u5CFC\u676E\u8593\u{29945}\u7461\u749D\u3875\u{21D53}\u{2369E}\u{26021}\u3EEC"],["87a1","\u{258DE}\u3AF5\u7AFC\u9F97\u{24161}\u{2890D}\u{231EA}\u{20A8A}\u{2325E}\u430A\u8484\u9F96\u942F\u4930\u8613\u5896\u974A\u9218\u79D0\u7A32\u6660\u6A29\u889D\u744C\u7BC5\u6782\u7A2C\u524F\u9046\u34E6\u73C4\u{25DB9}\u74C6\u9FC7\u57B3\u492F\u544C\u4131\u{2368E}\u5818\u7A72\u{27B65}\u8B8F\u46AE\u{26E88}\u4181\u{25D99}\u7BAE\u{224BC}\u9FC8\u{224C1}\u{224C9}\u{224CC}\u9FC9\u8504\u{235BB}\u40B4\u9FCA\u44E1\u{2ADFF}\u62C1\u706E\u9FCB"],["8840","\u31C0",4,"\u{2010C}\u31C5\u{200D1}\u{200CD}\u31C6\u31C7\u{200CB}\u{21FE8}\u31C8\u{200CA}\u31C9\u31CA\u31CB\u31CC\u{2010E}\u31CD\u31CE\u0100\xC1\u01CD\xC0\u0112\xC9\u011A\xC8\u014C\xD3\u01D1\xD2\u0FFF\xCA\u0304\u1EBE\u0FFF\xCA\u030C\u1EC0\xCA\u0101\xE1\u01CE\xE0\u0251\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA"],["88a1","\u01DC\xFC\u0FFF\xEA\u0304\u1EBF\u0FFF\xEA\u030C\u1EC1\xEA\u0261\u23DA\u23DB"],["8940","\u{2A3A9}\u{21145}"],["8943","\u650A"],["8946","\u4E3D\u6EDD\u9D4E\u91DF"],["894c","\u{27735}\u6491\u4F1A\u4F28\u4FA8\u5156\u5174\u519C\u51E4\u52A1\u52A8\u533B\u534E\u53D1\u53D8\u56E2\u58F0\u5904\u5907\u5932\u5934\u5B66\u5B9E\u5B9F\u5C9A\u5E86\u603B\u6589\u67FE\u6804\u6865\u6D4E\u70BC\u7535\u7EA4\u7EAC\u7EBA\u7EC7\u7ECF\u7EDF\u7F06\u7F37\u827A\u82CF\u836F\u89C6\u8BBE\u8BE2\u8F66\u8F67\u8F6E"],["89a1","\u7411\u7CFC\u7DCD\u6946\u7AC9\u5227"],["89ab","\u918C\u78B8\u915E\u80BC"],["89b0","\u8D0B\u80F6\u{209E7}"],["89b5","\u809F\u9EC7\u4CCD\u9DC9\u9E0C\u4C3E\u{29DF6}\u{2700E}\u9E0A\u{2A133}\u35C1"],["89c1","\u6E9A\u823E\u7519"],["89c5","\u4911\u9A6C\u9A8F\u9F99\u7987\u{2846C}\u{21DCA}\u{205D0}\u{22AE6}\u4E24\u4E81\u4E80\u4E87\u4EBF\u4EEB\u4F37\u344C\u4FBD\u3E48\u5003\u5088\u347D\u3493\u34A5\u5186\u5905\u51DB\u51FC\u5205\u4E89\u5279\u5290\u5327\u35C7\u53A9\u3551\u53B0\u3553\u53C2\u5423\u356D\u3572\u3681\u5493\u54A3\u54B4\u54B9\u54D0\u54EF\u5518\u5523\u5528\u3598\u553F\u35A5\u35BF\u55D7\u35C5"],["8a40","\u{27D84}\u5525"],["8a43","\u{20C42}\u{20D15}\u{2512B}\u5590\u{22CC6}\u39EC\u{20341}\u8E46\u{24DB8}\u{294E5}\u4053\u{280BE}\u777A\u{22C38}\u3A34\u47D5\u{2815D}\u{269F2}\u{24DEA}\u64DD\u{20D7C}\u{20FB4}\u{20CD5}\u{210F4}\u648D\u8E7E\u{20E96}\u{20C0B}\u{20F64}\u{22CA9}\u{28256}\u{244D3}"],["8a64","\u{20D46}\u{29A4D}\u{280E9}\u47F4\u{24EA7}\u{22CC2}\u9AB2\u3A67\u{295F4}\u3FED\u3506\u{252C7}\u{297D4}\u{278C8}\u{22D44}\u9D6E\u9815"],["8a76","\u43D9\u{260A5}\u64B4\u54E3\u{22D4C}\u{22BCA}\u{21077}\u39FB\u{2106F}"],["8aa1","\u{266DA}\u{26716}\u{279A0}\u64EA\u{25052}\u{20C43}\u8E68\u{221A1}\u{28B4C}\u{20731}"],["8aac","\u480B\u{201A9}\u3FFA\u5873\u{22D8D}"],["8ab2","\u{245C8}\u{204FC}\u{26097}\u{20F4C}\u{20D96}\u5579\u40BB\u43BA"],["8abb","\u4AB4\u{22A66}\u{2109D}\u81AA\u98F5\u{20D9C}\u6379\u39FE\u{22775}\u8DC0\u56A1\u647C\u3E43"],["8ac9","\u{2A601}\u{20E09}\u{22ACF}\u{22CC9}"],["8ace","\u{210C8}\u{239C2}\u3992\u3A06\u{2829B}\u3578\u{25E49}\u{220C7}\u5652\u{20F31}\u{22CB2}\u{29720}\u34BC\u6C3D\u{24E3B}"],["8adf","\u{27574}\u{22E8B}\u{22208}\u{2A65B}\u{28CCD}\u{20E7A}\u{20C34}\u{2681C}\u7F93\u{210CF}\u{22803}\u{22939}\u35FB\u{251E3}\u{20E8C}\u{20F8D}\u{20EAA}\u3F93\u{20F30}\u{20D47}\u{2114F}\u{20E4C}"],["8af6","\u{20EAB}\u{20BA9}\u{20D48}\u{210C0}\u{2113D}\u3FF9\u{22696}\u6432\u{20FAD}"],["8b40","\u{233F4}\u{27639}\u{22BCE}\u{20D7E}\u{20D7F}\u{22C51}\u{22C55}\u3A18\u{20E98}\u{210C7}\u{20F2E}\u{2A632}\u{26B50}\u{28CD2}\u{28D99}\u{28CCA}\u95AA\u54CC\u82C4\u55B9"],["8b55","\u{29EC3}\u9C26\u9AB6\u{2775E}\u{22DEE}\u7140\u816D\u80EC\u5C1C\u{26572}\u8134\u3797\u535F\u{280BD}\u91B6\u{20EFA}\u{20E0F}\u{20E77}\u{20EFB}\u35DD\u{24DEB}\u3609\u{20CD6}\u56AF\u{227B5}\u{210C9}\u{20E10}\u{20E78}\u{21078}\u{21148}\u{28207}\u{21455}\u{20E79}\u{24E50}\u{22DA4}\u5A54\u{2101D}\u{2101E}\u{210F5}\u{210F6}\u579C\u{20E11}"],["8ba1","\u{27694}\u{282CD}\u{20FB5}\u{20E7B}\u{2517E}\u3703\u{20FB6}\u{21180}\u{252D8}\u{2A2BD}\u{249DA}\u{2183A}\u{24177}\u{2827C}\u5899\u5268\u361A\u{2573D}\u7BB2\u5B68\u4800\u4B2C\u9F27\u49E7\u9C1F\u9B8D\u{25B74}\u{2313D}\u55FB\u35F2\u5689\u4E28\u5902\u{21BC1}\u{2F878}\u9751\u{20086}\u4E5B\u4EBB\u353E\u5C23\u5F51\u5FC4\u38FA\u624C\u6535\u6B7A\u6C35\u6C3A\u706C\u722B\u4E2C\u72AD\u{248E9}\u7F52\u793B\u7CF9\u7F53\u{2626A}\u34C1"],["8bde","\u{2634B}\u8002\u8080\u{26612}\u{26951}\u535D\u8864\u89C1\u{278B2}\u8BA0\u8D1D\u9485\u9578\u957F\u95E8\u{28E0F}\u97E6\u9875\u98CE\u98DE\u9963\u{29810}\u9C7C\u9E1F\u9EC4\u6B6F\uF907\u4E37\u{20087}\u961D\u6237\u94A2"],["8c40","\u503B\u6DFE\u{29C73}\u9FA6\u3DC9\u888F\u{2414E}\u7077\u5CF5\u4B20\u{251CD}\u3559\u{25D30}\u6122\u{28A32}\u8FA7\u91F6\u7191\u6719\u73BA\u{23281}\u{2A107}\u3C8B\u{21980}\u4B10\u78E4\u7402\u51AE\u{2870F}\u4009\u6A63\u{2A2BA}\u4223\u860F\u{20A6F}\u7A2A\u{29947}\u{28AEA}\u9755\u704D\u5324\u{2207E}\u93F4\u76D9\u{289E3}\u9FA7\u77DD\u4EA3\u4FF0\u50BC\u4E2F\u4F17\u9FA8\u5434\u7D8B\u5892\u58D0\u{21DB6}\u5E92\u5E99\u5FC2\u{22712}\u658B"],["8ca1","\u{233F9}\u6919\u6A43\u{23C63}\u6CFF"],["8ca7","\u7200\u{24505}\u738C\u3EDB\u{24A13}\u5B15\u74B9\u8B83\u{25CA4}\u{25695}\u7A93\u7BEC\u7CC3\u7E6C\u82F8\u8597\u9FA9\u8890\u9FAA\u8EB9\u9FAB\u8FCF\u855F\u99E0\u9221\u9FAC\u{28DB9}\u{2143F}\u4071\u42A2\u5A1A"],["8cc9","\u9868\u676B\u4276\u573D"],["8cce","\u85D6\u{2497B}\u82BF\u{2710D}\u4C81\u{26D74}\u5D7B\u{26B15}\u{26FBE}\u9FAD\u9FAE\u5B96\u9FAF\u66E7\u7E5B\u6E57\u79CA\u3D88\u44C3\u{23256}\u{22796}\u439A\u4536"],["8ce6","\u5CD5\u{23B1A}\u8AF9\u5C78\u3D12\u{23551}\u5D78\u9FB2\u7157\u4558\u{240EC}\u{21E23}\u4C77\u3978\u344A\u{201A4}\u{26C41}\u8ACC\u4FB4\u{20239}\u59BF\u816C\u9856\u{298FA}\u5F3B"],["8d40","\u{20B9F}"],["8d42","\u{221C1}\u{2896D}\u4102\u46BB\u{29079}\u3F07\u9FB3\u{2A1B5}\u40F8\u37D6\u46F7\u{26C46}\u417C\u{286B2}\u{273FF}\u456D\u38D4\u{2549A}\u4561\u451B\u4D89\u4C7B\u4D76\u45EA\u3FC8\u{24B0F}\u3661\u44DE\u44BD\u41ED\u5D3E\u5D48\u5D56\u3DFC\u380F\u5DA4\u5DB9\u3820\u3838\u5E42\u5EBD\u5F25\u5F83\u3908\u3914\u393F\u394D\u60D7\u613D\u5CE5\u3989\u61B7\u61B9\u61CF\u39B8\u622C\u6290\u62E5\u6318\u39F8\u56B1"],["8da1","\u3A03\u63E2\u63FB\u6407\u645A\u3A4B\u64C0\u5D15\u5621\u9F9F\u3A97\u6586\u3ABD\u65FF\u6653\u3AF2\u6692\u3B22\u6716\u3B42\u67A4\u6800\u3B58\u684A\u6884\u3B72\u3B71\u3B7B\u6909\u6943\u725C\u6964\u699F\u6985\u3BBC\u69D6\u3BDD\u6A65\u6A74\u6A71\u6A82\u3BEC\u6A99\u3BF2\u6AAB\u6AB5\u6AD4\u6AF6\u6B81\u6BC1\u6BEA\u6C75\u6CAA\u3CCB\u6D02\u6D06\u6D26\u6D81\u3CEF\u6DA4\u6DB1\u6E15\u6E18\u6E29\u6E86\u{289C0}\u6EBB\u6EE2\u6EDA\u9F7F\u6EE8\u6EE9\u6F24\u6F34\u3D46\u{23F41}\u6F81\u6FBE\u3D6A\u3D75\u71B7\u5C99\u3D8A\u702C\u3D91\u7050\u7054\u706F\u707F\u7089\u{20325}\u43C1\u35F1\u{20ED8}"],["8e40","\u{23ED7}\u57BE\u{26ED3}\u713E\u{257E0}\u364E\u69A2\u{28BE9}\u5B74\u7A49\u{258E1}\u{294D9}\u7A65\u7A7D\u{259AC}\u7ABB\u7AB0\u7AC2\u7AC3\u71D1\u{2648D}\u41CA\u7ADA\u7ADD\u7AEA\u41EF\u54B2\u{25C01}\u7B0B\u7B55\u7B29\u{2530E}\u{25CFE}\u7BA2\u7B6F\u839C\u{25BB4}\u{26C7F}\u7BD0\u8421\u7B92\u7BB8\u{25D20}\u3DAD\u{25C65}\u8492\u7BFA\u7C06\u7C35\u{25CC1}\u7C44\u7C83\u{24882}\u7CA6\u667D\u{24578}\u7CC9\u7CC7\u7CE6\u7C74\u7CF3\u7CF5\u7CCE"],["8ea1","\u7E67\u451D\u{26E44}\u7D5D\u{26ED6}\u748D\u7D89\u7DAB\u7135\u7DB3\u7DD2\u{24057}\u{26029}\u7DE4\u3D13\u7DF5\u{217F9}\u7DE5\u{2836D}\u7E1D\u{26121}\u{2615A}\u7E6E\u7E92\u432B\u946C\u7E27\u7F40\u7F41\u7F47\u7936\u{262D0}\u99E1\u7F97\u{26351}\u7FA3\u{21661}\u{20068}\u455C\u{23766}\u4503\u{2833A}\u7FFA\u{26489}\u8005\u8008\u801D\u8028\u802F\u{2A087}\u{26CC3}\u803B\u803C\u8061\u{22714}\u4989\u{26626}\u{23DE3}\u{266E8}\u6725\u80A7\u{28A48}\u8107\u811A\u58B0\u{226F6}\u6C7F\u{26498}\u{24FB8}\u64E7\u{2148A}\u8218\u{2185E}\u6A53\u{24A65}\u{24A95}\u447A\u8229\u{20B0D}\u{26A52}\u{23D7E}\u4FF9\u{214FD}\u84E2\u8362\u{26B0A}\u{249A7}\u{23530}\u{21773}\u{23DF8}\u82AA\u691B\u{2F994}\u41DB"],["8f40","\u854B\u82D0\u831A\u{20E16}\u{217B4}\u36C1\u{2317D}\u{2355A}\u827B\u82E2\u8318\u{23E8B}\u{26DA3}\u{26B05}\u{26B97}\u{235CE}\u3DBF\u831D\u55EC\u8385\u450B\u{26DA5}\u83AC\u83C1\u83D3\u347E\u{26ED4}\u6A57\u855A\u3496\u{26E42}\u{22EEF}\u8458\u{25BE4}\u8471\u3DD3\u44E4\u6AA7\u844A\u{23CB5}\u7958\u84A8\u{26B96}\u{26E77}\u{26E43}\u84DE\u840F\u8391\u44A0\u8493\u84E4\u{25C91}\u4240\u{25CC0}\u4543\u8534\u5AF2\u{26E99}\u4527\u8573\u4516\u67BF\u8616"],["8fa1","\u{28625}\u{2863B}\u85C1\u{27088}\u8602\u{21582}\u{270CD}\u{2F9B2}\u456A\u8628\u3648\u{218A2}\u53F7\u{2739A}\u867E\u8771\u{2A0F8}\u87EE\u{22C27}\u87B1\u87DA\u880F\u5661\u866C\u6856\u460F\u8845\u8846\u{275E0}\u{23DB9}\u{275E4}\u885E\u889C\u465B\u88B4\u88B5\u63C1\u88C5\u7777\u{2770F}\u8987\u898A\u89A6\u89A9\u89A7\u89BC\u{28A25}\u89E7\u{27924}\u{27ABD}\u8A9C\u7793\u91FE\u8A90\u{27A59}\u7AE9\u{27B3A}\u{23F8F}\u4713\u{27B38}\u717C\u8B0C\u8B1F\u{25430}\u{25565}\u8B3F\u8B4C\u8B4D\u8AA9\u{24A7A}\u8B90\u8B9B\u8AAF\u{216DF}\u4615\u884F\u8C9B\u{27D54}\u{27D8F}\u{2F9D4}\u3725\u{27D53}\u8CD6\u{27D98}\u{27DBD}\u8D12\u8D03\u{21910}\u8CDB\u705C\u8D11\u{24CC9}\u3ED0\u8D77"],["9040","\u8DA9\u{28002}\u{21014}\u{2498A}\u3B7C\u{281BC}\u{2710C}\u7AE7\u8EAD\u8EB6\u8EC3\u92D4\u8F19\u8F2D\u{28365}\u{28412}\u8FA5\u9303\u{2A29F}\u{20A50}\u8FB3\u492A\u{289DE}\u{2853D}\u{23DBB}\u5EF8\u{23262}\u8FF9\u{2A014}\u{286BC}\u{28501}\u{22325}\u3980\u{26ED7}\u9037\u{2853C}\u{27ABE}\u9061\u{2856C}\u{2860B}\u90A8\u{28713}\u90C4\u{286E6}\u90AE\u90FD\u9167\u3AF0\u91A9\u91C4\u7CAC\u{28933}\u{21E89}\u920E\u6C9F\u9241\u9262\u{255B9}\u92B9\u{28AC6}\u{23C9B}\u{28B0C}\u{255DB}"],["90a1","\u{20D31}\u932C\u936B\u{28AE1}\u{28BEB}\u708F\u5AC3\u{28AE2}\u{28AE5}\u4965\u9244\u{28BEC}\u{28C39}\u{28BFF}\u9373\u945B\u8EBC\u9585\u95A6\u9426\u95A0\u6FF6\u42B9\u{2267A}\u{286D8}\u{2127C}\u{23E2E}\u49DF\u6C1C\u967B\u9696\u416C\u96A3\u{26ED5}\u61DA\u96B6\u78F5\u{28AE0}\u96BD\u53CC\u49A1\u{26CB8}\u{20274}\u{26410}\u{290AF}\u{290E5}\u{24AD1}\u{21915}\u{2330A}\u9731\u8642\u9736\u4A0F\u453D\u4585\u{24AE9}\u7075\u5B41\u971B\u975C\u{291D5}\u9757\u5B4A\u{291EB}\u975F\u9425\u50D0\u{230B7}\u{230BC}\u9789\u979F\u97B1\u97BE\u97C0\u97D2\u97E0\u{2546C}\u97EE\u741C\u{29433}\u97FF\u97F5\u{2941D}\u{2797A}\u4AD1\u9834\u9833\u984B\u9866\u3B0E\u{27175}\u3D51\u{20630}\u{2415C}"],["9140","\u{25706}\u98CA\u98B7\u98C8\u98C7\u4AFF\u{26D27}\u{216D3}\u55B0\u98E1\u98E6\u98EC\u9378\u9939\u{24A29}\u4B72\u{29857}\u{29905}\u99F5\u9A0C\u9A3B\u9A10\u9A58\u{25725}\u36C4\u{290B1}\u{29BD5}\u9AE0\u9AE2\u{29B05}\u9AF4\u4C0E\u9B14\u9B2D\u{28600}\u5034\u9B34\u{269A8}\u38C3\u{2307D}\u9B50\u9B40\u{29D3E}\u5A45\u{21863}\u9B8E\u{2424B}\u9C02\u9BFF\u9C0C\u{29E68}\u9DD4\u{29FB7}\u{2A192}\u{2A1AB}\u{2A0E1}\u{2A123}\u{2A1DF}\u9D7E\u9D83\u{2A134}\u9E0E\u6888"],["91a1","\u9DC4\u{2215B}\u{2A193}\u{2A220}\u{2193B}\u{2A233}\u9D39\u{2A0B9}\u{2A2B4}\u9E90\u9E95\u9E9E\u9EA2\u4D34\u9EAA\u9EAF\u{24364}\u9EC1\u3B60\u39E5\u3D1D\u4F32\u37BE\u{28C2B}\u9F02\u9F08\u4B96\u9424\u{26DA2}\u9F17\u9F16\u9F39\u569F\u568A\u9F45\u99B8\u{2908B}\u97F2\u847F\u9F62\u9F69\u7ADC\u9F8E\u7216\u4BBE\u{24975}\u{249BB}\u7177\u{249F8}\u{24348}\u{24A51}\u739E\u{28BDA}\u{218FA}\u799F\u{2897E}\u{28E36}\u9369\u93F3\u{28A44}\u92EC\u9381\u93CB\u{2896C}\u{244B9}\u7217\u3EEB\u7772\u7A43\u70D0\u{24473}\u{243F8}\u717E\u{217EF}\u70A3\u{218BE}\u{23599}\u3EC7\u{21885}\u{2542F}\u{217F8}\u3722\u{216FB}\u{21839}\u36E1\u{21774}\u{218D1}\u{25F4B}\u3723\u{216C0}\u575B\u{24A25}\u{213FE}\u{212A8}"],["9240","\u{213C6}\u{214B6}\u8503\u{236A6}\u8503\u8455\u{24994}\u{27165}\u{23E31}\u{2555C}\u{23EFB}\u{27052}\u44F4\u{236EE}\u{2999D}\u{26F26}\u67F9\u3733\u3C15\u3DE7\u586C\u{21922}\u6810\u4057\u{2373F}\u{240E1}\u{2408B}\u{2410F}\u{26C21}\u54CB\u569E\u{266B1}\u5692\u{20FDF}\u{20BA8}\u{20E0D}\u93C6\u{28B13}\u939C\u4EF8\u512B\u3819\u{24436}\u4EBC\u{20465}\u{2037F}\u4F4B\u4F8A\u{25651}\u5A68\u{201AB}\u{203CB}\u3999\u{2030A}\u{20414}\u3435\u4F29\u{202C0}\u{28EB3}\u{20275}\u8ADA\u{2020C}\u4E98"],["92a1","\u50CD\u510D\u4FA2\u4F03\u{24A0E}\u{23E8A}\u4F42\u502E\u506C\u5081\u4FCC\u4FE5\u5058\u50FC\u5159\u515B\u515D\u515E\u6E76\u{23595}\u{23E39}\u{23EBF}\u6D72\u{21884}\u{23E89}\u51A8\u51C3\u{205E0}\u44DD\u{204A3}\u{20492}\u{20491}\u8D7A\u{28A9C}\u{2070E}\u5259\u52A4\u{20873}\u52E1\u936E\u467A\u718C\u{2438C}\u{20C20}\u{249AC}\u{210E4}\u69D1\u{20E1D}\u7479\u3EDE\u7499\u7414\u7456\u7398\u4B8E\u{24ABC}\u{2408D}\u53D0\u3584\u720F\u{240C9}\u55B4\u{20345}\u54CD\u{20BC6}\u571D\u925D\u96F4\u9366\u57DD\u578D\u577F\u363E\u58CB\u5A99\u{28A46}\u{216FA}\u{2176F}\u{21710}\u5A2C\u59B8\u928F\u5A7E\u5ACF\u5A12\u{25946}\u{219F3}\u{21861}\u{24295}\u36F5\u6D05\u7443\u5A21\u{25E83}"],["9340","\u5A81\u{28BD7}\u{20413}\u93E0\u748C\u{21303}\u7105\u4972\u9408\u{289FB}\u93BD\u37A0\u5C1E\u5C9E\u5E5E\u5E48\u{21996}\u{2197C}\u{23AEE}\u5ECD\u5B4F\u{21903}\u{21904}\u3701\u{218A0}\u36DD\u{216FE}\u36D3\u812A\u{28A47}\u{21DBA}\u{23472}\u{289A8}\u5F0C\u5F0E\u{21927}\u{217AB}\u5A6B\u{2173B}\u5B44\u8614\u{275FD}\u8860\u607E\u{22860}\u{2262B}\u5FDB\u3EB8\u{225AF}\u{225BE}\u{29088}\u{26F73}\u61C0\u{2003E}\u{20046}\u{2261B}\u6199\u6198\u6075\u{22C9B}\u{22D07}\u{246D4}\u{2914D}"],["93a1","\u6471\u{24665}\u{22B6A}\u3A29\u{22B22}\u{23450}\u{298EA}\u{22E78}\u6337\u{2A45B}\u64B6\u6331\u63D1\u{249E3}\u{22D67}\u62A4\u{22CA1}\u643B\u656B\u6972\u3BF4\u{2308E}\u{232AD}\u{24989}\u{232AB}\u550D\u{232E0}\u{218D9}\u{2943F}\u66CE\u{23289}\u{231B3}\u3AE0\u4190\u{25584}\u{28B22}\u{2558F}\u{216FC}\u{2555B}\u{25425}\u78EE\u{23103}\u{2182A}\u{23234}\u3464\u{2320F}\u{23182}\u{242C9}\u668E\u{26D24}\u666B\u4B93\u6630\u{27870}\u{21DEB}\u6663\u{232D2}\u{232E1}\u661E\u{25872}\u38D1\u{2383A}\u{237BC}\u3B99\u{237A2}\u{233FE}\u74D0\u3B96\u678F\u{2462A}\u68B6\u681E\u3BC4\u6ABE\u3863\u{237D5}\u{24487}\u6A33\u6A52\u6AC9\u6B05\u{21912}\u6511\u6898\u6A4C\u3BD7\u6A7A\u6B57\u{23FC0}\u{23C9A}\u93A0\u92F2\u{28BEA}\u{28ACB}"],["9440","\u9289\u{2801E}\u{289DC}\u9467\u6DA5\u6F0B\u{249EC}\u6D67\u{23F7F}\u3D8F\u6E04\u{2403C}\u5A3D\u6E0A\u5847\u6D24\u7842\u713B\u{2431A}\u{24276}\u70F1\u7250\u7287\u7294\u{2478F}\u{24725}\u5179\u{24AA4}\u{205EB}\u747A\u{23EF8}\u{2365F}\u{24A4A}\u{24917}\u{25FE1}\u3F06\u3EB1\u{24ADF}\u{28C23}\u{23F35}\u60A7\u3EF3\u74CC\u743C\u9387\u7437\u449F\u{26DEA}\u4551\u7583\u3F63\u{24CD9}\u{24D06}\u3F58\u7555\u7673\u{2A5C6}\u3B19\u7468\u{28ACC}\u{249AB}\u{2498E}\u3AFB"],["94a1","\u3DCD\u{24A4E}\u3EFF\u{249C5}\u{248F3}\u91FA\u5732\u9342\u{28AE3}\u{21864}\u50DF\u{25221}\u{251E7}\u7778\u{23232}\u770E\u770F\u777B\u{24697}\u{23781}\u3A5E\u{248F0}\u7438\u749B\u3EBF\u{24ABA}\u{24AC7}\u40C8\u{24A96}\u{261AE}\u9307\u{25581}\u781E\u788D\u7888\u78D2\u73D0\u7959\u{27741}\u{256E3}\u410E\u799B\u8496\u79A5\u6A2D\u{23EFA}\u7A3A\u79F4\u416E\u{216E6}\u4132\u9235\u79F1\u{20D4C}\u{2498C}\u{20299}\u{23DBA}\u{2176E}\u3597\u556B\u3570\u36AA\u{201D4}\u{20C0D}\u7AE2\u5A59\u{226F5}\u{25AAF}\u{25A9C}\u5A0D\u{2025B}\u78F0\u5A2A\u{25BC6}\u7AFE\u41F9\u7C5D\u7C6D\u4211\u{25BB3}\u{25EBC}\u{25EA6}\u7CCD\u{249F9}\u{217B0}\u7C8E\u7C7C\u7CAE\u6AB2\u7DDC\u7E07\u7DD3\u7F4E\u{26261}"],["9540","\u{2615C}\u{27B48}\u7D97\u{25E82}\u426A\u{26B75}\u{20916}\u67D6\u{2004E}\u{235CF}\u57C4\u{26412}\u{263F8}\u{24962}\u7FDD\u7B27\u{2082C}\u{25AE9}\u{25D43}\u7B0C\u{25E0E}\u99E6\u8645\u9A63\u6A1C\u{2343F}\u39E2\u{249F7}\u{265AD}\u9A1F\u{265A0}\u8480\u{27127}\u{26CD1}\u44EA\u8137\u4402\u80C6\u8109\u8142\u{267B4}\u98C3\u{26A42}\u8262\u8265\u{26A51}\u8453\u{26DA7}\u8610\u{2721B}\u5A86\u417F\u{21840}\u5B2B\u{218A1}\u5AE4\u{218D8}\u86A0\u{2F9BC}\u{23D8F}\u882D\u{27422}\u5A02"],["95a1","\u886E\u4F45\u8887\u88BF\u88E6\u8965\u894D\u{25683}\u8954\u{27785}\u{27784}\u{28BF5}\u{28BD9}\u{28B9C}\u{289F9}\u3EAD\u84A3\u46F5\u46CF\u37F2\u8A3D\u8A1C\u{29448}\u5F4D\u922B\u{24284}\u65D4\u7129\u70C4\u{21845}\u9D6D\u8C9F\u8CE9\u{27DDC}\u599A\u77C3\u59F0\u436E\u36D4\u8E2A\u8EA7\u{24C09}\u8F30\u8F4A\u42F4\u6C58\u6FBB\u{22321}\u489B\u6F79\u6E8B\u{217DA}\u9BE9\u36B5\u{2492F}\u90BB\u9097\u5571\u4906\u91BB\u9404\u{28A4B}\u4062\u{28AFC}\u9427\u{28C1D}\u{28C3B}\u84E5\u8A2B\u9599\u95A7\u9597\u9596\u{28D34}\u7445\u3EC2\u{248FF}\u{24A42}\u{243EA}\u3EE7\u{23225}\u968F\u{28EE7}\u{28E66}\u{28E65}\u3ECC\u{249ED}\u{24A78}\u{23FEE}\u7412\u746B\u3EFC\u9741\u{290B0}"],["9640","\u6847\u4A1D\u{29093}\u{257DF}\u975D\u9368\u{28989}\u{28C26}\u{28B2F}\u{263BE}\u92BA\u5B11\u8B69\u493C\u73F9\u{2421B}\u979B\u9771\u9938\u{20F26}\u5DC1\u{28BC5}\u{24AB2}\u981F\u{294DA}\u92F6\u{295D7}\u91E5\u44C0\u{28B50}\u{24A67}\u{28B64}\u98DC\u{28A45}\u3F00\u922A\u4925\u8414\u993B\u994D\u{27B06}\u3DFD\u999B\u4B6F\u99AA\u9A5C\u{28B65}\u{258C8}\u6A8F\u9A21\u5AFE\u9A2F\u{298F1}\u4B90\u{29948}\u99BC\u4BBD\u4B97\u937D\u5872\u{21302}\u5822\u{249B8}"],["96a1","\u{214E8}\u7844\u{2271F}\u{23DB8}\u68C5\u3D7D\u9458\u3927\u6150\u{22781}\u{2296B}\u6107\u9C4F\u9C53\u9C7B\u9C35\u9C10\u9B7F\u9BCF\u{29E2D}\u9B9F\u{2A1F5}\u{2A0FE}\u9D21\u4CAE\u{24104}\u9E18\u4CB0\u9D0C\u{2A1B4}\u{2A0ED}\u{2A0F3}\u{2992F}\u9DA5\u84BD\u{26E12}\u{26FDF}\u{26B82}\u85FC\u4533\u{26DA4}\u{26E84}\u{26DF0}\u8420\u85EE\u{26E00}\u{237D7}\u{26064}\u79E2\u{2359C}\u{23640}\u492D\u{249DE}\u3D62\u93DB\u92BE\u9348\u{202BF}\u78B9\u9277\u944D\u4FE4\u3440\u9064\u{2555D}\u783D\u7854\u78B6\u784B\u{21757}\u{231C9}\u{24941}\u369A\u4F72\u6FDA\u6FD9\u701E\u701E\u5414\u{241B5}\u57BB\u58F3\u578A\u9D16\u57D7\u7134\u34AF\u{241AC}\u71EB\u{26C40}\u{24F97}\u5B28\u{217B5}\u{28A49}"],["9740","\u610C\u5ACE\u5A0B\u42BC\u{24488}\u372C\u4B7B\u{289FC}\u93BB\u93B8\u{218D6}\u{20F1D}\u8472\u{26CC0}\u{21413}\u{242FA}\u{22C26}\u{243C1}\u5994\u{23DB7}\u{26741}\u7DA8\u{2615B}\u{260A4}\u{249B9}\u{2498B}\u{289FA}\u92E5\u73E2\u3EE9\u74B4\u{28B63}\u{2189F}\u3EE1\u{24AB3}\u6AD8\u73F3\u73FB\u3ED6\u{24A3E}\u{24A94}\u{217D9}\u{24A66}\u{203A7}\u{21424}\u{249E5}\u7448\u{24916}\u70A5\u{24976}\u9284\u73E6\u935F\u{204FE}\u9331\u{28ACE}\u{28A16}\u9386\u{28BE7}\u{255D5}\u4935\u{28A82}\u716B"],["97a1","\u{24943}\u{20CFF}\u56A4\u{2061A}\u{20BEB}\u{20CB8}\u5502\u79C4\u{217FA}\u7DFE\u{216C2}\u{24A50}\u{21852}\u452E\u9401\u370A\u{28AC0}\u{249AD}\u59B0\u{218BF}\u{21883}\u{27484}\u5AA1\u36E2\u{23D5B}\u36B0\u925F\u5A79\u{28A81}\u{21862}\u9374\u3CCD\u{20AB4}\u4A96\u398A\u50F4\u3D69\u3D4C\u{2139C}\u7175\u42FB\u{28218}\u6E0F\u{290E4}\u44EB\u6D57\u{27E4F}\u7067\u6CAF\u3CD6\u{23FED}\u{23E2D}\u6E02\u6F0C\u3D6F\u{203F5}\u7551\u36BC\u34C8\u4680\u3EDA\u4871\u59C4\u926E\u493E\u8F41\u{28C1C}\u{26BC0}\u5812\u57C8\u36D6\u{21452}\u70FE\u{24362}\u{24A71}\u{22FE3}\u{212B0}\u{223BD}\u68B9\u6967\u{21398}\u{234E5}\u{27BF4}\u{236DF}\u{28A83}\u{237D6}\u{233FA}\u{24C9F}\u6A1A\u{236AD}\u{26CB7}\u843E\u44DF\u44CE"],["9840","\u{26D26}\u{26D51}\u{26C82}\u{26FDE}\u6F17\u{27109}\u833D\u{2173A}\u83ED\u{26C80}\u{27053}\u{217DB}\u5989\u5A82\u{217B3}\u5A61\u5A71\u{21905}\u{241FC}\u372D\u59EF\u{2173C}\u36C7\u718E\u9390\u669A\u{242A5}\u5A6E\u5A2B\u{24293}\u6A2B\u{23EF9}\u{27736}\u{2445B}\u{242CA}\u711D\u{24259}\u{289E1}\u4FB0\u{26D28}\u5CC2\u{244CE}\u{27E4D}\u{243BD}\u6A0C\u{24256}\u{21304}\u70A6\u7133\u{243E9}\u3DA5\u6CDF\u{2F825}\u{24A4F}\u7E65\u59EB\u5D2F\u3DF3\u5F5C\u{24A5D}\u{217DF}\u7DA4\u8426"],["98a1","\u5485\u{23AFA}\u{23300}\u{20214}\u577E\u{208D5}\u{20619}\u3FE5\u{21F9E}\u{2A2B6}\u7003\u{2915B}\u5D70\u738F\u7CD3\u{28A59}\u{29420}\u4FC8\u7FE7\u72CD\u7310\u{27AF4}\u7338\u7339\u{256F6}\u7341\u7348\u3EA9\u{27B18}\u906C\u71F5\u{248F2}\u73E1\u81F6\u3ECA\u770C\u3ED1\u6CA2\u56FD\u7419\u741E\u741F\u3EE2\u3EF0\u3EF4\u3EFA\u74D3\u3F0E\u3F53\u7542\u756D\u7572\u758D\u3F7C\u75C8\u75DC\u3FC0\u764D\u3FD7\u7674\u3FDC\u767A\u{24F5C}\u7188\u5623\u8980\u5869\u401D\u7743\u4039\u6761\u4045\u35DB\u7798\u406A\u406F\u5C5E\u77BE\u77CB\u58F2\u7818\u70B9\u781C\u40A8\u7839\u7847\u7851\u7866\u8448\u{25535}\u7933\u6803\u7932\u4103"],["9940","\u4109\u7991\u7999\u8FBB\u7A06\u8FBC\u4167\u7A91\u41B2\u7ABC\u8279\u41C4\u7ACF\u7ADB\u41CF\u4E21\u7B62\u7B6C\u7B7B\u7C12\u7C1B\u4260\u427A\u7C7B\u7C9C\u428C\u7CB8\u4294\u7CED\u8F93\u70C0\u{20CCF}\u7DCF\u7DD4\u7DD0\u7DFD\u7FAE\u7FB4\u729F\u4397\u8020\u8025\u7B39\u802E\u8031\u8054\u3DCC\u57B4\u70A0\u80B7\u80E9\u43ED\u810C\u732A\u810E\u8112\u7560\u8114\u4401\u3B39\u8156\u8159\u815A"],["99a1","\u4413\u583A\u817C\u8184\u4425\u8193\u442D\u81A5\u57EF\u81C1\u81E4\u8254\u448F\u82A6\u8276\u82CA\u82D8\u82FF\u44B0\u8357\u9669\u698A\u8405\u70F5\u8464\u60E3\u8488\u4504\u84BE\u84E1\u84F8\u8510\u8538\u8552\u453B\u856F\u8570\u85E0\u4577\u8672\u8692\u86B2\u86EF\u9645\u878B\u4606\u4617\u88AE\u88FF\u8924\u8947\u8991\u{27967}\u8A29\u8A38\u8A94\u8AB4\u8C51\u8CD4\u8CF2\u8D1C\u4798\u585F\u8DC3\u47ED\u4EEE\u8E3A\u55D8\u5754\u8E71\u55F5\u8EB0\u4837\u8ECE\u8EE2\u8EE4\u8EED\u8EF2\u8FB7\u8FC1\u8FCA\u8FCC\u9033\u99C4\u48AD\u98E0\u9213\u491E\u9228\u9258\u926B\u92B1\u92AE\u92BF"],["9a40","\u92E3\u92EB\u92F3\u92F4\u92FD\u9343\u9384\u93AD\u4945\u4951\u9EBF\u9417\u5301\u941D\u942D\u943E\u496A\u9454\u9479\u952D\u95A2\u49A7\u95F4\u9633\u49E5\u67A0\u4A24\u9740\u4A35\u97B2\u97C2\u5654\u4AE4\u60E8\u98B9\u4B19\u98F1\u5844\u990E\u9919\u51B4\u991C\u9937\u9942\u995D\u9962\u4B70\u99C5\u4B9D\u9A3C\u9B0F\u7A83\u9B69\u9B81\u9BDD\u9BF1\u9BF4\u4C6D\u9C20\u376F\u{21BC2}\u9D49\u9C3A"],["9aa1","\u9EFE\u5650\u9D93\u9DBD\u9DC0\u9DFC\u94F6\u8FB6\u9E7B\u9EAC\u9EB1\u9EBD\u9EC6\u94DC\u9EE2\u9EF1\u9EF8\u7AC8\u9F44\u{20094}\u{202B7}\u{203A0}\u691A\u94C3\u59AC\u{204D7}\u5840\u94C1\u37B9\u{205D5}\u{20615}\u{20676}\u{216BA}\u5757\u7173\u{20AC2}\u{20ACD}\u{20BBF}\u546A\u{2F83B}\u{20BCB}\u549E\u{20BFB}\u{20C3B}\u{20C53}\u{20C65}\u{20C7C}\u60E7\u{20C8D}\u567A\u{20CB5}\u{20CDD}\u{20CED}\u{20D6F}\u{20DB2}\u{20DC8}\u6955\u9C2F\u87A5\u{20E04}\u{20E0E}\u{20ED7}\u{20F90}\u{20F2D}\u{20E73}\u5C20\u{20FBC}\u5E0B\u{2105C}\u{2104F}\u{21076}\u671E\u{2107B}\u{21088}\u{21096}\u3647\u{210BF}\u{210D3}\u{2112F}\u{2113B}\u5364\u84AD\u{212E3}\u{21375}\u{21336}\u8B81\u{21577}\u{21619}\u{217C3}\u{217C7}\u4E78\u70BB\u{2182D}\u{2196A}"],["9b40","\u{21A2D}\u{21A45}\u{21C2A}\u{21C70}\u{21CAC}\u{21EC8}\u62C3\u{21ED5}\u{21F15}\u7198\u6855\u{22045}\u69E9\u36C8\u{2227C}\u{223D7}\u{223FA}\u{2272A}\u{22871}\u{2294F}\u82FD\u{22967}\u{22993}\u{22AD5}\u89A5\u{22AE8}\u8FA0\u{22B0E}\u97B8\u{22B3F}\u9847\u9ABD\u{22C4C}"],["9b62","\u{22C88}\u{22CB7}\u{25BE8}\u{22D08}\u{22D12}\u{22DB7}\u{22D95}\u{22E42}\u{22F74}\u{22FCC}\u{23033}\u{23066}\u{2331F}\u{233DE}\u5FB1\u6648\u66BF\u{27A79}\u{23567}\u{235F3}\u7201\u{249BA}\u77D7\u{2361A}\u{23716}\u7E87\u{20346}\u58B5\u670E"],["9ba1","\u6918\u{23AA7}\u{27657}\u{25FE2}\u{23E11}\u{23EB9}\u{275FE}\u{2209A}\u48D0\u4AB8\u{24119}\u{28A9A}\u{242EE}\u{2430D}\u{2403B}\u{24334}\u{24396}\u{24A45}\u{205CA}\u51D2\u{20611}\u599F\u{21EA8}\u3BBE\u{23CFF}\u{24404}\u{244D6}\u5788\u{24674}\u399B\u{2472F}\u{285E8}\u{299C9}\u3762\u{221C3}\u8B5E\u{28B4E}\u99D6\u{24812}\u{248FB}\u{24A15}\u7209\u{24AC0}\u{20C78}\u5965\u{24EA5}\u{24F86}\u{20779}\u8EDA\u{2502C}\u528F\u573F\u7171\u{25299}\u{25419}\u{23F4A}\u{24AA7}\u55BC\u{25446}\u{2546E}\u{26B52}\u91D4\u3473\u{2553F}\u{27632}\u{2555E}\u4718\u{25562}\u{25566}\u{257C7}\u{2493F}\u{2585D}\u5066\u34FB\u{233CC}\u60DE\u{25903}\u477C\u{28948}\u{25AAE}\u{25B89}\u{25C06}\u{21D90}\u57A1\u7151\u6FB6\u{26102}\u{27C12}\u9056\u{261B2}\u{24F9A}\u8B62\u{26402}\u{2644A}"],["9c40","\u5D5B\u{26BF7}\u8F36\u{26484}\u{2191C}\u8AEA\u{249F6}\u{26488}\u{23FEF}\u{26512}\u4BC0\u{265BF}\u{266B5}\u{2271B}\u9465\u{257E1}\u6195\u5A27\u{2F8CD}\u4FBB\u56B9\u{24521}\u{266FC}\u4E6A\u{24934}\u9656\u6D8F\u{26CBD}\u3618\u8977\u{26799}\u{2686E}\u{26411}\u{2685E}\u71DF\u{268C7}\u7B42\u{290C0}\u{20A11}\u{26926}\u9104\u{26939}\u7A45\u9DF0\u{269FA}\u9A26\u{26A2D}\u365F\u{26469}\u{20021}\u7983\u{26A34}\u{26B5B}\u5D2C\u{23519}\u83CF\u{26B9D}\u46D0\u{26CA4}\u753B\u8865\u{26DAE}\u58B6"],["9ca1","\u371C\u{2258D}\u{2704B}\u{271CD}\u3C54\u{27280}\u{27285}\u9281\u{2217A}\u{2728B}\u9330\u{272E6}\u{249D0}\u6C39\u949F\u{27450}\u{20EF8}\u8827\u88F5\u{22926}\u{28473}\u{217B1}\u6EB8\u{24A2A}\u{21820}\u39A4\u36B9\u5C10\u79E3\u453F\u66B6\u{29CAD}\u{298A4}\u8943\u{277CC}\u{27858}\u56D6\u40DF\u{2160A}\u39A1\u{2372F}\u{280E8}\u{213C5}\u71AD\u8366\u{279DD}\u{291A8}\u5A67\u4CB7\u{270AF}\u{289AB}\u{279FD}\u{27A0A}\u{27B0B}\u{27D66}\u{2417A}\u7B43\u797E\u{28009}\u6FB5\u{2A2DF}\u6A03\u{28318}\u53A2\u{26E07}\u93BF\u6836\u975D\u{2816F}\u{28023}\u{269B5}\u{213ED}\u{2322F}\u{28048}\u5D85\u{28C30}\u{28083}\u5715\u9823\u{28949}\u5DAB\u{24988}\u65BE\u69D5\u53D2\u{24AA5}\u{23F81}\u3C11\u6736\u{28090}\u{280F4}\u{2812E}\u{21FA1}\u{2814F}"],["9d40","\u{28189}\u{281AF}\u{2821A}\u{28306}\u{2832F}\u{2838A}\u35CA\u{28468}\u{286AA}\u48FA\u63E6\u{28956}\u7808\u9255\u{289B8}\u43F2\u{289E7}\u43DF\u{289E8}\u{28B46}\u{28BD4}\u59F8\u{28C09}\u8F0B\u{28FC5}\u{290EC}\u7B51\u{29110}\u{2913C}\u3DF7\u{2915E}\u{24ACA}\u8FD0\u728F\u568B\u{294E7}\u{295E9}\u{295B0}\u{295B8}\u{29732}\u{298D1}\u{29949}\u{2996A}\u{299C3}\u{29A28}\u{29B0E}\u{29D5A}\u{29D9B}\u7E9F\u{29EF8}\u{29F23}\u4CA4\u9547\u{2A293}\u71A2\u{2A2FF}\u4D91\u9012\u{2A5CB}\u4D9C\u{20C9C}\u8FBE\u55C1"],["9da1","\u8FBA\u{224B0}\u8FB9\u{24A93}\u4509\u7E7F\u6F56\u6AB1\u4EEA\u34E4\u{28B2C}\u{2789D}\u373A\u8E80\u{217F5}\u{28024}\u{28B6C}\u{28B99}\u{27A3E}\u{266AF}\u3DEB\u{27655}\u{23CB7}\u{25635}\u{25956}\u4E9A\u{25E81}\u{26258}\u56BF\u{20E6D}\u8E0E\u5B6D\u{23E88}\u{24C9E}\u63DE\u62D0\u{217F6}\u{2187B}\u6530\u562D\u{25C4A}\u541A\u{25311}\u3DC6\u{29D98}\u4C7D\u5622\u561E\u7F49\u{25ED8}\u5975\u{23D40}\u8770\u4E1C\u{20FEA}\u{20D49}\u{236BA}\u8117\u9D5E\u8D18\u763B\u9C45\u764E\u77B9\u9345\u5432\u8148\u82F7\u5625\u8132\u8418\u80BD\u55EA\u7962\u5643\u5416\u{20E9D}\u35CE\u5605\u55F1\u66F1\u{282E2}\u362D\u7534\u55F0\u55BA\u5497\u5572\u{20C41}\u{20C96}\u5ED0\u{25148}\u{20E76}\u{22C62}"],["9e40","\u{20EA2}\u9EAB\u7D5A\u55DE\u{21075}\u629D\u976D\u5494\u8CCD\u71F6\u9176\u63FC\u63B9\u63FE\u5569\u{22B43}\u9C72\u{22EB3}\u519A\u34DF\u{20DA7}\u51A7\u544D\u551E\u5513\u7666\u8E2D\u{2688A}\u75B1\u80B6\u8804\u8786\u88C7\u81B6\u841C\u{210C1}\u44EC\u7304\u{24706}\u5B90\u830B\u{26893}\u567B\u{226F4}\u{27D2F}\u{241A3}\u{27D73}\u{26ED0}\u{272B6}\u9170\u{211D9}\u9208\u{23CFC}\u{2A6A9}\u{20EAC}\u{20EF9}\u7266\u{21CA2}\u474E\u{24FC2}\u{27FF9}\u{20FEB}\u40FA"],["9ea1","\u9C5D\u651F\u{22DA0}\u48F3\u{247E0}\u{29D7C}\u{20FEC}\u{20E0A}\u6062\u{275A3}\u{20FED}"],["9ead","\u{26048}\u{21187}\u71A3\u7E8E\u9D50\u4E1A\u4E04\u3577\u5B0D\u6CB2\u5367\u36AC\u39DC\u537D\u36A5\u{24618}\u589A\u{24B6E}\u822D\u544B\u57AA\u{25A95}\u{20979}"],["9ec5","\u3A52\u{22465}\u7374\u{29EAC}\u4D09\u9BED\u{23CFE}\u{29F30}\u4C5B\u{24FA9}\u{2959E}\u{29FDE}\u845C\u{23DB6}\u{272B2}\u{267B3}\u{23720}\u632E\u7D25\u{23EF7}\u{23E2C}\u3A2A\u9008\u52CC\u3E74\u367A\u45E9\u{2048E}\u7640\u5AF0\u{20EB6}\u787A\u{27F2E}\u58A7\u40BF\u567C\u9B8B\u5D74\u7654\u{2A434}\u9E85\u4CE1\u75F9\u37FB\u6119\u{230DA}\u{243F2}"],["9ef5","\u565D\u{212A9}\u57A7\u{24963}\u{29E06}\u5234\u{270AE}\u35AD\u6C4A\u9D7C"],["9f40","\u7C56\u9B39\u57DE\u{2176C}\u5C53\u64D3\u{294D0}\u{26335}\u{27164}\u86AD\u{20D28}\u{26D22}\u{24AE2}\u{20D71}"],["9f4f","\u51FE\u{21F0F}\u5D8E\u9703\u{21DD1}\u9E81\u904C\u7B1F\u9B02\u5CD1\u7BA3\u6268\u6335\u9AFF\u7BCF\u9B2A\u7C7E\u9B2E\u7C42\u7C86\u9C15\u7BFC\u9B09\u9F17\u9C1B\u{2493E}\u9F5A\u5573\u5BC3\u4FFD\u9E98\u4FF2\u5260\u3E06\u52D1\u5767\u5056\u59B7\u5E12\u97C8\u9DAB\u8F5C\u5469\u97B4\u9940\u97BA\u532C\u6130"],["9fa1","\u692C\u53DA\u9C0A\u9D02\u4C3B\u9641\u6980\u50A6\u7546\u{2176D}\u99DA\u5273"],["9fae","\u9159\u9681\u915C"],["9fb2","\u9151\u{28E97}\u637F\u{26D23}\u6ACA\u5611\u918E\u757A\u6285\u{203FC}\u734F\u7C70\u{25C21}\u{23CFD}"],["9fc1","\u{24919}\u76D6\u9B9D\u4E2A\u{20CD4}\u83BE\u8842"],["9fc9","\u5C4A\u69C0\u50ED\u577A\u521F\u5DF5\u4ECE\u6C31\u{201F2}\u4F39\u549C\u54DA\u529A\u8D82\u35FE\u5F0C\u35F3"],["9fdb","\u6B52\u917C\u9FA5\u9B97\u982E\u98B4\u9ABA\u9EA8\u9E84\u717A\u7B14"],["9fe7","\u6BFA\u8818\u7F78"],["9feb","\u5620\u{2A64A}\u8E77\u9F53"],["9ff0","\u8DD4\u8E4F\u9E1C\u8E01\u6282\u{2837D}\u8E28\u8E75\u7AD3\u{24A77}\u7A3E\u78D8\u6CEA\u8A67\u7607"],["a040","\u{28A5A}\u9F26\u6CCE\u87D6\u75C3\u{2A2B2}\u7853\u{2F840}\u8D0C\u72E2\u7371\u8B2D\u7302\u74F1\u8CEB\u{24ABB}\u862F\u5FBA\u88A0\u44B7"],["a055","\u{2183B}\u{26E05}"],["a058","\u8A7E\u{2251B}"],["a05b","\u60FD\u7667\u9AD7\u9D44\u936E\u9B8F\u87F5"],["a063","\u880F\u8CF7\u732C\u9721\u9BB0\u35D6\u72B2\u4C07\u7C51\u994A\u{26159}\u6159\u4C04\u9E96\u617D"],["a073","\u575F\u616F\u62A6\u6239\u62CE\u3A5C\u61E2\u53AA\u{233F5}\u6364\u6802\u35D2"],["a0a1","\u5D57\u{28BC2}\u8FDA\u{28E39}"],["a0a6","\u50D9\u{21D46}\u7906\u5332\u9638\u{20F3B}\u4065"],["a0ae","\u77FE"],["a0b0","\u7CC2\u{25F1A}\u7CDA\u7A2D\u8066\u8063\u7D4D\u7505\u74F2\u8994\u821A\u670C\u8062\u{27486}\u805B\u74F0\u8103\u7724\u8989\u{267CC}\u7553\u{26ED1}\u87A9\u87CE\u81C8\u878C\u8A49\u8CAD\u8B43\u772B\u74F8\u84DA\u3635\u69B2\u8DA6"],["a0d4","\u89A9\u7468\u6DB9\u87C1\u{24011}\u74E7\u3DDB\u7176\u60A4\u619C\u3CD1\u7162\u6077"],["a0e2","\u7F71\u{28B2D}\u7250\u60E9\u4B7E\u5220\u3C18\u{23CC7}\u{25ED7}\u{27656}\u{25531}\u{21944}\u{212FE}\u{29903}\u{26DDC}\u{270AD}\u5CC1\u{261AD}\u{28A0F}\u{23677}\u{200EE}\u{26846}\u{24F0E}\u4562\u5B1F\u{2634C}\u9F50\u9EA6\u{2626B}"],["a3c0","\u2400",31,"\u2421"],["c6a1","\u2460",9,"\u2474",9,"\u2170",9,"\u4E36\u4E3F\u4E85\u4EA0\u5182\u5196\u51AB\u52F9\u5338\u5369\u53B6\u590A\u5B80\u5DDB\u2F33\u5E7F\u5EF4\u5F50\u5F61\u6534\u65E0\u7592\u7676\u8FB5\u96B6\xA8\u02C6\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\uFF3B\uFF3D\u273D\u3041",23],["c740","\u3059",58,"\u30A1\u30A2\u30A3\u30A4"],["c7a1","\u30A5",81,"\u0410",5,"\u0401\u0416",4],["c840","\u041B",26,"\u0451\u0436",25,"\u21E7\u21B8\u21B9\u31CF\u{200CC}\u4E5A\u{2008A}\u5202\u4491"],["c8a1","\u9FB0\u5188\u9FB1\u{27607}"],["c8cd","\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u309B\u309C\u2E80\u2E84\u2E86\u2E87\u2E88\u2E8A\u2E8C\u2E8D\u2E95\u2E9C\u2E9D\u2EA5\u2EA7\u2EAA\u2EAC\u2EAE\u2EB6\u2EBC\u2EBE\u2EC6\u2ECA\u2ECC\u2ECD\u2ECF\u2ED6\u2ED7\u2EDE\u2EE3"],["c8f5","\u0283\u0250\u025B\u0254\u0275\u0153\xF8\u014B\u028A\u026A"],["f9fe","\uFFED"],["fa40","\u{20547}\u92DB\u{205DF}\u{23FC5}\u854C\u42B5\u73EF\u51B5\u3649\u{24942}\u{289E4}\u9344\u{219DB}\u82EE\u{23CC8}\u783C\u6744\u62DF\u{24933}\u{289AA}\u{202A0}\u{26BB3}\u{21305}\u4FAB\u{224ED}\u5008\u{26D29}\u{27A84}\u{23600}\u{24AB1}\u{22513}\u5029\u{2037E}\u5FA4\u{20380}\u{20347}\u6EDB\u{2041F}\u507D\u5101\u347A\u510E\u986C\u3743\u8416\u{249A4}\u{20487}\u5160\u{233B4}\u516A\u{20BFF}\u{220FC}\u{202E5}\u{22530}\u{2058E}\u{23233}\u{21983}\u5B82\u877D\u{205B3}\u{23C99}\u51B2\u51B8"],["faa1","\u9D34\u51C9\u51CF\u51D1\u3CDC\u51D3\u{24AA6}\u51B3\u51E2\u5342\u51ED\u83CD\u693E\u{2372D}\u5F7B\u520B\u5226\u523C\u52B5\u5257\u5294\u52B9\u52C5\u7C15\u8542\u52E0\u860D\u{26B13}\u5305\u{28ADE}\u5549\u6ED9\u{23F80}\u{20954}\u{23FEC}\u5333\u5344\u{20BE2}\u6CCB\u{21726}\u681B\u73D5\u604A\u3EAA\u38CC\u{216E8}\u71DD\u44A2\u536D\u5374\u{286AB}\u537E\u537F\u{21596}\u{21613}\u77E6\u5393\u{28A9B}\u53A0\u53AB\u53AE\u73A7\u{25772}\u3F59\u739C\u53C1\u53C5\u6C49\u4E49\u57FE\u53D9\u3AAB\u{20B8F}\u53E0\u{23FEB}\u{22DA3}\u53F6\u{20C77}\u5413\u7079\u552B\u6657\u6D5B\u546D\u{26B53}\u{20D74}\u555D\u548F\u54A4\u47A6\u{2170D}\u{20EDD}\u3DB4\u{20D4D}"],["fb40","\u{289BC}\u{22698}\u5547\u4CED\u542F\u7417\u5586\u55A9\u5605\u{218D7}\u{2403A}\u4552\u{24435}\u66B3\u{210B4}\u5637\u66CD\u{2328A}\u66A4\u66AD\u564D\u564F\u78F1\u56F1\u9787\u53FE\u5700\u56EF\u56ED\u{28B66}\u3623\u{2124F}\u5746\u{241A5}\u6C6E\u708B\u5742\u36B1\u{26C7E}\u57E6\u{21416}\u5803\u{21454}\u{24363}\u5826\u{24BF5}\u585C\u58AA\u3561\u58E0\u58DC\u{2123C}\u58FB\u5BFF\u5743\u{2A150}\u{24278}\u93D3\u35A1\u591F\u68A6\u36C3\u6E59"],["fba1","\u{2163E}\u5A24\u5553\u{21692}\u8505\u59C9\u{20D4E}\u{26C81}\u{26D2A}\u{217DC}\u59D9\u{217FB}\u{217B2}\u{26DA6}\u6D71\u{21828}\u{216D5}\u59F9\u{26E45}\u5AAB\u5A63\u36E6\u{249A9}\u5A77\u3708\u5A96\u7465\u5AD3\u{26FA1}\u{22554}\u3D85\u{21911}\u3732\u{216B8}\u5E83\u52D0\u5B76\u6588\u5B7C\u{27A0E}\u4004\u485D\u{20204}\u5BD5\u6160\u{21A34}\u{259CC}\u{205A5}\u5BF3\u5B9D\u4D10\u5C05\u{21B44}\u5C13\u73CE\u5C14\u{21CA5}\u{26B28}\u5C49\u48DD\u5C85\u5CE9\u5CEF\u5D8B\u{21DF9}\u{21E37}\u5D10\u5D18\u5D46\u{21EA4}\u5CBA\u5DD7\u82FC\u382D\u{24901}\u{22049}\u{22173}\u8287\u3836\u3BC2\u5E2E\u6A8A\u5E75\u5E7A\u{244BC}\u{20CD3}\u53A6\u4EB7\u5ED0\u53A8\u{21771}\u5E09\u5EF4\u{28482}"],["fc40","\u5EF9\u5EFB\u38A0\u5EFC\u683E\u941B\u5F0D\u{201C1}\u{2F894}\u3ADE\u48AE\u{2133A}\u5F3A\u{26888}\u{223D0}\u5F58\u{22471}\u5F63\u97BD\u{26E6E}\u5F72\u9340\u{28A36}\u5FA7\u5DB6\u3D5F\u{25250}\u{21F6A}\u{270F8}\u{22668}\u91D6\u{2029E}\u{28A29}\u6031\u6685\u{21877}\u3963\u3DC7\u3639\u5790\u{227B4}\u7971\u3E40\u609E\u60A4\u60B3\u{24982}\u{2498F}\u{27A53}\u74A4\u50E1\u5AA0\u6164\u8424\u6142\u{2F8A6}\u{26ED2}\u6181\u51F4\u{20656}\u6187\u5BAA\u{23FB7}"],["fca1","\u{2285F}\u61D3\u{28B9D}\u{2995D}\u61D0\u3932\u{22980}\u{228C1}\u6023\u615C\u651E\u638B\u{20118}\u62C5\u{21770}\u62D5\u{22E0D}\u636C\u{249DF}\u3A17\u6438\u63F8\u{2138E}\u{217FC}\u6490\u6F8A\u{22E36}\u9814\u{2408C}\u{2571D}\u64E1\u64E5\u947B\u3A66\u643A\u3A57\u654D\u6F16\u{24A28}\u{24A23}\u6585\u656D\u655F\u{2307E}\u65B5\u{24940}\u4B37\u65D1\u40D8\u{21829}\u65E0\u65E3\u5FDF\u{23400}\u6618\u{231F7}\u{231F8}\u6644\u{231A4}\u{231A5}\u664B\u{20E75}\u6667\u{251E6}\u6673\u6674\u{21E3D}\u{23231}\u{285F4}\u{231C8}\u{25313}\u77C5\u{228F7}\u99A4\u6702\u{2439C}\u{24A21}\u3B2B\u69FA\u{237C2}\u675E\u6767\u6762\u{241CD}\u{290ED}\u67D7\u44E9\u6822\u6E50\u923C\u6801\u{233E6}\u{26DA0}\u685D"],["fd40","\u{2346F}\u69E1\u6A0B\u{28ADF}\u6973\u68C3\u{235CD}\u6901\u6900\u3D32\u3A01\u{2363C}\u3B80\u67AC\u6961\u{28A4A}\u42FC\u6936\u6998\u3BA1\u{203C9}\u8363\u5090\u69F9\u{23659}\u{2212A}\u6A45\u{23703}\u6A9D\u3BF3\u67B1\u6AC8\u{2919C}\u3C0D\u6B1D\u{20923}\u60DE\u6B35\u6B74\u{227CD}\u6EB5\u{23ADB}\u{203B5}\u{21958}\u3740\u5421\u{23B5A}\u6BE1\u{23EFC}\u6BDC\u6C37\u{2248B}\u{248F1}\u{26B51}\u6C5A\u8226\u6C79\u{23DBC}\u44C5\u{23DBD}\u{241A4}\u{2490C}\u{24900}"],["fda1","\u{23CC9}\u36E5\u3CEB\u{20D32}\u9B83\u{231F9}\u{22491}\u7F8F\u6837\u{26D25}\u{26DA1}\u{26DEB}\u6D96\u6D5C\u6E7C\u6F04\u{2497F}\u{24085}\u{26E72}\u8533\u{26F74}\u51C7\u6C9C\u6E1D\u842E\u{28B21}\u6E2F\u{23E2F}\u7453\u{23F82}\u79CC\u6E4F\u5A91\u{2304B}\u6FF8\u370D\u6F9D\u{23E30}\u6EFA\u{21497}\u{2403D}\u4555\u93F0\u6F44\u6F5C\u3D4E\u6F74\u{29170}\u3D3B\u6F9F\u{24144}\u6FD3\u{24091}\u{24155}\u{24039}\u{23FF0}\u{23FB4}\u{2413F}\u51DF\u{24156}\u{24157}\u{24140}\u{261DD}\u704B\u707E\u70A7\u7081\u70CC\u70D5\u70D6\u70DF\u4104\u3DE8\u71B4\u7196\u{24277}\u712B\u7145\u5A88\u714A\u716E\u5C9C\u{24365}\u714F\u9362\u{242C1}\u712C\u{2445A}\u{24A27}\u{24A22}\u71BA\u{28BE8}\u70BD\u720E"],["fe40","\u9442\u7215\u5911\u9443\u7224\u9341\u{25605}\u722E\u7240\u{24974}\u68BD\u7255\u7257\u3E55\u{23044}\u680D\u6F3D\u7282\u732A\u732B\u{24823}\u{2882B}\u48ED\u{28804}\u7328\u732E\u73CF\u73AA\u{20C3A}\u{26A2E}\u73C9\u7449\u{241E2}\u{216E7}\u{24A24}\u6623\u36C5\u{249B7}\u{2498D}\u{249FB}\u73F7\u7415\u6903\u{24A26}\u7439\u{205C3}\u3ED7\u745C\u{228AD}\u7460\u{28EB2}\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\u{24A8C}"],["fea1","\u{2415F}\u{24A79}\u{28B8F}\u5B46\u{28C03}\u{2189E}\u74C8\u{21988}\u750E\u74E9\u751E\u{28ED9}\u{21A4B}\u5BD7\u{28EAC}\u9385\u754D\u754A\u7567\u756E\u{24F82}\u3F04\u{24D13}\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\u{263F5}\u7690\u81EF\u37F8\u{26911}\u{2690E}\u76A1\u76A5\u76B7\u76CC\u{26F9F}\u8462\u{2509D}\u{2517D}\u{21E1C}\u771E\u7726\u7740\u64AF\u{25220}\u7758\u{232AC}\u77AF\u{28964}\u{28968}\u{216C1}\u77F4\u7809\u{21376}\u{24A12}\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\u{255E0}\u78D7\u7934\u78B1\u{2760C}\u8FB8\u8884\u{28B2B}\u{26083}\u{2261C}\u7986\u8900\u6902\u7980\u{25857}\u799D\u{27B39}\u793C\u79A9\u6E2A\u{27126}\u3EA8\u79C6\u{2910D}\u79D4"]],g$,y$;function VPe(){return y$||(y$=1,g$={shiftjis:{type:"_dbcs",table:function(){return RPe},encodeAdd:{"\xA5":92,"\u203E":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return BPe},encodeAdd:{"\xA5":92,"\u203E":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return H4}},gbk:{type:"_dbcs",table:function(){return H4.concat(f$)}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return H4.concat(f$)},gb18030:function(){return zPe},encodeSkipVals:[128],encodeAdd:{"\u20AC":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return UPe}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return m$}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return m$.concat(jPe)},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}),g$}var b$;function GPe(){return b$||(b$=1,(function(r){for(var e=tq,t=[EPe(),CPe(),TPe(),kPe(),IPe(),LPe(),OPe(),DPe(),VPe()],n=0;n<t.length;n++){var i=t[n];e(r,i)}})(t$)),t$}var W4,v$;function HPe(){if(v$)return W4;v$=1;var r=dd.Buffer;return W4=function(e){var t=e.Transform;function n(o,a){this.conv=o,a=a||{},a.decodeStrings=!1,t.call(this,a)}n.prototype=Object.create(t.prototype,{constructor:{value:n}}),n.prototype._transform=function(o,a,s){if(typeof o!="string")return s(new Error("Iconv encoding stream needs strings as its input."));try{var l=this.conv.write(o);l&&l.length&&this.push(l),s()}catch(c){s(c)}},n.prototype._flush=function(o){try{var a=this.conv.end();a&&a.length&&this.push(a),o()}catch(s){o(s)}},n.prototype.collect=function(o){var a=[];return this.on("error",o),this.on("data",function(s){a.push(s)}),this.on("end",function(){o(null,r.concat(a))}),this};function i(o,a){this.conv=o,a=a||{},a.encoding=this.encoding="utf8",t.call(this,a)}return i.prototype=Object.create(t.prototype,{constructor:{value:i}}),i.prototype._transform=function(o,a,s){if(!r.isBuffer(o)&&!(o instanceof Uint8Array))return s(new Error("Iconv decoding stream needs buffers as its input."));try{var l=this.conv.write(o);l&&l.length&&this.push(l,this.encoding),s()}catch(c){s(c)}},i.prototype._flush=function(o){try{var a=this.conv.end();a&&a.length&&this.push(a,this.encoding),o()}catch(s){o(s)}},i.prototype.collect=function(o){var a="";return this.on("error",o),this.on("data",function(s){a+=s}),this.on("end",function(){o(null,a)}),this},{IconvLiteEncoderStream:n,IconvLiteDecoderStream:i}},W4}var WPe={},XPe=Object.freeze(Object.defineProperty({__proto__:null,default:WPe},Symbol.toStringTag,{value:"Module"})),YPe=mPe(XPe);(function(r){var e=dd.Buffer,t=YB,n=tq,i=r.exports;i.encodings=null,i.defaultCharUnicode="\uFFFD",i.defaultCharSingleByte="?",i.encode=function(a,s,l){a=""+(a||"");var c=i.getEncoder(s,l),u=c.write(a),h=c.end();return h&&h.length>0?e.concat([u,h]):u},i.decode=function(a,s,l){typeof a=="string"&&(i.skipDecodeWarning||(console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),i.skipDecodeWarning=!0),a=e.from(""+(a||""),"binary"));var c=i.getDecoder(s,l),u=c.write(a),h=c.end();return h?u+h:u},i.encodingExists=function(a){try{return i.getCodec(a),!0}catch{return!1}},i.toEncoding=i.encode,i.fromEncoding=i.decode,i._codecDataCache={__proto__:null},i.getCodec=function(a){if(!i.encodings){var s=GPe();i.encodings={__proto__:null},n(i.encodings,s)}for(var l=i._canonicalizeEncoding(a),c={};;){var u=i._codecDataCache[l];if(u)return u;var h=i.encodings[l];switch(typeof h){case"string":l=h;break;case"object":for(var d in h)c[d]=h[d];c.encodingName||(c.encodingName=l),l=h.type;break;case"function":return c.encodingName||(c.encodingName=l),u=new h(c,i),i._codecDataCache[c.encodingName]=u,u;default:throw new Error("Encoding not recognized: '"+a+"' (searched as: '"+l+"')")}}},i._canonicalizeEncoding=function(a){return(""+a).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")},i.getEncoder=function(a,s){var l=i.getCodec(a),c=new l.encoder(s,l);return l.bomAware&&s&&s.addBOM&&(c=new t.PrependBOM(c,s)),c},i.getDecoder=function(a,s){var l=i.getCodec(a),c=new l.decoder(s,l);return l.bomAware&&!(s&&s.stripBOM===!1)&&(c=new t.StripBOM(c,s)),c},i.enableStreamingAPI=function(a){if(!i.supportsStreams){var s=HPe()(a);i.IconvLiteEncoderStream=s.IconvLiteEncoderStream,i.IconvLiteDecoderStream=s.IconvLiteDecoderStream,i.encodeStream=function(l,c){return new i.IconvLiteEncoderStream(i.getEncoder(l,c),c)},i.decodeStream=function(l,c){return new i.IconvLiteDecoderStream(i.getDecoder(l,c),c)},i.supportsStreams=!0}};var o;try{o=YPe}catch{}o&&o.Transform?i.enableStreamingAPI(o):i.encodeStream=i.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}})(JK);var $Pe=JK.exports,x$=fPe($Pe),TE=1e-6,AB=class extends g_{resolve(e,t){var n;let i=((n=e.lastPoint)==null?void 0:n.x)??0;if(e.hasExplicitAdvance)return i;if(!e.polylines.some(a=>a.length>=2))return i>TE?i:t;let{maxX:o}=e.bbox;return i>TE&&i>=o-TE?i:DE.computeAdvance(e,t)}markAlignedAdvanceExplicit(e){return!0}},MB=class extends g_{resolve(e,t){var n;let i=((n=e.lastPoint)==null?void 0:n.x)??0;return e.hasExplicitAdvance&&i>TE?i:t}markAlignedAdvanceExplicit(e){return!0}},nq=new AB,KPe=new MB,PB=class r extends OE{constructor(e,t,n,i){super(),this.fontSize=t,this.shape=n,this.font=i,this.code=e,this.width=Gwe(n,i.data,t,nq)}calcWidth(){let e=this.shape.bbox;return e.maxX-e.minX}offset(e){return new r(this.code,this.fontSize,this.shape.offset(e),this.font)}toGeometry(){if(this.geometry!=null)return this.geometry;let e=this.shape.polylines,t=[],n=[],i=0,o=new ot;for(let a=0;a<e.length;a++){let s=e[a];for(let l=0;l<s.length;l++){let c=s[l];t.push(c.x,c.y,0),l===s.length-1||n.push(i,i+1),i++}}return o.setAttribute("position",new Jt(t,3)),o.setIndex(n),this.geometry=o,o}hasStrokeGeometry(){return this.shape.polylines.some(e=>e.length>=2)?!0:this.width>0}estimateMemoryBytes(){return O$(this.geometry)}dispose(){this.geometry&&(this.geometry.dispose(),this.geometry=void 0)}},rq=class _f extends LE{constructor(e){super(e),this.type="shx",this.layoutShapeCache=new m_(4096,(t,n)=>{n.dispose()}),this.codeCache=new Map,this.font=new cd(e.data),this.data=this.font.fontData}hasChar(e){let t=this.getCode(e);return t===_f.NOT_ENCODABLE?!1:this.font.hasChar(t)}hasCode(e){return this.font.hasChar(e)}getSpaceAdvance(e){let t=this.getCharShape(" ",e);return t?t.width:e*.5}generateShapes(e,t){let n=[],i=0;for(let o of e){if(o===" "){i+=this.getSpaceAdvance(t);continue}let a=this.getCharShape(o,t);if(!a){i+=this.getSpaceAdvance(t),this.addUnsupportedChar(o);continue}n.push(a.offset(new rr(i,0))),i+=a.width}return n}getScaleFactor(){let{height:e,baseUp:t}=this.data.content;return t>0&&e>0?e/t:1}getFontMetrics(e){return this.font.getFontMetrics(e)}getCharShape(e,t){let n=this.getCode(e);if(n!==_f.NOT_ENCODABLE)return this.getCodeShape(n,t)}getCodeShape(e,t){let n=_f.quantizeSize(t),i=`${e}_${n}`,o=this.layoutShapeCache.get(i);if(o)return o;let a=this.data.header.fontType===_n.BIGFONT?KPe:nq,s=this.font.getLayoutCharShape(e,n,a);if(!s||!_f.hasRenderableStrokes(s))return;let l=new PB(e,n,s,this);return this.layoutShapeCache.set(i,l),l}static quantizeSize(e){return Number.isFinite(e)?Math.round(e*1e6)/1e6:e}getShapeByName(e,t){let n=this.font.getShapeCode(e);if(n!==void 0)return this.getCodeShape(n,t)}static hasRenderableStrokes(e){var t;return e.polylines.some(n=>n.length>=2)?!0:(((t=e.lastPoint)==null?void 0:t.x)??0)>0}getNotFoundTextShape(e){let t=this.font.fontData.header.fontType===_n.BIGFONT?"\uFF1F":"?";return this.getCharShape(t,e)}estimateMemoryUsage(){let e=this.cache.getStats(),t=0;for(let a of this.layoutShapeCache.values())t+=a.estimateMemoryBytes();let n={entries:this.layoutShapeCache.size,maxEntries:this.layoutShapeCache.capacity,estimatedBytes:t},i=Math.round(this.sourceByteLength*o_e),o=i+e.estimatedBytes+n.estimatedBytes;return{names:Array.from(this.names),type:"shx",sourceByteLength:this.sourceByteLength,parsedFontEstimatedBytes:i,charGeometryCache:e,shxLayoutCache:n,estimatedBytes:o}}dispose(){this.layoutShapeCache.clear(),this.codeCache.clear(),super.dispose()}getCode(e){let t=this.codeCache.get(e);if(t!==void 0)return t;let n=this.font.fontData.header.fontType,i;if(n===_n.BIGFONT&&this.encoding){let o=x$.encode(e[0],this.encoding);if(x$.decode(o,this.encoding)!==e[0])return this.codeCache.set(e,_f.NOT_ENCODABLE),_f.NOT_ENCODABLE;i=o.length===1?o[0]:o[0]<<8|o[1]}else i=e.charCodeAt(0);if(n===_n.BIGFONT&&i>=32&&i<=126){let o=41856+i;this.font.hasChar(o)&&(i=o)}return this.codeCache.set(e,i),i}};rq.NOT_ENCODABLE=-1;var qPe=rq,Mf=class r{constructor(){}static get instance(){return r._instance||(r._instance=new r),r._instance}createFont(e){if(e.type==="shx")return new qPe(e);if(e.type==="mesh")return new SB(e);throw new Error("Unsupported font data type")}},et=class r{constructor(){this.fontMapping={},this.loadedFontMap=new Map,this.unsupportedChars={},this.missedFonts={},this.enableFontCache=!0,this.lazyFontLoading=!0,this.awaitFontsBeforeDraw=!1,this.defaultFonts=new Set(["simsun"]),this.symbolFonts=new Set(["simplex","amgdt"]),this.events={fontNotFound:new IE,fontLoaded:new IE},this.fontRequestInFlight=new Map,this.fontRequestFailed=new Set,this.fontCacheLookupMisses=new Set,this.loadEpoch=0,this.loader=new Xw,this.loader.setResponseType("arraybuffer"),this.fileNames=[],this.fontLoader=new x_}static get instance(){return r._instance||(r._instance=new r),r._instance}get baseUrl(){return this.fontLoader.baseUrl}set baseUrl(e){this.fontLoader.baseUrl=e}setFontMapping(e){this.fontMapping=e}setDefaultFonts(e){if(typeof e=="string"&&nY(e)){this.defaultFonts=new Set(lB[e]),this.symbolFonts=new Set(E4[e]);return}let t=typeof e=="string"?[e]:[...e];this.defaultFonts=new Set(t)}setSymbolFonts(e){if(typeof e=="string"&&nY(e)){this.symbolFonts=new Set(E4[e]);return}let t=typeof e=="string"?[e]:[...e];this.symbolFonts=new Set(t)}getDefaultFontsPreset(e){return lB[e]}getSymbolFontsPreset(e){return E4[e]}getFontsToLoad(){return[...new Set([...this.defaultFonts,...this.symbolFonts])]}setFontLoader(e){this.fontLoader=e}async getAvailableFonts(){let e=await this.fontLoader.getAvailableFonts();if(!this.enableFontCache)return e.map(i=>({...i,source:"remote"}));let t=new Map;for(let i of e){let o=Ju(i.file).toLowerCase();t.set(o,{...i,source:"remote"})}let n=await Ts.instance.getAll();for(let i of n){let o=i.name.toLowerCase();t.has(o)||t.set(o,this.cachedFontDataToFontInfo(i))}return[...t.values()].sort((i,o)=>i.name[0].localeCompare(o.name[0],void 0,{sensitivity:"base"}))}isDefaultFontLoaded(){for(let e of this.getFontsToLoad())if(this.loadedFontMap.get(e.toLowerCase())==null)return!1;return this.defaultFonts.size>0||this.symbolFonts.size>0}async loadDefaultFont(){return await this.loadFontsByNames(this.getFontsToLoad())}async loadFontsByNames(e){let t=typeof e=="string"?[e]:[...e];return await this.fontLoader.load(t)}requestFont(e){let t=this.normalizeFontName(e);if(!t)return Promise.resolve([]);if(this.isFontLoaded(t))return this.fontRequestFailed.delete(t),Promise.resolve([]);if(this.fontRequestFailed.has(t))return Promise.resolve([{fontName:t,url:"",status:"FailedToLoad"}]);let n=this.fontRequestInFlight.get(t);if(n)return n;let i=this.loadEpoch,o=this.loadFontsByNames(t).then(a=>(i!==this.loadEpoch||(this.isFontLoaded(t)?this.fontRequestFailed.delete(t):a.some(s=>s.status==="FailedToLoad")&&this.fontRequestFailed.add(t)),a)).catch(()=>(i===this.loadEpoch&&this.fontRequestFailed.add(t),[{fontName:t,url:"",status:"FailedToLoad"}])).finally(()=>{this.fontRequestInFlight.get(t)===o&&this.fontRequestInFlight.delete(t)});return this.fontRequestInFlight.set(t,o),o}requestFonts(e){return Promise.all(e.map(t=>this.requestFont(t))).then(t=>t.flat())}normalizeFontName(e){if(e==null)return"";let t=String(e),n=t.lastIndexOf(".");return n>0&&(n===t.length-4||n===t.length-5)&&(t=t.substring(0,n)),t.toLowerCase()}async getCachedMeshFontProgram(e){if(!this.enableFontCache||!e)return;let t=await Ts.instance.find(e);if(!t||t.type!=="mesh")return;let n=t.data;if(n instanceof ArrayBuffer&&n.byteLength>0)return n}async persistMeshFontProgram(e,t,n){if(!this.enableFontCache||!(e instanceof ArrayBuffer)||e.byteLength<=0||!t||this.resolveUploadedFontType(t)!=="mesh")return;let i=Ju(t).toLowerCase();if(!i)return;let o=this.buildUploadedFontAliases(i,t,n?[...n]:void 0);await Ts.instance.set(i,{name:i,alias:o,type:"mesh",data:e});for(let a of o){let s=a.toLowerCase();s&&this.fontCacheLookupMisses.delete(s)}this.clearRequestStateForNames(o)}async cacheFont(e,t,n,i){let o,a;if(typeof File<"u"&&e instanceof File?(o=await e.arrayBuffer(),a=t??e.name):(o=e,a=t??""),!a)throw new Error("fileName is required when caching an ArrayBuffer");let s=Ju(a).toLowerCase();if(!s)return{fontName:"",url:"",status:"FailedToLoad"};let l=this.resolveUploadedFontType(a);if(!l)return{fontName:s,url:"",status:"FailedToLoad"};if(this.isFontLoaded(s))return{fontName:s,url:"",status:"Success"};let c=this.buildUploadedFontAliases(s,a,n),u={name:s,alias:c,type:l,encoding:i,data:o};try{let h=Mf.instance.createFont(u);return c.forEach(d=>h.names.add(d)),this.registerFontInMap(s,h),this.enableFontCache&&await Ts.instance.set(s,u),this.events.fontLoaded.dispatch({fontName:s}),{fontName:s,url:"",status:"Success"}}catch{return{fontName:s,url:"",status:"FailedToLoad"}}}async loadFontFromCache(e){var t;if(!this.enableFontCache||!e)return!1;let n=Ju(e).toLowerCase();if(this.isFontLoaded(n))return!0;if(n&&this.fontCacheLookupMisses.has(n))return!1;let i=await Ts.instance.find(e);if(!i)return n&&this.fontCacheLookupMisses.add(n),!1;this.fontCacheLookupMisses.delete(n);try{let o=Mf.instance.createFont(i);return(t=i.alias)==null||t.forEach(a=>o.names.add(a)),this.registerFontInMap(i.name,o),this.events.fontLoaded.dispatch({fontName:i.name}),!0}catch{return!1}}async loadFonts(e){e=Array.isArray(e)?e:[e];let t=[];for(let i=0;i<e.length;i++)t.push(this.loadFont(e[i]));let n=[];return await Promise.allSettled(t).then(i=>{i.forEach((o,a)=>{let s=e[a].url,l=Ju(e[a].file||s).toLowerCase(),c=e[a].name??[],u=o.status==="fulfilled"&&(this.isFontLoaded(l)||c.some(h=>this.isFontLoaded(h)));n.push({fontName:l,url:s,status:u?"Success":"FailedToLoad"}),u&&this.fileNames.push(l)})}),n}findAndReplaceFont(e){let t=e==null?"":String(e),n=this.stripFontFileExtension(t),i=this.loadedFontMap.get(t.toLowerCase());if(i==null&&n&&n!==t&&(i=this.loadedFontMap.get(n.toLowerCase())),i==null){let l=this.fontMapping[t];if(l)return i=this.loadedFontMap.get(l.toLowerCase()),!i&&this.lazyFontLoading&&this.requestFont(l),this.recordMissedFonts(n,!1),l}if(i)return n||t;this.recordMissedFonts(n,!0);let o=this.pickLoadedDefaultFont(!0);if(o)return o;let a=this.pickLoadedDefaultFont(!1);if(a)return a;let s=[...this.defaultFonts][0]??"";return s&&this.lazyFontLoading&&this.requestFont(s),s}pickLoadedDefaultFont(e){var t;for(let n of this.defaultFonts){let i=this.loadedFontMap.get(n.toLowerCase());if(i&&!(e&&i.type==="shx"&&((t=i.data.header)==null?void 0:t.fontType)===_n.BIGFONT))return n}}getFontByName(e,t=!0){e==null&&(e="");let n=e.lastIndexOf(".");n>0&&(n===e.length-4||n===e.length-5)&&(e=e.substring(0,n));let i=this.loadedFontMap.get(e.toLowerCase());if(!i){t&&this.recordMissedFonts(e);return}return i}getFontByChar(e){for(let[,t]of this.loadedFontMap)if(t.hasChar(e))return t}getCharShape(e,t,n){let i=this.getFontByName(t);return i?.getCharShape(e,n)}getShapeByName(e,t,n){let i=this.getFontByName(t);return i?.getShapeByName(e,n)}getShapeByCode(e,t,n){let i=this.getFontByName(t);return i?.getCodeShape(e,n)}getCharShapeFromDefaults(e,t){for(let n of this.defaultFonts){let i=this.loadedFontMap.get(n.toLowerCase()),o=i?.getCharShape(e,t);if(o)return o}}getCodeShapeFromSymbolFonts(e,t){for(let n of this.symbolFonts){let i=this.loadedFontMap.get(n.toLowerCase());if(!i){this.lazyFontLoading&&this.requestFont(n);continue}let o=i.getCodeShape(e,t);if(o)return o}}getFontScaleFactor(e){let t=this.getFontByName(e,!1);return t?t.getScaleFactor():1}getFontType(e){var t;return(t=this.getFontByName(e,!1))==null?void 0:t.type}getShxFontType(e){let t=this.getFontByName(e,!1);return t?.type==="shx"?t.data.header.fontType:void 0}getNotFoundTextShape(e){for(let[,t]of this.loadedFontMap){let n=t.getNotFoundTextShape(e);if(n)return n}}isFontLoaded(e){let t=this.normalizeFontName(e);return!!t&&this.loadedFontMap.has(t)}applyRemoteFontNotFound(e,t=1){if(!e)return;let n=this.missedFonts[e]??0;this.missedFonts[e]=Math.max(n,t),n===0&&this.events.fontNotFound.dispatch({fontName:e,count:this.missedFonts[e]})}applyRemoteFontLoaded(e){e&&(this.clearMissedFontEntry(e),this.fontRequestFailed.delete(e.toLowerCase()))}replaceMissedFonts(e){let t={};for(let[n,i]of Object.entries(e??{}))!n||this.isFontLoaded(n)||(t[n]=i);this.missedFonts=t}clearMissedFonts(){this.missedFonts={}}stripFontFileExtension(e){if(!e)return e;let t=e.lastIndexOf(".");return t>0&&(t===e.length-4||t===e.length-5)?e.substring(0,t):e}clearMissedFontEntry(e){let t=e.toLowerCase();for(let n of Object.keys(this.missedFonts))n.toLowerCase()===t&&delete this.missedFonts[n]}recordMissedFonts(e,t=!0){e&&(this.missedFonts[e]||(this.missedFonts[e]=0),this.missedFonts[e]++,this.missedFonts[e]===1&&(this.events.fontNotFound.dispatch({fontName:e,count:this.missedFonts[e]}),t&&this.lazyFontLoading&&this.requestFont(e)))}applyCatalogNames(e,t){t.forEach(n=>{n&&e.names.add(n)})}ensureCatalogAliases(e,t){let n=this.loadedFontMap.get(e.toLowerCase())??t.map(i=>this.loadedFontMap.get(i.toLowerCase())).find(i=>i!=null);n&&(this.applyCatalogNames(n,t),this.registerFontInMap(e,n))}async persistCatalogAliases(e,t){if(!this.enableFontCache)return;let n=await Ts.instance.get(e);if(!n)return;let i=[...new Set([...n.alias??[],...t,e])],o=n.alias??[];i.length===o.length&&i.every(a=>o.includes(a))||await Ts.instance.set(e,{...n,alias:i})}clearRequestStateForNames(e){for(let t of e)t&&(this.clearMissedFontEntry(t),this.fontRequestFailed.delete(t.toLowerCase()))}async loadFont(e){if(!L$(e.file))throw new Error(`Invalid font file name: ${e.file}`);let t=this.fontInfoToFontData(e),n=t.name,i=e.name??[];if(this.isFontLoaded(t.name)){this.ensureCatalogAliases(n,i),this.clearRequestStateForNames([n,...i]),this.persistCatalogAliases(n,i).catch(()=>{});return}let o=this.loadEpoch,a=this.enableFontCache?await Ts.instance.get(n):void 0;if(o!==this.loadEpoch)return;let s=!1;if(a){if(await new Promise(l=>setTimeout(l,0)),o!==this.loadEpoch)return;if(this.isFontLoaded(n)){this.ensureCatalogAliases(n,i),this.clearRequestStateForNames([n,...i]),await this.persistCatalogAliases(n,i);return}try{let l=Mf.instance.createFont(a);l&&(this.applyCatalogNames(l,i),this.registerFontInMap(n,l),await this.persistCatalogAliases(n,i),s=!0)}catch{try{await Ts.instance.delete(n)}catch{}}}if(!s&&!this.isFontLoaded(n)){let l=await this.loader.loadAsync(e.url);if(o!==this.loadEpoch||(t.data=l,await new Promise(u=>setTimeout(u,0)),o!==this.loadEpoch))return;if(this.isFontLoaded(n)){this.ensureCatalogAliases(n,i),this.clearRequestStateForNames([n,...i]),await this.persistCatalogAliases(n,i);return}let c=Mf.instance.createFont(t);c&&(this.applyCatalogNames(c,i),this.registerFontInMap(n,c),this.enableFontCache&&await Ts.instance.set(n,t))}o!==this.loadEpoch||!this.isFontLoaded(n)||(this.clearRequestStateForNames([n,...i]),this.events.fontLoaded.dispatch({fontName:n}))}fontInfoToFontData(e){let t=Ju(e.file).toLowerCase(),n=["ttf","otf","woff"].includes(e.type)?"mesh":e.type;return{name:t,alias:e.name,type:n,encoding:e.encoding}}async getAllFontsFromCache(){if(this.loadedFontMap.size!==0)return;let e=await Ts.instance.getAll();for(let t of e){let{name:n}=t;if(this.fileNames&&!this.fileNames.includes(n))continue;let i=Mf.instance.createFont(t);this.registerFontInMap(n,i)}}cachedFontDataToFontInfo(e){let t=`${e.name}.${e.type==="shx"?"shx":"ttf"}`;return{name:e.alias&&e.alias.length>0?[...e.alias]:[e.name],file:t,type:e.type,url:"",encoding:e.encoding,source:"cache"}}resolveUploadedFontType(e){let t=_we(e).toLowerCase();if(t==="shx")return"shx";if(["ttf","otf","woff"].includes(t))return"mesh"}buildUploadedFontAliases(e,t,n){let i=new Set;return i.add(e),i.add(Ju(t)),n?.forEach(o=>{o&&i.add(o)}),[...i]}registerFontInMap(e,t){let n=i=>{let o=i.toLowerCase();o&&(this.loadedFontMap.set(o,t),this.fontCacheLookupMisses.delete(o))};n(e),t.names.forEach(i=>n(i))}getUnsupportedChar(){for(let[,e]of this.loadedFontMap)Object.assign(this.unsupportedChars,e.unsupportedChars);return this.unsupportedChars}release(e){var t,n;if(e==null){let o=new Set(this.loadedFontMap.values());for(let a of o)(t=a.dispose)==null||t.call(a);return this.loadedFontMap.clear(),this.fontRequestInFlight.clear(),this.fontRequestFailed.clear(),this.fontCacheLookupMisses.clear(),this.missedFonts={},this.loadEpoch++,!0}let i=this.loadedFontMap.get(e.toLowerCase());if(!i)return!1;(n=i.dispose)==null||n.call(i);for(let[o,a]of this.loadedFontMap)a===i&&this.loadedFontMap.delete(o);return!0}estimateMemoryUsage(e){let t=new Set;for(let a of this.loadedFontMap.values())t.add(a);let n=Array.from(t).map(a=>a.estimateMemoryUsage()),i=e?.materials??V$(),o=n.reduce((a,s)=>a+s.estimatedBytes,0);return{id:e?.id??"main",inFlightRequests:e?.inFlightRequests,fonts:n,materials:i,totalEstimatedBytes:o+i.estimatedBytes}}},x_=class{constructor(){this._availableFontsPromise=null,this._catalogRefreshAttempted=!1,this._avaiableFonts=[],this._avaiableFontMap=new Map,this._baseUrl="https://cdn.jsdelivr.net/gh/mlightcad/cad-data/fonts/"}get baseUrl(){return this._baseUrl}set baseUrl(e){this._baseUrl!==e&&(this._baseUrl=e,this.clearAvailableFontsCache(),this._catalogRefreshAttempted=!1,this.onFontUrlChanged(e))}get avaiableFonts(){return this._avaiableFonts}onFontUrlChanged(e){}async getAvailableFonts(){if(this._avaiableFonts.length>0)return this.buildFontMap(),this._avaiableFonts;if(this._availableFontsPromise)return this._availableFontsPromise;let e=this._baseUrl,t=this.fetchAvailableFonts(e).finally(()=>{this._availableFontsPromise===t&&(this._availableFontsPromise=null)});return this._availableFontsPromise=t,t}async load(e){if(e==null||e.length===0)return[];let t=[],n=!0;for(let h of e){let d=h.toLowerCase();if(et.instance.isFontLoaded(d))t.push({fontName:d,url:"",status:"Success"});else{n=!1;break}}if(n)return t;await this.getAvailableFonts(),e.some(h=>!this._avaiableFontMap.has(h.toLowerCase()))&&!this._catalogRefreshAttempted&&(this._catalogRefreshAttempted=!0,await this.refreshAvailableFontsFromNetwork());let i=[],o=[],a=new Map,s=new Set;e.forEach(h=>{let d=h.toLowerCase(),p=this._avaiableFontMap.get(d);if(p){if(a.set(d,p),et.instance.isFontLoaded(d)){i.push({fontName:d,url:p.url,status:"Success"});return}let f=p.file.toLowerCase();s.has(f)||(s.add(f),o.push(p))}});let l=o.length>0?await et.instance.loadFonts(o):[],c={};[...i,...l].forEach(h=>{c[h.fontName]=h});let u=[];for(let h of e){let d=h.toLowerCase(),p=c[d];if(p){u.push(p);continue}let f=a.get(d);if(f){if(et.instance.isFontLoaded(d)){u.push({fontName:d,url:f.url,status:"Success"});continue}let m=Ju(f.file).toLowerCase(),g=c[m];if(g){u.push({fontName:d,url:f.url,status:g.status});continue}}if(await et.instance.loadFontFromCache(h)){u.push({fontName:d,url:"",status:"Success"});continue}u.push({fontName:d,url:"",status:"NotFound"})}return u}clearAvailableFontsCache(){this._avaiableFonts=[],this._avaiableFontMap.clear(),this._availableFontsPromise=null}async refreshAvailableFontsFromNetwork(){this.clearAvailableFontsCache();let e=this._baseUrl,t=this.fetchAvailableFonts(e,{bypassHttpCache:!0}).finally(()=>{this._availableFontsPromise===t&&(this._availableFontsPromise=null)});return this._availableFontsPromise=t,t}async fetchAvailableFonts(e,t){let n=e+"fonts.json",i;try{i=await(t!=null&&t.bypassHttpCache?await fetch(n,{cache:"no-cache"}):await fetch(n)).json()}catch(o){throw new Error(`Filed to get avaiable font from '${n}' due to ${o}!`)}return this._baseUrl!==e?this.getAvailableFonts():(i.forEach(o=>{o.url=e+o.file}),this._avaiableFonts=i,this.buildFontMap(),this._avaiableFonts)}buildFontMap(){let e=this._avaiableFontMap;this._avaiableFonts.forEach(t=>{t.name.forEach(n=>{e.set(n.toLowerCase(),t)})})}};function ZPe(r){return r&&"getMaterialStats"in r&&typeof r.getMaterialStats=="function"?r.getMaterialStats():V$()}function iq(r,e){let t=e.materials??ZPe(e.styleManager);return r.estimateMemoryUsage({id:e.id,materials:t,inFlightRequests:e.inFlightRequests})}function JPe(){let r=globalThis.performance,e=r?.memory;if(e)return{usedJSHeapSize:e.usedJSHeapSize,totalJSHeapSize:e.totalJSHeapSize,jsHeapSizeLimit:e.jsHeapSizeLimit}}function d_(r){return Math.max(0,Math.min(16777215,Math.round(r)))}function f_(r){let e=r.color,t=e.aci;return t===0?d_(r.byBlockColor):t===256?d_(r.byLayerColor):t!=null?w_(t):e.rgbValue!==null?d_(e.rgbValue):d_(r.byLayerColor)}function QPe(r){if(!r)return;let e=new Mi;if(typeof r.rgbValue=="number")return e.rgbValue=r.rgbValue,e;if(typeof r.aci=="number")return e.aci=r.aci,e}function eEe(r,e,t,n){let i=QPe(n),o=f_(r);if(i&&i.isRgb&&typeof i.rgbValue=="number"&&i.rgbValue===o&&!r.color.isRgb&&typeof r.color.aci=="number"){let s=new Mi;return s.aci=r.color.aci,{byLayerColor:r.byLayerColor,byBlockColor:r.byBlockColor,layer:r.layer,color:s}}if(i)return{byLayerColor:r.byLayerColor,byBlockColor:r.byBlockColor,layer:r.layer,color:i};let a=new Mi;return t&&e===r.byLayerColor?a.aci=256:r.color.aci===0&&e===d_(r.byBlockColor)?a.aci=0:!r.color.isRgb&&typeof r.color.aci=="number"&&e===o?a.aci=r.color.aci:a.rgbValue=e,{byLayerColor:r.byLayerColor,byBlockColor:r.byBlockColor,layer:r.layer,color:a}}var KE=5/3,w$=1,_$=1,_E=.3,fa=(r=>(r[r.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",r[r.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT",r[r.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",r[r.BOTTOM_TO_TOP=4]="BOTTOM_TO_TOP",r[r.BY_STYLE=5]="BY_STYLE",r))(fa||{}),st=(r=>(r[r.TopLeft=1]="TopLeft",r[r.TopCenter=2]="TopCenter",r[r.TopRight=3]="TopRight",r[r.MiddleLeft=4]="MiddleLeft",r[r.MiddleCenter=5]="MiddleCenter",r[r.MiddleRight=6]="MiddleRight",r[r.BottomLeft=7]="BottomLeft",r[r.BottomCenter=8]="BottomCenter",r[r.BottomRight=9]="BottomRight",r[r.BaselineLeft=10]="BaselineLeft",r[r.BaselineCenter=11]="BaselineCenter",r[r.BaselineRight=12]="BaselineRight",r))(st||{}),Pf=(r=>(r[r.AtLeast=1]="AtLeast",r[r.Exact=2]="Exact",r))(Pf||{}),Or=(r=>(r.CHAR="CHAR",r.STACK="STACK",r))(Or||{}),kE="\uE000",ci=()=>({byLayerColor:16777215,byBlockColor:16777215,layer:"0",color:new Mi});function tEe(r){if(!(!r||[r.min.x,r.min.y,r.min.z,r.max.x,r.max.y,r.max.z].some(e=>!Number.isFinite(e))))return r}function EB(r,e,t){let n=[];if(r.filter(d=>d.char!==kE).forEach(d=>{let p=tEe(new Ne().copy(d.box).applyMatrix4(e));p&&n.push({type:Or.CHAR,box:p,char:d.char,children:[]})}),t!==Or.STACK)return n;let i=d=>d.type===Or.CHAR&&d.char.trim().length===0,o=d=>d.type===Or.CHAR&&d.char.trim().length>0,a=n.findIndex(o);if(a<0)return n;let s=-1;for(let d=n.length-1;d>=0;d--)if(o(n[d])){s=d;break}let l=n.slice(0,a).filter(i),c=n.slice(s+1).filter(i),u=n.slice(a,s+1).filter(o);if(u.length===0)return[...l,...c];let h=new Ne().copy(u[0].box);return u.slice(1).forEach(d=>h.union(d.box)),[...l,{type:Or.STACK,char:"",box:h,children:u},...c]}var nEe=1.5,rEe=.8,iEe=1e6,oEe=1e4;function S$(r,e){return Math.max(1,...String(r??"").replace(/\\P/g,`
  3985. `).replace(/[{}]/g,"").split(/\r?\n/).map(t=>t.length))*e*rEe}function A$(r){let e=r.width,t=r.height;if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0||e<=0)return e;let n=t*nEe;if(e<n)return S$(r.text,t);let i=S$(r.text,t),o=e/t,a=e/Math.max(i,Number.EPSILON);return o>iEe||a>oEe?i:e}var u_=new U,qE=class r{static mergeLineGeometries(e){if(e.length===0)return new ot;if(e.length===1)return r.applyMatrixToLineGeometry(e[0].geometry,e[0].matrix);let t=0;for(let a of e)t+=r.countLineSegments(a.geometry);let n=new Float32Array(t*6),i=0;for(let a of e)i=r.writeTransformedLineSegments(a.geometry,a.matrix,n,i);let o=new ot;return o.setAttribute("position",new Et(n,3)),o}static countLineSegments(e){let t=e.getIndex();if(t)return t.count/2;let n=e.getAttribute("position");return n?n.count/2:0}static applyMatrixToLineGeometry(e,t){let n=r.countLineSegments(e),i=new Float32Array(n*6);r.writeTransformedLineSegments(e,t,i,0);let o=new ot;return o.setAttribute("position",new Et(i,3)),o}static writeTransformedLineSegments(e,t,n,i){let o=e.getAttribute("position");if(!o||o.count===0)return i;let a=e.getIndex(),s=i,l=c=>{u_.fromBufferAttribute(o,c),u_.applyMatrix4(t),n[s++]=u_.x,n[s++]=u_.y,n[s++]=u_.z};if(a){for(let c=0;c<a.count;c+=2)l(a.getX(c)),l(a.getX(c+1));return s}for(let c=0;c<o.count;c+=2)l(c),l(c+1);return s}static mergeMeshGeometries(e){if(e.length===0)return new ot;let t=0,n=0;for(let g of e){let y=g.geometry.getAttribute("position");if(!y||y.count===0)continue;t+=y.count;let b=g.geometry.getIndex();n+=b?b.count:y.count}if(t===0)return new ot;let i=new Float32Array(t*3),o=t>65535?Uint32Array:Uint16Array,a=new o(n),s=0,l=0,c=1/0,u=1/0,h=1/0,d=-1/0,p=-1/0,f=-1/0;for(let g of e){let y=g.geometry.getAttribute("position");if(!y||y.count===0)continue;let b=r.writeTransformedMeshPositions(y,g.matrix,i,s,(x,w,_)=>{x<c&&(c=x),w<u&&(u=w),_<h&&(h=_),x>d&&(d=x),w>p&&(p=w),_>f&&(f=_)}),v=g.geometry.getIndex();if(v){let x=v.array;for(let w=0;w<v.count;w++)a[l++]=x[w]+s}else for(let x=0;x<y.count;x++)a[l++]=s+x;s+=b}let m=new ot;return m.setAttribute("position",new Et(i,3)),m.setIndex(new Et(a,1)),m.boundingBox=new Ne(new U(c,u,h),new U(d,p,f)),m}static writeTransformedMeshPositions(e,t,n,i,o){let a=t.elements,s=e.count,l=i*3;if(e instanceof Et&&e.itemSize===3&&!e.normalized&&e.array instanceof Float32Array){let c=e.array;for(let u=0;u<s;u++){let h=u*3,d=c[h],p=c[h+1],f=c[h+2],m=1/(a[3]*d+a[7]*p+a[11]*f+a[15]),g=(a[0]*d+a[4]*p+a[8]*f+a[12])*m,y=(a[1]*d+a[5]*p+a[9]*f+a[13])*m,b=(a[2]*d+a[6]*p+a[10]*f+a[14])*m,v=l+h;n[v]=g,n[v+1]=y,n[v+2]=b,o(g,y,b)}return s}for(let c=0;c<s;c++){let u=e.getX(c),h=e.getY(c),d=e.getZ(c),p=1/(a[3]*u+a[7]*h+a[11]*d+a[15]),f=(a[0]*u+a[4]*h+a[8]*d+a[12])*p,m=(a[1]*u+a[5]*h+a[9]*d+a[13])*p,g=(a[2]*u+a[6]*h+a[10]*d+a[14])*p,y=l+c*3;n[y]=f,n[y+1]=m,n[y+2]=g,o(f,m,g)}return s}},aEe={c:[129],d:[176],p:[177]},sEe={c:[8709,130],d:[],p:[]},lEe={\u00D8:"c",\u00F8:"c","\u2205":"c","\u2300":"c",\u03A6:"c",\u03C6:"c","\xB0":"d","\xB1":"p"};function cEe(r){switch(r.kind){case"named":return[...aEe[r.code],...sEe[r.code]];case"numeric":return[r.charCode];case"literal":return[];default:return r}}function uEe(r){let e=lEe[r];if(e)return{kind:"named",code:e,char:r}}var hEe=new U,M$=new vt,P$=new vt,X4=new vt,Y4=new vt,E$=new vt,SE=new Ne;function dEe(r){let e=r??"",t=e.indexOf(",");return t<0?{primary:e.trim()}:{primary:e.slice(0,t).trim(),bigFont:e.slice(t+1).trim()}}var CB=class r extends Cs{constructor(e){super(),this.fontScaleFactor=1,this.fontSize=1,this.fontSizeScaleFactor=1,this.blankWidth=0,e&&Object.assign(this,e)}clone(){let e=new r;return e.continueStroke=this.continueStroke,e.color=this.color.copy(),e.align=this.align,e.fontFace={...this.fontFace},e.capHeight={...this.capHeight},e.widthFactor={...this.widthFactor},e.charTrackingFactor={...this.charTrackingFactor},e.oblique=this.oblique,e.paragraph={...this.paragraph},e.fontScaleFactor=this.fontScaleFactor,e.fontSize=this.fontSize,e.fontSizeScaleFactor=this.fontSizeScaleFactor,e.blankWidth=this.blankWidth,e.bigFont=this.bigFont,e}getColorAsHex(){return this.color.isRgb&&this.color.rgbValue!==null?this.color.rgbValue:this.color.isAci&&this.color.aci!==null?w_(this.color.aci):16777215}setColorFromHex(e){let t=e>>16&255,n=e>>8&255,i=e&255;this.color.rgb=[t,n,i]}},ZE=class{constructor(e,t,n,i,o){this._contextStack=[],this._maxFontSize=0,this._maxLayoutFontSize=0,this._lineBatchEntries=[],this._meshBatchEntries=[],this._currentIndent=0,this._currentLeftMargin=0,this._currentRightMargin=0,this._suppressSoftWrap=!1,this._style=e,this._colorSettings=t,this._styleManager=n,this._fontManager=i,this._options=o,this._totalHeight=0,this._hOffset=0,this._maxLineAdvance=0,this._vOffset=0,this._lineCount=1,this._currentLineObjects=[];let a=this.fontManager.findAndReplaceFont(this.textStyle.font).toLowerCase();this._currentContext=new CB({fontScaleFactor:this.fontManager.getFontScaleFactor(a),fontSize:o.fontSize,fontSizeScaleFactor:1,italic:!1,bold:!1,blankWidth:this.calculateBlankWidthForFont(a,o.fontSize)}),this._currentContext.color=this._colorSettings.color.copy(),this._currentContext.fontFace.family=a,this._currentContext.widthFactor={value:o.widthFactor,isRelative:!0},this._currentContext.oblique=e.obliqueAngle||0,this._maxFontSize=0,this._maxLayoutFontSize=0,this._currentHorizontalAlignment=o.horizontalAlignment,this._lastCharBoxTarget=void 0,this._lineHasRenderableChar=!1,this._pendingEmptyLineFontSizeAdjust=void 0,this._lineLayouts=[],this._lineBreakIndices=[],this._processedCharCount=0,this._currentIndent=0,this._currentLeftMargin=0,this._currentRightMargin=0,this.initLineParams()}get fontManager(){return this._fontManager}get styleManager(){return this._styleManager}get textStyle(){return this._style}get totalHeight(){return this._lineCount==1?this.currentMaxFontSize:this._totalHeight+this.currentLineHeight}get maxWidth(){return this._options.maxWidth}get maxLineAdvance(){return this._maxLineAdvance}get flowDirection(){return this._options.flowDirection}get defaultHorizontalAlignment(){return this._options.horizontalAlignment}get defaultWidthFactor(){return this._options.widthFactor}get defaultFontSize(){return this._options.fontSize}get defaultLineSpaceFactor(){return this._options.lineSpaceFactor}get defaultLineSpaceStyle(){return this._options.lineSpaceStyle===Pf.Exact?Pf.Exact:Pf.AtLeast}get currentFont(){return this._currentContext.fontFace.family}get currentHorizontalAlignment(){return this._currentHorizontalAlignment}get currentFontSize(){return this._currentContext.fontSize}get currentLayoutFontSize(){let e=this._currentContext.fontScaleFactor||1;return this._currentContext.fontSize/e}get currentLineHeight(){let e=Math.max(this.defaultLineSpaceFactor,0),t=this.defaultFontSize,n=e*t*KE;if(this.defaultLineSpaceStyle===Pf.Exact)return n;let i=this._maxLayoutFontSize>0?this._maxLayoutFontSize:this.currentLayoutFontSize;return Math.max(n,i*KE)}get currentMaxFontSize(){return this._maxFontSize}get currentWordSpace(){return this._currentContext.charTrackingFactor.value}get currentWidthFactor(){return this._currentContext.widthFactor.value}get currentBlankAdvance(){return this.penAdvance(this._currentContext.blankWidth)}penAdvance(e,t=0){let n=this.currentWidthFactor,i=(e+t)*n,o=this.currentWordSpace;if(o===1)return i;let a=this._currentContext.fontScaleFactor||1;return i+(o-1)*this.currentLayoutFontSize*n/a}get currentLineObjects(){return this._currentLineObjects}get lineLayouts(){return this._lineLayouts}get hOffset(){return this._hOffset}set hOffset(e){this._hOffset=e}get vOffset(){return this._vOffset}set vOffset(e){this._vOffset=e}get currentIndent(){return this._currentIndent}get currentLeftMargin(){return this._currentLeftMargin}get currentRightMargin(){return this._currentRightMargin}get maxLineWidth(){return this.maxWidth-this._currentLeftMargin-this._currentRightMargin}processFormat(e){if(e.command===void 0){this.applyPropertyChanges(e.changes);return}switch(e.command){case"f":case"F":this.applyFontFaceChange(e.changes.fontFace);break;case"c":case"C":this.applyColorCommandChanges(e.changes);break;case"W":this.applyWidthFactorChange(e.changes.widthFactor);break;case"H":this.applyCapHeightChange(e.changes.capHeight);break;case"T":this.applyCharTrackingChange(e.changes.charTrackingFactor);break;case"p":this.applyParagraphChange(e.changes.paragraph);break;case"L":this._currentContext.underline=!0;break;case"l":this._currentContext.underline=!1;break;case"O":this._currentContext.overline=!0;break;case"o":this._currentContext.overline=!1;break;case"K":this._currentContext.strikeThrough=!0;break;case"k":this._currentContext.strikeThrough=!1;break;case"Q":e.changes.oblique!==void 0&&(this._currentContext.oblique=e.changes.oblique);break}}applyPropertyChanges(e){this.applyFontFaceChange(e.fontFace,!1),this.applyColorSnapshotChanges(e),this.applyWidthFactorChange(e.widthFactor),this.applyCapHeightChange(e.capHeight),this.applyCharTrackingChange(e.charTrackingFactor),this.applyParagraphMarginsOnly(e.paragraph),e.paragraph&&"align"in e.paragraph&&e.paragraph.align!=null&&e.paragraph.align!==Vt.DEFAULT&&(this._currentHorizontalAlignment=e.paragraph.align),typeof e.underline=="boolean"&&(this._currentContext.underline=e.underline),typeof e.overline=="boolean"&&(this._currentContext.overline=e.overline),typeof e.strikeThrough=="boolean"&&(this._currentContext.strikeThrough=e.strikeThrough),e.oblique!==void 0&&(this._currentContext.oblique=e.oblique)}applyFontFaceChange(e,t=!0){if(!e)return;let{primary:n,bigFont:i}=dEe(e.family),o=n.length===0;this.changeFont(o?this.textStyle.font:n),(t||o||i!==void 0)&&(this._currentContext.bigFont=o?void 0:i??""),this.fontManager.getFontType(this._currentContext.fontFace.family)==="mesh"?(this._currentContext.italic=e.style==="Italic",this._currentContext.bold=(e.weight||400)>=700,this._currentContext.oblique=this.textStyle.obliqueAngle||0):(this._currentContext.italic=!1,this._currentContext.bold=!1,e.style==="Italic"?this._currentContext.oblique=15:this._currentContext.oblique=this.textStyle.obliqueAngle||0)}applyColorCommandChanges(e){e.aci!==void 0&&e.aci!==null?this._currentContext.color.aci=e.aci:e.rgb&&(this._currentContext.color.rgb=e.rgb)}applyColorSnapshotChanges(e){e.aci!==void 0&&(this._currentContext.color.aci=e.aci),e.rgb!==void 0&&(this._currentContext.color.rgb=e.rgb)}applyWidthFactorChange(e){e&&(e.isRelative?this._currentContext.widthFactor={value:e.value*this._currentContext.widthFactor.value,isRelative:!1}:this._currentContext.widthFactor={value:e.value,isRelative:!1})}applyCapHeightChange(e){e&&(e.isRelative?this.changeFontSizeScaleFactor(e.value):this.changeFontHeight(e.value))}applyCharTrackingChange(e){e&&(e.isRelative?this._currentContext.charTrackingFactor={value:e.value+1,isRelative:!1}:this._currentContext.charTrackingFactor={value:e.value,isRelative:!1})}applyParagraphMarginsOnly(e){e&&(typeof e.indent=="number"&&(this._currentIndent=e.indent*this.defaultFontSize,this._hOffset+=this._currentIndent),typeof e.left=="number"&&(this._currentLeftMargin=e.left*this.defaultFontSize),typeof e.right=="number"&&(this._currentRightMargin=e.right*this.defaultFontSize))}applyParagraphChange(e){e&&("align"in e&&(this._currentHorizontalAlignment=e.align),typeof e.indent=="number"&&(this._currentIndent=e.indent*this.defaultFontSize,this._hOffset+=this._currentIndent),typeof e.left=="number"&&(this._currentLeftMargin=e.left*this.defaultFontSize),typeof e.right=="number"&&(this._currentRightMargin=e.right*this.defaultFontSize))}startNewParagraph(e,t,n,i,o){this.recordVisualLineBreak(n,i),this.processGeometries(e,t,n,i,o),this.advanceToNextLine(!1),this._hOffset=this._currentIndent}processShapeGlyph(e,t){let n=this.resolveShapeGlyph(e,t);if(!n)return;this._lineBatchEntries=[],this._meshBatchEntries=[];let i=[],o=[],a=[],s=[],l=this.flowDirection===fa.BOTTOM_TO_TOP?0:-this.currentLayoutFontSize,c=this.buildShapeGeometry(n.shape,n.label,0,l,i,o,a,s);this._totalHeight=this.currentLayoutFontSize,this._maxFontSize=this.currentLayoutFontSize,this._maxLayoutFontSize=this.currentLayoutFontSize,this._maxLineAdvance=c;let u=this.toThreeObject(i,o,a,s,Or.CHAR);return u&&(u.userData.logicalAdvanceWidth=c),u}resolveShapeGlyph(e,t){let n=this.currentLayoutFontSize,i=this.textStyle.font.toLowerCase(),o=e?.trim(),a=t!=null&&t!==0;if(o){let s=this.fontManager.getShapeByName(o,i,n);if(s)return{shape:s,label:o}}if(a){let s=this.fontManager.getShapeByCode(t,i,n);if(s)return{shape:s,label:String.fromCharCode(t)}}}buildShapeGeometry(e,t,n,i,o,a,s,l){let{matrix:c,obliqueExtraAdvance:u}=this.buildCharTransformMatrix(n,i,this.currentLayoutFontSize,e.geometryScale),h=this.getGlyphGeometry(e);return this.appendCharGeometry(e,t,h,c,o,s,l),e.width*this.currentWidthFactor+u*this.currentWidthFactor}getGlyphGeometry(e){return this._options.meshFontRenderMode==="line"?e.toStrokeGeometry():e.toGeometry()}buildCharTransformMatrix(e,t,n,i=1){let o=this.currentWidthFactor*i,a=i;P$.makeScale(o,a,1);let s=this._currentContext.oblique;this._currentContext.italic&&(s+=15);let l=0;if(s){let h=s*Math.PI/180;X4.set(1,Math.tan(h),0,0,0,1,0,0,0,0,1,0,0,0,0,1),l=Math.tan(h)*n}else X4.identity();let c=this.fontManager.getFontType(this.currentFont);this._currentContext.bold&&c==="mesh"?Y4.makeScale(1.06,1.06,1):Y4.identity(),E$.makeTranslation(e,t,0);let u=new vt;return u.copy(E$).multiply(Y4).multiply(X4).multiply(P$),{matrix:u,obliqueExtraAdvance:l}}appendCharGeometry(e,t,n,i,o,a,s){if(KY(n)){this._meshBatchEntries.push({geometry:n,matrix:i}),this._options.collectCharBoxes!==!1&&(n.boundingBox||n.computeBoundingBox(),SE.copy(n.boundingBox).applyMatrix4(i),a.push({type:Or.CHAR,box:new Ne().copy(SE),char:t,children:[]}),this._lastCharBoxTarget="mesh");return}this._lineBatchEntries.push({geometry:n,matrix:i}),this._options.collectCharBoxes!==!1&&(n.boundingBox||n.computeBoundingBox(),SE.copy(n.boundingBox).applyMatrix4(i),s.push({type:Or.CHAR,box:new Ne().copy(SE),char:t,children:[]}),this._lastCharBoxTarget="line")}pushDecorationLine(e,t){let n=new ot;n.setAttribute("position",new Et(new Float32Array(t),3)),n.setIndex([0,1]),n.userData={isDecoration:!0},e.push(n)}processText(e){this._lastCharBoxTarget=void 0,this._lineBatchEntries=[],this._meshBatchEntries=[];let t=[],n=[],i=[],o=[],a=new Zn;for(let s of e)if(s.type===Yt.NEW_PARAGRAPH)this.startNewParagraph(t,n,i,o,a);else if(s.type===Yt.WORD){let l=s.data;Array.isArray(l)?l.forEach(c=>this.processWord(c,t,n,i,o)):typeof l=="string"&&l.length>0&&this.processWord(l,t,n,i,o)}else if(s.type===Yt.SPACE)this.processBlank(i,o);else if(s.type===Yt.PERCENT_SYMBOL)this.processPercentSymbol(s.data,t,n,i,o);else if(s.type===Yt.PROPERTIES_CHANGED){this.processGeometries(t,n,i,o,a);let l=s.data;if(l.command===void 0){for(;this._contextStack.length>l.depth;)this._currentContext=this._contextStack.pop();this.processFormat(l)}else{for(;this._contextStack.length<l.depth;)this._contextStack.push(this._currentContext.clone());this.processFormat(l)}}else if(s.type===Yt.STACK){this.processGeometries(t,n,i,o,a);let l=s.data;this.processStack(l,t,n,i,o);let c=l[2]==="^"?Or.CHAR:Or.STACK;this.processGeometries(t,n,i,o,a,c)}return this.hasPendingDrawables(t,n)?this.processGeometries(t,n,i,o,a):(i.length>0||o.length>0)&&this.processGeometries(t,n,i,o,a),this.processLastLine(),this.captureCurrentLineAdvance(),this.recordCurrentLineLayout(),a.userData.lineLayouts=this._lineLayouts.map((s,l)=>({...s,breakIndex:l<this._lineLayouts.length-1?this._lineBreakIndices[l]:void 0})),a.userData.logicalAdvanceWidth=this._maxLineAdvance,a}hasPendingDrawables(e,t){return e.length>0||t.length>0||this._lineBatchEntries.length>0||this._meshBatchEntries.length>0}processGeometries(e,t,n,i,o,a=Or.CHAR){let s=this.countFinalCharBoxes(n,i,a);if(this.hasPendingDrawables(e,t)){let l=this.toThreeObject(e,t,n,i,a);o.add(l),this._currentLineObjects.push(l),e.length=0,t.length=0,this._lineBatchEntries=[],this._meshBatchEntries=[],n.length=0,i.length=0,this._processedCharCount+=s}else if(n.length>0||i.length>0){let l=new $n;l.userData.bboxIntersectionCheck=!0,l.userData.charBoxType=a,l.userData.layout={chars:[...n,...i]},o.add(l),this._currentLineObjects.push(l),n.length=0,i.length=0,this._processedCharCount+=s}}isLatinAsciiRun(e){for(let t of e)if((t.codePointAt(0)??0)>=256)return!1;return e.length>0}processWord(e,t,n,i,o){let a=[],s=0,l=this.isLatinAsciiRun(e);for(let u of e){let h=this.resolveCharShape(u),d=h?.shape;a.push({char:u,shape:d}),d?this.currentHorizontalAlignment==Vt.DISTRIBUTED?s+=d.width*this.currentWidthFactor:s+=this.penAdvance(d.width):s+=this.currentBlankAdvance}let c=this.maxLineWidth||1/0;if(l&&this.hOffset+s>c&&this.hOffset>0){let u=this.hOffset+s-c,h=this.currentLayoutFontSize*this.currentWidthFactor*2;u>0&&u<=h&&s<=c||(this.recordVisualLineBreak(i,o),this.advanceToNextLine(!1))}l&&(this._suppressSoftWrap=!0);try{for(let{char:u}of a)this.processChar(u,t,n,i,o)}finally{l&&(this._suppressSoftWrap=!1)}}processStack(e,t,n,i,o){let[a,s,l]=e,c=this._hOffset,u=this._vOffset,h=this._currentContext.charTrackingFactor.value,d=this.currentFontSize,p=this._currentContext.fontSizeScaleFactor;this._hOffset=c,this._currentContext.charTrackingFactor={value:1,isRelative:!1};let f=0;for(let v of a){let x=this.getCharShape(v);x&&(f+=x.width*this.currentWidthFactor)}this._hOffset=c;let m=0;for(let v of s){let x=this.getCharShape(v);x&&(m+=x.width*this.currentWidthFactor)}let g=Math.max(f,m),y=(g-f)/2,b=(g-m)/2;if(l==="^"){if(a&&!s){this._currentContext.fontSizeScaleFactor=p*.7,this.calcuateLineParams();let v=[],x=[],w=[],_=[];this._hOffset=c,this._vOffset=this.convertTopAlignedVOffset(u+d*.1,this.currentFontSize);for(let A of a)this.processChar(A,v,x,w,_);t.push(...v),n.push(...x),i.push(...w),o.push(..._),this._hOffset=c+f,this._currentContext.fontSizeScaleFactor=p,this.calcuateLineParams()}else if(!a&&s){this._currentContext.fontSizeScaleFactor=p*.7,this.calcuateLineParams();let v=[],x=[],w=[],_=[];this._hOffset=c,this._vOffset=this.convertTopAlignedVOffset(u-d*.6,this.currentFontSize);for(let A of s)this.processChar(A,v,x,w,_);t.push(...v),n.push(...x),i.push(...w),o.push(..._),this._hOffset=c+m,this._currentContext.fontSizeScaleFactor=p,this.calcuateLineParams()}else if(a&&s){let v=this._currentContext.fontScaleFactor||1,x=(this._maxFontSize||this.currentFontSize)/v,w=Math.abs(this.currentLayoutFontSize-x)<1e-6;w&&(this._currentContext.fontSizeScaleFactor=p*.7,this.calcuateLineParams());let _=Math.max(f,m),A=0,E=0,S=this.currentLayoutFontSize,M=u-x+S,T=M+this.currentFontSize,L=[],O=[],D=[],z=[];this._hOffset=c+A,this._vOffset=T;for(let ce of a)this.processChar(ce,L,O,D,z);t.push(...L),n.push(...O),i.push(...D),o.push(...z);let N=[],J=[],X=[],Q=[];this._hOffset=c+E,this._vOffset=M;for(let ce of s)this.processChar(ce,N,J,X,Q);t.push(...N),n.push(...J),i.push(...X),o.push(...Q),this._hOffset=c+_,w&&(this._currentContext.fontSizeScaleFactor=p,this.calcuateLineParams())}}else{let v=[],x=[],w=[],_=[];this._hOffset=c+y,this._vOffset=this.convertTopAlignedVOffset(u+this.currentFontSize*.3,this.currentFontSize);for(let T of a)this.processChar(T,v,x,w,_);t.push(...v),n.push(...x),i.push(...w),o.push(..._),(l==="/"||l==="#")&&this.recordStackDivider(c,u,g,i,o);let A=[],E=[],S=[],M=[];this._hOffset=c+b,this._vOffset=this.convertTopAlignedVOffset(u-this.currentFontSize*.6,this.currentFontSize);for(let T of s)this.processChar(T,A,E,S,M);if(t.push(...A),n.push(...E),i.push(...S),o.push(...M),l==="/"||l==="#"){let T=new ot,L=new Float32Array([c,u-this.currentFontSize*.8+this.defaultFontSize*_E,0,c+g,u-this.currentFontSize*.8+this.defaultFontSize*_E,0]);T.setAttribute("position",new Et(L,3)),T.setIndex([0,1]),T.userData={isDecoration:!0},n.push(T)}this._hOffset=c+g}this._vOffset=u,this._currentContext.charTrackingFactor={value:h,isRelative:!1}}recordStackDivider(e,t,n,i,o){if(this._options.collectCharBoxes===!1)return;let a=t-this.currentFontSize*.8+this.defaultFontSize*_E,s=new Ne(new U(e,a,0),new U(e+n,a,0));this.resolveCharBoxTarget(i,o)==="mesh"?i.push({type:Or.CHAR,box:s,char:kE,children:[]}):o.push({type:Or.CHAR,box:s,char:kE,children:[]})}convertTopAlignedVOffset(e,t){return e-t+this.defaultFontSize+this.defaultFontSize*_E}processBlank(e,t){if(this._options.collectCharBoxes!==!1){let n=this._hOffset,i=this.flowDirection==fa.BOTTOM_TO_TOP?this._vOffset:this._vOffset-this.currentLayoutFontSize,o=new Ne(new U(n,i,0),new U(n+this.currentBlankAdvance,i+this.currentLayoutFontSize,0));this.resolveCharBoxTarget(e,t)==="mesh"?e.push({type:Or.CHAR,box:o,char:" ",children:[]}):t.push({type:Or.CHAR,box:o,char:" ",children:[]})}this._hOffset+=this.currentBlankAdvance}recordVisualLineBreak(e,t){let n=this._processedCharCount+this.countFinalCharBoxes(e??[],t??[],Or.CHAR);this._lineBreakIndices.push(n)}recordCurrentLineLayout(){let e=this.flowDirection==fa.BOTTOM_TO_TOP?this._vOffset:this._vOffset-this.defaultFontSize,t=this.currentLineHeight;this._lineLayouts.push({y:e+t/2,height:t})}processPercentSymbol(e,t,n,i,o){if(e.kind==="literal"){this.processChar(e.char,t,n,i,o);return}let a=this.resolvePercentSymbolShape(e);this.processChar(e.char,t,n,i,o,a)}processChar(e,t,n,i,o,a){let s=a?{shape:a,sourceFont:this.currentFont}:this.resolveCharShape(e),l=s?.shape;if(!l){this.processBlank(i,o);return}this._lineHasRenderableChar||this.applyPendingEmptyLineYAdjust();let c=this.maxLineWidth||1/0,u=this.currentHorizontalAlignment==Vt.DISTRIBUTED,h=u?l.width*this.currentWidthFactor:this.penAdvance(l.width);!this._suppressSoftWrap&&Number.isFinite(c)&&this.hOffset>0&&this.hOffset+h>c&&(this.recordVisualLineBreak(i,o),this.advanceToNextLine(!1));let d=this.hOffset,p=this.flowDirection==fa.BOTTOM_TO_TOP?this.vOffset:this.vOffset-this.currentLayoutFontSize,f=this.currentLayoutFontSize,m=l.width*this.currentWidthFactor,{matrix:g,obliqueExtraAdvance:y}=this.buildCharTransformMatrix(d,p,f,l.geometryScale),b=this.getGlyphGeometry(l);this.appendCharGeometry(l,e,b,g,t,i,o),u?this._hOffset+=l.width*this.currentWidthFactor+y*this.currentWidthFactor:this._hOffset+=this.penAdvance(l.width,y),this._lineHasRenderableChar=!0;let v=f*.05,x=.001;if(this._currentContext.underline){let w=p-v;this.pushDecorationLine(n,[d,w,x,d+m,w,x])}if(this._currentContext.overline){let w=p+f+v;this.pushDecorationLine(n,[d,w,x,d+m,w,x])}if(this._currentContext.strikeThrough){let w=p+f/2-f*.2;this.pushDecorationLine(n,[d,w,x,d+m,w,x])}}processLastLine(){this.processAlignment()}initLineParams(){this.calcuateLineParams()}changeFont(e){let t=e;this._options.removeFontExtension&&(t=e.replace(/\.(ttf|otf|woff|shx)$/,"")),this._currentContext.fontFace.family=this.fontManager.findAndReplaceFont(t),this.calcuateLineParams(),this._currentContext.blankWidth=this.calculateBlankWidthForFont(this._currentContext.fontFace.family,this.currentLayoutFontSize)}calcuateLineParams(e){this._currentContext.fontScaleFactor=this.fontManager.getFontScaleFactor(this.currentFont);let t=e||this.defaultFontSize||this.textStyle.fixedTextHeight;this._currentContext.fontSize=t*this._currentContext.fontScaleFactor*this._currentContext.fontSizeScaleFactor}shapeHasStrokeGeometry(e,t){return(typeof e.hasStrokeGeometry=="function"?e.hasStrokeGeometry():e.width>0)?!0:t===" "&&e.width>0}trySymbolFontPercentShape(e){for(let t of cEe(e)){let n=this.fontManager.getCodeShapeFromSymbolFonts(t,this.currentFontSize);if(n&&this.shapeHasStrokeGeometry(n,e.char))return this.currentFontSize>this._maxFontSize&&(this._maxFontSize=this.currentFontSize),this.currentLayoutFontSize>this._maxLayoutFontSize&&(this._maxLayoutFontSize=this.currentLayoutFontSize),n}}resolvePercentSymbolShape(e){return this.trySymbolFontPercentShape(e)??this.getCharShape(e.char)}resolveCharShape(e){var t;let n=this.currentFont,i=(t=this._currentContext.bigFont!==void 0?this._currentContext.bigFont:this.textStyle.bigFont)==null?void 0:t.trim(),o,a=n;if(this.canProbeFontOwnership()?this.fontHasChar(n,e)&&(o=this.fontManager.getCharShape(e,n,this.currentFontSize)):o=this.fontManager.getCharShape(e,n,this.currentFontSize),!o&&i&&(o=this.fontManager.getCharShape(e,i,this.currentFontSize),o&&(a=i)),!o){let s=uEe(e);s&&(o=this.trySymbolFontPercentShape(s))}if(o||(o=this.fontManager.getCharShapeFromDefaults(e,this.currentFontSize),o&&(a=n)),!o){let s=e.codePointAt(0);s!=null&&(o=this.fontManager.getCodeShapeFromSymbolFonts(s,this.currentFontSize),o&&(a=n))}if(!o||!this.shapeHasStrokeGeometry(o,e)){if(o=this.fontManager.getNotFoundTextShape(this.currentFontSize),!o)return;a=n}return this.currentFontSize>this._maxFontSize&&(this._maxFontSize=this.currentFontSize),this.currentLayoutFontSize>this._maxLayoutFontSize&&(this._maxLayoutFontSize=this.currentLayoutFontSize),{shape:o,sourceFont:a}}canProbeFontOwnership(){return typeof this.fontManager.getFontByName=="function"}fontHasChar(e,t){let n=this.fontManager.getFontByName;if(typeof n!="function")return!1;let i=n.call(this.fontManager,e,!1);return i?.hasChar(t)??!1}getCharShape(e){var t;return(t=this.resolveCharShape(e))==null?void 0:t.shape}advanceToNextLine(e=!0){e&&this.recordVisualLineBreak(),this.captureCurrentLineAdvance(),this.recordCurrentLineLayout(),this._hOffset=0,this._lineHasRenderableChar?this._pendingEmptyLineFontSizeAdjust=void 0:this._pendingEmptyLineFontSizeAdjust=this.currentFontSize,this.flowDirection==fa.BOTTOM_TO_TOP?this._vOffset+=this.currentLineHeight:this._vOffset-=this.currentLineHeight,this._lineCount++,this.processAlignment(),this._currentLineObjects=[],this._lineCount==2?this._totalHeight=this.currentMaxFontSize:this._totalHeight=this._totalHeight+this.currentLineHeight,this._maxFontSize=0,this._maxLayoutFontSize=0,this._lineHasRenderableChar=!1}captureCurrentLineAdvance(){Number.isFinite(this._hOffset)&&(this._maxLineAdvance=Math.max(this._maxLineAdvance,this._hOffset))}countFinalCharBoxes(e,t,n){let i=[...e,...t].filter(h=>h.char!==kE);if(n!==Or.STACK)return i.length;let o=h=>h.type===Or.CHAR&&h.char.trim().length===0,a=h=>h.type===Or.CHAR&&h.char.trim().length>0,s=i.findIndex(a);if(s<0)return i.filter(o).length;let l=-1;for(let h=i.length-1;h>=0;h--)if(a(i[h])){l=h;break}let c=i.slice(0,s).filter(o),u=i.slice(l+1).filter(o);return c.length+1+u.length}applyPendingEmptyLineYAdjust(){if(this._pendingEmptyLineFontSizeAdjust===void 0)return;let e=this.currentFontSize-this._pendingEmptyLineFontSizeAdjust;e!==0&&(this.flowDirection==fa.BOTTOM_TO_TOP?this._vOffset+=e:this._vOffset-=e),this._pendingEmptyLineFontSizeAdjust=void 0}resolveCharBoxTarget(e,t){return this._lastCharBoxTarget?this._lastCharBoxTarget:e.length>0&&t.length===0?"mesh":t.length>0&&e.length===0?"line":this.fontManager.getFontType(this.currentFont)==="mesh"?"mesh":"line"}processAlignment(){let e=[];if(this.currentLineObjects.forEach(s=>s.traverse(l=>{"geometry"in l&&e.push({geometry:l.geometry,owner:l})})),e.length==0)return;let t;if(e.forEach((s,l)=>{s.geometry.boundingBox||s.geometry.computeBoundingBox(),l===0?t=s.geometry.boundingBox:t.union(s.geometry.boundingBox)}),!t)return;let n=t,i=n.getSize(hEe),o=(s,l)=>{var c,u;let h=(u=(c=s.userData)==null?void 0:c.layout)==null?void 0:u.chars;if(h&&h.length>0){let d=new U(l,0,0);h.forEach(p=>{var f;return(f=p.box)==null?void 0:f.translate(d)})}},a=()=>{let s=Number.isFinite(this.maxLineWidth)?this._currentLeftMargin-n.min.x:this._currentLeftMargin,l=new Set;e.forEach(c=>{c.geometry.translate(s,0,0),l.has(c.owner)||(o(c.owner,s),l.add(c.owner))})};switch(this.currentHorizontalAlignment===Vt.DEFAULT?this._options.horizontalAlignment:this.currentHorizontalAlignment){case Vt.LEFT:case Vt.JUSTIFIED:{a();break}case Vt.CENTER:{if(!Number.isFinite(this.maxLineWidth)){a();break}let s=this._currentLeftMargin+(this.maxLineWidth-i.x)/2-n.min.x,l=new Set;e.forEach(c=>{c.geometry.translate(s,0,0),l.has(c.owner)||(o(c.owner,s),l.add(c.owner))});break}case Vt.RIGHT:{if(!Number.isFinite(this.maxLineWidth)){a();break}let s=this._currentLeftMargin+this.maxLineWidth-i.x-n.min.x,l=new Set;e.forEach(c=>{c.geometry.translate(s,0,0),l.has(c.owner)||(o(c.owner,s),l.add(c.owner))});break}case Vt.DISTRIBUTED:{if(!Number.isFinite(this.maxLineWidth)){a();break}let s=e.length>1?(this.maxLineWidth-i.x)/(e.length-1):0,l=new Set;e.forEach((c,u)=>{let h=s*u+(this._currentLeftMargin-n.min.x);c.geometry.translate(h,0,0),l.has(c.owner)||(o(c.owner,h),l.add(c.owner))});break}}}calculateBlankWidthForFont(e,t){let n=this.fontManager.getCharShape(" ",e,t);return n&&n.width>0?n.width:this.fontManager.getFontType(e)==="shx"?t*.5:t*.3}toThreeObject(e,t,n,i,o){let a=new Zn,s=this.getMaterialColorSettings(),l=this.styleManager.getMeshBasicMaterial(s),c=this.styleManager.getLineBasicMaterial(s),u=s.color.copy(),h=this._options.collectCharBoxes!==!1;if(this._meshBatchEntries.length>0){let p=qE.mergeMeshGeometries(this._meshBatchEntries);ZK(p);let f=new jt(p,l);f.userData.bboxIntersectionCheck=!0,f.userData.charBoxType=o,f.userData.mtextColor=u,h&&n.length>0&&(f.userData.layout={chars:n.slice()}),a.add(f)}let d=[...this._lineBatchEntries,...t.map(p=>({geometry:p,matrix:M$})),...e.filter(p=>!KY(p)).map(p=>({geometry:p,matrix:M$}))];if(d.length>0){let p=qE.mergeLineGeometries(d),f=new qn(p,c);f.userData.bboxIntersectionCheck=!0,f.userData.charBoxType=o,f.userData.mtextColor=u,h&&i.length>0&&(f.userData.layout={chars:i.slice()}),a.add(f)}return a.children.length===1?a.children[0]:a}changeFontSizeScaleFactor(e){this._currentContext.fontSizeScaleFactor*=e,this.calcuateLineParams()}changeFontHeight(e){this.calcuateLineParams(e)}resolveBaseColor(){return f_(this._colorSettings)}getMaterialColorSettings(){return{byLayerColor:this._colorSettings.byLayerColor,byBlockColor:this._colorSettings.byBlockColor,layer:this._colorSettings.layer,color:this._currentContext.color.copy()}}},pEe=[[/%%koff/gi,"\\k"],[/%%kon/gi,"\\K"],[/%%ooff/gi,"\\o"],[/%%oon/gi,"\\O"],[/%%uoff/gi,"\\l"],[/%%uon/gi,"\\L"]],fEe=/%%([kou])/gi;function mEe(r){let e=r;for(let[o,a]of pEe)e=e.replace(o,a);let t=!1,n=!1,i=!1;return e.replace(fEe,(o,a)=>{switch(a.toLowerCase()){case"k":return t=!t,t?"\\K":"\\k";case"o":return n=!n,n?"\\O":"\\o";case"u":return i=!i,i?"\\L":"\\l";default:return`%%${a}`}})}var gEe=/\\U\+([0-9A-Fa-f]{4})/g;function yEe(r){return r.replace(gEe,(e,t)=>{let n=parseInt(t,16);return String.fromCharCode(n)})}var h_=new U,qu=new U,Zu=new U,C$=new U(1,0,0),Tf=class r extends $n{static getFonts(e,t=!1){let n=new Set;for(let i of WX(e,!1))for(let o of i.split(",")){let a=o.trim();a&&(t&&(a=a.replace(/\.(ttf|otf|woff|shx)$/i,"")),n.add(a))}return n}constructor(e,t,n,i,o=ci()){super(),this._style=t,this._styleManager=n,this._fontManager=i,this._colorSettings={byLayerColor:o.byLayerColor,byBlockColor:o.byBlockColor,layer:o.layer,color:o.color.copy()},this._box=new Ne,this._layoutData=void 0,this._mtextData=e,this._fontsInStyleLoaded=!1}get fontManager(){return this._fontManager}dispose(){this.disposeThreeObject(this)}async asyncDraw(e){let t=Array.from(r.getFonts(this._mtextData.text||"",!0));if(!this._fontsInStyleLoaded){if(this._style.font){let s=this.getFontName(this._style.font);s&&t.push(s)}if(this._style.bigFont){let s=this.getFontName(this._style.bigFont);s&&t.push(s)}if(this._style.extendedFont){let s=this.getFontName(this._style.extendedFont);s&&t.push(s)}}let n=e?.awaitFonts??(!this._fontManager.lazyFontLoading||this._fontManager.awaitFontsBeforeDraw),i=[...new Set(t)],o=new Set(i.map(s=>s.toLowerCase())),a=this._fontManager.getFontsToLoad().filter(s=>!o.has(s.toLowerCase()));if(this._fontManager.lazyFontLoading?i.length>0&&(n&&a.length>0&&this._fontManager.requestFonts(a),n?await this._fontManager.requestFonts(i):this._fontManager.requestFonts(i)):(i.length>0||a.length>0)&&await this._fontManager.loadFontsByNames([...i,...a]),t.length>0){let s=[this._style.font?this.getFontName(this._style.font):void 0,this._style.bigFont?this.getFontName(this._style.bigFont):void 0,this._style.extendedFont?this.getFontName(this._style.extendedFont):void 0].filter(l=>!!l);(s.length===0||s.every(l=>this._fontManager.isFontLoaded(l)))&&(this._fontsInStyleLoaded=!0)}this.syncDraw()}syncDraw(){let e=this.loadMText(this._mtextData,this._style);if(e){this._layoutData=void 0,this._box.makeEmpty();let t={hasLine:!1,minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0,minZ:1/0,maxZ:-1/0,hasLogicalBounds:!1};this.updateBoxFromObject(e,t),t.hasLine&&!t.hasLogicalBounds&&(this.box.isEmpty()?(this.box.min.set(t.minX,t.minY,t.minZ),this.box.max.set(t.maxX,t.maxY,t.maxZ)):(this.box.min.y=Math.min(this.box.min.y,t.minY),this.box.max.y=Math.max(this.box.max.y,t.maxY))),this.add(e)}}get styleManager(){return this._styleManager}get textStyle(){return this._style}get box(){return this._box}set box(e){this._box.copy(e)}createLayoutData(){if(this._layoutData)return this._layoutData;let e={lines:[],chars:[]};return this.updateWorldMatrix(!0,!0),this.getLayout(this,e.chars,e.lines),this._layoutData=e,e}raycast(e,t){this.createLayoutData().chars.forEach(n=>{if(n.box&&e.ray.intersectBox(n.box,h_)){let i=e.ray.origin.distanceTo(h_);t.push({distance:i,point:h_.clone(),object:this,face:null,faceIndex:void 0,uv:void 0})}})}loadMText(e,t){let{object:n,height:i}=this.createMTextGroup(e,t);if(n)return this.finalizePlacement(n,e,i)}loadShape(e,t){let{object:n,height:i}=this.createShapeGroup(e,t);if(!n)return;let o={text:"",height:e.size,width:1/0,widthFactor:e.widthFactor??t.widthFactor??1,position:e.position,rotation:e.rotation,directionVector:e.directionVector,drawingDirection:fa.BOTTOM_TO_TOP,collectCharBoxes:!1};return this.finalizePlacement(n,o,i,{shxFontType:this._fontManager.getShxFontType(t.font)})}finalizePlacement(e,t,n,i){var o;let a=A$(t);e.updateWorldMatrix(!0,!0);let s=new Ne().setFromObject(e);if(!Number.isFinite(a)){let f=(o=e.userData)==null?void 0:o.logicalAdvanceWidth,m=typeof f=="number"&&f>0?f:s.max.x-s.min.x;a=Number.isFinite(m)&&m>0?m:0}let l=this.measureAnchorMetrics(e,a,n,s,t.drawingDirection),c={x:0,y:0};i?.shxFontType===_n.SHAPES?c={x:0,y:0}:c=this.calculateAnchorPoint(l,t.attachmentPoint),e.userData.logicalBounds={minX:l.minX+c.x,maxX:l.maxX+c.x,minY:l.minY+c.y,maxY:l.maxY+c.y};let u=f=>{if(!f||f.length===0)return;let m=new U(c.x,c.y,0),g=y=>{var b;(b=y.box)==null||b.translate(m),y.children&&y.children.length>0&&y.children.forEach(g)};f.forEach(g)},h=f=>{!f||f.length===0||f.forEach(m=>{m.y+=c.y})};e.traverse(f=>{var m,g,y;if("geometry"in f){let b=f.geometry;Number.isFinite(c.x)&&Number.isFinite(c.y)&&b.translate(c.x,c.y,0)}u((g=(m=f.userData)==null?void 0:m.layout)==null?void 0:g.chars),h((y=f.userData)==null?void 0:y.lineLayouts),f.layers.enableAll()});let d=t.rotation||0;if(t.directionVector&&i?.shxFontType!==_n.SHAPES){let f=t.directionVector,m=new U(f.x,f.y,f.z),g=m.clone().cross(C$),y=C$.angleTo(m);d=g.z>0?-y:y}let p=t.position;return e.position.set(p?.x??0,p?.y??0,p?.z??0),e.quaternion.setFromAxisAngle(new U(0,0,1),d),e.scale.set(1,1,1),e.updateMatrix(),e.updateMatrixWorld(!0),e}createShapeGroup(e,t){let n=e.size||t.fixedTextHeight||0,i=e.widthFactor??t.widthFactor??1,o={fontSize:n,widthFactor:i,lineSpaceFactor:w$,lineSpaceStyle:_$,horizontalAlignment:Vt.LEFT,maxWidth:0,flowDirection:fa.BOTTOM_TO_TOP,byBlockColor:this._colorSettings.byBlockColor,byLayerColor:this._colorSettings.byLayerColor,removeFontExtension:!0,collectCharBoxes:!1},a=new ZE(t,this._colorSettings,this._styleManager,this._fontManager,o);return{object:a.processShapeGlyph(e.name,e.shapeNumber),height:a.totalHeight}}createMTextGroup(e,t){if(t&&t.font&&t.font.endsWith(".shx")){let m=`${t.font}_${t.name}`;this.styleManager.unsupportedTextStyles[m]||(this.styleManager.unsupportedTextStyles[m]=0),this.styleManager.unsupportedTextStyles[m]++}let n=A$(e)||0,i=Vt.LEFT;e.attachmentPoint&&([st.TopLeft,st.MiddleLeft,st.BottomLeft,st.BaselineLeft].includes(e.attachmentPoint)?i=Vt.LEFT:[st.TopCenter,st.MiddleCenter,st.BottomCenter,st.BaselineCenter].includes(e.attachmentPoint)?i=Vt.CENTER:[st.TopRight,st.MiddleRight,st.BottomRight,st.BaselineRight].includes(e.attachmentPoint)&&(i=Vt.RIGHT));let o=lr.BOTTOM;e.attachmentPoint&&([st.TopLeft,st.TopCenter,st.TopRight].includes(e.attachmentPoint)?o=lr.TOP:[st.MiddleLeft,st.MiddleCenter,st.MiddleRight].includes(e.attachmentPoint)?o=lr.MIDDLE:o=lr.BOTTOM);let a=e.height||t.fixedTextHeight||0,s=e.widthFactor||t.widthFactor||1,l=e.lineSpaceFactor??w$,c=e.lineSpaceStyle===Pf.Exact?Pf.Exact:_$,u=e.drawingDirection??fa.LEFT_TO_RIGHT,h={fontSize:a,widthFactor:s,lineSpaceFactor:l,lineSpaceStyle:c,horizontalAlignment:i,maxWidth:n,flowDirection:u,byBlockColor:this._colorSettings.byBlockColor,byLayerColor:this._colorSettings.byLayerColor,removeFontExtension:!0,collectCharBoxes:e.collectCharBoxes??!0,meshFontRenderMode:e.meshFontRenderMode??"mesh"},d=new Cs;d.color=this._colorSettings.color.copy(),d.fontFace.family=this.fontManager.findAndReplaceFont(t.font).toLowerCase(),d.capHeight={value:a,isRelative:!1},d.widthFactor={value:s,isRelative:!1},d.align=o,d.paragraph.align=i;let p=new ZE(t,this._colorSettings,this.styleManager,this.fontManager,h),f=new Vy(yEe(mEe(e.text)),d,{resetParagraphParameters:!1,yieldPropertyCommands:!0,yieldPercentSymbols:!0}).parse();return{object:p.processText(f),height:p.totalHeight}}measureAnchorMetrics(e,t,n,i,o){let a={hasLine:!1,minY:1/0,maxY:-1/0,baselineY:0},s=!1;e.traverse(m=>{var g;let y=(g=m.userData)==null?void 0:g.lineLayouts;!y||y.length===0||y.forEach(b=>{let v=b.y-b.height/2,x=b.y+b.height/2;a.hasLine=!0,a.minY=Math.min(a.minY,v),a.maxY=Math.max(a.maxY,x),s||(a.baselineY=v,s=!0)})});let l=i.isEmpty()?0:i.max.y-i.min.y,c=Number.isFinite(l)&&l>0?l:Number.isFinite(n)&&n>0?n:0,u=0,h=Number.isFinite(t)&&t>0?t:0;h<=u&&!i.isEmpty()&&(u=i.min.x,h=i.max.x);let d=0,p=0;o==fa.BOTTOM_TO_TOP?(d=i.isEmpty()?0:i.min.y,p=d+c):(p=i.isEmpty()?0:i.max.y,d=p-c);let f=a.hasLine?a.baselineY:d;return{minX:u,maxX:h,minY:d,maxY:p,baselineY:f}}calculateAnchorPoint(e,t){let n=(e.minX+e.maxX)/2,i=(e.minY+e.maxY)/2,o=0,a=0;switch(t){case void 0:case st.TopLeft:o=-e.minX,a=-e.maxY;break;case st.TopCenter:o=-n,a=-e.maxY;break;case st.TopRight:o=-e.maxX,a=-e.maxY;break;case st.MiddleLeft:o=-e.minX,a=-i;break;case st.MiddleCenter:o=-n,a=-i;break;case st.MiddleRight:o=-e.maxX,a=-i;break;case st.BottomLeft:o=-e.minX,a=-e.minY;break;case st.BottomCenter:o=-n,a=-e.minY;break;case st.BottomRight:o=-e.maxX,a=-e.minY;break;case st.BaselineLeft:o=-e.minX,a=-e.baselineY;break;case st.BaselineCenter:o=-n,a=-e.baselineY;break;case st.BaselineRight:o=-e.maxX,a=-e.baselineY;break}return{x:o,y:a}}getLayout(e,t,n){var i,o,a,s,l;e.updateWorldMatrix(!1,!1);let c=(o=(i=e.userData)==null?void 0:i.layout)==null?void 0:o.chars,u=(a=e.userData)==null?void 0:a.lineLayouts;if(u&&u.length>0&&u.forEach(d=>{h_.set(0,d.y,0).applyMatrix4(e.matrixWorld),qu.set(0,d.y-d.height/2,0).applyMatrix4(e.matrixWorld),Zu.set(0,d.y+d.height/2,0).applyMatrix4(e.matrixWorld),n.push({y:h_.y,height:Math.abs(Zu.y-qu.y),breakIndex:d.breakIndex})}),c&&c.length>0){let d=(s=e.userData)==null?void 0:s.charBoxType,p=EB(c,e.matrixWorld,d);t.push(...p);return}if(e instanceof Ni||e instanceof jt){let d=e.geometry;if(!((l=d.userData)!=null&&l.isDecoration)){d.boundingBox===null&&d.computeBoundingBox();let p=new Ne().copy(d.boundingBox);p.applyMatrix4(e.matrixWorld),t.push({type:Or.CHAR,box:p,char:"",children:[]})}}let h=e.children;for(let d=0,p=h.length;d<p;d++)this.getLayout(h[d],t,n)}updateBoxFromObject(e,t){var n,i,o,a,s,l;e.updateWorldMatrix(!1,!1);let c=(n=e.userData)==null?void 0:n.logicalBounds;if(c){t.hasLogicalBounds=!0;let p=new Ne(new U(c.minX,c.minY,0),new U(c.maxX,c.maxY,0));p.applyMatrix4(e.matrixWorld),this.box.union(p)}let u=(i=e.userData)==null?void 0:i.lineLayouts;u&&u.length>0&&u.forEach(p=>{qu.set(0,p.y-p.height/2,0).applyMatrix4(e.matrixWorld),Zu.set(0,p.y+p.height/2,0).applyMatrix4(e.matrixWorld),t.hasLine=!0,t.minX=Math.min(t.minX,qu.x,Zu.x),t.maxX=Math.max(t.maxX,qu.x,Zu.x),t.minY=Math.min(t.minY,qu.y,Zu.y),t.maxY=Math.max(t.maxY,qu.y,Zu.y),t.minZ=Math.min(t.minZ,qu.z,Zu.z),t.maxZ=Math.max(t.maxZ,qu.z,Zu.z)});let h=(a=(o=e.userData)==null?void 0:o.layout)==null?void 0:a.chars;if(h&&h.length>0){let p=(s=e.userData)==null?void 0:s.charBoxType;EB(h,e.matrixWorld,p).forEach(f=>{f.box&&this.box.union(f.box)});return}if(e instanceof Ni||e instanceof jt){let p=e.geometry;if(!((l=p.userData)!=null&&l.isDecoration)){p.boundingBox===null&&p.computeBoundingBox();let f=new Ne().copy(p.boundingBox);f.applyMatrix4(e.matrixWorld),this.box.union(f)}}let d=e.children;for(let p=0,f=d.length;p<f;p++)this.updateBoxFromObject(d[p],t)}disposeThreeObject(e){e.traverse(t=>{if(t.geometry&&typeof t.geometry.dispose=="function")try{t.geometry.dispose()}catch{}if(t.material){let n=i=>{if(i&&typeof i.dispose=="function")try{i.dispose()}catch{}};Array.isArray(t.material)?t.material.forEach(n):n(t.material)}})}getFontName(e){if(e){let t=e.lastIndexOf(".");return t>=0?e.substring(0,t).toLowerCase():e.toLowerCase()}}},JE=class extends $n{constructor(e,t,n,i,o=ci()){super(),this._shapeData=e,this._style=t,this._styleManager=n,this._fontManager=i,this._colorSettings={byLayerColor:o.byLayerColor,byBlockColor:o.byBlockColor,layer:o.layer,color:o.color.copy()},this._box=new Ne,this._fontsInStyleLoaded=!1}get box(){return this._box}get styleManager(){return this._styleManager}get textStyle(){return this._style}createLayoutData(){return{lines:[],chars:[]}}async asyncDraw(e){let t=[];if(!this._fontsInStyleLoaded)for(let s of["font","bigFont","extendedFont"]){let l=this.getFontName(this._style[s]);l&&t.push(l)}let n=e?.awaitFonts??(!this._fontManager.lazyFontLoading||this._fontManager.awaitFontsBeforeDraw),i=[...new Set(t)],o=new Set(i.map(s=>s.toLowerCase())),a=this._fontManager.getFontsToLoad().filter(s=>!o.has(s.toLowerCase()));this._fontManager.lazyFontLoading?i.length>0&&(n&&a.length>0&&this._fontManager.requestFonts(a),n?await this._fontManager.requestFonts(i):this._fontManager.requestFonts(i)):(i.length>0||a.length>0)&&await this._fontManager.loadFontsByNames([...i,...a]),t.length>0&&t.every(s=>this._fontManager.isFontLoaded(s))&&(this._fontsInStyleLoaded=!0),this.syncDraw()}syncDraw(){let e=new Tf(this.createPlacementData(),this._style,this._styleManager,this._fontManager,this._colorSettings).loadShape(this._shapeData,this._style);if(super.clear(),!e){this._box.makeEmpty();return}this.add(e),this._box.setFromObject(e)}createPlacementData(){return{text:"",height:this._shapeData.size,width:1/0,widthFactor:this._shapeData.widthFactor??this._style.widthFactor??1,position:this._shapeData.position,rotation:this._shapeData.rotation,directionVector:this._shapeData.directionVector,drawingDirection:fa.BOTTOM_TO_TOP,collectCharBoxes:!1}}getFontName(e){if(!e)return;let t=e.trim().toLowerCase();if(t)return t.endsWith(".shx")?t.slice(0,-4):t}},QE=class{constructor(){this.lineBasicMaterials={},this.meshBasicMaterials={},this.unsupportedTextStyles={}}getMeshBasicMaterial(e){let t=this.buildKey(e);if(!this.meshBasicMaterials[t]){let n=f_(e);this.meshBasicMaterials[t]=new _i({color:n})}return this.meshBasicMaterials[t]}getLineBasicMaterial(e){let t=this.buildKey(e);if(!this.lineBasicMaterials[t]){let n=f_(e);this.lineBasicMaterials[t]=new Fi({color:n})}return this.lineBasicMaterials[t]}getMaterialStats(){let e=Object.keys(this.meshBasicMaterials).length,t=Object.keys(this.lineBasicMaterials).length;return{meshCount:e,lineCount:t,estimatedBytes:r_e(e,t)}}buildKey(e){let t=e.color.aci===256,n=f_(e);return t&&e.layer?`layer_${e.layer}_${n}`:`entity_${n}`}},T$=new U,k$=new U,I$=new U,TB=class{constructor(e={}){this.workers=[],this.inFlightPerWorker=[],this.pendingRequests=new Map,this.requestId=0,this.readyPromise=null,this.fontsPerWorker=[],this.poolFontLoadedDispatched=new Set,this.poolSize=e.poolSize??Math.max(1,navigator.hardwareConcurrency?Math.min(4,navigator.hardwareConcurrency):2),this.defaultStyleManager=new QE;let t=e.workerUrl??"./assets/mtext-renderer-worker.js";this.timeOut=e.timeOut??12e4;for(let n=0;n<this.poolSize;n++){let i=new Worker(t,{type:"module"});this.attachWorkerHandlers(i,n),this.workers.push(i),this.inFlightPerWorker.push(0),this.fontsPerWorker.push(new Set)}this.isInitialized=!1}get styleManager(){return this.defaultStyleManager}set styleManager(e){this.defaultStyleManager=e}async ensureInitialized(){this.isInitialized||(et.instance.lazyFontLoading||await this.loadFonts(et.instance.getFontsToLoad()),this.isInitialized=!0)}handleWorkerMessage(e,t){var n,i,o,a;if(e.type==="fontLoaded"){let d=(n=e.data)==null?void 0:n.fontName;if(d){let p=d.toLowerCase();(i=this.fontsPerWorker[t])==null||i.add(p),p&&!this.poolFontLoadedDispatched.has(p)&&(this.poolFontLoadedDispatched.add(p),et.instance.applyRemoteFontLoaded(d),et.instance.events.fontLoaded.dispatch({fontName:d}))}return}if(e.type==="fontNotFound"){let d=(o=e.data)==null?void 0:o.fontName;d&&et.instance.applyRemoteFontNotFound(d,((a=e.data)==null?void 0:a.count)??1);return}let{id:s,success:l,data:c,error:u}=e,h=this.pendingRequests.get(s);if(h)if(this.pendingRequests.delete(s),this.inFlightPerWorker[t]=Math.max(0,this.inFlightPerWorker[t]-1),l){if(e.type==="loadFonts"){let d=c?.loaded??[],p=this.fontsPerWorker[t];if(p)for(let f of d){let m=f.toLowerCase();m&&p.add(m)}}h.resolve(c)}else h.reject(new Error(u||"Unknown worker error"));else console.warn(`No pending request found for worker response id=${s}`)}attachWorkerHandlers(e,t){e.onmessage=n=>{this.handleWorkerMessage(n.data,t)},e.onerror=n=>{console.error(`Worker ${t} error:`,n);let i=[];this.pendingRequests.forEach((o,a)=>{o.workerIndex===t&&i.push(a)}),i.forEach(o=>{let a=this.pendingRequests.get(o);a&&(a.reject(new Error("Worker error occurred")),this.pendingRequests.delete(o))}),this.inFlightPerWorker[t]=0}}pickLeastLoadedWorker(){var e,t;let n=0,i=this.inFlightPerWorker[0]??0,o=((e=this.fontsPerWorker[0])==null?void 0:e.size)??0;for(let a=1;a<this.inFlightPerWorker.length;a++){let s=this.inFlightPerWorker[a]??0,l=((t=this.fontsPerWorker[a])==null?void 0:t.size)??0;(s<i||s===i&&l>o)&&(i=s,o=l,n=a)}return n}sendMessageToAllWorkers(e){return Promise.all(this.workers.map((t,n)=>this.sendMessageToOneWorker(e,n)))}sendMessageToOneWorker(e,t){let n=t??this.pickLeastLoadedWorker(),i=this.workers[n];return new Promise((o,a)=>{let s=`req_${++this.requestId}`,l={...e,id:s};this.pendingRequests.set(s,{resolve:c=>o(c),reject:a,workerIndex:n}),this.inFlightPerWorker[n]=(this.inFlightPerWorker[n]??0)+1,i.postMessage(l),setTimeout(()=>{this.pendingRequests.get(s)&&(this.pendingRequests.delete(s),this.inFlightPerWorker[n]=Math.max(0,this.inFlightPerWorker[n]-1),a(new Error("Worker request timeout")))},this.timeOut)})}ensureTasksFinished(){return this.readyPromise?this.readyPromise:this.workers.length===0?Promise.resolve():(this.readyPromise=Promise.all(this.workers.map((e,t)=>new Promise((n,i)=>{let o=`req_${++this.requestId}`;this.pendingRequests.set(o,{resolve:()=>n(),reject:i,workerIndex:t}),this.inFlightPerWorker[t]=(this.inFlightPerWorker[t]??0)+1,e.postMessage({type:"getAvailableFonts",id:o}),setTimeout(()=>{this.pendingRequests.get(o)&&(this.pendingRequests.delete(o),this.inFlightPerWorker[t]=Math.max(0,this.inFlightPerWorker[t]-1),i(new Error("Worker init timeout")))},this.timeOut)}))).then(()=>{}),this.readyPromise)}async setFontUrl(e){await this.sendMessageToAllWorkers({type:"setFontUrl",data:{url:e}})}async setDefaultFonts(e,t){et.instance.setDefaultFonts(e),et.instance.setSymbolFonts(t),await this.sendMessageToAllWorkers({type:"setDefaultFonts",data:{fonts:[...e],symbolFonts:[...t]}})}async setLazyFontLoading(e){et.instance.lazyFontLoading=e,await this.sendMessageToAllWorkers({type:"setLazyFontLoading",data:{enabled:e}})}async setAwaitFontsBeforeDraw(e){et.instance.awaitFontsBeforeDraw=e,await this.sendMessageToAllWorkers({type:"setAwaitFontsBeforeDraw",data:{enabled:e}})}async replaceMissedFonts(e){var t;let n=await this.sendMessageToAllWorkers({type:"setMissedFonts",data:{missedFonts:{...e??{}}}});if(n.length===0){et.instance.replaceMissedFonts(e??{});return}let i={};for(let o of Object.keys(((t=n[0])==null?void 0:t.missedFonts)??{}))n.every(a=>{var s;return(((s=a?.missedFonts)==null?void 0:s[o])??0)>0})&&(i[o]=Math.max(...n.map(a=>{var s;return((s=a?.missedFonts)==null?void 0:s[o])??0})));et.instance.replaceMissedFonts(i)}async clearMissedFonts(){await this.replaceMissedFonts({})}async asyncRenderMText(e,t,n=ci()){await this.ensureInitialized();let i=await this.sendMessageToOneWorker({type:"render",data:{mtextContent:e,textStyle:t,colorSettings:n}});return this.reconstructMText(i,n)}syncRenderMText(e,t,n=ci()){throw new Error("Fuction 'syncRenderMText' isn't supported in 'WebWorkerRenderer'!")}async asyncRenderShape(e,t,n=ci()){throw new Error("Function 'asyncRenderShape' isn't supported in 'WebWorkerRenderer'!")}syncRenderShape(e,t,n=ci()){throw new Error("Function 'syncRenderShape' isn't supported in 'WebWorkerRenderer'!")}async loadFonts(e,t){var n;if(await this.ensureTasksFinished(),(t?.scope??"one")==="one"){let s=this.pickLeastLoadedWorker(),l=await this.sendMessageToOneWorker({type:"loadFonts",data:{fonts:[...e]}},s),c=l?.loaded??[],u=this.fontsPerWorker[s];if(u)for(let h of c){let d=h.toLowerCase();d&&u.add(d)}for(let h of c){let d=h.toLowerCase();d&&this.poolFontLoadedDispatched.add(d)}return{loaded:[...c]}}let i=await this.sendMessageToAllWorkers({type:"loadFonts",data:{fonts:[...e]}}),o=[],a=((n=i[0])==null?void 0:n.loaded)??[];if(i.length>0)for(let s of a){let l=s.toLowerCase();l&&i.every(c=>{var u;return(u=c?.loaded)==null?void 0:u.some(h=>h.toLowerCase()===l)})&&(this.poolFontLoadedDispatched.add(l),o.push(s))}return{loaded:o}}async getAvailableFonts(){return(await this.sendMessageToAllWorkers({type:"getAvailableFonts"}))[0]??{fonts:[]}}async estimateMemoryUsage(){return this.workers.length===0?[]:(await this.sendMessageToAllWorkers({type:"getMemoryStats"})).map((e,t)=>({...e,id:`worker-${t}`,inFlightRequests:this.inFlightPerWorker[t]??0}))}reconstructMText(e,t){let n=t.color.aci===256,i=new Zn;i.position.set(e.position.x,e.position.y,e.position.z),i.quaternion.set(e.rotation.x,e.rotation.y,e.rotation.z,e.rotation.w),i.scale.set(e.scale.x,e.scale.y,e.scale.z),e.children.forEach(a=>{let s=new ot;if(Object.keys(a.geometry.attributes).forEach(h=>{let d=a.geometry.attributes[h],p=new Float32Array(d.arrayBuffer,d.byteOffset,d.length),f=new Et(p,d.itemSize,d.normalized);s.setAttribute(h,f)}),a.geometry.index)if(a.geometry.index.componentType==="uint32"){let h=new Uint32Array(a.geometry.index.arrayBuffer,a.geometry.index.byteOffset,a.geometry.index.length);s.setIndex(new ef(h,1))}else{let h=new Uint16Array(a.geometry.index.arrayBuffer,a.geometry.index.byteOffset,a.geometry.index.length);s.setIndex(new Gu(h,1))}let l=eEe(t,a.material.color,n,a.material.mtextColor),c;a.type==="mesh"?(c=this.defaultStyleManager.getMeshBasicMaterial({...l}),a.material.transparent!==void 0&&(c.transparent=a.material.transparent),a.material.opacity!==void 0&&(c.opacity=a.material.opacity),a.material.side!==void 0&&(c.side=a.material.side)):(c=this.defaultStyleManager.getLineBasicMaterial({...l}),a.material.transparent!==void 0&&(c.transparent=a.material.transparent),a.material.opacity!==void 0&&(c.opacity=a.material.opacity),a.material.linewidth!==void 0&&(c.linewidth=a.material.linewidth));let u;a.type==="mesh"?u=new jt(s,c):u=new qn(s,c),s.boundingBox||s.computeBoundingBox(),s.boundingSphere||s.computeBoundingSphere(),u.position.set(a.position.x,a.position.y,a.position.z),u.quaternion.set(a.rotation.x,a.rotation.y,a.rotation.z,a.rotation.w),u.scale.set(a.scale.x,a.scale.y,a.scale.z),a.charBoxType&&(u.userData.charBoxType=a.charBoxType),a.lineLayouts&&a.lineLayouts.length>0&&(u.userData.lineLayouts=a.lineLayouts.map(h=>({y:h.y,height:h.height,breakIndex:h.breakIndex}))),a.charBoxes&&a.charBoxes.length>0&&(u.userData.layout={chars:this.deserializeCharBoxes(a.charBoxes)}),u.userData.mtextColor=l.color,i.add(u)}),i.box=new Ne(new U(e.box.min.x,e.box.min.y,e.box.min.z),new U(e.box.max.x,e.box.max.y,e.box.max.z));let o=i;return o.createLayoutData=()=>{var a;let s=(a=i.userData)==null?void 0:a.layoutCache;if(s)return s;let l={lines:[],chars:[]};return i.updateWorldMatrix(!0,!0),this.collectLayout(i,l.chars,l.lines),i.userData.layoutCache=l,l},o}deserializeCharBoxes(e){return e.map(t=>({type:t.type,char:t.char,box:new Ne(new U(t.box.min.x,t.box.min.y,t.box.min.z),new U(t.box.max.x,t.box.max.y,t.box.max.z)),children:this.deserializeCharBoxes(t.children??[])}))}collectLayout(e,t,n){var i,o,a,s,l;e.updateWorldMatrix(!1,!1);let c=(o=(i=e.userData)==null?void 0:i.layout)==null?void 0:o.chars,u=(a=e.userData)==null?void 0:a.lineLayouts;if(u&&u.length>0&&u.forEach(d=>{T$.set(0,d.y,0).applyMatrix4(e.matrixWorld),k$.set(0,d.y-d.height/2,0).applyMatrix4(e.matrixWorld),I$.set(0,d.y+d.height/2,0).applyMatrix4(e.matrixWorld),n.push({y:T$.y,height:Math.abs(I$.y-k$.y),breakIndex:d.breakIndex})}),c&&c.length>0){let d=(s=e.userData)==null?void 0:s.charBoxType,p=EB(c,e.matrixWorld,d);t.push(...p);return}if(e instanceof qn||e instanceof jt){let d=e.geometry;if(!((l=d.userData)!=null&&l.isDecoration)){d.boundingBox===null&&d.computeBoundingBox();let p=new Ne().copy(d.boundingBox);p.applyMatrix4(e.matrixWorld),t.push({type:Or.CHAR,box:p,char:"",children:[]})}}let h=e.children;for(let d=0,p=h.length;d<p;d++)this.collectLayout(h[d],t,n)}terminate(){this.workers.forEach(e=>e.terminate()),this.workers=[],this.inFlightPerWorker=[],this.fontsPerWorker=[],this.readyPromise=null,this.poolFontLoadedDispatched.clear(),this.pendingRequests.forEach(({reject:e})=>{e(new Error("Renderer terminated"))}),this.pendingRequests.clear()}destroy(){this.terminate()}},kB=class{constructor(){this.fontManager=et.instance,this.defaultStyleManager=new QE,this.isInitialized=!1}get styleManager(){return this.defaultStyleManager}set styleManager(e){this.defaultStyleManager=e}async setFontUrl(e){this.fontManager.baseUrl=e;try{await this.fontManager.getAvailableFonts()}catch{}}async asyncRenderMText(e,t,n=ci()){await this.ensureInitialized();let i=new Tf(e,t,this.defaultStyleManager,this.fontManager,n);return await i.asyncDraw(),i.updateMatrixWorld(!0),i}syncRenderMText(e,t,n=ci()){let i=new Tf(e,t,this.defaultStyleManager,this.fontManager,n);return i.syncDraw(),i.updateMatrixWorld(!0),i}async asyncRenderShape(e,t,n=ci()){await this.ensureInitialized();let i=new JE(e,t,this.defaultStyleManager,this.fontManager,n);return await i.asyncDraw(),i.updateMatrixWorld(!0),i}syncRenderShape(e,t,n=ci()){let i=new JE(e,t,this.defaultStyleManager,this.fontManager,n);return i.syncDraw(),i.updateMatrixWorld(!0),i}async loadFonts(e,t){return await this.fontManager.loadFontsByNames(e),{loaded:e.filter(n=>this.fontManager.isFontLoaded(n))}}async getAvailableFonts(){return{fonts:await this.fontManager.getAvailableFonts()}}estimateMemoryUsage(){return iq(this.fontManager,{id:"main",styleManager:this.defaultStyleManager})}destroy(){}async ensureInitialized(){if(!this.isInitialized){try{await this.fontManager.getAvailableFonts()}catch{}this.fontManager.lazyFontLoading||await this.loadFonts(this.fontManager.getFontsToLoad()),this.isInitialized=!0}}},kf=class{constructor(e="main",t={}){this.webWorkerRenderer=null,this.webWorkerConfigured=!1,this.workerLazyFontLoading=null,this.workerAwaitFontsBeforeDraw=null,this.workerFontUrl=null,this.defaultMode=e,this.workerConfig=t,this.mainThreadRenderer=new kB,this.renderer=this.mainThreadRenderer,e==="worker"&&(this.renderer=this.ensureWebWorkerRenderer())}ensureWebWorkerRenderer(){return this.webWorkerRenderer||(this.webWorkerRenderer=new TB(this.workerConfig),this.webWorkerRenderer.styleManager=this.mainThreadRenderer.styleManager,this.webWorkerConfigured=!1),this.webWorkerRenderer}async activateWebWorkerRenderer(){let e=this.ensureWebWorkerRenderer();this.webWorkerConfigured||(await e.setDefaultFonts([...et.instance.defaultFonts],[...et.instance.symbolFonts]),this.webWorkerConfigured=!0);let t=et.instance.baseUrl;t&&this.workerFontUrl!==t&&(await e.setFontUrl(t),this.workerFontUrl=t);let n=et.instance.lazyFontLoading;this.workerLazyFontLoading!==n&&(await e.setLazyFontLoading(n),this.workerLazyFontLoading=n);let i=et.instance.awaitFontsBeforeDraw;return this.workerAwaitFontsBeforeDraw!==i&&(await e.setAwaitFontsBeforeDraw(i),this.workerAwaitFontsBeforeDraw=i),e}setStyleManager(e){this.mainThreadRenderer.styleManager=e,this.webWorkerRenderer&&(this.webWorkerRenderer.styleManager=e)}setDefaultMode(e){this.defaultMode!==e&&(this.defaultMode=e,e==="worker"?this.renderer=this.ensureWebWorkerRenderer():this.renderer=this.mainThreadRenderer)}async setFontUrl(e){await this.mainThreadRenderer.setFontUrl(e),this.webWorkerRenderer&&(await this.webWorkerRenderer.setFontUrl(e),this.workerFontUrl=e)}getDefaultMode(){return this.defaultMode}async asyncRenderMText(e,t,n=ci(),i){return(i??this.defaultMode)==="worker"?(await this.activateWebWorkerRenderer()).asyncRenderMText(e,t,n):this.mainThreadRenderer.asyncRenderMText(e,t,n)}syncRenderMText(e,t,n=ci()){return this.mainThreadRenderer.syncRenderMText(e,t,n)}async asyncRenderShape(e,t,n=ci(),i){return this.mainThreadRenderer.asyncRenderShape(e,t,n)}syncRenderShape(e,t,n=ci()){return this.mainThreadRenderer.syncRenderShape(e,t,n)}async setDefaultFonts(e){et.instance.setDefaultFonts(e),this.webWorkerRenderer&&(await this.webWorkerRenderer.setDefaultFonts([...et.instance.defaultFonts],[...et.instance.symbolFonts]),this.webWorkerConfigured=!0)}async setLazyFontLoading(e){et.instance.lazyFontLoading=e,this.webWorkerRenderer&&(await this.webWorkerRenderer.setLazyFontLoading(e),this.workerLazyFontLoading=e)}async setAwaitFontsBeforeDraw(e){et.instance.awaitFontsBeforeDraw=e,this.webWorkerRenderer&&(await this.webWorkerRenderer.setAwaitFontsBeforeDraw(e),this.workerAwaitFontsBeforeDraw=e)}async replaceMissedFonts(e){if(this.webWorkerRenderer){await this.webWorkerRenderer.replaceMissedFonts(e);return}et.instance.replaceMissedFonts(e)}async clearMissedFonts(){await this.replaceMissedFonts({})}getDefaultFontsPreset(e){return et.instance.getDefaultFontsPreset(e)}getSymbolFontsPreset(e){return et.instance.getSymbolFontsPreset(e)}async loadFonts(e,t){return this.renderer.loadFonts(e,t)}async getAvailableFonts(){return this.renderer.getAvailableFonts()}async estimateMemoryUsage(){let e=iq(et.instance,{id:"main",styleManager:this.mainThreadRenderer.styleManager}),t=this.webWorkerRenderer?await this.webWorkerRenderer.estimateMemoryUsage():[],n={fontCount:0,totalBytes:0,fonts:[]};try{n=await Ts.instance.getStorageStats()}catch{}let i=e.totalEstimatedBytes+t.reduce((o,a)=>o+a.totalEstimatedBytes,0);return{collectedAt:Date.now(),totalEstimatedBytes:i,mainThread:e,workers:t,indexedDbFontCache:n,jsHeap:JPe()}}async cacheFont(e,t,n,i){return et.instance.cacheFont(e,t,n,i)}terminateWorkers(){var e;(e=this.webWorkerRenderer)==null||e.terminate(),this.webWorkerRenderer=null,this.webWorkerConfigured=!1,this.workerLazyFontLoading=null,this.workerAwaitFontsBeforeDraw=null,this.workerFontUrl=null,this.renderer=this.mainThreadRenderer}destroy(){this.terminateWorkers(),this.mainThreadRenderer.destroy()}};function lC(r,e=!1){let t=r[0].index!==null,n=new Set(Object.keys(r[0].attributes)),i=new Set(Object.keys(r[0].morphAttributes)),o={},a={},s=r[0].morphTargetsRelative,l=new ot,c=0;for(let u=0;u<r.length;++u){let h=r[u],d=0;if(t!==(h.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+u+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let p in h.attributes){if(!n.has(p))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+u+'. All geometries must have compatible attributes; make sure "'+p+'" attribute exists among all geometries, or in none of them.'),null;o[p]===void 0&&(o[p]=[]),o[p].push(h.attributes[p]),d++}if(d!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+u+". Make sure all geometries have the same number of attributes."),null;if(s!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+u+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let p in h.morphAttributes){if(!i.has(p))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+u+". .morphAttributes must be consistent throughout all geometries."),null;a[p]===void 0&&(a[p]=[]),a[p].push(h.morphAttributes[p])}if(e){let p;if(t)p=h.index.count;else if(h.attributes.position!==void 0)p=h.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+u+". The geometry must have either an index or a position attribute"),null;l.addGroup(c,p,u),c+=p}}if(t){let u=0,h=[];for(let d=0;d<r.length;++d){let p=r[d].index;for(let f=0;f<p.count;++f)h.push(p.getX(f)+u);u+=r[d].attributes.position.count}l.setIndex(h)}for(let u in o){let h=oq(o[u]);if(!h)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+u+" attribute."),null;l.setAttribute(u,h)}for(let u in a){let h=a[u][0].length;if(h===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[u]=[];for(let d=0;d<h;++d){let p=[];for(let m=0;m<a[u].length;++m)p.push(a[u][m][d]);let f=oq(p);if(!f)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+u+" morphAttribute."),null;l.morphAttributes[u].push(f)}}return l}function oq(r){let e,t,n,i=-1,o=0;for(let c=0;c<r.length;++c){let u=r[c];if(e===void 0&&(e=u.array.constructor),e!==u.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=u.itemSize),t!==u.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=u.normalized),n!==u.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=u.gpuType),i!==u.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;o+=u.count*t}let a=new e(o),s=new Et(a,t,n),l=0;for(let c=0;c<r.length;++c){let u=r[c];if(u.isInterleavedBufferAttribute){let h=l/t;for(let d=0,p=u.count;d<p;d++)for(let f=0;f<t;f++){let m=u.getComponent(d,f);s.setComponent(d+h,f,m)}}else a.set(u.array,l);l+=u.count*t}return i!==void 0&&(s.gpuType=i),s}var Xo;(function(r){r[r.BeforeStart=0]="BeforeStart",r[r.EqualStart=1]="EqualStart",r[r.BetweenStartAndEnd=2]="BetweenStartAndEnd",r[r.EqualEnd=3]="EqualEnd",r[r.AfterEnd=4]="AfterEnd"})(Xo||(Xo={}));var qB=class{pointsSame(e,t){return this.pointsSameX(e,t)&&this.pointsSameY(e,t)}pointsCompare(e,t){return this.pointsSameX(e,t)?this.pointsSameY(e,t)?0:e[1]<t[1]?-1:1:e[0]<t[0]?-1:1}},rb=class extends qB{constructor(e=1e-10){super(),this.epsilon=e}pointAboveOrOnLine(e,t,n){let i=t[0],o=t[1],a=n[0],s=n[1],l=e[0],c=e[1];return(a-i)*(c-o)-(s-o)*(l-i)>=-this.epsilon}pointBetween(e,t,n){let i=e[1]-t[1],o=n[0]-t[0],a=e[0]-t[0],s=n[1]-t[1],l=a*o+i*s;if(l<this.epsilon)return!1;let c=o*o+s*s;return!(l-c>-this.epsilon)}pointsSameX(e,t){return Math.abs(e[0]-t[0])<this.epsilon}pointsSameY(e,t){return Math.abs(e[1]-t[1])<this.epsilon}pointsCollinear(e,t,n){let i=e[0]-t[0],o=e[1]-t[1],a=t[0]-n[0],s=t[1]-n[1];return Math.abs(i*s-a*o)<this.epsilon}linesIntersect(e,t,n,i){let o=t[0]-e[0],a=t[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],c=o*l-a*s;if(Math.abs(c)<this.epsilon)return null;let u=e[0]-n[0],h=e[1]-n[1],d=(s*h-l*u)/c,p=(o*h-a*u)/c,f=g=>g<=-this.epsilon?Xo.BeforeStart:g<this.epsilon?Xo.EqualStart:g-1<=-this.epsilon?Xo.BetweenStartAndEnd:g-1<this.epsilon?Xo.EqualEnd:Xo.AfterEnd,m=[e[0]+d*o,e[1]+d*a];return{alongA:f(d),alongB:f(p),p:m}}},cC=class{constructor(){this.nodes=[]}remove(e){let t=this.nodes.indexOf(e);t>=0&&this.nodes.splice(t,1)}getIndex(e){return this.nodes.indexOf(e)}isEmpty(){return this.nodes.length<=0}getHead(){return this.nodes[0]}removeHead(){this.nodes.shift()}insertBefore(e,t){this.findTransition(e,t).insert(e)}findTransition(e,t){var n,i;let o=(l,c)=>t(c)-t(l),a=0,s=this.nodes.length;for(;a<s;){let l=a+s>>1;o(this.nodes[l],e)>0?s=l:a=l+1}return{before:a<=0?null:(n=this.nodes[a-1])!==null&&n!==void 0?n:null,after:(i=this.nodes[a])!==null&&i!==void 0?i:null,insert:l=>(this.nodes.splice(a,0,l),l)}}},pd=class{constructor(e,t,n,i){var o;this.otherFill=null,this.id=(o=i?.segmentId())!==null&&o!==void 0?o:-1,this.start=e,this.end=t,this.myFill={above:n?n.myFill.above:null,below:n?n.myFill.below:null}}},uC=class{constructor(e,t,n,i){this.status=null,this.isStart=e,this.p=t,this.seg=n,this.primary=i}},hC=class{constructor(e,t,n=null){this.events=new cC,this.status=new cC,this.selfIntersection=e,this.geo=t,this.log=n}compareEvents(e,t,n,i,o,a){let s=this.geo.pointsCompare(t,o);return s!==0?s:this.geo.pointsSame(n,a)?0:e!==i?e?1:-1:this.geo.pointAboveOrOnLine(n,i?o:a,i?a:o)?1:-1}addEvent(e){this.events.insertBefore(e,t=>t===e?0:this.compareEvents(e.isStart,e.p,e.other.p,t.isStart,t.p,t.other.p))}divideEvent(e,t){var n;let i=new pd(t,e.seg.end,e.seg,this.log);return(n=this.log)===null||n===void 0||n.segmentChop(e.seg,t),this.events.remove(e.other),e.seg.end=t,e.other.p=t,this.addEvent(e.other),this.addSegment(i,e.primary)}newSegment(e,t){let n=this.geo.pointsCompare(e,t);return n===0?null:n<0?new pd(e,t,null,this.log):new pd(t,e,null,this.log)}addSegment(e,t){let n=new uC(!0,e.start,e,t),i=new uC(!1,e.end,e,t);return n.other=i,i.other=n,this.addEvent(n),this.addEvent(i),n}addRegion(e){let t,n=e[e.length-1];for(let i=0;i<e.length;i++){t=n,n=e[i];let o=this.newSegment(t,n);o&&this.addSegment(o,!0)}}compareStatus(e,t){let n=e.seg.start,i=e.seg.end,o=t.seg.start,a=t.seg.end;return this.geo.pointsCollinear(n,o,a)?this.geo.pointsCollinear(i,o,a)||this.geo.pointAboveOrOnLine(i,o,a)?1:-1:this.geo.pointAboveOrOnLine(n,o,a)?1:-1}statusFindSurrounding(e){return this.status.findTransition(e,t=>t===e?0:-this.compareStatus(e,t))}checkIntersection(e,t){var n;let i=e.seg,o=t.seg,a=i.start,s=i.end,l=o.start,c=o.end;(n=this.log)===null||n===void 0||n.checkIntersection(i,o);let u=this.geo.linesIntersect(a,s,l,c);if(u===null){if(!this.geo.pointsCollinear(a,s,l)||this.geo.pointsSame(a,c)||this.geo.pointsSame(s,l))return null;let h=this.geo.pointsSame(a,l),d=this.geo.pointsSame(s,c);if(h&&d)return t;let p=!h&&this.geo.pointBetween(a,l,c),f=!d&&this.geo.pointBetween(s,l,c);if(h)return f?this.divideEvent(t,s):this.divideEvent(e,c),t;p&&(d||(f?this.divideEvent(t,s):this.divideEvent(e,c)),this.divideEvent(t,a))}else u.alongA===Xo.BetweenStartAndEnd&&(u.alongB===Xo.EqualStart?this.divideEvent(e,l):u.alongB===Xo.BetweenStartAndEnd?this.divideEvent(e,u.p):u.alongB===Xo.EqualEnd&&this.divideEvent(e,c)),u.alongB===Xo.BetweenStartAndEnd&&(u.alongA===Xo.EqualStart?this.divideEvent(t,a):u.alongA===Xo.BetweenStartAndEnd?this.divideEvent(t,u.p):u.alongA===Xo.EqualEnd&&this.divideEvent(t,s));return null}calculate(e,t){var n,i,o,a,s,l,c,u;let h=[];for(;!this.events.isEmpty();){let d=this.events.getHead();if((n=this.log)===null||n===void 0||n.vert(d.p[0]),d.isStart){(i=this.log)===null||i===void 0||i.segmentNew(d.seg,d.primary);let p=this.statusFindSurrounding(d),f=p.before,m=p.after;(o=this.log)===null||o===void 0||o.tempStatus(d.seg,f?f.seg:!1,m?m.seg:!1);let y=(()=>{if(f){let b=this.checkIntersection(d,f);if(b)return b}return m?this.checkIntersection(d,m):null})();if(y){if(this.selfIntersection){let b;d.seg.myFill.below===null?b=!0:b=d.seg.myFill.above!==d.seg.myFill.below,b&&(y.seg.myFill.above=!y.seg.myFill.above)}else y.seg.otherFill=d.seg.myFill;(a=this.log)===null||a===void 0||a.segmentUpdate(y.seg),this.events.remove(d.other),this.events.remove(d)}if(this.events.getHead()!==d){(s=this.log)===null||s===void 0||s.rewind(d.seg);continue}if(this.selfIntersection){let b;d.seg.myFill.below===null?b=!0:b=d.seg.myFill.above!==d.seg.myFill.below,m?d.seg.myFill.below=m.seg.myFill.above:d.seg.myFill.below=e,b?d.seg.myFill.above=!d.seg.myFill.below:d.seg.myFill.above=d.seg.myFill.below}else if(d.seg.otherFill===null){let b;if(!m)b=d.primary?t:e;else if(d.primary===m.primary){if(m.seg.otherFill===null)throw new Error("otherFill is null");b=m.seg.otherFill.above}else b=m.seg.myFill.above;d.seg.otherFill={above:b,below:b}}(l=this.log)===null||l===void 0||l.status(d.seg,f?f.seg:!1,m?m.seg:!1),d.other.status=p.insert(d)}else{let p=d.status;if(p===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");let f=this.status.getIndex(p);if(f>0&&f<this.status.nodes.length-1){let m=this.status.nodes[f-1],g=this.status.nodes[f+1];this.checkIntersection(m,g)}if((c=this.log)===null||c===void 0||c.statusRemove(p.seg),this.status.remove(p),!d.primary){if(!d.seg.otherFill)throw new Error("otherFill is null");let m=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=m}h.push(d.seg)}this.events.removeHead()}return(u=this.log)===null||u===void 0||u.done(),h}};function C_(r,e,t){let n=[];for(let i of r){let o=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);if(e[o]!==0){let a=new pd(i.start,i.end,null,t);a.myFill.above=e[o]===1,a.myFill.below=e[o]===2,n.push(a)}}return t?.selected(n),n}var Df=class{static union(e,t){return C_(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)}static intersect(e,t){return C_(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)}static difference(e,t){return C_(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)}static differenceRev(e,t){return C_(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)}static xor(e,t){return C_(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};function bEe(r,e,t){let n=[],i=[];for(let o of r){let h=function(y,b,v){return u&&(u.index=y,u.matches_head=b,u.matches_pt1=v),u===l?(u=c,!1):(u=null,!0)},d=function(y){t?.chainReverse(y),n[y].reverse()},p=function(y,b){let v=n[y],x=n[b],w=v[v.length-1],_=v[v.length-2],A=x[0],E=x[1];e.pointsCollinear(_,w,A)&&(t?.chainRemoveTail(y,w),v.pop(),w=_),e.pointsCollinear(w,A,E)&&(t?.chainRemoveHead(b,A),x.shift()),t?.chainJoin(y,b),n[y]=v.concat(x),n.splice(b,1)},a=o.start,s=o.end;if(e.pointsSame(a,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");continue}t?.chainStart(o);let l={index:0,matches_head:!1,matches_pt1:!1},c={index:0,matches_head:!1,matches_pt1:!1},u=l;for(let y=0;y<n.length;y++){let b=n[y],v=b[0],x=b[b.length-1];if(e.pointsSame(v,a)){if(h(y,!0,!0))break}else if(e.pointsSame(v,s)){if(h(y,!0,!1))break}else if(e.pointsSame(x,a)){if(h(y,!1,!0))break}else if(e.pointsSame(x,s)&&h(y,!1,!1))break}if(u===l){n.push([a,s]),t?.chainNew(a,s);continue}if(u===c){t?.chainMatch(l.index);let y=l.index,b=l.matches_pt1?s:a,v=l.matches_head,x=n[y],w=v?x[0]:x[x.length-1],_=v?x[1]:x[x.length-2],A=v?x[x.length-1]:x[0],E=v?x[x.length-2]:x[1];if(e.pointsCollinear(_,w,b)&&(v?(t?.chainRemoveHead(l.index,b),x.shift()):(t?.chainRemoveTail(l.index,b),x.pop()),w=_),e.pointsSame(A,b)){n.splice(y,1),e.pointsCollinear(E,A,w)&&(v?(t?.chainRemoveTail(l.index,w),x.pop()):(t?.chainRemoveHead(l.index,w),x.shift())),t?.chainClose(l.index),i.push(x);continue}v?(t?.chainAddHead(l.index,b),x.unshift(b)):(t?.chainAddTail(l.index,b),x.push(b));continue}let f=l.index,m=c.index;t?.chainConnect(f,m);let g=n[f].length<n[m].length;l.matches_head?c.matches_head?g?(d(f),p(f,m)):(d(m),p(m,f)):p(m,f):c.matches_head?p(f,m):g?(d(f),p(m,f)):(d(m),p(f,m))}return i}var ZB=class{constructor(){this.list=[],this.nextSegmentId=0,this.curVert=NaN}push(e,t){this.list.push({type:e,data:JSON.parse(JSON.stringify(t))})}segmentId(){return this.nextSegmentId++}checkIntersection(e,t){this.push("check",{seg1:e,seg2:t})}segmentChop(e,t){this.push("div_seg",{seg:e,p:t}),this.push("chop",{seg:e,p:t})}statusRemove(e){this.push("pop_seg",{seg:e})}segmentUpdate(e){this.push("seg_update",{seg:e})}segmentNew(e,t){this.push("new_seg",{seg:e,primary:t})}tempStatus(e,t,n){this.push("temp_status",{seg:e,above:t,below:n})}rewind(e){this.push("rewind",{seg:e})}status(e,t,n){this.push("status",{seg:e,above:t,below:n})}vert(e){e!==this.curVert&&(this.push("vert",{x:e}),this.curVert=e)}selected(e){this.push("selected",{segs:e})}chainStart(e){this.push("chain_start",{seg:e})}chainRemoveHead(e,t){this.push("chain_rem_head",{index:e,p:t})}chainRemoveTail(e,t){this.push("chain_rem_tail",{index:e,p:t})}chainNew(e,t){this.push("chain_new",{p1:e,p2:t})}chainMatch(e){this.push("chain_match",{index:e})}chainClose(e){this.push("chain_close",{index:e})}chainAddHead(e,t){this.push("chain_add_head",{index:e,p:t})}chainAddTail(e,t){this.push("chain_add_tail",{index:e,p:t})}chainConnect(e,t){this.push("chain_con",{index1:e,index2:t})}chainReverse(e){this.push("chain_rev",{index:e})}chainJoin(e,t){this.push("chain_join",{index1:e,index2:t})}done(){this.push("done",null)}},ib=class{constructor(e){this.log=null,this.geo=e}buildLog(e){var t;return this.log=e?new ZB:null,(t=this.log)===null||t===void 0?void 0:t.list}segments(e){let t=new hC(!0,this.geo,this.log);for(let n of e.regions)t.addRegion(n);return{segments:t.calculate(e.inverted,!1),inverted:e.inverted}}combine(e,t){let n=new hC(!1,this.geo,this.log);for(let i of e.segments)n.addSegment(new pd(i.start,i.end,i,this.log),!0);for(let i of t.segments)n.addSegment(new pd(i.start,i.end,i,this.log),!1);return{combined:n.calculate(e.inverted,t.inverted),inverted1:e.inverted,inverted2:t.inverted}}selectUnion(e){return{segments:Df.union(e.combined,this.log),inverted:e.inverted1||e.inverted2}}selectIntersect(e){return{segments:Df.intersect(e.combined,this.log),inverted:e.inverted1&&e.inverted2}}selectDifference(e){return{segments:Df.difference(e.combined,this.log),inverted:e.inverted1&&!e.inverted2}}selectDifferenceRev(e){return{segments:Df.differenceRev(e.combined,this.log),inverted:!e.inverted1&&e.inverted2}}selectXor(e){return{segments:Df.xor(e.combined,this.log),inverted:e.inverted1!==e.inverted2}}polygon(e){return{regions:bEe(e.segments,this.geo,this.log),inverted:e.inverted}}union(e,t){let n=this.segments(e),i=this.segments(t),o=this.combine(n,i),a=this.selectUnion(o);return this.polygon(a)}intersect(e,t){let n=this.segments(e),i=this.segments(t),o=this.combine(n,i),a=this.selectIntersect(o);return this.polygon(a)}difference(e,t){let n=this.segments(e),i=this.segments(t),o=this.combine(n,i),a=this.selectDifference(o);return this.polygon(a)}differenceRev(e,t){let n=this.segments(e),i=this.segments(t),o=this.combine(n,i),a=this.selectDifferenceRev(o);return this.polygon(a)}xor(e,t){let n=this.segments(e),i=this.segments(t),o=this.combine(n,i),a=this.selectXor(o);return this.polygon(a)}},Got=new ib(new rb);var dC=class extends $n{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Le(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}},ob=new U,aq=new vt,sq=new vt,lq=new U,cq=new U,pC=class{constructor(e={}){let t=this,n,i,o,a,s={objects:new WeakMap},l=e.element!==void 0?e.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.getSize=function(){return{width:n,height:i}},this.render=function(f,m){f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),m.parent===null&&m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),aq.copy(m.matrixWorldInverse),sq.multiplyMatrices(m.projectionMatrix,aq),u(f,f,m),p(f)},this.setSize=function(f,m){n=f,i=m,o=n/2,a=i/2,l.style.width=f+"px",l.style.height=m+"px"};function c(f){f.isCSS2DObject&&(f.element.style.display="none");for(let m=0,g=f.children.length;m<g;m++)c(f.children[m])}function u(f,m,g){if(f.visible===!1){c(f);return}if(f.isCSS2DObject){ob.setFromMatrixPosition(f.matrixWorld),ob.applyMatrix4(sq);let y=ob.z>=-1&&ob.z<=1&&f.layers.test(g.layers)===!0,b=f.element;b.style.display=y===!0?"":"none",y===!0&&(f.onBeforeRender(t,m,g),b.style.transform="translate("+-100*f.center.x+"%,"+-100*f.center.y+"%)translate("+(ob.x*o+o)+"px,"+(-ob.y*a+a)+"px)",b.parentNode!==l&&l.appendChild(b),f.onAfterRender(t,m,g));let v={distanceToCameraSquared:h(g,f)};s.objects.set(f,v)}for(let y=0,b=f.children.length;y<b;y++)u(f.children[y],m,g)}function h(f,m){return lq.setFromMatrixPosition(f.matrixWorld),cq.setFromMatrixPosition(m.matrixWorld),lq.distanceToSquared(cq)}function d(f){let m=[];return f.traverseVisible(function(g){g.isCSS2DObject&&m.push(g)}),m}function p(f){let m=d(f).sort(function(y,b){if(y.renderOrder!==b.renderOrder)return b.renderOrder-y.renderOrder;let v=s.objects.get(y).distanceToCameraSquared,x=s.objects.get(b).distanceToCameraSquared;return v-x}),g=m.length;for(let y=0,b=m.length;y<b;y++)m[y].element.style.zIndex=g-y}}};var uq={type:"change"},QB={type:"start"},dq={type:"end"},fC=new Vu,hq=new Ms,vEe=Math.cos(70*uf.DEG2RAD),hi=new U,ma=2*Math.PI,jn={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},JB=1e-6,mC=class extends qw{constructor(e,t=null){super(e,t),this.state=jn.NONE,this.enabled=!0,this.target=new U,this.cursor=new U,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Ha.ROTATE,MIDDLE:Ha.DOLLY,RIGHT:Ha.PAN},this.touches={ONE:xl.ROTATE,TWO:xl.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new U,this._lastQuaternion=new ha,this._lastTargetPosition=new U,this._quat=new ha().setFromUnitVectors(e.up,new U(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Oy,this._sphericalDelta=new Oy,this._scale=1,this._panOffset=new U,this._rotateStart=new Le,this._rotateEnd=new Le,this._rotateDelta=new Le,this._panStart=new Le,this._panEnd=new Le,this._panDelta=new Le,this._dollyStart=new Le,this._dollyEnd=new Le,this._dollyDelta=new Le,this._dollyDirection=new U,this._mouse=new Le,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=wEe.bind(this),this._onPointerDown=xEe.bind(this),this._onPointerUp=_Ee.bind(this),this._onContextMenu=TEe.bind(this),this._onMouseWheel=MEe.bind(this),this._onKeyDown=PEe.bind(this),this._onTouchStart=EEe.bind(this),this._onTouchMove=CEe.bind(this),this._onMouseDown=SEe.bind(this),this._onMouseMove=AEe.bind(this),this._interceptControlDown=kEe.bind(this),this._interceptControlUp=IEe.bind(this),this.domElement!==null&&this.connect(),this.update()}connect(){this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(uq),this.update(),this.state=jn.NONE}update(e=null){let t=this.object.position;hi.copy(t).sub(this.target),hi.applyQuaternion(this._quat),this._spherical.setFromVector3(hi),this.autoRotate&&this.state===jn.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,i=this.maxAzimuthAngle;isFinite(n)&&isFinite(i)&&(n<-Math.PI?n+=ma:n>Math.PI&&(n-=ma),i<-Math.PI?i+=ma:i>Math.PI&&(i-=ma),n<=i?this._spherical.theta=Math.max(n,Math.min(i,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+i)/2?Math.max(n,this._spherical.theta):Math.min(i,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let o=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),o=a!=this._spherical.radius}if(hi.setFromSpherical(this._spherical),hi.applyQuaternion(this._quatInverse),t.copy(this.target).add(hi),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let a=null;if(this.object.isPerspectiveCamera){let s=hi.length();a=this._clampDistance(s*this._scale);let l=s-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),o=!!l}else if(this.object.isOrthographicCamera){let s=new U(this._mouse.x,this._mouse.y,0);s.unproject(this.object);let l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),o=l!==this.object.zoom;let c=new U(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(s),this.object.updateMatrixWorld(),a=hi.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position):(fC.origin.copy(this.object.position),fC.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(fC.direction))<vEe?this.object.lookAt(this.target):(hq.setFromNormalAndCoplanarPoint(this.object.up,this.target),fC.intersectPlane(hq,this.target))))}else if(this.object.isOrthographicCamera){let a=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),a!==this.object.zoom&&(this.object.updateProjectionMatrix(),o=!0)}return this._scale=1,this._performCursorZoom=!1,o||this._lastPosition.distanceToSquared(this.object.position)>JB||8*(1-this._lastQuaternion.dot(this.object.quaternion))>JB||this._lastTargetPosition.distanceToSquared(this.target)>JB?(this.dispatchEvent(uq),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?ma/60*this.autoRotateSpeed*e:ma/60/60*this.autoRotateSpeed}_getZoomScale(e){let t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){hi.setFromMatrixColumn(t,0),hi.multiplyScalar(-e),this._panOffset.add(hi)}_panUp(e,t){this.screenSpacePanning===!0?hi.setFromMatrixColumn(t,1):(hi.setFromMatrixColumn(t,0),hi.crossVectors(this.object.up,hi)),hi.multiplyScalar(e),this._panOffset.add(hi)}_pan(e,t){let n=this.domElement;if(this.object.isPerspectiveCamera){let i=this.object.position;hi.copy(i).sub(this.target);let o=hi.length();o*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*o/n.clientHeight,this.object.matrix),this._panUp(2*t*o/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let n=this.domElement.getBoundingClientRect(),i=e-n.left,o=t-n.top,a=n.width,s=n.height;this._mouse.x=i/a*2-1,this._mouse.y=-(o/s)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(ma*this._rotateDelta.x/t.clientHeight),this._rotateUp(ma*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(ma*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-ma*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(ma*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-ma*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panStart.set(n,i)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(n*n+i*i);this._dollyStart.set(0,o)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),o=.5*(e.pageY+n.y);this._rotateEnd.set(i,o)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(ma*this._rotateDelta.x/t.clientHeight),this._rotateUp(ma*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,o),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let a=(e.pageX+t.x)*.5,s=(e.pageY+t.y)*.5;this._updateZoomParameters(a,s)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new Le,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){let t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){let t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}};function xEe(r){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(r.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(r)&&(this._addPointer(r),r.pointerType==="touch"?this._onTouchStart(r):this._onMouseDown(r)))}function wEe(r){this.enabled!==!1&&(r.pointerType==="touch"?this._onTouchMove(r):this._onMouseMove(r))}function _Ee(r){switch(this._removePointer(r),this._pointers.length){case 0:this.domElement.releasePointerCapture(r.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(dq),this.state=jn.NONE;break;case 1:let e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function SEe(r){let e;switch(r.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case Ha.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(r),this.state=jn.DOLLY;break;case Ha.ROTATE:if(r.ctrlKey||r.metaKey||r.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(r),this.state=jn.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(r),this.state=jn.ROTATE}break;case Ha.PAN:if(r.ctrlKey||r.metaKey||r.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(r),this.state=jn.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(r),this.state=jn.PAN}break;default:this.state=jn.NONE}this.state!==jn.NONE&&this.dispatchEvent(QB)}function AEe(r){switch(this.state){case jn.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(r);break;case jn.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(r);break;case jn.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(r);break}}function MEe(r){this.enabled===!1||this.enableZoom===!1||this.state!==jn.NONE||(r.preventDefault(),this.dispatchEvent(QB),this._handleMouseWheel(this._customWheelEvent(r)),this.dispatchEvent(dq))}function PEe(r){this.enabled!==!1&&this._handleKeyDown(r)}function EEe(r){switch(this._trackPointer(r),this._pointers.length){case 1:switch(this.touches.ONE){case xl.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(r),this.state=jn.TOUCH_ROTATE;break;case xl.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(r),this.state=jn.TOUCH_PAN;break;default:this.state=jn.NONE}break;case 2:switch(this.touches.TWO){case xl.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(r),this.state=jn.TOUCH_DOLLY_PAN;break;case xl.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(r),this.state=jn.TOUCH_DOLLY_ROTATE;break;default:this.state=jn.NONE}break;default:this.state=jn.NONE}this.state!==jn.NONE&&this.dispatchEvent(QB)}function CEe(r){switch(this._trackPointer(r),this.state){case jn.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(r),this.update();break;case jn.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(r),this.update();break;case jn.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(r),this.update();break;case jn.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(r),this.update();break;default:this.state=jn.NONE}}function TEe(r){this.enabled!==!1&&r.preventDefault()}function kEe(r){r.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function IEe(r){r.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var LEe=1e6;function h5(r,e){return Math.max(Math.abs(e.x-r.x),Math.abs(e.y-r.y),Math.abs(e.z-r.z))}function OEe(r,e,t=LEe){return h5(r,e)>=t}function d5(r,e){return r==null||!OEe(r,e)}function Y_(r){if(r.isEmpty())return;let e=r.getCenter(REe);return{x:e.x,y:e.y,z:e.z}}var DEe={resolveDrawMode(){return"batch"}};var REe=new U,Pc=[.5,0,0,.48429158056431554,-.1243449435824274,0,.4381533400219318,-.24087683705085766,0,.3644843137107058,-.3422735529643443,0,.2679133974894983,-.42216396275100754,0,.15450849718747373,-.47552825814757677,0,.03139525976465676,-.4990133642141358,0,-.09369065729286241,-.4911436253643443,0,-.21288964578253636,-.45241352623300973,0,-.3187119948743449,-.3852566213878946,0,-.40450849718747367,-.2938926261462366,0,-.4648882429441257,-.18406227634233907,0,-.4960573506572389,-.06266661678215227,0,-.49605735065723894,.06266661678215214,0,-.4648882429441256,.18406227634233915,0,-.4045084971874738,.2938926261462365,0,-.31871199487434476,.3852566213878947,0,-.21288964578253608,.4524135262330099,0,-.09369065729286231,.49114362536434436,0,.031395259764656416,.4990133642141358,0,.15450849718747361,.4755282581475768,0,.267913397489498,.42216396275100776,0,.3644843137107056,.3422735529643445,0,.4381533400219318,.24087683705085766,0,.4842915805643155,.12434494358242767,0,.5,0,0],Ec=[0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25],BEe=new Map([[2,{position:new Float32Array([-1,0,0,1,0,0,0,-1,0,0,1,0]),indices:new Uint16Array([0,1,2,3])}],[3,{position:new Float32Array([-Math.SQRT1_2,Math.SQRT1_2,0,Math.SQRT1_2,-Math.SQRT1_2,0,-Math.SQRT1_2,-Math.SQRT1_2,0,Math.SQRT1_2,Math.SQRT1_2,0]),indices:new Uint16Array([0,1,2,3])}],[4,{position:new Float32Array([0,0,0,0,.5,0]),indices:new Uint16Array([0,1,2,3])}],[32,{position:new Float32Array(Pc),indices:new Uint16Array(Ec)}],[33,{position:new Float32Array(Pc),indices:new Uint16Array(Ec)}],[34,{position:new Float32Array([...Pc,-1,0,0,1,0,0,0,-1,0,0,1,0]),indices:new Uint16Array([...Ec,26,27,28,29])}],[35,{position:new Float32Array([...Pc,-Math.SQRT1_2,Math.SQRT1_2,0,Math.SQRT1_2,-Math.SQRT1_2,0,-Math.SQRT1_2,-Math.SQRT1_2,0,Math.SQRT1_2,Math.SQRT1_2,0]),indices:new Uint16Array([...Ec,26,27,28,29])}],[36,{position:new Float32Array([...Pc,0,0,0,0,.5,0]),indices:new Uint16Array([...Ec,26,27])}],[64,{position:new Float32Array([-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0]),indices:new Uint16Array([0,1,1,2,2,3,3,4])}],[65,{position:new Float32Array([-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0]),indices:new Uint16Array([0,1,1,2,2,3,3,4])}],[66,{position:new Float32Array([-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,-1,0,0,1,0,0,0,-1,0,0,1,0]),indices:new Uint16Array([0,1,1,2,2,3,3,4,5,6,7,8])}],[67,{position:new Float32Array([-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-Math.SQRT1_2,Math.SQRT1_2,0,Math.SQRT1_2,-Math.SQRT1_2,0,-Math.SQRT1_2,-Math.SQRT1_2,0,Math.SQRT1_2,Math.SQRT1_2,0]),indices:new Uint16Array([0,1,1,2,2,3,3,0,4,5,6,7])}],[68,{position:new Float32Array([-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,0,0,0,0,.5,0]),indices:new Uint16Array([0,1,1,2,2,3,3,4,5,6])}],[96,{position:new Float32Array([...Pc,-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0]),indices:new Uint16Array([...Ec,26,27,27,28,28,29,29,26])}],[97,{position:new Float32Array([...Pc,-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0]),indices:new Uint16Array([...Ec,26,27,27,28,28,29,29,30])}],[98,{position:new Float32Array([...Pc,-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,-1,0,0,1,0,0,0,-1,0,0,1,0]),indices:new Uint16Array([...Ec,26,27,27,28,28,29,29,30,31,32,33,34])}],[99,{position:new Float32Array([...Pc,-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-Math.SQRT1_2,Math.SQRT1_2,0,Math.SQRT1_2,-Math.SQRT1_2,0,-Math.SQRT1_2,-Math.SQRT1_2,0,Math.SQRT1_2,Math.SQRT1_2,0]),indices:new Uint16Array([...Ec,26,27,27,28,28,29,29,26,30,31,32,33])}],[100,{position:new Float32Array([...Pc,-.5,.5,0,.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,0,0,0,0,.5,0]),indices:new Uint16Array([...Ec,26,27,27,28,28,29,29,30,31,32])}]]),B_=class r{constructor(){this._symbols=this.initialize()}static get instance(){return r._instance||(r._instance=new r),r._instance}isShowPoint(e=null){return e==null||e==0||e==32||e==64||e==96}static resolveDisplayScale(e){return e>0?e:1}create(e=null,t={x:0,y:0,z:0},n=0){let i={},o=r.resolveDisplayScale(n);if(e==null||e==0)i.point=new ot().setFromPoints([pq]);else if(e!=1){let a=this._symbols.get(e);if(a==null)throw new Error(`[AcTrPointSymbolCreator] Invalid point type value: '${e}'!`);i.line=a.clone(),o!==1&&i.line.scale(o,o,o),(e==32||e==64||e==96)&&(i.point=new ot().setFromPoints([pq]))}return i}initialize(){let e=new Map;return BEe.forEach((t,n)=>{let i=new ot;i.setAttribute("position",new Et(t.position,3)),i.setIndex(new Et(t.indices,1)),e.set(n,i)}),e}},pq=new U(0,0,0);function Jn(r){return r.userData}function bd(r,e){Object.assign(Jn(r),e)}function F_(r){return r.isByLayerColor===!0||r.isByLayerLineType===!0||r.isByLayerLineWeight===!0||r.isByLayerTransparency===!0}function gC(r,e,t){let n=Jn(r);return n.layer!==e&&t!==e?!1:n.isByLayerColor===!0?!0:n.isForeground===!0?!1:F_(n)}var ga=new U,th=new U,At=class r{static release(e){e.index=null,e.attributes={}}static toNonIndexed(e){if(!e.index)return e;let t=new ot,n=e.index;for(let i in e.attributes)t.setAttribute(i,r.createGeometryAttributeByIndex(e.attributes[i],n));return t}static createGeometryAttributeByIndex(e,t){let n=t.count,i=e.itemSize,o=e.array.constructor,a=new o(n*i);for(let s=0;s<n;s++){let l=t.getX(s)*i;for(let c=0;c<i;c++)a[s*i+c]=e.array[l+c]}return new Et(a,i,e.normalized)}static tryConvertInterleavedBufferAttributes(e){!e||!e.attributes||Object.keys(e.attributes).forEach(t=>{let n=e.attributes[t];if(n instanceof sr){let i=n.clone();e.attributes[t]=i}})}static createBufferGeometryByPoints(e){let t=new ot,n=new Float32Array(e.length*3),i=new Uint16Array((e.length-1)*2);return e.forEach((o,a)=>{let s=a*3;n[s]=o.x,n[s+1]=o.y,n[s+2]=o.z,a>0&&(s=(a-1)*2,i[s]=a-1,i[s+1]=a)}),t.setAttribute("position",new Jt(n,3)),t.setIndex(new Gu(i,1)),t}static recomputeLineDistanceForLineSegments(e,t){let n=e.getAttribute("position");if(!n||n.count<2){e.deleteAttribute("lineDistance");return}let i=n.count-n.count%2;if(i===0){e.deleteAttribute("lineDistance");return}if(i<n.count){let l=new Float32Array(i*n.itemSize);l.set(n.array.subarray(0,l.length)),e.setAttribute("position",new Et(l,n.itemSize)),n=e.getAttribute("position")}let o=e.getAttribute("lineDistance"),a=!!o&&o.count>=i,s=new Float32Array(i);for(let l=0;l<i;l+=2){t?(ga.fromBufferAttribute(n,l).applyMatrix4(t),th.fromBufferAttribute(n,l+1).applyMatrix4(t)):(ga.fromBufferAttribute(n,l),th.fromBufferAttribute(n,l+1));let c=a?o.getX(l):l===0?0:s[l-1];s[l]=c,s[l+1]=c+ga.distanceTo(th)}e.setAttribute("lineDistance",new Jt(s,1))}static hasPatternLineShader(e){return e instanceof Kn&&e.vertexShader.includes("attribute float lineDistance")}static ensureLineDistance(e,t){if(e.hasAttribute("lineDistance"))return!1;let n=Array.isArray(t)?t[0]:t;return!n||!r.hasPatternLineShader(n)?!1:(r.computeSegmentLineDistances(e),e.hasAttribute("lineDistance"))}static computeSegmentLineDistances(e){let t=e.getAttribute("position");if(!t){e.deleteAttribute("lineDistance");return}if(t.count<2){e.setAttribute("lineDistance",new Jt(new Float32Array(t.count),1));return}let n=new Float32Array(t.count),i=e.getIndex(),o=0;if(i){let a=new Uint8Array(t.count);for(let s=0;s+1<i.count;s+=2){let l=i.getX(s),c=i.getX(s+1);l>=t.count||c>=t.count||(a[l]||(n[l]=o,a[l]=1),ga.fromBufferAttribute(t,l),th.fromBufferAttribute(t,c),o+=ga.distanceTo(th),a[c]||(n[c]=o,a[c]=1))}}else{let a=t.count-t.count%2;for(let s=0;s<a;s+=2)n[s]=o,ga.fromBufferAttribute(t,s),th.fromBufferAttribute(t,s+1),o+=ga.distanceTo(th),n[s+1]=o}e.setAttribute("lineDistance",new Jt(n,1))}static computeLineDistance(e){let t=e.isLineSegments===!0,n=e.geometry,i=e.matrixWorld;if(n.index&&(n=r.toNonIndexed(n)),n.index===null){let o=n.attributes.position;if(!o||o.count===0)return;if(t)r.recomputeLineDistanceForLineSegments(n,i);else{let a=[];a[0]=0;for(let s=1,l=o.count;s<l;s++)ga.fromBufferAttribute(o,s-1).applyMatrix4(i),th.fromBufferAttribute(o,s).applyMatrix4(i),a[s]=a[s-1],a[s]+=ga.distanceTo(th);n.setAttribute("lineDistance",new Jt(a,1))}e.geometry.dispose(),e.geometry=n}}static computeLineDistances(e){e.traverse(t=>{let n=t;n.isLine&&n.material instanceof Kn&&this.computeLineDistance(n)})}static apply2dTransform(e,t,n=0,i=1){let o=e.attributes.position,a=o.itemSize,s=o.array;if(n!=0){let l=Math.cos(n),c=Math.sin(n);for(let u=0;u<s.length;u+=a){let h=s[u],d=s[u+1],p=h*l-d*c,f=h*c+d*l;s[u]=p*i+t.x,s[u+1]=f*i+t.y}}else for(let l=0;l<s.length;l+=a)s[l]=s[l]*i+t.x,s[l+1]+=s[l+1]*i+t.y;return o.needsUpdate=!0,e}static apply3dTransform(e,t,n){let i=e.attributes.position,o=i.itemSize,a=i.array,s=Math.cos(n.x),l=Math.sin(n.x),c=Math.cos(n.y),u=Math.sin(n.y),h=Math.cos(n.z),d=Math.sin(n.z);for(let p=0;p<a.length;p+=o){let f=a[p],m=a[p+1],g=a[p+2],y=m*s-g*l,b=m*l+g*s;m=y,g=b;let v=f*c+g*u;b=-f*u+g*c,f=v,g=b,v=f*h-m*d,y=f*d+m*h,f=v,m=y,a[p]=f+t.x,a[p+1]=m+t.y,a[p+2]=g+t.z}return i.needsUpdate=!0,e}static isFinitePoint(e){return!!e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.z??0)}static hasFinitePositions(e){let t=e?.getAttribute("position");if(!t||t.count===0)return!0;let n=t.array;for(let i=0;i<n.length;i++)if(!Number.isFinite(n[i]))return!1;return!0}static safeComputeBoundingBox(e,t){if(!r.hasFinitePositions(e))return e.boundingBox=null,null;t&&(e.boundingBox=t),e.computeBoundingBox();let n=e.boundingBox;return!n||!Number.isFinite(n.min.x)||!Number.isFinite(n.min.y)||!Number.isFinite(n.min.z)||!Number.isFinite(n.max.x)||!Number.isFinite(n.max.y)||!Number.isFinite(n.max.z)?(e.boundingBox=null,null):n}static safeComputeBoundingSphere(e,t){let n=r.safeComputeBoundingBox(e);if(!n)return e.boundingSphere=null,null;let i=t??new Lr;return n.getBoundingSphere(i),e.boundingSphere=i,i}static sanitizeGeometryPositions(e,t=2){let n=e.getAttribute("position");if(!n||n.count===0)return!1;if(r.hasFinitePositions(e))return!0;let i=l=>{let c=l*n.itemSize;for(let u=0;u<n.itemSize;u++)if(!Number.isFinite(n.array[c+u]))return!1;return!0},o=e.getIndex();if(!o){if(e.hasAttribute("lineDistance")){let u=[];for(let h=0;h+1<n.count;h+=2){if(!i(h)||!i(h+1))continue;let d=h*n.itemSize,p=(h+1)*n.itemSize;for(let f=0;f<n.itemSize;f++)u.push(n.array[d+f]);for(let f=0;f<n.itemSize;f++)u.push(n.array[p+f])}return u.length===0?!1:(e.setAttribute("position",new Jt(u,n.itemSize)),r.recomputeLineDistanceForLineSegments(e),!0)}let l=[];for(let u=0;u<n.count;u++)i(u)&&l.push(u);if(l.length===0)return!1;let c=new Float32Array(l.length*n.itemSize);return l.forEach((u,h)=>{let d=u*n.itemSize,p=h*n.itemSize;for(let f=0;f<n.itemSize;f++)c[p+f]=n.array[d+f]}),e.setAttribute("position",new Et(c,n.itemSize)),!0}let a=[];for(let l=0;l+t<=o.count;l+=t){let c=!0;for(let u=0;u<t;u++)if(!i(o.getX(l+u))){c=!1;break}if(c)for(let u=0;u<t;u++)a.push(o.getX(l+u))}if(a.length===0)return!1;let s=a.some(l=>l>65535)?Uint32Array:Uint16Array;return e.setIndex(new Et(new s(a),1)),!0}static safeApplyMatrix4(e,t,n=2){if(e.boundingBox=null,e.boundingSphere=null,!r.sanitizeGeometryPositions(e,n))return!1;let i=e.getAttribute("position");for(let o=0;o<i.count;o++)ga.fromBufferAttribute(i,o),ga.applyMatrix4(t),i.setXYZ(o,ga.x,ga.y,ga.z);return i.needsUpdate=!0,!0}},N_=class r{static getExtension(e){return e.substring(e.lastIndexOf(".")+1)}static estimateObjectSize(e){let t=new WeakSet;function n(i){if(i==null)return 0;let o=typeof i;if(o==="boolean")return 4;if(o==="number")return 8;if(o==="string")return i.length*2;if(o==="symbol"||o==="function"||t.has(i))return 0;if(t.add(i),Array.isArray(i))return i.map(n).reduce((a,s)=>a+s,0);if(o==="object"){let a=0;for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&(a+=s.length*2,a+=n(i[s]));return a}return 0}return n(e)}static getFileName(e){return e.split("/").pop()}static getFileNameWithoutExtension(e){let t=r.getFileName(e);if(t){let n=t.lastIndexOf(".");return n===-1?t:t.substring(0,n)}return e}};function Kq(r,e){return r==="0"?e:r}function qa(r){return r.userData}function VC(r){return r.userData}function en(r){return qa(r)}function fq(r,e,t){return e[r.id]??(t!=null?e[t]:void 0)}function jf(r,e){if(Array.isArray(e)){if(new Set(e.map(t=>t.id)).size===1){r.styleMaterialId=e[0].id;return}delete r.styleMaterialId;return}r.styleMaterialId=e.id}function FEe(r,e){let t=en(r),n=r.material;if(Array.isArray(n)){r.material=n.map(o=>{let a=fq(o,e,t.styleMaterialId);return a&&a!==o?a:o}),jf(t,r.material);return}let i=fq(n,e,t.styleMaterialId);i&&i!==n&&(r.material=i,jf(t,i))}function O_(r){return qa(r)}function NEe(r){return qa(r)}function e5(r){let e=r;return e.userData.highlightOverlayGroup=!0,e}function p5(r){if(r.children.length!==1)return r;let e=r.children[0];return e instanceof jt||e instanceof Ni||e instanceof qn?r:e}function qq(r,e){let t=qa(r),n=en(e);t.useSplitTranslation&&(n.useSplitTranslation=!0),t.noBatch&&(n.noBatch=!0);let i=Math.min(r.children.length,e.children.length);for(let o=0;o<i;o++)qq(r.children[o],e.children[o])}var Ka=class r{static buildColorSettingsFromTraits(e,t=Hl,n){let i=Gl.fromBackgroundColor(t),o=this.normalizeEntityColor(e.color),a=i.resolveSubEntityTraitsRgb({...e,color:o}),s=n?i.resolveSubEntityTraitsRgb({...e,color:this.normalizeEntityColor(n)}):a,l=o.isByBlock?a:16777215;return{layer:e.layer,color:this.toMTextColor(o),byLayerColor:s,byBlockColor:l}}static snapshotEntityTraits(e){return{color:this.normalizeEntityColor(e.color),layer:e.layer}}static cloneEntityTraits(e){return{color:e.color.clone(),layer:e.layer}}static storeTextEntityTraitsOnDrawable(e,t){en(e).textEntityTraits=r.cloneEntityTraits(t)}static rematerializeTextHierarchy(e,t,n){let i={...Lc.createDefaultTraits(),color:t.color,layer:t.layer,drawOrder:0},o=n.getMTextFillMaterial(i),a=n.getLineMaterial(i,!0);e.traverse(s=>{if(!("material"in s))return;let l=s,c=r.resolveTextMaterialKind(l);if(c==null)return;let u=Array.isArray(l.material)?l.material:[l.material],h=r.readGlyphMTextColor(l);u.some(d=>r.shouldRematerializeMaterial(d,t,n,h))&&(c==="fill"?l.material=o:l.material=a)})}static normalizeEntityColor(e){if(e instanceof je)return e.clone();let t=new je;if(typeof e=="number")return e===7?t.setForeground():e===256?t.setByLayer():e===0?t.setByBlock():t.colorIndex=e,t;if(e&&typeof e=="object"){let n=e;return n.isForeground?t.setForeground():n.isByLayer?t.setByLayer():n.isByBlock?t.setByBlock():typeof n.colorIndex=="number"?n.colorIndex===7?t.setForeground():t.colorIndex=n.colorIndex:typeof n.RGB=="number"&&t.setRGBValue(n.RGB),t}return t}static shouldRematerializeMaterial(e,t,n,i){let o=Jn(e);if(t.color.isForeground){if(o.isForeground===!0)return!1;let l=i?.aci;if(l===256||typeof l=="number"&&l!==7&&l!==0)return!1;if(i!=null&&i.isRgb&&typeof i.rgbValue=="number"){let c=Ta(n.currentBackgroundColor);if(i.rgbValue!==c)return!1}return o.isByLayerColor===!0||l===7||l===0||i!=null&&i.isRgb&&i.rgbValue===Ta(n.currentBackgroundColor)?!0:!(o.isByLayerColor==null&&o.isForeground==null&&o.materialKey==null)}if(o.isByLayerColor===!0&&o.layer!=null&&o.layer!==t.layer)return!0;let a=n.currentBackgroundColor,s=Gl.fromBackgroundColor(a).resolveSubEntityTraitsRgb({...Lc.createDefaultTraits(),color:t.color,layer:t.layer});return!!(r.getMaterialDisplayRgb(e)===Hl&&s!==Hl&&o.isForeground!==!0&&(t.color.isByLayer||t.color.isByBlock)||t.color.isByLayer&&o.isByLayerColor===!0||t.color.isByLayer&&o.isByLayerColor!==!1&&o.isForeground!==!0&&(o.layer==null||o.layer===t.layer))}static readGlyphMTextColor(e){var t;let n=(t=e.userData)==null?void 0:t.mtextColor;if(!n)return null;if(n instanceof Mi)return n;if(typeof n!="object")return null;let i=n,o=new Mi;return typeof i.rgbValue=="number"?(o.rgbValue=i.rgbValue,o):typeof i._rgbValue=="number"?(o.rgbValue=i._rgbValue,o):typeof i.aci=="number"?(o.aci=i.aci,o):typeof i._aci=="number"?(o.aci=i._aci,o):null}static getMaterialDisplayRgb(e){var t,n;if(e instanceof _i||e instanceof Fi)return e.color.getHex();let i=(n=(t=e.uniforms)==null?void 0:t.u_color)==null?void 0:n.value;if(i instanceof $e)return i.getHex()}static resolveTextMaterialKind(e){switch(e.type){case"Mesh":return"fill";case"Line":case"LineSegments":case"LineLoop":return"line";default:return}}static toAcCmColor(e){let t=new je;return e?e.isRgb&&typeof e.rgbValue=="number"?(t.setRGBValue(e.rgbValue),t):(typeof e.aci=="number"&&(e.aci===256?t.setByLayer():e.aci===0?t.setByBlock():e.aci===7?t.setForeground():t.colorIndex=e.aci),t):t}static toMTextColor(e){let t=new Mi;if(!e)return t;if(e.isByLayer)return t.aci=256,t;if(e.isByBlock)return t.aci=0,t;if(e.isForeground)return t.aci=7,t;if(e.isByACI&&typeof e.colorIndex=="number")return t.aci=e.colorIndex,t;let n=e.RGB;return typeof n=="number"&&(t.rgbValue=n),t}static resolveRgbColor(e,t=Hl){let{color:n,byBlockColor:i,byLayerColor:o}=e;if(n.isRgb&&typeof n.rgbValue=="number")return n.rgbValue;if(n.aci===0)return i;if(n.aci===256||n.aci==null)return o;if(n.aci===7)return Ta(t);let a=new je;a.colorIndex=n.aci;let s=a.RGB;return typeof s=="number"?s:o}},Lc=class{static createDefaultTraits(){return{color:new je,lineType:{type:"ByLayer",name:"Continuous",standardFlag:0,description:"Solid line",totalPatternLength:0},lineTypeScale:1,lineWeight:$r.ByLayer,fillType:{solidFill:!0,patternAngle:0,definitionLines:[]},transparency:new Mn,thickness:0,layer:"0",drawOrder:0}}static createTraitsForMText(e,t){return{color:Ka.toAcCmColor(e.color),lineType:{type:"ByLayer",name:"Continuous",standardFlag:0,description:"Solid line",totalPatternLength:0},lineTypeScale:1,lineWeight:$r.ByLayer,fillType:{solidFill:!0,patternAngle:0,definitionLines:[]},transparency:new Mn,thickness:0,layer:e.layer??"0",drawOrder:0}}},$_=new $e(583902),GC=new $e(6750200),cr=class{static cloneMaterial(e){if(!e)return e;if(Array.isArray(e)){let t=[];return e.forEach(n=>{t.push(this.cloneSingleMaterial(n))}),t}return this.cloneSingleMaterial(e)}static setMaterialColor(e,t=$_){if(Array.isArray(e)){e.forEach(n=>this.setMaterialColor(n,t));return}this.hasColorProperty(e)&&(e.color.set(t),this.hasEmissiveProperty(e)&&e.emissive.set(t)),this.hasUniformsProperty(e)&&(e.uniforms.u_color&&e.uniforms.u_color.value.set(t),e.uniforms.u_startColor&&e.uniforms.u_startColor.value.set(t),e.uniforms.u_endColor&&e.uniforms.u_endColor.value.set(t))}static hasColorProperty(e){return"color"in e&&e.color instanceof $e}static hasEmissiveProperty(e){return"emissive"in e&&e.emissive instanceof $e}static hasUniformsProperty(e){return"uniforms"in e&&e.uniforms!==void 0}static cloneSingleMaterial(e){let t=e.clone();return this.resetRuntimeShaderState(t),t}static resetRuntimeShaderState(e){let t=VC(e);delete t.relativeToEyePatchVersion,delete t.relativeToEyeCompiledShader,delete t.batchHighlightPatched,delete t.batchHighlightUniforms,e.onBeforeCompile=mo.prototype.onBeforeCompile,e.customProgramCacheKey=mo.prototype.customProgramCacheKey,e.needsUpdate=!0}},zEe=/\.(shx|ttf|otf|woff2?)$/i,mq={name:"",standardFlag:0,fixedTextHeight:0,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:0,font:"",bigFont:"",extendedFont:""};function UEe(r){return r.trim().replace(zEe,"").toLowerCase()}function Zq(r){var e;let t=(e=r.name)==null?void 0:e.trim();if(t){let i=Number(t);return Number.isInteger(i)&&i!==0&&String(i)===t?{byCode:i}:{byName:t}}let n=r.shapeNumber;return n!=null&&n!==0?{byCode:n}:{}}function gq(r,e){let t=UEe(e),n=r.size,{byName:i,byCode:o}=Zq(r),a=et.instance;if(i?a.getShapeByName(i,t,n):o!=null&&a.getShapeByCode(o,t,n))return!0;let s=a.getFontByName(t,!1);if(s?.type!=="shx")return!1;let l=new cd(s.data);try{let c=i?l.getShapeByName(i,n):o!=null?l.getCharShape(o,n):void 0,u=c?.polylines;return!!(u!=null&&u.some(h=>h.length>=2))}finally{l.release()}}function jEe(r,e,t){var n;if(e!=null){let o=(n=e.font)==null?void 0:n.trim();if(o&&gq(r,o))return{...e}}let i=t.database;if(!i)return{...mq};for(let o of i.tables.textStyleTable.shapeFiles){let a=o.fileName||o.textStyle.font;if(a&&gq(r,a))return{...o.textStyle}}return{...mq}}var Vf=class{static createMatrix4(e){let t=e.elements;return new vt(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}};function Jq(r){let e=r;for(;e;){if(e.visible===!1)return!1;e=e.parent}return!0}function f5(r){return r.isMesh===!0||r.type==="Mesh"}function PC(r){return r.isLineSegments===!0||r.type==="LineSegments"}function VEe(r){return r.isLine===!0||r.type==="Line"||r.type==="LineSegments"||r.type==="LineLoop"}function m5(r){return r.isPoints===!0||r.type==="Points"}function t5(r){return r.isLineSegments2===!0||r instanceof li}function GEe(r){if(r==null||typeof r!="object")return!1;if(r instanceof ot)return!0;let e=r;return e.isBufferGeometry===!0||e.type==="BufferGeometry"}function HEe(r){return GEe(r.geometry)?f5(r)||PC(r)||VEe(r)||m5(r):!1}var Qq=(r=>(r[r.None=0]="None",r[r.Active=1]="Active",r[r.Visible=2]="Visible",r))(Qq||{}),WEe=3;function Pi(r){return(r&1)!==0}function Uf(r){return(r&1)!==0&&(r&2)!==0}function XEe(r,e){return e?r|2:r&-3}function YEe(r,e){return r-e}function g5(r,e,t=0){let n=e.itemSize;if(r.isInterleavedBufferAttribute||r.array.constructor!==e.array.constructor){let i=r.count;for(let o=0;o<i;o++)for(let a=0;a<n;a++)e.setComponent(o+t,a,r.getComponent(o,a))}else{let i=r.count*n;e.array.set(r.array.subarray(0,i),t*n)}e.needsUpdate=!0}function Gf(r,e){let t=Math.min(r.length,e.length);if(r.constructor!==e.constructor){for(let n=0;n<t;n++)e[n]=r[n];return}e.set(r.subarray(0,t))}var z_=class{apply(e,t,n){return n?this.restore(e,t):this.collapse(e,t)}copyTypedArraySlice(e,t,n){let i=e.constructor,o=new i(n);return o.set(e.subarray(t,t+n)),o}};function y5(r){return r.getAttribute("instanceStart")&&r.getAttribute("instanceEnd")?"line2":r.getIndex()?"indexed":"vertex"}var b5=class extends z_{collapse(e,t){let n=e.getIndex();if(!n||t.indexStart==null||t.indexStart<0)return!1;let i=n.array,o=t.indexStart,a=t.indexCount??0;if(a<=0)return!1;let s=t.vertexStart;t.hiddenDrawSnapshot||(t.hiddenDrawSnapshot={indices:this.copyTypedArraySlice(i,o,a)});for(let l=o;l<o+a;l++)i[l]=s;return n.needsUpdate=!0,!0}restore(e,t){var n;let i=(n=t.hiddenDrawSnapshot)==null?void 0:n.indices,o=e.getIndex();return!i||!o||t.indexStart==null||t.indexStart<0?!1:(o.array.set(i,t.indexStart),o.needsUpdate=!0,delete t.hiddenDrawSnapshot,!0)}},v5=class extends z_{collapse(e,t){let n=e.getAttribute("instanceStart"),i=e.getAttribute("instanceEnd");if(!n||!i||t.vertexCount<=0)return!1;let o=n.array,a=i.array,s=t.vertexStart,l=t.vertexCount;t.hiddenDrawSnapshot||(t.hiddenDrawSnapshot={instanceStart:o.slice(s*3,(s+l)*3),instanceEnd:a.slice(s*3,(s+l)*3)});for(let c=s;c<s+l;c++){let u=c*3;a[u]=o[u],a[u+1]=o[u+1],a[u+2]=o[u+2]}return i.needsUpdate=!0,!0}restore(e,t){let n=t.hiddenDrawSnapshot,i=e.getAttribute("instanceStart"),o=e.getAttribute("instanceEnd");if(!(n!=null&&n.instanceStart)||!n.instanceEnd||!i||!o)return!1;let a=t.vertexStart;return i.array.set(n.instanceStart,a*3),o.array.set(n.instanceEnd,a*3),i.needsUpdate=!0,o.needsUpdate=!0,delete t.hiddenDrawSnapshot,!0}},x5=class extends z_{collapse(e,t){let n=e.getAttribute("position");if(!n||t.vertexCount<=0)return!1;let i=n.array,o=n.itemSize,a=t.vertexStart,s=t.vertexCount,l=a*o;if(t.hiddenDrawSnapshot||(t.hiddenDrawSnapshot={positions:i.slice(l,l+s*o)}),s===1)for(let c=0;c<o;c++)i[l+c]=Number.NaN;else{let c=i[l],u=i[l+1],h=i[l+2];for(let d=a;d<a+s;d++){let p=d*o;i[p]=c,i[p+1]=u,i[p+2]=h}}return n.needsUpdate=!0,!0}restore(e,t){var n;let i=(n=t.hiddenDrawSnapshot)==null?void 0:n.positions,o=e.getAttribute("position");if(!i||!o||t.vertexCount<=0)return!1;let a=o.array,s=o.itemSize;return a.set(i,t.vertexStart*s),o.needsUpdate=!0,delete t.hiddenDrawSnapshot,!0}},eZ=class w5{static apply(e,t,n,i=y5(e)){return Pi(t.flags)?w5.strategies[i].apply(e,t,n):!1}static getStrategy(e,t){let n=t??y5(e);return w5.strategies[n]}};eZ.strategies={indexed:new b5,vertex:new x5,line2:new v5};var $Ee=eZ;function G5(r,e,t,n){return $Ee.apply(r,e,t,n)}function HC(r,e){let t=y5(r);for(let n of e)Pi(n.flags)&&(delete n.hiddenDrawSnapshot,Uf(n.flags)||G5(r,n,!1,t))}var lb="slotId";function KEe(r){return r.isInstancedBufferGeometry===!0?!0:r.hasAttribute("instanceStart")}function yq(r,e){return e?new fc(new Float32Array(r),1):new Jt(r,1)}function EC(r,e){let t=KEe(r),n=r.getAttribute(lb);if(n){if(n.count>=e)return n;let o=yq(e,t);return o.array.set(n.array.subarray(0,n.count)),r.setAttribute(lb,o),o}let i=yq(e,t);return r.setAttribute(lb,i),i}function tZ(r,e,t,n){if(t<=0)return;let i=EC(r,e+t);i.array.fill(n,e,e+t),i.addUpdateRange(e,t),i.needsUpdate=!0}var qEe=0,ZEe=1,JEe=2,QEe=3;function eCe(r){return r==="deleted"?ZEe:r==="added"?JEe:r==="modified"?QEe:qEe}var n5=4096;function r5(r){let e=Math.max(r,1);if(e<=n5)return{width:e,height:1};let t=n5,n=Math.ceil(e/t);if(n>n5)throw new Error(`AcTrBatchHighlightState: slot count ${e} exceeds highlight mask capacity.`);return{width:t,height:n}}var _5=class{constructor(){this.selectedMask=new Uint8Array(0),this.hoveredMask=new Uint8Array(0),this.compareRoleMask=new Uint8Array(0),this.compareEnabled=!1,this.compareBaseColor=new $e(10265519),this.compareDeletedColor=new $e(14753096),this.compareAddedColor=new $e(2278750),this.compareModifiedColor=new $e(16096779),this.maskTexture=null,this.maskTextureWidth=0,this.maskTextureHeight=0,this.dirty=!1,this.addressableSlotCount=0}getTextureSlotCount(){return Math.max(this.selectedMask.length,this.hoveredMask.length,this.compareRoleMask.length,this.addressableSlotCount,1)}ensureCapacity(e){if(e<=this.selectedMask.length)return;let t=Math.max(e,this.selectedMask.length*2,16),n=new Uint8Array(t),i=new Uint8Array(t),o=new Uint8Array(t);n.set(this.selectedMask),i.set(this.hoveredMask),o.set(this.compareRoleMask),this.selectedMask=n,this.hoveredMask=i,this.compareRoleMask=o}setAddressableSlotCount(e){if(e<=this.addressableSlotCount)return;let t=r5(this.getTextureSlotCount());this.addressableSlotCount=e,this.ensureCapacity(e);let n=r5(this.getTextureSlotCount());this.maskTexture!=null&&(t.width!==n.width||t.height!==n.height)&&(this.dirty=!0)}setHighlight(e,t,n){this.ensureCapacity(e+1);let i=t==="select"?this.selectedMask:this.hoveredMask,o=n?1:0;return i[e]===o?!1:(i[e]=o,this.dirty=!0,!0)}setCompareRole(e,t){this.ensureCapacity(e+1);let n=eCe(t);return this.compareRoleMask[e]===n?!1:(this.compareRoleMask[e]=n,this.dirty=!0,!0)}clearSlot(e){let t=!1;return this.selectedMask[e]&&(this.selectedMask[e]=0,t=!0),this.hoveredMask[e]&&(this.hoveredMask[e]=0,t=!0),t&&(this.dirty=!0),t}clearAll(){return this.hasAnyHighlight()?(this.selectedMask.fill(0),this.hoveredMask.fill(0),this.dirty=!0,!0):!1}clearAllCompareRoles(){return this.hasAnyCompareRole()?(this.compareRoleMask.fill(0),this.dirty=!0,!0):!1}hasAnyHighlight(){for(let e=0;e<this.selectedMask.length;e++)if(this.selectedMask[e]||this.hoveredMask[e])return!0;return!1}hasAnyCompareRole(){for(let e=0;e<this.compareRoleMask.length;e++)if(this.compareRoleMask[e])return!0;return!1}needsCompareUniforms(){return this.compareEnabled}uploadMaskTexture(e=!1){var t;if(!e&&!this.dirty&&this.maskTexture!=null)return this.maskTexture;let n=this.getTextureSlotCount(),{width:i,height:o}=r5(n),a=new Uint8Array(i*o*4);for(let s=0;s<n;s++){let l=s%i,c=(Math.floor(s/i)*i+l)*4;a[c]=this.selectedMask[s]?255:0,a[c+1]=this.hoveredMask[s]?255:0;let u=this.compareRoleMask[s]??0;a[c+2]=u===0?0:u*85}return this.maskTexture==null||this.maskTextureWidth!==i||this.maskTextureHeight!==o?((t=this.maskTexture)==null||t.dispose(),this.maskTexture=new $h(a,i,o,oi),this.maskTexture.minFilter=Ur,this.maskTexture.magFilter=Ur,this.maskTexture.generateMipmaps=!1,this.maskTexture.unpackAlignment=1,this.maskTexture.colorSpace=Es,this.maskTexture.needsUpdate=!0,this.maskTextureWidth=i,this.maskTextureHeight=o):(this.maskTexture.image.data=a,this.maskTexture.needsUpdate=!0),this.dirty=!1,this.maskTexture}getMaskTextureDimensions(){return{width:Math.max(this.maskTextureWidth,1),height:Math.max(this.maskTextureHeight,1)}}},tCe=`
  3986. uniform sampler2D u_highlightMask;
  3987. uniform vec2 u_highlightMaskSize;
  3988. uniform vec3 u_highlightSelectColor;
  3989. uniform vec3 u_highlightHoverColor;
  3990. uniform float u_compareEnabled;
  3991. uniform vec3 u_compareBaseColor;
  3992. uniform vec3 u_compareDeletedColor;
  3993. uniform vec3 u_compareAddedColor;
  3994. uniform vec3 u_compareModifiedColor;
  3995. varying float vBatchSlotId;
  3996. vec3 applyBatchHighlight(vec3 color) {
  3997. vec3 outColor = color;
  3998. if (u_highlightMaskSize.x <= 0.0 || u_highlightMaskSize.y <= 0.0) {
  3999. if (u_compareEnabled > 0.5) {
  4000. return u_compareBaseColor;
  4001. }
  4002. return outColor;
  4003. }
  4004. vec2 maskUv = vec2(
  4005. (mod(vBatchSlotId, u_highlightMaskSize.x) + 0.5) / u_highlightMaskSize.x,
  4006. (floor(vBatchSlotId / u_highlightMaskSize.x) + 0.5) / u_highlightMaskSize.y
  4007. );
  4008. vec4 mask = texture2D(u_highlightMask, maskUv);
  4009. if (u_compareEnabled > 0.5) {
  4010. outColor = u_compareBaseColor;
  4011. float role = mask.b;
  4012. if (role > 0.9) {
  4013. outColor = u_compareModifiedColor;
  4014. } else if (role > 0.55) {
  4015. outColor = u_compareAddedColor;
  4016. } else if (role > 0.2) {
  4017. outColor = u_compareDeletedColor;
  4018. }
  4019. }
  4020. if (mask.r > 0.5) {
  4021. return u_highlightSelectColor;
  4022. }
  4023. if (mask.g > 0.5) {
  4024. return u_highlightHoverColor;
  4025. }
  4026. return outColor;
  4027. }
  4028. `,nCe=(()=>{let r=new $h(new Uint8Array(4),1,1,oi);return r.minFilter=Ur,r.magFilter=Ur,r.needsUpdate=!0,r})(),bq=new Set;function rCe(){return{u_highlightMask:{value:nCe},u_highlightMaskSize:{value:new Le(1,1)},u_highlightSelectColor:{value:$_.clone()},u_highlightHoverColor:{value:GC.clone()},u_compareEnabled:{value:0},u_compareBaseColor:{value:new $e(10265519)},u_compareDeletedColor:{value:new $e(14753096)},u_compareAddedColor:{value:new $e(2278750)},u_compareModifiedColor:{value:new $e(16096779)}}}function nZ(r){let e=VC(r);return e.batchHighlightUniforms||(e.batchHighlightUniforms=rCe()),e.batchHighlightUniforms}function vq(r){if(r.includes("vBatchSlotId"))return r;let e=r;return e.includes("#include <common>")?e=e.replace("#include <common>",`#include <common>
  4029. attribute float slotId;
  4030. varying float vBatchSlotId;`):e=`attribute float slotId;
  4031. varying float vBatchSlotId;
  4032. ${e}`,e.includes("#include <begin_vertex>")?e.replace("#include <begin_vertex>",`#include <begin_vertex>
  4033. vBatchSlotId = slotId;`):e.includes("void main() {")?e.replace("void main() {",`void main() {
  4034. vBatchSlotId = slotId;`):e}function xq(r){if(r.includes("applyBatchHighlight(gl_FragColor.rgb)")||r.includes("applyBatchHighlight(diffuseColor.rgb)"))return{source:r,injected:!0};let e=r.includes("applyBatchHighlight")?r:tCe+r,t="gl_FragColor.rgb = applyBatchHighlight(gl_FragColor.rgb);";return e.includes("#include <dithering_fragment>")?{source:e.replace("#include <dithering_fragment>",`${t}
  4035. #include <dithering_fragment>`),injected:!0}:e.includes("#include <colorspace_fragment>")?{source:e.split("#include <colorspace_fragment>").join(`${t}
  4036. #include <colorspace_fragment>`),injected:!0}:e.includes("#include <tonemapping_fragment>")?{source:e.replace("#include <tonemapping_fragment>",`${t}
  4037. #include <tonemapping_fragment>`),injected:!0}:e.includes("gl_FragColor = vec4( diffuseColor.rgb, alpha );")?{source:e.replace("gl_FragColor = vec4( diffuseColor.rgb, alpha );","gl_FragColor = vec4( applyBatchHighlight(diffuseColor.rgb), alpha );"),injected:!0}:e.includes("gl_FragColor = vec4( diffuseColor.rgb, opacity );")?{source:e.replace("gl_FragColor = vec4( diffuseColor.rgb, opacity );","gl_FragColor = vec4( applyBatchHighlight(diffuseColor.rgb), opacity );"),injected:!0}:{source:r,injected:!1}}function wq(r){var e;if(typeof process<"u"&&((e=process.env)==null?void 0:e.NODE_ENV)==="production")return;let t=r.type;bq.has(t)||(bq.add(t),console.warn(`[AcTrBatchHighlight] Could not inject highlight shader for material type "${t}". Highlight tinting may be skipped.`))}function iCe(r,e){r.uniforms.u_highlightMask=e.u_highlightMask,r.uniforms.u_highlightMaskSize=e.u_highlightMaskSize,r.uniforms.u_highlightSelectColor=e.u_highlightSelectColor,r.uniforms.u_highlightHoverColor=e.u_highlightHoverColor,r.uniforms.u_compareEnabled=e.u_compareEnabled,r.uniforms.u_compareBaseColor=e.u_compareBaseColor,r.uniforms.u_compareDeletedColor=e.u_compareDeletedColor,r.uniforms.u_compareAddedColor=e.u_compareAddedColor,r.uniforms.u_compareModifiedColor=e.u_compareModifiedColor}function _q(r,e){r instanceof Kn&&(r.uniforms.u_highlightMask=e.u_highlightMask,r.uniforms.u_highlightMaskSize=e.u_highlightMaskSize,r.uniforms.u_highlightSelectColor=e.u_highlightSelectColor,r.uniforms.u_highlightHoverColor=e.u_highlightHoverColor,r.uniforms.u_compareEnabled=e.u_compareEnabled,r.uniforms.u_compareBaseColor=e.u_compareBaseColor,r.uniforms.u_compareDeletedColor=e.u_compareDeletedColor,r.uniforms.u_compareAddedColor=e.u_compareAddedColor,r.uniforms.u_compareModifiedColor=e.u_compareModifiedColor)}function oCe(r){r.needsUpdate=!0,r instanceof Kn&&(r.uniformsNeedUpdate=!0)}function aCe(r){let e=VC(r),t=nZ(r);if(!e.batchHighlightPatched){if(e.batchHighlightPatched=!0,r instanceof Kn){r.vertexShader=vq(r.vertexShader);let n=xq(r.fragmentShader);r.fragmentShader=n.source,n.injected||wq(r)}else{let n=r.onBeforeCompile;r.onBeforeCompile=(o,a)=>{n?.call(r,o,a),iCe(o,t),o.vertexShader=vq(o.vertexShader);let s=xq(o.fragmentShader);o.fragmentShader=s.source,s.injected||wq(r)};let i=r.customProgramCacheKey;r.customProgramCacheKey=()=>`${i.call(r)}|batchHighlightCompare`}_q(r,t),oCe(r);return}_q(r,t)}function rZ(r,e){let t=Array.isArray(r)?r:[r],n=e.uploadMaskTexture();for(let i of t){aCe(i);let o=nZ(i);o.u_highlightMask.value=n;let a=e.getMaskTextureDimensions();o.u_highlightMaskSize.value.set(a.width,a.height),o.u_highlightSelectColor.value.copy($_),o.u_highlightHoverColor.value.copy(GC),o.u_compareEnabled.value=e.compareEnabled?1:0,o.u_compareBaseColor.value.copy(e.compareBaseColor),o.u_compareDeletedColor.value.copy(e.compareDeletedColor),o.u_compareAddedColor.value.copy(e.compareAddedColor),o.u_compareModifiedColor.value.copy(e.compareModifiedColor),i instanceof Kn&&(i.uniformsNeedUpdate=!0)}}function sb(r,e){let t=r.userData;if(t.batchHighlightRendererInstalled)return;t.batchHighlightRendererInstalled=!0;let n=r.onBeforeRender;r.onBeforeRender=(i,o,a,s,l,c)=>{n?.call(r,i,o,a,s,l,c),l&&rZ(l,e)}}function sCe(r){return(Array.isArray(r)?r:[r]).some(e=>VC(e).batchHighlightPatched)}function lCe(r){let e=r.length,t=0;return e>0&&(t=N_.estimateObjectSize(r[0])),{count:e,size:e*t}}function H5(r,e,t,n){for(let i in e.attributes){if(i===lb)continue;let o=e.getAttribute(i),{array:a,itemSize:s,normalized:l}=o,c=new a.constructor(t*s),u=new Et(c,s,l);r.setAttribute(i,u)}if(EC(r,t),n!=null&&e.getIndex()!==null){let i=t>65535?new Uint32Array(n):new Uint16Array(n);r.setIndex(new Et(i,1))}}function W5(r,e,t,n){if(n&&!!e.getIndex()!=!!r.getIndex())throw new Error(`${t}: All geometries must consistently have "index".`);for(let i in r.attributes){if(i===lb)continue;if(!e.hasAttribute(i))throw new Error(`${t}: Added geometry missing "${i}". All geometries must have consistent attributes.`);let o=e.getAttribute(i),a=r.getAttribute(i);if(o.itemSize!==a.itemSize||o.normalized!==a.normalized)throw new Error(`${t}: All attributes must have a consistent itemSize and normalized value.`)}}function WC(r,e,t,n){let i,o=t;return r.length>0?(r.sort(YEe),i=r.shift(),e[i]=n):(i=t,o++,e.push(n)),{geometryId:i,geometryCount:o}}function cb(r,e){return r===-1?e:r}function XC(){return{boundingBox:null,flags:WEe}}function YC(r){let{typeName:e,maxVertexCount:t,vertexStart:n,reservedVertexCount:i,maxIndexCount:o,indexStart:a=-1,reservedIndexCount:s=0}=r;if(o!=null&&a!==-1&&a+s>o||n+i>t)throw new Error(`${e}: Reserved space request exceeds the maximum buffer size.`)}function ub(r){let{currentMaxCount:e,nextStart:t,requiredCount:n,growthFactor:i}=r,o=t+n;return o<=e?e:Math.ceil(o*i)}function cCe(r,e,t){return r>=e.length||!Pi(e[r].flags)?!1:(e[r].flags=Qq.None,t.push(r),!0)}function uCe(r,e,t){if(r<0||r>=e.length||!Pi(e[r].flags))throw new Error(`${t}: Invalid geometryId ${r}. Geometry is either out of range or has been deleted.`)}function hCe(r,e,t,n){for(let i in r.attributes){if(i===lb)continue;let o=e.getAttribute(i),a=r.getAttribute(i);g5(o,a,t);let s=o.itemSize;for(let l=o.count,c=n;l<c;l++){let u=t+l;for(let h=0;h<s;h++)a.setComponent(u,h,0)}a.needsUpdate=!0,a.addUpdateRange(t*s,n*s)}}function dCe(r,e,t,n,i){let o=r.getIndex(),a=e.getIndex();if(!(!o||!a)){for(let s=0;s<a.count;s++)o.setX(n+s,t+a.getX(s));for(let s=a.count,l=i;s<l;s++)o.setX(n+s,t);o.needsUpdate=!0,o.addUpdateRange(n,i)}}function X5(r,e,t,n,i,o){let a=e.getIndex()!==null,s=t.getIndex();if(a&&s&&s.count>r.reservedIndexCount||t.attributes.position.count>r.reservedVertexCount)throw new Error(`${n}: Reserved space not large enough for provided geometry.`);let l=r.vertexStart,c=r.reservedVertexCount;if(r.vertexCount=t.getAttribute("position").count,hCe(e,t,l,c),a&&s){let d=r;d.indexCount=s.count,dCe(e,t,l,d.indexStart,d.reservedIndexCount)}let u=!0,h=o??r.boundingBox;return h!=null&&(t.computeBoundingBox(),t.boundingBox!=null&&t.boundingBox.equals(h)&&(u=!1)),u&&(r.boundingBox=null),Pi(r.flags)&&(delete r.hiddenDrawSnapshot,Uf(r.flags)||G5(e,r,!1)),tZ(e,l,c,i),u}var pCe=new Ne;function fCe(r,e,t){let n=r??new Ne;n.makeEmpty();let i=new Ne;for(let o=0,a=e.length;o<a;o++){if(!Pi(e[o].flags))continue;let s=t(o,i);s&&n.union(s)}return n}function mCe(r,e,t){let n=r??new Lr;n.makeEmpty();let i=new Lr;for(let o=0,a=e.length;o<a;o++)Pi(e[o].flags)&&(t(o,i),n.union(i));return n}function gCe(r,e,t){r.material=t,r.geometry.index=e.index,r.geometry.attributes=e.attributes,r.geometry.boundingBox===null&&(r.geometry.boundingBox=new Ne),r.geometry.boundingSphere===null&&(r.geometry.boundingSphere=new Lr)}function yCe(r,e,t,n,i){r.geometry.setDrawRange(e,t),r.geometry.boundingBox.copy(n),r.geometry.boundingSphere.copy(i)}function bCe(r){r.geometry.index=null,r.geometry.attributes={},r.geometry.setDrawRange(0,1/0)}function $C(r,e){return class extends r{constructor(){super(...arguments),this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._geometryCount=0,this._raycastObject=e.createObject(),this._batchIntersects=[],this._box=new Ne,this._sphere=new Lr,this._vector=new U,this._typedBatchIntersects=this._batchIntersects,this._highlightState=new _5}get mappingStats(){return lCe(this._geometryInfo)}validateGeometryId(t){uCe(t,this._geometryInfo,e.typeName)}getGeometryRangeAt(t){return this.validateGeometryId(t),this._geometryInfo[t]}computeBoundingBox(){this.boundingBox=fCe(this.boundingBox,this._geometryInfo,(t,n)=>this.computeBoundingBoxAt(t,n))}computeBoundingBoxAt(t,n){return this.getBoundingBoxAt(t,n)}computeBoundingSphereAt(t,n){let i=this.computeBoundingBoxAt(t,pCe);return i===null?null:i.getBoundingSphere(n)}unionActiveVisibleBoundingBoxInto(t,n){let i=this;i.updateMatrixWorld(!0);for(let o=0;o<this._geometryCount;o++){let a=this._geometryInfo[o];!Pi(a.flags)||!Uf(a.flags)||n!=null&&n.excludeObjectIds&&a.objectId&&n.excludeObjectIds.has(a.objectId)||n!=null&&n.includeObjectIds&&a.objectId&&!n.includeObjectIds.has(a.objectId)||this.computeBoundingBoxAt(o,this._box)&&(this._box.applyMatrix4(i.matrixWorld),t.union(this._box))}}computeAggregateBoundingSphere(t){return mCe(t,this._geometryInfo,(n,i)=>this.computeBoundingSphereAt(n,i))}computeBoundingSphere(){let t=this.boundingSphere??new Lr;t.makeEmpty(),this.boundingSphere=this.computeAggregateBoundingSphere(t)??t}setVisibleAt(t,n){if(this.validateGeometryId(t),Uf(this._geometryInfo[t].flags)===n)return this;let i=this._geometryInfo[t];return G5(this.geometry,i,n)&&(i.flags=XEe(i.flags,n),i.boundingBox=null),this}getVisibleAt(t){return this.validateGeometryId(t),Uf(this._geometryInfo[t].flags)}setHighlightAt(t,n,i){try{this.validateGeometryId(t)}catch{return!1}let o=this._highlightState.setHighlight(t,n,i);return o&&sb(this,this._highlightState),o}setCompareRoleAt(t,n){try{this.validateGeometryId(t)}catch{return!1}let i=this._highlightState.setCompareRole(t,n);return(i||this._highlightState.compareEnabled)&&sb(this,this._highlightState),i}applyPackedCompareRoles(t){for(let n=0;n<this._geometryInfo.length;n++){let i=this._geometryInfo[n];if(!Pi(i.flags))continue;let o=i.objectId,a=o!=null&&o!==""?t.get(String(o))??null:null;this.setCompareRoleAt(n,a)}return this.flushHighlightMask(),this}setCompareDisplayColors(t){return this._highlightState.compareEnabled=t.enabled,t.baseColor!=null&&this._highlightState.compareBaseColor.setHex(t.baseColor),t.deletedColor!=null&&this._highlightState.compareDeletedColor.setHex(t.deletedColor),t.addedColor!=null&&this._highlightState.compareAddedColor.setHex(t.addedColor),t.modifiedColor!=null&&this._highlightState.compareModifiedColor.setHex(t.modifiedColor),this._highlightState.dirty=!0,sb(this,this._highlightState),this.flushHighlightMask(),this}flushHighlightMask(){this._highlightState.setAddressableSlotCount(this._geometryInfo.length);let t=this._highlightState.dirty;return t&&this._highlightState.uploadMaskTexture(),this.material&&(this._highlightState.hasAnyHighlight()||this._highlightState.needsCompareUniforms()||t&&sCe(this.material))&&rZ(this.material,this._highlightState),this}clearHighlightSlot(t){return this._highlightState.clearSlot(t)&&sb(this,this._highlightState),this}clearHighlightState(){return this._highlightState.clearAll()&&sb(this,this._highlightState),this}deleteGeometry(t){return cCe(t,this._geometryInfo,this._availableGeometryIds)?(this.clearHighlightSlot(t),this):this}getObjectAt(t){let n=e.createObject();this._initializeRaycastObject(n);let i=this._geometryInfo[t],{start:o,count:a}=e.getDrawRange(this,i);return this._setRaycastObjectInfo(n,t,o,a),n}intersectWith(t,n,i){this._initializeRaycastObject(this._raycastObject),this._intersectWith(t,n,i),this._resetRaycastObjectInfo(this._raycastObject)}raycast(t,n){this._initializeRaycastObject(this._raycastObject);for(let i=0,o=this._geometryInfo.length;i<o;i++)this._intersectWith(i,t,n);this._resetRaycastObjectInfo(this._raycastObject)}dispose(){return this.geometry.dispose(),this}_initializeRaycastObject(t){gCe(t,this.geometry,this.material),t.position.copy(this.position),t.quaternion.copy(this.quaternion),t.scale.copy(this.scale),t.updateMatrix(),t.updateMatrixWorld(!0)}_setRaycastObjectInfo(t,n,i,o){this.computeBoundingBoxAt(n,this._box),this._box.getBoundingSphere(this._sphere),yCe(t,i,o,this._box,this._sphere)}_resetRaycastObjectInfo(t){bCe(t)}_intersectWith(t,n,i){let o=this._geometryInfo[t];if(Uf(o.flags))if(o.bboxIntersectionCheck){if(this.computeBoundingBoxAt(t,this._box),this._box.applyMatrix4(this.matrixWorld),n.ray.intersectBox(this._box,this._vector)){let a=n.ray.origin.distanceTo(this._vector);i.push({distance:a,point:this._vector.clone(),object:this,face:null,faceIndex:void 0,uv:void 0,batchId:t,objectId:o.objectId})}}else{let{start:a,count:s}=e.getDrawRange(this,o);this._setRaycastObjectInfo(this._raycastObject,t,a,s),this._raycastObject.raycast(n,this._batchIntersects);for(let l=0,c=this._typedBatchIntersects.length;l<c;l++){let u=this._typedBatchIntersects[l];u.object=this,u.batchId=t,u.objectId=o.objectId,i.push(u)}this._batchIntersects.length=0}}}}var T_=new Ne,xo=new U,vCe=new Ne,xCe=$C(qn,{typeName:"AcTrBatchedLine",createObject:()=>new qn,getDrawRange:(r,e)=>r.geometry.index!=null?{start:e.indexStart,count:e.indexCount}:{start:e.vertexStart,count:e.vertexCount}}),iZ=class S5 extends xCe{constructor(e=1e3,t=e*2,n){super(new ot,n),this._nextIndexStart=0,this._nextVertexStart=0,this._geometryInitialized=!1,this.frustumCulled=!1,this._maxVertexCount=e,this._maxIndexCount=t}get geometryCount(){return this._geometryCount}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}get origin(){return this._origin}_initializeGeometry(e){this._geometryInitialized===!1&&(H5(this.geometry,e,this._maxVertexCount,this._maxIndexCount),this._geometryInitialized=!0)}_validateGeometry(e){W5(this.geometry,e,"AcTrBatchedLine",!0)}_resizeSpaceIfNeeded(e){let t=e.getIndex(),n=t==null?this._maxIndexCount:ub({currentMaxCount:this._maxIndexCount,nextStart:this._nextIndexStart,requiredCount:t.count,growthFactor:S5.GROWTH_FACTOR}),i=e.getAttribute("position"),o=i==null?this._maxVertexCount:ub({currentMaxCount:this._maxVertexCount,nextStart:this._nextVertexStart,requiredCount:i.count,growthFactor:S5.GROWTH_FACTOR});(n>this._maxIndexCount||o>this._maxVertexCount)&&this.setGeometrySize(o,n)}reset(){this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._geometryInfo.length=0,this._origin=void 0,this.position.set(0,0,0),this._geometryInitialized=!1,this.geometry.dispose()}getUserData(){let e=[];return this._geometryInfo.forEach(t=>{e.push({position:t.position,objectId:t.objectId,bboxIntersectionCheck:t.bboxIntersectionCheck})}),e}resetGeometry(e,t=0){let n=this.getUserData();this.reset();let i=B_.instance;n.forEach(o=>{if(o.position){let a=i.create(e,o.position,t);if(a.line){let s=new U(o.position.x,o.position.y,o.position.z??0),l=this.addGeometry(a.line,-1,-1,s);this.setGeometryInfo(l,o)}}})}addGeometry(e,t=-1,n=-1,i=new U){this.rebaseGeometryInPlace(e,i),this._initializeGeometry(e),this._validateGeometry(e),this._resizeSpaceIfNeeded(e);let o=e.getAttribute("position").count,a=e.getIndex(),s={vertexStart:this._nextVertexStart,vertexCount:-1,reservedVertexCount:cb(t,o),indexStart:a?this._nextIndexStart:-1,indexCount:-1,reservedIndexCount:a?cb(n,a.count):0,...XC()};YC({typeName:"AcTrBatchedLine",maxVertexCount:this._maxVertexCount,vertexStart:s.vertexStart,reservedVertexCount:s.reservedVertexCount,maxIndexCount:this._maxIndexCount,indexStart:s.indexStart,reservedIndexCount:s.reservedIndexCount});let{geometryId:l,geometryCount:c}=WC(this._availableGeometryIds,this._geometryInfo,this._geometryCount,s);return this._geometryCount=c,this.setGeometryAt(l,e,null),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,this._syncDrawRange(),l}rebaseGeometryInPlace(e,t){let n=e.getAttribute("position");if(!n)return;if(!this._origin){At.safeComputeBoundingBox(e);let a=e.boundingBox?e.boundingBox.getCenter(new U):new U;this._origin=a.add(t.clone()),this.position.copy(this._origin)}let i=this._origin;if(!i)return;let o=n.array;if(o instanceof Float32Array){for(let a=0;a<o.length;a+=3)o[a]=o[a]+t.x-i.x,o[a+1]=o[a+1]+t.y-i.y,o[a+2]=o[a+2]+t.z-i.z;n.needsUpdate=!0;return}for(let a=0;a<n.count;a++)n.setXYZ(a,n.getX(a)+t.x-i.x,n.getY(a)+t.y-i.y,n.getZ(a)+t.z-i.z);n.needsUpdate=!0}setGeometryInfo(e,t){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine: Maximum geometry count reached.");let n=this._geometryInfo[e],i=t.position;i&&(n.position={...i}),n.objectId=t.objectId,n.bboxIntersectionCheck=t.bboxIntersectionCheck}setGeometryAt(e,t,n=this.computeBoundingBoxAt(e,vCe)){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine: Maximum geometry count reached.");this._validateGeometry(t);let i=this.geometry,o=this._geometryInfo[e];return X5(o,i,t,"AcTrBatchedLine",e,n),e}ensureLineDistanceAttribute(){let e=this.geometry;if(e.hasAttribute("lineDistance"))return;let t=Array.isArray(this.material)?this.material[0]:this.material;if(t==null||!At.hasPatternLineShader(t))return;let n=e.getAttribute("position");if(!n)return;let i=e.getIndex(),o=2,a=2;for(let p=0;p<this._geometryCount;p++){let f=this._geometryInfo[p];Pi(f.flags)&&(o=Math.max(o,f.vertexCount),a=Math.max(a,f.indexCount))}let s=n.itemSize,l=new Float32Array(n.count),c=new ot,u=new Float32Array(o*s),h=i?new Uint32Array(a):void 0;for(let p=0;p<this._geometryCount;p++){let f=this._geometryInfo[p];if(!Pi(f.flags))continue;let m=f.vertexCount;if(m<2)continue;if(u.set(n.array.subarray(f.vertexStart*s,(f.vertexStart+m)*s),0),c.setAttribute("position",new Et(u.subarray(0,m*s),s)),h&&i){for(let y=0;y<f.indexCount;y++)h[y]=i.array[f.indexStart+y]-f.vertexStart;c.setIndex(new Et(h.subarray(0,f.indexCount),1))}At.computeSegmentLineDistances(c);let g=c.getAttribute("lineDistance");l.set(g.array,f.vertexStart)}let d=new Jt(l,1);d.needsUpdate=!0,e.setAttribute("lineDistance",d)}optimize(){let e=this.geometry,t=e.index!==null,n=e.attributes,i=e.index,o=0,a=0,s=this._geometryInfo.map((l,c)=>({info:l,id:c})).filter(l=>Pi(l.info.flags)).sort((l,c)=>l.info.vertexStart-c.info.vertexStart);for(let{info:l}of s){let c=l.vertexCount,u=t?l.indexCount:0,h=l.vertexStart,d=o,p=d-h;if(p!==0&&c>0)for(let f in n){let m=n[f],{array:g,itemSize:y}=m;g.copyWithin(d*y,h*y,(h+c)*y),m.addUpdateRange(d*y,c*y),m.needsUpdate=!0}if(t&&i&&u>0){let f=l.indexStart,m=a,g=i.array;if(p!==0)for(let y=f;y<f+u;y++)g[y]+=p;f!==m&&g.copyWithin(m,f,f+u),i.addUpdateRange(m,u),i.needsUpdate=!0,l.indexStart=m}l.vertexStart=d,o+=l.reservedVertexCount,a+=l.reservedIndexCount}if(t&&i){let l=i.array;for(let c=a;c<l.length;c++)l[c]=0;i.needsUpdate=!0}return t?e.setDrawRange(0,a):e.setDrawRange(0,o),this._nextVertexStart=o,this._nextIndexStart=a,this._syncDrawRange(),this._availableGeometryIds.length=0,HC(e,this._geometryInfo),this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let n=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){let o=new Ne,a=n.index,s=n.attributes.position,{start:l,count:c}=a!=null?{start:i.indexStart,count:i.indexCount}:{start:i.vertexStart,count:i.vertexCount};for(let u=l,h=l+c;u<h;u++){let d=u;a&&(d=a.getX(d)),o.expandByPoint(xo.fromBufferAttribute(s,d))}i.boundingBox=o}return t.copy(i.boundingBox),t}getBoundingSphereAt(e,t){return e>=this._geometryCount?null:(this.getBoundingBoxAt(e,T_),T_.getBoundingSphere(t),t)}computeBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let n=this.geometry,i=this._geometryInfo[e],o=n.index,a=n.attributes.position,{start:s,count:l}=o!=null?{start:i.indexStart,count:i.indexCount}:{start:i.vertexStart,count:i.vertexCount};if(t.makeEmpty(),a.itemSize===3&&!a.normalized&&(o==null||o.itemSize===1&&!o.normalized)){let c=a.array,u=o?.array;for(let h=s,d=s+l;h<d;h++){let p=(u==null?h:u[h])*3;t.expandByPoint(xo.set(c[p],c[p+1],c[p+2]))}return t}for(let c=s,u=s+l;c<u;c++){let h=c;o&&(h=o.getX(h)),t.expandByPoint(xo.fromBufferAttribute(a,h))}return t}computeAggregateBoundingSphere(e){let t=this.geometry,n=t.index,i=t.attributes.position;if(!i)return null;let o=1/0,a=1/0,s=1/0,l=-1/0,c=-1/0,u=-1/0,h=i.itemSize===3&&!i.normalized&&(n==null||n.itemSize===1&&!n.normalized),d=i.array,p=n?.array;for(let f=0;f<this._geometryCount;f++){let m=this._geometryInfo[f];if(!Pi(m.flags))continue;let{start:g,count:y}=n!=null?{start:m.indexStart,count:m.indexCount}:{start:m.vertexStart,count:m.vertexCount};if(h)for(let b=g,v=g+y;b<v;b++){let x=(p==null?b:p[b])*3,w=d[x],_=d[x+1],A=d[x+2];w<o&&(o=w),_<a&&(a=_),A<s&&(s=A),w>l&&(l=w),_>c&&(c=_),A>u&&(u=A)}else for(let b=g,v=g+y;b<v;b++){let x=b;n&&(x=n.getX(x)),xo.fromBufferAttribute(i,x),xo.x<o&&(o=xo.x),xo.y<a&&(a=xo.y),xo.z<s&&(s=xo.z),xo.x>l&&(l=xo.x),xo.y>c&&(c=xo.y),xo.z>u&&(u=xo.z)}}return o>l?(e.makeEmpty(),e):(T_.min.set(o,a,s),T_.max.set(l,c,u),T_.getBoundingSphere(e))}getGeometryAt(e){return this.validateGeometryId(e),this._geometryInfo[e]}setGeometrySize(e,t){let n=this.geometry;n.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ot,this._initializeGeometry(n));let i=this.geometry;n.index&&Gf(n.index.array,i.index.array);for(let o in n.attributes)Gf(n.attributes[o].array,i.attributes[o].array);this._syncDrawRange()}getObjectAt(e){let t=super.getObjectAt(e);return t.position.copy(this.position),t}_initializeRaycastObject(e){super._initializeRaycastObject(e),e.position.copy(this.position),e.updateMatrixWorld(!0)}_syncDrawRange(){let e=this.geometry;e.index?e.setDrawRange(0,this._nextIndexStart):e.setDrawRange(0,this._nextVertexStart)}copy(e){var t;return super.copy(e),this.geometry=e.geometry.clone(),this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(n=>({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null})),this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._origin=(t=e._origin)==null?void 0:t.clone(),this}};iZ.GROWTH_FACTOR=1.25;var i5=iZ,fd=new Ne,di=new U,wo=new U,yC=new U,bC=new U,Sq=new U,Aq=new U,k_=[],md=new li(new Ai),wCe=$C(li,{typeName:"AcTrBatchedLine2",createObject:()=>new li(new Ai),getDrawRange:(r,e)=>({start:e.vertexStart,count:e.vertexCount})}),oZ=class aZ extends wCe{constructor(e=1e3,t){super(new Ai,t),this._nextSegmentStart=0,this._geometryInitialized=!1,this.frustumCulled=!1,this._maxSegmentCount=e}get geometryCount(){return this._geometryCount}get unusedSegmentCount(){return this._maxSegmentCount-this._nextSegmentStart}get origin(){return this._origin}_initializeGeometry(e){this._geometryInitialized||(this.geometry.setPositions(new Float32Array(this._maxSegmentCount*6)),EC(this.geometry,this._maxSegmentCount),this._copyStaticAttributes(e),this._isDashedMaterial()&&this._ensureDistanceAttributes(),this._geometryInitialized=!0)}_copyStaticAttributes(e,t=this.geometry){let n=t,i=e.getIndex();i&&n.setIndex(i.clone());for(let o in e.attributes)o==="instanceStart"||o==="instanceEnd"||o==="slotId"||o==="instanceDistanceStart"||o==="instanceDistanceEnd"||n.setAttribute(o,e.getAttribute(o).clone())}_isDashedMaterial(){var e;return((e=this.material)==null?void 0:e.dashed)===!0}_ensureDistanceAttributes(){let e=this.geometry;if(e.getAttribute("instanceDistanceStart"))return;let t=new Float32Array(this._maxSegmentCount*2),n=new vl(t,2,1);e.setAttribute("instanceDistanceStart",new sr(n,1,0)),e.setAttribute("instanceDistanceEnd",new sr(n,1,1))}ensureDashDistances(){if(!(!this._isDashedMaterial()||!this._geometryInitialized)){this._ensureDistanceAttributes();for(let e=0;e<this._geometryCount;e++){let t=this._geometryInfo[e];!t||!Pi(t.flags)||t.vertexCount<1||this._writeSlotDistances(t.vertexStart,t.vertexCount,t.reservedVertexCount)}}}_writeSlotDistances(e,t,n){let i=this.geometry.getAttribute("instanceDistanceStart"),o=this.geometry.getAttribute("instanceDistanceEnd");if(!i||!o)return;let a=this.geometry.getAttribute("instanceStart"),s=this.geometry.getAttribute("instanceEnd"),l=0;for(let c=0;c<t;c++){let u=e+c;yC.fromBufferAttribute(a,u),bC.fromBufferAttribute(s,u),i.setX(u,l),l+=yC.distanceTo(bC),o.setX(u,l)}for(let c=t;c<n;c++){let u=e+c;i.setX(u,0),o.setX(u,0)}i.data.needsUpdate=!0,o.data.needsUpdate=!0}_validateGeometry(e){let t=e.getAttribute("instanceStart"),n=e.getAttribute("instanceEnd");if(!t||!n)throw new Error('AcTrBatchedLine2: Geometry must have "instanceStart" and "instanceEnd" attributes.');if(t.itemSize!==3||n.itemSize!==3||t.count!==n.count)throw new Error("AcTrBatchedLine2: Invalid line segment attributes. Expected matching vec3 instanceStart/instanceEnd.")}_resizeSpaceIfNeeded(e){let t=e.getAttribute("instanceStart").count,n=ub({currentMaxCount:this._maxSegmentCount,nextStart:this._nextSegmentStart,requiredCount:t,growthFactor:aZ.GROWTH_FACTOR});n>this._maxSegmentCount&&this.setGeometrySize(n)}reset(){this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._nextSegmentStart=0,this._geometryCount=0,this._origin=void 0,this.position.set(0,0,0),this._geometryInitialized=!1,this.geometry.dispose()}addGeometry(e,t=-1,n=new U){this.rebaseGeometryInPlace(e,n),this._initializeGeometry(e),this._validateGeometry(e),this._resizeSpaceIfNeeded(e);let i=e.getAttribute("instanceStart").count,o={vertexStart:this._nextSegmentStart,vertexCount:-1,reservedVertexCount:cb(t,i),...XC()};YC({typeName:"AcTrBatchedLine2",maxVertexCount:this._maxSegmentCount,vertexStart:o.vertexStart,reservedVertexCount:o.reservedVertexCount});let{geometryId:a,geometryCount:s}=WC(this._availableGeometryIds,this._geometryInfo,this._geometryCount,o);return this._geometryCount=s,this.setGeometryAt(a,e),this._nextSegmentStart=o.vertexStart+o.reservedVertexCount,this._syncDrawRange(),a}rebaseGeometryInPlace(e,t){let n=e.getAttribute("instanceStart"),i=e.getAttribute("instanceEnd");if(!n||!i)return;if(!this._origin){At.safeComputeBoundingBox(e);let a=e.boundingBox?e.boundingBox.getCenter(new U):new U;this._origin=a.add(t.clone()),this.position.copy(this._origin)}let o=this._origin;if(o){for(let a=0;a<n.count;a++)n.setXYZ(a,n.getX(a)+t.x-o.x,n.getY(a)+t.y-o.y,n.getZ(a)+t.z-o.z),i.setXYZ(a,i.getX(a)+t.x-o.x,i.getY(a)+t.y-o.y,i.getZ(a)+t.z-o.z);n.needsUpdate=!0,i.needsUpdate=!0}}setGeometryInfo(e,t){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine2: Maximum geometry count reached.");let n=this._geometryInfo[e];n.objectId=t.objectId,n.bboxIntersectionCheck=t.bboxIntersectionCheck}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine2: Maximum geometry count reached.");this._validateGeometry(t);let n=this._geometryInfo[e],i=t.getAttribute("instanceStart").count;if(i>n.reservedVertexCount)throw new Error("AcTrBatchedLine2: Reserved space not large enough for provided geometry.");let o=this.geometry.getAttribute("instanceStart"),a=this.geometry.getAttribute("instanceEnd"),s=t.getAttribute("instanceStart"),l=t.getAttribute("instanceEnd"),c=n.vertexStart;g5(s,o,c),g5(l,a,c);for(let u=i,h=n.reservedVertexCount;u<h;u++){let d=c+u;for(let p=0;p<3;p++)o.setComponent(d,p,0),a.setComponent(d,p,0)}return o.needsUpdate=!0,a.needsUpdate=!0,n.vertexCount=i,n.boundingBox=null,tZ(this.geometry,c,n.reservedVertexCount,e),this._isDashedMaterial()&&this._writeSlotDistances(c,i,n.reservedVertexCount),e}optimize(){let e=this._getPackedSegmentArray(),t=0,n=this._geometryInfo.map((a,s)=>({info:a,id:s})).filter(a=>Pi(a.info.flags)).sort((a,s)=>a.info.vertexStart-s.info.vertexStart);for(let{info:a}of n){let s=a.vertexStart,l=a.reservedVertexCount;if(s!==t){e.copyWithin(t*6,s*6,(s+l)*6);let c=this.geometry.getAttribute("slotId");c&&(c.array.copyWithin(t,s,s+l),c.addUpdateRange(t,l),c.needsUpdate=!0)}a.vertexStart=t,t+=l}for(let a=t*6,s=e.length;a<s;a++)e[a]=0;this._nextSegmentStart=t,this._syncDrawRange(),this._availableGeometryIds.length=0;let i=this.geometry.getAttribute("instanceStart"),o=this.geometry.getAttribute("instanceEnd");if(i.needsUpdate=!0,o.needsUpdate=!0,this._isDashedMaterial())for(let{info:a}of n)this._writeSlotDistances(a.vertexStart,a.vertexCount,a.reservedVertexCount);return HC(this.geometry,this._geometryInfo),this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let n=this._geometryInfo[e];if(n.boundingBox===null){let i=new Ne,o=this.geometry.getAttribute("instanceStart"),a=this.geometry.getAttribute("instanceEnd");for(let s=n.vertexStart,l=n.vertexStart+n.vertexCount;s<l;s++)i.expandByPoint(di.fromBufferAttribute(o,s)),i.expandByPoint(wo.fromBufferAttribute(a,s));n.boundingBox=i}return t.copy(n.boundingBox),t}getBoundingSphereAt(e,t){return e>=this._geometryCount?null:(this.getBoundingBoxAt(e,fd),fd.getBoundingSphere(t),t)}computeBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let n=this._geometryInfo[e],i=this.geometry.getAttribute("instanceStart"),o=this.geometry.getAttribute("instanceEnd"),a=n.vertexStart,s=a+n.vertexCount;t.makeEmpty();let l=i instanceof sr?i:null,c=o instanceof sr?o:null;if(l!==null&&c!==null&&c.data===l.data&&l.itemSize===3&&c.itemSize===3&&l.offset===0&&c.offset===3&&l.data.stride===6){let u=l.data.array;for(let h=a;h<s;h++){let d=h*6;t.expandByPoint(di.set(u[d],u[d+1],u[d+2])),t.expandByPoint(wo.set(u[d+3],u[d+4],u[d+5]))}return t}for(let u=a;u<s;u++)t.expandByPoint(di.fromBufferAttribute(i,u)),t.expandByPoint(wo.fromBufferAttribute(o,u));return t}computeAggregateBoundingSphere(e){let t=this.geometry.getAttribute("instanceStart"),n=this.geometry.getAttribute("instanceEnd");if(!t||!n)return null;let i=1/0,o=1/0,a=1/0,s=-1/0,l=-1/0,c=-1/0,u=t instanceof sr?t:null,h=n instanceof sr?n:null,d=u!==null&&h!==null&&h.data===u.data&&u.itemSize===3&&h.itemSize===3&&u.offset===0&&h.offset===3&&u.data.stride===6?u.data.array:null;for(let p=0;p<this._geometryCount;p++){let f=this._geometryInfo[p];if(!Pi(f.flags))continue;let m=f.vertexStart,g=m+f.vertexCount;if(d!==null)for(let y=m;y<g;y++){let b=y*6,v=d[b],x=d[b+1],w=d[b+2],_=d[b+3],A=d[b+4],E=d[b+5];v<i&&(i=v),x<o&&(o=x),w<a&&(a=w),v>s&&(s=v),x>l&&(l=x),w>c&&(c=w),_<i&&(i=_),A<o&&(o=A),E<a&&(a=E),_>s&&(s=_),A>l&&(l=A),E>c&&(c=E)}else for(let y=m;y<g;y++)di.fromBufferAttribute(t,y),wo.fromBufferAttribute(n,y),di.x<i&&(i=di.x),di.y<o&&(o=di.y),di.z<a&&(a=di.z),di.x>s&&(s=di.x),di.y>l&&(l=di.y),di.z>c&&(c=di.z),wo.x<i&&(i=wo.x),wo.y<o&&(o=wo.y),wo.z<a&&(a=wo.z),wo.x>s&&(s=wo.x),wo.y>l&&(l=wo.y),wo.z>c&&(c=wo.z)}return i>s?(e.makeEmpty(),e):(fd.min.set(i,o,a),fd.max.set(s,l,c),fd.getBoundingSphere(e))}getGeometryAt(e){return this.validateGeometryId(e),this._geometryInfo[e]}setGeometrySize(e){var t;let n=this.geometry,i=this._getPackedSegmentArray(),o=n.getAttribute("slotId"),a=o?o.array.slice(0,Math.min(o.count,this._maxSegmentCount)):void 0;this._maxSegmentCount=e,this.geometry=new Ai,this.geometry.setPositions(new Float32Array(e*6));let s=this._getPackedSegmentArray();if(Gf(i,s),this._copyStaticAttributes(n),this._isDashedMaterial()){let c=n.getAttribute("instanceDistanceStart");if(this._ensureDistanceAttributes(),c&&(t=c.data)!=null&&t.array){let u=this.geometry.getAttribute("instanceDistanceStart"),h=u.data.array,d=c.data.array;h.set(d.subarray(0,Math.min(d.length,h.length))),u.data.needsUpdate=!0}}let l=EC(this.geometry,e);a&&(l.array.set(a.subarray(0,Math.min(a.length,l.count))),l.needsUpdate=!0),this._geometryInitialized=!0,this._syncDrawRange(),n.dispose()}getObjectAt(e){let t=this._geometryInfo[e],n=this._createSubGeometry(t.vertexStart,t.vertexCount,!0),i=new li(n,this.material);this._isDashedMaterial()&&i.computeLineDistances(),i.position.copy(this.position),i.updateMatrix(),i.updateMatrixWorld(!0);let o=i.geometry.boundingBox??new Ne;this.computeBoundingBoxAt(e,o),i.geometry.boundingBox=o;let a=i.geometry.boundingSphere??new Lr;return o.getBoundingSphere(a),i.geometry.boundingSphere=a,i}intersectWith(e,t,n){this._intersectWith(e,t,n)}raycast(e,t){for(let n=0,i=this._geometryInfo.length;n<i;n++)this._intersectWith(n,e,t)}copy(e){var t;return super.copy(e),this.geometry=e.geometry.clone(),this.boundingBox=e.boundingBox?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(n=>({...n,boundingBox:n.boundingBox?n.boundingBox.clone():null})),this._maxSegmentCount=e._maxSegmentCount,this._geometryCount=e._geometryCount,this._nextSegmentStart=e._nextSegmentStart,this._geometryInitialized=e._geometryInitialized,this._origin=(t=e._origin)==null?void 0:t.clone(),this}dispose(){return this.geometry.dispose(),this}_intersectWith(e,t,n){let i=this._geometryInfo[e];if(!Uf(i.flags))return;if(i.bboxIntersectionCheck){if(this.computeBoundingBoxAt(e,fd),fd.applyMatrix4(this.matrixWorld),t.ray.intersectBox(fd,di)){let a=t.ray.origin.distanceTo(di);n.push({distance:a,point:di.clone(),object:this,face:null,faceIndex:void 0,uv:void 0,batchId:e,objectId:i.objectId})}return}let o=this._createSubGeometry(i.vertexStart,i.vertexCount,!1);if(md.geometry=o,md.material=this.material,md.position.copy(this.position),md.quaternion.copy(this.quaternion),md.scale.copy(this.scale),md.updateMatrix(),md.updateMatrixWorld(!0),md.raycast(t,k_),k_.length===0){this._intersectSegmentsWithLineThreshold(o,this.matrixWorld,t,e,i.objectId,n),o.dispose();return}for(let a=0,s=k_.length;a<s;a++){let l=k_[a];l.batchId=e,l.objectId=i.objectId,l.object=this,n.push(l)}k_.length=0,o.dispose()}_intersectSegmentsWithLineThreshold(e,t,n,i,o,a){var s;let l=((s=n.params.Line)==null?void 0:s.threshold)??0;if(!(l>0))return;let c=e.getAttribute("instanceStart"),u=e.getAttribute("instanceEnd");if(!c||!u)return;let h=l*l,d=a;for(let p=0,f=c.count;p<f;p++){if(yC.fromBufferAttribute(c,p).applyMatrix4(t),bC.fromBufferAttribute(u,p).applyMatrix4(t),n.ray.distanceSqToSegment(yC,bC,Sq,Aq)>h)continue;let m=n.ray.origin.distanceTo(Sq);m<n.near||m>n.far||d.push({distance:m,point:Aq.clone(),object:this,face:null,faceIndex:p,uv:void 0,batchId:i,objectId:o})}}_createSubGeometry(e,t,n){let i=this._getPackedSegmentArray(),o=n?i.slice(e*6,(e+t)*6):i.subarray(e*6,(e+t)*6),a=new Ai;return a.setPositions(o),this._copyStaticAttributes(this.geometry,a),a}_getPackedSegmentArray(){var e;let t=this.geometry.getAttribute("instanceStart");if("data"in t&&(e=t.data)!=null&&e.array)return t.data.array;let n=this.geometry.getAttribute("instanceEnd"),i=t.count,o=new Float32Array(i*6);for(let a=0,s=0;a<i;a++)o[s++]=t.getComponent(a,0),o[s++]=t.getComponent(a,1),o[s++]=t.getComponent(a,2),o[s++]=n.getComponent(a,0),o[s++]=n.getComponent(a,1),o[s++]=n.getComponent(a,2);return o}_syncDrawRange(){this.geometry.instanceCount=this._nextSegmentStart}};oZ.GROWTH_FACTOR=1.25;var vC=oZ,Mq=new Ne,_Ce=new U,SCe=$C(jt,{typeName:"AcTrBatchedMesh",createObject:()=>new jt,getDrawRange:(r,e)=>r.geometry.index!=null?{start:e.indexStart,count:e.indexCount}:{start:e.vertexStart,count:e.vertexCount}}),sZ=class A5 extends SCe{constructor(e=1e3,t=e*2,n){super(new ot,n),this._nextIndexStart=0,this._nextVertexStart=0,this._geometryInitialized=!1,this.frustumCulled=!1,this._maxVertexCount=e,this._maxIndexCount=t}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}get origin(){return this._origin}_initializeGeometry(e){this._geometryInitialized===!1&&(H5(this.geometry,e,this._maxVertexCount,this._maxIndexCount),this._geometryInitialized=!0)}_validateGeometry(e){W5(this.geometry,e,"AcTrBatchedMesh",!0)}_resizeSpaceIfNeeded(e){let t=e.getIndex(),n=t==null?this._maxIndexCount:ub({currentMaxCount:this._maxIndexCount,nextStart:this._nextIndexStart,requiredCount:t.count,growthFactor:A5.GROWTH_FACTOR}),i=e.getAttribute("position"),o=i==null?this._maxVertexCount:ub({currentMaxCount:this._maxVertexCount,nextStart:this._nextVertexStart,requiredCount:i.count,growthFactor:A5.GROWTH_FACTOR});(n>this._maxIndexCount||o>this._maxVertexCount)&&this.setGeometrySize(o,n)}addGeometry(e,t=-1,n=-1,i=new U){this.rebaseGeometryInPlace(e,i),e.hasAttribute("uv")&&e.deleteAttribute("uv"),e.hasAttribute("normal")&&e.deleteAttribute("normal"),this._initializeGeometry(e),this._validateGeometry(e),this._resizeSpaceIfNeeded(e);let o=e.getAttribute("position").count,a=e.getIndex(),s={vertexStart:this._nextVertexStart,vertexCount:-1,reservedVertexCount:cb(t,o),indexStart:a?this._nextIndexStart:-1,indexCount:-1,reservedIndexCount:a?cb(n,a.count):0,...XC()};YC({typeName:"AcTrBatchedMesh",maxVertexCount:this._maxVertexCount,vertexStart:s.vertexStart,reservedVertexCount:s.reservedVertexCount,maxIndexCount:this._maxIndexCount,indexStart:s.indexStart,reservedIndexCount:s.reservedIndexCount});let{geometryId:l,geometryCount:c}=WC(this._availableGeometryIds,this._geometryInfo,this._geometryCount,s);return this._geometryCount=c,this.setGeometryAt(l,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,this._syncDrawRange(),l}rebaseGeometryInPlace(e,t){let n=e.getAttribute("position");if(!n)return;if(!this._origin){At.safeComputeBoundingBox(e);let a=e.boundingBox?e.boundingBox.getCenter(new U):new U;this._origin=a.add(t.clone()),this.position.copy(this._origin)}let i=this._origin;if(!i)return;let o=n.array;if(o instanceof Float32Array){for(let a=0;a<o.length;a+=3)o[a]=o[a]+t.x-i.x,o[a+1]=o[a+1]+t.y-i.y,o[a+2]=o[a+2]+t.z-i.z;n.needsUpdate=!0;return}for(let a=0;a<n.count;a++)n.setXYZ(a,n.getX(a)+t.x-i.x,n.getY(a)+t.y-i.y,n.getZ(a)+t.z-i.z);n.needsUpdate=!0}setGeometryInfo(e,t){if(e>=this._geometryCount)throw new Error("AcTrBatchedMesh: Maximum geometry count reached.");let n=this._geometryInfo[e];n.objectId=t.objectId,n.bboxIntersectionCheck=t.bboxIntersectionCheck}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("AcTrBatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);let n=this.geometry,i=this._geometryInfo[e];return X5(i,n,t,"AcTrBatchedMesh",e),e}optimize(){let e=this.geometry,t=e.index!==null,n=e.attributes,i=e.index,o=0,a=0,s=this._geometryInfo.map((l,c)=>({info:l,i:c})).filter(l=>Pi(l.info.flags)).sort((l,c)=>l.info.vertexStart-c.info.vertexStart);for(let{info:l}of s){let c=l.vertexCount,u=t?l.indexCount:0,h=l.vertexStart,d=l.indexStart;if(h!==o){for(let p in n){let f=n[p],{array:m,itemSize:g}=f;m.copyWithin(o*g,h*g,(h+c)*g),f.addUpdateRange(o*g,c*g),f.needsUpdate=!0}l.vertexStart=o}if(t&&i&&d!==a){let p=i.array,f=o-h;for(let m=0;m<u;m++)p[a+m]=p[d+m]+f;i.addUpdateRange(a,u),i.needsUpdate=!0,l.indexStart=a}o+=c,a+=u}if(t&&i){let l=i.array;for(let c=a,u=l.length;c<u;c++)l[c]=0;i.needsUpdate=!0}return this._nextVertexStart=o,this._nextIndexStart=a,this._syncDrawRange(),this._availableGeometryIds.length=0,HC(e,this._geometryInfo),this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let n=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){let o=new Ne,a=n.index,s=n.attributes.position,{start:l,count:c}=a!=null?{start:i.indexStart,count:i.indexCount}:{start:i.vertexStart,count:i.vertexCount};for(let u=l,h=l+c;u<h;u++){let d=u;a&&(d=a.getX(d)),o.expandByPoint(_Ce.fromBufferAttribute(s,d))}i.boundingBox=o}return t.copy(i.boundingBox),t}getBoundingSphereAt(e,t){return e>=this._geometryCount?null:(this.getBoundingBoxAt(e,Mq),Mq.getBoundingSphere(t),t)}setGeometrySize(e,t){let n=this.geometry;n.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ot,this._initializeGeometry(n));let i=this.geometry;n.index&&Gf(n.index.array,i.index.array);for(let o in n.attributes)Gf(n.attributes[o].array,i.attributes[o].array);this._syncDrawRange()}_syncDrawRange(){let e=this.geometry;e.index?e.setDrawRange(0,this._nextIndexStart):e.setDrawRange(0,this._nextVertexStart)}copy(e){var t;return super.copy(e),this.geometry=e.geometry.clone(),this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(n=>({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null})),this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._origin=(t=e._origin)==null?void 0:t.clone(),this}};sZ.GROWTH_FACTOR=1.25;var Pq=sZ,Eq=new Ne,ACe=new U,MCe=$C(go,{typeName:"AcTrBatchedPoint",createObject:()=>new go,getDrawRange:(r,e)=>({start:e.vertexStart,count:e.vertexCount})}),lZ=class cZ extends MCe{constructor(e=1e3,t){super(new ot,t),this._nextVertexStart=0,this._geometryInitialized=!1,this.frustumCulled=!1,this._maxVertexCount=e}get geometryCount(){return this._geometryCount}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get origin(){return this._origin}_initializeGeometry(e){this._geometryInitialized===!1&&(H5(this.geometry,e,this._maxVertexCount,null),this._geometryInitialized=!0)}_validateGeometry(e){W5(this.geometry,e,"AcTrBatchedPoint",!1)}_resizeSpaceIfNeeded(e){let t=e.getAttribute("position"),n=t==null?this._maxVertexCount:ub({currentMaxCount:this._maxVertexCount,nextStart:this._nextVertexStart,requiredCount:t.count,growthFactor:cZ.GROWTH_FACTOR});n>this._maxVertexCount&&this.setGeometrySize(n)}reset(){this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._nextVertexStart=0,this._geometryCount=0,this._geometryInfo.length=0,this._origin=void 0,this.position.set(0,0,0),this._geometryInitialized=!1,this.geometry.dispose()}addGeometry(e,t=-1,n=new U){this.rebaseGeometryInPlace(e,n),this._initializeGeometry(e),this._validateGeometry(e),this._resizeSpaceIfNeeded(e);let i=e.getAttribute("position").count,o={vertexStart:this._nextVertexStart,vertexCount:-1,reservedVertexCount:cb(t,i),...XC()};YC({typeName:"AcTrBatchedPoint",maxVertexCount:this._maxVertexCount,vertexStart:o.vertexStart,reservedVertexCount:o.reservedVertexCount});let{geometryId:a,geometryCount:s}=WC(this._availableGeometryIds,this._geometryInfo,this._geometryCount,o);return this._geometryCount=s,this.setGeometryAt(a,e),this._nextVertexStart=o.vertexStart+o.reservedVertexCount,this.geometry.setDrawRange(0,this._nextVertexStart),this._syncDrawRange(),a}rebaseGeometryInPlace(e,t){let n=e.getAttribute("position");if(!n)return;if(!this._origin){At.safeComputeBoundingBox(e);let a=e.boundingBox?e.boundingBox.getCenter(new U):new U;this._origin=a.add(t.clone()),this.position.copy(this._origin)}let i=this._origin;if(!i)return;let o=n.array;if(o instanceof Float32Array){for(let a=0;a<o.length;a+=3)o[a]=o[a]+t.x-i.x,o[a+1]=o[a+1]+t.y-i.y,o[a+2]=o[a+2]+t.z-i.z;n.needsUpdate=!0;return}for(let a=0;a<n.count;a++)n.setXYZ(a,n.getX(a)+t.x-i.x,n.getY(a)+t.y-i.y,n.getZ(a)+t.z-i.z);n.needsUpdate=!0}setGeometryInfo(e,t){if(e>=this._geometryCount)throw new Error("AcTrBatchedPoint: Maximum geometry count reached.");let n=this._geometryInfo[e],i=t.position;i&&(n.position={...i}),n.objectId=t.objectId,n.bboxIntersectionCheck=t.bboxIntersectionCheck}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("AcTrBatchedPoint: Maximum geometry count reached.");this._validateGeometry(t);let n=this.geometry,i=this._geometryInfo[e];return X5(i,n,t,"AcTrBatchedPoint",e),e}optimize(){let e=0,t=this.geometry,n=this._geometryInfo,i=n.map((o,a)=>a).filter(o=>Pi(n[o].flags)).sort((o,a)=>n[o].vertexStart-n[a].vertexStart);for(let o=0;o<i.length;o++){let a=i[o],s=n[a],l=s.vertexStart,c=s.reservedVertexCount;if(l!==e){for(let u in t.attributes){let h=t.attributes[u],{array:d,itemSize:p}=h;d.copyWithin(e*p,l*p,(l+c)*p),h.addUpdateRange(e*p,c*p),h.needsUpdate=!0}s.vertexStart=e}e+=c}return this._nextVertexStart=e,this._syncDrawRange(),this._availableGeometryIds.length=0,HC(t,n),this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let n=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){let o=new Ne,a=n.index,s=n.attributes.position;for(let l=i.vertexStart,c=i.vertexStart+i.vertexCount;l<c;l++){let u=l;a&&(u=a.getX(u)),o.expandByPoint(ACe.fromBufferAttribute(s,u))}i.boundingBox=o}return t.copy(i.boundingBox),t}getBoundingSphereAt(e,t){return e>=this._geometryCount?null:(this.getBoundingBoxAt(e,Eq),Eq.getBoundingSphere(t),t)}getGeometryAt(e){return this.validateGeometryId(e),this._geometryInfo[e]}setGeometrySize(e){let t=this.geometry;t.dispose(),this._maxVertexCount=e,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ot,this._initializeGeometry(t));let n=this.geometry;t.index&&Gf(t.index.array,n.index.array);for(let i in t.attributes)Gf(t.attributes[i].array,n.attributes[i].array);this._syncDrawRange()}_syncDrawRange(){this.geometry.setDrawRange(0,this._nextVertexStart)}copy(e){var t;return super.copy(e),this.geometry=e.geometry.clone(),this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(n=>({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null})),this._maxVertexCount=e._maxVertexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._origin=(t=e._origin)==null?void 0:t.clone(),this}};lZ.GROWTH_FACTOR=1.25;var Cq=lZ,ab=32,Rf=new vt,$a=new vt,Tq=new vt,kq=new vt,Iq=new vt,xC=new Ne,PCe=new vt().makeScale(0,0,0),CC=class extends $n{constructor(e,t,n,i,o){super(),this._localBox=new Ne,this._drawable=null,this._line2Objects=[],this._capacity=0,this._count=0,this._objectIds=[],this._hiddenMatrices=new Map,this._cpuRelative=null,this._selected=new Set,this._hovered=new Set,this._highlights=new Map,this._compareEnabled=!1,this._compareBaseColor=10265519,this._compareMaterial=null,this._geometry=e,this._material=t,this._origin=n.clone(),this.kind=i,this.sourceUuid=o,this.matrixAutoUpdate=!1,At.safeComputeBoundingBox(e),e.boundingBox&&this._localBox.copy(e.boundingBox),this._raycastScratch=this.createDrawable(e,t),this._raycastScratch.matrixAutoUpdate=!1,this._raycastScratch.frustumCulled=!1,i!=="line2"&&(this._drawable=this.createInstanced(e,t,ab),this._capacity=ab,this._alive=new Uint8Array(ab),this._bboxOnly=new Uint8Array(ab),this._drawable.position.copy(this._origin),this._drawable.matrixAutoUpdate=!1,this._drawable.updateMatrix(),this._drawable.frustumCulled=!1,this._drawable.raycast=()=>{},this.add(this._drawable))}get origin(){return this._origin}get materialId(){return this._material.id}get material(){return this._material}set material(e){if(this._material=e,this._compareEnabled){this.syncCompareMaterial();return}this.applyMaterialToDrawables(e)}get instanceCount(){let e=0;for(let t=0;t<this._count;t++)this._alive[t]&&e++;return e}addInstance(e,t,n){let i=this._count;if(this.ensureCapacity(i+1),this._count++,this._alive[i]=1,this._bboxOnly[i]=n?1:0,this._objectIds[i]=t,this.writeRelative(i,e),this.kind==="line2"?this._line2Objects[i]=this.createLine2(i):this._drawable&&(this._drawable.count=this._count),n){let o=this._line2Objects[i]??this._drawable;o&&(en(o).bboxIntersectionCheck=!0)}return i}setVisibleAt(e,t){var n;if(!this.isAlive(e))return this;let i=(n=this._drawable)==null?void 0:n.instanceMatrix;if(!i){let s=this._line2Objects[e];return s&&(s.visible=t),t||this.removeHighlight(e),this}let o=e*16,a=i.array;if(t){let s=this._hiddenMatrices.get(e);s&&(a.set(s,o),this._hiddenMatrices.delete(e))}else if(!this._hiddenMatrices.has(e)){let s=new Float32Array(16);s.set(a.subarray(o,o+16)),this._hiddenMatrices.set(e,s),PCe.toArray(a,o),this.removeHighlight(e)}return i.needsUpdate=!0,this}getVisibleAt(e){var t;return this.isAlive(e)?this.kind==="line2"?((t=this._line2Objects[e])==null?void 0:t.visible)!==!1:!this._hiddenMatrices.has(e):!1}deleteGeometry(e){if(!this.isAlive(e))return;this.setVisibleAt(e,!1),this._alive[e]=0,this._selected.delete(e),this._hovered.delete(e),this.removeHighlight(e);let t=this._line2Objects[e];t&&(t.geometry=null,t.removeFromParent(),this._line2Objects[e]=null)}optimize(){}setHighlightAt(e,t,n){if(!this.isAlive(e))return!1;let i=t==="select"?this._selected:this._hovered,o=i.has(e);return n?i.add(e):i.delete(e),o===n&&this._highlights.has(e)===n?!1:(this.syncHighlight(e),!0)}flushHighlightMask(){}setCompareRoleAt(e,t){return!1}setCompareDisplayColors(e){this._compareEnabled=e.enabled,e.baseColor!=null&&(this._compareBaseColor=e.baseColor),this.syncCompareMaterial()}applyPackedCompareRoles(e){return this}intersectWith(e,t,n){if(!this.isAlive(e)||!this.getVisibleAt(e))return;if(this.composeFullMatrix(e,$a),this._bboxOnly[e]){xC.copy(this._localBox).applyMatrix4($a);let a=t.ray.intersectBox(xC,ECe);if(!a)return;n.push({distance:t.ray.origin.distanceTo(a),point:a.clone(),object:this});return}if(this.kind==="line2"){let a=this._line2Objects[e];if(!a)return;a.updateWorldMatrix(!0,!1);let s=t.intersectObject(a,!1);for(let l=0;l<s.length;l++)n.push(s[l]);return}let i=this._raycastScratch;CCe($a,i.scale),i.matrixWorld.copy($a),i.matrixWorldNeedsUpdate=!1;let o=t.intersectObject(i,!1);for(let a=0;a<o.length;a++)n.push(o[a])}getObjectAt(e){this.composeLocalMatrix(e,$a);let t=this.createDrawable(this._geometry,this._material);return t.matrix.copy($a),t.matrixAutoUpdate=!1,t.matrixWorld.copy($a),t.matrixWorldNeedsUpdate=!1,en(t).sharesTemplateGeometry=!0,t}unionActiveVisibleBoundingBoxInto(e,t){var n;this._drawable&&this._drawable.updateWorldMatrix(!0,!1);for(let i=0;i<this._count;i++){if(!this._alive[i]||!this.getVisibleAt(i))continue;let o=this._objectIds[i];o&&(n=t?.excludeObjectIds)!=null&&n.has(o)||t!=null&&t.includeObjectIds&&(!o||!t.includeObjectIds.has(o))||(this.composeFullMatrix(i,$a),xC.copy(this._localBox).applyMatrix4($a),e.union(xC))}}disposeSharedInstances(){for(let e of this._highlights.values())this.disposeOverlay(e);this._highlights.clear();for(let e of this._line2Objects)e&&(e.geometry=null,e.removeFromParent());if(this._line2Objects=[],this._drawable){this._drawable.removeFromParent();let e=this._drawable;e.dispose?e.dispose():e.dispatchEvent({type:"dispose"}),this._drawable=null}this.disposeCompareMaterial(),this.removeFromParent()}get displayMaterial(){return this._compareMaterial??this._material}syncCompareMaterial(){let e=this._compareMaterial;if(this._compareMaterial=null,!this._compareEnabled){this.applyMaterialToDrawables(this._material),e?.dispose();return}let t=this.createCompareMaterial(this._material,this._compareBaseColor);this._compareMaterial=t,this.applyMaterialToDrawables(t),e?.dispose()}createCompareMaterial(e,t){if(e instanceof wr){let i=new wr({color:t,linewidth:e.linewidth,worldUnits:e.worldUnits,dashed:e.dashed,dashSize:e.dashSize,gapSize:e.gapSize});return i.resolution=e.resolution,i.depthTest=e.depthTest,i.transparent=e.transparent,i.opacity=e.opacity,i}let n=cr.cloneMaterial(e);return cr.setMaterialColor(n,new $e(t)),n}disposeCompareMaterial(){this._compareMaterial&&(this._compareMaterial.dispose(),this._compareMaterial=null)}applyMaterialToDrawables(e){this._drawable&&(this._drawable.material=e),this._raycastScratch.material=e;for(let t of this._line2Objects)t&&(t.material=e)}isAlive(e){return e>=0&&e<this._count&&this._alive[e]===1}ensureCapacity(e){if(this.kind==="line2"&&this._alive==null&&(this._capacity=ab,this._alive=new Uint8Array(this._capacity),this._bboxOnly=new Uint8Array(this._capacity),this._cpuRelative=new Float32Array(this._capacity*16)),e<=this._capacity)return;let t=Math.max(this._capacity,ab);for(;t<e;)t*=2;let n=new Uint8Array(t),i=new Uint8Array(t);if(n.set(this._alive),i.set(this._bboxOnly),this._alive=n,this._bboxOnly=i,this._cpuRelative){let s=new Float32Array(t*16);s.set(this._cpuRelative),this._cpuRelative=s}if(this._capacity=t,!this._drawable)return;let o=this._drawable.instanceMatrix,a=new fc(new Float32Array(t*16),16);a.setUsage(oE),a.array.set(o.array),this._drawable.instanceMatrix=a}writeRelative(e,t){var n;Tq.makeTranslation(-this._origin.x,-this._origin.y,-this._origin.z),Rf.multiplyMatrices(Tq,t),this._cpuRelative&&Rf.toArray(this._cpuRelative,e*16);let i=(n=this._drawable)==null?void 0:n.instanceMatrix;i&&(Rf.toArray(i.array,e*16),i.needsUpdate=!0)}readRelative(e,t){var n;let i=this._hiddenMatrices.get(e);if(i)return t.fromArray(i);if(this._cpuRelative)return t.fromArray(this._cpuRelative,e*16);let o=(n=this._drawable)==null?void 0:n.instanceMatrix;return o&&t.fromArray(o.array,e*16),t}composeLocalMatrix(e,t){return this.readRelative(e,Rf),kq.makeTranslation(this._origin.x,this._origin.y,this._origin.z),t.multiplyMatrices(kq,Rf)}composeFullMatrix(e,t){return this.readRelative(e,Rf),this._drawable?(this._drawable.updateWorldMatrix(!0,!1),t.multiplyMatrices(this._drawable.matrixWorld,Rf)):(this.composeLocalMatrix(e,Iq),this.updateWorldMatrix(!0,!1),t.multiplyMatrices(this.matrixWorld,Iq))}createLine2(e){this.composeLocalMatrix(e,$a);let t=new li(this._geometry,this.displayMaterial);return t.matrix.copy($a),t.matrixAutoUpdate=!1,t.matrixWorldNeedsUpdate=!0,t.frustumCulled=!1,en(t).sharesTemplateGeometry=!0,this.add(t),t}syncHighlight(e){if(this.removeHighlight(e),!this.getVisibleAt(e))return;let t=this._selected.has(e),n=this._hovered.has(e);if(!t&&!n)return;this.composeLocalMatrix(e,$a);let i=this.createDrawable(this._geometry,this._material);i.matrix.copy($a),i.matrixAutoUpdate=!1,i.renderOrder=1e4,i.raycast=()=>{};let o=i.material;o&&!Array.isArray(o)&&(i.material=o.clone(),cr.setMaterialColor(i.material,t?$_:GC)),en(i).sharesTemplateGeometry=!0,this.add(i),this._highlights.set(e,i)}removeHighlight(e){let t=this._highlights.get(e);t&&(this.disposeOverlay(t),this._highlights.delete(e))}disposeOverlay(e){"material"in e&&e.material instanceof mo&&e.material.dispose(),"geometry"in e&&(e.geometry=null),e.removeFromParent()}createInstanced(e,t,n){if(this.kind==="mesh"){let o=new Dw(e,t,n);return o.count=0,o.frustumCulled=!1,o}let i=this.kind==="points"?new go(e,t):new qn(e,t);return i.isInstancedMesh=!0,i.instanceMatrix=new fc(new Float32Array(n*16),16),i.instanceMatrix.setUsage(oE),i.instanceColor=null,i.morphTexture=null,i.count=0,i.frustumCulled=!1,i}createDrawable(e,t){return this.kind==="mesh"?new jt(e,t):this.kind==="points"?new go(e,t):this.kind==="line2"?new li(e,t):new qn(e,t)}},ECe=new U;function CCe(r,e){let t=r.elements,n=Math.hypot(t[0],t[1],t[2]),i=Math.hypot(t[4],t[5],t[6]),o=Math.hypot(t[8],t[9],t[10]);if(n+i+o===0){e.set(1,1,1);return}e.set(n,i,o)}var TC=()=>0;function uZ(r){TC=r}function gd(r,e){(Jn(e).drawOrder??0)>=0&&(r.z+=TC())}var nh=class Vr extends Zn{constructor(){super(),this._unbatchedSelectedIds=new Set,this._unbatchedHoveredIds=new Set,this._compareRoles=new Map,this._compareEnabled=!1,this._compareBaseColor=10265519,this._compareDeletedColor=14753096,this._compareAddedColor=2278750,this._compareModifiedColor=16096779,this._pointBatches=new Map,this._pointSymbolBatches=new Map,this._lineBatches=new Map,this._lineWithIndexBatches=new Map,this._line2Batches=new Map,this._meshBatches=new Map,this._meshWithIndexBatches=new Map,this._entitiesMap=new Map,this._originBatchById=new Map,this._sharedBatchById=new Map,this._sharedGeometryBatches=new Map,this._ownedSharedGeometries=new Map,this._unbatchedEntities=new Map,this._unbatchedObjects=new Zn,this._selectedObjects=e5(new Zn),this._hoverObjects=e5(new Zn),this._compareOverlay=e5(new Zn),this._compareOverlay.name="CompareOverlay",this._compareOverlay.renderOrder=1e4,this.add(this._unbatchedObjects),this.add(this._selectedObjects),this.add(this._hoverObjects),this.add(this._compareOverlay)}get entityCount(){return this._entitiesMap.size}get stats(){let e=this.getUnbatchedStats(),t={summary:{entityCount:this._entitiesMap.size,totalGeometrySize:0,totalMappingSize:0},mesh:{indexed:{count:this.countBatchContainers(this._meshWithIndexBatches),geometrySize:this.getBatchedGeometrySize(this._meshWithIndexBatches),mappingSize:this.getBatchedGeometryMappingSize(this._meshWithIndexBatches)},nonIndexed:{count:this.countBatchContainers(this._meshBatches),geometrySize:this.getBatchedGeometrySize(this._meshBatches),mappingSize:this.getBatchedGeometryMappingSize(this._meshBatches)}},line:{indexed:{count:this.countBatchContainers(this._lineWithIndexBatches),geometrySize:this.getBatchedGeometrySize(this._lineWithIndexBatches),mappingSize:this.getBatchedGeometryMappingSize(this._lineWithIndexBatches)},nonIndexed:{count:this.countBatchContainers(this._lineBatches)+this.countBatchContainers(this._line2Batches),geometrySize:this.getBatchedGeometrySize(this._lineBatches)+this.getBatchedGeometrySize(this._line2Batches),mappingSize:this.getBatchedGeometryMappingSize(this._lineBatches)+this.getBatchedGeometryMappingSize(this._line2Batches)}},point:{indexed:{count:this.countBatchContainers(this._pointSymbolBatches),geometrySize:this.getBatchedGeometrySize(this._pointSymbolBatches),mappingSize:this.getBatchedGeometryMappingSize(this._pointSymbolBatches)},nonIndexed:{count:this.countBatchContainers(this._pointBatches),geometrySize:this.getBatchedGeometrySize(this._pointBatches),mappingSize:this.getBatchedGeometryMappingSize(this._pointBatches)}},unbatched:e};return t.summary.totalGeometrySize=t.line.indexed.geometrySize+t.line.nonIndexed.geometrySize+t.mesh.indexed.geometrySize+t.mesh.nonIndexed.geometrySize+t.point.indexed.geometrySize+t.point.nonIndexed.geometrySize+t.unbatched.geometrySize,t.summary.totalMappingSize=t.line.indexed.mappingSize+t.line.nonIndexed.mappingSize+t.mesh.indexed.mappingSize+t.mesh.nonIndexed.mappingSize+t.point.indexed.mappingSize+t.point.nonIndexed.mappingSize,t}rerenderPoints(e,t=0){let n=B_.instance.create(e,{x:0,y:0,z:0},t);n.line&&this._pointSymbolBatches.forEach(o=>{o.forEach(a=>{a.resetGeometry(e,t)})});let i=n.point!=null;this._pointBatches.forEach(o=>{o.forEach(a=>{a.visible=i})})}collectPointObjectWorldBoxes(e=new Map){let t=new Ne,n=i=>{i.updateMatrixWorld(!0);for(let o=0;o<i.geometryCount;o++){let a;try{a=i.getGeometryAt(o)}catch{continue}if(!a.objectId||a.vertexCount<=0||!i.getBoundingBoxAt(o,t))continue;t.applyMatrix4(i.matrixWorld);let s=e.get(a.objectId);s?s.union(t):e.set(a.objectId,t.clone())}};return this._pointSymbolBatches.forEach(i=>{i.forEach(n)}),this._pointBatches.forEach(i=>{i.forEach(n)}),e}computeBoundingBox(e=new Ne,t){e.makeEmpty();let n=new Ne,i=o=>{o.forEach(a=>{a.forEach(s=>{s.unionActiveVisibleBoundingBoxInto(e,t)})})};return i(this._lineBatches),i(this._lineWithIndexBatches),i(this._line2Batches),i(this._meshBatches),i(this._meshWithIndexBatches),i(this._pointBatches),i(this._pointSymbolBatches),this._sharedGeometryBatches.forEach(o=>{o.forEach(a=>a.unionActiveVisibleBoundingBoxInto(e,t))}),this._unbatchedEntities.forEach((o,a)=>{var s;if(!((s=t?.excludeObjectIds)!=null&&s.has(a))&&!(t!=null&&t.includeObjectIds&&!t.includeObjectIds.has(a)))for(let l of o)l.visible!==!1&&this.unionUnbatchedObjectBounds(l,e,n)}),e}clear(){return this.groups.forEach(e=>{e.forEach(t=>{t.forEach(n=>{n.dispose(),n.removeFromParent()})}),e.clear()}),this.clearHighlightGroup(this._selectedObjects),this.clearHighlightGroup(this._hoverObjects),this.clearHighlightGroup(this._compareOverlay),this._sharedGeometryBatches.forEach(e=>{e.forEach(t=>t.disposeSharedInstances())}),this._sharedGeometryBatches.clear(),this._sharedBatchById.clear(),this._ownedSharedGeometries.forEach(e=>e.dispose()),this._ownedSharedGeometries.clear(),this._originBatchById.clear(),this._unbatchedObjects.children.forEach(e=>{this.disposeObject(e)}),this._unbatchedObjects.clear(),this._unbatchedEntities.clear(),this._unbatchedSelectedIds.clear(),this._unbatchedHoveredIds.clear(),this._entitiesMap.clear(),this}updateMaterial(e,t){for(let n of this.groups){let i=n.get(e);if(i){for(let o of i)o.material=this.createOwnedBatchMaterial(t),o instanceof i5?o.ensureLineDistanceAttribute():o instanceof vC&&o.ensureDashDistances();if(t.id!==e){n.delete(e);let o=n.get(t.id);o?o.push(...i):n.set(t.id,i)}}}this.rebindSharedGeometryMaterial(e,t),this._unbatchedObjects.traverse(n=>{if(!("material"in n))return;let i=en(n);if(i.styleMaterialId===e){let o=n;o.material=t,i.styleMaterialId=t.id,this.ensureUnbatchedLineDistance(o,t)}})}syncAppearanceFromRecord(e,t,n,i,o,a){this.rebindBatchedMaterialsForLayer(e,t,o,a),this._unbatchedObjects.traverse(s=>{let l=s.refreshTextMaterials;if(typeof l=="function"&&l.call(s,t),!("material"in s))return;let c=s;i&&FEe(c,n),this.rebindUnbatchedDrawableMaterial(c,e,t,o,a)}),a&&this.rematerializeLayerTextDrawables(e,a,t)}rebindMaterialsForLayer(e,t,n,i){this.rebindBatchedMaterialsForLayer(e,t,n,i),this._unbatchedObjects.traverse(o=>{"material"in o&&this.rebindUnbatchedDrawableMaterial(o,e,t,n,i)})}rebindBatchedMaterialsForLayer(e,t,n,i){var o;let a=new Map;for(let s of this.groups)for(let l of[...s.keys()]){let c=s.get(l),u=(o=c?.[0])==null?void 0:o.material;if(!u||a.has(l)||!gC(u,e,e))continue;let h=this.resolveLayerBoundMaterial(u,e,t,n,i,e);if(h){if(h===u){for(let d of c)this.refreshLayerBoundMaterialColor(d.material,t,i);continue}a.set(l,h),this.updateMaterial(l,h)}}}rebindUnbatchedDrawableMaterial(e,t,n,i,o){let a=e.userData.layerName??t,s=en(e),l=h=>{if(!gC(h,t,a))return h;let d=this.resolveLayerBoundMaterial(h,t,n,i,o,a);return d?d===h?(this.refreshLayerBoundMaterialColor(h,n,o),h):d:h},c=e.material;if(Array.isArray(c)){e.material=c.map(l),jf(s,e.material),this.ensureUnbatchedLineDistance(e,e.material);return}let u=l(c);u!==c&&(e.material=u,jf(s,u)),this.ensureUnbatchedLineDistance(e,e.material)}ensureUnbatchedLineDistance(e,t){if(PC(e)){At.ensureLineDistance(e.geometry,t);return}if(!t5(e))return;let n=Array.isArray(t)?t[0]:t;n&&n.dashed===!0&&!e.geometry.getAttribute("instanceDistanceStart")&&e.computeLineDistances()}rematerializeLayerTextDrawables(e,t,n){var i;for(let o of this._unbatchedObjects.children){let a=en(o).textEntityTraits;a==null||a.layer!==e||Ka.rematerializeTextHierarchy(o,Ka.cloneEntityTraits(a),t)}if(n!=null&&n.color)for(let o of this.groups)for(let a of[...o.keys()]){let s=o.get(a),l=(i=s?.[0])==null?void 0:i.material;!l||!gC(l,e,e)||this.refreshLayerBoundMaterialColor(l,n,t)}}resolveLayerBoundMaterial(e,t,n,i,o,a){let s=i(e,t,n);if(s)return s;if(o)return this.resolveLayerBoundReplacement(e,t,o,a??t)}resolveLayerBoundReplacement(e,t,n,i){if(!gC(e,t,i))return;let o=Jn(e),a=Lc.createDefaultTraits();return a.layer=t,a.color.setByLayer(),a.drawOrder=o.drawOrder??0,o.drawOrder===0&&o.isForeground!==!0?n.getMTextFillMaterial(a):n.getLineMaterial(a,!0)}refreshLayerBoundMaterialColor(e,t,n){var i,o;if(Jn(e).isByLayerColor!==!0)return;let a=((i=t.color)==null?void 0:i.isForeground)===!0;if(bd(e,{isForeground:a}),a&&!n)return;let s=a&&n?Ta(n.currentBackgroundColor):(o=t.color)==null?void 0:o.RGB;typeof s!="number"||this.getMaterialDisplayRgb(e)===s||cr.setMaterialColor(e,new $e(s))}getMaterialDisplayRgb(e){var t,n;if(e instanceof _i||e instanceof Fi)return e.color.getHex();let i=(n=(t=e.uniforms)==null?void 0:t.u_color)==null?void 0:n.value;if(i instanceof $e)return i.getHex()}hasEntity(e){return this._entitiesMap.has(e)||this._unbatchedEntities.has(e)}forEachEntitySlot(e,t){let n=this._entitiesMap.get(e);if(n!=null){if(!Array.isArray(n)){t(n);return}for(let i=0,o=n.length;i<o;i++)if(t(n[i])===!0)return}}appendEntitySlot(e,t){let n=this._entitiesMap.get(e);n==null?this._entitiesMap.set(e,t):Array.isArray(n)?n.push(t):this._entitiesMap.set(e,[n,t])}setEntityVisible(e,t){let n=this._unbatchedEntities.get(e);return!this._entitiesMap.has(e)&&!n?!1:(this.forEachEntitySlot(e,i=>{let o=this.getOriginBatch(i.batchedObjectId);o?.setVisibleAt(i.batchId,t)}),n?.forEach(i=>{i.visible=t}),t||(this.unselect(e),this.unhover(e)),!0)}getEntityVisible(e){let t=this._unbatchedEntities.get(e),n=this._entitiesMap.has(e);if(!n&&!t)return;let i,o=0;if(n){let a=!0;this.forEachEntitySlot(e,s=>(o++,this.getBatchItemVisible(s)?!1:(a=!1,!0))),o>0&&(i=a)}if(t&&t.length>0){let a=t.some(s=>s.visible);i=(i===void 0||i)&&a}return i}addEntity(e){if(e.visible===!1)return;let t=String(e.objectId??""),n=e.visible,i=[],o=this._unbatchedEntities.get(t)??[],a=!1,s=e.styleManager;e.updateMatrixWorld(!0);let l=c=>{if(!Jq(c))return;let u=en(c),h=!!u.bboxIntersectionCheck;if(u.noBatch){let p=this.cloneUnbatchedObject(c);p.visible=n&&c.visible;let f=p.material,m=Array.isArray(f)?f[0]:f;if(m&&(Jn(m).drawOrder??0)>=0){let g=TC();g!==0&&(p.matrix.elements[14]+=g,p.matrixWorld.elements[14]+=g)}en(p).bboxIntersectionCheck=h,this._unbatchedObjects.add(p),o.push(p),a=!0;return}let d=this.tryAddSharedDrawable(c,t,h);if(d)i.push(d),this.applyBatchSlotVisibility(d,n&&c.visible);else if(t5(c)){let p=this.addLine2(c,{objectId:t,bboxIntersectionCheck:h});p&&(i.push(p),this.applyBatchSlotVisibility(p,n&&c.visible));return}else if(PC(c)){let p=this.addLine(c,{position:u.position,objectId:t,bboxIntersectionCheck:h});p&&(i.push(p),this.applyBatchSlotVisibility(p,n&&c.visible))}else if(f5(c)){let p=this.addMesh(c,{objectId:t,bboxIntersectionCheck:h},s);p&&(i.push(p),this.applyBatchSlotVisibility(p,n&&c.visible))}else if(m5(c)){let p=this.addPoint(c,{objectId:t,bboxIntersectionCheck:h});p&&(i.push(p),this.applyBatchSlotVisibility(p,n&&c.visible))}for(let p of c.children)l(p)};if(l(e),i.length===0)this._entitiesMap.has(t)||this._entitiesMap.set(t,null);else for(let c=0;c<i.length;c++)this.appendEntitySlot(t,i[c]);a&&this._unbatchedEntities.set(t,o),this.syncCompareRoleForEntity(t)}syncCompareRoleForEntity(e){if(!this._compareEnabled)return;let t=this._compareRoles.get(e)??null;this.applyCompareRoleToEntity(e,t),this.refreshUnbatchedCompareMaterial(e),this.rebindCompareOverlaySharedBuffers(),this.syncCompareOverlayForEntity(e)}appendLineGeometry(e,t,n,i){if(i.visible===!1)return!1;gd(n,t);let o=e.getIndex()!==null?this._lineWithIndexBatches:this._lineBatches,a=this.resolveOriginBatch(o,t.id,n,()=>new i5(Vr.INITIAL_LINE_VERTEX_CAPACITY,Vr.INITIAL_LINE_INDEX_CAPACITY,this.createOwnedBatchMaterial(t)));e.hasAttribute("lineDistance")&&At.recomputeLineDistanceForLineSegments(e);let s=a.addGeometry(e,-1,-1,n);a.setGeometryInfo(s,{objectId:i.objectId});let l={batchedObjectId:a.id,batchId:s};return this.registerDirectAppend(i.objectId,l,!0),!0}appendLine2Geometry(e,t,n,i){if(i.visible===!1)return!1;gd(n,t);let o=this.resolveOriginBatch(this._line2Batches,t.id,n,()=>new vC(Vr.INITIAL_LINE_VERTEX_CAPACITY,this.createOwnedBatchMaterial(t))),a=o.addGeometry(e,-1,n);o.setGeometryInfo(a,{objectId:i.objectId});let s={batchedObjectId:o.id,batchId:a};return this.registerDirectAppend(i.objectId,s,!0),!0}appendPointGeometry(e,t,n,i){if(i.visible===!1)return!1;gd(n,t);let o=this.resolveOriginBatch(this._pointBatches,t.id,n,()=>new Cq(Vr.INITIAL_POINT_VERTEX_CAPACITY,this.createOwnedBatchMaterial(t))),a=o.addGeometry(e,-1,n);o.setGeometryInfo(a,{objectId:i.objectId,bboxIntersectionCheck:!0,position:i.position});let s={batchedObjectId:o.id,batchId:a};return this.registerDirectAppend(i.objectId,s,!0),!0}appendMeshGeometry(e,t,n,i){if(i.visible===!1)return!1;gd(n,t);let o=e.getIndex()!==null?this._meshWithIndexBatches:this._meshBatches,a=this.resolveOriginBatch(o,t.id,n,()=>{let c=Jn(t).drawOrder??0,u=new Pq(Vr.INITIAL_MESH_VERTEX_CAPACITY,Vr.INITIAL_MESH_INDEX_CAPACITY,this.createOwnedBatchMaterial(t));return u.renderOrder=c,u}),s=a.addGeometry(e,-1,-1,n);a.setGeometryInfo(s,{objectId:i.objectId});let l={batchedObjectId:a.id,batchId:s};return this.registerDirectAppend(i.objectId,l,!0),!0}registerDirectAppend(e,t,n){e=String(e),this.appendEntitySlot(e,t),this.applyBatchSlotVisibility(t,n),this.syncCompareRoleForEntity(e)}removeEntity(e){let t=!1,n=!1;if(this._entitiesMap.has(e)){let o=new Map;this.forEachEntitySlot(e,a=>{let s=this.getOriginBatch(a.batchedObjectId);s&&(s.deleteGeometry(a.batchId),o.set(a.batchedObjectId,s),t=!0)}),o.forEach(a=>a.optimize()),n=o.size>0,this.unselect(e),this.unhover(e),this._entitiesMap.delete(e)}let i=this._unbatchedEntities.get(e);return i&&(this.unselect(e),this.unhover(e),i.forEach(o=>{this.disposeObject(o),this._unbatchedObjects.remove(o)}),this._unbatchedEntities.delete(e),t=!0),this._compareEnabled&&(n?this.refreshCompareOverlay():this.removeCompareOverlayForEntity(e)),t}isIntersectWith(e,t){let n=[],i=!1;if(this.forEachEntitySlot(e,a=>{let s=this.getOriginBatch(a.batchedObjectId);return s&&(s.intersectWith(a.batchId,t,n),n.length>0)?(i=!0,!0):!1}),i)return!0;let o=this._unbatchedEntities.get(e);if(o){for(let a=0;a<o.length;a++)if(this.isUnbatchedDrawableIntersecting(o[a],t))return!0}return!1}hover(e){this.setEntityHighlight([e],"hover",!0)}unhover(e){this.setEntityHighlight([e],"hover",!1)}select(e){this.setEntityHighlight([e],"select",!0)}unselect(e){this.setEntityHighlight([e],"select",!1)}hoverMany(e){this.setEntityHighlight(e,"hover",!0)}unhoverMany(e){this.setEntityHighlight(e,"hover",!1)}selectMany(e){this.setEntityHighlight(e,"select",!0)}unselectMany(e){this.setEntityHighlight(e,"select",!1)}setCompareDisplay(e){var t,n,i;if(this._compareEnabled=e.enabled,e.baseColor!=null&&(this._compareBaseColor=e.baseColor),((t=e.colors)==null?void 0:t.deleted)!=null&&(this._compareDeletedColor=e.colors.deleted),((n=e.colors)==null?void 0:n.added)!=null&&(this._compareAddedColor=e.colors.added),((i=e.colors)==null?void 0:i.modified)!=null&&(this._compareModifiedColor=e.colors.modified),e.overrides){this._compareRoles.clear();for(let o of e.overrides)o.role!=null&&this._compareRoles.set(String(o.objectId),o.role)}e.enabled||this._compareRoles.clear(),this.applyCompareDisplayToBatches(),this.refreshCompareOverlay(),this.refreshAllUnbatchedCompareMaterials()}clearCompareDisplay(){this.setCompareDisplay({enabled:!1,overrides:[]})}setEntityCompareRole(e,t){let n=String(e);t==null?this._compareRoles.delete(n):this._compareRoles.set(n,t),this.applyCompareRoleToEntity(n,t),this.refreshUnbatchedCompareMaterial(n),this.syncCompareOverlayForEntity(n)}applyCompareDisplayToBatches(){let e={enabled:this._compareEnabled,baseColor:this._compareBaseColor,deletedColor:this._compareDeletedColor,addedColor:this._compareAddedColor,modifiedColor:this._compareModifiedColor};for(let t of this.groups)t.forEach(n=>{n.forEach(i=>{i.setCompareDisplayColors(e),i.applyPackedCompareRoles(this._compareRoles)})});this._sharedGeometryBatches.forEach(t=>{t.forEach(n=>n.setCompareDisplayColors(e))})}applyCompareRoleToEntity(e,t){let n=new Set;this.forEachEntitySlot(e,i=>{let o=this.getOriginBatch(i.batchedObjectId);o!=null&&o.setCompareRoleAt(i.batchId,t)&&n.add(o)}),n.forEach(i=>i.flushHighlightMask())}refreshAllUnbatchedCompareMaterials(){this._unbatchedEntities.forEach((e,t)=>{this.refreshUnbatchedCompareMaterial(t)})}refreshUnbatchedCompareMaterial(e){let t=this._unbatchedEntities.get(e);if(t){if(this._unbatchedSelectedIds.has(e)||this._unbatchedHoveredIds.has(e)){this.refreshUnbatchedHighlight(t[0],e);for(let n of t)this.refreshUnbatchedHighlight(n,e);return}for(let n of t){if(!this._compareEnabled){this.unhighlightUnbatchedObject(n);continue}let i=this._compareRoles.get(e),o=this.resolveCompareColor(i);this.applyUnbatchedCompareMaterial(n,o)}}}resolveCompareColor(e){return e==="deleted"?this._compareDeletedColor:e==="added"?this._compareAddedColor:e==="modified"?this._compareModifiedColor:this._compareBaseColor}applyUnbatchedCompareMaterial(e,t){if("material"in e){let n=e.material,i=qa(e);i.originalMaterial==null&&(i.originalMaterial=n);let o=i.originalMaterial??n;e.material=this.getSharedCompareMaterial(o,t);return}for(let n of e.children)this.applyUnbatchedCompareMaterial(n,t)}getSharedCompareMaterial(e,t){if(Array.isArray(e))return e.map(s=>this.getSharedCompareMaterial(s,t));let n=`compare-${t}`,i=Vr.sharedHighlightMaterialsBySource.get(e);i||(i=new Map,Vr.sharedHighlightMaterialsBySource.set(e,i),e.addEventListener("dispose",Vr.onSourceMaterialDisposed));let o=i.get(n);if(o)return o;let a=cr.cloneMaterial(e);return Array.isArray(a)||(cr.setMaterialColor(a,new $e(t)),i.set(n,a)),a}setEntityHighlight(e,t,n){if(e.length===0)return;let i=new Set;for(let o of e){this.forEachEntitySlot(o,s=>{let l=this.getOriginBatch(s.batchedObjectId);l&&l.setHighlightAt(s.batchId,t,n)&&i.add(l)});let a=this._unbatchedEntities.get(o);if(a){t==="select"?n?this._unbatchedSelectedIds.add(o):this._unbatchedSelectedIds.delete(o):n?this._unbatchedHoveredIds.add(o):this._unbatchedHoveredIds.delete(o);for(let s of a)this.refreshUnbatchedHighlight(s,o);n||this.refreshUnbatchedCompareMaterial(o)}}i.forEach(o=>o.flushHighlightMask())}refreshUnbatchedHighlight(e,t){if(this._unbatchedSelectedIds.has(t)){this.applyUnbatchedHighlightMaterial(e,"select");return}if(this._unbatchedHoveredIds.has(t)){this.applyUnbatchedHighlightMaterial(e,"hover");return}this.unhighlightUnbatchedObject(e)}applyUnbatchedHighlightMaterial(e,t){if("material"in e){let n=e.material,i=qa(e);i.originalMaterial==null&&(i.originalMaterial=n),e.material=this.getSharedHighlightMaterial(n,t);return}for(let n of e.children)this.applyUnbatchedHighlightMaterial(n,t)}unhighlightUnbatchedObject(e){if("material"in e){let t=qa(e);t.originalMaterial!=null&&(e.material=t.originalMaterial,delete t.originalMaterial);return}for(let t of e.children)this.unhighlightUnbatchedObject(t)}getSharedHighlightMaterial(e,t){if(Array.isArray(e))return e.map(a=>this.getSharedHighlightMaterial(a,t));let n=Vr.sharedHighlightMaterialsBySource.get(e);n||(n=new Map,Vr.sharedHighlightMaterialsBySource.set(e,n),e.addEventListener("dispose",Vr.onSourceMaterialDisposed));let i=n.get(t);if(i)return i;let o=cr.cloneMaterial(e);return Array.isArray(o)||(cr.setMaterialColor(o,t==="hover"?GC:$_),n.set(t,o)),o}static releaseSharedHighlightMaterials(e){let t=Vr.sharedHighlightMaterialsBySource.get(e);t&&(t.forEach(n=>n.dispose()),Vr.sharedHighlightMaterialsBySource.delete(e))}createPreviewSubset(e,t){if(e.length===0)return null;let n=t?.maxSlots??1e4,i=t?.missingEntity??"fail",o=new Zn;o.name="PreviewSubset",o.userData.previewSubsetGroup=!0;let a=0;for(let s of e){if(a>=n)return hb(o),null;let l=this.appendEntityOverlayDrawables(s,o,{maxSlots:n-a,mode:"preview",previewStyle:t?.style??"normal"});if(l===0){if(i==="skip")continue;return hb(o),null}a+=l}return a>0?o:null}get groups(){return[this._lineBatches,this._lineWithIndexBatches,this._line2Batches,this._meshBatches,this._meshWithIndexBatches,this._pointBatches,this._pointSymbolBatches]}unhighlight(e,t){if(t===this._selectedObjects){this.unselect(e);return}t===this._hoverObjects&&this.unhover(e)}appendEntityOverlayDrawables(e,t,n){let i=0,o=s=>{if(n.mode==="highlight"){this.applyHighlightMaterial(s);return}if(n.mode==="compare"){this.applyCompareOverlayMaterial(s,n.compareColor??2278750);return}this.applyPreviewMaterial(s,n.previewStyle??"normal")};i<n.maxSlots&&this.forEachEntitySlot(e,s=>{if(i>=n.maxSlots)return!0;let l=this.getOriginBatch(s.batchedObjectId);if(!l||!this.hasBatchObjectAt(l))return!1;let c=l.getObjectAt(s.batchId);this.copyHighlightMetadata(l,c),o(c);let u=O_(c);return u.objectId=e,u.batchedObjectId=s.batchedObjectId,u.disposeGeometryOnRemove=l instanceof vC,u.previewDrawable=n.mode==="preview",c.renderOrder=t.renderOrder,t.add(c),i++,!1});let a=this._unbatchedEntities.get(e);if(a&&i<n.maxSlots){let s=Math.min(a.length,n.maxSlots-i);for(let l=0;l<s;l++){let c=a[l],u=c.clone();this.copyHighlightMetadata(c,u),o(u);let h=O_(u);h.objectId=e,h.previewDrawable=n.mode==="preview",u.renderOrder=t.renderOrder,t.add(u),i++}}return i}hasBatchObjectAt(e){return typeof e.getObjectAt=="function"}applyPreviewMaterial(e,t){this.hasMaterial(e)&&(e.material=cr.cloneMaterial(e.material)),e.children.forEach(n=>this.applyPreviewMaterial(n,t))}applyHighlightMaterial(e){if(this.hasMaterial(e)){let t=cr.cloneMaterial(e.material);cr.setMaterialColor(t),e.material=t}e.children.forEach(t=>this.applyHighlightMaterial(t))}applyCompareOverlayMaterial(e,t){let n=i=>{if(i instanceof li){let o=i.material,a=new wr({color:t,linewidth:o.linewidth,worldUnits:o.worldUnits,dashed:!1});a.resolution.copy(o.resolution),a.depthTest=!0,a.polygonOffset=!0,a.polygonOffsetFactor=-2,a.polygonOffsetUnits=-2,i.material=a}else if(i instanceof qn||i instanceof Ni)i.material=new Fi({color:t,depthTest:!0,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});else if(i instanceof jt)i.material=new _i({color:t,side:Si,depthTest:!0,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});else if(i instanceof go){let o=i.material;i.material=new tf({color:t,size:o.size,sizeAttenuation:o.sizeAttenuation,depthTest:!0})}i.children.forEach(o=>n(o))};n(e)}rebindCompareOverlaySharedBuffers(){if(this._compareOverlay.children.length!==0)for(let e of this._compareOverlay.children){let t=O_(e);if(t.batchedObjectId==null||t.disposeGeometryOnRemove)continue;let n=this.getOriginBatch(t.batchedObjectId),i=this.getDrawableGeometry(e);n==null||i==null||n instanceof CC||i.attributes!==n.geometry.attributes&&(i.index=n.geometry.index,i.attributes=n.geometry.attributes)}}refreshCompareOverlay(){this.clearHighlightGroup(this._compareOverlay),this._compareEnabled&&this._compareRoles.forEach((e,t)=>{this.appendEntityOverlayDrawables(t,this._compareOverlay,{maxSlots:1e4,mode:"compare",compareColor:this.resolveCompareColor(e)})})}syncCompareOverlayForEntity(e){if(this.removeCompareOverlayForEntity(e),!this._compareEnabled)return;let t=this._compareRoles.get(e);t!=null&&this.appendEntityOverlayDrawables(e,this._compareOverlay,{maxSlots:1e4,mode:"compare",compareColor:this.resolveCompareColor(t)})}removeCompareOverlayForEntity(e){let t=this._compareOverlay.children.filter(n=>O_(n).objectId===e);t.forEach(n=>this.disposeHighlightObject(n)),t.forEach(n=>n.removeFromParent())}getOriginBatch(e){return this._originBatchById.get(e)??this._sharedBatchById.get(e)}copyHighlightMetadata(e,t){qq(e,t)}applyBatchSlotVisibility(e,t){let n=this.getOriginBatch(e.batchedObjectId);n?.setVisibleAt(e.batchId,t)}getBatchItemVisible(e){let t=this.getOriginBatch(e.batchedObjectId);return t?.getVisibleAt(e.batchId)??!1}tryAddSharedDrawable(e,t,n){var i;if(en(e).sharesTemplateGeometry!==!0||!this.hasGeometry(e)||!this.hasMaterial(e))return null;let o=e.material;if(Array.isArray(o))return null;let a=this.sharedGeometryKind(e);if(!a)return null;let s=e.geometry;if(!((i=s.getAttribute("position"))!=null&&i.count)||(e.updateWorldMatrix(!0,!1),this.mustBakeSharedDrawable(e,a,s)))return null;let l=e.matrixWorld.clone();(Jn(o).drawOrder??0)>=0&&(l.elements[14]+=TC());let c=new U().setFromMatrixPosition(l),u=this.resolveSharedGeometryBatch(s,o,a,c),h=u.addInstance(l,t,n);return{batchedObjectId:u.id,batchId:h}}mustBakeSharedDrawable(e,t,n){let i=e.material;if(Array.isArray(i)||t==="mesh"&&e.matrixWorld.determinant()<0)return!0;if(!(t==="line2"?i.dashed===!0:n.getAttribute("lineDistance")!=null))return!1;let o=LCe(e.matrixWorld);return o==null||Math.abs(o-1)>1e-4}sharedGeometryKind(e){return t5(e)?"line2":PC(e)?"line":f5(e)?"mesh":m5(e)?"points":null}resolveSharedGeometryBatch(e,t,n,i){let o=`${n}:${e.uuid}:${t.id}`,a=this._sharedGeometryBatches.get(o);a||(a=[],this._sharedGeometryBatches.set(o,a));let s,l=1/0;for(let h of a){if(!d5(h.origin,i))continue;let d=h5(h.origin,i);d<l&&(l=d,s=h)}if(s)return s;let c=this._ownedSharedGeometries.get(e.uuid);c||(c=e.clone(),this._ownedSharedGeometries.set(e.uuid,c));let u=new CC(c,t,i,n,e.uuid);return this._compareEnabled&&u.setCompareDisplayColors({enabled:!0,baseColor:this._compareBaseColor,deletedColor:this._compareDeletedColor,addedColor:this._compareAddedColor,modifiedColor:this._compareModifiedColor}),a.push(u),this._sharedBatchById.set(u.id,u),this.add(u),u}rebindSharedGeometryMaterial(e,t){let n=[];for(let[i,o]of this._sharedGeometryBatches){let a=[];for(let s of o){if(s.materialId!==e){a.push(s);continue}s.material=t,n.push(s)}a.length===0?this._sharedGeometryBatches.delete(i):a.length!==o.length&&this._sharedGeometryBatches.set(i,a)}for(let i of n){let o=`${i.kind}:${i.sourceUuid}:${t.id}`,a=this._sharedGeometryBatches.get(o);a?a.push(i):this._sharedGeometryBatches.set(o,[i])}}addLine(e,t){let n=e.material,i=this.getMatchedLineBatches(e),o=new U().setFromMatrixPosition(e.matrixWorld);gd(o,n);let a=this.resolveOriginBatch(i,n.id,o,()=>new i5(Vr.INITIAL_LINE_VERTEX_CAPACITY,Vr.INITIAL_LINE_INDEX_CAPACITY,this.createOwnedBatchMaterial(n))),s=e.geometry.clone(),l=e.matrixWorld.clone();if(l.setPosition(0,0,0),!At.safeApplyMatrix4(s,l,2))return s.dispose(),null;s.hasAttribute("lineDistance")&&At.recomputeLineDistanceForLineSegments(s);let c=a.addGeometry(s,-1,-1,o);return a.setGeometryInfo(c,t),s.dispose(),{batchedObjectId:a.id,batchId:c}}addLine2(e,t){let n=e.material,i=new U().setFromMatrixPosition(e.matrixWorld);gd(i,n);let o=this.resolveOriginBatch(this._line2Batches,n.id,i,()=>new vC(Vr.INITIAL_LINE_VERTEX_CAPACITY,this.createOwnedBatchMaterial(n))),a=e.matrixWorld.clone();a.setPosition(0,0,0);let s=this.cloneLineSegments2Geometry(e,a);if(!s)return null;let l=o.addGeometry(s,-1,i);return o.setGeometryInfo(l,t),s.dispose(),{batchedObjectId:o.id,batchId:l}}addMesh(e,t,n){let i=e.material;e.matrixWorld.determinant()<0&&(i=n.getBackSideVariant(i),e.material=i);let o=this.getMatchedMeshBatches(e),a=new U().setFromMatrixPosition(e.matrixWorld);gd(a,i);let s=this.resolveOriginBatch(o,i.id,a,()=>{let h=Jn(i).drawOrder??0,d=new Pq(Vr.INITIAL_MESH_VERTEX_CAPACITY,Vr.INITIAL_MESH_INDEX_CAPACITY,this.createOwnedBatchMaterial(i));return d.renderOrder=h,d}),l=e.geometry.clone(),c=e.matrixWorld.clone();if(c.setPosition(0,0,0),!At.safeApplyMatrix4(l,c,3))return l.dispose(),null;let u=s.addGeometry(l,-1,-1,a);return s.setGeometryInfo(u,t),l.dispose(),{batchedObjectId:s.id,batchId:u}}addPoint(e,t){let n=e.material,i=new U().setFromMatrixPosition(e.matrixWorld);gd(i,n);let o=this.resolveOriginBatch(this._pointBatches,n.id,i,()=>{let c=new Cq(Vr.INITIAL_POINT_VERTEX_CAPACITY,this.createOwnedBatchMaterial(n));return c.visible=e.visible,c}),a=e.geometry.clone(),s=e.matrixWorld.clone();if(s.setPosition(0,0,0),!At.safeApplyMatrix4(a,s,2))return a.dispose(),null;let l=o.addGeometry(a,-1,i);return o.setGeometryInfo(l,t),a.dispose(),{batchedObjectId:o.id,batchId:l}}resolveOriginBatch(e,t,n,i){let o=e.get(t);o==null&&(o=[],e.set(t,o));let a,s=1/0;for(let c of o){if(!d5(c.origin,n))continue;let u=c.origin;if(u==null)return c;let h=h5(u,n);h<s&&(s=h,a=c)}if(a)return this.ensureBatchHighlightRenderer(a),a;let l=i();return this._compareEnabled&&l.setCompareDisplayColors({enabled:!0,baseColor:this._compareBaseColor,deletedColor:this._compareDeletedColor,addedColor:this._compareAddedColor,modifiedColor:this._compareModifiedColor}),o.push(l),this._originBatchById.set(l.id,l),this.add(l),this.ensureBatchHighlightRenderer(l),l}repaintForegroundMaterials(e){let t=new $e(e),n=i=>{Jn(i).isForeground===!0&&cr.setMaterialColor(i,t)};for(let i of this.groups)i.forEach(o=>{o.forEach(a=>{let s=a.material;Array.isArray(s)?s.forEach(n):s&&n(s)})});this._unbatchedObjects.traverse(i=>{if(!("material"in i))return;let o=i.material;Array.isArray(o)?o.forEach(n):o&&n(o)})}repaintBackgroundMaterials(e){let t=new $e(e),n=i=>{Jn(i).isBackgroundFill===!0&&cr.setMaterialColor(i,t)};for(let i of this.groups)i.forEach(o=>{o.forEach(a=>{let s=a.material;Array.isArray(s)?s.forEach(n):s&&n(s)})});this._unbatchedObjects.traverse(i=>{if(!("material"in i))return;let o=i.material;Array.isArray(o)?o.forEach(n):o&&n(o)})}createOwnedBatchMaterial(e){let t=cr.cloneMaterial(e);return bd(t,{...Jn(e)}),t}ensureBatchHighlightRenderer(e){let t=e._highlightState;t&&sb(e,t)}countBatchContainers(e){let t=0;return e.forEach(n=>{t+=n.length}),t}getBatchedGeometrySize(e){let t=0;return e.forEach(n=>{n.forEach(i=>{t+=this.getGeometrySize(i)})}),t}getBatchedGeometryMappingSize(e){let t=0;return e.forEach(n=>{n.forEach(i=>{t+=i.mappingStats.size})}),t}getMatchedLineBatches(e){if(en(e).isPoint)return this._pointSymbolBatches;{let t=e.geometry.getIndex()!==null,n=this._lineBatches;return t&&(n=this._lineWithIndexBatches),n}}getMatchedMeshBatches(e){let t=e.geometry.getIndex()!==null,n=this._meshBatches;return t&&(n=this._meshWithIndexBatches),n}getGeometrySize(e){let t=new Set,n=0;if(this.hasGeometry(e)){let i=e.geometry;if(Object.keys(i.attributes).forEach(o=>{let a=i.attributes[o],s=this.getAttributeArray(a);s&&!t.has(s.buffer)&&(n+=s.byteLength,t.add(s.buffer))}),i.index){let o=i.index.array;t.has(o.buffer)||(n+=o.byteLength,t.add(o.buffer))}}return n}getUnbatchedStats(){let e={count:0,geometrySize:0,byType:{line:0,mesh:0,point:0,other:0}};return this._unbatchedObjects.children.forEach(t=>{e.count+=1,e.geometrySize+=this.getGeometrySize(t),this.isLineObject(t)?e.byType.line+=1:t instanceof jt?e.byType.mesh+=1:t instanceof go?e.byType.point+=1:e.byType.other+=1}),e}cloneUnbatchedObject(e){if(this.shouldCloneUnbatchedSubtree(e))return this.cloneUnbatchedSubtree(e);let t=e.clone();if(this.copyWorldMatrixOntoClone(e,t),this.hasMaterial(e)&&this.hasMaterial(t)){let n=e.material,i=this.materialHasTextureMap(n);i?(t.material=this.cloneUnbatchedTexturedMaterial(n),this.hasGeometry(e)&&this.hasGeometry(t)&&(t.geometry=e.geometry.clone())):t.material=n;let o=en(e),a=en(t);a.styleMaterialId=o.styleMaterialId??this.getMaterialId(e.material),a.bboxIntersectionCheck=o.bboxIntersectionCheck,a.sharesTemplateGeometry=i?!1:o.sharesTemplateGeometry,a.bakedWorldMatrix=e.matrixWorld.toArray(),o.textEntityTraits&&(a.textEntityTraits=Ka.cloneEntityTraits(o.textEntityTraits))}return this.finalizeUnbatchedLineClone(t),t}materialHasTextureMap(e){return Array.isArray(e)?e.some(t=>this.materialHasTextureMap(t)):!!e.map}cloneUnbatchedTexturedMaterial(e){if(Array.isArray(e))return e.map(i=>this.cloneUnbatchedTexturedMaterial(i));let t=e.clone(),n=e.map;if(n){let i=n.clone();i.needsUpdate=!0,t.map=i}return t}finalizeUnbatchedLineClone(e){if(!this.isLineObject(e))return;e.frustumCulled=!1;let t=this.getDrawableGeometry(e);t&&(At.safeComputeBoundingBox(t),At.safeComputeBoundingSphere(t))}getDrawableGeometry(e){if(e instanceof li||e instanceof jt||e instanceof qn||e instanceof Ni||e instanceof go)return e.geometry}shouldCloneUnbatchedSubtree(e){return e.children.length>0&&!this.hasGeometry(e)}cloneUnbatchedSubtree(e){let t=e.clone(!0);this.copyWorldMatrixOntoClone(e,t);let n=en(e),i=en(t);return i.bboxIntersectionCheck=n.bboxIntersectionCheck,i.bakedWorldMatrix=e.matrixWorld.toArray(),n.textEntityTraits&&(i.textEntityTraits=Ka.cloneEntityTraits(n.textEntityTraits)),t.traverse(o=>{if(!this.hasMaterial(o))return;let a=en(o);a.styleMaterialId==null&&(a.styleMaterialId=this.getMaterialId(o.material))}),t}copyWorldMatrixOntoClone(e,t){e.updateMatrixWorld(!0),t.matrixAutoUpdate=!1,t.matrix.copy(e.matrixWorld),t.matrixWorld.copy(e.matrixWorld),t.matrixWorldNeedsUpdate=!1}cloneLineSegments2Geometry(e,t){let n=e.geometry,i=n.getAttribute("instanceStart"),o=n.getAttribute("instanceEnd"),a=i.count,s=[];for(let c=0;c<a;c++)yd.fromBufferAttribute(i,c).applyMatrix4(t),Bf.fromBufferAttribute(o,c).applyMatrix4(t),!(!Number.isFinite(yd.x)||!Number.isFinite(yd.y)||!Number.isFinite(yd.z)||!Number.isFinite(Bf.x)||!Number.isFinite(Bf.y)||!Number.isFinite(Bf.z))&&s.push(yd.x,yd.y,yd.z,Bf.x,Bf.y,Bf.z);if(s.length<6)return null;let l=new Ai;return l.setPositions(new Float32Array(s)),n.hasAttribute("instanceColorStart")&&(l.setAttribute("instanceColorStart",n.getAttribute("instanceColorStart").clone()),l.setAttribute("instanceColorEnd",n.getAttribute("instanceColorEnd").clone())),At.safeComputeBoundingBox(l),At.safeComputeBoundingSphere(l),l}disposeObject(e){e.removeFromParent(),this.hasGeometry(e)&&!en(e).sharesTemplateGeometry&&e.geometry.dispose(),e.children.forEach(t=>this.disposeObject(t))}clearHighlightGroup(e){[...e.children].forEach(t=>this.disposeHighlightObject(t)),e.clear()}disposeHighlightObject(e){Y5(e)}unionUnbatchedObjectBounds(e,t,n){let i=this.getDrawableGeometry(e);if(i){if(At.safeComputeBoundingBox(i),!i.boundingBox)return;n.copy(i.boundingBox).applyMatrix4(e.matrixWorld),t.union(n);return}for(let o of e.children)o.visible!==!1&&this.unionUnbatchedObjectBounds(o,t,n)}isUnbatchedDrawableIntersecting(e,t){return en(e).bboxIntersectionCheck?this.isUnbatchedBboxIntersecting(e,t):t.intersectObject(e,!0).length>0}isUnbatchedBboxIntersecting(e,t){e.updateMatrixWorld(!0),I_.makeEmpty();let n=this.getDrawableGeometry(e);if(n){if(At.safeComputeBoundingBox(n),!n.boundingBox)return!1;I_.copy(n.boundingBox).applyMatrix4(e.matrixWorld)}else if(this.unionUnbatchedObjectBounds(e,I_,OCe),I_.isEmpty())return!1;return t.ray.intersectBox(I_,yd)!==null}hasMaterial(e){return"material"in e}hasGeometry(e){return"geometry"in e}getAttributeArray(e){return"array"in e&&e.array?e.array:"data"in e&&e.data&&e.data.array?e.data.array:null}isLineObject(e){return e instanceof Ni?!0:!!e.isLineSegments2}getMaterialId(e){var t;return Array.isArray(e)?((t=e[0])==null?void 0:t.id)??-1:e.id}};nh.INITIAL_LINE_VERTEX_CAPACITY=128,nh.INITIAL_LINE_INDEX_CAPACITY=256,nh.INITIAL_MESH_VERTEX_CAPACITY=128,nh.INITIAL_MESH_INDEX_CAPACITY=256,nh.INITIAL_POINT_VERTEX_CAPACITY=16,nh.sharedHighlightMaterialsBySource=new WeakMap,nh.onSourceMaterialDisposed=r=>{nh.releaseSharedHighlightMaterials(r.target)};var hZ=nh;function hb(r){Y5(r)}function Y5(r){for(let e of[...r.children])Y5(e);TCe(r)}function TCe(r){if(kCe(r)){let e=r.material;Array.isArray(e)?e.forEach(t=>t.dispose()):e.dispose()}ICe(r)&&O_(r).disposeGeometryOnRemove&&r.geometry.dispose()}function kCe(r){return"material"in r&&r.material!=null}function ICe(r){return"geometry"in r&&r.geometry!=null}function LCe(r){let e=r.elements,t=Math.hypot(e[0],e[1],e[2]),n=Math.hypot(e[4],e[5],e[6]),i=Math.hypot(e[8],e[9],e[10]),o=Math.max(t,n,i),a=Math.min(t,n,i);return o===0||(o-a)/o>1e-4?null:t}var yd=new U,Bf=new U,I_=new Ne,OCe=new Ne,kC=class{constructor(e){this.unsupportedTextStyles={},this._styleManager=e}getMeshBasicMaterial(e){let t=Lc.createTraitsForMText(e,this._styleManager.currentBackgroundColor),{layerColor:n,layerColorRgb:i}=this.resolveLayerSwatch(e);return this._styleManager.getMTextFillMaterial(t,void 0,n,i)}getLineBasicMaterial(e){let t=Lc.createTraitsForMText(e,this._styleManager.currentBackgroundColor),{layerColor:n,layerColorRgb:i}=this.resolveLayerSwatch(e);return this._styleManager.getLineMaterial(t,!0,void 0,n,i)}resolveLayerSwatch(e){if(e.color.aci!==256)return{};let t=e.byLayerColor;return typeof t!="number"?{}:{layerColor:new je().setRGBValue(t),layerColorRgb:t}}},dZ=class Nf{constructor(){this._rendererLoadedFonts=new Set}static getInstance(){return Nf._instance||(Nf._instance=new Nf),Nf._instance}overrideStyleManager(e){if(this._styleManager=e,this._renderer){let t=new kC(e);this._renderer.setStyleManager(t)}}setFontUrl(e){this._fontUrl=e,this.applyFontUrl()}setRenderMode(e){this._renderMode=e,this._renderer&&(this._renderer.setDefaultMode(e),this.applyFontUrl())}getRenderMode(){return this._renderMode??"worker"}async setDefaultFonts(e){this._defaultFonts=e,await this.applyDefaultFonts()}async setLazyFontLoading(e){this._lazyFontLoading=e,et.instance.lazyFontLoading=e,await this.applyLazyFontLoading()}async setAwaitFontsBeforeDraw(e){this._awaitFontsBeforeDraw=e,et.instance.awaitFontsBeforeDraw=e,await this.applyAwaitFontsBeforeDraw()}async loadFonts(e,t){if(this.ensureRendererCreated(),!this._renderer||e.length===0)return[];let n=e.filter(i=>{let o=Lq(i);return!!o&&!this._rendererLoadedFonts.has(o)});if(n.length===0)return[];await this._renderer.loadFonts(n,t);for(let i of n){let o=Lq(i);o&&this._rendererLoadedFonts.add(o)}return n}getRendererLoadedFontCount(){return this._rendererLoadedFonts.size}async replaceMissedFonts(e){if(this._renderer){await this._renderer.replaceMissedFonts(e);return}et.instance.replaceMissedFonts(e)}async clearMissedFonts(){await this.replaceMissedFonts({})}async asyncRenderMText(e,t,n=ci()){if(!this._renderer)throw new Error("AcTrMTextRenderer not initialized!");return await this._renderer.asyncRenderMText(e,t,n)}syncRenderMText(e,t,n=ci()){if(this.ensureRendererCreated(),!this._renderer)throw new Error("AcTrMTextRenderer not initialized!");return this._renderer.syncRenderMText(e,t,n)}async asyncRenderShape(e,t,n=ci()){if(!this._renderer)throw new Error("AcTrMTextRenderer not initialized!");return this._renderer.asyncRenderShape(e,t,n)}syncRenderShape(e,t,n=ci()){if(this.ensureRendererCreated(),!this._renderer)throw new Error("AcTrMTextRenderer not initialized!");return this._renderer.syncRenderShape(e,t,n)}initialize(e){e!==void 0&&(this._workerUrl=e),this._renderer&&(this._renderer.destroy(),this._renderer=void 0),this._rendererLoadedFonts.clear();let t=this._renderMode??"worker",n=this._workerUrl?{workerUrl:this._workerUrl}:{};if(t==="worker"){if(!this._workerUrl)throw new Error("AcTrMTextRenderer worker URL is required for worker render mode");this._renderer=new kf("worker",n)}else this._renderer=new kf("main",n);if(this._renderMode&&this._renderer.setDefaultMode(this._renderMode),this.applyFontUrl(),this.applyDefaultFonts(),this.applyLazyFontLoading(),this.applyAwaitFontsBeforeDraw(),this._styleManager){let i=new kC(this._styleManager);this._renderer.setStyleManager(i)}}async estimateMemoryUsage(){if(this._renderer)return this._renderer.estimateMemoryUsage();let e=et.instance.estimateMemoryUsage({id:"main"});return{collectedAt:Date.now(),totalEstimatedBytes:e.totalEstimatedBytes,mainThread:e,workers:[],indexedDbFontCache:{fontCount:0,totalBytes:0,fonts:[]}}}dispose(){this._renderer&&(this._renderer.destroy(),this._renderer=void 0),this._rendererLoadedFonts.clear(),this._workerUrl=void 0,this._renderMode=void 0,this._defaultFonts=void 0,this._lazyFontLoading=void 0,this._awaitFontsBeforeDraw=void 0}static resetInstance(){Nf.getInstance().dispose(),Nf._instance=null}ensureRendererCreated(){!this._renderer&&this._workerUrl&&this.initialize(this._workerUrl)}async applyFontUrl(){this._renderer&&this._fontUrl&&await this._renderer.setFontUrl(this._fontUrl)}async applyDefaultFonts(){this._renderer&&this._defaultFonts!==void 0&&await this._renderer.setDefaultFonts(this._defaultFonts)}async applyLazyFontLoading(){this._renderer&&this._lazyFontLoading!==void 0&&await this._renderer.setLazyFontLoading(this._lazyFontLoading)}async applyAwaitFontsBeforeDraw(){this._renderer&&this._awaitFontsBeforeDraw!==void 0&&await this._renderer.setAwaitFontsBeforeDraw(this._awaitFontsBeforeDraw)}};dZ._instance=null;var Yo=dZ;function Lq(r){if(r==null)return"";let e=String(r).trim();if(!e)return"";let t=e.lastIndexOf(".");return t>0&&(t===e.length-4||t===e.length-5)&&(e=e.substring(0,t)),e.toLowerCase()}var IC=class extends $n{constructor(e){super(),this._context=e}get renderContext(){return this._context}get styleManager(){return this._context.styleManager}copy(e,t){return this._context=e._context,super.copy(e,t)}},Wn=class r extends IC{constructor(e){super(e),this._wcsBbox=new Ne}get batchDrawPolicy(){return this.renderContext.batchDrawPolicy}resolveDrawMode(){return"batch"}get wcsBbox(){return this._wcsBbox}set wcsBbox(e){this._wcsBbox.copy(e)}get basePoint(){return this._basePoint}set basePoint(e){e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new k(e)}get objectId(){return this.userData.objectId}set objectId(e){this.userData.objectId=e}get ownerId(){return this.userData.ownerId}set ownerId(e){this.userData.ownerId=e}get layerName(){return this.userData.layerName}set layerName(e){this.userData.layerName=e}static flattenObject(e){let t=[];function n(o,a){o.matrixAutoUpdate=!1,o.matrix.copy(a),o.matrixWorldNeedsUpdate=!0}function i(o,a){let s=o.children;o.children=[];for(let l of s){let c=qa(o),u=qa(l);if(c.layerName)if(!u.layerName)u.layerName=c.layerName;else{let h=Kq(u.layerName,c.layerName);h!==u.layerName&&(u.layerName==="0"&&(u.authoredLayerName="0"),u.layerName=h)}l.children.length>0?i(l,a):(l.visible=Jq(l),t.push({object:l,relativeMatrix:a.clone().multiply(l.matrixWorld)})),l.parent=null}}e.updateMatrixWorld(!0),i(e,e.matrixWorld.clone().invert());for(let o of t){let{object:a,relativeMatrix:s}=o;n(a,s),e.add(a)}e.updateMatrixWorld(!0)}static disposeObject(e,t=!0){t&&e.removeFromParent();let n=en(e).sharesTemplateGeometry===!0;(e instanceof jt||e instanceof Ni||e instanceof go)&&e.geometry&&!n&&e.geometry.dispose(),!n&&(e instanceof jt||e instanceof Ni||e instanceof go)&&(Array.isArray(e.material)?e.material:[e.material]).forEach(i=>{var o,a,s,l,c,u,h,d;i.dispose(),(o=i.map)==null||o.dispose(),(a=i.envMap)==null||a.dispose(),(s=i.lightMap)==null||s.dispose(),(l=i.bumpMap)==null||l.dispose(),(c=i.normalMap)==null||c.dispose(),(u=i.roughnessMap)==null||u.dispose(),(h=i.metalnessMap)==null||h.dispose(),(d=i.alphaMap)==null||d.dispose()}),e.children.forEach(i=>this.disposeObject(i)),"geometry"in e&&(e.geometry=null),"material"in e&&(e.material=null),e.children=[]}flatten(){r.flattenObject(this)}markDrawableUnbatched(e){en(e).noBatch=!0}markUnbatchedLeaves(){this.traverse(e=>{!("geometry"in e)||!("material"in e)||!(e.geometry instanceof ot)||this.markDrawableUnbatched(e)})}finalizeLeafDrawables(){this.resolveDrawMode()==="unbatch"&&this.markUnbatchedLeaves()}dispose(){r.disposeObject(this)}async asyncDraw(){}syncDraw(){}hasDrawableGeometry(){return this.children.length>0}get childCount(){return this.children.length}addChild(e){this.add(e)}applyMatrix(e){let t=Vf.createMatrix4(e);this.applyFullMatrix4(t),this._wcsBbox.isEmpty()||this._wcsBbox.applyMatrix4(t)}applyFullMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.multiplyMatrices(e,this.matrix),this.matrixAutoUpdate=!1,this.matrixWorldNeedsUpdate=!0,this.updateMatrixWorld(!0)}highlight(){this.highlightObject(this)}highlightObject(e){if("material"in e){let t=e.material,n=qa(e);if(n.originalMaterial==null){let i=cr.cloneMaterial(t);cr.setMaterialColor(i),n.originalMaterial=t,e.material=i}}else e.children.length>0&&e.children.forEach(t=>{this.highlightObject(t)})}unhighlight(){this.unhighlightObject(this)}fastDeepClone(e=!1){let t=new r(this.renderContext);return t.copy(this,!1),this.copyGeometry(this,t,e),t}copy(e,t){return this.objectId=e.objectId,this.ownerId=e.ownerId,this.layerName=e.layerName,this.wcsBbox=e.wcsBbox,super.copy(e,t)}copyGeometry(e,t,n=!1){for(let i=0;i<e.children.length;i++){let o=e.children[i];if(o instanceof r){t.add(o.fastDeepClone(n));continue}let a=o.clone(!1);"geometry"in a&&(n?en(a).sharesTemplateGeometry=!0:a.geometry=a.geometry.clone()),t.add(a)}}unhighlightObject(e){if("material"in e){let t=e.material,n=qa(e);e.material=n.originalMaterial,delete n.originalMaterial,Array.isArray(t)?t.forEach(i=>i.dispose()):t instanceof mo&&t.dispose()}else e.children.length>0&&e.children.forEach(t=>{this.unhighlightObject(t)})}createColorArray(e,t){let n=(e>>16&255)/256,i=(e>>8&255)/256,o=(e&255)/256,a=new Float32Array(t*3);for(let s=0,l=0;s<t;s++)a[l]=n,a[l+1]=i,a[l+2]=o,l+=3;return a}},Oq=new Ne,o5=new U,DCe=new vt,Dq=new vt,Ff=new Ne,Rq=new vt,$o=class extends Wn{constructor(e,t,n){var i,o;super(e),this._style=n,this._entityTraits=Ka.snapshotEntityTraits(t);let a=t.layer?(o=(i=e.database)==null?void 0:i.tables.layerTable.getAt(t.layer))==null?void 0:o.color:void 0;this._colorSettings=Ka.buildColorSettingsFromTraits(t,e.styleManager.currentBackgroundColor,a)}refreshTextMaterials(e){if(this._colorSettings=Ka.buildColorSettingsFromTraits({...Lc.createDefaultTraits(),color:this._entityTraits.color,layer:this._entityTraits.layer},this.renderContext.styleManager.currentBackgroundColor),e!=null&&e.color&&this._entityTraits.color.isByLayer){let t=e.color.RGB;typeof t=="number"&&(this._colorSettings.byLayerColor=t)}Ka.rematerializeTextHierarchy(this,this._entityTraits,this.renderContext.styleManager)}get glyphStyleShareKey(){return`${this.colorShareToken()}\0${this.contentShareKey()}`}contentShareKey(){return this.constructor.name}colorShareToken(){let e=this._entityTraits.color;return e.isByLayer?`L:${this._entityTraits.layer??""}`:e.isByBlock?"B":`C:${e.colorIndex??""}:${e.RGB??""}`}syncDraw(){let e=Yo.getInstance();if(e)try{this._rendered=this.renderSync(e),this.attachRendered(this._rendered)}catch(t){kt.info(`Failed to render ${this.describeRenderFailure()} with the following error:
  4038. `,t)}}async asyncDraw(){let e=Yo.getInstance();if(e)try{this.clearRenderedGeometry(),this._rendered=await this.renderAsync(e),this.attachRendered(this._rendered)}catch(t){kt.info(`Failed to render ${this.describeRenderFailure()} with the following error:
  4039. `,t)}}clearRenderedGeometry(){for(this._rendered&&(this._rendered.removeFromParent(),this._rendered.traverse(e=>{let t=e;t.geometry&&!en(t).sharesTemplateGeometry&&t.geometry.dispose()}),this._rendered=void 0);this.children.length>0;){let e=this.children[0];this.remove(e),e.traverse(t=>{let n=t;n.geometry&&!en(n).sharesTemplateGeometry&&n.geometry.dispose()})}}adoptSharedGeometryFrom(e){for(;this.children.length>0;)this.remove(this.children[0]);this._rendered=void 0,this.copyGeometry(e,this,!0),this.traverse(i=>{en(i).bboxIntersectionCheck=!0}),this.updateMatrixWorld(!0);let t=new Ne,n=new Ne;this.traverse(i=>{if(i===this)return;let o=i;if(!o.geometry)return;let a=At.safeComputeBoundingBox(o.geometry);a&&(i.updateMatrixWorld(!0),n.copy(a).applyMatrix4(i.matrixWorld),t.union(n))}),t.isEmpty()||(this.wcsBbox=t)}traitsForClone(){return{...Lc.createDefaultTraits(),color:this._entityTraits.color,layer:this._entityTraits.layer}}copyGlyphIdentity(e){this.copy(e,!1),this._style={...e._style},this._entityTraits={...e._entityTraits},this._colorSettings={...e._colorSettings}}raycast(e,t){var n;let i=t.length;(n=this._rendered)==null||n.raycast(e,t),!(t.length>i||this.wcsBbox.isEmpty())&&(Oq.copy(this.wcsBbox),e.ray.intersectBox(Oq,o5)&&t.push({distance:e.ray.origin.distanceTo(o5),point:o5.clone(),object:this,face:null,faceIndex:void 0,uv:void 0}))}resolveDrawMode(){return this.batchDrawPolicy.resolveDrawMode({position:this.getDrawPosition()})}attachRendered(e){this.add(e),this.collapseInverseParentTransformIntoPlacement(e);let t=p5(e);this.resolveDrawMode()==="unbatch"?(this.markDrawableUnbatched(t),Ka.storeTextEntityTraitsOnDrawable(t,this._entityTraits)):this.flatten(),Ka.rematerializeTextHierarchy(this,this._entityTraits,this.renderContext.styleManager),this.removeInvalidGeometryLeaves(),this.traverse(n=>{en(n).bboxIntersectionCheck=!0}),this.updateSelectionBox(e)}collapseInverseParentTransformIntoPlacement(e){if(this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.equals(DCe))return;let t=p5(e);t.matrixAutoUpdate&&t.updateMatrix(),Dq.copy(this.matrix).multiply(t.matrix),t.matrixAutoUpdate=!1,t.matrix.copy(Dq),t.matrixWorldNeedsUpdate=!0,this.position.set(0,0,0),this.quaternion.identity(),this.scale.set(1,1,1),this.matrix.identity(),this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!0,this.updateMatrixWorld(!0)}updateSelectionBox(e){let t=this.computeGeometryBox();if(Ff.copy(e.box),!Ff.isEmpty()&&this.parent&&(this.parent.updateMatrixWorld(!0),Rq.copy(this.parent.matrixWorld).invert(),Ff.applyMatrix4(Rq)),t.isEmpty()){this.wcsBbox=Ff.clone();return}if(!Ff.isEmpty()&&Ff.intersectsBox(t)){this.wcsBbox=t.clone().union(Ff);return}this.wcsBbox=t}computeGeometryBox(){let e=new Ne,t=new Ne,n=new vt;return this.updateMatrixWorld(!0),this.parent&&n.copy(this.parent.matrixWorld).invert(),this.traverse(i=>{if(!this.hasGeometry(i))return;let o=i.geometry,a=At.safeComputeBoundingBox(o);a!=null&&(i.updateMatrixWorld(!0),t.copy(a).applyMatrix4(i.matrixWorld),this.parent&&t.applyMatrix4(n),e.union(t))}),e}removeInvalidGeometryLeaves(){var e;let t=[];this.traverse(n=>{this.hasGeometry(n)&&(At.hasFinitePositions(n.geometry)||t.push(n))});for(let n of t)(e=n.parent)==null||e.remove(n),this.hasGeometry(n)&&!en(n).sharesTemplateGeometry&&n.geometry.dispose()}hasGeometry(e){return HEe(e)}},U_=class r extends $o{constructor(e,t,n,i,o=!1){super(i,t,{...n}),this._text=e}toPlanViewMTextData(){let e=this._text,t=e.position;return{...e,position:{x:t.x,y:t.y,z:0}}}get linetypeGlyphShareKey(){return[this._text.text,this._text.height,this._style.font??"",this._style.extendedFont??"",this._style.widthFactor??1,this._text.widthFactor??1].join("\0")}contentShareKey(){return this.linetypeGlyphShareKey}getDrawPosition(){let e=this._text.position;return e&&e.x===0&&e.y===0&&e.z===0&&(this.position.x!==0||this.position.y!==0||this.position.z!==0)?{x:this.position.x,y:this.position.y,z:this.position.z}:e}resolveDrawMode(){return this.userData.annotationScale?"unbatch":super.resolveDrawMode()}renderSync(e){return e.syncRenderMText(this.toPlanViewMTextData(),this._style,this._colorSettings)}async renderAsync(e){return await e.asyncRenderMText(this.toPlanViewMTextData(),this._style,this._colorSettings)}attachRendered(e){super.attachRendered(e);let t=this.userData.annotationScale;if(!t)return;let n=p5(e);n.userData.annotationScale=t}describeRenderFailure(){return`mtext '${this._text.text}'`}fastDeepClone(e=!1){let t=new r({...this._text,position:{...this._text.position}},this.traitsForClone(),{...this._style},this.renderContext);return t.copyGlyphIdentity(this),this.copyGeometry(this,t,e),t}},Hf=class r extends $o{constructor(e,t,n,i,o=!1){super(i,t,jEe(e,n,i)),this._shape=e}toRenderableShapeData(){let e=this._shape,{byName:t,byCode:n}=Zq(this._shape);return{...e,name:t,shapeNumber:n}}get linetypeGlyphShareKey(){return[this._shape.name??"",this._shape.shapeNumber??"",this._shape.size,this._style.font??"",this._style.extendedFont??"",this._style.widthFactor??1,this._shape.widthFactor??1].join("\0")}contentShareKey(){return this.linetypeGlyphShareKey}hoistBakedPlacement(){let e=this._shape.position;this.position.set(e?.x??0,e?.y??0,e?.z??0),this.rotation.z=this._shape.rotation??0,this._shape={...this._shape,position:{x:0,y:0,z:0},rotation:0}}getDrawPosition(){let e=this._shape.position;return e&&e.x===0&&e.y===0&&e.z===0&&(this.position.x!==0||this.position.y!==0||this.position.z!==0)?{x:this.position.x,y:this.position.y,z:this.position.z}:e}renderSync(e){return e.syncRenderShape(this.toRenderableShapeData(),this._style,this._colorSettings)}async renderAsync(e){return e.asyncRenderShape(this.toRenderableShapeData(),this._style,this._colorSettings)}describeRenderFailure(){var e;return`shape '${((e=this._shape.name)==null?void 0:e.trim())||String(this._shape.shapeNumber??"")}'`}fastDeepClone(e=!1){let t=new r({...this._shape,position:{...this._shape.position}},this.traitsForClone(),{...this._style},this.renderContext);return t.copyGlyphIdentity(this),this.copyGeometry(this,t,e),t}},Ds=1e-9,RCe=1,BCe=2,FCe=4;function $5(r){let e=r,t=e.elementTypeFlag??0,n=e.shapeNumber,i=(t&-8)===0;return n!=null&&n!==0&&(n&-8)===0&&(t===0||!i&&t>=16)?{...e,elementTypeFlag:n,shapeNumber:t===0?0:t}:e}function pZ(r){return r?.map($5)}function K_(r){let e=r.elementTypeFlag??0;return K5(e)?(r.text??"").length>0:fZ(e)?r.shapeNumber!=null&&r.shapeNumber!==0||!!r.shapeName:!1}function D_(r){let e=pZ(r);return!!(e!=null&&e.some(K_))}function K5(r){return(r&BCe)!==0}function fZ(r){return(r&FCe)!==0}function NCe(r){let e=0;for(let t=1;t<r.length;t++)e+=Math.hypot(r[t].x-r[t-1].x,r[t].y-r[t-1].y);return e}function M5(r,e){if(r.length<2)return null;let t=Math.max(0,e);for(let o=1;o<r.length;o++){let a=r[o].x-r[o-1].x,s=r[o].y-r[o-1].y,l=Math.hypot(a,s);if(!(l<Ds)){if(t<=l+Ds){let c=t/l,u=r[o-1].z??0,h=r[o].z??0;return{x:r[o-1].x+a*c,y:r[o-1].y+s*c,z:u+(h-u)*c,angle:Math.atan2(s,a)}}t-=l}}let n=r[r.length-1],i=r[r.length-2];return{x:n.x,y:n.y,z:n.z??0,angle:Math.atan2(n.y-i.y,n.x-i.x)}}function zCe(r,e,t){if(t<=e+Ds||r.length<2)return[];let n=M5(r,e),i=M5(r,t);if(!n||!i)return[];let o=[{x:n.x,y:n.y,z:n.z}],a=0;for(let s=1;s<r.length;s++){let l=r[s].x-r[s-1].x,c=r[s].y-r[s-1].y,u=Math.hypot(l,c),h=a+u;h>e+Ds&&a<t-Ds&&(a>e+Ds&&o.push({x:r[s-1].x,y:r[s-1].y,z:r[s-1].z??0}),h<t-Ds&&o.push({x:r[s].x,y:r[s].y,z:r[s].z??0})),a=h}return o.push({x:i.x,y:i.y,z:i.z}),o}function UCe(r){return r.offsetX??r.xOffset??0}function jCe(r){return r.offsetY??r.yOffset??0}function VCe(r,e){let t=e.rotation??0;return(e.elementTypeFlag&RCe)!==0?t:GCe(r+t)}function GCe(r){let e=Math.PI*2,t=((r+Math.PI)%e+e)%e-Math.PI;return(t>Math.PI/2||t<-Math.PI/2)&&(t+=Math.PI,t>Math.PI&&(t-=e)),t}function HCe(r,e){let t=e%r.length,n=r[t].len;for(let i=t+1;i<r.length;i++){let o=r[i];if((o.isComplex??K_(o.element))||!o.gap)break;n+=o.len}return n}function WCe(r,e,t){let n=r.map(d=>({x:d.x,y:d.y,z:"z"in d&&typeof d.z=="number"?d.z:0})),i=[],o=[],a=pZ(e)??[],s=NCe(n);if(!(s>Ds)||a.length===0)return n.length>=2&&i.push(n),{strokes:i,placements:o};let l=a.map(d=>{let p=d.elementLength;p===0&&(p=.5);let f=K_(d);return{element:d,len:Math.abs(p)*t,gap:!f&&d.elementLength<0,isComplex:f}}),c=0;for(let d of l)c+=d.len;if(!(c>Ds))return i.push(n),{strokes:i,placements:o};if(s+Ds<c)return i.push(n),{strokes:i,placements:o};let u=0,h=0;for(;u<s-Ds;){let d=l[h%l.length],p=Math.min(d.len,s-u);if(d.isComplex){let f=HCe(l,h%l.length),m=M5(n,u+Math.min(f,s-u)*.5);if(m){let g=VCe(m.angle,d.element),y=K5(d.element.elementTypeFlag),b=y?0:UCe(d.element)*t,v=y?0:jCe(d.element)*t,x=Math.sin(m.angle),w=Math.cos(m.angle);o.push({x:m.x+b*w-v*x,y:m.y+b*x+v*w,z:m.z,angle:g,tangentAngle:m.angle,element:d.element})}}else if(!d.gap&&p>Ds){let f=zCe(n,u,u+p);f.length>=2&&i.push(f)}u+=p,h++}return{strokes:i,placements:o}}var XCe={name:"",standardFlag:0,fixedTextHeight:0,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:0,font:"",bigFont:"",extendedFont:""};function YCe(r,e){var t;let n=r??"";if(n.trim().length>0)return n;let i=(e??"").trim();return i&&((t=i.split(/\s+-\s+/)[0])==null?void 0:t.trim())||n}function $Ce(r,e){let t=e.styleManager.options;return(t.ltscale||1)*(t.celtscale||1)*r.lineTypeScale}var KCe=4096;function qCe(r,e,t){if(r.length<2||e.length===0||!(t>0))return 0;let n=0;for(let o=1;o<r.length;o++)n+=Math.hypot(r[o].x-r[o-1].x,r[o].y-r[o-1].y);if(!(n>0))return 0;let i=0;for(let o of e){let a=o.elementLength===0?.5:Math.abs(o.elementLength);i+=a*t}return i>0?n/i:0}function ZCe(r,e){var t;let n=e.database,i=r.element.styleObjectId;if(n&&i){let a=n.openObjectForRead(i);if(a!=null&&a.textStyle)return{...a.textStyle}}let o=(t=r.element.style)==null?void 0:t.trim();if(n&&o){let a=n.tables.textStyleTable.getAt(o);if(a!=null&&a.textStyle)return{...a.textStyle}}if(n){let a=n.tables.textStyleTable.getAt("Standard");if(a!=null&&a.textStyle)return{...a.textStyle}}return{...XCe}}function JCe(r,e,t,n){let i=r.element.elementTypeFlag,o=Math.max((r.element.scale??.1)*n,1e-6),a=ZCe(r,t);if(K5(i)){let s=YCe(r.element.text,e.lineType.description);if(s.trim().length>0){let l={text:s,height:o,width:0,position:{x:0,y:0,z:0},rotation:0,attachmentPoint:ut.MiddleCenter,widthFactor:a.widthFactor||1},c=new U_(l,e,a,t,!0);return c.position.set(r.x,r.y,r.z),c.rotation.z=r.angle,c}return null}if(fZ(i)){let s={name:r.element.shapeName,shapeNumber:r.element.shapeNumber,size:o,position:{x:r.x,y:r.y,z:r.z},rotation:r.angle,widthFactor:a.widthFactor||1};return new Hf(s,e,a,t,!0)}if(r.element.shapeNumber!=null||r.element.shapeName){let s={name:r.element.shapeName,shapeNumber:r.element.shapeNumber,size:o,position:{x:r.x,y:r.y,z:r.z},rotation:r.angle,widthFactor:a.widthFactor||1};return new Hf(s,e,a,t,!0)}return null}function QCe(r,e,t,n){let i=0;for(let v of e)v.length>=2&&(i+=v.length-1);if(i===0)return;let o=1/0,a=1/0,s=1/0,l=-1/0,c=-1/0,u=-1/0;for(let v of e)for(let x of v){let w=x.z??0;x.x<o&&(o=x.x),x.y<a&&(a=x.y),w<s&&(s=w),x.x>l&&(l=x.x),x.y>c&&(c=x.y),w>u&&(u=w)}let h=(o+l)/2,d=(a+c)/2,p=(s+u)/2;n.expandByPoint(new U(o,a,s)),n.expandByPoint(new U(l,c,u));let f=new Float32Array(i*6),m=0;for(let v of e)for(let x=1;x<v.length;x++){let w=v[x-1],_=v[x];f[m++]=w.x-h,f[m++]=w.y-d,f[m++]=(w.z??0)-p,f[m++]=_.x-h,f[m++]=_.y-d,f[m++]=(_.z??0)-p}let g=new U(h,d,p);if(t instanceof wr){let v=new Ai;v.setPositions(f);let x=new li(v,t);x.position.copy(g),en(x).styleMaterialId=t.id,r.add(x);return}let y=new ot;y.setAttribute("position",new Et(f,3));let b=new qn(y,t);b.position.copy(g),r.add(b)}function mZ(r,e,t,n){let i=t.lineType.pattern;if(!D_(i)||!i||e.length<2)return!1;let o=$Ce(t,n);if(qCe(e,i,o)>KCe)return!1;let a=WCe(e,i,o),s=n.styleManager.getLineMaterial(t,!1,!0),l=new Ne;QCe(r,a.strokes,s,l);for(let c of a.placements){let u=JCe(c,t,n,o);u&&(r.add(u),l.expandByPoint(new U(c.x,c.y,c.z)))}return l.isEmpty()||(r.wcsBbox=l),!0}function gZ(r){let{textGroups:e,others:t}=_Z(r);for(let n of e.values())eTe(n);for(let n of t)n.syncDraw();SZ(r)}async function yZ(r){let{textGroups:e,others:t}=_Z(r),n=[];for(let i of e.values())n.push(tTe(i));for(let i of t)n.push(i.asyncDraw());n.length>0&&await Promise.all(n),SZ(r)}function bZ(r){return r.map(e=>({x:e.position.x,y:e.position.y,z:e.position.z,rz:e.rotation.z}))}function vZ(r,e){r.position.set(e.x,e.y,e.z),r.rotation.set(0,0,e.rz)}function eTe(r){let e=bZ(r),t=r[0];t.position.set(0,0,0),t.rotation.set(0,0,0),t.syncDraw();for(let n=0;n<r.length;n++)vZ(r[n],e[n]),n>0&&r[n].adoptSharedGeometryFrom(t)}async function tTe(r){let e=bZ(r),t=r[0];t.position.set(0,0,0),t.rotation.set(0,0,0),await t.asyncDraw();for(let n=0;n<r.length;n++)vZ(r[n],e[n]),n>0&&r[n].adoptSharedGeometryFrom(t)}function nTe(r){return r.map(e=>({x:e.position.x,y:e.position.y,z:e.position.z,rz:e.rotation.z}))}function xZ(r,e){r.position.set(e.x,e.y,e.z),r.rotation.set(0,0,e.rz)}function wZ(r){if(r[0]instanceof Hf)for(let n of r)n instanceof Hf&&n.hoistBakedPlacement();let e=nTe(r),t=r[0];return t.position.set(0,0,0),t.rotation.set(0,0,0),{placements:e,template:t}}function rTe(r,e,t){for(let n=0;n<r.length;n++)xZ(r[n],e[n]),n>0&&r[n].adoptSharedGeometryFrom(t)}function iTe(r){if(r.length===0)return;let{placements:e,template:t}=wZ(r);t.syncDraw(),rTe(r,e,t)}async function oTe(r){if(r.length===0)return;let{placements:e,template:t}=wZ(r);await t.asyncDraw();let n=performance.now();for(let i=0;i<r.length;i++)xZ(r[i],e[i]),i>0&&r[i].adoptSharedGeometryFrom(t),i>0&&i%64===0&&performance.now()-n>=32&&(await new Promise(o=>setTimeout(o,0)),n=performance.now())}function _Z(r){let e=[];r.traverse(i=>{i!==r&&i instanceof $o&&!i.hasDrawableGeometry()&&e.push(i)});let t=new Map,n=[];for(let i of e)if(i instanceof U_){let o=i.linetypeGlyphShareKey,a=t.get(o);a||(a=[],t.set(o,a)),a.push(i)}else n.push(i);return{textGroups:t,others:n}}function Ic(r){let e=!1;return r.traverse(t=>{t instanceof $o&&!t.hasDrawableGeometry()&&(e=!0)}),e}function SZ(r){let e=new Ne,t=new Ne;r.updateMatrixWorld(!0),r.traverse(n=>{if(n===r)return;let i=n;if(!i.geometry)return;let o=At.safeComputeBoundingBox(i.geometry);o&&(n.updateMatrixWorld(!0),t.copy(o).applyMatrix4(n.matrixWorld),e.union(t))}),e.isEmpty()||(r.wcsBbox=e)}function Bq(r,e){return r.x===e.x&&r.y===e.y}function wC(r,e,t){let n=(e.x-r.x)*(t.y-r.y)-(e.y-r.y)*(t.x-r.x);return n>0?1:n<0?-1:0}function aTe(r,e,t,n){return wC(r,e,t)!==wC(r,e,n)&&wC(t,n,r)!==wC(t,n,e)}function AZ(r){let e=[];for(let t of r)!Number.isFinite(t.x)||!Number.isFinite(t.y)||e.length>0&&Bq(e[e.length-1],t)||e.push(t);for(;e.length>1&&Bq(e[0],e[e.length-1]);)e.pop();return e}function sTe(r){let e=AZ(r),t=e.length;if(t<4)return!1;for(let n=0;n<t;n++){let i=e[n],o=e[(n+1)%t];for(let a=n+1;a<t;a++){if((a+1)%t===n||a===(n+1)%t)continue;let s=e[a],l=e[(a+1)%t];if(aTe(i,o,s,l))return!0}}return!1}function lTe(r){let e=r[0];if(e&&typeof e.relativeEps=="function")return Math.min(e.relativeEps(),1e-6);let t=Math.max(...r.flatMap(n=>[Math.abs(n.x),Math.abs(n.y)]),1);return Math.min(t*1e-9,1e-6)}function Fq(r){let e=AZ(r);if(e.length<3||!sTe(e))return[e.map(n=>new Z(n.x,n.y))];let t=lTe(e);try{let n=new ib(new rb(t)),i=n.polygon(n.segments({regions:[e.map(o=>[o.x,o.y])],inverted:!1})).regions.filter(o=>o.length>=3).map(o=>o.map(a=>new Z(a[0],a[1])));if(i.length>0)return i;kt.warn("PolyBool hatch loop repair produced no regions")}catch(n){kt.warn(`PolyBool hatch loop repair failed: ${n}, epsilon=${t}`)}return[e.map(n=>new Z(n.x,n.y))]}function a5(r){return r.filter(e=>Number.isFinite(e.x)&&Number.isFinite(e.y)).map(e=>new Le(e.x,e.y))}function cTe(r,e){for(let t of r)if(!(!Number.isFinite(t.x)||!Number.isFinite(t.y)))return Rn.isPointInPolygon(t,e,!0);return!1}function uTe(r){if(!r)return!1;let e=r.getAttribute("position");return!!e&&e.count>0}function hTe(r){let e=new Ne,t=!1;for(let n of r)for(let i of n)!Number.isFinite(i.x)||!Number.isFinite(i.y)||(e.expandByPoint(pTe.set(i.x,i.y,0)),t=!0);if(!(!t||e.isEmpty()))return e.getCenter(new U)}function dTe(r,e){return r.map(t=>t.map(n=>new Z(n.x-e.x,n.y-e.y)))}var pTe=new U,LC=class extends Wn{constructor(e,t,n){super(n),this._traits=t;let i=ao({context:n}),o=e.tessellate(i),a=Object.create(e,{tessellate:{value:()=>o}}).buildHierarchy(i),s=o.some(d=>d.length>=3),l=hTe(o),c=l?dTe(o,l):o,u=[];this.buildHatchGeometry(c,a,u);let h;if(u.length===1?h=u[0]:u.length>1&&(h=lC(u)??void 0),h&&uTe(h)){let d=At.safeComputeBoundingBox(h);if(!d){kt.warn("Skipped hatch fill with invalid geometry coordinates"),h.dispose();return}this.wcsBbox=l?d.clone().translate(l):d,this.addGradientPositionAttribute(h,t);let p={minX:this.wcsBbox.min.x,minY:this.wcsBbox.min.y,maxX:this.wcsBbox.max.x,maxY:this.wcsBbox.max.y},f=l?new Le(l.x,l.y):void 0,m=this.styleManager.getFillMaterial(t,f,p),g=new jt(h,m);l&&g.position.set(l.x,l.y,l.z),this.add(g),this.finalizeLeafDrawables()}else s&&kt.warn("Failed to convert hatch boundaries!")}resolveDrawMode(){return this.isPatternedHatch(this._traits)?"unbatch":this.batchDrawPolicy.resolveDrawMode({anchor:Y_(this.wcsBbox)})}isPatternedHatch(e){var t;let n=e.fillType;return!n.gradient&&!!((t=n.definitionLines)!=null&&t.length)}addGradientPositionAttribute(e,t){if(!t.fillType.gradient||!e.boundingBox)return;let n=e.getAttribute("position");if(!n)return;let i=e.boundingBox,o=(i.min.x+i.max.x)*.5,a=(i.min.y+i.max.y)*.5,s=Math.max((i.max.x-i.min.x)*.5,1e-9),l=Math.max((i.max.y-i.min.y)*.5,1e-9),c=new Float32Array(n.count*2);for(let u=0;u<n.count;u++)c[u*2]=(n.getX(u)-o)/s,c[u*2+1]=(n.getY(u)-a)/l;e.setAttribute("gradientPosition",new Et(c,2))}buildHatchGeometry(e,t,n){if(t.children.length===0)return;let i=[],o=new Map;t.children.forEach(s=>{s.children.length===0?i.push(s.index):o.set(s.index,s.children.map(l=>l.index))});let a=s=>{try{let l=new Jh(s);if(!At.hasFinitePositions(l)){l.dispose();return}l.hasAttribute("uv")&&l.deleteAttribute("uv"),l.hasAttribute("normal")&&l.deleteAttribute("normal"),n.push(l)}catch{kt.warn(`Triangulate shape error: ${s.getPoints().map(l=>l.toArray()).toString()}`)}};i.forEach(s=>{let l=e[s];if(!(l.length<3))for(let c of Fq(l))c.length<3||a(new Vo(a5(c)))});for(let s of o){let l=e[s[0]];if(l.length<3)continue;let c=this.buildMergedHolePaths(e,s[1]),u=Fq(l);for(let h of u){if(h.length<3)continue;let d=new Vo(a5(h));for(let p of c)p.length<3||cTe(p,h)&&d.holes.push(new Zh(a5(p)));a(d)}}t.children.forEach(s=>{s.children.forEach(l=>{this.buildHatchGeometry(e,l,n)})})}buildMergedHolePaths(e,t){let n=[],i=s=>s.map(l=>l.toArray()),o=this.findIntersectHole(e,t);o.forEach(s=>{let l=s.filter(h=>e[h].length>=3),c=1e-6,u=!1;try{if(l.length!==0)if(l.length===1)n.push(e[l[0]]),u=!0;else{c=Math.min(...l.map(f=>e[f][0].relativeEps()),1e-6);let h=new ib(new rb(c)),d=h.segments({regions:[i(e[l[0]])],inverted:!1});for(let f=1;f<l.length;f++){let m=h.segments({regions:[i(e[l[f]])],inverted:!1});d=h.selectUnion(h.combine(d,m))}let p=h.polygon(d);p.regions.length>0?(p.regions.forEach(f=>{f.length!==0&&n.push(f.map(m=>new Z(m[0],m[1])))}),u=!0):kt.warn("mergedHoles.regions is empty!")}}catch(h){kt.warn(`Polybool error: ${h}, epsilon is ${c}`)}if(!u)for(let h of l)n.push(e[h])});let a=o.flat();for(let s=0;s<t.length;s++){let l=t[s];if(!a.includes(l)){let c=e[l];if(c.length<3)continue;n.push(c)}}return n}findIntersectHole(e,t){let n=t.length;if(n<2)return[];let i=Array.from({length:n},(l,c)=>c),o=l=>{let c=l;for(;i[c]!==c;)c=i[c];let u=l;for(;i[u]!==c;){let h=i[u];i[u]=c,u=h}return c},a=(l,c)=>{let u=o(l),h=o(c);u!==h&&(i[h]=u)};for(let l=0;l<n;l++){let c=e[t[l]];for(let u=l+1;u<n;u++){let h=e[t[u]];Rn.isPolygonIntersect(c,h)&&a(l,u)}}let s=new Map;for(let l=0;l<n;l++){let c=o(l),u=s.get(c);u||(u=[],s.set(c,u)),u.push(t[l])}return Array.from(s.values()).filter(l=>l.length>1)}},q5=new U,fTe=new _i,mTe=4,gTe=1e-9,yTe=1e-9,P5={smallLoopFastPath:0,offsetRingFastPath:0,generalPath:0};var bTe=!1;function vTe(r,e){if(r.length!==1||e.children.length!==1)return null;let t=e.children[0];if(!t||t.children.length!==0)return null;let n=r[t.index]??r[0];if(!n)return null;let i=[];for(let s=0;s<n.length;s++){let l=n[s];if(!Number.isFinite(l.x)||!Number.isFinite(l.y))return null;i.length>0&&E5(i[i.length-1],l)||i.push(new Le(l.x,l.y))}for(;i.length>1&&E5(i[0],i[i.length-1]);)i.pop();if(i.length<3||i.length>mTe)return null;let o=_Te(i);if(Math.abs(o)<gTe||STe(i))return null;o<0&&(i.reverse(),o=-o);let a=xTe(i,o);return a?{points:i,indices:a}:null}function xTe(r,e){let t=r.length===3?[[0,1,2]]:[[0,1,2,0,2,3],[0,1,3,1,2,3]],n=Math.abs(e)*yTe;for(let i of t){let o=0;for(let a=0;a<i.length;a+=3)o+=wTe(r[i[a]],r[i[a+1]],r[i[a+2]]);if(Math.abs(o-e)<=n)return i}return null}function wTe(r,e,t){return((e.x-r.x)*(t.y-r.y)-(e.y-r.y)*(t.x-r.x))*.5}function E5(r,e){return r.x===e.x&&r.y===e.y}function _Te(r){let e=r[0],t=0;for(let n=0,i=r.length-1;n<r.length;i=n++){let o=r[i],a=r[n];t+=(o.x-e.x)*(a.y-e.y)-(a.x-e.x)*(o.y-e.y)}return t*.5}function STe(r){let e=r.length;if(e<4)return!1;for(let t=0;t<e;t++){let n=r[t],i=r[(t+1)%e];for(let o=t+1;o<e;o++){if((o+1)%e===t||o===(t+1)%e)continue;let a=r[o],s=r[(o+1)%e];if(ATe(n,i,a,s))return!0}}return!1}function _C(r,e,t){let n=(e.x-r.x)*(t.y-r.y)-(e.y-r.y)*(t.x-r.x);return n>0?1:n<0?-1:0}function ATe(r,e,t,n){let i=_C(r,e,t),o=_C(r,e,n),a=_C(t,n,r),s=_C(t,n,e);return i!==o&&a!==s}function MTe(r,e){let t=r.points.length,n=new Float32Array(t*3),i=0;for(let a=0;a<t;a++){let s=r.points[a];n[i++]=s.x-e.x,n[i++]=s.y-e.y,n[i++]=-e.z}let o=new ot;return o.setAttribute("position",new Et(n,3)),o.setIndex(new Et(t>65535/3?Uint32Array.from(r.indices):Uint16Array.from(r.indices),1)),o}function pb(r){return r instanceof Kn&&!(r instanceof wr)}function Z5(r,e){if(r.length<2)return null;let t=TTe(r),n=r.length,i=DC(r);if(e instanceof wr){let c=new Float32Array((n-1)*6);for(let h=0,d=0;h<n-1;h++){let p=r[h],f=r[h+1];c[d++]=p.x-t.x,c[d++]=p.y-t.y,c[d++]=(p.z??0)-t.z,c[d++]=f.x-t.x,c[d++]=f.y-t.y,c[d++]=(f.z??0)-t.z}let u=new Ai;return u.setPositions(c),At.safeComputeBoundingBox(u),At.safeComputeBoundingSphere(u),{kind:"fat",geometry:u,worldOffset:t,wcsBbox:i,material:e}}let o=new Float32Array(n*3),a=(n-1)*2,s=n*2>65535?new Uint32Array(a):new Uint16Array(a);for(let c=0,u=0;c<n;c++){let h=r[c];o[u++]=h.x-t.x,o[u++]=h.y-t.y,o[u++]=(h.z??0)-t.z}for(let c=0,u=0;c<n-1;c++)s[u++]=c,s[u++]=c+1;let l=new ot;return l.setAttribute("position",new Et(o,3)),l.setIndex(new Et(s,1)),{kind:"basic",geometry:l,worldOffset:t,wcsBbox:i,material:e}}function MZ(r,e){let t=new U(r.x,r.y,r.z??0),n=new ot;n.setAttribute("position",new Jt([0,0,0],3));let i=1e-6,o=r.z??0,a=new Ne(new U(r.x-i,r.y-i,o-i),new U(r.x+i,r.y+i,o+i));return{kind:"point",geometry:n,worldOffset:t,wcsBbox:a,material:e,position:r}}function PTe(r,e,t){let n=OC(r),i=OC(e);if(n!==i||n<3)return null;let o=0;for(let h=0;h<n;h++){let d=(h+1)%n;o+=Nq(r[h],r[d],e[d]),o+=Nq(r[h],e[d],e[h])}if(!Number.isFinite(o)||o===0)return null;let a=o<0,s=new Float32Array(n*2*3);for(let h=0;h<n;h++){let d=r[h],p=e[h];if(!Number.isFinite(d.x)||!Number.isFinite(d.y)||!Number.isFinite(p.x)||!Number.isFinite(p.y))return null;s[h*3]=d.x-t.x,s[h*3+1]=d.y-t.y,s[h*3+2]=(d.z??0)-t.z;let f=(n+h)*3;s[f]=p.x-t.x,s[f+1]=p.y-t.y,s[f+2]=(p.z??0)-t.z}let l=new Uint32Array(n*6),c=0;for(let h=0;h<n;h++){let d=(h+1)%n,p=h,f=d,m=n+h,g=n+d;a?(l[c++]=p,l[c++]=g,l[c++]=f,l[c++]=p,l[c++]=m,l[c++]=g):(l[c++]=p,l[c++]=f,l[c++]=g,l[c++]=p,l[c++]=g,l[c++]=m)}let u=new ot;return u.setAttribute("position",new Et(s,3)),u.setIndex(new Et(l,1)),u}function J5(r,e,t,n){let i=DC(r).union(DC(e));if(i.isEmpty())return null;let o=i.getCenter(new U),a=PTe(r,e,o);if(!a)return null;let s=At.safeComputeBoundingBox(a);return!s||s.isEmpty()?(a.dispose(),null):(At.safeComputeBoundingSphere(a),P5.offsetRingFastPath++,{kind:"mesh",geometry:a,worldOffset:o,wcsBbox:i,material:n.styleManager.getFillMaterial(t)})}function ETe(r,e){let t=OC(r),n=OC(e);if(t!==n||t<2)return null;let i=new Array(t+1);for(let a=0;a<t;a++){let s=r[a],l=e[a];i[a]={x:(s.x+l.x)*.5,y:(s.y+l.y)*.5,z:((s.z??0)+(l.z??0))*.5}}let o=i[0];return i[t]={x:o.x,y:o.y,z:o.z},i}function OC(r){let e=r.length;return e>1&&E5(r[0],r[e-1])?e-1:e}function Nq(r,e,t){return((e.x-r.x)*(t.y-r.y)-(e.y-r.y)*(t.x-r.x))*.5}function PZ(r,e,t){var n;let i=e.fillType;if(!i.gradient&&(n=i.definitionLines)!=null&&n.length)return null;let o,a,s=r;if(!i.gradient&&!bTe){let b=ao({context:t}),v=r;if(typeof v.tessellate=="function"){o=v.tessellate(b);let x=Object.create(r,{tessellate:{value:()=>o}});a=x.buildHierarchy(b),s=x}else typeof v.getPoints=="function"&&typeof v.buildHierarchy=="function"&&(o=v.getPoints(100),a=v.buildHierarchy())}let l=!o||!a?null:vTe(o,a),c,u,h,d,p;if(l)P5.smallLoopFastPath++,d=DC(l.points.map(b=>({x:b.x,y:b.y,z:0}))),h=d.getCenter(new U),c=MTe(l,h),u=t.styleManager.getFillMaterial(e);else{P5.generalPath++;let b=new LC(s,e,t),v=[];if(b.traverse(x=>{x instanceof jt&&x.geometry&&(v.push(x.geometry.clone()),!u&&x.material instanceof mo&&(u=x.material),!p&&(x.position.x!==0||x.position.y!==0||x.position.z!==0)&&(p=x.position.clone()))}),b.traverse(x=>{x instanceof jt&&(x.geometry=new ot,x.material=fTe)}),b.dispose(),v.length===0)return null;if(v.length===1)c=v[0];else{let x=lC(v);if(!x)return v.forEach(w=>w.dispose()),null;c=x,v.forEach(w=>w.dispose())}}let f,m;if(d&&h){f=d,m=h;let b=At.safeComputeBoundingBox(c);if(!b||b.isEmpty())return c.dispose(),null;At.safeComputeBoundingSphere(c)}else{let b=At.safeComputeBoundingBox(c);if(!b||b.isEmpty())return c.dispose(),null;m=p??b.getCenter(new U),f=p?b.clone().translate(p):b.clone(),p||CTe(c,m)}let g={minX:f.min.x,minY:f.min.y,maxX:f.max.x,maxY:f.max.y},y=u??t.styleManager.getFillMaterial(e,void 0,g);return{kind:"mesh",geometry:c,worldOffset:m,wcsBbox:f,material:y}}function EZ(r,e,t,n){if(pb(n))return null;let i=[];for(let u=0;u<t.length;u+=2){let h=t[u],d=t[u+1];h===0&&d===0||i.push(h,d)}if(i.length<2)return null;let o=new Ne;for(let u=0;u<r.length;u+=e)o.expandByPoint(q5.set(r[u],r[u+1],r[u+2]??0));if(o.isEmpty())return null;let a=o.getCenter(new U),s=o.clone();if(n instanceof wr){let u=i.length/2,h=new Float32Array(u*6);for(let p=0,f=0;p<u;p++){let m=i[p*2],g=i[p*2+1],y=m*e,b=g*e;h[f++]=r[y]-a.x,h[f++]=r[y+1]-a.y,h[f++]=(r[y+2]??0)-a.z,h[f++]=r[b]-a.x,h[f++]=r[b+1]-a.y,h[f++]=(r[b+2]??0)-a.z}let d=new Ai;return d.setPositions(h),At.safeComputeBoundingBox(d),At.safeComputeBoundingSphere(d),{kind:"lineFat",geometry:d,worldOffset:a,wcsBbox:s,material:n}}let l=new Float32Array(r.length);for(let u=0;u<r.length;u+=e)l[u]=r[u]-a.x,l[u+1]=r[u+1]-a.y,l[u+2]=(r[u+2]??0)-a.z;let c=new ot;return c.setAttribute("position",new Et(l,e)),c.setIndex(new Et(new Uint16Array(i),1)),{kind:"lineBasic",geometry:c,worldOffset:a,wcsBbox:s,material:n}}function CTe(r,e){let t=r.getAttribute("position");if(t){for(let n=0;n<t.count;n++)t.setXYZ(n,t.getX(n)-e.x,t.getY(n)-e.y,t.getZ(n)-e.z);t.needsUpdate=!0,At.safeComputeBoundingBox(r),At.safeComputeBoundingSphere(r)}}function TTe(r){let e=new Ne;for(let t=0;t<r.length;t++){let n=r[t];e.expandByPoint(q5.set(n.x,n.y,n.z??0))}return e.getCenter(new U)}function DC(r){let e=new Ne;for(let t=0;t<r.length;t++){let n=r[t];e.expandByPoint(q5.set(n.x,n.y,n.z??0))}return e}var s5=new U,SC=new vt,Cc=new U,Tc=new U,l5=new U,C5=class{static compact(e){e.updateMatrixWorld(!0);let t=[...e.children],n=[],i=new Map,o=[];for(let a of t){if(!this.isMergeableLeaf(a)){n.push(a);continue}let s=this.resolveFamily(a);if(!s){n.push(a);continue}let l=a.material;if(!l||Array.isArray(l)){n.push(a);continue}let c=en(a),u=qa(a),h=u.layerName??"",d=u.authoredLayerName,p=!!c.bboxIntersectionCheck,f=c.styleMaterialId,m=this.hasIndex(a),g=this.attributeSignature(a);s5.setFromMatrixPosition(a.matrixWorld);let y=this.bucketKey(s,l.id,m,g,h,d,p,f),b=i.get(y);b||(b=[],i.set(y,b));let v=this.findCompatibleBucket(b,s,l,a,h,d,p,f,s5);v||(v={family:s,material:l,hasIndex:m,attrSignature:g,layerName:h,authoredLayerName:d,bboxIntersectionCheck:p,styleMaterialId:f,origin:s5.clone(),candidates:[],geometries:[],line2Positions:s==="line2"?[]:void 0,line2SegmentRuns:s==="line2"?[]:void 0,sources:[]},b.push(v),o.push(v)),v.candidates.push(a)}for(let a of o){if(a.candidates.length<2){for(let s of a.candidates)n.push(s);a.candidates.length=0;continue}for(let s of a.candidates){let l=!1;if(a.family==="line2"){let c=this.bakeLine2Positions(s,a.origin);c&&c.length>=6&&(this.appendNumbers(a.line2Positions,c),a.line2SegmentRuns.push(c.length/6),l=!0)}else{let c=this.bakeStandardGeometry(s,a.family,a.origin);c&&(a.geometries.push(c),l=!0)}l?a.sources.push(s):n.push(s)}a.candidates.length=0}e.children=[];for(let a of t)a.parent=null;for(let a of n)e.add(a);for(let a of o){if(a.sources.length===0)continue;if(a.sources.length<2){this.disposeBucketGeometries(a),a.line2Positions=void 0,a.line2SegmentRuns=void 0;for(let l of a.sources)e.add(l);a.sources.length=0;continue}let s=this.buildMergedLeaf(a);if(s){e.add(s);for(let l of a.sources)this.disposeLeafGeometry(l);a.sources.length=0;continue}this.disposeBucketGeometries(a),a.line2Positions=void 0,a.line2SegmentRuns=void 0;for(let l of a.sources)e.add(l);a.sources.length=0}e.updateMatrixWorld(!0)}static bucketKey(e,t,n,i,o,a,s,l){return`${e}|${t}|${n?1:0}|${i}|${o}|${a??""}|${s?1:0}|${l??""}`}static appendNumbers(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}static isMergeableLeaf(e){if(e instanceof Wn||e.visible===!1||!("geometry"in e)||!("material"in e))return!1;let t=en(e);return!(t.noBatch||t.isPoint)}static resolveFamily(e){return e instanceof li?"line2":e instanceof qn?"line":e instanceof jt?"mesh":e instanceof go?"points":null}static hasIndex(e){let t=e.geometry;return t?.getIndex()!=null}static attributeSignature(e){let t=e.geometry;return t?Object.keys(t.attributes).sort().map(n=>{let i=t.getAttribute(n);return`${n}:${i.itemSize}:${i.normalized?1:0}`}).join("|"):""}static findCompatibleBucket(e,t,n,i,o,a,s,l,c){let u=this.hasIndex(i),h=this.attributeSignature(i),d,p=1/0;for(let f of e){if(f.family!==t||f.material.id!==n.id||f.hasIndex!==u||f.attrSignature!==h||f.layerName!==o||f.authoredLayerName!==a||f.bboxIntersectionCheck!==s||f.styleMaterialId!==l||!d5(f.origin,c))continue;let m=Math.max(Math.abs(c.x-f.origin.x),Math.abs(c.y-f.origin.y),Math.abs(c.z-f.origin.z));m<p&&(p=m,d=f)}return d}static bakeStandardGeometry(e,t,n){let i=e.geometry;if(!i)return null;let o=i.clone();At.tryConvertInterleavedBufferAttributes(o);let a=t==="mesh"?3:2;if(!At.safeApplyMatrix4(o,e.matrix,a))return o.dispose(),null;let s=o.getAttribute("position");if(!s)return o.dispose(),null;for(let l=0;l<s.count;l++)s.setXYZ(l,s.getX(l)-n.x,s.getY(l)-n.y,s.getZ(l)-n.z);return s.needsUpdate=!0,o.hasAttribute("lineDistance")&&At.recomputeLineDistanceForLineSegments(o),o}static bakeLine2Positions(e,t){let n=e.geometry,i=n.getAttribute("instanceStart"),o=n.getAttribute("instanceEnd");if(!i||!o)return null;SC.copy(e.matrix),SC.setPosition(0,0,0),l5.setFromMatrixPosition(e.matrix);let a=[];for(let s=0;s<i.count;s++)Cc.fromBufferAttribute(i,s).applyMatrix4(SC),Tc.fromBufferAttribute(o,s).applyMatrix4(SC),Cc.add(l5).sub(t),Tc.add(l5).sub(t),!(!Number.isFinite(Cc.x)||!Number.isFinite(Cc.y)||!Number.isFinite(Cc.z)||!Number.isFinite(Tc.x)||!Number.isFinite(Tc.y)||!Number.isFinite(Tc.z))&&a.push(Cc.x,Cc.y,Cc.z,Tc.x,Tc.y,Tc.z);return a.length>=6?a:null}static applyRestartingDashDistances(e,t){let n=e.getAttribute("instanceStart"),i=e.getAttribute("instanceEnd");if(!n||!i||n.count===0)return;let o=new Float32Array(n.count*2),a=0;for(let l of t){let c=0;for(let u=0;u<l&&a<n.count;u++,a++)Cc.fromBufferAttribute(n,a),Tc.fromBufferAttribute(i,a),o[a*2]=c,c+=Cc.distanceTo(Tc),o[a*2+1]=c}let s=new vl(o,2,1);e.setAttribute("instanceDistanceStart",new sr(s,1,0)),e.setAttribute("instanceDistanceEnd",new sr(s,1,1))}static buildMergedLeaf(e){if(e.family==="line2"){let i=e.line2Positions;if(!i||i.length<6)return null;let o=new Ai;o.setPositions(new Float32Array(i)),At.safeComputeBoundingBox(o),At.safeComputeBoundingSphere(o);let a=new li(o,e.material);return e.material.dashed===!0&&this.applyRestartingDashDistances(o,e.line2SegmentRuns??[]),this.applyMergedLeafMetadata(a,e),a}if(e.geometries.length===0)return null;let t=null;if(e.geometries.length===1)t=e.geometries[0],e.geometries.length=0;else{for(let i of e.geometries)At.tryConvertInterleavedBufferAttributes(i);if(t=lC(e.geometries,!1),this.disposeBucketGeometries(e),!t)return null}At.safeComputeBoundingBox(t),At.safeComputeBoundingSphere(t);let n;return e.family==="line"?n=new qn(t,e.material):e.family==="mesh"?n=new jt(t,e.material):n=new go(t,e.material),this.applyMergedLeafMetadata(n,e),n}static applyMergedLeafMetadata(e,t){e.position.copy(t.origin),e.updateMatrix();let n=qa(e);n.layerName=t.layerName,t.authoredLayerName!=null&&(n.authoredLayerName=t.authoredLayerName);let i=en(e);t.bboxIntersectionCheck&&(i.bboxIntersectionCheck=!0),t.styleMaterialId!=null?i.styleMaterialId=t.styleMaterialId:i.styleMaterialId=t.material.id}static disposeBucketGeometries(e){for(let t of e.geometries)t.dispose();e.geometries.length=0}static disposeLeafGeometry(e){if("geometry"in e){let t=e.geometry;t?.dispose(),e.geometry=void 0}}},Ko=class r extends Wn{constructor(e,t){super(t),this._wcsChildBoxes=[],this._wcsChildBoxesTemplate=null,this._wcsChildBoxesPendingMatrix=null,this._compacted=!1,this._sourceEntitySpatialMatrices=new Map,this._sourceEntities=[],e.forEach(o=>{if(Array.isArray(o)){let a=new Wn(t);this.add(a)}else{this.add(o),this.registerSourceEntities(o),this.storeBoxes(o,!0);return}this.storeBoxes(o)}),this.flatten();let n=!1,i=this.children;for(let o=0;o<i.length;++o){let a=i[o];if(a.userData.layerName!=null&&a.userData.layerName!=="0"){n=!0;break}}this._isOnTheSameLayer=!n,this.syncWcsBboxFromChildBoxes()}get isOnTheSameLayer(){return this._isOnTheSameLayer}get isCompacted(){return this._compacted}get wcsChildBoxes(){return this.materializeWcsChildBoxes(),this._wcsChildBoxes}get childBoxCount(){var e;let t=((e=this._wcsChildBoxesTemplate)==null?void 0:e.length)??0;return this._wcsChildBoxes.length+t}peekLazyChildBoxes(){if(!this._wcsChildBoxesTemplate||this._wcsChildBoxes.length>0)return null;let e=this._wcsChildBoxesPendingMatrix?this._wcsChildBoxesPendingMatrix.clone():new vt;return{boxes:this._wcsChildBoxesTemplate,matrix:e}}compactForInstancing(){et.instance.awaitFontsBeforeDraw||this.syncDraw(),C5.compact(this),this.releaseDetachedSourceShells(),this._compacted=!0}getSourceEntities(){return this._sourceEntities}getSourceEntitySpatialMatrix(e){return this._sourceEntitySpatialMatrices.get(e)}refreshWcsChildBoxesFromChildren(){if(this.materializeWcsChildBoxes(),this._wcsChildBoxes.length>0){this.reconcileDeferredChildBoxes();return}let e=this._wcsChildBoxes.map(i=>({...i}));this._wcsChildBoxes.length=0,this.updateMatrixWorld(!0);let t=new Ne;for(let i of this._sourceEntities)this.appendSourceEntityWcsChildBox(i,t);let n=new Set(this._sourceEntities);this.children.forEach(i=>{i instanceof Wn&&!n.has(i)&&this.appendTreeEntityWcsChildBox(i,t)}),this._wcsChildBoxes.length===0&&e.length>0&&e.forEach(i=>this._wcsChildBoxes.push({...i})),this.syncWcsBboxFromChildBoxes()}reconcileDeferredChildBoxes(){this.updateMatrixWorld(!0);let e=new Ne,t=new Map(this._wcsChildBoxes.map(i=>[i.id,i]));for(let i of this._sourceEntities){let o=t.get(i.objectId);if(o&&r.isFiniteEntityBox(o))continue;let a=this.computeSourceEntityWcsChildBox(i,e);a&&(o?Object.assign(o,a):(this._wcsChildBoxes.push(a),t.set(i.objectId,a)))}let n=new Set(this._sourceEntities);this.children.forEach(i=>{if(!(i instanceof Wn)||n.has(i))return;let o=t.get(i.objectId);if(o&&r.isFiniteEntityBox(o))return;let a=this.computeTreeEntityWcsChildBox(i,e);a&&(o?Object.assign(o,a):this._wcsChildBoxes.push(a))}),this.syncWcsBboxFromChildBoxes()}bucketSharedLinetypeGlyph(e,t){if(e.objectId||!(e instanceof $o))return!1;let n=e.glyphStyleShareKey,i=t.get(n);return i?i.push(e):t.set(n,[e]),!0}syncDraw(){let e=new Set(this.getSourceEntities()),t=new Map,n=i=>{i.hasDrawableGeometry()||this.bucketSharedLinetypeGlyph(i,t)||i.syncDraw()};e.forEach(n),this.traverse(i=>{i!==this&&i instanceof Wn&&(e.has(i)||n(i))});for(let i of t.values())iTe(i);this.refreshWcsChildBoxesFromChildren()}async asyncDraw(){await this.asyncDrawPendingGlyphs(),this.refreshWcsChildBoxesFromChildren()}async asyncDrawPendingGlyphs(e={}){let t=e.chunkSize??24,n=e.yieldBudgetMs??32,i=this.getSourceEntities(),o=[],a=new Map,s=new Set,l=u=>{s.has(u)||(s.add(u),!u.hasDrawableGeometry()&&(this.bucketSharedLinetypeGlyph(u,a)||o.push(()=>u.asyncDraw())))};for(let u of i)l(u);this.enqueuePendingGlyphEntitiesFromTree(this,l);for(let u of a.values())o.push(()=>oTe(u));if(o.length===0)return;let c=performance.now();for(let u=0;u<o.length;u+=t){let h=Math.min(u+t,o.length),d=[];for(let p=u;p<h;p++)d.push(o[p]());await Promise.all(d),h<o.length&&performance.now()-c>=n&&(await new Promise(p=>setTimeout(p,0)),c=performance.now())}}enqueuePendingGlyphEntitiesFromTree(e,t){let n=e.children;for(let i=0;i<n.length;i++){let o=n[i];if(o instanceof $o){t(o);continue}if(o instanceof r){for(let a of o.getSourceEntities())t(a);this.enqueuePendingGlyphEntitiesFromTree(o,t);continue}o instanceof Wn&&(t(o),this.enqueuePendingGlyphEntitiesFromTree(o,t))}}addChild(e){super.addChild(e),e.userData.layerName!=null&&e.userData.layerName!=="0"&&(this._isOnTheSameLayer=!1),this.materializeWcsChildBoxes(),this.registerSourceEntities(e),this.storeBoxes(e,!0),this.syncWcsBboxFromChildBoxes()}applyMatrix(e){let t=Vf.createMatrix4(e);if(this._wcsChildBoxesTemplate?this._wcsChildBoxesPendingMatrix?this._wcsChildBoxesPendingMatrix.premultiply(t):this._wcsChildBoxesPendingMatrix=t.clone():this._wcsChildBoxes.forEach(n=>{r.isFiniteEntityBox(n)&&this.applyMatrixToEntityBox(n,t)}),this.applyFullMatrix4(t),this._wcsChildBoxesTemplate){this._wcsBbox.isEmpty()||this._wcsBbox.applyMatrix4(t);return}this.syncWcsBboxFromChildBoxes()}copy(e,t){return this._isOnTheSameLayer=e._isOnTheSameLayer,this._compacted=e._compacted,e._compacted&&!e._wcsChildBoxesPendingMatrix?(this._wcsChildBoxes=[],this._wcsChildBoxesTemplate=e._wcsChildBoxes.length>0?e._wcsChildBoxes:e._wcsChildBoxesTemplate??e._wcsChildBoxes):(e.materializeWcsChildBoxes(),this._wcsChildBoxes=[],this._wcsChildBoxesTemplate=e._wcsChildBoxes.map(n=>({...n}))),this._wcsChildBoxesPendingMatrix=null,e._compacted?(this._sourceEntitySpatialMatrices=new Map,this._sourceEntities=[]):(this._sourceEntitySpatialMatrices=new Map,e._sourceEntitySpatialMatrices.forEach((n,i)=>{this._sourceEntitySpatialMatrices.set(i,n.clone())}),this._sourceEntities=e._sourceEntities.map(n=>n.fastDeepClone())),super.copy(e,t)}fastDeepClone(e=this._compacted){!this._compacted&&this.childCount>=1&&(this.childCount>=2?this.compactForInstancing():this.sealForSharedClone(),e=!0);let t=new r([],this.renderContext);return t.copy(this,!1),this.copyGeometry(this,t,e),t}prepareCacheTemplate(){this._compacted||et.instance.awaitFontsBeforeDraw||this.syncDraw()}materializeWcsChildBoxes(){if(!this._wcsChildBoxesTemplate)return;let e=this._wcsChildBoxesTemplate,t=this._wcsChildBoxesPendingMatrix,n=this._wcsChildBoxes;this._wcsChildBoxes=[];for(let i=0;i<e.length;i++){let o={...e[i]};t&&r.isFiniteEntityBox(o)&&this.applyMatrixToEntityBox(o,t),this._wcsChildBoxes.push(o)}for(let i=0;i<n.length;i++)this._wcsChildBoxes.push(n[i]);this._wcsChildBoxesTemplate=null,this._wcsChildBoxesPendingMatrix=null}releaseDetachedSourceShells(){let e=new Set(this.children);for(let t of this._sourceEntities)e.has(t)||("geometry"in t&&(t.geometry=null),t.children=[]);this._sourceEntities.length=0,this._sourceEntitySpatialMatrices.clear()}dispose(){let e=new Set(this.children);for(let t of this._sourceEntities)e.has(t)||Wn.disposeObject(t,!1);this._sourceEntities.length=0,super.dispose()}addExternalChildBoxes(e){for(let t=0;t<e.length;t++){let n=e[t];r.isFiniteEntityBox(n)&&this._wcsChildBoxes.push({minX:n.minX,minY:n.minY,maxX:n.maxX,maxY:n.maxY,id:n.id})}this.syncWcsBboxFromChildBoxes()}sealForSharedClone(){this._compacted||(this._compacted=!0,this.releaseDetachedSourceShells())}syncWcsBboxFromChildBoxes(){if(this.materializeWcsChildBoxes(),this._wcsChildBoxes.length===0)return;let e=new Ne;for(let t of this._wcsChildBoxes)r.isFiniteEntityBox(t)&&e.union(new Ne(new U(t.minX,t.minY,0),new U(t.maxX,t.maxY,0)));this.wcsBbox=e}storeBoxes(e,t=!1){if(e instanceof r){e.wcsChildBoxes.forEach(i=>{r.isFiniteEntityBox(i)&&this._wcsChildBoxes.push({...i})});return}if(!(e instanceof Wn))return;let n=new Ne;if(t||this._sourceEntities.includes(e)){this.appendSourceEntityWcsChildBox(e,n);return}this.appendTreeEntityWcsChildBox(e,n)}registerSourceEntities(e){if(e instanceof r){let t=e.layerName;if(t)for(let o of e.getSourceEntities()){let a=o.layerName;if(a==null)continue;let s=Kq(a,t);s!==a&&(a==="0"&&(o.userData.authoredLayerName="0"),o.layerName=s)}let n=e.matrix.clone(),i=new vt;e.getSourceEntities().forEach(o=>{let a=e.getSourceEntitySpatialMatrix(o.objectId)??this._sourceEntitySpatialMatrices.get(o.objectId),s=n.clone().multiply(a??i);this._sourceEntitySpatialMatrices.set(o.objectId,s),this._sourceEntities.push(o)});return}e instanceof Wn&&this._sourceEntities.push(e)}appendSourceEntityWcsChildBox(e,t){let n=this.computeSourceEntityWcsChildBox(e,t);n&&this._wcsChildBoxes.push(n)}computeSourceEntityWcsChildBox(e,t){if(e.wcsBbox.isEmpty())return;t.copy(e.wcsBbox),e.updateMatrixWorld(!0);let n=this._sourceEntitySpatialMatrices.get(e.objectId);if(n&&!r.isWorldMatrixIdentity(n)?t.applyMatrix4(n):r.isWorldMatrixIdentity(this.matrixWorld)&&!r.isWorldMatrixIdentity(e.matrix)&&t.applyMatrix4(e.matrix),r.isWorldMatrixIdentity(this.matrixWorld)||t.applyMatrix4(this.matrixWorld),!(!Number.isFinite(t.min.x)||!Number.isFinite(t.max.x)))return{minX:t.min.x,minY:t.min.y,maxX:t.max.x,maxY:t.max.y,id:e.objectId}}appendTreeEntityWcsChildBox(e,t){let n=this.computeTreeEntityWcsChildBox(e,t);n&&this._wcsChildBoxes.push(n)}computeTreeEntityWcsChildBox(e,t){if(!e.wcsBbox.isEmpty()&&(e.updateMatrixWorld(!0),t.copy(e.wcsBbox),t.applyMatrix4(e.matrixWorld),!(!Number.isFinite(t.min.x)||!Number.isFinite(t.max.x))))return{minX:t.min.x,minY:t.min.y,maxX:t.max.x,maxY:t.max.y,id:e.objectId}}static isWorldMatrixIdentity(e){let t=new vt;for(let n=0;n<16;++n)if(Math.abs(e.elements[n]-t.elements[n])>1e-6)return!1;return!0}static isFiniteEntityBox(e){return Number.isFinite(e.minX)&&Number.isFinite(e.minY)&&Number.isFinite(e.maxX)&&Number.isFinite(e.maxY)}applyMatrixToEntityBox(e,t){let n=[new U(e.minX,e.minY,0),new U(e.maxX,e.minY,0),new U(e.maxX,e.maxY,0),new U(e.minX,e.maxY,0)];for(let l of n)l.applyMatrix4(t);let i=1/0,o=1/0,a=-1/0,s=-1/0;for(let l of n)i=Math.min(i,l.x),o=Math.min(o,l.y),a=Math.max(a,l.x),s=Math.max(s,l.y);e.minX=i,e.minY=o,e.maxX=a,e.maxY=s}};function Oc(r){return Number.isFinite(r.red)&&Number.isFinite(r.green)&&Number.isFinite(r.blue)?`rgb(${r.red}, ${r.green}, ${r.blue})`:r.cssColor??"#ffffff"}var Q5="default",kc="ml-html-selected",vd=class{constructor(e,t){this._selected=!1,this.id=t.id,this.layer=t.layer??Q5,this.layoutId=t.layoutId,this.scaleWithView=t.scaleWithView===!0,this.object=new dC(e),this.object.position.set(t.worldPosition.x,t.worldPosition.y,t.worldPosition.z??0),this.object.updateMatrix(),t.selectable&&(e.style.pointerEvents="auto",e.style.cursor="pointer")}get element(){return this.object.element}get selected(){return this._selected}setSelected(e){this._selected=e,this.element.classList.toggle(kc,e)}setPosition(e){this.object.position.set(e.x,e.y,e.z??0),this.object.matrixAutoUpdate=!0,this.object.updateMatrix(),this.object.updateMatrixWorld(!0)}dispose(){this.object.onAfterRender=()=>{},this.element.remove()}},CZ="ml-html-canvas",_o=class{constructor(e){this._selected=!1,this._visible=!0,this.id=e.id,this.layer=e.layer??Q5,this.layoutId=e.layoutId;let t=document.createElement("canvas");t.className=CZ,t.style.cssText="position:absolute;pointer-events:none;z-index:1;",e.container.appendChild(t),this.canvas=t}get element(){return this.canvas}get selected(){return this._selected}get visible(){return this._visible}setSelected(e){this._selected!==e&&(this._selected=e,this.canvas.classList.toggle(kc,e))}setVisible(e){this._visible!==e&&(this._visible=e,this.canvas.style.display=e?"":"none")}dispose(){this.canvas.remove()}},zf=13,kTe=3,ITe=14,LTe=20,OTe=1,Hi=class r extends vd{constructor(e){super(r.createElement(e.color,e.text??"",e.fontSize,e.transform),{...e,scaleWithView:e.scaleWithView??!0})}setText(e){this.element.textContent=e}setFontSize(e){e>0&&(this.element.style.fontSize=`${e}px`)}setColor(e){let t=Oc(e);this.element.style.color=t,this.element.style.borderColor=t}static createElement(e,t,n,i){let o=document.createElement("div");o.className="ml-html-badge",o.textContent=t;let a=Oc(e),s=n!=null&&n>0?n:zf,l=kTe/zf,c=ITe/zf,u=LTe/zf,h=OTe/zf;return o.style.cssText=`background:var(--ml-ui-bg, rgba(255,255,255,0.95));color:${a};border:${h}em solid ${a};box-sizing:border-box;font-size:${s}px;font-family:sans-serif;font-weight:500;padding:${l}em ${c}em;border-radius:${u}em;pointer-events:none;transform:${i??"translate(-50%,-50%)"};white-space:nowrap;box-shadow:var(--ml-ui-shadow, 0 1px 4px rgba(0,0,0,0.2));`,o}},RC=.55,TZ=.12,db=class r extends vd{constructor(e){super(r.createElement(e.color,e.fontSize),{...e,scaleWithView:e.scaleWithView??!0})}setColor(e){this.element.style.background=Oc(e)}setFontSize(e){e>0&&(this.element.style.fontSize=`${e}px`)}static createElement(e,t){let n=document.createElement("div");n.className="ml-html-dot";let i=t!=null&&t>0?t:zf;return n.style.cssText=`font-size:${i}px;width:${RC}em;height:${RC}em;min-width:5px;min-height:5px;border-radius:50%;background:${Oc(e)};border:${TZ}em solid var(--ml-ui-border, #fff);box-sizing:border-box;pointer-events:none;transform:translate(-50%,-50%);`,n}},R_="ml-html-grip",DTe="ml-html-grip-dragging",L_="ml-grip-handle",zq="ml-grip-handle-style",Uq="ml-html-grip-style";function kZ(){if(typeof document>"u"||document.getElementById(zq))return;let r=document.createElement("style");r.id=zq,r.textContent=`
  4040. .${L_} {
  4041. position: absolute;
  4042. width: var(--ml-ui-grip-size, 8px);
  4043. height: var(--ml-ui-grip-size, 8px);
  4044. pointer-events: auto;
  4045. transform: translate(-50%, -50%);
  4046. z-index: 5;
  4047. box-sizing: border-box;
  4048. cursor: pointer;
  4049. }
  4050. .${L_}-normal {
  4051. background: var(--ml-ui-grip-normal, #0080ff);
  4052. }
  4053. .${L_}:hover,
  4054. .${L_}-hover,
  4055. .${L_}-hot {
  4056. background: var(--ml-ui-grip-hot, #ff0000);
  4057. }
  4058. `,document.head.appendChild(r)}function RTe(){if(typeof document>"u"||document.getElementById(Uq))return;let r=document.createElement("style");r.id=Uq,r.textContent=`
  4059. .${R_} {
  4060. visibility: hidden;
  4061. pointer-events: none;
  4062. }
  4063. .${R_}.${kc} {
  4064. visibility: visible;
  4065. pointer-events: auto;
  4066. }
  4067. .${R_}.${DTe} {
  4068. visibility: hidden !important;
  4069. pointer-events: none !important;
  4070. }
  4071. `,document.head.appendChild(r)}function T5(r){return!!(r!=null&&r.classList.contains(R_))}var ei=class r extends vd{constructor(e){super(r.createElement(e.color,e.fontSize),{...e,scaleWithView:e.scaleWithView??!0})}setColor(e){this.element.style.background=Oc(e)}setFontSize(e){e>0&&(this.element.style.fontSize=`${e}px`)}static createElement(e,t){RTe();let n=document.createElement("div");n.className=`ml-html-dot ${R_}`;let i=t!=null&&t>0?t:zf;return n.style.cssText=`font-size:${i}px;width:${RC}em;height:${RC}em;min-width:5px;min-height:5px;border-radius:50%;background:${Oc(e)};border:${TZ}em solid var(--ml-ui-border, #fff);box-sizing:border-box;transform:translate(-50%,-50%);cursor:grab;`,n}},Wf=class{constructor(e){this._children=[],this._canvases=[],this._selected=!1,this._visible=!0,this._clickCleanups=[],this.id=e.id,this.layer=e.layer??Q5,this.layoutId=e.layoutId,this.selectable=e.selectable===!0,this.onSelectedChanged=e.onSelectedChanged,this.onVisibleChanged=e.onVisibleChanged,this.onDispose=e.onDispose}get children(){return this._children}get canvases(){return this._canvases}get selected(){return this._selected}get visible(){return this._visible}add(...e){for(let t of e)this._children.push(t),this.selectable&&!T5(t.element)&&(t.element.style.pointerEvents="auto",t.element.style.cursor="pointer"),t.object.visible=this._visible;return this._onSelectRequest&&this.bindSelection(this._onSelectRequest),this}addCanvas(...e){for(let t of e)this._canvases.push(t),t.setVisible(this._visible),this._selected&&t.setSelected(!0);return this}setSelected(e){var t;if(this._selected!==e){this._selected=e;for(let n of this._children)n.setSelected(e);for(let n of this._canvases)n.setSelected(e);(t=this.onSelectedChanged)==null||t.call(this,e,this)}}setVisible(e){var t;if(this._visible!==e){this._visible=e;for(let n of this._children)n.object.visible=e;for(let n of this._canvases)n.setVisible(e);(t=this.onVisibleChanged)==null||t.call(this,e,this)}}bindSelection(e){if(this.unbindSelection(),this._onSelectRequest=e,!!this.selectable)for(let t of this._children){if(T5(t.element))continue;t.element.style.pointerEvents="auto",t.element.style.cursor="pointer";let n=i=>{let o=i.target;if(o!=null&&o.isContentEditable||o!=null&&o.closest('[contenteditable="true"]')){i.stopPropagation();return}i.stopPropagation(),e(this)};t.element.addEventListener("click",n),this._clickCleanups.push(()=>t.element.removeEventListener("click",n))}}unbindSelection(){for(let e of this._clickCleanups)e();this._clickCleanups=[]}dispose(){var e;this.unbindSelection(),this._onSelectRequest=void 0;for(let t of this._canvases)t.dispose();this._canvases.length=0;try{(e=this.onDispose)==null||e.call(this)}catch{}}},Xf=class r extends vd{constructor(e){super(r.createElement(e.color,e.text??"",e.fontSize),{...e,scaleWithView:e.scaleWithView??!0})}setText(e){let t=this.element.querySelector(".ml-html-callout-text");t&&(t.textContent=e)}setFontSize(e){let t=this.element.querySelector(".ml-html-callout-text");!t||!(e>0)||(t.style.fontSize=`${e}px`)}get textElement(){return this.element.querySelector(".ml-html-callout-text")??this.element}setColor(e){let t=Oc(e);this.element.style.borderColor=t,this.element.style.borderLeft=`4px solid ${t}`;let n=this.element.querySelector(".ml-html-callout-text");n&&(n.style.color=t)}static createElement(e,t,n){let i=document.createElement("div");i.className="ml-html-callout";let o=Oc(e),a=n!=null&&n>0?n:12;i.style.cssText=`display:flex;flex-direction:column;gap:2px;min-width:72px;max-width:220px;background:var(--ml-ui-bg, rgba(255,255,255,0.96));border:1px solid ${o};border-left:4px solid ${o};border-radius:6px;padding:6px 10px;pointer-events:none;transform:translate(-50%,-50%);box-shadow:var(--ml-ui-shadow, 0 1px 4px rgba(0,0,0,0.2));font-family:sans-serif;`;let s=document.createElement("div");return s.className="ml-html-callout-text",s.style.cssText=`color:${o};font-size:${a}px;font-weight:600;white-space:pre-wrap;word-break:break-word;`,s.textContent=t,i.appendChild(s),i}},j_=class r extends vd{constructor(e){super(r.createElement(e.color),e)}static createElement(e){let t=document.createElement("div");return t.className="ml-html-snap-indicator",t.style.cssText=`width:10px;height:10px;border:2px solid ${Oc(e)};background:transparent;box-sizing:border-box;pointer-events:none;transform:translate(-50%,-50%);`,t}},BTe={approved:"APPROVED",rejected:"REJECTED",revised:"REVISED","for-review":"FOR REVIEW",custom:"STAMP"},BC=class r extends vd{constructor(e){super(r.createElement(e),{...e,scaleWithView:e.scaleWithView??!0})}setText(e){let t=this.element.querySelector(".ml-html-stamp-text");t&&(t.textContent=e)}static createElement(e){let t=document.createElement("div");t.className="ml-html-stamp";let n=Oc(e.color);if(t.style.cssText="display:flex;flex-direction:column;align-items:center;gap:4px;pointer-events:none;transform:translate(-50%,-50%);font-family:sans-serif;",e.imageUrl){let i=document.createElement("img");i.src=e.imageUrl,i.alt=e.text??e.stampId,i.style.cssText="max-width:96px;max-height:96px;object-fit:contain;border:2px solid "+n+";border-radius:4px;background:var(--ml-ui-bg, #fff);",t.appendChild(i)}else{let i=document.createElement("div");i.className="ml-html-stamp-badge",i.style.cssText=`border:3px solid ${n};color:${n};background:rgba(255,255,255,0.92);padding:8px 14px;font-size:14px;font-weight:800;letter-spacing:0.06em;border-radius:4px;transform:rotate(-12deg);box-shadow:var(--ml-ui-shadow, 0 1px 4px rgba(0,0,0,0.2));white-space:nowrap;`,i.textContent=BTe[e.stampId]??e.stampId.toUpperCase(),t.appendChild(i)}if(e.text){let i=document.createElement("div");i.className="ml-html-stamp-text",i.style.cssText=`color:${n};font-size:11px;font-weight:600;background:var(--ml-ui-bg, rgba(255,255,255,0.9));padding:1px 6px;border-radius:10px;`,i.textContent=e.text,t.appendChild(i)}return t}},FTe=new U,NTe=new ha,c5=new U,jq=!1;function Vq(){if(jq||typeof document>"u")return;jq=!0;let r=document.createElement("style");r.dataset.mlHtmlSelection="1",r.textContent=`
  4072. .ml-html-badge.${kc},
  4073. .ml-html-callout.${kc},
  4074. .ml-html-stamp.${kc} .ml-html-stamp-badge,
  4075. .ml-html-stamp.${kc} img {
  4076. /* Hard ring at half the original em thickness + soft glow */
  4077. outline: 0.075em solid rgba(255, 213, 79, 0.85);
  4078. outline-offset: 0.04em;
  4079. box-shadow:
  4080. 0 0 0 0.075em rgba(255, 213, 79, 0.4),
  4081. 0 0 0.45em rgba(255, 213, 79, 0.85),
  4082. 0 0 0.9em rgba(255, 213, 79, 0.55),
  4083. var(--ml-ui-shadow, 0 1px 4px rgba(0, 0, 0, 0.2));
  4084. }
  4085. .ml-html-dot.${kc},
  4086. .ml-html-grip.${kc} {
  4087. box-shadow:
  4088. 0 0 0 0.06em rgba(255, 213, 79, 0.75),
  4089. 0 0 0.35em rgba(255, 213, 79, 0.9),
  4090. 0 0 0.7em rgba(255, 213, 79, 0.5);
  4091. }
  4092. .${CZ}.${kc} {
  4093. /* font-size is seeded from the paired badge so em tracks text size */
  4094. filter:
  4095. drop-shadow(0 0 0.12em #ffd54f)
  4096. drop-shadow(0 0 0.3em rgba(255, 213, 79, 0.95))
  4097. drop-shadow(0 0 0.6em rgba(255, 213, 79, 0.55));
  4098. }
  4099. `,document.head.appendChild(r)}var V_=class{constructor(e){this.groupChildIds=new Set,this.selectedGroupIds=new Set,this._hitTestEnabled=!0,this._baselineMatrices=new Map,this._composedMatrix=new vt,this.scene=e,this.htmlGroup=new Zn,this.htmlGroup.name="Html_Transient_Group",this.scene.add(this.htmlGroup),this.entries=new Map,this.groups=new Map,this.canvases=new Map}get activeLayoutId(){return this._activeLayoutId}setActiveLayoutId(e){this._activeLayoutId!==e&&(this._activeLayoutId=e,this.applyLayoutVisibility())}add(e){e instanceof Wf?this.addGroup(e):e instanceof _o?this.addCanvas(e):this.addElement(e)}updatePosition(e,t){let n=this.entries.get(e);n&&(n.setPosition(t),this._baselineMatrices.set(e,n.object.matrix.clone()))}setScaleWithView(e,t){let n=this.entries.get(e);n&&(n.scaleWithView=t,n.baseZoom=void 0)}applyTransforms(e){let t=!1;for(let{id:n,matrix:i}of e){let o=this.entries.get(n);if(!o)continue;let a=this._baselineMatrices.get(n),s=this._composedMatrix.copy(i);a&&s.multiply(a),!o.object.matrix.equals(s)&&(o.object.matrix.copy(s),o.object.matrixAutoUpdate=!1,o.object.updateMatrixWorld(!0),t=!0)}return t}remove(e){let t=this.groups.get(e);if(t){this.removeGroup(t);return}if(this.canvases.has(e)){this.removeCanvas(e);return}this.removeElement(e)}detach(e){let t=this.groups.get(e);if(t)return this.detachGroup(t),t}detachLayer(e){let t=[];for(let n of[...this.groups.values()])n.layer===e&&(this.detachGroup(n),t.push(n));return t}reattach(e){if(this.add(e),!e.visible){let t=e.layoutId==null||this._activeLayoutId==null||e.layoutId===this._activeLayoutId;e.setVisible(t)}}getSelectedGroups(){let e=[];for(let t of this.selectedGroupIds){let n=this.groups.get(t);n&&e.push(n)}return e}groupsOnLayer(e){let t=[];for(let n of this.groups.values())n.layer===e&&t.push(n);return t}clear(e){for(let[t,n]of[...this.groups])(e==null||n.layer===e)&&this.remove(t);if(e==null){for(let t of[...this.entries.keys()])this.removeElement(t);for(let t of[...this.canvases.keys()])this.removeCanvas(t)}else{for(let[t,n]of this.entries)n.layer===e&&this.removeElement(t);for(let[t,n]of this.canvases)n.layer===e&&this.removeCanvas(t)}}has(e){return this.entries.has(e)||this.groups.has(e)||this.canvases.has(e)}get(e){return this.entries.get(e)}getGroup(e){return this.groups.get(e)}getCanvas(e){return this.canvases.get(e)}getElement(e){var t;return(t=this.entries.get(e))==null?void 0:t.element}setVisible(e,t){if(t==null){this.htmlGroup.visible=e;for(let n of this.groups.values())n.setVisible(e);for(let n of this.entries.values())this.groupChildIds.has(n.id)||(n.object.visible=e);for(let n of this.canvases.values())n.setVisible(e);return}for(let n of this.groups.values())n.layer===t&&n.setVisible(e);for(let n of this.entries.values())this.groupChildIds.has(n.id)||n.layer===t&&(n.object.visible=e);for(let n of this.canvases.values())n.layer===t&&n.setVisible(e)}setHitTestEnabled(e){this._hitTestEnabled=e,this.syncHitTest()}syncHitTest(){let e=this._hitTestEnabled?"auto":"none";for(let t of this.groups.values())for(let n of t.children){if(T5(n.element)){n.element.style.pointerEvents=this._hitTestEnabled?"":"none";continue}n.element.style.pointerEvents=e}for(let t of this.entries.values())this.groupChildIds.has(t.id)||(t.element.style.pointerEvents=e)}selectGroup(e,t=!0){var n;let i=this.groups.get(e);if(!i)return!1;if(t)for(let o of[...this.selectedGroupIds])o!==e&&((n=this.groups.get(o))==null||n.setSelected(!1),this.selectedGroupIds.delete(o));else if(this.selectedGroupIds.has(e))return!1;return this.selectedGroupIds.has(e)?!1:(Vq(),this.selectedGroupIds.add(e),i.setSelected(!0),!0)}deselectGroup(e){let t=this.groups.get(e);return!t||!this.selectedGroupIds.has(e)?!1:(t.setSelected(!1),this.selectedGroupIds.delete(e),!0)}deselectAll(){var e;if(this.selectedGroupIds.size!==0){for(let t of this.selectedGroupIds)(e=this.groups.get(t))==null||e.setSelected(!1);this.selectedGroupIds.clear()}}hasSelection(){return this.selectedGroupIds.size>0}deleteSelected(){if(this.selectedGroupIds.size===0)return!1;let e=[...this.selectedGroupIds],t=!1;for(let n of e)this.groups.has(n)&&(this.remove(n),t=!0);return t}dispose(){this.clear(),this.scene.remove(this.htmlGroup)}addGroup(e){this.remove(e.id),this.groups.set(e.id,e);for(let t of e.children)this.groupChildIds.add(t.id),this.addElement(t);e.selectable&&Vq(),e.bindSelection(t=>{this.selectGroup(t.id)}),this.applyItemLayoutVisibility(e),this.syncHitTest()}removeGroup(e){this.selectedGroupIds.has(e.id)&&(e.setSelected(!1),this.selectedGroupIds.delete(e.id)),this.groups.delete(e.id);for(let t of[...e.children])this.groupChildIds.delete(t.id),this.removeElement(t.id);e.dispose()}detachGroup(e){this.selectedGroupIds.has(e.id)&&(e.setSelected(!1),this.selectedGroupIds.delete(e.id)),this.groups.delete(e.id),e.unbindSelection(),e.setVisible(!1);for(let t of[...e.children])this.groupChildIds.delete(t.id),this.unpublishElement(t.id)}addElement(e){this.removeElement(e.id),this.bindViewSyncedTransform(e),this.entries.set(e.id,e),this._baselineMatrices.set(e.id,e.object.matrix.clone()),this.htmlGroup.add(e.object),this.groupChildIds.has(e.id)||this.applyItemLayoutVisibility(e)}removeElement(e){let t=this.entries.get(e);t&&(this.htmlGroup.remove(t.object),t.dispose(),this.entries.delete(e),this._baselineMatrices.delete(e))}unpublishElement(e){let t=this.entries.get(e);t&&(this.htmlGroup.remove(t.object),this.entries.delete(e),this._baselineMatrices.delete(e))}addCanvas(e){this.remove(e.id),this.canvases.set(e.id,e),this.applyItemLayoutVisibility(e)}removeCanvas(e){let t=this.canvases.get(e);t&&(this.canvases.delete(e),t.dispose())}applyLayoutVisibility(){for(let e of[...this.selectedGroupIds]){let t=this.groups.get(e);t?.layoutId!=null&&this._activeLayoutId!=null&&t.layoutId!==this._activeLayoutId&&(t.setSelected(!1),this.selectedGroupIds.delete(e))}for(let e of this.groups.values())this.applyItemLayoutVisibility(e);for(let e of this.entries.values())this.groupChildIds.has(e.id)||this.applyItemLayoutVisibility(e);for(let e of this.canvases.values())this.applyItemLayoutVisibility(e)}applyItemLayoutVisibility(e){if(e.layoutId==null||this._activeLayoutId==null)return;let t=e.layoutId===this._activeLayoutId;e instanceof Wf||e instanceof _o?e.setVisible(t):e.object.visible=t}bindViewSyncedTransform(e){let t=e.object;t.onAfterRender=(n,i,o)=>{let a=1;if(e.scaleWithView&&o.isOrthographicCamera===!0){let c=o.zoom;(e.baseZoom==null||e.baseZoom===0)&&(e.baseZoom=c),a=c/e.baseZoom}t.matrix.decompose(FTe,NTe,c5);let s=c5.x*a,l=c5.y*a;s===1&&l===1||(t.element.style.transform+=` scale(${s}, ${l})`)}}},G_=class{constructor(e){this._baselineMatrices=new Map,this._composedMatrix=new vt,this.scene=e,this.transientGroup=new Zn,this.transientGroup.name="Transient_Object_Group",this.scene.add(this.transientGroup),this.entities=new Map}clear(){for(let e of this.entities.values())e.dispose();this.entities.clear(),this._baselineMatrices.clear(),this.transientGroup.clear()}add(e){let t=e.objectId,n=this.entities.get(t);n&&(this.transientGroup.remove(n),n.dispose()),this.entities.set(t,e),this._baselineMatrices.set(t,e.matrix.clone()),this.transientGroup.add(e)}update(e){let t=this.entities.get(e.objectId);t&&(this.transientGroup.remove(t),t.dispose()),this.entities.set(e.objectId,e),this._baselineMatrices.set(e.objectId,e.matrix.clone()),this.transientGroup.add(e)}remove(e){let t=this.entities.get(e);t&&(this.transientGroup.remove(t),Wn.disposeObject(t),this.entities.delete(e),this._baselineMatrices.delete(e))}applyTransforms(e){let t=!1;for(let{id:n,matrix:i}of e){let o=this.entities.get(n);if(!o)continue;let a=this._baselineMatrices.get(n),s=this._composedMatrix.copy(i);a&&s.multiply(a),!o.matrix.equals(s)&&(o.matrix.copy(s),o.matrixAutoUpdate=!1,o.updateMatrixWorld(!0),t=!0)}return t}get(e){return this.entities.get(e)}has(e){return this.entities.has(e)}setVisible(e){this.transientGroup.visible=e}dispose(){this.clear(),this.scene.remove(this.transientGroup)}},zTe=0,H_=class{constructor(e){this.previewGroup=new Zn,this.previewGroup.name="Entity_Preview_Group",e.add(this.previewGroup),this.handles=new Map}add(e){NEe(e).entityPreviewRoot=!0;let t={id:`entity-preview-${++zTe}`,root:e};return this.handles.set(t.id,t),this.previewGroup.add(e),t}update(e,t){let n=this.handles.get(e);return!n||n.root.matrix.equals(t)?!1:(n.root.matrix.copy(t),n.root.matrixAutoUpdate=!1,n.root.updateMatrixWorld(!0),!0)}remove(e){let t=this.handles.get(e);return t?(this.previewGroup.remove(t.root),hb(t.root),this.handles.delete(e),!0):!1}clear(){for(let e of[...this.handles.keys()])this.remove(e)}dispose(){this.clear(),this.previewGroup.removeFromParent()}},IZ=class{constructor(e){this.cache={},this.keyToTraits={},this.options=e}getStats(){let e=Object.keys(this.cache),t=e.length;if(t===0)return{count:0,estimatedBytes:0};let n=e[0],i=N_.estimateObjectSize(this.cache[n]),o=N_.estimateObjectSize(this.keyToTraits[n]);return{count:t,estimatedBytes:(i+o)*t}}getMaterial(e,t,n,i){let o=this.buildKey(e,t);if(this.keyToTraits[o]||(this.keyToTraits[o]=this.cloneTraits({...e,...t})),this.cache[o]){let a=this.cache[o];if(e.color.isByLayer&&typeof n=="number"&&Jn(a).isForeground!==!0){let s=i??new je().setRGBValue(n);this.refreshMaterialResolvedColor(a,{color:s})}return a}return this.createMaterial(o,e,t,void 0,n,i)}updateLayerMaterial(e,t){var n;let i={};for(let o of Object.keys(this.cache)){let a=this.cache[o],s=Jn(a),l=this.keyToTraits[o];if(!l)continue;let c=this.resolveByLayerBindings(l,a);if(!(s.layer===e&&(F_(s)||F_(c)||this.shouldInheritLayerColor(l,c,a))))continue;let u=this.cloneTraits(l);this.applyInheritedLayerTraits(u,t,c,a),t.layer!=null&&(u.layer=t.layer);let h=this.buildKey(u,u),d=a.id;if(h===o){c.isByLayerColor&&t.color&&this.refreshMaterialResolvedColor(a,t),this.keyToTraits[o]=u,i[d]=a;continue}a.dispose(),delete this.cache[o],delete this.keyToTraits[o];let p=(n=t.color)==null?void 0:n.RGB,f=this.createMaterial(h,u,u,c,typeof p=="number"?p:void 0,t.color);this.keyToTraits[h]=u,i[d]=f}return i}changeForeground(e){for(let t of Object.keys(this.cache)){let n=this.cache[t];Jn(n).isForeground!==!0||!this.keyToTraits[t]||cr.setMaterialColor(n,new $e(e))}}changeBackground(e){for(let t of Object.keys(this.cache)){let n=this.cache[t];Jn(n).isBackgroundFill!==!0||!this.keyToTraits[t]||cr.setMaterialColor(n,new $e(e))}}dispose(){Object.values(this.cache).forEach(e=>e.dispose()),this.cache={},this.keyToTraits={}}getBackSideVariant(e){return e}getLayerBoundMaterial(e,t,n){var i;let o=Jn(e).materialKey;if(!o)return;let a=this.keyToTraits[o];if(!a)return;if(a.layer===t&&!n)return e;let s={...this.cloneTraits(a),layer:t},l=this.resolveByLayerBindings(a,e);this.applyInheritedLayerTraits(s,n,l,e);let c=this.buildKey(s,s);if(this.cache[c]){let h=this.cache[c];return s.color.isByLayer&&n!=null&&n.color&&Jn(h).isByLayerColor&&this.refreshMaterialResolvedColor(h,n),h}this.keyToTraits[c]=s;let u=(i=n?.color)==null?void 0:i.RGB;return this.createMaterial(c,s,s,l,typeof u=="number"?u:void 0,n?.color)}cloneTraits(e){var t,n;let i=Xc(e);return(t=e.color)!=null&&t.clone&&(i.color=e.color.clone()),(n=e.transparency)!=null&&n.clone&&(i.transparency=e.transparency.clone()),i}applyInheritedLayerTraits(e,t,n,i){if(!t)return;let o=n?.isByLayerLineType===!0,a=n?.isByLayerLineWeight===!0,s=n?.isByLayerTransparency===!0;this.shouldInheritLayerColor(e,n,i)&&t.color&&!e.color.isByLayer&&(e.color=t.color.clone()),o&&t.lineType&&(e.lineType=Xc(t.lineType)),a&&t.lineWeight!=null&&(e.lineWeight=t.lineWeight),s&&t.transparency&&(e.transparency=Xc(t.transparency))}shouldInheritLayerColor(e,t,n){var i,o;let a=n?Jn(n):void 0;return t?.isByLayerColor===!0||((i=e.color)==null?void 0:i.isByLayer)===!0||a?.isByLayerColor===!0?!0:a?.isByLayerColor===!1?!!((o=e.color)!=null&&o.isByLayer):a?.isForeground===!0?!1:this.hasByLayerKeyTraits(e)}resolveByLayerBindings(e,t){var n;let i=t?Jn(t):void 0,o=((n=e.transparency)==null?void 0:n.isByLayer)===!0;return{isByLayerColor:i?.isByLayerColor===!0||e.color.isByLayer===!0&&i?.isForeground!==!0,isByLayerLineType:i?.isByLayerLineType??e.lineType.type==="ByLayer",isByLayerLineWeight:i?.isByLayerLineWeight??e.lineWeight===$r.ByLayer,isByLayerTransparency:i?.isByLayerTransparency??o}}createMaterial(e,t,n,i,o,a){let s=this.createMaterialImpl(t,n,o),l=this.shouldTrackForeground(t,n)||t.color.isByLayer&&a?.isForeground===!0&&this.shouldTrackForeground({...t,color:a},n),c=this.shouldTrackBackground(t,n);l?cr.setMaterialColor(s,new $e(Ta(this.options.currentBackgroundColor))):c&&cr.setMaterialColor(s,new $e(this.options.currentBackgroundColor));let u=i??this.resolveByLayerBindings(t);return bd(s,{layer:t.layer,isByLayerColor:u.isByLayerColor,isByLayerLineType:u.isByLayerLineType,isByLayerLineWeight:u.isByLayerLineWeight,isByLayerTransparency:u.isByLayerTransparency,isForeground:l,isBackgroundFill:c,drawOrder:t.drawOrder??0,materialKey:e}),this.cache[e]=s,s}hasByLayerKeyTraits(e){return e.color.isByLayer||e.lineType.type==="ByLayer"}shouldTrackForeground(e,t){return e.color.isForeground}shouldTrackBackground(e,t){return!1}buildDrawOrderSuffix(e){return e.drawOrder===0?"":`_draw_${e.drawOrder??0}`}resolveTraitsRgb(e){return Kv(e,this.options.currentBackgroundColor)}resolveMaterialRgb(e,t){return e.color.isByLayer&&typeof t=="number"?t:this.resolveTraitsRgb(e)}buildKeyColorSegment(e){return e.color.toString()}refreshMaterialResolvedColor(e,t){let n=t.color;if(!n)return;if(n.isForeground){bd(e,{isForeground:!0}),cr.setMaterialColor(e,new $e(Ta(this.options.currentBackgroundColor)));return}let i=n.RGB;typeof i=="number"&&(Jn(e).isForeground===!0&&bd(e,{isForeground:!1}),cr.setMaterialColor(e,new $e(i)))}};IZ.CameraZoomUniform={value:1};var Yf=IZ,W_=class{constructor(e){this._camera=e}get position(){return this._camera.position}get left(){return this._camera.left}set left(e){this._camera.left=e}get right(){return this._camera.right}set right(e){this._camera.right=e}get top(){return this._camera.top}set top(e){this._camera.top=e}get bottom(){return this._camera.bottom}set bottom(e){this._camera.bottom=e}get zoom(){return this._camera.zoom}set zoom(e){this._camera.zoom=e}get internalCamera(){return this._camera}lookAt(e){this._camera.lookAt(e)}setRotationFromEuler(e){this._camera.setRotationFromEuler(e)}updateProjectionMatrix(){this._camera.updateProjectionMatrix()}screenToWorld(e,t,n){let i=new U(e.x,e.y,0);i.x=e.x/t*2-1,i.y=-(e.y/n)*2+1;let o=i.unproject(this._camera);return new Z(o.x,o.y)}worldToScreen(e,t,n){let i=new U(e.x,e.y,0).project(this._camera);return new Z((i.x+1)/2*t,(-i.y+1)/2*n)}wcs2Ndc(e,t,n){let i=this.worldToScreen(e,t,n);return this.cwcs2Ndc(i,t,n)}cwcs2Ndc(e,t,n){return new Z(e.x/t*2-1,-(e.y/n)*2+1)}},$f=class r{constructor(e){this._renderer=e}capture(e,t){var n;let i=Math.max(1,Math.round(t.width)),o=Math.max(1,Math.round(t.height)),a=t.margin??1.1,s=r.resolvePreviewBounds(e,t.bounds,a);if(!s)return null;let l=this._renderer,c=l.internalRenderer,u=r.saveRendererState(l,c,t),h=t.backgroundColor??l.currentBackgroundColor,d=t.backgroundAlpha??l.clearAlpha,{drawable:p,ownsClone:f}=r.prepareDrawable(e),m=new Yh;m.add(p);let g=new Ga(-1,1,1,-1,.1,1e3);g.position.z=10,r.fitExportCamera(g,s,i,o);let y,b;try{c.setPixelRatio(1),l.autoClear=!0,t.localLineResolutionOnly||l.updateLineResolution(i,o),l.setClearColor(h,d),r.syncDrawableLineResolution(p,i,o),y=new Go(i,o,{minFilter:xi,magFilter:xi,format:oi,type:pa}),c.setRenderTarget(y),c.setViewport(0,0,i,o),c.setScissorTest(!1),l.render(m,new W_(g));let v=new Uint8Array(i*o*4);c.readRenderTargetPixels(y,0,0,i,o,v),b=r.createCanvasFromPixels(r.flipPixelsVertically(v,i,o),i,o)}finally{m.remove(p),f&&r.disposeObjectTree(p),y?.dispose(),r.restoreRendererState(l,c,u),(n=t.onRestored)==null||n.call(t)}return b?{canvas:b,bounds:s}:null}static box3ToBounds2d(e,t=1.1){return e.isEmpty()||!r.isFiniteBox3(e)?null:r.expandBox3ToBox2d(e,t)}static computeObjectBounds2d(e,t=1.1){e.updateMatrixWorld(!0);let n=new Ne,i=new Ne;return e.traverse(o=>{if(!r.isLeafDrawable(o))return;let a=o.geometry;a&&(a.boundingBox||a.computeBoundingBox(),!(!a.boundingBox||!r.isFiniteBox3(a.boundingBox))&&(i.copy(a.boundingBox).applyMatrix4(o.matrixWorld),n.union(i)))}),n.isEmpty()||!r.isFiniteBox3(n)?null:r.expandBox3ToBox2d(n,t)}static computeObjectBounds2dFromObject(e,t=1.1){e.updateMatrixWorld(!0);let n=new Ne().setFromObject(e);return n.isEmpty()||!r.isFiniteBox3(n)?null:r.expandBox3ToBox2d(n,t)}static fitExportCamera(e,t,n,i){let o=new Ut;t.getSize(o);let a=new Ut;t.getCenter(a);let s=Math.max(Math.abs(o.x),Number.EPSILON),l=Math.max(Math.abs(o.y),Number.EPSILON),c=n/Math.max(i,1),u=i/2,h=Math.min(2*c*u/s,2*u/l);e.left=-c*u,e.right=c*u,e.top=u,e.bottom=-u,e.position.set(a.x,a.y,e.position.z),e.zoom=h,e.updateProjectionMatrix()}static resolvePreviewBounds(e,t,n){let i=t??r.computeObjectBounds2d(e,n);return i?(t&&n!==1&&(i=r.expandBox2d(t,n)),i):null}static prepareDrawable(e){let t=e.parent!=null;return{drawable:t?e.clone(!0):e,ownsClone:t}}static syncLineMaterialsResolution(e,t,n){r.syncDrawableLineResolution(e,t,n)}static syncDrawableLineResolution(e,t,n){let i=new Le(t,n);e.traverse(o=>{let a=o.material;if(a){if(Array.isArray(a)){a.forEach(s=>{s instanceof wr&&s.resolution.copy(i)});return}a instanceof wr&&a.resolution.copy(i)}})}static saveRendererState(e,t,n){let i=new $e;return t.getClearColor(i),{pixelRatio:t.getPixelRatio(),renderTarget:t.getRenderTarget(),scissorTest:t.getScissorTest(),viewport:t.getViewport(new yn),size:t.getSize(new Le),clearColor:i,clearAlpha:t.getClearAlpha(),autoClear:e.autoClear,cameraZoom:Yf.CameraZoomUniform.value,viewportSize:n.viewportSize,localLineResolutionOnly:n.localLineResolutionOnly}}static restoreRendererState(e,t,n){t.setRenderTarget(n.renderTarget),e.setClearColor(n.clearColor.getHex(),n.clearAlpha),e.autoClear=n.autoClear,t.setPixelRatio(n.pixelRatio),n.viewportSize?e.setSize(n.viewportSize.width,n.viewportSize.height):n.localLineResolutionOnly||e.updateLineResolution(n.size.x,n.size.y),e.syncCameraZoom(n.cameraZoom),t.setViewport(n.viewport.x,n.viewport.y,n.viewport.z,n.viewport.w),t.setScissorTest(n.scissorTest)}static isLeafDrawable(e){let t=e;return!t.geometry||!t.material?!1:!e.children.some(n=>!!n.material)}static isFiniteBox3(e){return Number.isFinite(e.min.x)&&Number.isFinite(e.min.y)&&Number.isFinite(e.max.x)&&Number.isFinite(e.max.y)}static expandBox3ToBox2d(e,t){let n=e.getCenter(new U),i=e.getSize(new U),o=Math.max(Math.abs(i.x),Number.EPSILON)*t/2,a=Math.max(Math.abs(i.y),Number.EPSILON)*t/2;return new ct(new Z(n.x-o,n.y-a),new Z(n.x+o,n.y+a))}static expandBox2d(e,t){let n=new Ut;e.getSize(n);let i=new Ut;e.getCenter(i);let o=Math.max(Math.abs(n.x),Number.EPSILON)*t/2,a=Math.max(Math.abs(n.y),Number.EPSILON)*t/2;return new ct(new Z(i.x-o,i.y-a),new Z(i.x+o,i.y+a))}static flipPixelsVertically(e,t,n){let i=new Uint8Array(t*n*4);for(let o=0;o<n;o++){let a=(n-1-o)*t*4,s=o*t*4;i.set(e.subarray(a,a+t*4),s)}return i}static createCanvasFromPixels(e,t,n){let i=document.createElement("canvas");i.width=t,i.height=n;let o=i.getContext("2d");if(!o)throw new Error("Failed to acquire 2D canvas context for entity preview");let a=o.createImageData(t,n);return a.data.set(e),o.putImageData(a,0,0),i}static disposeObjectTree(e){e.traverse(t=>{var n;(n=t.geometry)==null||n.dispose()}),e.removeFromParent()}},FC=class extends x_{onFontUrlChanged(e){Yo.getInstance().setFontUrl(e)}},UTe={LINEAR:0,CYLINDER:1,INVCYLINDER:2,SPHERICAL:3,INVSPHERICAL:4,HEMISPHERICAL:5,INVHEMISPHERICAL:6,CURVED:7,INVCURVED:8};function jTe(r,e,t,n=ua){let i=new $e(r.startColor??t.getHex()),o=new $e(r.endColor??GTe(i,r.oneColorMode,r.shadeTintValue)),a=UTe[(r.name||"LINEAR").trim().toUpperCase()]??0;return VTe({startColor:i.getHex(),endColor:o.getHex(),angle:r.angle??0,shift:r.shift??0,gradientType:a},n)}function VTe(r,e=ua){let t={u_startColor:{value:new $e(r.startColor)},u_endColor:{value:new $e(r.endColor)},u_angle:{value:r.angle},u_shift:{value:r.shift},u_gradientType:{value:r.gradientType}},n=`
  4100. attribute vec2 gradientPosition;
  4101. varying vec2 v_gradientPosition;
  4102. #include <clipping_planes_pars_vertex>
  4103. void main() {
  4104. v_gradientPosition = gradientPosition;
  4105. #include <begin_vertex>
  4106. #include <project_vertex>
  4107. #include <clipping_planes_vertex>
  4108. }`,i=`
  4109. precision highp float;
  4110. uniform vec3 u_startColor;
  4111. uniform vec3 u_endColor;
  4112. uniform float u_angle;
  4113. uniform float u_shift;
  4114. uniform int u_gradientType;
  4115. varying vec2 v_gradientPosition;
  4116. #include <clipping_planes_pars_fragment>
  4117. const float EPSILON = 1e-6;
  4118. vec2 rotate(vec2 samplePos, float angle) {
  4119. float s = sin(angle);
  4120. float c = cos(angle);
  4121. return vec2(c * samplePos.x - s * samplePos.y, c * samplePos.y + s * samplePos.x);
  4122. }
  4123. float saturate(float value) {
  4124. return clamp(value, 0.0, 1.0);
  4125. }
  4126. float getGradientFactor(vec2 localPos) {
  4127. vec2 shiftedPos = localPos - vec2(clamp(u_shift, -1.0, 1.0), 0.0);
  4128. float linear = saturate(shiftedPos.x * 0.5 + 0.5);
  4129. float cylinder = saturate(1.0 - abs(shiftedPos.x));
  4130. float radial = saturate(length(shiftedPos));
  4131. float curved = smoothstep(0.0, 1.0, linear);
  4132. float hemi = saturate(1.0 - length(shiftedPos - vec2(0.0, -1.0)) * 0.5);
  4133. if (u_gradientType == 1) {
  4134. return cylinder;
  4135. }
  4136. if (u_gradientType == 2) {
  4137. return 1.0 - cylinder;
  4138. }
  4139. if (u_gradientType == 3) {
  4140. return 1.0 - radial;
  4141. }
  4142. if (u_gradientType == 4) {
  4143. return radial;
  4144. }
  4145. if (u_gradientType == 5) {
  4146. return hemi;
  4147. }
  4148. if (u_gradientType == 6) {
  4149. return 1.0 - hemi;
  4150. }
  4151. if (u_gradientType == 7) {
  4152. return curved;
  4153. }
  4154. if (u_gradientType == 8) {
  4155. return 1.0 - curved;
  4156. }
  4157. return linear;
  4158. }
  4159. void main() {
  4160. #include <clipping_planes_fragment>
  4161. vec2 localPos = rotate(v_gradientPosition, -u_angle);
  4162. float factor = saturate(getGradientFactor(localPos));
  4163. gl_FragColor = vec4(mix(u_startColor, u_endColor, factor), 1.0);
  4164. #include <colorspace_fragment>
  4165. }`;return new Kn({uniforms:t,vertexShader:n,fragmentShader:i,side:e})}function GTe(r,e=!1,t=0){if(!e)return 16777215;let n=Math.abs(uf.clamp(t,-1,1))||.5,i=t<0?new $e(0):new $e(16777215);return r.clone().lerp(i,n).getHex()}function Gq(r){return r?{minX:AC(r.minX,0),minY:AC(r.minY,0),maxX:AC(r.maxX,1),maxY:AC(r.maxY,1)}:{minX:0,minY:0,maxX:1,maxY:1}}function AC(r,e){return Number.isFinite(r)?r:e}var Hq=6,NC="acTrPatternTextureRefCount";function HTe(r){let e=r.userData;e[NC]=(e[NC]??0)+1}function WTe(r){let e=r.userData,t=(e[NC]??1)-1;e[NC]=t,t<=0&&r.dispose()}function LZ(r,e){HTe(e),r.addEventListener("dispose",()=>{WTe(e)}),r.clone=function(){let t=Kn.prototype.clone.call(this);return t.uniforms.u_patternData.value=e,LZ(t,e),t}}function XTe(r,e){let t=Hq+e,n=Math.max(1,Math.ceil(t/4)),i=Math.max(1,r.length),o=new Float32Array(n*i*4);for(let s=0;s<r.length;s++){let l=r[s],c=s*n*4;o[c]=l.angle,o[c+1]=l.base.x,o[c+2]=l.base.y,o[c+3]=l.offset.x,o[c+4]=l.offset.y,o[c+5]=l.patternLength;for(let u=0;u<e;u++)o[c+Hq+u]=l.dashLengths[u]??0}let a=new $h(o,n,i,oi,Wa);return a.magFilter=Ur,a.minFilter=Ur,a.wrapS=bl,a.wrapT=bl,a.generateMipmaps=!1,a.needsUpdate=!0,"colorSpace"in a&&(a.colorSpace=Es),{texture:a,texelsPerLine:n}}function YTe(r,e,t,n,i=0,o=ua){let a=Math.max(2,...r.map(f=>f.dashLengths.length)),{texture:s,texelsPerLine:l}=XTe(r,a),c=Math.max(1,r.length),u={u_cameraZoom:t,u_patternLines:{value:r},u_patternData:{value:s},u_patternLineCount:{value:c},u_texelsPerLine:{value:l},u_patternAngle:{value:e},u_color:{value:n}},h=`
  4166. varying vec3 v_pos;
  4167. #include <clipping_planes_pars_vertex>
  4168. void main() {
  4169. //vec4 worldPosition = modelMatrix * vec4(position, 1.0);
  4170. v_pos = position;
  4171. #include <begin_vertex>
  4172. #include <project_vertex>
  4173. #include <clipping_planes_vertex>
  4174. }`,d=`
  4175. precision highp float;
  4176. uniform mat4 modelMatrix;
  4177. uniform float u_cameraZoom;
  4178. uniform vec3 u_color;
  4179. varying vec3 v_pos;
  4180. struct PatternLine {
  4181. float angle;
  4182. vec2 base;
  4183. vec2 offset;
  4184. float dashLengths[MAX_PATTERN_SEGMENT_COUNT];
  4185. float patternLength;
  4186. };
  4187. uniform sampler2D u_patternData;
  4188. uniform float u_patternLineCount;
  4189. uniform float u_texelsPerLine;
  4190. uniform float u_patternAngle;
  4191. #include <clipping_planes_pars_fragment>
  4192. // Clamp [0..1] range
  4193. #define saturate(a) clamp(a, 0.0, 1.0)
  4194. const float MAX_THICKNESS = 1000.0; // If line thickness exceeds this, use solid fill instead of pattern
  4195. const float EPSILON = 1e-6;
  4196. vec2 getWorldScale() {
  4197. return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz));
  4198. }
  4199. // Rotate a 2D point by rotation angle (in radians)
  4200. vec2 rotate(vec2 samplePos, float angle) {
  4201. float s = sin(angle);
  4202. float c = cos(angle);
  4203. return vec2(c * samplePos.x - s * samplePos.y, c * samplePos.y + s * samplePos.x);
  4204. }
  4205. vec2 translate(vec2 samplePosition, vec2 offset) {
  4206. //move sample point in the opposite direction that we want to move shapes in
  4207. return samplePosition - offset;
  4208. }
  4209. vec2 scale(vec2 samplePosition, float scale) {
  4210. return samplePosition / scale;
  4211. }
  4212. vec4 fetchPatternTexel(float lineIndex, float texelIndex) {
  4213. vec2 uv = vec2(
  4214. (texelIndex + 0.5) / u_texelsPerLine,
  4215. (lineIndex + 0.5) / u_patternLineCount
  4216. );
  4217. return texture2D(u_patternData, uv);
  4218. }
  4219. PatternLine loadPatternLine(float lineIndex) {
  4220. PatternLine pl;
  4221. vec4 t0 = fetchPatternTexel(lineIndex, 0.0);
  4222. vec4 t1 = fetchPatternTexel(lineIndex, 1.0);
  4223. pl.angle = t0.r;
  4224. pl.base = t0.gb;
  4225. pl.offset = vec2(t0.a, t1.r);
  4226. pl.patternLength = t1.g;
  4227. // Dash lengths start at float index 6 (t1.ba, then subsequent texels).
  4228. // Do not use three.js unroll_loop here: it only rewrites [i] /
  4229. // UNROLLED_LOOP_INDEX, so float(i) would become an undeclared
  4230. // identifier and the fragment shader would fail to compile.
  4231. for (int i = 0; i < ${a}; i++) {
  4232. float floatIndex = float(i) + 6.0;
  4233. float texelIndex = floor(floatIndex / 4.0);
  4234. float comp = mod(floatIndex, 4.0);
  4235. vec4 t = fetchPatternTexel(lineIndex, texelIndex);
  4236. if (comp < 0.5) pl.dashLengths[i] = t.r;
  4237. else if (comp < 1.5) pl.dashLengths[i] = t.g;
  4238. else if (comp < 2.5) pl.dashLengths[i] = t.b;
  4239. else pl.dashLengths[i] = t.a;
  4240. }
  4241. return pl;
  4242. }
  4243. // signed distance from point samplePos to infinite line (a->b)
  4244. float sdfLine(vec2 samplePos, vec2 a, vec2 b) {
  4245. vec2 ap = samplePos - a;
  4246. vec2 ab = b - a;
  4247. return abs((ap.x * ab.y) - (ab.x * ap.y)) / max(length(ab), EPSILON);
  4248. }
  4249. // Draw a repeated line pattern in object/world space with smooth anti-aliasing.
  4250. float drawSpaceLine(vec2 samplePos, float distanceBetweenLines, float thick) {
  4251. float dist = sdfLine(samplePos, vec2(0.0, 0.0), vec2(1.0, 0.0));
  4252. // compute fractional distance to nearest repeated line center
  4253. float normalizedDist = dist / max(distanceBetweenLines, EPSILON);
  4254. float lineDistance = abs(fract(normalizedDist + 0.5) - 0.5) * distanceBetweenLines;
  4255. // opacity: 0.0 = don't draw, 1.0 = draw
  4256. float opacity = 1.0 - step(thick, lineDistance);
  4257. return opacity;
  4258. }
  4259. float drawSolidLine(PatternLine patternLine, float thick) {
  4260. vec2 base = patternLine.base;
  4261. vec2 offset = patternLine.offset;
  4262. // Below ~1px of spacing, dist / distanceBetweenLines (in drawSpaceLine)
  4263. // grows past float32's fractional precision and fract() returns noise,
  4264. // discarding the fill entirely instead of thinning it. Floor the spacing
  4265. // at the line's own stroke thickness so lines that would visually merge
  4266. // degrade into a solid tone, matching how this prints/renders in AutoCAD.
  4267. float distanceBetweenLines = max(length(offset), thick);
  4268. base = rotate(base, u_patternAngle);
  4269. vec2 samplePos = rotate(v_pos.xy - base, -(patternLine.angle + u_patternAngle));
  4270. return drawSpaceLine(samplePos, distanceBetweenLines, thick);
  4271. }
  4272. int getPatternIndex(PatternLine patternLine, float linePosition, float thick, out float distance) {
  4273. if (patternLine.patternLength <= 0.0) {
  4274. return -1;
  4275. }
  4276. // Normalize linePosition to [0, patternLength) range
  4277. float patternRepeat = floor(linePosition / patternLine.patternLength);
  4278. linePosition -= patternLine.patternLength * patternRepeat;
  4279. // Use cumulative sum approach for better precision.
  4280. // Plain loop (not three.js unroll_loop): return i must stay a real
  4281. // loop index \u2014 unroll only rewrites [i] / UNROLLED_LOOP_INDEX.
  4282. float sum = 0.0;
  4283. for (int i = 0; i < ${a}; i++) {
  4284. float segmentLength = abs(patternLine.dashLengths[i]);
  4285. // A dash length of 0 is AutoCAD's "dot" marker: a zero-length
  4286. // element that consumes no along-line distance (sum still
  4287. // advances by the real, zero, segmentLength -- the pattern's
  4288. // period is unaffected), but a zero-width hit-test window can
  4289. // never actually be sampled. Give only dots a hittable window
  4290. // sized to the stroke thickness (same floor as #727's sub-pixel
  4291. // spacing fix); real dashes keep their exact length.
  4292. float hitWindow = segmentLength == 0.0 ? thick : segmentLength;
  4293. if (linePosition <= sum + hitWindow + EPSILON) {
  4294. distance = linePosition - sum;
  4295. // Clamp distance to avoid negative values due to precision
  4296. distance = max(0.0, distance);
  4297. return i;
  4298. }
  4299. sum += segmentLength;
  4300. // Trailing pads are zeros beyond the real dash list; once the
  4301. // cumulative length covers the pattern period we are done.
  4302. if (sum >= patternLine.patternLength - EPSILON) {
  4303. return -1;
  4304. }
  4305. }
  4306. return -1;
  4307. }
  4308. float drawDashedLine(PatternLine patternLine, float thick){
  4309. float opacity = 0.0; // 0.0 = don't draw, 1.0 = draw
  4310. vec2 base = patternLine.base;
  4311. vec2 offset = patternLine.offset;
  4312. // See drawSolidLine: floor sub-pixel spacing at the stroke thickness
  4313. // so the fill degrades to a solid tone instead of vanishing.
  4314. float distanceBetweenLines = max(abs(offset.y), thick);
  4315. base = rotate(base, u_patternAngle);
  4316. vec2 samplePos = rotate(v_pos.xy - base, -(patternLine.angle + u_patternAngle));
  4317. float offsetX = 0.0;
  4318. if (abs(offset.y) > EPSILON) {
  4319. offsetX = samplePos.y * offset.x / offset.y;
  4320. }
  4321. float linePosition = samplePos.x - offsetX;
  4322. float distance = 0.0;
  4323. int index = getPatternIndex(patternLine, linePosition, thick, distance);
  4324. if (index < 0 || index >= ${a}) {
  4325. return opacity;
  4326. }
  4327. float size = patternLine.dashLengths[index];
  4328. if (size >= 0.0) {
  4329. // Dash segment: draw the line
  4330. opacity = drawSpaceLine(samplePos, distanceBetweenLines, thick);
  4331. // Try to solve the problem caused by the precision after zooming out by drawing a part of the dashed line
  4332. } else if (distance < thick) {
  4333. // Gap segment: draw only if very close to edge (for precision handling)
  4334. opacity = drawSpaceLine(samplePos, distanceBetweenLines, thick);
  4335. }
  4336. return opacity;
  4337. }
  4338. float drawLine(PatternLine patternLine, float thick) {
  4339. float opacity = 0.0;
  4340. if (patternLine.patternLength > 0.0) {
  4341. opacity = drawDashedLine(patternLine, thick);
  4342. } else {
  4343. opacity = drawSolidLine(patternLine, thick);
  4344. }
  4345. return opacity;
  4346. }
  4347. void main() {
  4348. #include <clipping_planes_fragment>
  4349. // Idealy, the thickness of lines in hatch pattern should always be 1 pixel.
  4350. // In Viewer2d, it uses orthographic camera and always in top view,
  4351. // so we adjust thickness by cameraZoom (and also consider worldScale).
  4352. // While 3d view is more complex, it can use perspective camera,
  4353. // its camera position and direction is flexible. We cannot keep line thickness
  4354. // in a fixed pixel any more, and there is no proper way to adjust thickness as camera
  4355. // position changes. So, we need to use a fixed thickness in world coordinates.
  4356. #if ${i} > 0
  4357. float thick = float(${i});
  4358. #else
  4359. vec2 worldScale = getWorldScale();
  4360. float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0;
  4361. // possible size of a pixel
  4362. float thick = (0.7 / averageScale) / u_cameraZoom;
  4363. #endif
  4364. if (thick > MAX_THICKNESS) {
  4365. gl_FragColor = vec4(u_color, 1.0);
  4366. #include <colorspace_fragment>
  4367. return;
  4368. }
  4369. float total = 0.0;
  4370. #if ${r.length} > 1
  4371. // Do not unroll: user patterns can have hundreds of line families (#743).
  4372. for (int i = 0; i < ${r.length}; i++) {
  4373. PatternLine pl = loadPatternLine(float(i));
  4374. float opacity = drawLine(pl, thick);
  4375. total += opacity;
  4376. }
  4377. #else
  4378. float opacity = drawLine(loadPatternLine(0.0), thick);
  4379. total += opacity;
  4380. #endif
  4381. total = saturate(total);
  4382. if (total < 0.001) {
  4383. discard;
  4384. }
  4385. gl_FragColor = vec4(u_color * total, 1.0);
  4386. #include <colorspace_fragment>
  4387. }
  4388. `,p=new Kn({uniforms:u,vertexShader:h,fragmentShader:d,clipping:!0,side:o,defines:{MAX_PATTERN_SEGMENT_COUNT:a}});return LZ(p,s),p}var MC=1e-9,$Te=new Le;function Wq(r,e,t,n){let i=Math.cos(t),o=Math.sin(t);return n.set(i*r-o*e,i*e+o*r)}function KTe(r,e,t,n,i){let o=Math.abs(e.y);if(o<=MC&&i<=MC)return;let a=t+n,s=Wq(r.x,r.y,-a,$Te);if(o>MC){let l=Math.round(s.y/o);s.y-=l*o,s.x-=l*e.x}i>MC?s.x-=Math.round(s.x/i)*i:s.x=0,Wq(s.x,s.y,a,r)}var k5=class extends Yf{getBackSideVariant(e){let t=Jn(e),n=t.materialKey;if(!n||t.side==="back")return e;let i=this.keyToTraits[n];return i?this.getMaterial(i,{...i,side:"back"}):e}shouldTrackForeground(e,t){var n;if(e.isBackgroundFill)return!1;let i=e.fillType,o=(e.drawOrder??0)<0&&!i.gradient&&(i.solidFill||!!((n=i.definitionLines)!=null&&n.length));return e.color.isForeground&&((e.drawOrder??0)>=0||o)}shouldTrackBackground(e,t){return e.isBackgroundFill===!0}createMaterialImpl(e,t,n){let i=e.fillType,o=t.side??"front",a=o==="back"?zi:ua,s=this.resolveMaterialRgb(e,n),l;return i.gradient?l=this.createGradientShaderMaterial(e,s,t,a):!i.definitionLines||i.definitionLines.length<1?l=this.createMeshBasicMaterial(s,a):i.definitionLines.some(c=>!this.isValidDefinitionLine(c))?(kt.warn("Invalid hatch pattern definition line, fallback to solid fill",i),l=this.createMeshBasicMaterial(s,a)):l=this.createHatchShaderMaterial(e,s,t,a),this.applyTransparency(l,e),bd(l,{side:o}),l}applyTransparency(e,t){let n=t.transparency;if(!n||typeof n.alpha!="number")return;let i=n.alpha;i>=255||(e.transparent=!0,e.opacity=Math.max(0,Math.min(1,i/255)),e.depthWrite=i>0)}createGradientShaderMaterial(e,t,n,i){return jTe(e.fillType.gradient,Gq(n.gradientBounds),new $e(t),i)}createHatchShaderMaterial(e,t,n,i){let o=e.fillType,a=2;o.definitionLines.forEach(u=>{a=Math.max(u.dashLengths.length,a)});let s=[],l=new Le;for(let u of o.definitionLines){let h=new Le(u.base.x,u.base.y).sub(n.rebaseOffset),d=new Le(u.offset.x,u.offset.y).rotateAround(l,-u.angle);if(d.y===0){kt.warn("offset.y is zero, skipping pattern line");continue}let p=u.dashLengths.length,f=[],m=0;for(let g=0;g<p;++g)f[g]=u.dashLengths[g],m+=Math.abs(f[g]);for(let g=p;g<a;++g)f[g]=0;KTe(h,d,u.angle,o.patternAngle,m),s.push({angle:u.angle,base:h,offset:d,dashLengths:f,patternLength:m})}let c=YTe(s,o.patternAngle,Yf.CameraZoomUniform,new $e(t),0,i);return c.defines={MAX_PATTERN_SEGMENT_COUNT:a},c}createMeshBasicMaterial(e,t){return new _i({color:e,side:t})}buildKey(e,t){let n=e.fillType,i=t.side==="back"?"_back":"",o=this.buildDrawOrderSuffix(e),a=e.isBackgroundFill?"_bgfill":"",s=this.buildKeyColorSegment(e);if(n.gradient){let h=n.gradient,d=Gq(t.gradientBounds);return["gradient",e.layer,s,h.name||"LINEAR",h.angle??0,h.shift??0,h.oneColorMode?1:0,h.shadeTintValue??0,h.startColor??"",h.endColor??"",d.minX,d.minY,d.maxX,d.maxY,`a${this.transparencyKey(e)}`,i,o,a].join("_")}let l=!n.definitionLines||n.definitionLines.length===0,c=this.transparencyKey(e);if(l)return`solid_${e.layer}_${s}_a${c}${i}${o}${a}`;let u=n.definitionLines.map(h=>{if(!this.isValidDefinitionLine(h))return"invalid";let d=h.dashLengths.join(","),p=Number.isFinite(h.angle)?h.angle:0,f=h.base.x,m=h.base.y,g=h.offset.x,y=h.offset.y;return`${d}@${p},${f},${m},${g},${y}`}).join("|");return["hatch",e.layer,s,n.patternAngle,t.rebaseOffset.x,t.rebaseOffset.y,u,`a${c}`,i,o,a].join("_")}transparencyKey(e){var t;let n=(t=e.transparency)==null?void 0:t.alpha;return typeof n=="number"?n:255}isValidDefinitionLine(e){var t,n,i,o;if(!e||typeof e!="object")return!1;let a=e;return Array.isArray(a.dashLengths)?(a.base={x:this.toFiniteNumber((t=a.base)==null?void 0:t.x,0),y:this.toFiniteNumber((n=a.base)==null?void 0:n.y,0)},a.offset={x:this.toFiniteNumber((i=a.offset)==null?void 0:i.x,0),y:this.toFiniteNumber((o=a.offset)==null?void 0:o.y,0)},a.angle=this.toFiniteNumber(a.angle,0),a.dashLengths=a.dashLengths.map(s=>this.toFiniteNumber(s,0)),!0):!1}toFiniteNumber(e,t=0){return Number.isFinite(e)?e:t}},zC=class{static createLineShaderMaterial(e,t,n,i,o){let a=0,s=[];for(let l=0;l<e.length;l++){let c=$5(e[l]);if(K_(c))continue;let u=e[l].elementLength*n;s.push(u),a+=Math.abs(u)}for(let l=0;l<s.length;l++)s[l]===0&&(s[l]=.5,a+=s[l]);return s.length===0&&(s.push(1),a=1),this.createLineShaderMaterialFromScaledPattern(s,a,t,i,o)}static createLineShaderMaterialFromScaledPattern(e,t,n,i,o){let a=pf.merge([We.common,{pattern:{value:e},patternLength:{value:t},u_color:{value:new $e(n)}}]);a.u_viewportScale={value:i},a.u_cameraZoom=o;let s=`
  4389. attribute float lineDistance;
  4390. varying float vLineDistance;
  4391. #include <clipping_planes_pars_vertex>
  4392. void main() {
  4393. vLineDistance = lineDistance;
  4394. #include <begin_vertex>
  4395. #include <project_vertex>
  4396. #include <clipping_planes_vertex>
  4397. }`,l=`
  4398. precision highp float;
  4399. uniform mat4 modelMatrix;
  4400. uniform vec3 diffuse;
  4401. uniform vec3 u_color;
  4402. uniform float opacity;
  4403. uniform float pattern[${e.length}];
  4404. uniform float patternLength;
  4405. uniform float u_viewportScale;
  4406. uniform float u_cameraZoom;
  4407. varying float vLineDistance;
  4408. #include <clipping_planes_pars_fragment>
  4409. vec2 getWorldScale() {
  4410. return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz));
  4411. }
  4412. void main() {
  4413. #include <clipping_planes_fragment>
  4414. // vec2 worldScale = getWorldScale();
  4415. // float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0;
  4416. // When zoomed out to a certain extent, it is displayed as a solid line.
  4417. if(patternLength * u_viewportScale * u_cameraZoom/1.5 < 1.0){
  4418. gl_FragColor = vec4(u_color, opacity);
  4419. #include <colorspace_fragment>
  4420. return;
  4421. }
  4422. float pos = mod(vLineDistance, patternLength * u_viewportScale);
  4423. for ( int i = 0; i < ${e.length}; i++ ) {
  4424. pos = pos - abs(pattern[i] * u_viewportScale);
  4425. if ( pos < 0.0 ) {
  4426. if ( pattern[i] > 0.0 ) {
  4427. gl_FragColor = vec4(u_color, opacity);
  4428. break;
  4429. }
  4430. discard;
  4431. }
  4432. }
  4433. #include <colorspace_fragment>
  4434. }`;return new Kn({uniforms:a,vertexShader:s,fragmentShader:l,clipping:!0})}},I5=class extends Yf{buildKey(e,t){let n=this.resolveLineWidth(e.lineWeight),i=this.getMaterialMode(e,t),o=this.buildDrawOrderSuffix(e),a=this.buildKeyColorSegment(e),s=t.fatLines?"_aaline":"";return i==="shader"?`${e.layer}_${i}_${e.lineType.name}_${a}_${e.lineTypeScale}_${n}${o}`:`${e.layer}_${i}_${a}_${n}${s}${o}`}isShaderMaterial(e,t){return t.fatLines?!1:!!(!t.basicMaterialOnly&&e.lineType.pattern&&e.lineType.pattern.length>0)}getMaterialMode(e,t){return t.fatLines?"fat":this.isShaderMaterial(e,t)?"shader":t.basicMaterialOnly?"basic":"fat"}createMaterialImpl(e,t={},n){let i,o=this.resolveMaterialRgb(e,n),a=this.getLineTypeScales(),s=a.ltscale*a.celtscale*e.lineTypeScale;if(this.isShaderMaterial(e,t))this.options.linePatternShaderBroken?i=this.createDashedFatLineMaterial(e,o,s):i=zC.createLineShaderMaterial(e.lineType.pattern,o,s,this.options.viewportScaleUniform,Yf.CameraZoomUniform);else if(!t.fatLines&&(t.basicMaterialOnly||e.lineWeight<0))i=new Fi({color:o});else{let l=new wr({color:o,linewidth:this.resolveLineWidth(e.lineWeight)});l.resolution.copy(this.options.resolution),i=l}return i}hasByLayerKeyTraits(e){return super.hasByLayerKeyTraits(e)||e.lineWeight===$r.ByLayer}resolveLineWidth(e){return e<0?1:Math.max(1,e/40)}createDashedFatLineMaterial(e,t,n){let i=0,o=0;for(let s of e.lineType.pattern){if(K_($5(s)))continue;let l=s.elementLength*n;l===0&&(l=.5),l>0?i+=l:o+=Math.abs(l)}i===0&&(i=.5);let a=new wr({color:t,linewidth:this.resolveLineWidth(e.lineWeight),dashed:!0,dashSize:i,gapSize:o});return a.resolution.copy(this.options.resolution),a}updateResolution(){let e=this.options.resolution;Object.values(this.cache).forEach(t=>{t instanceof wr&&t.resolution.copy(e)})}getLineTypeScales(){return{ltscale:this.options.ltscale||1,celtscale:this.options.celtscale||1}}},L5=class extends Yf{buildKey(e,t){let n=t.size??1,i=this.buildDrawOrderSuffix(e),o=this.buildKeyColorSegment(e);return`${e.layer}_${o}_${n}${i}`}hasByLayerKeyTraits(e){return e.color.isByLayer}createMaterialImpl(e,t={},n){return new tf({color:this.resolveMaterialRgb(e,n),size:t.size})}},O5=class{constructor(){this.options={ltscale:1,celtscale:1,viewportScaleUniform:1,maxFragmentUniforms:1024,resolution:new Le(1,1),showLineWeight:!1,linePatternShaderBroken:!1,currentBackgroundColor:cs},this._forceShowLineWeight=!1,this.unsupportedTextStyles={},this.pointMgr=new L5(this.options),this.lineMgr=new I5(this.options),this.fillMgr=new k5(this.options)}getPointsMaterial(e,t=2){return this.pointMgr.getMaterial(e,{size:t})}getLineMaterial(e,t,n,i,o){if(n)return this.lineMgr.getMaterial(e,{fatLines:!0},o,i);let a=!!(e.lineType.pattern&&e.lineType.pattern.length>0),s=!(this.options.showLineWeight||this._forceShowLineWeight)&&!a;return this.lineMgr.getMaterial(e,{basicMaterialOnly:t||s},o,i)}get showLineWeight(){return this.options.showLineWeight}set showLineWeight(e){this.options.showLineWeight=e}get forceShowLineWeight(){return this._forceShowLineWeight}set forceShowLineWeight(e){this._forceShowLineWeight=e}get currentBackgroundColor(){return this.options.currentBackgroundColor}set currentBackgroundColor(e){this.options.currentBackgroundColor=e,this.changeBackground(e),this.repaintForegroundMaterials(Ta(e))}getFillMaterial(e,t=Xq,n){return this.fillMgr.getMaterial(e,{rebaseOffset:t,gradientBounds:n})}getMTextFillMaterial(e,t=Xq,n,i){return this.fillMgr.getMaterial(e,{rebaseOffset:t},i,n)}getBackSideVariant(e){return this.fillMgr.getBackSideVariant(e)}updateLayerMaterial(e,t){return{...this.lineMgr.updateLayerMaterial(e,t),...this.pointMgr.updateLayerMaterial(e,t),...this.fillMgr.updateLayerMaterial(e,t)}}getLayerBoundMaterial(e,t,n){return this.lineMgr.getLayerBoundMaterial(e,t,n)||this.pointMgr.getLayerBoundMaterial(e,t,n)||this.fillMgr.getLayerBoundMaterial(e,t,n)||e}repaintForegroundMaterials(e){this.lineMgr.changeForeground(e),this.pointMgr.changeForeground(e),this.fillMgr.changeForeground(e)}changeBackground(e){this.lineMgr.changeBackground(e),this.pointMgr.changeBackground(e),this.fillMgr.changeBackground(e)}dispose(){this.lineMgr.dispose(),this.pointMgr.dispose(),this.fillMgr.dispose()}getStats(){let e=this.pointMgr.getStats(),t=this.lineMgr.getStats(),n=this.fillMgr.getStats();return{point:e,line:t,fill:n,totalCount:e.count+t.count+n.count,totalEstimatedBytes:e.estimatedBytes+t.estimatedBytes+n.estimatedBytes}}updateLineResolution(e,t){this.options.resolution.set(e,t),this.lineMgr.updateResolution()}},Xq=new Le(0,0),D5=class extends Gl{constructor(e=new O5,t=DEe){super(),this.database=void 0,this.styleManager=e,this.batchDrawPolicy=t}syncBackgroundColor(e){this.backgroundIsDark=!Wl(e),this.foregroundOnDark=tu,this.foregroundOnLight=nu}},R5=class extends Wn{constructor(e,t,n){super(n),this._textureReady=!1;let i=new Vo(t.boundary),o=new Jh(i);this.generateUVs(o);let a=At.safeComputeBoundingBox(o);a&&(this.wcsBbox=a),this._material=new _i({side:Si,transparent:!0,opacity:0,depthWrite:!1}),this._mesh=new jt(o,this._material),this.add(this._mesh),this.finalizeLeafDrawables(),Jx(e)?this._texturePromise=this.loadMetafileTexture(e):this._texturePromise=this.loadRasterTexture(e)}resolveDrawMode(){return"unbatch"}hasDrawableGeometry(){return this._textureReady}async asyncDraw(){await this._texturePromise}generateUVs(e){let t=e.attributes.position.array,n=new Float32Array(t.length/3*2),i=Math.min(...t.filter((u,h)=>h%3===0)),o=Math.max(...t.filter((u,h)=>h%3===0)),a=Math.min(...t.filter((u,h)=>h%3===1)),s=Math.max(...t.filter((u,h)=>h%3===1)),l=o-i,c=s-a;for(let u=0;u<t.length;u+=3){let h=t[u],d=t[u+1];n[u/3*2]=(h-i)/l,n[u/3*2+1]=(d-a)/c}e.setAttribute("uv",new Et(n,2))}loadRasterTexture(e){return new Promise(t=>{let n=URL.createObjectURL(e),i=new Yw().load(n,()=>{URL.revokeObjectURL(n),this.applyTexture(i),t()},void 0,()=>{URL.revokeObjectURL(n),this._textureReady=!0,t()});i.colorSpace=jo})}async loadMetafileTexture(e){try{let t=await Zx(e,{maxWidth:4096,maxHeight:4096,dpiScale:1});if(!t){this._textureReady=!0;return}await this.loadRasterTexture(t)}catch{this._textureReady=!0}}applyTexture(e){this._material.map=e,this._material.opacity=1,this._material.transparent=!0,this._material.depthWrite=!0,this._material.needsUpdate=!0,this._textureReady=!0}dispose(){this.removeFromParent(),this.clear(),this._mesh=void 0}},B5=class extends Wn{constructor(e,t,n,i=!1){if(super(n),this._hasComplexGlyphs=!1,e.length<2){this.geometry=new ot;return}if(mZ(this,e,t,n)){this._hasComplexGlyphs=Ic(this),this.geometry=new ot,this.finalizeLeafDrawables();return}let o=this.styleManager.getLineMaterial(t,i),a=Z5(e,o);if(!a){this.geometry=new ot;return}if(this.geometry=a.geometry,this.wcsBbox=a.wcsBbox,a.kind==="fat"){let l=o,c=new li(a.geometry,l);l.dashed&&c.computeLineDistances(),c.position.copy(a.worldOffset),en(c).styleMaterialId=o.id,this.add(c),this.finalizeLeafDrawables();return}let s=new qn(a.geometry,o);s.position.copy(a.worldOffset),At.computeLineDistances(s),this.add(s),this.finalizeLeafDrawables()}get hasComplexLinetypeGlyphs(){return this._hasComplexGlyphs||Ic(this)}hasDrawableGeometry(){return Ic(this)?!1:super.hasDrawableGeometry()}syncDraw(){this.hasComplexLinetypeGlyphs&&gZ(this)}async asyncDraw(){this.hasComplexLinetypeGlyphs&&await yZ(this)}resolveDrawMode(){return this.batchDrawPolicy.resolveDrawMode({anchor:Y_(this.wcsBbox)})}},F5=class extends Wn{constructor(e,t,n,i,o){if(super(o),this._hasComplexGlyphs=!1,D_(i.lineType.pattern)&&this.buildComplexFromSegments(e,t,n,i,o)){this._hasComplexGlyphs=Ic(this),this.finalizeLeafDrawables();return}let a=this.styleManager.getLineMaterial(i),s=new Ne;for(let d=0;d<e.length;d+=t)s.expandByPoint(qTe.set(e[d],e[d+1],e[d+2]??0));let l=s.getCenter(new U);if(a instanceof wr){let d=Math.floor(n.length/2),p=new Float32Array(d*6);for(let g=0,y=0;g<d;g++){let b=n[g*2],v=n[g*2+1],x=b*t,w=v*t;p[y++]=e[x]-l.x,p[y++]=e[x+1]-l.y,p[y++]=(e[x+2]??0)-l.z,p[y++]=e[w]-l.x,p[y++]=e[w+1]-l.y,p[y++]=(e[w+2]??0)-l.z}let f=new Ai;f.setPositions(p),At.safeComputeBoundingBox(f),At.safeComputeBoundingSphere(f),this.setBoundingBox(f,l);let m=new li(f,a);a.dashed&&m.computeLineDistances(),m.position.set(l.x,l.y,l.z),en(m).styleMaterialId=a.id,this.add(m),this.finalizeLeafDrawables();return}let c=new Float32Array(e.length);for(let d=0;d<e.length;d+=t)c[d]=e[d]-l.x,c[d+1]=e[d+1]-l.y,c[d+2]=(e[d+2]??0)-l.z;let u=new ot;u.setAttribute("position",new Et(c,t)),u.setIndex(new Et(n,1)),this.setBoundingBox(u,l);let h=new qn(u,a);h.position.set(l.x,l.y,l.z),At.computeLineDistances(h),this.add(h),this.finalizeLeafDrawables()}get hasComplexLinetypeGlyphs(){return this._hasComplexGlyphs||Ic(this)}hasDrawableGeometry(){return Ic(this)?!1:super.hasDrawableGeometry()}syncDraw(){this.hasComplexLinetypeGlyphs&&gZ(this)}async asyncDraw(){this.hasComplexLinetypeGlyphs&&await yZ(this)}resolveDrawMode(){return this.batchDrawPolicy.resolveDrawMode({anchor:Y_(this.wcsBbox)})}buildComplexFromSegments(e,t,n,i,o){let a=Math.floor(n.length/2),s=!1,l=new Ne;for(let c=0;c<a;c++){let u=n[c*2],h=n[c*2+1],d=u*t,p=h*t,f=[{x:e[d],y:e[d+1],z:e[d+2]??0},{x:e[p],y:e[p+1],z:e[p+2]??0}],m=new Wn(o);if(mZ(m,f,i,o)){for(s=!0;m.children.length>0;){let g=m.children[0];m.remove(g),this.add(g)}m.wcsBbox.isEmpty()||l.union(m.wcsBbox)}}return s&&!l.isEmpty()&&(this.wcsBbox=l),s}setBoundingBox(e,t){let n=At.safeComputeBoundingBox(e);if(!n)return;let i=n.clone();i.translate(t),this.wcsBbox=i}},qTe=new U,Yq=new U,N5=class extends Wn{constructor(e,t,n,i){super(i),this._point=e;let o=B_.instance.create(n.displayMode,e,n.displaySize);this.isShowPoint=o.point!=null;let a=o.point??new ot().setFromPoints([Yq.set(0,0,0)]);this.unionWorldBoundingBox(a,e);let s=this.styleManager.getPointsMaterial(t),l=new go(a,s);if(l.position.set(e.x,e.y,e.z??0),en(l).bboxIntersectionCheck=!0,l.visible=this.isShowPoint,this.add(l),o.line){let c=o.line;this.unionWorldBoundingBox(c,e);let u=this.styleManager.getLineMaterial(t,!0),h=new qn(c,u);h.position.set(e.x,e.y,e.z??0);let d=en(h);d.bboxIntersectionCheck=!0,d.isPoint=!0,d.position={x:e.x,y:e.y,z:e.z},this.add(h)}this.finalizeLeafDrawables()}resolveDrawMode(){return this.batchDrawPolicy.resolveDrawMode({position:this._point})}unionWorldBoundingBox(e,t){let n=At.safeComputeBoundingBox(e);if(!n)return;let i=n.clone();i.translate(Yq.set(t.x,t.y,t.z??0)),this.wcsBbox.union(i)}},z5=class{static test(e){let t=null,n=null,i=null,o=null,a=null,s=null,l=null,c=1,u=!1;try{t=new Go(64,32);let h=new Yh,d=new Ga(-10,30,10,-10,.1,10);n=new ot,n.setAttribute("position",new Jt([0,-2,-1,20,-2,-1],3)),o=new Fi({color:16711680}),h.add(new qn(n,o)),i=new ot,i.setAttribute("position",new Jt([0,2,-1,20,2,-1],3)),i.setAttribute("lineDistance",new Jt([0,20],1));let p=[{elementLength:100,elementTypeFlag:0},{elementLength:-1,elementTypeFlag:0}];a=zC.createLineShaderMaterial(p,65280,1,1,{value:1}),h.add(new qn(i,a)),s=e.getRenderTarget(),l=new $e,e.getClearColor(l),c=e.getClearAlpha(),u=!0,e.setRenderTarget(t),e.setClearColor(0,1),e.clear(),e.render(h,d);let f=new Uint8Array(2048*4);e.readRenderTargetPixels(t,0,0,64,32,f);let m=!1,g=!1;for(let y=0;y<f.length;y+=4){let b=f[y],v=f[y+1],x=f[y+2];!m&&b>120&&v<80&&x<80?m=!0:!g&&v>120&&b<80&&x<80&&(g=!0)}return g?!0:!m}catch{return!0}finally{u&&l&&(e.setRenderTarget(s),e.setClearColor(l,c)),t?.dispose(),n?.dispose(),i?.dispose(),o?.dispose(),a?.dispose()}}},U5=class{constructor(){this.data=new Float32Array(4096),this.length=0}append(e){let t=e.length*3;this.ensure(this.length+t);let n=this.length,i=this.data,o=n;for(let a=0;a<e.length;a++){let s=e[a];i[o++]=s.x,i[o++]=s.y,i[o++]=s.z??0}return this.length=o,{offset:n,floatCount:t}}ensure(e){if(e<=this.data.length)return;let t=this.data.length;for(;t<e;)t*=2;let n=new Float32Array(t);n.set(this.data.subarray(0,this.length)),this.data=n}get buffer(){return this.data}},UC=class{constructor(e,t,n,i){this.objectId="",this.ownerId="",this.layerName="",this.visible=!0,this.material=e,this.builder=t,this.offset=n,this.floatCount=i;let o=t.buffer,a=1/0,s=1/0,l=-1/0,c=-1/0,u=n+i;for(let h=n;h<u;h+=3){let d=o[h],p=o[h+1];d<a&&(a=d),p<s&&(s=p),d>l&&(l=d),p>c&&(c=p)}this.minX=a,this.minY=s,this.maxX=l,this.maxY=c}};function ZTe(r){return r instanceof UC}var $q=!1;function JTe(){if($q)return;$q=!0;let r=Nr.prototype,e=r.draw;r.draw=function(t,...n){var i,o;let a=t;(i=a.beginBlockLineCoalesce)==null||i.call(a);try{return e.call(this,t,...n)}finally{(o=a.endBlockLineCoalesce)==null||o.call(a)}}}function QTe(r,e,t,n){let{offset:i,floatCount:o}=n.append(r),a=new UC(e,n,i,o);return a.layerName=t,a}function eke(r,e){let t=new Map,n=[];for(let o=0;o<r.length;o++){let a=r[o];if(n.push({minX:a.minX,minY:a.minY,maxX:a.maxX,maxY:a.maxY,id:a.objectId}),a.visible===!1||a.floatCount<6)continue;let s=`${a.material.id}|${a.layerName}|${a.visible}`,l=t.get(s);l||(l={material:a.material,layerName:a.layerName,visible:!0,refs:[],floats:0,minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0},t.set(s,l));let c=a.builder.buffer,u=a.offset+a.floatCount;for(let d=a.offset;d<u;d+=3){let p=c[d],f=c[d+1],m=c[d+2];p<l.minX&&(l.minX=p),f<l.minY&&(l.minY=f),m<l.minZ&&(l.minZ=m),p>l.maxX&&(l.maxX=p),f>l.maxY&&(l.maxY=f),m>l.maxZ&&(l.maxZ=m)}let h=Math.floor(a.floatCount/3)-1;h>0&&(l.refs.push(a),l.floats+=h*6)}let i=[];for(let o of t.values()){if(o.floats<6)continue;let a=(o.minX+o.maxX)*.5,s=(o.minY+o.maxY)*.5,l=(o.minZ+o.maxZ)*.5,c=new Float32Array(o.floats),u=o.material instanceof Kn?new Float32Array(o.floats/3):null,h=0,d=0;for(let g=0;g<o.refs.length;g++){let y=o.refs[g],b=y.builder.buffer,v=y.offset+y.floatCount,x=0;for(let w=y.offset;w+5<v;w+=3){let _=b[w]-a,A=b[w+1]-s,E=b[w+2]-l,S=b[w+3]-a,M=b[w+4]-s,T=b[w+5]-l;c[h++]=_,c[h++]=A,c[h++]=E,c[h++]=S,c[h++]=M,c[h++]=T,u&&(u[d++]=x,x+=Math.hypot(S-_,M-A,T-E),u[d++]=x)}}let p=new ot;p.setAttribute("position",new Et(c,3)),u&&p.setAttribute("lineDistance",new Et(u,1));let f=new qn(p,o.material);f.position.set(a,s,l);let m=new Wn(e);m.layerName=o.layerName,m.visible=o.visible,m.add(f),i.push(m)}return{entities:i,boxes:n}}function tke(r){return r instanceof wr}var j5=class extends Wn{dispose(){}removeFromParent(){return this}},OZ=class DZ{constructor(e){this._directCapture="off",this._blockLineCoalesceDepth=0,this._lineVertexBuilders=[],this._capturedDirectPayload=null,this._directCapturePlaceholder=null,this._drawOrderZ=0,this.events={fontNotFound:new wt,fontLoaded:new wt},this._renderer=e,this._context=new D5;let t=e.getSize(new Le);this._context.styleManager.updateLineResolution(t.x,t.y),this._context.styleManager.options.linePatternShaderBroken=!z5.test(e),Yo.getInstance().overrideStyleManager(this._context.styleManager),et.instance.events.fontNotFound.addEventListener(n=>{this.events.fontNotFound.dispatch(n)}),et.instance.events.fontLoaded.addEventListener(n=>{this.events.fontLoaded.dispatch(n)}),this._subEntityTraits=Lc.createDefaultTraits()}beginDirectCapture(){this._directCapture="capturing",this._capturedDirectPayload=null}takeDirectCapture(){let e=this._directCapture==="captured"?this._capturedDirectPayload:null;return this._directCapture="off",this._capturedDirectPayload=null,e}cancelDirectCapture(){this._directCapture="off",this._capturedDirectPayload=null}missDirectCapture(){this._directCapture!=="off"&&(this._directCapture="missed",this._capturedDirectPayload=null)}tryCaptureDirectPayload(e){return this._directCapture!=="capturing"||this._capturedDirectPayload!=null?(this.missDirectCapture(),!1):(this._capturedDirectPayload=e,this._directCapture="captured",!0)}get subEntityTraits(){return this._subEntityTraits}get context(){return this._context.syncBackgroundColor(this._context.styleManager.currentBackgroundColor),this._context}get batchDrawPolicy(){return this._context.batchDrawPolicy}set batchDrawPolicy(e){this._context.batchDrawPolicy=e}get autoClear(){return this._renderer.autoClear}set autoClear(e){this._renderer.autoClear=e}get domElement(){return this._renderer.domElement}setSize(e,t){this._renderer.setSize(e,t),this._context.styleManager.updateLineResolution(e,t)}updateLineResolution(e,t){this._context.styleManager.updateLineResolution(e,t)}syncCameraZoom(e){this.updateCameraZoomUniform(e)}getViewport(e){return this._renderer.getViewport(e)}setViewport(e,t,n,i){this._renderer.setViewport(e,t,n,i)}setScissor(e,t,n,i){this._renderer.setScissor(e,t,n,i)}setScissorTest(e){this._renderer.setScissorTest(e)}clear(){this._renderer.clear()}clearDepth(){this._renderer.clearDepth()}render(e,t){return this.updateCameraZoomUniform(t.zoom),this._renderer.render(e,t.internalCamera),!1}changeBackground(e){this._context.styleManager.changeBackground(e)}get currentBackgroundColor(){return this._context.styleManager.currentBackgroundColor}set currentBackgroundColor(e){this._context.styleManager.currentBackgroundColor=e}allocateDrawOrderZ(){let e=this._drawOrderZ;return this._drawOrderZ+=DZ.DRAW_ORDER_Z_STEP,e}resetDrawOrderZ(){this._drawOrderZ=0}get styleManager(){return this._context.styleManager}setClearColor(e,t){this._renderer.setClearColor(e,t)}getClearColor(){let e=new $e;return this._renderer.getClearColor(e),e.getHex()}set clearAlpha(e){this._renderer.setClearAlpha(e)}get clearAlpha(){return this._renderer.getClearAlpha()}get internalRenderer(){return this._renderer}setFontMapping(e){et.instance.setFontMapping(e)}set ltscale(e){this._context.styleManager.options.ltscale=e}set celtscale(e){this._context.styleManager.options.celtscale=e}get missedFonts(){return et.instance.missedFonts}snapshotMissedFonts(){return{...et.instance.missedFonts}}replaceMissedFonts(e){et.instance.replaceMissedFonts(e),Yo.getInstance().replaceMissedFonts(et.instance.missedFonts).catch(()=>{})}clearMissedFonts(){this.replaceMissedFonts({})}get showLineWeight(){return this._context.styleManager.showLineWeight}set showLineWeight(e){this._context.styleManager.showLineWeight=e}get forceShowLineWeight(){return this._context.styleManager.forceShowLineWeight}set forceShowLineWeight(e){this._context.styleManager.forceShowLineWeight=e}updateLayerMaterial(e,t){return this._context.styleManager.updateLayerMaterial(e,t)}getLayerBoundMaterial(e,t,n){return this._context.styleManager.getLayerBoundMaterial(e,t,n)}createObject(){return new IC(this._context)}createEntity(){return new Wn(this._context)}createDirectCapturePlaceholder(){return this._directCapturePlaceholder||(this._directCapturePlaceholder=new j5(this._context)),this._directCapturePlaceholder}group(e){if(this._directCapture!=="off")return this.missDirectCapture(),this.createDirectCapturePlaceholder();let t=[],n=[];for(let a=0;a<e.length;a++){let s=e[a];ZTe(s)?n.push(s):t.push(s)}if(n.length===0)return new Ko(t,this._context);let i=eke(n,this._context),o=new Ko(t.concat(i.entities),this._context);return o.addExternalChildBoxes(i.boxes),o.childCount>=8?o.compactForInstancing():n.length>=2&&o.sealForSharedClone(),o}point(e,t){return this._directCapture!=="off"?this.tryCaptureDirectPayload({kind:"point",point:e,style:t})?this.createDirectCapturePlaceholder():this.createDirectCapturePlaceholder():new N5(e,this._subEntityTraits,t,this._context)}circularArc(e){return this.linePoints(e.tessellate(ao(this)))}ellipticalArc(e){return this.linePoints(e.tessellate(ao(this)))}lines(e){return this.linePoints(e)}lineSegments(e,t,n){return this._directCapture!=="off"?D_(this._subEntityTraits.lineType.pattern)?(this.missDirectCapture(),this.createDirectCapturePlaceholder()):this.tryCaptureDirectPayload({kind:"lineSegments",array:e,itemSize:t,indices:n})?this.createDirectCapturePlaceholder():this.createDirectCapturePlaceholder():new F5(e,t,n,this._subEntityTraits,this._context)}area(e){return this._directCapture!=="off"?this.tryCaptureDirectPayload({kind:"area",area:e})?this.createDirectCapturePlaceholder():this.createDirectCapturePlaceholder():new LC(e,this._subEntityTraits,this._context)}offsetRing(e,t){if(this._directCapture!=="off")return this.missDirectCapture(),this.createDirectCapturePlaceholder();let n=J5(e,t,this._subEntityTraits,this._context),i=n?this.createOffsetRingFillEntity(n):this.area(this.offsetRingArea(e,t)),o=ETe(e,t);return o?this.group([i,this.linePoints(o)]):i}createOffsetRingFillEntity(e){let t=new Wn(this._context),n=new jt(e.geometry,e.material);return n.position.copy(e.worldOffset),t.add(n),t.wcsBbox=e.wcsBbox,t}offsetRingArea(e,t){let n=new pr,i=o=>new Ot(o.map(a=>new Z(a.x,a.y)),!0);return n.add(i(e)),n.add(i(t)),n}mtext(e,t,n){return this._directCapture!=="off"?(this.missDirectCapture(),this.createDirectCapturePlaceholder()):new U_(e,this._subEntityTraits,t,this._context,n)}shape(e,t,n){return this._directCapture!=="off"?(this.missDirectCapture(),this.createDirectCapturePlaceholder()):new Hf(e,this._subEntityTraits,t,this._context,n)}image(e,t){return this._directCapture!=="off"?(this.missDirectCapture(),this.createDirectCapturePlaceholder()):new R5(e,t,this._context)}renderEntityPreview(e,t){return new $f(this).capture(e,t)}dispose(){this._context.styleManager.dispose(),this.clearMissedFonts()}linePoints(e){if(this._directCapture!=="off")return e.length<2?(this.missDirectCapture(),this.createDirectCapturePlaceholder()):D_(this._subEntityTraits.lineType.pattern)?(this.missDirectCapture(),this.createDirectCapturePlaceholder()):this.tryCaptureDirectPayload({kind:"lineStrip",points:e})?this.createDirectCapturePlaceholder():this.createDirectCapturePlaceholder();if(e.length<2)return this.createEntity();if(this._blockLineCoalesceDepth>0&&!D_(this._subEntityTraits.lineType.pattern)){let t=this.styleManager.getLineMaterial(this._subEntityTraits,!1);if(!tke(t)){let n=this._lineVertexBuilders[this._lineVertexBuilders.length-1];if(n)return QTe(e,t,this._subEntityTraits.layer,n)}}return new B5(e,this._subEntityTraits,this._context,!1)}beginBlockLineCoalesce(){this._blockLineCoalesceDepth++,this._lineVertexBuilders.push(new U5)}endBlockLineCoalesce(){this._blockLineCoalesceDepth>0&&this._blockLineCoalesceDepth--,this._lineVertexBuilders.pop()}updateCameraZoomUniform(e){Yf.CameraZoomUniform.value=e}};OZ.DRAW_ORDER_Z_STEP=1e-4;var RZ=OZ;JTe();var u5=new vt;function nke(r){let e=r.userData.annotationScale;if(!e||typeof e!="object")return;let t=e;if(t.drawnScaleFactor>0&&Array.isArray(t.supportedScaleFactors))return t}function rke(r,e){return r.supportedScaleFactors.some(t=>Math.abs(t-e)<1e-9)}function ike(r){let e=[];return r.traverse(t=>{t!==r&&e.push({object:t,matrixWorld:t.matrixWorld.clone()})}),{object:r,visible:r.visible,scale:r.scale.clone(),matrix:r.matrix.clone(),matrixWorld:r.matrixWorld.clone(),matrixAutoUpdate:r.matrixAutoUpdate,matrixWorldNeedsUpdate:r.matrixWorldNeedsUpdate,childWorld:e}}function oke(r,e){if(r.matrixAutoUpdate){r.scale.multiplyScalar(e),r.updateMatrix(),r.updateMatrixWorld(!0);return}u5.makeScale(e,e,1),r.matrix.multiply(u5),r.matrixWorld.multiply(u5),r.traverse(t=>{t===r||!t.parent||t.matrixWorld.multiplyMatrices(t.parent.matrixWorld,t.matrix)})}function ake(r){let{object:e}=r;e.visible=r.visible,e.scale.copy(r.scale),e.matrixAutoUpdate=r.matrixAutoUpdate,e.matrix.copy(r.matrix),e.matrixWorld.copy(r.matrixWorld),e.matrixWorldNeedsUpdate=r.matrixWorldNeedsUpdate;for(let t of r.childWorld)t.object.matrixWorld.copy(t.matrixWorld)}function ske(r,e){let t=e.annotationScaleFactor;if(!(t>0))return()=>{};let n=e.annoAllVisible!==!1,i=[];return r.traverse(o=>{let a=nke(o);if(!a)return;if(i.push(ike(o)),!rke(a,t)){n||(o.visible=!1);return}let s=t/a.drawnScaleFactor;Math.abs(s-1)<1e-9||oke(o,s)}),()=>{for(let o of i)ake(o)}}var X_=class{constructor(e,t,n){this.events={viewChanged:new wt},this._renderer=e,this._width=t,this._height=n,this._frustum=n/2;let i=this.createCamera();this._camera=new W_(i),this._cameraControls=this.createCameraControls(),this._cameraControls.addEventListener("change",()=>{this.events.viewChanged.dispatch({view:this})}),this._raycaster=new af}get width(){return this._width}set width(e){this._width=e}get height(){return this._height}set height(e){this._height=e}get enabled(){return this._cameraControls.enabled}set enabled(e){this._cameraControls.enabled=e}get center(){return this._camera.screenToWorld({x:this._width/2,y:this._height/2},this._width,this._height)}set center(e){this._camera.position.set(e.x,e.y,this._camera.position.z),this._camera.updateProjectionMatrix()}screenToWorld(e){return this._camera.screenToWorld(e,this._width,this._height)}worldToScreen(e){return this._camera.worldToScreen(e,this._width,this._height)}pointToBox(e,t){let n=this.worldToScreen(e),i=this.screenToWorld({x:n.x+t,y:n.y+t}),o=this.screenToWorld({x:n.x-t,y:n.y-t});return new ct().setFromPoints([i,o])}resetRaycaster(e,t){let n=this._camera.wcs2Ndc(e,this._width,this._height);return this._raycaster.setFromCamera(new Le(n.x,n.y),this._camera.internalCamera),this._raycaster.params.Line.threshold=t,this._raycaster.params.Points.threshold=t,this._raycaster}get internalCamera(){return this._camera.internalCamera}get trCamera(){return this._camera}renderObject(e){this._renderer.render(e,this._camera)}applyExportCamera(e,t,n){$f.fitExportCamera(this._camera.internalCamera,e,t,n)}zoomTo(e,t=1.1){let n=new Ut;e.getSize(n);let i=new Ut;e.getCenter(i);let o=Math.max(Math.abs(n.x)*t,Number.EPSILON),a=Math.max(Math.abs(n.y)*t,Number.EPSILON),s=this._width/Math.max(this._height,1),l=Math.min(2*s*this._frustum/o,2*this._frustum/a);this.flyTo(i,l),this.updateCameraFrustum()}flyTo(e,t){let n=new U(e.x,e.y,0);this._camera.position.set(e.x,e.y,this._camera.position.z),this._camera.lookAt(n),this._camera.setRotationFromEuler(new da(0,0,0)),this._cameraControls.target=n,t!=null&&(this._camera.zoom=t),this._camera.updateProjectionMatrix()}updateCameraFrustum(e,t){let n=(e??this._width)/(t??this._height);this._camera.left=-n*this._frustum,this._camera.right=n*this._frustum,this._camera.top=this._frustum,this._camera.bottom=-this._frustum,this._camera.updateProjectionMatrix(),this._cameraControls.update()}createCamera(){let e=new Ga(-this._width/2,this._width/2,this._height/2,-this._height/2,.1,1e3);return e.position.set(0,0,500),e.up.set(0,1,0),e.updateProjectionMatrix(),e}createCameraControls(){let e=new mC(this._camera.internalCamera,this._renderer.domElement);return e.enableDamping=!1,e.autoRotate=!1,e.enableRotate=!1,e.zoomSpeed=5,e.zoomToCursor=!0,e.mouseButtons={MIDDLE:Ha.PAN},e.touches={ONE:xl.PAN,TWO:xl.DOLLY_PAN},e.update(),e}};function V5(r,e){return{x:r.x,y:e-r.y-r.height,width:r.width,height:r.height}}function eF(r,e){let t=Math.max(r.x,e.x),n=Math.max(r.y,e.y),i=Math.min(r.x+r.width,e.x+e.width),o=Math.min(r.y+r.height,e.y+e.height),a=i-t,s=o-n;return a<1||s<1?null:{x:t,y:n,width:a,height:s}}function BZ(r,e,t){let n=Math.max(e.max.x-e.min.x,Number.EPSILON),i=Math.max(e.max.y-e.min.y,Number.EPSILON),o=t.x+(r.min.x-e.min.x)/n*t.width,a=t.y+(e.max.y-r.max.y)/i*t.height;return{x:o,y:a,width:(r.max.x-r.min.x)/n*t.width,height:(r.max.y-r.min.y)/i*t.height}}function tF(r,e,t){let n=Math.max(e.max.x-e.min.x,Number.EPSILON),i=Math.max(e.max.y-e.min.y,Number.EPSILON),o=e.min.x+(r.x-t.x)/t.width*n,a=e.min.x+(r.x+r.width-t.x)/t.width*n,s=e.max.y-(r.y-t.y)/t.height*i,l=e.max.y-(r.y+r.height-t.y)/t.height*i;return{minX:o,minY:l,maxX:a,maxY:s}}var jC=class{constructor(e){this._visible=!1,this._screenRect={x:0,y:0,width:1,height:1},this._viewBox=new ct,this._width=1,this._height=1,this._renderer=e;let t=new Ga(-.5,.5,.5,-.5,.1,1e3);t.position.set(0,0,500),t.up.set(0,1,0),t.updateProjectionMatrix(),this._camera=new W_(t)}get visible(){return this._visible}set visible(e){this._visible=e}get screenRect(){return this._screenRect}get viewBox(){return this._viewBox}setScreenRect(e,t,n,i){this._screenRect={x:e,y:t,width:n,height:i},this._width=Math.max(n,1),this._height=Math.max(i,1),this.applyViewBox()}setViewBox(e){this._viewBox.min.copy(e.min),this._viewBox.max.copy(e.max),this.applyViewBox()}render(e,t){!this._visible||this._viewBox.isEmpty()||this._screenRect.width<1||this._screenRect.height<1||this.renderRect(e,this._screenRect,this._screenRect,t,{clearColor:!0})}renderNested(e,t,n,i,o,a){i.width<1||i.height<1||(this.fitCamera(t,n.width,n.height,a),this.renderRect(e,n,i,o,{clearColor:!1}),this.applyViewBox())}applyViewBox(){this._viewBox.isEmpty()||this.fitCamera(this._viewBox,this._width,this._height)}fitCamera(e,t,n,i){let o=new Ut;e.getSize(o);let a=new Ut;e.getCenter(a);let s=Math.max(n,1)/2,l=Math.max(t,1)/Math.max(n,1),c=Math.max(Math.abs(o.x),Number.EPSILON),u=Math.max(Math.abs(o.y),Number.EPSILON),h=Math.min(2*l*s/c,2*s/u),d=this._camera.internalCamera;d.left=-l*s,d.right=l*s,d.top=s,d.bottom=-s,d.position.set(a.x,a.y,d.position.z),d.lookAt(a.x,a.y,0);let p=Number.isFinite(i)?i:0;d.up.set(-Math.sin(p),Math.cos(p),0),d.setRotationFromEuler(new da(0,0,p)),d.zoom=h,d.updateProjectionMatrix()}renderRect(e,t,n,i,o){let a=V5(t,i),s=V5(n,i),l=this._renderer.autoClear;this._renderer.autoClear=!1;let c=new yn;this._renderer.getViewport(c),this._renderer.setScissor(s.x,s.y,s.width,s.height),this._renderer.setScissorTest(!0),this._renderer.setViewport(a.x,a.y,a.width,a.height),o.clearColor?this._renderer.clear():this._renderer.clearDepth(),this._renderer.render(e,this._camera),this._renderer.setScissorTest(!1),this._renderer.setViewport(c.x,c.y,c.z,c.w),this._renderer.autoClear=l}},xd=class r extends X_{static calculateViewportWindowBox(e,t){let n=t.box,i=new ct;return i.expandByPoint(e.worldToScreen(n.min)),i.expandByPoint(e.worldToScreen(n.max)),i}static isDefaultPaperSpaceViewport(e){if(Math.abs(e.centerPoint.x-e.viewCenter.x)<1e-6&&Math.abs(e.centerPoint.y-e.viewCenter.y)<1e-6||r.isPannedPaperSpaceDefault(e,1e-6))return!0;if(!(Math.abs(e.centerPoint.x)<1e-6&&Math.abs(e.centerPoint.y)<1e-6))return!1;let t=e.height,n=e.viewHeight;if(t==null||n==null||!Number.isFinite(t)||!Number.isFinite(n)||Math.abs(n-t)>=1e-6)return!1;let i=e.viewTarget;return i?Math.abs(i.x)<1e-6&&Math.abs(i.y)<1e-6:!0}static isPannedPaperSpaceDefault(e,t){let n=e.width,i=e.height,o=e.viewHeight;if(n==null||i==null||o==null||!Number.isFinite(n)||!Number.isFinite(i)||!Number.isFinite(o)||n<=t||i<=t||o<=t)return!1;let a=e.viewTarget;if(a&&(Math.abs(a.x)>=t||Math.abs(a.y)>=t))return!1;let s=Math.abs(e.centerPoint.x-e.viewCenter.x),l=Math.abs(e.centerPoint.y-e.viewCenter.y),c=.25;if(s>=n*c||l>=i*c)return!1;let u=o/i;return u>=.1&&u<=5}constructor(e,t,n){let i=r.calculateViewportWindowBox(e,t).size;super(n,i.width,i.height),this._parentView=e,this._viewport=t.clone(),this._frustum*=t.height/e.height,this.zoomTo(this._viewport.viewBox),this.applyViewTwist(),this.enabled=!1}get viewport(){return this._viewport}update(){this.zoomTo(this._viewport.viewBox,1),this.applyViewTwist()}containsPaperPoint(e){let t=this._viewport.box;return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y}isNearPaperBorder(e,t){if(!this.containsPaperPoint(e))return!1;let n=this._viewport.box,i=Math.abs(e.x-n.min.x),o=Math.abs(e.x-n.max.x),a=Math.abs(e.y-n.min.y),s=Math.abs(e.y-n.max.y);return Math.min(i,o,a,s)<=t}paperPointToModel(e){let t=this._viewport.box,n=this._viewport.viewBox,i=t.max.x-t.min.x,o=t.max.y-t.min.y,a=(n.min.x+n.max.x)/2,s=(n.min.y+n.max.y)/2;if(i<=0||o<=0)return new Z(a,s);let l=((e.x-t.min.x)/i-.5)*(n.max.x-n.min.x),c=((e.y-t.min.y)/o-.5)*(n.max.y-n.min.y),u=this._viewport.viewTwistAngle;if(!Number.isFinite(u)||u===0)return new Z(a+l,s+c);let h=Math.cos(u),d=Math.sin(u);return new Z(a+l*h-c*d,s+l*d+c*h)}modelPointToPaper(e){let t=this._viewport.box,n=this._viewport.viewBox,i=t.max.x-t.min.x,o=t.max.y-t.min.y,a=n.max.x-n.min.x,s=n.max.y-n.min.y,l=(t.min.x+t.max.x)/2,c=(t.min.y+t.max.y)/2;if(a<=0||s<=0)return new Z(l,c);let u=(n.min.x+n.max.x)/2,h=(n.min.y+n.max.y)/2,d=e.x-u,p=e.y-h,f=this._viewport.viewTwistAngle;if(Number.isFinite(f)&&f!==0){let m=Math.cos(-f),g=Math.sin(-f),y=d*m-p*g,b=d*g+p*m;d=y,p=b}return new Z(l+d/a*i,c+p/s*o)}applyViewTwist(){let e=this._viewport.viewTwistAngle,t=Number.isFinite(e)?e:0;this._camera.internalCamera.up.set(-Math.sin(t),Math.cos(t),0),this._camera.setRotationFromEuler(new da(0,0,t)),this._camera.updateProjectionMatrix()}get paperToModelScale(){let e=this._viewport.box,t=this._viewport.viewBox,n=e.max.x-e.min.x;return n<=0?1:(t.max.x-t.min.x)/n}computeOnscreenPass(){let e=r.calculateViewportWindowBox(this._parentView,this._viewport);if(e.isEmpty())return null;let t=e.size,n={x:e.min.x,y:e.min.y,width:t.width,height:t.height},i=eF(n,{x:0,y:0,width:this._parentView.width,height:this._parentView.height});if(!i)return null;let o=tF(i,this._viewport.viewBox,n),a=new ct;return a.expandByPoint({x:o.minX,y:o.minY}),a.expandByPoint({x:o.maxX,y:o.maxY}),a.isEmpty()?null:{hit:i,modelBox:a}}render(e){let t=this.computeOnscreenPass();if(!t)return;this._width=t.hit.width,this._height=t.hit.height,this._frustum=t.hit.height/2,this.zoomTo(t.modelBox,1),this.applyViewTwist();let n=V5(t.hit,this._parentView.height);this._renderer.setViewport(n.x,n.y,n.width,n.height),this._renderer.setScissor(n.x,n.y,n.width,n.height),this._renderer.setScissorTest(!0);try{this.withFrozenLayersHidden(e,()=>{this.withAnnotationScaleApplied(e,()=>{this._renderer.render(e,this._camera)})})}finally{this._renderer.setScissorTest(!1)}}withAnnotationScaleApplied(e,t){var n,i;let o=this._viewport.annotationScaleFactor;if(!(o>0)){t();return}let a=ske(e,{annotationScaleFactor:o,annoAllVisible:((i=(n=this._renderer.context)==null?void 0:n.database)==null?void 0:i.annoallvisible)!==!1});try{t()}finally{a()}}withFrozenLayersHidden(e,t){let n=this.hideFrozenLayers(e);try{t()}finally{for(let[i,o]of n)i.visible=o}}hideFrozenLayers(e){let t=this._viewport.frozenLayers;if(!t||t.length===0)return[];let n=new Set(t),i=[];for(let o of e.children)!n.has(o.name)||!o.visible||(i.push([o,o.visible]),o.visible=!1);return i}};var q_=function(){var r=0,e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",e.addEventListener("click",function(u){u.preventDefault(),n(++r%e.children.length)},!1);function t(u){return e.appendChild(u.dom),u}function n(u){for(var h=0;h<e.children.length;h++)e.children[h].style.display=h===u?"block":"none";r=u}var i=(performance||Date).now(),o=i,a=0,s=t(new q_.Panel("FPS","#0ff","#002")),l=t(new q_.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=t(new q_.Panel("MB","#f08","#201"));return n(0),{REVISION:16,dom:e,addPanel:t,showPanel:n,begin:function(){i=(performance||Date).now()},end:function(){a++;var u=(performance||Date).now();if(l.update(u-i,200),u>=o+1e3&&(s.update(a*1e3/(u-o),100),o=u,a=0,c)){var h=performance.memory;c.update(h.usedJSHeapSize/1048576,h.jsHeapSizeLimit/1048576)}return u},update:function(){i=this.end()},domElement:e,setMode:n}};q_.Panel=function(r,e,t){var n=1/0,i=0,o=Math.round,a=o(window.devicePixelRatio||1),s=80*a,l=48*a,c=3*a,u=2*a,h=3*a,d=15*a,p=74*a,f=30*a,m=document.createElement("canvas");m.width=s,m.height=l,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*a+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=t,g.fillRect(0,0,s,l),g.fillStyle=e,g.fillText(r,c,u),g.fillRect(h,d,p,f),g.fillStyle=t,g.globalAlpha=.9,g.fillRect(h,d,p,f),{dom:m,update:function(y,b){n=Math.min(n,y),i=Math.max(i,y),g.fillStyle=t,g.globalAlpha=1,g.fillRect(0,0,s,d),g.fillStyle=e,g.fillText(o(y)+" "+r+" ("+o(n)+"-"+o(i)+")",c,u),g.drawImage(m,h+a,d,p-a,f,h,d,p-a,f),g.fillRect(h+p-a,d,a,f),g.fillStyle=t,g.globalAlpha=.9,g.fillRect(h+p-a,d,a,o((1-y/b)*f))}}};var FZ=q_;var fb=class extends Ai{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){let t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e){let t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setColors(n),this}setFromPoints(e){let t=e.length-1,n=new Float32Array(6*t);for(let i=0;i<t;i++)n[6*i]=e[i].x,n[6*i+1]=e[i].y,n[6*i+2]=e[i].z||0,n[6*i+3]=e[i+1].x,n[6*i+4]=e[i+1].y,n[6*i+5]=e[i+1].z||0;return super.setPositions(n),this}fromLine(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}};var KC=class extends li{constructor(e=new fb,t=new wr({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}};var lke=typeof global=="object"&&global&&global.Object===Object&&global,NZ=lke;var cke=typeof self=="object"&&self&&self.Object===Object&&self,uke=NZ||cke||Function("return this")(),qC=uke;var hke=qC.Symbol,mb=hke;var zZ=Object.prototype,dke=zZ.hasOwnProperty,pke=zZ.toString,Z_=mb?mb.toStringTag:void 0;function fke(r){var e=dke.call(r,Z_),t=r[Z_];try{r[Z_]=void 0;var n=!0}catch{}var i=pke.call(r);return n&&(e?r[Z_]=t:delete r[Z_]),i}var UZ=fke;var mke=Object.prototype,gke=mke.toString;function yke(r){return gke.call(r)}var jZ=yke;var bke="[object Null]",vke="[object Undefined]",VZ=mb?mb.toStringTag:void 0;function xke(r){return r==null?r===void 0?vke:bke:VZ&&VZ in Object(r)?UZ(r):jZ(r)}var GZ=xke;function wke(r){return r!=null&&typeof r=="object"}var HZ=wke;var _ke="[object Symbol]";function Ske(r){return typeof r=="symbol"||HZ(r)&&GZ(r)==_ke}var WZ=Ske;var Ake=/\s/;function Mke(r){for(var e=r.length;e--&&Ake.test(r.charAt(e)););return e}var XZ=Mke;var Pke=/^\s+/;function Eke(r){return r&&r.slice(0,XZ(r)+1).replace(Pke,"")}var YZ=Eke;function Cke(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var J_=Cke;var $Z=NaN,Tke=/^[-+]0x[0-9a-f]+$/i,kke=/^0b[01]+$/i,Ike=/^0o[0-7]+$/i,Lke=parseInt;function Oke(r){if(typeof r=="number")return r;if(WZ(r))return $Z;if(J_(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=J_(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=YZ(r);var t=kke.test(r);return t||Ike.test(r)?Lke(r.slice(2),t?2:8):Tke.test(r)?$Z:+r}var nF=Oke;var Dke=function(){return qC.Date.now()},ZC=Dke;var Rke="Expected a function",Bke=Math.max,Fke=Math.min;function Nke(r,e,t){var n,i,o,a,s,l,c=0,u=!1,h=!1,d=!0;if(typeof r!="function")throw new TypeError(Rke);e=nF(e)||0,J_(t)&&(u=!!t.leading,h="maxWait"in t,o=h?Bke(nF(t.maxWait)||0,e):o,d="trailing"in t?!!t.trailing:d);function p(_){var A=n,E=i;return n=i=void 0,c=_,a=r.apply(E,A),a}function f(_){return c=_,s=setTimeout(y,e),u?p(_):a}function m(_){var A=_-l,E=_-c,S=e-A;return h?Fke(S,o-E):S}function g(_){var A=_-l,E=_-c;return l===void 0||A>=e||A<0||h&&E>=o}function y(){var _=ZC();if(g(_))return b(_);s=setTimeout(y,m(_))}function b(_){return s=void 0,d&&n?p(_):(n=i=void 0,a)}function v(){s!==void 0&&clearTimeout(s),c=0,n=l=i=s=void 0}function x(){return s===void 0?a:b(ZC())}function w(){var _=ZC(),A=g(_);if(n=arguments,i=this,l=_,A){if(s===void 0)return f(l);if(h)return clearTimeout(s),s=setTimeout(y,e),p(l)}return s===void 0&&(s=setTimeout(y,e)),a}return w.cancel=v,w.flush=x,w}var rF=Nke;var zke=Object.defineProperty,Uke=(r,e,t)=>e in r?zke(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Me=(r,e,t)=>Uke(r,typeof e!="symbol"?e+"":e,t),jke='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-hidden="true"><path fill="currentColor" d="M737.216 357.952 704 349.824l-11.776-32a192.064 192.064 0 0 0-367.424 23.04l-8.96 39.04-39.04 8.96A192.064 192.064 0 0 0 320 768h368a207.81 207.81 0 0 0 207.808-208 208.32 208.32 0 0 0-158.592-202.048m15.168-62.208A272.32 272.32 0 0 1 959.744 560a271.81 271.81 0 0 1-271.552 272H320a256 256 0 0 1-57.536-505.536 256.128 256.128 0 0 1 489.92-30.72"/><text x="512" y="580" text-anchor="middle" dominant-baseline="middle" font-size="300" font-family="Arial,sans-serif" fill="currentColor" font-weight="bold">ML</text></svg>',OF="mlightcad",Vke="https://mlightcad.github.io/cad-viewer/",nee="https://mlightcad.com/cad-viewer/docs/",Gke="https://github.com/mlightcad/cad-viewer";function ree(r){let e=document.createElement("span");e.className=r?.className??"ml-brand-mark-icon",e.setAttribute("role","img"),e.setAttribute("aria-label",OF),e.innerHTML=jke;let t=r?.size??"40px";return e.style.width=t,e.style.height=t,e}function Hke(r){let e=document.createElement("div");e.className=r?.className??"ml-brand-mark",e.setAttribute("role","img"),e.setAttribute("aria-label",OF);let t=ree({className:"ml-brand-mark-icon",size:r?.iconSize??"40px"});t.removeAttribute("role"),t.removeAttribute("aria-label");let n=document.createElement("span");return n.className="ml-brand-mark-label",n.textContent=OF,e.appendChild(t),e.appendChild(n),e}var Wke="guide/magnifier.html",Vz=nee,iee=oee(Vz);function Xke(){return iee}function Yke(r){iee=oee(r)}function $ke(r,e="en"){let t=Xke(),n=e.toLowerCase().split(/[-_]/)[0],i=!n||n==="en"?"":`/${n}`,o=r.replace(/^\/+/,"");return`${t}${i}/${o}`}function oee(r){let e=r.trim();return e?e.replace(/\/+$/,""):Vz.replace(/\/+$/,"")}var aee=16777215,Kke=0,DF=class{constructor(e){this.host=e,this.enabled=!1,this.savedBackground=null}get isEnabled(){return this.enabled}noteLayoutBackground(e){this.savedBackground=e}toggle(){this.setEnabled(!this.enabled)}setEnabled(e){if(e===this.enabled)return;if(e){this.applyDisplay(!0),this.enabled=!0;return}let t=this.savedBackground;this.enabled=!1,this.savedBackground=null,this.host.setCompareDisplay({enabled:!1,overrides:[]}),t!=null&&this.host.applyViewClearColor(t),this.host.markDirty()}reapplyIfEnabled(){this.enabled&&this.applyDisplay(!0)}applyDisplay(e){e&&(this.savedBackground=this.host.getCurrentBackgroundColor()),this.host.applyViewClearColor(aee),this.host.setCompareDisplay({enabled:!0,baseColor:Kke})}};function Eb(r,e,t,n,i,o){let a=i-t,s=o-n,l=a*a+s*s;if(l<1e-10)return Math.hypot(r-t,e-n);let c=((r-t)*a+(e-n)*s)/l;return c=Math.max(0,Math.min(1,c)),Math.hypot(r-(t+c*a),e-(n+c*s))}function see(r,e,t,n=!1){if(t.length===0)return 1/0;if(t.length===1)return Math.hypot(r-t[0].x,e-t[0].y);let i=1/0,o=n?t.length:t.length-1;for(let a=0;a<o;a++){let s=t[a],l=t[(a+1)%t.length];i=Math.min(i,Eb(r,e,s.x,s.y,l.x,l.y))}return i}function RF(r,e,t,n){let i=Math.min(t.x,n.x),o=Math.max(t.x,n.x),a=Math.min(t.y,n.y),s=Math.max(t.y,n.y);return see(r,e,[{x:i,y:a},{x:o,y:a},{x:o,y:s},{x:i,y:s}],!0)}function qke(r,e,t,n){let i=Math.min(t.x,n.x),o=Math.max(t.x,n.x),a=Math.min(t.y,n.y),s=Math.max(t.y,n.y);return r>=i&&r<=o&&e>=a&&e<=s}function lee(r,e,t,n,i){return Math.abs(Math.hypot(r-t,e-n)-i)}function Zke(r,e,t){let n=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){let a=t[i].x,s=t[i].y,l=t[o].x,c=t[o].y;s>e!=c>e&&r<(l-a)*(e-s)/(c-s+1e-15)+a&&(n=!n)}return n}function KZ(r,e,t,n,i,o,a,s){let l=Math.PI*2,c=24,u=1/0,h=s?o-a:a-o;h<=0&&(h+=l);for(let d=0;d<=c;d++){let p=d/c,f=s?o-p*h:o+p*h,m=t+i*Math.cos(f),g=n+i*Math.sin(f);u=Math.min(u,Math.hypot(r-m,e-g))}return u}var Jke=8;function So(r,e,t){return{x:r.x+e,y:r.y+t}}function iF(r,e,t){return{tip:So(r.tip,e,t),anchor:So(r.anchor,e,t),text:r.text}}function BF(r){switch(r.type){case"cloud":case"rect":case"highlight":return{x:(r.corner1.x+r.corner2.x)/2,y:(r.corner1.y+r.corner2.y)/2};case"circle":return{...r.center};case"callout":return{x:(r.tip.x+r.anchor.x)/2,y:(r.tip.y+r.anchor.y)/2};case"arrow":case"line":return{x:(r.start.x+r.end.x)/2,y:(r.start.y+r.end.y)/2};case"text":case"stamp":case"symbol":return{...r.position};default:return}}function cee(r,e,t){switch(r.type){case"cloud":return{...r,corner1:So(r.corner1,e,t),corner2:So(r.corner2,e,t),callout:r.callout?iF(r.callout,e,t):void 0};case"rect":return{...r,corner1:So(r.corner1,e,t),corner2:So(r.corner2,e,t),callout:r.callout?iF(r.callout,e,t):void 0};case"highlight":return{...r,corner1:So(r.corner1,e,t),corner2:So(r.corner2,e,t)};case"circle":return{...r,center:So(r.center,e,t),callout:r.callout?iF(r.callout,e,t):void 0};case"callout":return{...r,tip:So(r.tip,e,t),anchor:So(r.anchor,e,t)};case"arrow":case"line":return{...r,start:So(r.start,e,t),end:So(r.end,e,t)};case"text":case"stamp":case"symbol":return{...r,position:So(r.position,e,t)}}}function qZ(r,e,t,n){let i=t(r.tip),o=t(r.anchor);return Eb(e.x,e.y,i.x,i.y,o.x,o.y)<=n}function ZZ(r,e){e&&(r.expandByPoint(e.tip),r.expandByPoint(e.anchor))}function Qke(r,e,t){for(let n of e)n.right<=n.left&&n.bottom<=n.top||(r.expandByPoint(t(n.left,n.top)),r.expandByPoint(t(n.right,n.bottom)))}function uee(r){let e=new ct;switch(r.type){case"line":case"arrow":e.expandByPoint(r.start).expandByPoint(r.end);break;case"rect":case"cloud":e.expandByPoint(r.corner1).expandByPoint(r.corner2),ZZ(e,r.callout);break;case"highlight":e.expandByPoint(r.corner1).expandByPoint(r.corner2);break;case"circle":e.expandByPoint({x:r.center.x-r.radius,y:r.center.y-r.radius}).expandByPoint({x:r.center.x+r.radius,y:r.center.y+r.radius}),ZZ(e,r.callout);break;case"callout":e.expandByPoint(r.tip).expandByPoint(r.anchor);break;case"text":case"stamp":case"symbol":e.expandByPoint(r.position);break;default:return}return e.isEmpty()?void 0:e}function RT(r){return(r.type==="cloud"||r.type==="rect"||r.type==="circle")&&r.callout==null}function eIe(r){return r.type==="circle"?{kind:"circle",center:r.center,radius:r.radius}:{kind:r.type,corner1:r.corner1,corner2:r.corner2}}function hee(r,e,t,n){switch(r.type){case"rect":{let i=t(r.corner1),o=t(r.corner2),a=Math.min(i.x,o.x),s=Math.max(i.x,o.x),l=Math.min(i.y,o.y),c=Math.max(i.y,o.y);return e.x>=a&&e.x<=s&&e.y>=l&&e.y<=c?Math.min(Math.abs(e.x-a),Math.abs(e.x-s),Math.abs(e.y-l),Math.abs(e.y-c))<=n:RF(e.x,e.y,i,o)<=n}case"cloud":{let i=t(r.corner1),o=t(r.corner2),a=Math.min(i.x,o.x),s=Math.max(i.x,o.x),l=Math.min(i.y,o.y),c=Math.max(i.y,o.y),u=n+Jke;return e.x>=a&&e.x<=s&&e.y>=l&&e.y<=c?Math.min(Math.abs(e.x-a),Math.abs(e.x-s),Math.abs(e.y-l),Math.abs(e.y-c))<=u:RF(e.x,e.y,i,o)<=u}case"circle":{let i=t(r.center),o=t({x:r.center.x+r.radius,y:r.center.y}),a=Math.hypot(o.x-i.x,o.y-i.y);return lee(e.x,e.y,i.x,i.y,a)<=n}default:return!1}}function dee(r,e,t,n){switch(r.type){case"line":case"arrow":{let i=t(r.start),o=t(r.end);return Eb(e.x,e.y,i.x,i.y,o.x,o.y)<=n}case"rect":case"cloud":case"circle":return hee(r,e,t,n)?!0:r.callout?qZ(r.callout,e,t,n):!1;case"highlight":return qke(e.x,e.y,t(r.corner1),t(r.corner2))||RF(e.x,e.y,t(r.corner1),t(r.corner2))<=n;case"callout":return qZ(r,e,t,n);case"text":case"stamp":case"symbol":return!1}}var FF=new Map,BT,vT,oF;function tIe(r){vT=r}function pee(r){if(!vT)throw new Error("Markup session bag factory is not installed");if(!r)return oF||(oF=vT()),oF;let e=FF.get(r);return e||(e=vT(),FF.set(r,e)),e}function Ck(){return pee(BT)}function JC(r){BT=r,pee(r)}function JZ(r){FF.delete(r),BT===r&&(BT=void 0)}var Gz="markup",Mo="markup-live",NF=class{constructor(){this.records=new Map,this.listeners=new Set,this._dirty=!1}get drawingName(){return this._drawingName}set drawingName(e){this._drawingName=e}get dirty(){return this._dirty}get selectedId(){return this._selectedId}list(){return[...this.records.values()]}get(e){return this.records.get(e)}has(e){return this.records.has(e)}get size(){return this.records.size}upsert(e,t){this.records.set(e.id,e),t?.markDirty!==!1&&(this._dirty=!0),this.emit()}updateMeta(e,t){let n=this.records.get(e);if(!n)return;let i={...n,...t,geometry:t.text!==void 0?nIe(n.geometry,t.text):n.geometry,updatedAt:new Date().toISOString()};return this.records.set(e,i),this._dirty=!0,this.emit(),i}updateStyle(e,t){let n=this.records.get(e);if(!n)return;let i={...n,style:{...n.style,...t},updatedAt:new Date().toISOString()};return this.records.set(e,i),this._dirty=!0,this.emit(),i}updateGeometry(e,t){let n=this.records.get(e);if(!n)return;let i={...n,geometry:t,updatedAt:new Date().toISOString()};return this.records.set(e,i),this._dirty=!0,this.emit(),i}removeRecord(e,t){return this.records.delete(e)?(this._selectedId===e&&(this._selectedId=void 0),t?.markDirty!==!1&&(this._dirty=!0),this.emit(),!0):!1}replaceAll(e,t){this.records.clear();for(let n of e)this.records.set(n.id,n);t!==void 0&&(this._drawingName=t),this._selectedId=void 0,this._dirty=!1,this.emit()}restore(e,t){this.records.clear();for(let n of e)this.records.set(n.id,n);this._selectedId=void 0,t?.dirty!==void 0&&(this._dirty=t.dirty),this.emit()}clear(e){this.records.size===0&&this._selectedId==null||(this.records.clear(),this._selectedId=void 0,e?.markDirty!==!1&&(this._dirty=!0),this.emit())}reset(){this.records.clear(),this._selectedId=void 0,this._dirty=!1,this._drawingName=void 0,this.emit()}setSelectedId(e){this._selectedId!==e&&(this._selectedId=e,this.emit())}toSidecar(){return{version:1,drawingName:this._drawingName,markups:this.list()}}markClean(){this._dirty=!1,this.emit()}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(){for(let e of[...this.listeners])try{e()}catch{}}};function nn(){return Ck().store}function nIe(r,e){return(r.type==="cloud"||r.type==="rect"||r.type==="circle")&&r.callout?{...r,callout:{...r.callout,text:e}}:r}var rIe=["open","question","answered","closed"],iIe=.5,oIe=.55;function fee(r,e,t){let n=Math.hypot(e.x-r.x,e.y-r.y),i=Math.hypot(t.x-r.x,t.y-r.y);return Math.min(n,i)*iIe}function aIe(r){let e=new ct;switch(r.type){case"distance":e.expandByPoint(r.start).expandByPoint(r.end);break;case"angle":e.expandByPoint(r.vertex).expandByPoint(r.arm1).expandByPoint(r.arm2);break;case"area":for(let t of r.points)e.expandByPoint(t);break;case"arc":e.expandByPoint({x:r.center.x-r.radius,y:r.center.y-r.radius}).expandByPoint({x:r.center.x+r.radius,y:r.center.y+r.radius});break;case"point":e.expandByPoint(r.position);break;default:return}return e.isEmpty()?void 0:e}function mee(r,e,t,n){switch(r.type){case"distance":{let i=t(r.start),o=t(r.end);return Eb(e.x,e.y,i.x,i.y,o.x,o.y)<=n}case"angle":{let i=t(r.vertex),o=t(r.arm1),a=t(r.arm2);if(Eb(e.x,e.y,i.x,i.y,o.x,o.y)<=n||Eb(e.x,e.y,i.x,i.y,a.x,a.y)<=n)return!0;let s=Math.atan2(o.y-i.y,o.x-i.x),l=Math.atan2(a.y-i.y,a.x-i.x),c=xe.normalizeAngle(l-s)>Math.PI,u=t({x:0,y:0}),h=t({x:1,y:0}),d=Math.hypot(h.x-u.x,h.y-u.y),p=fee(r.vertex,r.arm1,r.arm2)*(d>0&&Number.isFinite(d)?d:1);return p>0?KZ(e.x,e.y,i.x,i.y,p,s,l,c)<=n:!1}case"area":{let i=r.points.map(t);return i.length<2?!1:Zke(e.x,e.y,i)?!0:see(e.x,e.y,i,!0)<=n}case"arc":{let i=t(r.center),o=t(r.start),a=t(r.end),s=Math.hypot(o.x-i.x,o.y-i.y);if(!(s>0))return lee(e.x,e.y,i.x,i.y,0)<=n;let l=Math.atan2(o.y-i.y,o.x-i.x),c=Math.atan2(a.y-i.y,a.x-i.x),u=xe.normalizeAngle(c-l)>Math.PI;if(r.through){let h=t(r.through),d=Math.atan2(h.y-i.y,h.x-i.x);u=!xe.isAngleOnCcwSweep(l,d,c)}return KZ(e.x,e.y,i.x,i.y,s,l,c,u)<=n}case"point":return!1}}var gee=-1,sIe={0:1,1:25.4,2:304.8,3:1609344,4:1,5:10,6:1e3,7:1e6,8:254e-7,9:.0254,10:914.4,11:1e-7,12:1e-6,13:.001,14:100,15:1e4,16:1e5,17:1e12,18:1495978707e5,19:94607304725808e5,20:3085677581491367e4,21:304.80060960121926,22:25.400050800101603,23:914.4018288036576,24:1.6093472186944375e6},lIe={1:"in",2:"ft",4:"mm",5:"cm",6:"m",7:"km",10:"yd"};function QZ(r){return Number.isFinite(r)?sIe[Math.trunc(r)]??1:1}function yee(r,e,t){let n=QZ(t);return n===0?r:r*(QZ(e)/n)}function cIe(r,e,t){let n=yee(1,e,t);return r*n*n}function bee(r){return lIe[Math.trunc(r)]??""}var Hz={showUnits:!0,showApproximate:!0},uIe={showUnits:!1,showApproximate:!0},eJ={showUnits:!0,showApproximate:!0,applyAngbaseAngdir:!1},Zf={};function Wz(r){return{lunits:Zf.lunits??r.lunits,luprec:Zf.luprec??r.luprec,aunits:Zf.aunits??r.aunits,auprec:Zf.auprec??r.auprec,lengthUnit:Zf.lengthUnit??gee}}function hIe(){Zf={}}function dIe(r){let e=Wz(r);return e.lunits!==r.lunits||e.luprec!==r.luprec||e.aunits!==r.aunits||e.auprec!==r.auprec}function pIe(r){return r===Cn.Architectural||r===Cn.Engineering}function vee(r,e,t){let n=Wz(r),i=t!=null&&t.forceDecimalLength&&pIe(n.lunits)?Cn.Decimal:n.lunits;if(!(dIe(r)||i!==n.lunits))return e();let o=r,a={lunits:o._lunits,luprec:o._luprec,aunits:o._aunits,auprec:o._auprec};o._lunits=i,o._luprec=n.luprec,o._aunits=n.aunits,o._auprec=n.auprec;try{return e()}finally{o._lunits=a.lunits,o._luprec=a.luprec,o._aunits=a.aunits,o._auprec=a.auprec}}function FT(r,e,t=Hz,n){return vee(r,()=>r.formatter.formatLength(e,t),n)}function xee(r){return{...uIe,...r,showUnits:!1}}function wee(r){let e=r.insunits??0;if(e===0)return;let t=Zf.lengthUnit;if(!(t==null||t===e||t===gee))return t}function Us(r,e,t=Hz){let n=wee(r);if(n==null)return FT(r,e,t);let i=r.insunits??0,o=yee(e,i,n),a=FT(r,o,xee(t),{forceDecimalLength:!0}),s=bee(n);return s?`${a} ${s}`:a}function NT(r,e,t=Hz){let n=wee(r);if(n==null)return`${FT(r,e,t)}\xB2`;let i=r.insunits??0,o=cIe(e,i,n),a=FT(r,o,xee(t),{forceDecimalLength:!0}),s=bee(n);return s?`${a} ${s}\xB2`:`${a}\xB2`}function aF(r,e){if(!Number.isFinite(r))return r;let t=10**Math.max(0,Math.floor(e)),n=Math.round(r*t)/t;return Object.is(n,-0)?0:n}function fIe(r,e,t){switch(e){case ar.DecimalDegrees:return aF(r*180/Math.PI,t)*Math.PI/180;case ar.Gradians:return aF(r*(200/Math.PI),t)*(Math.PI/200);case ar.Radians:return aF(r,t);default:return r}}function zT(r,e,t=eJ){return vee(r,()=>{let{aunits:n,auprec:i}=Wz(r),o=fIe(e,n,i);return r.formatter.formatAngle(o,{...eJ,...t,applyAngbaseAngdir:!1})})}function tJ(r,e){switch(e.kind){case"length":return Us(r,e.value);case"area":return NT(r,e.value);case"angle":return zT(r,e.radians);case"coordinate":{let t=Us(r,e.x),n=Us(r,e.y);return`X ${t} Y ${n}`}}}function nJ(r){if(!r.isByColor)return r;let e=r.RGB;if(e==null)return r;let t=qi.getIndexByColor(e);if(t==null)return r;let n=new je;return n.colorIndex=t,n}function mIe(r){let e=r.trim();return e.startsWith("#")||/^(rgb|rgba|hsl|hsla)\(/i.test(e)}function _ee(r,e=[123,135,148]){let t=r.trim();if(!t){let n=new je;return n.setRGB(e[0],e[1],e[2]),n}if(!mIe(t))try{let n=je.fromString(t);if(n)return nJ(n)}catch{}try{return nJ(new je().setRGBFromCss(t))}catch{let n=new je;return n.setRGB(e[0],e[1],e[2]),n}}function See(r){let e=t=>Math.max(0,Math.min(255,Math.round(t??0))).toString(16).padStart(2,"0");return`#${e(r.red)}${e(r.green)}${e(r.blue)}`}var gIe=0,Po=gIe,k1=13,zF,Aee=k1,UT="adaptive",Cb;function Hs(r){return zF?zF.clone():gt.instance().getVar(oe.MEASUREMENTCOLOR,r)}function Hb(){return Aee}function yIe(r){zF=r.clone()}function bIe(){return UT}function vIe(){return Cb}function xIe(r,e){if(!(!Number.isFinite(e)||e<=0)){if(UT=r,r==="adaptive"){Aee=e,Cb=void 0;return}Cb=e}}function mi(r){return{color:Hs(r),lineWeight:Po,fontSize:Hb(),textHeightMode:UT,...UT==="custom"&&Cb!=null&&Cb>0?{textHeightWcs:Cb}:{}}}function K1(r){return{color:r.color.clone(),lineWeight:r.lineWeight,fontSize:r.fontSize,textHeightMode:r.textHeightMode,textHeightWcs:r.textHeightWcs}}function Ti(r){let e=Number(r);return!Number.isFinite(e)||e<=0?0:Math.max(1,e/28)}function Mee(r,e){return`rgba(${r.red}, ${r.green}, ${r.blue}, ${e})`}function Vs(r){return See(r)}function Pee(r){return _ee(r,[123,135,148])}var Jf="overlayStrokeWcs",UF="overlayCloudWcs",Xz=8;function wIe(r){var e;let t=(e=r.internalCamera)==null?void 0:e.zoom;return typeof t=="number"&&t>0?t:null}function q1(r){let e=r.worldToScreen({x:0,y:0}),t=r.worldToScreen({x:1,y:0}),n=Math.hypot(t.x-e.x,t.y-e.y);return n>0&&Number.isFinite(n)?n:1}function Ci(r,e){return r/q1(e)}function Yz(r,e){return r*q1(e)}function _Ie(r,e){!(e>0)||!Number.isFinite(e)||(r.dataset[Jf]=String(e))}function SIe(r,e){!(e>0)||!Number.isFinite(e)||(r.dataset[xT]=String(e))}function ts(r,e,t,n){if(!(r>0))return delete e.dataset[Jf],1;let i=q1(t),o=n!=null&&n>0?n:Number(e.dataset[Jf]);return!Number.isFinite(o)||o<=0?(o=r/i,e.dataset[Jf]=String(o)):n!=null&&n>0&&e.dataset[Jf]!==String(o)&&(e.dataset[Jf]=String(o)),Math.max(.5,o*i)}var zc=12,xT="overlayArrowWcs";function Eee(r,e=2){let t=e>0&&Number.isFinite(e)?e:1;return Math.max(1,r*(zc/t))}function $z(r,e,t){let n=q1(e),i=t!=null&&t>0?t:Number(r.dataset[xT]);return!Number.isFinite(i)||i<=0?(i=zc/n,r.dataset[xT]=String(i)):t!=null&&t>0&&(r.dataset[xT]=String(i)),Math.max(.5,i*n)}function Kz(r,e=2){let t=e>0&&Number.isFinite(e)?e:1,n=r/t;return[8*n,5*n]}function Cee(r,e,t){return!(r!=null&&r>0)||!(e>0)||!(t>0)||t===e?r:r*(t/e)}function AIe(r,e,t){let n=wIe(t),i=q1(t);if(n==null||!(r>0)||!(e>0))return null;let o=r*n/(e*i);return o>0&&Number.isFinite(o)?o:null}function ch(r,e){var t;let{textHeightWcs:n,strokeWidthWcs:i,fontSizePx:o,elements:a,canvases:s}=e;if(i!=null&&i>0)for(let c of s??[])_Ie(c,i);else if(e.strokeScreenPx===0)for(let c of s??[])delete c.dataset[Jf];if(e.arrowSizeWcs!=null&&e.arrowSizeWcs>0)for(let c of s??[])SIe(c,e.arrowSizeWcs);if(i!=null&&i>0&&e.strokeScreenPx!=null&&e.strokeScreenPx>0){let c=Xz*i/e.strokeScreenPx;for(let u of s??[])u.dataset[UF]=String(c)}if(o!=null&&o>0)for(let c of s??[])c.style.fontSize=`${o}px`;if(!(o!=null&&o>0)||!(n!=null&&n>0))return;let l=AIe(o,n,r);if(l!=null)for(let c of a??[]){let u=c;(t=u.setFontSize)==null||t.call(u,o),c.scaleWithView&&(c.baseZoom=l)}}function Sr(r,e,t){let n=t.fontSize!=null&&t.fontSize>0?t.fontSize:0;if(t.textHeightMode==="custom"&&t.textHeightWcs!=null&&t.textHeightWcs>0&&n>0){for(let i of e)i.scaleWithView=!0;ch(r,{textHeightWcs:t.textHeightWcs,fontSizePx:n,elements:e});return}for(let i of e)i.scaleWithView=!1,i.baseZoom=void 0}function Wb(r,e){let t=e.getBoundingClientRect(),n=window.devicePixelRatio||1,i=`${t.width}px`,o=`${t.height}px`,a=Math.max(1,Math.floor(t.width*n)),s=Math.max(1,Math.floor(t.height*n));r.style.left="0",r.style.top="0",r.style.width!==i&&(r.style.width=i),r.style.height!==o&&(r.style.height=o),r.width!==a&&(r.width=a),r.height!==s&&(r.height=s);let l=r.getContext("2d");return l?(l.setTransform(n,0,0,n,0,0),l.clearRect(0,0,t.width,t.height),l):null}function MIe(r,e){let t=e.canvas.getBoundingClientRect(),n=window.devicePixelRatio||1,i=Math.round(t.width),o=Math.round(t.height),a=e.canvasToContainer({x:0,y:0});r.style.left=`${a.x}px`,r.style.top=`${a.y}px`;let s=`${i}px`,l=`${o}px`;r.style.width!==s&&(r.style.width=s),r.style.height!==l&&(r.style.height=l);let c=Math.max(1,Math.floor(i*n)),u=Math.max(1,Math.floor(o*n));r.width!==c&&(r.width=c),r.height!==u&&(r.height=u);let h=r.getContext("2d");return h?(h.setTransform(n,0,0,n,0,0),h.clearRect(0,0,i,o),h):null}function lh(r,e,t,n,i=zc){let o=t.x-e.x,a=t.y-e.y,s=Math.hypot(o,a)||1,l=o/s,c=a/s,u=i,h={x:t.x-l*u-c*u*.45,y:t.y-c*u+l*u*.45},d={x:t.x-l*u+c*u*.45,y:t.y-c*u-l*u*.45};r.fillStyle=n,r.beginPath(),r.moveTo(t.x,t.y),r.lineTo(h.x,h.y),r.lineTo(d.x,d.y),r.closePath(),r.fill()}function Tee(r,e,t,n,i=!0,o=2,a,s,l){let c=ts(o,r.canvas,a,s);r.strokeStyle=n,r.lineWidth=c,r.beginPath(),r.moveTo(e.x,e.y),r.lineTo(t.x,t.y),r.stroke(),i&&lh(r,t,e,n,$z(r.canvas,a,l))}function kee(r,e,t,n,i=1.5,o,a){let s=ts(i,r.canvas,o,a),l=Math.min(e.x,t.x),c=Math.min(e.y,t.y),u=Math.abs(e.x-t.x),h=Math.abs(e.y-t.y);r.fillStyle=n,r.globalAlpha=.28,r.fillRect(l,c,u,h),r.globalAlpha=1,r.strokeStyle=n,r.lineWidth=s,r.strokeRect(l,c,u,h)}function Iee(r){return{all:r=r||new Map,on:function(e,t){var n=r.get(e);n?n.push(t):r.set(e,[t])},off:function(e,t){var n=r.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var n=r.get(e);n&&n.slice().map(function(i){i(t)}),(n=r.get("*"))&&n.slice().map(function(i){i(e,t)})}}}var Gt=Iee();function um(){Gt.emit("undo-stack-changed",{})}function im(r,e,t){var n;let i=((n=r.isUndoRecording)==null?void 0:n.call(r))??!1;r.runDatabaseEdit(e,t),i||(Gt.emit("session-db-edit-committed",{}),um())}var pi;function PIe(r){pi=r}var jF=class{constructor(){this.undoStack=[],this.redoStack=[],this.depth=0}get isBusy(){return this.depth>0}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clearRedo(){this.redoStack.length=0}clear(){this.undoStack.length=0,this.redoStack.length=0}run(e,t,n){if(this.depth>0){n();return}let i=nn(),o=rJ(i.list()),a=i.dirty;this.depth++;try{n()}finally{this.depth--}let s=rJ(i.list()),l=i.dirty;EIe(o,s)&&a===l||(this.undoStack.push({label:t,before:o,after:s,beforeDirty:a,afterDirty:l}),this.redoStack.length=0,Dd().recordMarkup(),um())}undo(){let e=this.undoStack.pop();return e?(this.apply(e.before,e.beforeDirty),this.redoStack.push(e),!0):!1}redo(){let e=this.redoStack.pop();return e?(this.apply(e.after,e.afterDirty),this.undoStack.push(e),!0):!1}apply(e,t){this.depth++;try{nn().restore(e,{dirty:t})}finally{this.depth--}}},VF=class{constructor(){this.undoKinds=[],this.redoKinds=[]}recordDb(){this.undoKinds.push("db"),this.redoKinds.length=0,Ja().clearRedo(),pi?.clearRedo()}recordMarkup(){this.undoKinds.push("markup"),this.redoKinds.length=0,pi?.clearRedo()}recordOverlay(){this.undoKinds.push("overlay"),this.redoKinds.length=0,Ja().clearRedo()}canUndo(e){var t;return this.undoKinds.length>0||Ja().canUndo()||(pi?.canUndo()??!1)||(((t=e.transactionManager)==null?void 0:t.canUndo())??!1)}canRedo(e){var t;return this.redoKinds.length>0||Ja().canRedo()||(pi?.canRedo()??!1)||(((t=e.transactionManager)==null?void 0:t.canRedo())??!1)}undo(e){for(var t;;){let n=this.undoKinds.pop();if(n==="markup"){if(Ja().undo())return this.redoKinds.push("markup"),"markup";continue}if(n==="overlay"){if(pi!=null&&pi.undo())return this.redoKinds.push("overlay"),"overlay";continue}if(n==="db"){if(e.transactionManager.undo())return this.redoKinds.push("db"),"db";continue}return Ja().undo()?(this.redoKinds.push("markup"),"markup"):pi!=null&&pi.undo()?(this.redoKinds.push("overlay"),"overlay"):(t=e.transactionManager)!=null&&t.undo()?(this.redoKinds.push("db"),"db"):!1}}redo(e){for(var t;;){let n=this.redoKinds.pop();if(n==="markup"){if(Ja().redo())return this.undoKinds.push("markup"),"markup";continue}if(n==="overlay"){if(pi!=null&&pi.redo())return this.undoKinds.push("overlay"),"overlay";continue}if(n==="db"){if(e.transactionManager.redo())return this.undoKinds.push("db"),"db";continue}return Ja().redo()?(this.undoKinds.push("markup"),"markup"):pi!=null&&pi.redo()?(this.undoKinds.push("overlay"),"overlay"):(t=e.transactionManager)!=null&&t.redo()?(this.undoKinds.push("db"),"db"):!1}}clear(){this.undoKinds.length=0,this.redoKinds.length=0,pi?.clear()}};function Ja(){return Ck().history}function Dd(){return Ck().sessionUndo}function wa(r,e,t){Ja().run(r,e,t)}Gt.on("session-db-edit-committed",()=>{Dd().recordDb()});function rJ(r){return structuredClone(r)}function EIe(r,e){return r.length!==e.length?!1:JSON.stringify(r)===JSON.stringify(e)}var GF=class{constructor(){this.undoStack=[],this.redoStack=[],this.depth=0}get isBusy(){return this.depth>0}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clearRedo(){for(let e of this.redoStack)oJ(e);this.redoStack.length=0}clear(){for(let e of[...this.undoStack,...this.redoStack])oJ(e);this.undoStack.length=0,this.redoStack.length=0}run(e,t,n){if(this.depth>0){n();return}let i=e,o=sF(i),a=iJ(o);this.depth++;try{n()}finally{this.depth--}let s=sF(i),l=s.filter(h=>o.indexOf(h)<0),c=o.filter(h=>s.indexOf(h)<0),u=iJ(s);l.length===0&&c.length===0&&!CIe(a,u)||(this.undoStack.push({label:t,view:i,added:l,removed:c,stylesBefore:a,stylesAfter:u}),this.clearRedo(),Dd().recordOverlay(),um())}undo(){let e=this.undoStack.pop();return e?(this.apply(e,"undo"),this.redoStack.push(e),!0):!1}redo(){let e=this.redoStack.pop();return e?(this.apply(e,"redo"),this.undoStack.push(e),!0):!1}apply(e,t){this.depth++;try{let n=e.view.htmlTransientManager,i=t==="undo"?e.added:e.removed,o=t==="undo"?e.removed:e.added;for(let s of i)n.detach(s.id);for(let s of o)n.reattach(s),uJ(s);let a=t==="undo"?e.stylesBefore:e.stylesAfter;for(let s of sF(e.view)){uJ(s);let l=a[s.id];l&&Ree(e.view,s,l)}e.view.isHtmlDirty=!0}finally{this.depth--}}};function sF(r){return r.htmlTransientManager.groupsOnLayer(Ln)}function iJ(r){let e={};for(let t of r){let n=jc(t.id);n&&(e[t.id]=K1(n))}return e}function CIe(r,e){let t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!0;for(let i of t){let o=r[i],a=e[i];if(!a||o.lineWeight!==a.lineWeight||o.fontSize!==a.fontSize||o.color.red!==a.color.red||o.color.green!==a.color.green||o.color.blue!==a.color.blue)return!0}return!1}function oJ(r){let e=r.view.htmlTransientManager;for(let t of[...r.added,...r.removed])if(!e.has(t.id)){for(let n of t.children)n.dispose();t.dispose()}}var lF;function Cd(){return lF||(lF=new GF),lF}function Ws(r,e,t){Cd().run(r,e,t)}function aJ(){Cd().clear(),YIe(),hIe(),UIe()}function TIe(){PIe({canUndo:()=>Cd().canUndo(),canRedo:()=>Cd().canRedo(),undo:()=>Cd().undo(),redo:()=>Cd().redo(),clearRedo:()=>Cd().clearRedo(),clear:()=>Cd().clear()})}TIe();var kIe=["distance","angle","area","arc","point"];function Z1(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Ml(r){return Z1(r)&&typeof r.x=="number"&&typeof r.y=="number"&&Number.isFinite(r.x)&&Number.isFinite(r.y)}function IIe(r){return typeof r=="string"&&kIe.includes(r)}function sJ(r){return typeof r=="number"&&r>0&&Number.isFinite(r)?r:void 0}function LIe(r){if(!Z1(r)||typeof r.color!="string")return;let e=typeof r.fontSize=="number"&&r.fontSize>0?r.fontSize:k1;return{color:r.color,lineWeight:Po,fontSize:e,textHeightWcs:sJ(r.textHeightWcs),arrowSizeWcs:sJ(r.arrowSizeWcs)}}function OIe(r,e){if(!(!Z1(e)||e.type!==r))switch(r){case"distance":return!Ml(e.start)||!Ml(e.end)?void 0:{type:r,start:e.start,end:e.end};case"angle":return!Ml(e.vertex)||!Ml(e.arm1)||!Ml(e.arm2)?void 0:{type:r,vertex:e.vertex,arm1:e.arm1,arm2:e.arm2};case"area":return!Array.isArray(e.points)||e.points.length<3||!e.points.every(Ml)?void 0:{type:r,points:e.points};case"arc":return!Ml(e.center)||typeof e.radius!="number"||!(e.radius>0)||!Ml(e.start)||!Ml(e.end)?void 0:{type:r,center:e.center,radius:e.radius,start:e.start,end:e.end,...Ml(e.through)?{through:e.through}:{}};case"point":return Ml(e.position)?{type:r,position:e.position}:void 0}}function DIe(r){if(!Z1(r)||typeof r.id!="string"||!IIe(r.type))return;let e=LIe(r.style),t=OIe(r.type,r.geometry);if(!(!e||!t))return{id:r.id,type:r.type,layoutId:typeof r.layoutId=="string"?r.layoutId:void 0,style:e,geometry:t}}function qz(r,e){let t={color:Vs(r.color),lineWeight:Po,fontSize:r.fontSize};return r.textHeightMode==="custom"&&r.textHeightWcs!=null&&r.textHeightWcs>0?t.textHeightWcs=r.textHeightWcs:r.textHeightMode==="adaptive"&&e?t.textHeightWcs=Ci(r.fontSize,e):r.textHeightWcs!=null&&r.textHeightWcs>0?t.textHeightWcs=r.textHeightWcs:e&&(t.textHeightWcs=Ci(r.fontSize,e)),t}function RIe(r){return{color:Pee(r.color),lineWeight:Po,fontSize:r.fontSize>0?r.fontSize:k1,textHeightWcs:r.textHeightWcs}}function BIe(r){let e;try{e=JSON.parse(r)}catch{throw new Error("Invalid measurement sidecar: not JSON")}if(!Z1(e)||e.version!==1)throw new Error("Invalid measurement sidecar: expected version 1");if(!Array.isArray(e.measurements))throw new Error("Invalid measurement sidecar: measurements must be an array");let t=[];for(let n of e.measurements){let i=DIe(n);i&&t.push(i)}return{version:1,drawingName:typeof e.drawingName=="string"?e.drawingName:void 0,measurements:t}}function FIe(r){let{strokeWidthWcs:e,...t}=r;return{...t,lineWeight:Po}}function NIe(r){let e={...r,measurements:r.measurements.map(t=>({...t,style:FIe(t.style)}))};return`${JSON.stringify(e,null,2)}
  4435. `}function zIe(r){return r?`${r.replace(/\.(dwg|dxf)$/i,"")}.measurement.json`:"drawing.measurement.json"}var Ln="measurement",gi="measurement-live",J1=!0;function Lee(){return J1}function UIe(){J1=!0}function jIe(r,e){J1=e;let t=r.activeLayoutBtrId,n=r.htmlTransientManager;for(let i of n.groupsOnLayer(Ln))(i.layoutId==null||i.layoutId===t)&&i.setVisible(e);n.setVisible(e,gi),r.isHtmlDirty=!0}var Uc=new Map,Oee=new WeakMap,Xb=new Map,HF=new Set,VIe=new Set,sh;function jc(r){let e=Xb.get(r);return e?K1(e):void 0}function Tk(){return sh}function lJ(){return sh?jc(sh):void 0}function Dee(r){return HF.add(r),()=>{HF.delete(r)}}function wT(){for(let r of HF)r()}function I1(){for(let r of VIe)r()}function GIe(){I1()}function Zz(r,e){Xb.set(r,K1(e))}function Ree(r,e,t){var n,i,o;let a=Xb.get(e.id),s=((n=t.color)==null?void 0:n.clone())??a?.color.clone();if(!s)return;let l={color:s,lineWeight:Po,fontSize:t.fontSize??a?.fontSize??k1,textHeightMode:t.textHeightMode??a?.textHeightMode??"adaptive",textHeightWcs:t.textHeightWcs??(t.textHeightMode==="custom"||a==null?void 0:a.textHeightWcs)};l.textHeightMode==="custom"&&t.textHeightWcs!=null&&(l.textHeightWcs=t.textHeightWcs);let c=t.fontSize!=null&&(a==null||t.fontSize!==a.fontSize)||t.textHeightWcs!=null&&(a==null||t.textHeightWcs!==a.textHeightWcs)||t.textHeightMode!=null&&(a==null||t.textHeightMode!==a.textHeightMode);Zz(e.id,l);let u=Uc.get(e.id);if(u&&(u.style=K1(l),u.snapshot)){let h=u.snapshot.style,d=qz(l),p=l.textHeightMode==="custom"&&l.textHeightWcs!=null&&l.textHeightWcs>0?l.textHeightWcs:HIe(r,l.fontSize,a?.fontSize,h.textHeightWcs,c),f=a?.fontSize??k1,m=Cee(h.arrowSizeWcs,f,l.fontSize);u.snapshot={...u.snapshot,style:{...d,textHeightWcs:p,...m!=null&&m>0?{arrowSizeWcs:m}:{}}}}if(c){let h=(o=(i=Uc.get(e.id))==null?void 0:i.snapshot)==null?void 0:o.style;ch(r,{textHeightWcs:h?.textHeightWcs,arrowSizeWcs:h?.arrowSizeWcs,fontSizePx:l.fontSize,strokeScreenPx:Ti(Po),elements:[...e.children??[]],canvases:(e.canvases??[]).map(d=>d.canvas)})}WIe(r,e,l)}function HIe(r,e,t,n,i){return i&&n!=null&&n>0&&t!=null&&t>0?n*(e/t):i||n==null||!(n>0)?Ci(e,r):n}function cJ(r,e){let t=r.htmlTransientManager.getSelectedGroups().filter(n=>n.layer===Ln);t.length!==0&&Ws(r,"Measurement Style",()=>{for(let n of t)Ree(r,n,e)})}function WIe(r,e,t){var n,i,o;for(let s of e.children){let l=s;(n=l.setColor)==null||n.call(l,t.color),(i=l.setFontSize)==null||i.call(l,t.fontSize)}if(t.fontSize>0)for(let s of e.canvases??[])s.canvas.style.fontSize=`${t.fontSize}px`;let a=Uc.get(e.id);(o=a?.redraw)==null||o.call(a,t),r.isHtmlDirty=!0}function XIe(r){let e=[];for(let t of r.htmlTransientManager.groupsOnLayer(Ln)){let n=Uc.get(t.id);if(!(n!=null&&n.snapshot))continue;let i=n.style??Xb.get(t.id),o=n.snapshot.style,a;if(i){let s=qz(i),l=o.arrowSizeWcs!=null&&o.arrowSizeWcs>0?o.arrowSizeWcs:n.snapshot.type==="distance"?Ci(zc,r):void 0;a={...s,lineWeight:Po,textHeightWcs:o.textHeightWcs??Ci(s.fontSize,r),...l!=null&&l>0?{arrowSizeWcs:l}:{}}}else{let{strokeWidthWcs:s,...l}=o;a={...l,lineWeight:Po}}e.push({...n.snapshot,id:t.id,layoutId:t.layoutId,style:a})}return e}function YIe(){Uc.clear(),Xb.clear(),sh=void 0,wT(),I1()}function uJ(r){let e=Oee.get(r);e&&(Uc.set(r.id,e),e.style&&Zz(r.id,e.style),I1())}function $Ie(r,e,t){let n=t?.entityIds??[],i=t??{};Uc.set(e.id,i),Oee.set(e,i),t!=null&&t.style&&Zz(e.id,t.style);let o=e.onSelectedChanged;e.onSelectedChanged=(l,c)=>{o?.(l,c),l?(sh=c.id,wT(),n.length>0&&r.highlight(n)):(sh===c.id&&(sh=void 0,wT()),n.length>0&&r.unhighlight(n))};let a=e.onVisibleChanged;e.onVisibleChanged=(l,c)=>{a?.(l,c);for(let u of n)r.setTransientEntityVisible(u,l)};let s=e.onDispose;e.onDispose=()=>{var l;s?.(),Uc.delete(e.id),Xb.delete(e.id),sh===e.id&&(sh=void 0,wT()),n.length>0&&r.unhighlight(n);try{(l=t?.dispose)==null||l.call(t)}catch{}I1()},Ws(r,"Create Measurement",()=>{r.htmlTransientManager.add(e)}),!J1&&(e.layoutId==null||e.layoutId===r.activeLayoutBtrId)&&e.setVisible(!1),r.isHtmlDirty=!0,I1()}function Bee(r){var e,t;return(t=(e=Uc.get(r))==null?void 0:e.snapshot)==null?void 0:t.geometry}function om(r){var e;let t=(e=Uc.get(r))==null?void 0:e.snapshot;return t?{...t,geometry:t.geometry}:void 0}function KIe(r,e,t,n){if(!J1)return;let i={x:e,y:t},o=s=>r.worldToScreen(s),a=r.htmlTransientManager.groupsOnLayer(Ln);for(let s=a.length-1;s>=0;s--){let l=a[s];if(!l.visible)continue;let c=Bee(l.id);if(c&&mee(c,i,o,n))return l.id}}function Tb(r,e){return r.minX>=e.minX&&r.maxX<=e.maxX&&r.minY>=e.minY&&r.maxY<=e.maxY}function qIe(r){var e;return 80+(((e=r.id)==null?void 0:e.length)??0)*2}function Fee(r,e=32){let t=r.length;if(t===0)return 0;let n=Math.min(t,e),i=0;for(let o=0;o<n;o++)i+=qIe(r[o]);return Math.round(i/n*t)}var ZIe=10;function Nee(r){return{minX:r.min.x,minY:r.min.y,maxX:r.max.x,maxY:r.max.y}}function JIe(r,e){return!(r.maxX<e.minX||r.minX>e.maxX||r.maxY<e.minY||r.minY>e.maxY)}function hJ(r,e,t){let n=Nee(r);return t==="window"?Tb(n,e):JIe(n,e)}function QIe(r,e,t,n){let i={x:e,y:t},o=l=>r.worldToScreen(l),a=r.activeLayoutBtrId,s=nn().list();for(let l=s.length-1;l>=0;l--){let c=s[l];if(c.layoutId!=null&&c.layoutId!==a)continue;let u=r.htmlTransientManager.getGroup(c.id);if(u!=null&&u.visible&&dee(c.geometry,i,o,n))return c.id}}function eLe(r,e){let t=r.worldToScreen(e),n=Math.max(r.selectionBoxSize*2,4),i=s=>r.worldToScreen(s),o=r.activeLayoutBtrId,a=nn().list();for(let s=a.length-1;s>=0;s--){let l=a[s];if(l.layoutId!=null&&l.layoutId!==o)continue;let c=r.htmlTransientManager.getGroup(l.id);if(c!=null&&c.visible&&RT(l.geometry)&&hee(l.geometry,t,i,n))return l}}function tLe(r,e,t){let n=Nee(e),i=r.activeLayoutBtrId,o=[];for(let a of nn().list()){if(a.layoutId!=null&&a.layoutId!==i)continue;let s=r.htmlTransientManager.getGroup(a.id);if(!(s!=null&&s.visible))continue;let l=uee(a.geometry);l&&hJ(l,n,t)&&o.push(a.id)}if(!Lee())return o;for(let a of r.htmlTransientManager.groupsOnLayer(Ln)){if(!a.visible||a.layoutId!=null&&a.layoutId!==i)continue;let s=Bee(a.id);if(!s)continue;let l=aIe(s);l&&hJ(l,n,t)&&o.push(a.id)}return o}function nLe(r,e,t){let n=r.htmlTransientManager;return t==="remove"?n.deselectGroup(e):t==="add"?n.selectGroup(e,!1):(n.selectGroup(e,!0),!0)}function rLe(r,e,t){let n=r.htmlTransientManager,i=!1;if(t==="replace"){let o=n.hasSelection();n.deselectAll();for(let a of e)n.selectGroup(a,!1)&&(i=!0);return o||i}if(e.length===0)return!1;if(t==="add"){for(let o of e)n.selectGroup(o,!1)&&(i=!0);return i}for(let o of e)n.deselectGroup(o)&&(i=!0);return i}function iLe(r,e,t,n){let i=Math.max(r.selectionBoxSize*2,ZIe),o=QIe(r,e,t,i),a=KIe(r,e,t,i),s=o??a;if(!s)return!1;let l=nLe(r,s,n);return l&&(r.isHtmlDirty=!0),l}function oLe(r,e,t,n){let i=tLe(r,e,t),o=rLe(r,i,n);return o&&(r.isHtmlDirty=!0),o}var jT="simkai";function aLe(){return{fontFamily:jT,fontSize:24,bold:!1,italic:!1,underline:!1,overline:!1,strike:!1,script:"normal",aci:null,rgb:16777215,obliqueAngle:0,widthFactor:1,tracking:1,paragraphAlignment:Vt.DEFAULT}}function dJ(r,e){return r.fontFamily===e.fontFamily&&r.fontSize===e.fontSize&&r.bold===e.bold&&r.italic===e.italic&&r.underline===e.underline&&r.overline===e.overline&&r.strike===e.strike&&r.script===e.script&&r.aci===e.aci&&r.rgb===e.rgb&&r.obliqueAngle===e.obliqueAngle&&r.widthFactor===e.widthFactor&&r.tracking===e.tracking&&r.paragraphAlignment===e.paragraphAlignment}function Za(r,e,t){return Math.min(t,Math.max(e,r))}function sLe(r,e){let t=Math.max(r.y-r.height/2,e.y-e.height/2),n=Math.min(r.y+r.height/2,e.y+e.height/2);return Math.max(0,n-t)}var WF=class{constructor(e){Me(this,"containerBox"),Me(this,"charBoxes"),Me(this,"explicitLineBreakIndices",[]),Me(this,"explicitLineLayouts",[]),Me(this,"cursorLineHint",null),Me(this,"verticalAlign"),Me(this,"lineTolerance"),Me(this,"debug"),Me(this,"lines",[]),Me(this,"cursorIndex",0),Me(this,"selection",null),Me(this,"dragAnchor",null),Me(this,"preferredX",null),Me(this,"handlers",{cursorMove:new Set,selectionChange:new Set,linesUpdate:new Set}),this.containerBox={...e.containerBox};let t=this.normalizeCharLayout(e.charBoxes,e.lineBreakIndices);this.charBoxes=t.charBoxes,this.explicitLineBreakIndices=t.lineBreakIndices,this.explicitLineLayouts=this.normalizeLineLayouts(e.lineLayouts),this.verticalAlign=e.verticalAlign??"center",this.lineTolerance=e.lineTolerance??5,this.debug=e.debug??!1,this.cursorIndex=Za(e.initialIndex??0,0,this.charBoxes.length),this.recomputeLines(),e.initialSelection&&this.setSelection(e.initialSelection.start,e.initialSelection.end)}moveLeft(){if(this.selection&&!this.selection.isCollapsed){this.cursorIndex=this.selection.start,this.cursorLineHint=null,this.clearSelection(),this.emitCursor();return}let e=this.getCurrentLineIndex();if(e>=0){let t=this.lines[e];if(t){if(this.cursorIndex>t.startIndex&&this.cursorIndex<=t.endIndex+1){this.moveTo(this.cursorIndex-1,e);return}if(this.cursorIndex===t.startIndex&&e>0){this.moveTo(this.cursorIndex,e-1);return}}}this.moveTo(this.cursorIndex-1)}moveRight(){if(this.selection&&!this.selection.isCollapsed){this.cursorIndex=this.selection.end,this.cursorLineHint=null,this.clearSelection(),this.emitCursor();return}let e=this.getCurrentLineIndex();if(e>=0){let t=this.lines[e],n=e+1;if(t&&this.cursorIndex===t.endIndex&&n<this.lines.length&&this.isHardBreakChar(t.endIndex)){this.moveTo(t.endIndex+1,n);return}if(t&&this.cursorIndex===t.endIndex+1&&n<this.lines.length){this.moveTo(this.cursorIndex,n);return}}this.cursorIndex>=this.charBoxes.length||this.moveTo(this.cursorIndex+1)}moveUp(){this.moveVertical(-1)}moveDown(){this.moveVertical(1)}moveTo(e,t=null){let n=Za(e,0,this.charBoxes.length);n===this.cursorIndex&&this.cursorLineHint===t||(this.cursorIndex=n,this.cursorLineHint=t,this.preferredX=null,this.emitCursor())}moveToStart(){this.moveTo(0)}moveToEnd(){this.moveTo(this.charBoxes.length)}moveToLineStart(){let e=this.getCurrentLineIndex();if(e<0){this.moveToStart();return}let t=this.lines[e];t&&this.moveTo(t.startIndex,e)}moveToLineEnd(){let e=this.getCurrentLineIndex();if(e<0){this.moveToEnd();return}let t=this.lines[e];t&&this.moveTo(t.endIndex+1,e)}setSelection(e,t){let n=Za(e,0,this.charBoxes.length),i=Za(t,0,this.charBoxes.length);this.setSelectionWithDirection(n,i)}clearSelection(){this.selection&&(this.selection=null,this.dragAnchor=null,this.emit("selectionChange",null))}selectAll(){this.setSelectionWithDirection(0,this.charBoxes.length),this.cursorIndex=this.charBoxes.length,this.cursorLineHint=null,this.emitCursor()}setSelectionWithDirection(e,t){let n=Za(e,0,this.charBoxes.length),i=Za(t,0,this.charBoxes.length),o=Math.min(n,i),a=Math.max(n,i);this.selection={start:o,end:a,isCollapsed:o===a,anchor:n,active:i,isBackwards:i<n,selectedLines:this.resolveSelectedLines(o,a)},this.cursorIndex=i,this.cursorLineHint=null,this.emit("selectionChange",this.selection),this.emitCursor()}extendSelection(e){var t;let n=Za(e,0,this.charBoxes.length),i=((t=this.selection)==null?void 0:t.anchor)??this.cursorIndex;this.setSelectionWithDirection(i,n)}getSelection(){return this.selection?{...this.selection,selectedLines:[...this.selection.selectedLines]}:null}getSelectedCharBoxes(){return!this.selection||this.selection.isCollapsed?[]:this.charBoxes.slice(this.selection.start,this.selection.end).map(e=>({...e}))}getSelectedLines(){if(!this.selection||this.selection.isCollapsed)return[];let e=[],{start:t,end:n}=this.selection;for(let i=0;i<this.lines.length;i++){let o=this.lines[i];if(!o)continue;let a=o.startIndex,s=o.endIndex+1,l=Math.max(t,a),c=Math.min(n,s);l<c&&e.push({lineIndex:i,startOffset:l-a,endOffset:c-a})}return e}hasSelection(){return!!this.selection&&!this.selection.isCollapsed}moveToClick(e,t){let n=this.hitTest(e,t);if(n<0)return!1;let i=this.hitTestLine(t);return this.clearSelection(),this.moveTo(n,i>=0?i:null),!0}extendSelectionToClick(e,t){let n=this.hitTestClamped(e,t);n<0||(this.dragAnchor===null&&(this.dragAnchor=this.cursorIndex),this.setSelectionWithDirection(this.dragAnchor,n))}updateSelectionDrag(e,t){let n=this.hitTestClamped(e,t);n<0||(this.dragAnchor===null&&(this.dragAnchor=this.cursorIndex),this.setSelectionWithDirection(this.dragAnchor,n))}hitTest(e,t){if(!this.isInContainer(e,t))return-1;if(this.charBoxes.length===0)return 0;let n=this.hitTestLine(t);return n<0?-1:this.closestIndexInLine(n,e)}hitTestLine(e){if(this.lines.length===0)return-1;let t=-1,n=Number.POSITIVE_INFINITY;for(let i=0;i<this.lines.length;i++){let o=this.lines[i];if(!o)continue;let a=o.y-o.height/2,s=o.y+o.height/2;if(e>=a&&e<=s)return i;let l=e<a?a-e:e-s;l<n&&(n=l,t=i)}return t}getLines(){return this.lines.map(e=>({...e}))}getLineCount(){return this.lines.length}getLineIndex(e){if(this.lines.length===0)return-1;let t=Za(e,0,this.charBoxes.length);for(let n=0;n<this.lines.length;n++){let i=this.lines[n];if(i&&t>=i.startIndex&&t<=i.endIndex+1)return n}return this.lines.length-1}getLineInfo(e){let t=this.lines[e];if(!t)throw new Error(`Line index out of range: ${e}`);return{...t}}getCurrentLineInfo(){let e=this.getCurrentLineIndex();if(e<0)return{startIndex:0,endIndex:-1,y:this.containerBox.y,height:this.containerBox.height,charCount:0};let t=this.lines[e];return t?{...t}:{startIndex:0,endIndex:-1,y:this.containerBox.y,height:this.containerBox.height,charCount:0}}getCursorState(){var e,t;let n=this.getCurrentLineIndex(),i=this.getCursorPosition(),o=n>=0&&this.lines[n]?this.lines[n]:{startIndex:0,endIndex:-1,y:this.containerBox.y,height:this.containerBox.height,charCount:0};return{index:this.cursorIndex,position:i,lineIndex:n,lineInfo:{...o},isAtStart:this.cursorIndex===0,isAtEnd:this.cursorIndex===this.charBoxes.length,isAtLineStart:n<0?!0:this.cursorIndex===(((e=this.lines[n])==null?void 0:e.startIndex)??this.cursorIndex),isAtLineEnd:n<0?!0:this.cursorIndex===(((t=this.lines[n])==null?void 0:t.endIndex)??this.cursorIndex-1)+1}}getCurrentIndex(){return this.cursorIndex}getCursorPosition(){if(this.lines.length===0)return{x:this.containerBox.x,y:this.alignY(this.containerBox.y,this.containerBox.height)};let e=this.getCurrentLineIndex(),t=this.lines[Math.max(0,e)];if(!t)return{x:this.containerBox.x,y:this.alignY(this.containerBox.y,this.containerBox.height)};let n=this.alignY(t.y,t.height);return{x:this.indexToX(this.cursorIndex,e),y:n}}getCharBoxes(){return this.charBoxes.map(e=>({...e}))}getContainerBox(){return{...this.containerBox}}updateData(e,t,n,i){this.containerBox={...e};let o=this.normalizeCharLayout(t,n);if(this.charBoxes=o.charBoxes,this.explicitLineBreakIndices=o.lineBreakIndices,this.explicitLineLayouts=this.normalizeLineLayouts(i),this.recomputeLines(),this.cursorIndex=Za(this.cursorIndex,0,this.charBoxes.length),this.cursorLineHint=null,this.selection){let a=Za(this.selection.anchor,0,this.charBoxes.length),s=Za(this.selection.active,0,this.charBoxes.length);a===s?this.selection=null:this.setSelectionWithDirection(a,s)}this.emit("linesUpdate",this.getLines()),this.emitCursor()}setLineTolerance(e){this.lineTolerance=Math.max(0,e),this.recomputeLines(),this.emit("linesUpdate",this.getLines()),this.emitCursor(),this.selection&&(this.selection.selectedLines=this.resolveSelectedLines(this.selection.start,this.selection.end),this.emit("selectionChange",this.selection))}on(e,t){this.handlers[e].add(t)}off(e,t){(e==="cursorMove"||e==="selectionChange"||e==="linesUpdate")&&this.handlers[e].delete(t)}enableDebug(){this.debug=!0}disableDebug(){this.debug=!1}getDebugInfo(){return{debug:this.debug,container:this.getContainerBox(),cursor:this.getCursorState(),selection:this.getSelection(),lines:this.getLines(),gaps:this.lines.map((e,t)=>this.getGapPositions(t))}}destroy(){this.handlers.cursorMove.clear(),this.handlers.selectionChange.clear(),this.handlers.linesUpdate.clear(),this.selection=null,this.dragAnchor=null,this.preferredX=null}emitCursor(){this.emit("cursorMove",this.getCursorState())}emit(e,t){for(let n of this.handlers[e])n(t)}moveVertical(e){let t=this.getCurrentLineIndex();if(t<0)return;let n=this.lines[t],i=t+e;if(i<0||i>=this.lines.length)return;(this.preferredX===null||n?.charCount===0)&&(this.preferredX=this.getCursorPosition().x);let o=this.closestIndexInLine(i,this.preferredX);this.cursorIndex=o,this.cursorLineHint=i,this.emitCursor()}getCurrentLineIndex(){let e=this.getLineIndex(this.cursorIndex);if(e<0||this.cursorLineHint===null)return e;let t=this.lines[this.cursorLineHint];return t&&this.cursorIndex>=t.startIndex&&this.cursorIndex<=t.endIndex+1?this.cursorLineHint:e}isHardBreakChar(e){let t=this.charBoxes[e];return t?t.width===0:!1}resolveSelectedLines(e,t){if(e===t)return[];let n=[];for(let i=0;i<this.lines.length;i++){let o=this.lines[i];o&&t>o.startIndex&&e<o.endIndex+1&&n.push(i)}return n}isInContainer(e,t){return e>=this.containerBox.x&&e<=this.containerBox.x+this.containerBox.width&&t>=this.containerBox.y&&t<=this.containerBox.y+this.containerBox.height}hitTestClamped(e,t){if(this.charBoxes.length===0)return 0;let n=this.lines.length===0?-1:this.hitTestLine(t);return n<0?e<=this.containerBox.x?0:e>=this.containerBox.x+this.containerBox.width?this.charBoxes.length:Za(this.cursorIndex,0,this.charBoxes.length):this.closestIndexInLine(n,e)}recomputeLines(){if(this.explicitLineBreakIndices.length>0){this.lines=this.linesFromBreakIndices(this.charBoxes,this.explicitLineBreakIndices,this.explicitLineLayouts);return}this.lines=this.detectLines(this.charBoxes,this.lineTolerance)}normalizeCharLayout(e,t){let n=[],i=[];for(let s of e){if(!s){i.push(n.length);continue}n.push({...s})}let o=[...i,...t??[]],a=this.normalizeBreakIndices(o,n.length);return{charBoxes:n,lineBreakIndices:a}}normalizeBreakIndices(e,t){if(e.length===0)return[];let n=[];for(let i of e){if(!Number.isFinite(i))continue;let o=Za(Math.round(i),0,t);n.push(o)}return n.sort((i,o)=>i-o)}normalizeLineLayouts(e){if(!e||e.length===0)return[];let t=[];for(let n of e)n&&(!Number.isFinite(n.y)||!Number.isFinite(n.height)||t.push({y:n.y,height:Math.max(1,n.height)}));return t}linesFromBreakIndices(e,t,n){if(e.length===0&&t.length===0)return[];if(t.length===0)return this.detectLines(e,this.lineTolerance);let i=[],o=0;for(let a of t)if(!(a<o||a>e.length)){if(a===o){i.push(this.createEmptyLine(o,i[i.length-1],n[i.length]));continue}i.push(this.withLineLayout(this.aggregateLine(e,o,a-1),n[i.length])),o=a}return o<e.length?i.push(this.withLineLayout(this.aggregateLine(e,o,e.length-1),n[i.length])):i.push(this.createEmptyLine(o,i[i.length-1],n[i.length])),i}detectLines(e,t){if(e.length===0)return[];let n=[],i=.65,o=0;for(let a=1;a<e.length;a++){let s=e[a-1],l=e[a];if(!s||!l)continue;let c=Math.abs(l.y-s.y),u=l.x+t<s.x,h=sLe(s,l),d=Math.min(s.height,l.height),p=(d>0?h/d:0)<i;(u||c>t&&p)&&(n.push(this.aggregateLine(e,o,a-1)),o=a)}return n.push(this.aggregateLine(e,o,e.length-1)),n}aggregateLine(e,t,n){let i=0,o=0,a=0;for(let s=t;s<=n;s++){let l=e[s];l&&(i+=l.y,o+=1,a=Math.max(a,l.height))}return o===0?{startIndex:t,endIndex:n,y:this.containerBox.y,height:this.containerBox.height,charCount:Math.max(0,n-t+1)}:{startIndex:t,endIndex:n,y:i/o,height:a,charCount:n-t+1}}withLineLayout(e,t){return t?{...e,y:t.y,height:Math.max(1,t.height)}:e}createEmptyLine(e,t,n){if(n)return{startIndex:e,endIndex:e-1,y:n.y,height:Math.max(1,n.height),charCount:0};let i=Math.max(1,t?.height??this.containerBox.height),o=t!==void 0?t.y+i:this.alignY(this.containerBox.y,this.containerBox.height);return{startIndex:e,endIndex:e-1,y:o,height:i,charCount:0}}alignY(e,t){return this.verticalAlign==="top"?e-t/2:this.verticalAlign==="bottom"?e+t/2:e}indexToX(e,t){if(this.charBoxes.length===0)return this.containerBox.x;if(e<=0)return this.containerBox.x;let n=t??this.getLineIndex(e);if(n<0)return this.containerBox.x;let i=this.lines[n];if(!i)return this.containerBox.x;if(e<=i.startIndex)return this.containerBox.x;if(e>i.endIndex+1){let a=this.charBoxes[this.charBoxes.length-1];return a?a.x+a.width:this.containerBox.x}let o=this.charBoxes[e-1];return o?o.x+o.width:this.containerBox.x}getGapPositions(e){let t=this.lines[e];if(!t)return[];let n=[{index:t.startIndex,x:this.containerBox.x}];for(let i=t.startIndex;i<=t.endIndex;i++){let o=this.charBoxes[i];o&&n.push({index:i+1,x:o.x+o.width})}return n}closestIndexInLine(e,t){let n=this.getGapPositions(e);if(n.length===0)return 0;let i=n[0],o=Math.abs(t-i.x);for(let a=1;a<n.length;a++){let s=n[a];if(!s)continue;let l=Math.abs(t-s.x);l<o&&(i=s,o=l)}return i.index}},lLe={width:4,height:24,heightMode:"lineHeight",color:"#00f5ff",glowColor:"#00f5ff",glowIntensity:.9,blinkSpeed:1.05,blinkEnabled:!0,billboard:!0,depthTest:!1,renderOrder:100,mode:"plane"},cLe={fillColor:"rgba(0,120,255,0.30)",blendMode:"normal",animate:!1,strategy:"perChar"},uLe={charBoxColor:"rgba(64,160,255,0.55)",charBoxFill:"rgba(64,160,255,0.10)",charIndexColor:"rgba(255,255,255,0.85)",rowHoverColor:"rgba(200,200,200,0.10)",rowBoundaryColor:"rgba(255,255,255,0.22)",gapColor:"rgba(255,153,0,0.7)",baselineColor:"rgba(255,51,51,0.55)",containerColor:"rgba(255,255,255,0.30)"},hLe={showCharBoxes:!0,showLineIndices:!0,showCharIndices:!0,showChars:!0},XF=class{constructor(e){Me(this,"renderer"),Me(this,"cursorStyle"),Me(this,"selectionStyle"),Me(this,"debugStyle"),Me(this,"debugVisibility"),Me(this,"enableSelection"),Me(this,"enableDebug"),Me(this,"debugYAxisUp"),Me(this,"visible",!0),Me(this,"cursorState",null),Me(this,"selectionBoxes",[]),Me(this,"debugData",null),Me(this,"viewTransform",{x:0,y:0,scaleX:1,scaleY:1,rotation:0}),this.renderer=e.renderer,this.cursorStyle={...lLe,...e.cursorStyle},this.selectionStyle={...cLe,...e.selectionStyle},this.debugStyle={...uLe,...e.debugStyle},this.debugVisibility={...hLe,...e.debugVisibility},this.enableSelection=e.enableSelection??!0,this.enableDebug=e.enableDebug??!1,this.debugYAxisUp=e.debugYAxisUp??!1}updateCursor(e,t){this.cursorState={position:e,lineHeight:t}}updateSelection(e){this.selectionBoxes=e.map(t=>({...t}))}updateDebugInfo(e){let t={containerBox:{...e.containerBox},charBoxes:e.charBoxes.map(n=>({...n})),lines:e.lines.map(n=>({...n}))};e.chars&&(t.chars=[...e.chars]),e.gapPositions&&(t.gapPositions=[...e.gapPositions]),e.hoverLineIndex!==void 0&&(t.hoverLineIndex=e.hoverLineIndex),this.debugData=t}setCursorStyle(e){this.cursorStyle={...this.cursorStyle,...e}}setSelectionStyle(e){this.selectionStyle={...this.selectionStyle,...e}}setDebugMode(e){this.enableDebug=e}setDebugVisibility(e){this.debugVisibility={...this.debugVisibility,...e}}setViewTransform(e){this.viewTransform={...this.viewTransform,...e}}show(){this.visible=!0}hide(){this.visible=!1}toggle(){this.visible=!this.visible}render(){if(this.renderer.beginFrame(),!this.visible){this.renderer.endFrame();return}this.renderer.setTransform({x:this.viewTransform.x??0,y:this.viewTransform.y??0,scaleX:this.viewTransform.scaleX??1,scaleY:this.viewTransform.scaleY??1,rotation:this.viewTransform.rotation??0}),this.enableDebug&&this.debugData&&this.drawDebug(this.debugData),this.enableSelection&&this.selectionBoxes.length>0&&this.drawSelection(this.selectionBoxes),this.cursorState&&this.drawCursor(this.cursorState.position,this.cursorState.lineHeight),this.renderer.resetTransform(),this.renderer.endFrame()}dispose(){this.renderer.destroy(),this.selectionBoxes=[],this.cursorState=null,this.debugData=null}drawCursor(e,t){let n=Math.max(.2,this.cursorStyle.blinkSpeed)*1e3;if(!(!this.cursorStyle.blinkEnabled||Date.now()%n<n/2))return;let i=this.cursorStyle.heightMode==="fixed"?this.cursorStyle.height:Math.max(this.cursorStyle.height,t*.8);this.cursorStyle.glowColor&&(this.cursorStyle.glowIntensity??0)>0&&this.renderer.drawLine({x1:e.x,y1:e.y-i/2,x2:e.x,y2:e.y+i/2,color:this.cursorStyle.glowColor,width:this.cursorStyle.width+2,opacity:Math.min(1,this.cursorStyle.glowIntensity??0)}),this.renderer.drawLine({x1:e.x,y1:e.y-i/2,x2:e.x,y2:e.y+i/2,color:this.cursorStyle.color,width:this.cursorStyle.width,opacity:1})}drawSelection(e){if(this.selectionStyle.strategy==="merged"){this.mergeBoxes(e).forEach(t=>this.drawSelectionQuad(t));return}e.forEach(t=>this.drawSelectionQuad(t))}drawSelectionQuad(e){let t={x:e.x,y:e.y,width:e.width,height:e.height,fillColor:this.selectionStyle.fillColor,blendMode:this.selectionStyle.blendMode==="additive"?"lighter":this.selectionStyle.blendMode==="multiply"?"multiply":"source-over"};this.renderer.drawQuad({...t,...this.selectionStyle.borderColor?{borderColor:this.selectionStyle.borderColor}:{},...this.selectionStyle.borderWidth!==void 0?{borderWidth:this.selectionStyle.borderWidth}:{},...this.selectionStyle.cornerRadius!==void 0?{cornerRadius:this.selectionStyle.cornerRadius}:{}})}drawDebug(e){var t;this.renderer.drawBox({box:{x:e.containerBox.x,y:e.containerBox.y+e.containerBox.height/2,width:e.containerBox.width,height:e.containerBox.height},color:this.debugStyle.containerColor,opacity:1,lineWidth:1});let n=e.containerBox.x+e.containerBox.width+60;e.lines.forEach((i,o)=>{let a=this.debugYAxisUp?i.y+i.height/2:i.y-i.height/2,s=this.debugYAxisUp?i.y-i.height/2:i.y+i.height/2;e.hoverLineIndex===o&&this.renderer.drawQuad({x:0,y:i.y,width:n,height:i.height,fillColor:this.debugStyle.rowHoverColor}),this.renderer.drawLine({x1:0,y1:a,x2:n,y2:a,color:this.debugStyle.rowBoundaryColor,dashed:[5,5]}),this.renderer.drawLine({x1:0,y1:s,x2:n,y2:s,color:this.debugStyle.rowBoundaryColor,dashed:[5,5]}),this.debugVisibility.showLineIndices&&this.renderer.drawText({text:`L${o}`,x:8,y:a+(this.debugYAxisUp?-2:2),color:"rgba(255,255,255,0.65)",font:"12px monospace"})}),e.charBoxes.forEach((i,o)=>{var a;let s=this.debugYAxisUp?i.y+i.height/2:i.y-i.height/2,l=this.debugYAxisUp?-2:2,c=this.debugYAxisUp?-Math.max(8,i.height*.2):Math.max(8,i.height*.2);if(this.debugVisibility.showCharBoxes&&this.renderer.drawQuad({x:i.x,y:i.y,width:i.width,height:i.height,fillColor:this.debugStyle.charBoxFill,borderColor:this.debugStyle.charBoxColor,borderWidth:1}),this.debugVisibility.showCharIndices&&this.renderer.drawText({text:String(o),x:i.x+2,y:s+l,color:this.debugStyle.charIndexColor,font:"10px monospace"}),this.debugVisibility.showChars){let u=(a=e.chars)==null?void 0:a[o];if(!u)return;this.renderer.drawText({text:u,x:i.x+2,y:s+c,color:"rgba(255,255,255,0.95)",font:`${Math.max(12,Math.round(i.height*.6))}px monospace`})}}),(t=e.gapPositions)==null||t.forEach(i=>{this.renderer.drawLine({x1:i.x,y1:i.y-i.height/2,x2:i.x,y2:i.y+i.height/2,color:this.debugStyle.gapColor,opacity:i.strong?.9:.55,width:1})})}mergeBoxes(e){if(e.length===0)return[];let t=[...e].sort((i,o)=>i.y===o.y?i.x-o.x:i.y-o.y),n=[];for(let i of t){let o=n[n.length-1];if(!o){n.push({...i});continue}let a=Math.abs(o.y-i.y)<=1,s=i.x<=o.x+o.width+1,l=Math.abs(o.height-i.height)<=1;a&&s&&l?o.width=Math.max(o.x+o.width,i.x+i.width)-o.x:n.push({...i})}return n}};function QC(r){let e=r.match(/rgba?\(([^)]+)\)/i);if(e){let n=(e[1]??"").split(",").map(l=>Number(l.trim())),[i=255,o=255,a=255,s=1]=n;return{color:new $e(i/255,o/255,a/255),alpha:Number.isFinite(s)?s:1}}let t=new $e;return t.setStyle(r),{color:t,alpha:1}}var YF=class{constructor(e){Me(this,"scene"),Me(this,"camera"),Me(this,"frameGroup",new Zn),Me(this,"currentTransform",{x:0,y:0,scaleX:1,scaleY:1,rotation:0}),Me(this,"canvas",null),this.scene=e.scene,this.camera=e.camera,this.scene.add(this.frameGroup)}initialize(e){this.canvas=e}destroy(){this.clearFrame(),this.scene.remove(this.frameGroup)}beginFrame(){this.clearFrame()}endFrame(){this.camera}drawQuad(e){let t=this.currentTransform.scaleX??1,n=this.currentTransform.scaleY??1,i=this.transformPoint(e.x+e.width/2,e.y),o=this.createQuadMesh(i.x-e.width*t/2,i.y,Math.abs(e.width*t),Math.abs(e.height*n),e.fillColor,e.opacity);if(o&&this.frameGroup.add(o),e.borderColor){let a=this.createRectBorder(i.x-e.width*t/2,i.y,Math.abs(e.width*t),Math.abs(e.height*n),e.borderColor,e.borderWidth??1,e.opacity??1);this.frameGroup.add(a)}}drawLine(e){let t=this.transformPoint(e.x1,e.y1),n=this.transformPoint(e.x2,e.y2),i=QC(e.color),o=(e.opacity??1)*i.alpha;if(e.dashed&&e.dashed.length>0){let u=[new U(t.x,t.y,0),new U(n.x,n.y,0)],h=new ot().setFromPoints(u),d=new Gw({color:i.color,linewidth:e.width??1,transparent:o<1,opacity:o,dashSize:e.dashed[0]??4,gapSize:e.dashed[1]??2,depthTest:!1}),p=new Ni(h,d);p.computeLineDistances(),p.renderOrder=e.renderOrder??1,this.frameGroup.add(p);return}let a=new fb;a.setPositions([t.x,t.y,0,n.x,n.y,0]);let s=new wr({color:i.color,linewidth:e.width??1,worldUnits:!1,transparent:o<1,opacity:o,depthTest:!1}),l=this.getResolution();s.resolution.set(l.x,l.y);let c=new KC(a,s);c.computeLineDistances(),c.renderOrder=e.renderOrder??1,this.frameGroup.add(c)}drawText(e){var t;let n=e.font??"20px monospace",i=Number(((t=n.match(/(\d+(?:\.\d+)?)px/))==null?void 0:t[1])??20),o=4,a=document.createElement("canvas"),s=a.getContext("2d");if(!s)return;s.font=n;let l=Math.max(1,Math.ceil(s.measureText(e.text).width))+o*2,c=Math.max(1,Math.ceil(i*1.4));if(a.width=l,a.height=c,s=a.getContext("2d"),!s)return;s.clearRect(0,0,a.width,a.height),s.font=n;let u=e.align??"left",h=e.baseline??"top";s.textAlign=u,s.textBaseline=h;let d=QC(e.color);s.fillStyle=`rgba(${Math.round(d.color.r*255)}, ${Math.round(d.color.g*255)}, ${Math.round(d.color.b*255)}, ${e.opacity??d.alpha})`;let p=u==="center"?a.width/2:u==="right"?a.width-o:o,f=h==="middle"?a.height/2:h==="bottom"?a.height-o:o;s.fillText(e.text,p,f);let m=this.isYAxisUp(),g=new Bw(a);g.flipY=m,g.needsUpdate=!0;let y=Math.abs(this.currentTransform.scaleX??1),b=Math.abs(this.currentTransform.scaleY??1),v=Math.max(1,a.width*y),x=Math.max(1,a.height*b),w=new Xu(v,x),_=new _i({map:g,transparent:!0,depthTest:!1,depthWrite:!1,side:Si}),A=new jt(w,_),E=this.transformPoint(e.x,e.y),S=u==="center"?0:u==="right"?-v/2:v/2,M=h==="middle"?0:h==="bottom"?m?x/2:-x/2:m?-x/2:x/2;A.position.set(E.x+S,E.y+M,.2),A.renderOrder=10,this.frameGroup.add(A)}drawBox(e){let t=this.currentTransform.scaleX??1,n=this.currentTransform.scaleY??1,i=this.transformPoint(e.box.x+e.box.width/2,e.box.y),o=this.createRectBorder(i.x-e.box.width*t/2,i.y,Math.abs(e.box.width*t),Math.abs(e.box.height*n),e.color,e.lineWidth??1,e.opacity??1);o.renderOrder=e.renderOrder??2,this.frameGroup.add(o)}setTransform(e){this.currentTransform={x:e.x??0,y:e.y??0,scaleX:e.scaleX??1,scaleY:e.scaleY??1,rotation:e.rotation??0}}resetTransform(){this.currentTransform={x:0,y:0,scaleX:1,scaleY:1,rotation:0}}transformPoint(e,t){let n=this.currentTransform.scaleX??1,i=this.currentTransform.scaleY??1,o=(this.currentTransform.x??0)+e*n,a=(this.currentTransform.y??0)+t*i,s=this.currentTransform.rotation??0;if(s===0)return{x:o,y:a};let l=Math.cos(s),c=Math.sin(s);return{x:o*l-a*c,y:o*c+a*l}}isYAxisUp(){return this.camera instanceof Ga?this.camera.top>=this.camera.bottom:!0}createLineQuad(e,t,n,i,o){let a=t.x-e.x,s=t.y-e.y,l=Math.max(.001,Math.hypot(a,s)),c=Math.atan2(s,a),u=new Xu(l,n),h=new _i({color:i,transparent:o<1,opacity:o,side:Si,depthTest:!1}),d=new jt(u,h);return d.position.set((e.x+t.x)/2,(e.y+t.y)/2,0),d.rotation.z=c,d}createQuadMesh(e,t,n,i,o,a=1){if(!o)return null;let s=new Xu(n,i),l=QC(o),c=new _i({color:l.color,transparent:a*l.alpha<1,opacity:a*l.alpha,side:Si,depthTest:!1}),u=new jt(s,c);return u.position.set(e+n/2,t,0),u.renderOrder=1,u}createRectBorder(e,t,n,i,o,a,s){let l=QC(o),c=n/2,u=i/2,h=e+c,d=t,p=[new U(h-c,d-u,0),new U(h+c,d-u,0),new U(h+c,d+u,0),new U(h-c,d+u,0)],f=new ot().setFromPoints(p),m=new Fi({color:l.color,transparent:s*l.alpha<1,opacity:s*l.alpha,linewidth:a,depthTest:!1});return new Ly(f,m)}clearFrame(){for(;this.frameGroup.children.length>0;){let e=this.frameGroup.children.pop();e&&this.disposeObject(e)}}disposeObject(e){if("geometry"in e&&e.geometry instanceof ot&&e.geometry.dispose(),"material"in e){let t=e.material;Array.isArray(t)?t.forEach(n=>this.disposeMaterial(n)):t&&this.disposeMaterial(t)}"children"in e&&e.children.length>0&&[...e.children].forEach(t=>this.disposeObject(t)),e.removeFromParent()}disposeMaterial(e){let t=e;t.map&&t.map.dispose(),e.dispose()}getResolution(){return this.canvas?{x:this.canvas.width||1,y:this.canvas.height||1}:typeof window<"u"?{x:window.innerWidth||1,y:window.innerHeight||1}:{x:1,y:1}}};function dLe(r){return r===lr.TOP?"superscript":r===lr.BOTTOM?"subscript":"normal"}function pLe(r){return r==="superscript"?lr.TOP:r==="subscript"?lr.BOTTOM:lr.MIDDLE}function pJ(r){return{...r,align:pLe(r.script)}}function Q1(r){return{underline:r.underline,overline:r.overline,strikeThrough:r.strikeThrough,script:dLe(r.align),aci:r.aci,rgb:r.rgb?[...r.rgb]:null,align:r.align,fontFace:{...r.fontFace},capHeight:{...r.capHeight},widthFactor:{...r.widthFactor},charTrackingFactor:{...r.charTrackingFactor},oblique:r.oblique,paragraph:{indent:r.paragraph.indent,left:r.paragraph.left,right:r.paragraph.right,align:r.paragraph.align,tabs:[...r.paragraph.tabs]}}}function qo(r){return{underline:r.underline,overline:r.overline,strikeThrough:r.strikeThrough,script:r.script,aci:r.aci,rgb:r.rgb?[...r.rgb]:null,align:r.align,fontFace:{...r.fontFace},capHeight:{...r.capHeight},widthFactor:{...r.widthFactor},charTrackingFactor:{...r.charTrackingFactor},oblique:r.oblique,paragraph:{indent:r.paragraph.indent,left:r.paragraph.left,right:r.paragraph.right,align:r.paragraph.align,tabs:[...r.paragraph.tabs]}}}function L1(r){return r.type==="char"||r.type==="stack"||r.type==="paragraphBreak"||r.type==="columnBreak"||r.type==="wrapAtDimLine"}function fLe(r,e){return r.underline===e.underline&&r.overline===e.overline&&r.strikeThrough===e.strikeThrough&&r.script===e.script&&r.aci===e.aci&&JSON.stringify(r.rgb)===JSON.stringify(e.rgb)&&r.align===e.align&&r.fontFace.family===e.fontFace.family&&r.fontFace.style===e.fontFace.style&&r.fontFace.weight===e.fontFace.weight&&r.capHeight.value===e.capHeight.value&&r.capHeight.isRelative===e.capHeight.isRelative&&r.widthFactor.value===e.widthFactor.value&&r.widthFactor.isRelative===e.widthFactor.isRelative&&r.charTrackingFactor.value===e.charTrackingFactor.value&&r.charTrackingFactor.isRelative===e.charTrackingFactor.isRelative&&r.oblique===e.oblique&&r.paragraph.indent===e.paragraph.indent&&r.paragraph.left===e.paragraph.left&&r.paragraph.right===e.paragraph.right&&r.paragraph.align===e.paragraph.align&&JSON.stringify(r.paragraph.tabs)===JSON.stringify(e.paragraph.tabs)}function zee(r,e){let t=r??Q1(new Cs),n=pJ(t),i=pJ(e);if(fLe(n,i))return"";let o="";if(n.underline!==i.underline&&(o+=i.underline?"\\L":"\\l"),n.overline!==i.overline&&(o+=i.overline?"\\O":"\\o"),n.strikeThrough!==i.strikeThrough&&(o+=i.strikeThrough?"\\K":"\\k"),n.align!==i.align&&(o+=`\\A${i.align};`),(n.aci!==i.aci||JSON.stringify(n.rgb)!==JSON.stringify(i.rgb))&&(i.rgb?o+=`\\c${A4(i.rgb)};`:o+=`\\C${i.aci??256};`),n.fontFace.family!==i.fontFace.family||n.fontFace.style!==i.fontFace.style||n.fontFace.weight!==i.fontFace.weight){let a=i.fontFace.weight>=700?1:0,s=i.fontFace.style==="Italic"?1:0;o+=`\\f${i.fontFace.family}|b${a}|i${s};`}return(n.capHeight.value!==i.capHeight.value||n.capHeight.isRelative!==i.capHeight.isRelative)&&(o+=`\\H${cF(i.capHeight)};`),(n.widthFactor.value!==i.widthFactor.value||n.widthFactor.isRelative!==i.widthFactor.isRelative)&&(o+=`\\W${cF(i.widthFactor)};`),(n.charTrackingFactor.value!==i.charTrackingFactor.value||n.charTrackingFactor.isRelative!==i.charTrackingFactor.isRelative)&&(o+=`\\T${cF(i.charTrackingFactor)};`),n.oblique!==i.oblique&&(o+=`\\Q${d1(i.oblique)};`),JSON.stringify(n.paragraph)!==JSON.stringify(i.paragraph)&&(o+=`\\p${mLe(i.paragraph)};`),o}function cF(r){return`${d1(r.value)}${r.isRelative?"x":""}`}function d1(r){return Number.isInteger(r),r.toString()}function mLe(r){let e=[`i${d1(r.indent)}`,`l${d1(r.left)}`,`r${d1(r.right)}`];return r.align!==Vt.DEFAULT&&e.push(`q${gLe(r.align)}`),r.tabs.length>0&&e.push(`t${r.tabs.map(t=>String(t)).join(",")}`),e.join(",")}function gLe(r){switch(r){case Vt.LEFT:return"l";case Vt.RIGHT:return"r";case Vt.CENTER:return"c";case Vt.JUSTIFIED:return"j";case Vt.DISTRIBUTED:return"d";default:return"x"}}function fJ(r,e,t={}){let n=new Vy(r,e,{...t,yieldPropertyCommands:!1}),i=[];for(let o of n.parse()){let a=Q1(o.ctx);switch(o.type){case Yt.WORD:{let s=o.data;for(let l of s)i.push({type:"char",value:l,style:qo(a)});break}case Yt.SPACE:i.push({type:"char",value:" ",style:qo(a)});break;case Yt.NBSP:i.push({type:"char",value:"\xA0",style:qo(a)});break;case Yt.TABULATOR:i.push({type:"char",value:" ",style:qo(a)});break;case Yt.STACK:{let[s,l,c]=o.data,u=qo(a);c==="^"&&(s.length===0&&l.length>0?u.script="subscript":s.length>0&&l.length===0?u.script="superscript":u.script="normal"),i.push({type:"stack",numerator:s,denominator:l,divider:c,style:u});break}case Yt.NEW_PARAGRAPH:i.push({type:"paragraphBreak",style:qo(a)});break;case Yt.NEW_COLUMN:i.push({type:"columnBreak",style:qo(a)});break;case Yt.WRAP_AT_DIMLINE:i.push({type:"wrapAtDimLine",style:qo(a)});break}}return{nodes:i}}function yLe(r){let e=Q1(new Cs),t="",n=0;for(;n<r.nodes.length;){let i=r.nodes[n];if(!i)break;if(!L1(i)){t+=yJ(i),n+=1;continue}let o=i.style,a="",s=n;for(;s<r.nodes.length;){let l=r.nodes[s];if(!l||!L1(l)||!gJ(o,l.style))break;a+=yJ(l),s+=1}gJ(o,e)?t+=a:t+=`{${zee(null,o)}${a}}`,n=s}return t}function eT(r,e,t){if(t<=0)return r;let n=VT(e,0,r.nodes.length),i=VT(t,0,r.nodes.length-n);return r.nodes.splice(n,i),r}function bLe(r,e,t,n,i){let o=VT(e,0,r.nodes.length),a=VT(t,0,r.nodes.length-o),s=i??Uee(r,o)??Q1(new Cs),l=wLe(n,s);return r.nodes.splice(o,a,...l),r}function Uee(r,e){for(let t=e-1;t>=0;t--){let n=r.nodes[t];if(n&&L1(n))return qo(n.style)}for(let t=e;t<r.nodes.length;t++){let n=r.nodes[t];if(n&&L1(n))return qo(n.style)}}function vLe(r){return r==="\xA0"?"\\~":r===" "?"^I":r==="\\"?"\\\\":r==="{"?"\\{":r==="}"?"\\}":r==="^"?"\\U+005E":r==="%"?"\\U+0025":r===`
  4436. `?"\\P":r==="\r"?"":r}function mJ(r){return r.replace(/[\\;/#^]/g,"\\$&")}function gJ(r,e){return zee(r,e)===""}function yJ(r){switch(r.type){case"char":return vLe(r.value);case"stack":return xLe(r.numerator,r.denominator,r.divider);case"paragraphBreak":return"\\P";case"columnBreak":return"\\N";case"wrapAtDimLine":return"\\X"}}function xLe(r,e,t){let n=mJ(r),i=mJ(e);if(t==="^"){if(n.length===0&&i.length>0)return`\\S^ ${i};`;if(n.length>0&&i.length===0)return`\\S${n}^ ;`;if(n.length===0&&i.length===0)return"\\S^ ;"}return`\\S${n}${t}${i};`}function wLe(r,e){let t=[];for(let n of r){if(n===`
  4437. `){t.push({type:"paragraphBreak",style:qo(e)});continue}t.push({type:"char",value:n,style:qo(e)})}return t}function VT(r,e,t){return Math.max(e,Math.min(t,r))}var Qf=class r{constructor(e={nodes:[]}){Me(this,"_ast"),Me(this,"_cursor"),Me(this,"_selection",null),this._ast=typeof e=="string"?fJ(e):r.cloneAst(e),this._cursor=this._ast.nodes.length}static fromMText(e,t){return new r(fJ(e,t))}get ast(){return this._ast}get length(){return this._ast.nodes.length}get cursor(){return this._cursor}set cursor(e){this._cursor=r.clamp(e,0,this.length),this._selection=null}get selection(){return this._selection?{...this._selection}:null}setSelection(e,t){let n=r.normalizeSelection(e,t,this.length);return this._selection=n.start===n.end?null:n,this._cursor=r.clamp(t,0,this.length),this}clearSelection(){return this._selection=null,this}moveCursor(e,t=!1){let n=r.clamp(this._cursor+e,0,this.length);if(t){let i=this._selection?this._selection.start:this._cursor;this.setSelection(i,n)}else this.cursor=n;return this}selectAll(){return this.setSelection(0,this.length),this}insertText(e,t){let{start:n,end:i}=this.getActiveRange();return bLe(this._ast,n,i-n,e,t),this._cursor=n+e.length,this._selection=null,this}deleteBackward(e=1){if(this.hasSelection()){let{start:n,end:i}=this.getActiveRange();return eT(this._ast,n,i-n),this._cursor=n,this._selection=null,this}if(e<=0||this._cursor<=0)return this;let t=Math.min(e,this._cursor);return eT(this._ast,this._cursor-t,t),this._cursor-=t,this}deleteForward(e=1){if(this.hasSelection()){let{start:t,end:n}=this.getActiveRange();return eT(this._ast,t,n-t),this._cursor=t,this._selection=null,this}return e<=0||this._cursor>=this.length?this:(eT(this._ast,this._cursor,e),this)}replaceSelection(e,t){return this.insertText(e,t)}toMText(){return yLe(this._ast)}transaction(e){let t={ast:r.cloneAst(this._ast),cursor:this._cursor,selection:this._selection?{...this._selection}:null};try{e(this)}catch(n){throw this._ast=t.ast,this._cursor=t.cursor,this._selection=t.selection,n}return this}hasSelection(){return!!(this._selection&&this._selection.start!==this._selection.end)}getActiveRange(){return this._selection?{...this._selection}:{start:this._cursor,end:this._cursor}}getReferenceStyle(e){return Uee(this._ast,e)??Q1(new Cs)}static cloneAst(e){return{nodes:e.nodes.map(t=>t.type==="char"?{...t,style:qo(t.style)}:t.type==="stack"?{...t,style:qo(t.style)}:{...t,style:qo(t.style)})}}static normalizeSelection(e,t,n){let i=r.clamp(e,0,n),o=r.clamp(t,0,n);return i<=o?{start:i,end:o}:{start:o,end:i}}static clamp(e,t,n){return Math.max(t,Math.min(n,e))}},p1=class{constructor(e){Me(this,"document"),Me(this,"selectionAnchor",null),this.document=e}get anchor(){return this.selectionAnchor}execute(e){switch(e.type){case"setCursor":this.document.cursor=e.index,this.selectionAnchor=null;break;case"setSelection":this.document.setSelection(e.start,e.end),this.selectionAnchor=e.start;break;case"clearSelection":this.document.clearSelection(),this.selectionAnchor=null;break;case"moveLeft":this.moveCursorTo(this.document.cursor-1,e.extend??!1);break;case"moveRight":this.moveCursorTo(this.document.cursor+1,e.extend??!1);break;case"moveToStart":this.moveCursorTo(0,e.extend??!1);break;case"moveToEnd":this.moveCursorTo(this.document.length,e.extend??!1);break;case"selectAll":this.document.selectAll(),this.selectionAnchor=0;break;case"insertText":this.document.insertText(e.text,e.style),this.selectionAnchor=null;break;case"replaceSelection":this.document.replaceSelection(e.text,e.style),this.selectionAnchor=null;break;case"backspace":this.document.deleteBackward(e.count??1),this.selectionAnchor=null;break;case"delete":this.document.deleteForward(e.count??1),this.selectionAnchor=null;break}return this}handleKeyEvent(e){let t=!!(e.metaKey||e.ctrlKey);return t&&!e.altKey&&e.key.toLowerCase()==="a"?(this.execute({type:"selectAll"}),!0):e.key==="ArrowLeft"?(this.execute({type:"moveLeft",extend:!!e.shiftKey}),!0):e.key==="ArrowRight"?(this.execute({type:"moveRight",extend:!!e.shiftKey}),!0):e.key==="Home"?(this.execute({type:"moveToStart",extend:!!e.shiftKey}),!0):e.key==="End"?(this.execute({type:"moveToEnd",extend:!!e.shiftKey}),!0):e.key==="Backspace"?(this.execute({type:"backspace"}),!0):e.key==="Delete"?(this.execute({type:"delete"}),!0):e.key==="Enter"?(this.execute({type:"insertText",text:`
  4438. `}),!0):e.key==="Tab"?(this.execute({type:"insertText",text:" "}),!0):!t&&!e.altKey&&e.key.length===1?(this.execute({type:"insertText",text:e.key}),!0):!1}moveCursorTo(e,t){var n;let i=Math.max(0,Math.min(e,this.document.length));if(t){this.selectionAnchor===null&&(this.selectionAnchor=((n=this.document.selection)==null?void 0:n.start)??this.document.cursor),this.document.setSelection(this.selectionAnchor,i);return}this.document.cursor=i,this.selectionAnchor=null}},_Le={bold:'<svg viewBox="0 0 24 24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8Zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4Zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4Z" fill-rule="evenodd"></path></svg>',italic:'<svg viewBox="0 0 24 24"><path d="m16.7 4.7-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"></path></svg>',underline:'<svg viewBox="0 0 24 24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1ZM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Z" fill-rule="evenodd"></path></svg>',overline:'<svg viewBox="0 0 24 24"><path d="M5 4h14v1.5H5V4zm7 3.5c3.04 0 5.5 2.46 5.5 5.5v4.5h-2.25v-4.5c0-1.79-1.46-3.25-3.25-3.25S8.75 11.21 8.75 13v4.5H6.5V13c0-3.04 2.46-5.5 5.5-5.5z"></path></svg>',strike:'<svg viewBox="0 0 24 24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1Z"></path><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"></path></g></svg>',superscript:'<svg viewBox="0 0 24 24"><path d="M15 9.4 10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4Zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11Z" fill-rule="nonzero"></path></svg>',subscript:'<svg viewBox="0 0 24 24"><path d="m10.4 10 4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10ZM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"></path></svg>',stack:'<svg viewBox="0 0 24 24"><path d="M12.4065 5.44832C12.8151 5.44832 13.1994 5.56542 13.5595 5.7996C13.9265 6.0267 14.2208 6.36024 14.4424 6.80022C14.664 7.23312 14.7748 7.74407 14.7748 8.33309C14.7748 8.9292 14.664 9.44725 14.4424 9.88724C14.2208 10.3201 13.9265 10.6501 13.5595 10.8772C13.1994 11.1043 12.8151 11.2179 12.4065 11.2179C12.0464 11.2179 11.7037 11.1291 11.3782 10.9517C11.0527 10.7743 10.7931 10.5082 10.5992 10.1534C10.5715 10.4585 10.5507 10.7743 10.5368 11.1008H9.75781V3H10.6407V6.4383C10.8415 6.11185 11.0977 5.86702 11.4094 5.7038C11.721 5.53348 12.0534 5.44832 12.4065 5.44832ZM12.2923 10.3663C12.7631 10.3663 13.1405 10.1888 13.4245 9.83402C13.7084 9.47919 13.8503 8.97888 13.8503 8.33309C13.8503 7.69439 13.7084 7.19763 13.4245 6.8428C13.1405 6.48797 12.7631 6.31056 12.2923 6.31056C11.8422 6.31056 11.4544 6.47378 11.1289 6.80022C10.8034 7.12667 10.6407 7.63762 10.6407 8.33309C10.6407 8.80856 10.7203 9.19887 10.8796 9.50402C11.0389 9.80918 11.2432 10.0292 11.4925 10.164C11.7417 10.2988 12.0083 10.3663 12.2923 10.3663Z"></path><path d="M12.0949 14.9531C12.7043 14.9531 13.2029 15.1447 13.5906 15.5279C13.9784 15.9041 14.1723 16.4434 14.1723 17.146V20.6056H13.3933C13.3725 20.2436 13.3587 20.0094 13.3517 19.903C13.1856 20.1727 12.9605 20.3785 12.6766 20.5204C12.3996 20.6552 12.0811 20.7227 11.721 20.7227C11.3747 20.7227 11.0493 20.6588 10.7446 20.531C10.4468 20.3962 10.2079 20.2011 10.0279 19.9456C9.84783 19.683 9.75781 19.3708 9.75781 19.0088C9.75781 18.4624 9.97248 18.033 10.4018 17.7208C10.8381 17.4014 11.399 17.2418 12.0845 17.2418C12.4723 17.2418 12.8739 17.295 13.2894 17.4014V17.3056C13.2894 16.7876 13.1856 16.4044 12.9778 16.156C12.777 15.9005 12.4688 15.7728 12.0534 15.7728C11.721 15.7728 11.444 15.8437 11.2224 15.9857C11.0008 16.1276 10.8138 16.337 10.6615 16.6137L9.98633 16.2199C10.1525 15.8367 10.4226 15.5315 10.7965 15.3044C11.1774 15.0702 11.6102 14.9531 12.0949 14.9531ZM13.2894 18.1572C12.8532 18.0437 12.455 17.9869 12.0949 17.9869C11.6448 17.9869 11.2951 18.0756 11.0458 18.253C10.8034 18.4305 10.6823 18.6788 10.6823 18.9982C10.6823 19.2962 10.7861 19.5304 10.9939 19.7007C11.2016 19.864 11.4717 19.9456 11.8041 19.9456C12.2126 19.9456 12.5623 19.8249 12.8532 19.5836C13.144 19.3353 13.2894 18.9946 13.2894 18.5617V18.1572Z""></path><rect x="6.02344" y="12.7119" width="11.9532" height="0.747077"></rect></svg>'},bJ="mlightcad-mtext-toolbar-style",vJ=["Arial","Helvetica","Verdana","Tahoma","Trebuchet MS","Times New Roman","Georgia","Courier New","system-ui","sans-serif","serif","monospace"];function SLe(){if(document.getElementById(bJ))return;let r=document.createElement("style");r.id=bJ,r.textContent=`
  4439. .ml-mtext-toolbar {
  4440. position: fixed;
  4441. left: 0;
  4442. top: 0;
  4443. z-index: 2147483000;
  4444. display: inline-flex;
  4445. align-items: center;
  4446. gap: 10px;
  4447. border-radius: 8px;
  4448. border: 1px solid;
  4449. padding: 8px;
  4450. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  4451. font-size: 12px;
  4452. line-height: 1;
  4453. box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  4454. user-select: none;
  4455. }
  4456. .ml-mtext-toolbar[data-theme='dark'] {
  4457. background: linear-gradient(180deg, #2a2d33 0%, #1d2025 100%);
  4458. border-color: #444b58;
  4459. color: #e8ecf4;
  4460. }
  4461. .ml-mtext-toolbar[data-theme='light'] {
  4462. background: linear-gradient(180deg, #ffffff 0%, #f2f4f8 100%);
  4463. border-color: #cfd5df;
  4464. color: #1e2430;
  4465. }
  4466. .ml-mtext-toolbar__group {
  4467. display: inline-flex;
  4468. align-items: center;
  4469. gap: 4px;
  4470. }
  4471. .ml-mtext-toolbar__separator {
  4472. width: 1px;
  4473. height: 24px;
  4474. opacity: 0.35;
  4475. }
  4476. .ml-mtext-toolbar[data-theme='dark'] .ml-mtext-toolbar__separator {
  4477. background: #576177;
  4478. }
  4479. .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__separator {
  4480. background: #b8c0ce;
  4481. }
  4482. .ml-mtext-toolbar__select,
  4483. .ml-mtext-toolbar__input,
  4484. .ml-mtext-toolbar__color,
  4485. .ml-mtext-toolbar__btn {
  4486. border: 1px solid;
  4487. border-radius: 6px;
  4488. height: 34px;
  4489. }
  4490. .ml-mtext-toolbar[data-theme='dark'] .ml-mtext-toolbar__select,
  4491. .ml-mtext-toolbar[data-theme='dark'] .ml-mtext-toolbar__input,
  4492. .ml-mtext-toolbar[data-theme='dark'] .ml-mtext-toolbar__color,
  4493. .ml-mtext-toolbar[data-theme='dark'] .ml-mtext-toolbar__btn {
  4494. background: #12161d;
  4495. border-color: #454d5f;
  4496. color: #f2f5fb;
  4497. }
  4498. .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__select,
  4499. .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__input,
  4500. .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__color,
  4501. .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__btn {
  4502. background: #ffffff;
  4503. border-color: #c7cdd8;
  4504. color: #1f2632;
  4505. }
  4506. .ml-mtext-toolbar__select {
  4507. min-width: 140px;
  4508. padding: 0 8px;
  4509. }
  4510. .ml-mtext-toolbar__input {
  4511. width: 64px;
  4512. padding: 0 8px;
  4513. }
  4514. .ml-mtext-toolbar__color {
  4515. width: 40px;
  4516. padding: 2px;
  4517. display: flex;
  4518. align-items: center;
  4519. justify-content: center;
  4520. }
  4521. .ml-mtext-toolbar__btn {
  4522. width: 34px;
  4523. display: inline-flex;
  4524. align-items: center;
  4525. justify-content: center;
  4526. cursor: pointer;
  4527. transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
  4528. }
  4529. .ml-mtext-toolbar__btn svg {
  4530. width: 24px;
  4531. height: 24px;
  4532. fill: currentColor;
  4533. }
  4534. .ml-mtext-toolbar__btn.is-active {
  4535. border-color: #2f9dff;
  4536. color: #2f9dff;
  4537. }
  4538. .ml-mtext-toolbar[data-theme='dark'] .ml-mtext-toolbar__btn.is-active {
  4539. background: linear-gradient(180deg, #123252 0%, #0c243d 100%);
  4540. color: #8fcbff;
  4541. box-shadow: inset 0 0 0 1px rgba(143, 203, 255, 0.18);
  4542. }
  4543. .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__btn.is-active {
  4544. background: linear-gradient(180deg, #dcebff 0%, #cfe3ff 100%);
  4545. color: #1d67ad;
  4546. box-shadow: inset 0 0 0 1px rgba(29, 103, 173, 0.16);
  4547. }
  4548. .ml-mtext-toolbar[data-theme='dark'] .ml-mtext-toolbar__btn:hover {
  4549. background: #1f2530;
  4550. }
  4551. .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__btn:hover {
  4552. background: #edf3ff;
  4553. }
  4554. `,document.head.appendChild(r)}function Jz(r){return Math.max(0,Math.min(16777215,Math.round(r)))}function xJ(r){return`#${(r===null?16777215:Jz(r)).toString(16).padStart(6,"0")}`}function ALe(r){return/^#[0-9a-fA-F]{6}$/.test(r)?Number.parseInt(r.slice(1),16):16777215}function MLe(r){return r.isRgb&&r.rgbValue!==null?xJ(r.rgbValue):r.isAci&&r.aci!==null?xJ(w_(r.aci)):"#ffffff"}function wJ(r){let e=new Mi;return e.rgbValue=ALe(r),e}function _J(r){let e=new Mi;return r.aci!==null&&Number.isFinite(r.aci)?(e.aci=r.aci,e):r.rgb!==null?(e.rgbValue=Jz(r.rgb),e):(e.rgbValue=16777215,e)}function PLe(r){let e=r.trim().toLowerCase();return/^#[0-9a-f]{6}$/.test(e)?e:/^[0-9a-f]{6}$/.test(e)?`#${e}`:null}function wd(r,e){let t=document.createElement("button");return t.type="button",t.className="ml-mtext-toolbar__btn",t.title=r,t.setAttribute("aria-label",r),t.setAttribute("aria-pressed","false"),t.innerHTML=_Le[e],t}function ELe(r){let e=r&&r.length>0?r:vJ,t=[],n=new Set;for(let i of e){let o=i.trim();!o||n.has(o)||(n.add(o),t.push(o))}return t.length>0?t:[...vJ]}var $F=class{constructor(e){Me(this,"anchorElement"),Me(this,"root"),Me(this,"controls"),Me(this,"onFormatChange"),Me(this,"onToggleStack"),Me(this,"onToggleSuperscript"),Me(this,"onToggleSubscript"),Me(this,"theme"),Me(this,"colorPicker"),SLe(),this.anchorElement=e.anchorElement,this.onFormatChange=e.onFormatChange,this.onToggleStack=e.onToggleStack??(()=>{}),this.onToggleSuperscript=e.onToggleSuperscript??(()=>!1),this.onToggleSubscript=e.onToggleSubscript??(()=>!1),this.theme=e.theme,this.root=document.createElement("div"),this.root.className="ml-mtext-toolbar";let t=document.createElement("div");t.className="ml-mtext-toolbar__group";let n=document.createElement("select");n.className="ml-mtext-toolbar__select";for(let m of ELe(e.fontFamilies)){let g=document.createElement("option");g.value=m,g.textContent=m,n.appendChild(g)}let i=document.createElement("input");i.className="ml-mtext-toolbar__input",i.type="number",i.min="1",i.max="1024",i.step="1",this.colorPicker=this.createColorPicker(e.colorPicker,e.initialFormat),t.append(n,i,this.colorPicker.host);let o=document.createElement("div");o.className="ml-mtext-toolbar__separator";let a=document.createElement("div");a.className="ml-mtext-toolbar__group";let s=wd("Bold","bold"),l=wd("Italic","italic"),c=wd("Underline","underline"),u=wd("Overline","overline"),h=wd("Strike Through","strike"),d=wd("Superscript","superscript"),p=wd("Subscript","subscript"),f=wd("Stack","stack");a.append(s,l,c,u,h,d,p,f),this.root.append(t,o,a),this.controls={fontFamily:n,fontSize:i,boldBtn:s,italicBtn:l,underlineBtn:c,overlineBtn:u,strikeBtn:h,superscriptBtn:d,subscriptBtn:p,stackBtn:f},this.setTheme(this.theme),this.bindEvents(),(e.container??document.body).appendChild(this.root)}setTheme(e){this.theme=e,this.root.dataset.theme=e,this.colorPicker.setTheme(e)}getTheme(){return this.theme}setVisible(e){this.root.style.display=e?"inline-flex":"none"}setSession(e){this.anchorElement=e.anchorElement,this.onFormatChange=e.onFormatChange,this.onToggleStack=e.onToggleStack,this.onToggleSuperscript=e.onToggleSuperscript??(()=>!1),this.onToggleSubscript=e.onToggleSubscript??(()=>!1)}setAnchor(e,t){let n=this.root.offsetWidth||0,i=this.root.offsetHeight||0,o=8,a=8,s=Math.max(o,window.innerWidth-n-8),l=Math.max(a,window.innerHeight-i-8),c=Math.max(o,Math.min(s,Math.round(e))),u=Math.max(a,Math.min(l,Math.round(t-i)));this.root.style.left=`${c}px`,this.root.style.top=`${u}px`}setFormat(e){this.ensureSelectValue(e.fontFamily),this.controls.fontSize.value=String(Math.max(1,Math.round(e.fontSize)));let t=_J(e);this.colorPicker.setValue(t),this.setToggleState(this.controls.boldBtn,e.bold),this.setToggleState(this.controls.italicBtn,e.italic),this.setToggleState(this.controls.underlineBtn,e.underline),this.setToggleState(this.controls.overlineBtn,e.overline),this.setToggleState(this.controls.strikeBtn,e.strike),this.setToggleState(this.controls.superscriptBtn,e.script==="superscript"),this.setToggleState(this.controls.subscriptBtn,e.script==="subscript")}dispose(){this.colorPicker.dispose(),this.root.remove()}setStackActive(e){this.setToggleState(this.controls.stackBtn,e)}setToggleState(e,t){e.classList.toggle("is-active",t),e.setAttribute("aria-pressed",t?"true":"false")}ensureSelectValue(e){if(!Array.from(this.controls.fontFamily.options).some(t=>t.value===e)){let t=document.createElement("option");t.value=e,t.textContent=e,this.controls.fontFamily.appendChild(t)}this.controls.fontFamily.value=e}bindEvents(){let e=()=>{let t=Math.max(1,Number(this.controls.fontSize.value)||1);this.controls.fontSize.value=String(Math.round(t)),this.onFormatChange({fontSize:t})};this.controls.fontFamily.addEventListener("change",()=>{this.onFormatChange({fontFamily:this.controls.fontFamily.value})}),this.controls.fontSize.addEventListener("input",e),this.controls.fontSize.addEventListener("change",e),this.controls.fontSize.addEventListener("blur",e),this.controls.fontSize.addEventListener("keydown",t=>{t.key==="Enter"&&(e(),this.anchorElement.focus({preventScroll:!0}))}),this.controls.boldBtn.addEventListener("click",()=>{this.onFormatChange({bold:!this.controls.boldBtn.classList.contains("is-active")})}),this.controls.italicBtn.addEventListener("click",()=>{this.onFormatChange({italic:!this.controls.italicBtn.classList.contains("is-active")})}),this.controls.underlineBtn.addEventListener("click",()=>{this.onFormatChange({underline:!this.controls.underlineBtn.classList.contains("is-active")})}),this.controls.overlineBtn.addEventListener("click",()=>{this.onFormatChange({overline:!this.controls.overlineBtn.classList.contains("is-active")})}),this.controls.strikeBtn.addEventListener("click",()=>{this.onFormatChange({strike:!this.controls.strikeBtn.classList.contains("is-active")})}),this.controls.superscriptBtn.addEventListener("click",()=>{if(this.onToggleSuperscript())return;let t=this.controls.superscriptBtn.classList.contains("is-active");this.onFormatChange({script:t?"normal":"superscript"})}),this.controls.subscriptBtn.addEventListener("click",()=>{if(this.onToggleSubscript())return;let t=this.controls.subscriptBtn.classList.contains("is-active");this.onFormatChange({script:t?"normal":"subscript"})}),this.controls.stackBtn.addEventListener("click",()=>{this.onToggleStack()}),this.root.addEventListener("mousedown",t=>{let n=t.target;n&&(n.closest('[data-ml-mtext-toolbar-interactive="true"]')||n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="OPTION"||(t.preventDefault(),this.anchorElement.focus({preventScroll:!0})))})}createColorPicker(e,t){if(!e){let a=document.createElement("input");return a.className="ml-mtext-toolbar__color",a.type="color",a.dataset.mlMtextToolbarInteractive="true",a.addEventListener("input",()=>{this.applyColorChange(wJ(a.value))}),{host:a,setValue:s=>{let l=PLe(MLe(s));l&&(a.value=l)},setTheme:()=>{},dispose:()=>{}}}let n=document.createElement("div");n.className="ml-mtext-toolbar__color",n.dataset.mlMtextToolbarInteractive="true";let i=t?_J(t):wJ("#ffffff"),o=e({container:n,theme:this.theme,initialColor:i,onChange:a=>{this.applyColorChange(a)}})??{};return{host:n,setValue:a=>{var s;(s=o.setValue)==null||s.call(o,a)},setTheme:a=>{var s;(s=o.setTheme)==null||s.call(o,a)},dispose:()=>{var a;(a=o.dispose)==null||a.call(o)}}}applyColorChange(e){if(e.isAci&&e.aci!==null){this.onFormatChange({aci:e.aci});return}if(e.isRgb&&e.rgbValue!==null){this.onFormatChange({aci:null,rgb:Jz(e.rgbValue)});return}this.onFormatChange({aci:null,rgb:16777215})}};function SJ(r,e){let t=Math.max(1,r),n=e;return n===void 0||n===1||n===4||n===7||n===10?0:n===2||n===5||n===8||n===11?-t/2:n===3||n===6||n===9||n===12?-t:0}var tT="__mlightcadMTextInputBoxSceneRoot",Rc=class an{constructor(e){Me(this,"scene"),Me(this,"camera"),Me(this,"mtextRenderer"),Me(this,"cursorRenderer"),Me(this,"width"),Me(this,"position"),Me(this,"mtextInsertionOffset",new U(0,0,0)),Me(this,"enableWordWrap"),Me(this,"mtextString",""),Me(this,"editorLineSpaceFactor",null),Me(this,"editorAttachmentPoint",st.TopLeft),Me(this,"cursorIndex",0),Me(this,"selectionStart",0),Me(this,"selectionEnd",0),Me(this,"baseFormat"),Me(this,"currentFormat"),Me(this,"defaultTextStyle"),Me(this,"cursorLogic"),Me(this,"layoutContainer",{x:0,y:0,width:1,height:1}),Me(this,"isDragging",!1),Me(this,"pendingCursorLineHint",null),Me(this,"latestCursorLayoutData",{containerBox:{x:0,y:0,width:1,height:1},charBoxes:[]}),Me(this,"renderedObject",null),Me(this,"boundingBoxObject",null),Me(this,"boundingBoxPadding",1),Me(this,"boundingBoxZOffset",.01),Me(this,"rendererReady",!1),Me(this,"pendingFontLoad",null),Me(this,"lastFontKey",""),Me(this,"toolbarTheme","dark"),Me(this,"toolbarOffsetY",10),Me(this,"debugMode",!1),Me(this,"colorSettings"),Me(this,"debugVisibility",{showCharBoxes:!0,showLineIndices:!0,showCharIndices:!0,showChars:!0}),Me(this,"maxHistorySize",100),Me(this,"undoStack",[]),Me(this,"redoStack",[]),Me(this,"document"),Me(this,"uiAdapter"),Me(this,"imeInput",null),Me(this,"imeTarget",null),Me(this,"lastImeTarget",null),Me(this,"reopenTarget",null),Me(this,"pointerTarget",null),Me(this,"imeComposing",!1),Me(this,"imeFocusTimer",null),Me(this,"closed",!1),Me(this,"toolbarEnabled",!0),Me(this,"toolbarContainer",null),Me(this,"toolbarFontFamilies",null),Me(this,"toolbarColorPicker"),Me(this,"onImeKeyDown",f=>{!this.isActiveEditor()||!(f.ctrlKey||f.metaKey)&&!f.altKey&&f.key.length===1||f.isComposing||f.key==="Process"||this.handleKeyDown(f)&&f.preventDefault()}),Me(this,"onWindowKeyDown",f=>{if(!this.isActiveEditor()||f.defaultPrevented)return;let m=f.target,g=m?.tagName??"";if(!((g==="INPUT"||g==="TEXTAREA"||g==="SELECT"||m!=null&&m.isContentEditable)&&m!==this.imeInput)){if(!(f.ctrlKey||f.metaKey)&&!f.altKey&&f.key.length===1||this.imeComposing||f.isComposing||f.key==="Process"){this.refocusImeInputSoon();return}this.handleKeyDown(f)&&(f.preventDefault(),this.refocusImeInputSoon())}}),Me(this,"onImeBeforeInput",f=>{if(!this.isActiveEditor()||f.isComposing)return;let m=f.inputType;if(m==="insertText"||m==="insertCompositionText"){this.handleTextInput(f.data??"")&&f.preventDefault();return}m==="insertParagraph"&&this.handleTextInput(`
  4555. `)&&f.preventDefault()}),Me(this,"onImeCompositionStart",()=>{this.isActiveEditor()&&(this.imeComposing=!0,this.updateImeAnchorPosition(),this.refocusImeInputSoon())}),Me(this,"onImeCompositionEnd",f=>{if(!this.isActiveEditor())return;this.imeComposing=!1;let m=f.data??"";this.handleTextInput(m)&&this.imeInput&&(this.imeInput.value=""),this.refocusImeInputSoon()}),Me(this,"onImeTargetMouseDown",()=>{this.isActiveEditor()&&this.refocusImeInputSoon()}),Me(this,"onPointerMouseDown",f=>{if(this.closed||f.altKey||f.button===1)return;let m=this.pointerEventToEditorLocal(f);if(m){if(!this.isPointInContainer(m.x,m.y)){this.isActiveEditor()&&this.closeEditor();return}this.activateEditor(),this.handleMouseDown(m.x,m.y,f.shiftKey),this.refocusImeInputSoon()}}),Me(this,"onPointerMouseMove",f=>{if(!this.isActiveEditor()||f.buttons===0||!this.isDragging)return;let m=this.pointerEventToEditorLocal(f);m&&this.handleMouseMove(m.x,m.y)}),Me(this,"onPointerMouseUp",()=>{this.isActiveEditor()&&this.handleMouseUp()}),Me(this,"onPointerDoubleClick",f=>{if(!this.isActiveEditor())return;let m=this.pointerEventToEditorLocal(f);m&&(this.handleDoubleClick(m.x,m.y),this.refocusImeInputSoon())}),Me(this,"onReopenDoubleClick",f=>{this.closed&&this.shouldReopenFromDoubleClick(f)&&this.showEditor()}),Me(this,"handlers",{change:new Set,selectionChange:new Set,cursorMove:new Set,show:new Set,close:new Set});var t,n,i,o,a,s,l,c;an.instances.add(this),this.scene=e.scene,this.camera=e.camera,this.toolbarTheme=((t=e.toolbar)==null?void 0:t.theme)??"dark",this.toolbarOffsetY=Math.max(0,((n=e.toolbar)==null?void 0:n.offsetY)??10),this.toolbarEnabled=((i=e.toolbar)==null?void 0:i.enabled)??!0,this.toolbarContainer=((o=e.toolbar)==null?void 0:o.container)??null,this.toolbarFontFamilies=((a=e.toolbar)==null?void 0:a.fontFamilies)??null,this.toolbarColorPicker=(s=e.toolbar)==null?void 0:s.colorPicker,this.colorSettings=e.colorSettings,this.width=Math.max(1,e.width),this.position=((l=e.position)==null?void 0:l.clone())??new U(0,0,0),e.initialAttachmentPoint!==void 0&&(this.editorAttachmentPoint=e.initialAttachmentPoint),this.enableWordWrap=e.enableWordWrap??!0;let u=e.textStyle??an.DEFAULT_TEXT_STYLE,h=Math.max(1,Number.isFinite(u.fixedTextHeight)?u.fixedTextHeight:an.DEFAULT_TEXT_STYLE.fixedTextHeight),d=Math.max(1,Number.isFinite(u.lastHeight)?u.lastHeight:h);this.defaultTextStyle={...u,fixedTextHeight:h,lastHeight:d,widthFactor:Number.isFinite(u.widthFactor)?u.widthFactor:1,obliqueAngle:Number.isFinite(u.obliqueAngle)?u.obliqueAngle:0,textGenerationFlag:Number.isFinite(u.textGenerationFlag)?u.textGenerationFlag:0,standardFlag:Number.isFinite(u.standardFlag)?u.standardFlag:0,font:u.font||an.DEFAULT_TEXT_STYLE.font,bigFont:u.bigFont??""},this.baseFormat=this.createBaseFormatFromTextStyle(this.defaultTextStyle,this.resolveRenderColorSettings()),this.currentFormat={...this.baseFormat},this.document=new Qf,this.uiAdapter=new p1(this.document),this.mtextRenderer=new kf("main",{workerUrl:typeof e.workerUrl=="string"?e.workerUrl:((c=e.workerUrl)==null?void 0:c.toString())??"./assets/mtext-renderer-worker.js"}),e.fontUrl&&this.mtextRenderer.setFontUrl(e.fontUrl),this.cursorLogic=new WF({containerBox:{x:0,y:0,width:this.width,height:1},charBoxes:[],lineTolerance:4});let p={...e.cursorStyle??{}};p.height===void 0&&p.heightMode!=="fixed"&&(p.height=0),p.color??(p.color="#ffffff"),p.glowColor??(p.glowColor="#ffffff"),this.cursorRenderer=new XF({renderer:new YF({scene:this.scene,camera:this.camera}),cursorStyle:p,selectionStyle:e.selectionStyle,enableDebug:!1,enableSelection:!0,debugYAxisUp:this.camera instanceof Ga?this.camera.top>=this.camera.bottom:!0,debugVisibility:this.debugVisibility}),this.cursorRenderer.setViewTransform({x:this.position.x,y:this.position.y,scaleX:1,scaleY:1}),this.createBoundingBox(e.showBoundingBox??!0,e.boundingBoxStyle),this.setText(e.initialText??""),this.attachIme(e.imeTarget),this.initializeRenderer()}setText(e){this.document=this.createNormalizedDocument(e),this.document.cursor=0,this.uiAdapter=new p1(this.document),this.clearHistory(),this.syncUiStateFromDocument(),this.relayout(),this.emit("change")}getText(){return this.syncUiStateFromDocument(),this.mtextString}getPlainText(){return this.getChars().join("")}insertText(e){if(e.length!==0){if(e===`
  4556. `){let t=this.cursorLogic.getCursorState().lineIndex;this.pendingCursorLineHint=t>=0?t+1:0}this.commitHistoryEdit(()=>{this.syncDocumentFromUiState(),this.uiAdapter.execute({type:"insertText",text:e,style:this.toDocumentStyle(this.currentFormat)}),this.syncUiStateFromDocument(),this.relayout()})}}deleteBackward(){this.commitHistoryEdit(()=>{this.syncDocumentFromUiState(),this.uiAdapter.execute({type:"backspace"}),this.syncUiStateFromDocument(),this.relayout()})}deleteForward(){this.commitHistoryEdit(()=>{this.syncDocumentFromUiState(),this.uiAdapter.execute({type:"delete"}),this.syncUiStateFromDocument(),this.relayout()})}undo(){let e=this.undoStack.pop();return e?(this.redoStack.push(this.createHistorySnapshot()),this.restoreHistorySnapshot(e),!0):!1}redo(){let e=this.redoStack.pop();return e?(this.undoStack.push(this.createHistorySnapshot()),this.restoreHistorySnapshot(e),!0):!1}moveCursor(e){switch(e){case"left":this.cursorLogic.moveLeft();break;case"right":this.cursorLogic.moveRight();break;case"up":this.cursorLogic.moveUp();break;case"down":this.cursorLogic.moveDown();break;case"lineStart":this.cursorLogic.moveToLineStart();break;case"lineEnd":this.cursorLogic.moveToLineEnd();break;case"wordPrev":this.cursorLogic.moveTo(this.findPrevWordStart(this.cursorLogic.getCurrentIndex()));break;case"wordNext":this.cursorLogic.moveTo(this.findNextWordStart(this.cursorLogic.getCurrentIndex()));break}this.cursorLogic.clearSelection(),this.syncStateFromCursor(),this.emit("cursorMove"),this.emit("selectionChange")}extendSelection(e){let t=this.cursorLogic.getSelection(),n=t?t.anchor:this.cursorLogic.getCurrentIndex();switch(this.cursorLogic.clearSelection(),this.cursorLogic.moveTo(this.cursorIndex),e){case"left":this.cursorLogic.moveTo(this.cursorLogic.getCurrentIndex()-1);break;case"right":this.cursorLogic.moveTo(this.cursorLogic.getCurrentIndex()+1);break;case"up":this.cursorLogic.moveUp();break;case"down":this.cursorLogic.moveDown();break;case"lineStart":this.cursorLogic.moveToLineStart();break;case"lineEnd":this.cursorLogic.moveToLineEnd();break}this.cursorLogic.setSelectionWithDirection(n,this.cursorLogic.getCurrentIndex()),this.syncStateFromCursor(),this.emit("selectionChange")}selectAll(){this.cursorLogic.selectAll(),this.syncStateFromCursor(),this.emit("selectionChange")}clearSelection(){this.cursorLogic.clearSelection(),this.syncStateFromCursor(),this.emit("selectionChange")}setDebugMode(e){this.debugMode=e,this.cursorRenderer.setDebugMode(e)}isDebugMode(){return this.debugMode}setDebugVisibility(e){this.debugVisibility={...this.debugVisibility,...e},this.cursorRenderer.setDebugVisibility(e)}getDebugVisibility(){return{...this.debugVisibility}}setToolbarTheme(e){var t;this.toolbarTheme=e,this.isActiveEditor()&&((t=this.getActiveToolbar())==null||t.setTheme(e))}getToolbarTheme(){return this.toolbarTheme}attachIme(e){let t=this.closed;this.lastImeTarget=e,this.bindReopenDoubleClick(e),this.imeTarget=e,this.attachPointerInteractions(e),this.closed=!1,an.activeEditor?an.activeEditor===this?this.activateEditor():(this.cursorRenderer.hide(),this.boundingBoxObject&&(this.boundingBoxObject.visible=!1)):this.activateEditor(),t&&this.emit("show")}detachIme(){this.imeInput&&(this.imeInput.removeEventListener("keydown",this.onImeKeyDown),this.imeInput.removeEventListener("beforeinput",this.onImeBeforeInput),this.imeInput.removeEventListener("compositionstart",this.onImeCompositionStart),this.imeInput.removeEventListener("compositionend",this.onImeCompositionEnd),window.removeEventListener("keydown",this.onWindowKeyDown),this.imeTarget&&this.imeTarget.removeEventListener("mousedown",this.onImeTargetMouseDown),this.imeInput.remove(),this.imeInput=null,this.imeComposing=!1,this.imeFocusTimer!==null&&(window.clearTimeout(this.imeFocusTimer),this.imeFocusTimer=null))}getCursorIndex(){return this.cursorIndex}getSelectionRange(){let e=Math.min(this.selectionStart,this.selectionEnd),t=Math.max(this.selectionStart,this.selectionEnd);return{start:e,end:t,isCollapsed:e===t}}getCursorLayoutData(){let e={containerBox:{...this.latestCursorLayoutData.containerBox},charBoxes:this.latestCursorLayoutData.charBoxes.map(t=>({...t}))};return this.latestCursorLayoutData.lineBreakIndices&&(e.lineBreakIndices=[...this.latestCursorLayoutData.lineBreakIndices]),this.latestCursorLayoutData.lineLayouts&&(e.lineLayouts=this.latestCursorLayoutData.lineLayouts.map(t=>({...t}))),e}setCurrentFormat(e){var t;let n=this.mergeCharFormat(this.currentFormat,e);this.currentFormat=n;let i=this.getSelectionRange();i.isCollapsed||this.commitHistoryEdit(()=>{this.syncDocumentFromUiState();let o=this.getNodesByLogicalRange(i.start,i.end);for(let a of o){let s=this.toCharFormat(a.style),l=this.mergeCharFormat(s,e);a.style=this.toDocumentStyle(l,a.style)}this.syncUiStateFromDocument(),this.relayout()}),(t=this.getActiveToolbar())==null||t.setFormat(this.currentFormat)}getCurrentFormat(){return{...this.currentFormat}}setParagraphAlignment(e){let t=this.mapRibbonParagraphAlignment(e);t!==void 0&&this.commitHistoryEdit(()=>{this.syncDocumentFromUiState();let n=this.getSelectionRange(),i=this.toDocumentIndexFromLogicalIndex(Math.min(n.start,n.end),!0),o=this.toDocumentIndexFromLogicalIndex(Math.max(n.start,n.end),!1),a=this.document.ast.nodes;if(a.length===0)return;let s=d=>{var p;let f=Math.max(0,Math.min(d,a.length-1));return((p=a[f])==null?void 0:p.type)==="paragraphBreak"?Math.min(f+1,a.length):Math.min(d,a.length-1)},l=d=>{var p;let f=s(d);for(let m=f;m>=0;m--)if(((p=a[m])==null?void 0:p.type)==="paragraphBreak")return m+1;return 0},c=d=>{var p;let f=Math.min(Math.max(0,d),a.length-1);for(let m=f;m<a.length;m++)if(((p=a[m])==null?void 0:p.type)==="paragraphBreak")return m;return a.length},u=l(Math.min(i,o)),h=c(Math.max(i,o));if(!(u>=h)){for(let d=u;d<h;d++){let p=a[d];p&&L1(p)&&(p.style.paragraph.align=t)}this.syncUiStateFromDocument(),this.relayout()}})}setAttachmentPoint(e){let t=this.mapRibbonAttachmentCode(e);if(!(t===void 0||t===this.editorAttachmentPoint)){if(Number.isFinite(this.layoutContainer.width)&&Number.isFinite(this.layoutContainer.height)){let n=this.position.x+this.layoutContainer.x,i=n+this.layoutContainer.width,o=this.position.y+this.layoutContainer.y,a=o+this.layoutContainer.height;if(Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(o)&&Number.isFinite(a)&&i>=n-1e-9&&a>=o-1e-9){let s=this.computeAttachmentAnchorOnBounds(n,i,o,a,this.editorAttachmentPoint),l=this.computeAttachmentAnchorOnBounds(n,i,o,a,t);this.position.x+=l.x-s.x,this.position.y+=l.y-s.y,this.cursorRenderer.setViewTransform({x:this.position.x,y:this.position.y,scaleX:1,scaleY:1})}}this.editorAttachmentPoint=t,this.relayout(),this.emit("change")}}getAttachmentPointCode(){return this.attachmentPointToRibbonCode(this.editorAttachmentPoint)}getMTextAttachmentPoint(){return this.editorAttachmentPoint}toggleCase(){let e=this.getSelectionRange();e.isCollapsed||this.commitHistoryEdit(()=>{this.syncDocumentFromUiState();let t=this.toDocumentIndexFromLogicalIndex(e.start,!0),n=this.toDocumentIndexFromLogicalIndex(e.end,!1);if(n<=t)return;let i=this.document.ast.nodes.slice(t,n),o=i.map(l=>l.type==="char"?l.value:l.type==="stack"?`${l.numerator}${l.denominator}`:"").join("");if(!/[a-zA-Z]/.test(o))return;let a=/[a-z]/.test(o),s=l=>a?l.toUpperCase():l.toLowerCase();this.document.transaction(()=>{for(let l of i)l.type==="char"?l.value=s(l.value):l.type==="stack"&&(l.numerator=s(l.numerator),l.denominator=s(l.denominator));this.document.setSelection(t,n)}),this.syncUiStateFromDocument(),this.relayout()})}getDefaultTextStyle(){return{...this.defaultTextStyle}}handleKeyDown(e){if(e.isComposing||e.key==="Process")return!1;if(e.key==="Escape")return this.closeEditor(),!0;let t=this.isMacPlatform(),n=t?e.metaKey:e.ctrlKey,i=t?e.altKey:e.ctrlKey;if(n&&e.key.toLowerCase()==="a")return this.selectAll(),!0;if(n&&e.key.toLowerCase()==="z")return e.shiftKey?this.redo():this.undo();if(!t&&n&&e.key.toLowerCase()==="y")return this.redo();if(e.shiftKey){if(e.key==="ArrowLeft")return this.consumeExtend("left");if(e.key==="ArrowRight")return this.consumeExtend("right");if(e.key==="ArrowUp")return this.consumeExtend("up");if(e.key==="ArrowDown")return this.consumeExtend("down");if(e.key==="Home")return this.consumeExtend("lineStart");if(e.key==="End")return this.consumeExtend("lineEnd")}return t&&e.metaKey&&e.key==="ArrowLeft"?this.consumeMove("lineStart"):t&&e.metaKey&&e.key==="ArrowRight"?this.consumeMove("lineEnd"):e.key==="ArrowLeft"?this.consumeMove(i?"wordPrev":"left"):e.key==="ArrowRight"?this.consumeMove(i?"wordNext":"right"):e.key==="ArrowUp"?this.consumeMove("up"):e.key==="ArrowDown"?this.consumeMove("down"):e.key==="Home"?this.consumeMove("lineStart"):e.key==="End"?this.consumeMove("lineEnd"):e.key==="Backspace"?(this.deleteBackward(),!0):e.key==="Delete"?(this.deleteForward(),!0):e.key==="Enter"?(this.insertText(`
  4557. `),!0):!n&&!e.altKey&&e.key.length===1?(this.insertText(e.key),!0):!1}handleTextInput(e){return e?(this.insertText(e),!0):!1}handleMouseDown(e,t,n){if(n){let i=this.cursorLogic.hitTest(e,t);if(i<0)return;this.cursorLogic.setSelectionWithDirection(this.selectionStart,i)}else if(!this.cursorLogic.moveToClick(e,t))return;this.isDragging=!0,this.syncStateFromCursor(),this.emit("cursorMove"),this.emit("selectionChange")}handleMouseMove(e,t){this.isDragging&&(this.cursorLogic.updateSelectionDrag(e,t),this.syncStateFromCursor(),this.emit("selectionChange"))}handleMouseUp(){this.isDragging=!1}handleDoubleClick(e,t){let n=this.cursorLogic.hitTest(e,t);if(n<0)return;let i=this.getChars(),o=n,a=n;for(;o>0&&!/\s/.test(i[o-1]??"");)o-=1;for(;a<i.length&&!/\s/.test(i[a]??"");)a+=1;this.cursorLogic.setSelection(o,a),this.cursorLogic.moveTo(a),this.syncStateFromCursor(),this.emit("selectionChange")}update(){let e=this.cursorLogic.getCursorState(),t=this.cursorLogic.getSelection(),n=this.getActiveCursorRenderState(e.position,e.lineInfo.height),i=this.cursorLogic.getSelectedCharBoxes();this.cursorRenderer.updateCursor(n.position,n.height),this.cursorRenderer.updateSelection(i),this.cursorRenderer.updateDebugInfo({containerBox:this.layoutContainer,charBoxes:this.cursorLogic.getCharBoxes(),chars:this.getChars(),lines:this.cursorLogic.getLines()}),this.cursorRenderer.setSelectionStyle({fillColor:t!=null&&t.isBackwards?"rgba(150,0,255,0.25)":"rgba(0,120,255,0.30)"}),this.cursorRenderer.render(),this.updateImeAnchorPosition(),this.updateToolbarPosition()}dispose(){var e;an.activeEditor===this?this.deactivateEditor():this.detachIme(),this.detachPointerInteractions(),this.unbindReopenDoubleClick(),this.disposeRenderedObject(this.renderedObject),this.renderedObject=null,this.disposeBoundingBox(),this.mtextRenderer.destroy(),this.cursorRenderer.dispose(),this.cursorLogic.destroy(),this.handlers.change.clear(),this.handlers.selectionChange.clear(),this.handlers.cursorMove.clear(),this.handlers.show.clear(),this.handlers.close.clear(),an.instances.delete(this),an.instances.size===0&&((e=an.sharedToolbar)==null||e.dispose(),an.sharedToolbar=null,an.sharedToolbarContainer=null,an.sharedToolbarFontFamiliesKey="",an.sharedToolbarColorPickerFactory=null,an.activeEditor=null)}closeEditor(){this.closed||(this.closed=!0,this.detachPointerInteractions(),this.deactivateEditor(),this.emit("close"))}showEditor(){let e=this.lastImeTarget;if(!e)return!1;let t=this.closed;return this.closed=!1,this.attachPointerInteractions(e),this.activateEditor(),t&&this.emit("show"),!0}attachPointerInteractions(e){this.detachPointerInteractions(),this.pointerTarget=e,e.addEventListener("mousedown",this.onPointerMouseDown),e.addEventListener("mousemove",this.onPointerMouseMove),e.addEventListener("dblclick",this.onPointerDoubleClick),window.addEventListener("mouseup",this.onPointerMouseUp)}detachPointerInteractions(){this.pointerTarget&&(this.pointerTarget.removeEventListener("mousedown",this.onPointerMouseDown),this.pointerTarget.removeEventListener("mousemove",this.onPointerMouseMove),this.pointerTarget.removeEventListener("dblclick",this.onPointerDoubleClick),window.removeEventListener("mouseup",this.onPointerMouseUp),this.pointerTarget=null)}on(e,t){this.handlers[e].add(t)}off(e,t){(e==="change"||e==="selectionChange"||e==="cursorMove"||e==="show"||e==="close")&&this.handlers[e].delete(t)}getCursorWorldPosition(){let e=this.cursorLogic.getCursorState(),t=this.getActiveCursorRenderState(e.position,e.lineInfo.height).position;return{x:this.position.x+t.x,y:this.position.y+t.y,z:this.position.z}}getMTextInsertionPoint(){return this.position.clone()}getState(){return{mtextString:this.getText(),cursorIndex:this.cursorIndex,selectionStart:this.selectionStart,selectionEnd:this.selectionEnd,currentFormat:this.getCurrentFormat()}}isActiveEditor(){return an.activeEditor===this}activateEditor(){var e;if(this.closed)return;let t=an.activeEditor;t&&t!==this&&t.deactivateEditor(),an.activeEditor=this;let n=this.imeTarget??this.lastImeTarget;n&&this.attachImeBridge(n),this.cursorRenderer.show(),this.boundingBoxObject&&(this.boundingBoxObject.visible=!0),n&&this.toolbarEnabled?this.mountToolbar(n):(e=an.sharedToolbar)==null||e.setVisible(!1)}deactivateEditor(){var e;this.isDragging=!1,this.detachIme(),this.cursorRenderer.hide(),this.boundingBoxObject&&(this.boundingBoxObject.visible=!1),an.activeEditor===this&&(an.activeEditor=null,(e=an.sharedToolbar)==null||e.setVisible(!1))}attachImeBridge(e){this.detachIme(),this.imeTarget=e;let t=document.createElement("textarea");t.setAttribute("aria-hidden","true"),t.autocapitalize="off",t.autocomplete="off",t.spellcheck=!1,t.style.position="fixed",t.style.left="0px",t.style.top="0px",t.style.width="2px",t.style.height="2px",t.style.opacity="0",t.style.pointerEvents="none",t.style.zIndex="2147483647",document.body.appendChild(t),this.imeInput=t,t.addEventListener("keydown",this.onImeKeyDown),t.addEventListener("beforeinput",this.onImeBeforeInput),t.addEventListener("compositionstart",this.onImeCompositionStart),t.addEventListener("compositionend",this.onImeCompositionEnd),window.addEventListener("keydown",this.onWindowKeyDown),e.addEventListener("mousedown",this.onImeTargetMouseDown),this.updateImeAnchorPosition(),this.focusImeInput()}getActiveToolbar(){if(!this.isActiveEditor())return null;let e=an.sharedToolbar;if(!e)throw new Error("[mtext-input-box] Failed to create shared toolbar");return e}createToolbarSessionOptions(e){return{anchorElement:e,onFormatChange:t=>{this.setCurrentFormat(t)},onToggleStack:()=>{this.toggleStackSelection()},onToggleSuperscript:()=>this.toggleScriptSelection("superscript"),onToggleSubscript:()=>this.toggleScriptSelection("subscript")}}ensureSharedToolbar(e){var t,n;let i=this.toolbarContainer??document.body,o=((t=this.toolbarFontFamilies)==null?void 0:t.join("\0"))??"";if(!an.sharedToolbar||an.sharedToolbarContainer!==i||an.sharedToolbarFontFamiliesKey!==o||an.sharedToolbarColorPickerFactory!==(this.toolbarColorPicker??null)){(n=an.sharedToolbar)==null||n.dispose();let s={...this.createToolbarSessionOptions(e),container:i,theme:this.toolbarTheme,initialFormat:this.currentFormat};this.toolbarFontFamilies&&(s.fontFamilies=this.toolbarFontFamilies),this.toolbarColorPicker&&(s.colorPicker=this.toolbarColorPicker),an.sharedToolbar=new $F(s),an.sharedToolbarContainer=i,an.sharedToolbarFontFamiliesKey=o,an.sharedToolbarColorPickerFactory=this.toolbarColorPicker??null}let a=an.sharedToolbar;if(!a)throw new Error("[mtext-input-box] Failed to create shared toolbar");return a}mountToolbar(e){if(!this.toolbarEnabled||!this.isActiveEditor())return;let t=this.ensureSharedToolbar(e);t.setTheme(this.toolbarTheme),t.setSession(this.createToolbarSessionOptions(e)),t.setVisible(!0),t.setFormat(this.currentFormat),this.updateToolbarStackState(),this.updateToolbarPosition()}updateToolbarPosition(){if(!this.toolbarEnabled||!this.isActiveEditor()||!this.imeTarget)return;let e=this.getActiveToolbar();if(!e)return;let t=this.getEditorScreenBounds();t&&e.setAnchor(t.minX,t.minY-this.toolbarOffsetY)}getEditorScreenBounds(){if(!this.imeTarget)return null;let e=this.imeTarget.getBoundingClientRect(),t=this.position.x+this.layoutContainer.x,n=t+this.layoutContainer.width,i=this.position.y+this.layoutContainer.y,o=i+this.layoutContainer.height,a=[new U(t,i,this.position.z),new U(n,i,this.position.z),new U(t,o,this.position.z),new U(n,o,this.position.z)],s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let h of a){let d=h.clone().project(this.camera),p=e.left+(d.x+1)*.5*e.width,f=e.top+(1-d.y)*.5*e.height;s=Math.min(s,p),l=Math.max(l,p),c=Math.min(c,f),u=Math.max(u,f)}return!Number.isFinite(s)||!Number.isFinite(c)?null:{minX:s,maxX:l,minY:c,maxY:u}}pointerEventToEditorLocal(e){let t=this.pointerTarget??this.imeTarget;return this.pointerEventToEditorLocalByTarget(e,t)}pointerEventToEditorLocalByTarget(e,t){if(!t)return null;let n=t.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;let i=(e.clientX-n.left)/n.width*2-1,o=-((e.clientY-n.top)/n.height)*2+1,a=new U(i,o,-1).unproject(this.camera),s=new U(i,o,1).unproject(this.camera).sub(a);if(Math.abs(s.z)<1e-8)return null;let l=(this.position.z-a.z)/s.z,c=a.add(s.multiplyScalar(l));return{x:c.x-this.position.x,y:c.y-this.position.y}}shouldReopenFromDoubleClick(e){return this.hitTestRenderedObject(e)}hitTestRenderedObject(e){if(!this.renderedObject||!this.reopenTarget)return!1;let t=this.reopenTarget.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;let n=(e.clientX-t.left)/t.width*2-1,i=-((e.clientY-t.top)/t.height)*2+1,o=new af;return o.setFromCamera(new Le(n,i),this.camera),o.intersectObject(this.renderedObject,!0).length>0}bindReopenDoubleClick(e){this.reopenTarget!==e&&(this.unbindReopenDoubleClick(),this.reopenTarget=e,e.addEventListener("dblclick",this.onReopenDoubleClick))}unbindReopenDoubleClick(){this.reopenTarget&&(this.reopenTarget.removeEventListener("dblclick",this.onReopenDoubleClick),this.reopenTarget=null)}isPointInContainer(e,t){let n=this.layoutContainer,i=n.x+n.width,o=n.y+n.height;return e>=n.x&&e<=i&&t>=n.y&&t<=o}async initializeRenderer(){try{await this.mtextRenderer.loadFonts([jT]),this.rendererReady=!0,this.ensureFontsLoaded(),this.relayout()}catch(e){console.error("[mtext-input-box] Failed to initialize mtext renderer fonts",e)}}relayout(){if(!this.rendererReady){this.mtextInsertionOffset.set(0,0,0);let e=this.createFallbackCharBoxes();this.layoutContainer=e.containerBox,this.updateCursorData(e.charBoxes,e.lineBreakIndices,e.lineLayouts),this.updateBoundingBoxGeometry();return}this.ensureFontsLoaded();try{let e=this.createMTextData(),t=this.createTextStyle(),n=this.resolveRenderColorSettings(),i=this.mtextRenderer.syncRenderMText(e,t,n);this.pruneExtraMTextLayoutRoots(i),this.replaceRenderedObject(i);let o=this.extractBoxesFromRenderedObject(i);this.mtextInsertionOffset.set(0,0,0),this.normalizeRenderedTopAlignment(i,o),this.layoutContainer=o.containerBox,this.updateCursorData(o.charBoxes,o.lineBreakIndices,o.lineLayouts),this.updateBoundingBoxGeometry()}catch(e){console.error("[mtext-input-box] Failed to sync render MTEXT",e),this.mtextInsertionOffset.set(0,0,0);let t=this.createFallbackCharBoxes();this.layoutContainer=t.containerBox,this.updateCursorData(t.charBoxes,t.lineBreakIndices,t.lineLayouts),this.updateBoundingBoxGeometry()}}ensureFontsLoaded(){if(this.pendingFontLoad)return;let e=this.collectFontNamesForText(),t=e.map(n=>n.toLowerCase()).sort().join("|");!t||t===this.lastFontKey||(this.lastFontKey=t,this.pendingFontLoad=this.mtextRenderer.loadFonts(e).then(()=>{}).catch(n=>{console.warn("[mtext-input-box] Failed to load fonts for MTEXT",n)}).finally(()=>{this.pendingFontLoad=null,this.rendererReady&&this.relayout()}))}collectFontNamesForText(){let e=new Set,t=n=>{if(!n)return;let i=n.trim();i&&e.add(i)};t(this.defaultTextStyle.font),t(this.defaultTextStyle.bigFont);try{let n=Tf.getFonts(this.mtextString||"",!0);for(let i of n)t(i)}catch(n){console.warn("[mtext-input-box] Failed to parse fonts from MTEXT",n)}return e.size===0&&e.add(jT),[...e]}updateCursorData(e,t,n){this.latestCursorLayoutData={containerBox:{...this.layoutContainer},charBoxes:e.map(l=>({...l})),...t?{lineBreakIndices:[...t]}:{},...n?{lineLayouts:n.map(l=>({...l}))}:{}},this.cursorLogic.updateData(this.layoutContainer,e,t,n);let i=Math.min(this.cursorIndex,this.charCount()),o=Math.max(0,this.cursorLogic.getLineCount()-1),a=this.pendingCursorLineHint===null?null:Math.max(0,Math.min(this.pendingCursorLineHint,o));this.pendingCursorLineHint=null,this.cursorLogic.moveTo(i,a),this.selectionStart!==this.selectionEnd?this.cursorLogic.setSelection(this.selectionStart,this.selectionEnd):this.cursorLogic.clearSelection(),this.syncStateFromCursor();let s=this.unionLayoutContainerWithCursorLines(this.layoutContainer);(Math.abs(s.y-this.layoutContainer.y)>1e-6||Math.abs(s.height-this.layoutContainer.height)>1e-6)&&(this.layoutContainer=s,this.latestCursorLayoutData.containerBox={...this.layoutContainer},this.cursorLogic.updateData(this.layoutContainer,e,t,n),this.cursorLogic.moveTo(i,a),this.selectionStart!==this.selectionEnd?this.cursorLogic.setSelection(this.selectionStart,this.selectionEnd):this.cursorLogic.clearSelection(),this.syncStateFromCursor())}unionLayoutContainerWithCursorLines(e){let t=this.cursorLogic.getLines();if(t.length===0)return e;let n=e.y,i=e.y+e.height;for(let o of t){if(o.charCount!==0)continue;let a=o.y-o.height/2,s=o.y+o.height/2;Number.isFinite(a)&&(n=Math.min(n,a)),Number.isFinite(s)&&(i=Math.max(i,s))}return!Number.isFinite(n)||!Number.isFinite(i)||i<n?e:{...e,y:n,height:i-n}}computeEditorVerticalBounds(e,t,n){let i=()=>({minY:n.y-n.height/2,maxY:n.y+n.height/2}),o=(l,c,u,h)=>l<h+1e-4&&c>u-1e-4;if(e.length===0&&t.length===0)return i();if(e.length===0){let l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(let u of t)l=Math.min(l,u.y-u.height/2),c=Math.max(c,u.y+u.height/2);return Number.isFinite(l)&&Number.isFinite(c)&&c>=l?{minY:l,maxY:c}:i()}if(t.length===0){let l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(let u of e){let h=u.y-u.height/2,d=u.y+u.height/2;l=Math.min(l,h),c=Math.max(c,d)}return Number.isFinite(l)&&Number.isFinite(c)&&c>=l?{minY:l,maxY:c}:i()}let a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(let l of e){let c=l.y-l.height/2,u=l.y+l.height/2,h=t.filter(d=>{let p=d.y-d.height/2,f=d.y+d.height/2;return o(p,f,c,u)});if(h.length===0)a=Math.min(a,c),s=Math.max(s,u);else for(let d of h)a=Math.min(a,d.y-d.height/2),s=Math.max(s,d.y+d.height/2)}for(let l of t){let c=l.y-l.height/2,u=l.y+l.height/2;e.some(h=>{let d=h.y-h.height/2,p=h.y+h.height/2;return o(c,u,d,p)})||(a=Math.min(a,c),s=Math.max(s,u))}return!Number.isFinite(a)||!Number.isFinite(s)||s<a?i():{minY:a,maxY:s}}extractBoxesFromRenderedObject(e){let t=e.createLayoutData(),n=[],i=(t?.lines??[]).filter(h=>Number.isFinite(h.y)&&Number.isFinite(h.height)).map(h=>({y:h.y-this.position.y,height:Math.max(1,h.height)}));for(let h of t?.chars??[]){let d=h.box?this.toLocalBox(h.box):void 0;!d||!(Number.isFinite(d.x)&&Number.isFinite(d.y)&&Number.isFinite(d.width)&&Number.isFinite(d.height))||n.push(d)}let o=(t.lines??[]).map(h=>h.breakIndex).filter(h=>Number.isInteger(h)).filter(h=>h>=0&&h<=n.length),a=this.toLocalBox(e.box),{minY:s,maxY:l}=this.computeEditorVerticalBounds(i,n,a),c={x:SJ(this.width,this.editorAttachmentPoint),y:s,width:Math.max(1,this.width),height:Math.max(0,l-s)},u=this.getFallbackLineAdvance();if(c.height<u){let h=u-c.height;c.y-=h,c.height=u}return{containerBox:c,charBoxes:n,...o.length>0?{lineBreakIndices:o}:{},...i.length>0?{lineLayouts:i}:{}}}normalizeRenderedTopAlignment(e,t){var n;let i=-(t.containerBox.y+t.containerBox.height);!Number.isFinite(i)||Math.abs(i)<1e-8||(this.mtextInsertionOffset.set(0,i,0),e.position.y+=i,e.updateMatrixWorld(!0),t.containerBox.y+=i,t.charBoxes.forEach(o=>{o.y+=i}),(n=t.lineLayouts)==null||n.forEach(o=>{o.y+=i}))}toLocalBox(e){let t=e.min.x-this.position.x,n=e.max.x-this.position.x,i=e.min.y-this.position.y,o=e.max.y-this.position.y,a=Math.max(0,n-t),s=Math.max(0,o-i);return{x:t,y:i+s/2,width:a,height:s}}createFallbackCharBoxes(){let e=this.getFallbackLineAdvance(),t=[],n=[],i=[],o=0,a=0,s=-e;i.push({y:a-e/2,height:e});for(let l of this.getChars()){if(l===`
  4558. `){n.push(t.length),o=0,a-=e,s=Math.min(s,a-e),i.push({y:a-e/2,height:e});continue}let c=Math.max(1,this.currentFormat.fontSize*.6);this.enableWordWrap&&o>0&&o+c>this.width&&(n.push(t.length),o=0,a-=e,s=Math.min(s,a-e),i.push({y:a-e/2,height:e})),t.push({x:o,y:a-e/2,width:c,height:e}),o+=c}return{containerBox:{x:SJ(this.width,this.editorAttachmentPoint),y:s,width:this.width,height:Math.max(1,-s)},charBoxes:t,lineBreakIndices:n,lineLayouts:i}}createBoundingBox(e,t){if(!e)return;let n=typeof t?.color=="number"?t.color:new $e(t?.color??"#58a6ff");this.boundingBoxPadding=Math.max(0,t?.padding??1),this.boundingBoxZOffset=t?.zOffset??.01;let i=new Fi({color:n,transparent:!0,opacity:t?.opacity??.9,depthTest:!1,depthWrite:!1}),o=new ot;this.boundingBoxObject=new Ly(o,i),this.boundingBoxObject.position.z=this.boundingBoxZOffset,this.scene.add(this.boundingBoxObject)}updateBoundingBoxGeometry(){if(!this.boundingBoxObject)return;this.boundingBoxObject.geometry.dispose();let e=this.boundingBoxPadding,t=this.position.x+this.layoutContainer.x-e,n=this.position.y+this.layoutContainer.y-e,i=this.position.x+this.layoutContainer.x+this.layoutContainer.width+e,o=this.position.y+this.layoutContainer.y+this.layoutContainer.height+e,a=this.position.z;this.boundingBoxObject.geometry=new ot().setFromPoints([new U(t,n,a),new U(i,n,a),new U(i,o,a),new U(t,o,a)])}disposeBoundingBox(){if(!this.boundingBoxObject)return;this.boundingBoxObject.removeFromParent(),this.boundingBoxObject.geometry.dispose();let e=Array.isArray(this.boundingBoxObject.material)?this.boundingBoxObject.material:[this.boundingBoxObject.material];for(let t of e)t.dispose();this.boundingBoxObject=null}replaceRenderedObject(e){this.disposeRenderedObject(this.renderedObject),this.removeStrayInputBoxSceneRootsExcept(e),this.forceVisibleMaterialState(e),e.userData[tT]=this,this.renderedObject=e,this.scene.add(e)}removeStrayInputBoxSceneRootsExcept(e){let t=e;for(let n=this.scene.children.length-1;n>=0;n--){let i=this.scene.children[n];!i||i===t||i.userData[tT]===this&&(this.scene.remove(i),this.disposeMTextRootResources(i),delete i.userData[tT])}}forceVisibleMaterialState(e){e.traverse(t=>{let n=t,i=n.material?Array.isArray(n.material)?n.material:[n.material]:[];for(let o of i){let a=o;typeof a.side<"u"&&(a.side=Si),typeof a.depthTest<"u"&&(a.depthTest=!1),typeof a.depthWrite<"u"&&(a.depthWrite=!1),typeof a.transparent<"u"&&typeof a.opacity<"u"&&(a.transparent=a.opacity<1),a.needsUpdate=!0}})}disposeDetachedThreeSubtree(e){e.traverse(t=>{let n=t;n.geometry&&n.geometry.dispose();let i=n.material?Array.isArray(n.material)?n.material:[n.material]:[];for(let o of i){let a=o;a.map&&a.map.dispose(),o.dispose()}})}pruneExtraMTextLayoutRoots(e){for(;e.children.length>1;){let t=e.children[0];if(!t)break;e.remove(t),this.disposeDetachedThreeSubtree(t)}}disposeMTextRootResources(e){let t=e;if(typeof t.dispose=="function"){t.dispose();return}this.disposeDetachedThreeSubtree(e)}disposeRenderedObject(e){e&&(e.removeFromParent(),delete e.userData[tT],this.disposeMTextRootResources(e))}isExplicitAci(e){return e!==null&&Number.isInteger(e)&&e>0&&e<256}normalizeColorNumber(e){return Math.max(0,Math.min(16777215,Math.round(e)))}resolveAciColor(e){let t=w_(e);return this.normalizeColorNumber(Number.isFinite(t)?t:16777215)}resolveBaseColor(){return this.isExplicitAci(this.baseFormat.aci)?this.resolveAciColor(this.baseFormat.aci):this.baseFormat.rgb!==null?this.normalizeColorNumber(this.baseFormat.rgb):16777215}resolveBaseFormatColor(e){let t=e.color;if(t.isRgb&&t.rgbValue!==null)return{aci:null,rgb:this.normalizeColorNumber(t.rgbValue)};if(t.isAci&&t.aci!==null){let n=t.aci;return Number.isInteger(n)&&n>=1&&n<=255?{aci:n,rgb:null}:n===0?{aci:null,rgb:this.normalizeColorNumber(e.byBlockColor)}:{aci:null,rgb:this.normalizeColorNumber(e.byLayerColor)}}return{aci:null,rgb:this.normalizeColorNumber(e.byLayerColor)}}createBaseFormatFromTextStyle(e,t){let n=aLe();n.fontFamily=e.font||n.fontFamily,n.fontSize=Math.max(1,e.fixedTextHeight);let i=this.resolveBaseFormatColor(t);n.aci=i.aci,n.rgb=i.rgb;let o=e.widthFactor;n.widthFactor=typeof o=="number"&&Number.isFinite(o)?Math.max(.01,o):1;let a=e.obliqueAngle;return n.obliqueAngle=typeof a=="number"&&Number.isFinite(a)?a:0,n.tracking=1,n}createMTextData(){let e={text:this.mtextString,height:Math.max(1,this.defaultTextStyle.fixedTextHeight),width:this.width,position:{x:this.position.x,y:this.position.y,z:this.position.z},attachmentPoint:this.editorAttachmentPoint,drawingDirection:fa.LEFT_TO_RIGHT,widthFactor:1,collectCharBoxes:!0};return this.editorLineSpaceFactor!=null&&Number.isFinite(this.editorLineSpaceFactor)&&(e.lineSpaceFactor=this.editorLineSpaceFactor),e}getLineSpacingFactor(){return this.editorLineSpaceFactor??an.DEFAULT_LINE_SPACE_FACTOR}setLineSpacingFactor(e){if(!Number.isFinite(e)||e<=0)return;let t=an.DEFAULT_LINE_SPACE_FACTOR,n=e>=1?Math.max(.01,t+(e-1)/KE):e;this.editorLineSpaceFactor=n,this.relayout(),this.emit("change")}clearLineSpacing(){this.editorLineSpaceFactor=null,this.relayout(),this.emit("change")}getFallbackLineAdvance(){return Math.max(1,this.currentFormat.fontSize*an.FALLBACK_LINE_ADVANCE_RATIO)}createTextStyle(){return{...this.defaultTextStyle}}resolveRenderColorSettings(){if(this.colorSettings)return this.colorSettings;let e=this.toolbarTheme==="light"?0:16777215;return{byLayerColor:e,byBlockColor:e,color:new Mi(256)}}focusImeInput(){this.imeInput&&this.imeInput.focus({preventScroll:!0})}refocusImeInputSoon(){this.imeInput&&(this.imeFocusTimer!==null&&window.clearTimeout(this.imeFocusTimer),this.imeFocusTimer=window.setTimeout(()=>{this.focusImeInput(),this.imeFocusTimer=null},0))}updateImeAnchorPosition(){if(!this.imeInput||!this.imeTarget)return;let e=this.getCursorWorldPosition(),t=new U(e.x,e.y,e.z).project(this.camera),n=this.imeTarget.getBoundingClientRect(),i=n.left+(t.x+1)*.5*n.width,o=n.top+(1-t.y)*.5*n.height;this.imeInput.style.left=`${Math.round(i)}px`,this.imeInput.style.top=`${Math.round(o)}px`}syncStateFromCursor(){this.cursorIndex=this.cursorLogic.getCurrentIndex();let e=this.cursorLogic.getSelection();e?(this.selectionStart=e.start,this.selectionEnd=e.end):(this.selectionStart=this.cursorIndex,this.selectionEnd=this.cursorIndex),this.syncDocumentFromUiState(),this.refreshCurrentFormatFromDocument()}consumeMove(e){return this.moveCursor(e),!0}consumeExtend(e){return this.extendSelection(e),!0}isMacPlatform(){return typeof navigator>"u"?!1:/Mac|iPhone|iPad|iPod/i.test(navigator.platform)}emit(e){for(let t of this.handlers[e])t()}findPrevWordStart(e){let t=this.getChars(),n=Math.max(0,e-1);for(;n>0&&/\s/.test(t[n]??"");)n-=1;for(;n>0&&!/\s/.test(t[n-1]??"");)n-=1;return n}findNextWordStart(e){let t=this.getChars(),n=Math.min(t.length,e);for(;n<t.length&&!/\s/.test(t[n]??"");)n+=1;for(;n<t.length&&/\s/.test(t[n]??"");)n+=1;return n}getChars(){let e=[];for(let t of this.document.ast.nodes){if(t.type==="char"){e.push(t.value);continue}if(t.type==="stack"){e.push("");continue}(t.type==="paragraphBreak"||t.type==="columnBreak"||t.type==="wrapAtDimLine")&&e.push(`
  4559. `)}return e}charCount(){return this.getChars().length}getActiveCursorRenderState(e,t){var n;let i=this.cursorLogic.getCharBoxes(),o=this.cursorLogic.getCurrentIndex(),a=this.cursorLogic.getCurrentLineInfo();if(i.length===0){let l=(n=this.latestCursorLayoutData.lineLayouts)==null?void 0:n[0];if(l&&Number.isFinite(l.y)&&Number.isFinite(l.height)){let u=Math.max(1,l.height);return{position:{x:e.x,y:l.y},height:u}}let c=Math.max(1,this.getFallbackLineAdvance());return{position:{x:e.x,y:this.layoutContainer.y+c/2},height:c}}if(o<=0||o===a.startIndex){if(!(a.charCount<=0||a.endIndex<a.startIndex)){let c=Math.max(0,Math.min(a.startIndex,i.length-1)),u=i[c];if(u)return{position:{x:e.x,y:u.y},height:Math.max(1,u.height)}}let l=a.height??t;return{position:{x:e.x,y:a.y??e.y},height:Math.max(1,l)}}let s=i[Math.min(o-1,i.length-1)];return s?{position:{x:s.x+s.width,y:s.y},height:Math.max(1,s.height)}:{position:e,height:Math.max(1,t)}}getNodeLogicalSpan(e){switch(e.type){case"char":return 1;case"stack":return 1;case"paragraphBreak":case"columnBreak":case"wrapAtDimLine":return 0;default:return 0}}toLogicalIndexFromDocumentIndex(e){let t=Math.max(0,Math.min(e,this.document.ast.nodes.length)),n=0;for(let i=0;i<t;i+=1){let o=this.document.ast.nodes[i];o&&(n+=this.getNodeLogicalSpan(o))}return n}toDocumentIndexFromLogicalIndex(e,t=!0,n){var i,o;let a=this.document.ast.nodes;if(a.length===0)return 0;let s=this.charCount(),l=Math.max(0,Math.min(e,s)),c=[],u=0,h=0;for(let d=0;d<=a.length&&(u===l&&c.push({index:d,lineIndex:h}),d!==a.length);d+=1){let p=a[d];if(!p)continue;let f=this.getNodeLogicalSpan(p);f===0?h+=1:u+=f}if(c.length===0)return a.length;if(n!==void 0&&Number.isFinite(n)){let d=this,p=(typeof d.resolveCandidateByVisualLineHint=="function"?d.resolveCandidateByVisualLineHint:an.prototype.resolveCandidateByVisualLineHint).call(this,c,l,n);if(p!==void 0)return p;let f=((i=c[0])==null?void 0:i.lineIndex)??0,m=((o=c[c.length-1])==null?void 0:o.lineIndex)??0;if(n<f||n>m)return t?c[c.length-1].index:c[0].index;let g=c[0],y=Math.abs(g.lineIndex-n);for(let b=1;b<c.length;b+=1){let v=c[b],x=Math.abs(v.lineIndex-n);x<y&&(g=v,y=x)}return g.index}return t?c[c.length-1].index:c[0].index}resolveCandidateByVisualLineHint(e,t,n){if(e.length<=1||this.cursorLogic==null||typeof this.cursorLogic.getLines!="function")return;let i=this.cursorLogic.getLines();if(!Array.isArray(i)||i.length===0)return;let o=[];for(let l=0;l<i.length;l+=1){let c=i[l];c&&t>=c.startIndex&&t<=c.endIndex+1&&o.push(l)}if(o.length!==e.length)return;let a=o.indexOf(n);if(a<0)return;let s=e[a];return s?.index}syncUiStateFromDocument(){this.mtextString=this.document.toMText();let e=this.charCount();this.cursorIndex=Math.min(this.toLogicalIndexFromDocumentIndex(this.document.cursor),e);let t=this.document.selection;t?(this.selectionStart=this.toLogicalIndexFromDocumentIndex(t.start),this.selectionEnd=this.toLogicalIndexFromDocumentIndex(t.end)):(this.selectionStart=this.cursorIndex,this.selectionEnd=this.cursorIndex),this.refreshCurrentFormatFromDocument()}syncDocumentFromUiState(){let e=this.getSelectionRange();if(!e.isCollapsed){let o=this.toDocumentIndexFromLogicalIndex(e.start,!0),a=this.toDocumentIndexFromLogicalIndex(e.end,!1);this.document.setSelection(o,a);return}this.document.clearSelection();let t=this.cursorLogic.getCursorState(),n=t.lineIndex,i=!(t.isAtLineEnd&&!t.isAtLineStart);this.document.cursor=this.toDocumentIndexFromLogicalIndex(this.cursorIndex,i,n>=0?n:void 0)}refreshCurrentFormatFromDocument(){var e,t;let n=this.inferCurrentFormatFromDocument();if(this.updateToolbarStackState(),!n){(e=this.getActiveToolbar())==null||e.setFormat(this.currentFormat);return}dJ(this.currentFormat,n)||(this.currentFormat=n),(t=this.getActiveToolbar())==null||t.setFormat(this.currentFormat)}toggleStackSelection(){let e=this.getSelectionRange();e.isCollapsed||this.commitHistoryEdit(()=>{var t;this.syncDocumentFromUiState();let n=this.toDocumentIndexFromLogicalIndex(e.start,!0),i=this.toDocumentIndexFromLogicalIndex(e.end,!1);if(i<=n)return;let o=this.document.ast.nodes.slice(n,i);if(o.length===1&&((t=o[0])==null?void 0:t.type)==="stack"){let u=o[0],h=this.stackNodeToPlainText(u.numerator,u.denominator,u.divider),d=Array.from(h).map(p=>({type:"char",value:p,style:this.cloneDocumentStyle(u.style)}));if(d.length===0)return;this.document.transaction(p=>{p.ast.nodes.splice(n,1,...d),p.setSelection(n,n+d.length)}),this.syncUiStateFromDocument(),this.relayout();return}if(!o.every(u=>u?.type==="char"))return;let a=o.map(u=>u.value).join(""),s=this.parseStackParts(a);if(!s)return;let l=o[0];if(!l)return;let c={type:"stack",numerator:s.numerator,denominator:s.denominator,divider:s.divider,style:this.cloneDocumentStyle(l.style)};this.document.transaction(u=>{u.ast.nodes.splice(n,i-n,c),u.setSelection(n,n+1)}),this.syncUiStateFromDocument(),this.relayout()})}toggleScriptSelection(e){let t=this.getSelectionRange();if(t.isCollapsed)return!1;let n=!1;return this.commitHistoryEdit(()=>{var i;this.syncDocumentFromUiState();let o=this.toDocumentIndexFromLogicalIndex(t.start,!0),a=this.toDocumentIndexFromLogicalIndex(t.end,!1);if(a<=o)return;let s=this.document.ast.nodes.slice(o,a);if(s.length===1&&((i=s[0])==null?void 0:i.type)==="stack"){let d=s[0],p=this.scriptStackToPlainText(d.numerator,d.denominator,d.divider);if(!p)return;let f=this.cloneDocumentStyle(d.style);f.script="normal",f.align=lr.MIDDLE;let m=Array.from(p).map(g=>({type:"char",value:g,style:this.cloneDocumentStyle(f)}));if(m.length===0)return;this.document.transaction(g=>{g.ast.nodes.splice(o,1,...m),g.setSelection(o,o+m.length)}),this.syncUiStateFromDocument(),this.relayout(),n=!0;return}if(!s.every(d=>d?.type==="char"))return;let l=s.map(d=>d.value).join("");if(l.length===0)return;let c=s[0];if(!c)return;let u=this.cloneDocumentStyle(c.style);u.script=e,u.align=e==="superscript"?lr.TOP:lr.BOTTOM;let h={type:"stack",numerator:e==="superscript"?l:"",denominator:e==="subscript"?l:"",divider:"^",style:this.cloneDocumentStyle(u)};this.document.transaction(d=>{d.ast.nodes.splice(o,a-o,h),d.setSelection(o,o+1)}),this.syncUiStateFromDocument(),this.relayout(),n=!0}),n}commitHistoryEdit(e){let t=this.createHistorySnapshot();e(),!this.isSameAsCurrent(t)&&(this.undoStack.push(t),this.undoStack.length>this.maxHistorySize&&this.undoStack.splice(0,this.undoStack.length-this.maxHistorySize),this.redoStack=[],this.emit("change"),this.emit("selectionChange"),this.emit("cursorMove"))}createHistorySnapshot(){return{ast:this.cloneAst(this.document.ast),cursor:this.document.cursor,selection:this.document.selection?{...this.document.selection}:null,currentFormat:{...this.currentFormat}}}restoreHistorySnapshot(e){this.document=new Qf(this.cloneAst(e.ast)),e.selection?this.document.setSelection(e.selection.start,e.selection.end):(this.document.cursor=e.cursor,this.document.clearSelection()),this.uiAdapter=new p1(this.document),this.currentFormat={...e.currentFormat},this.syncUiStateFromDocument(),this.relayout(),this.emit("change"),this.emit("selectionChange"),this.emit("cursorMove")}isSameAsCurrent(e){if(e.cursor!==this.document.cursor)return!1;let t=this.document.selection;return!!e.selection!=!!t||e.selection&&t&&(e.selection.start!==t.start||e.selection.end!==t.end)||!dJ(e.currentFormat,this.currentFormat)?!1:this.document.toMText()===this.buildMTextFromAst(e.ast)}buildMTextFromAst(e){return new Qf(this.cloneAst(e)).toMText()}clearHistory(){this.undoStack=[],this.redoStack=[]}cloneAst(e){return{nodes:e.nodes.map(t=>t.type==="char"?{...t,style:this.cloneDocumentStyle(t.style)}:t.type==="stack"?{...t,style:this.cloneDocumentStyle(t.style)}:{...t,style:this.cloneDocumentStyle(t.style)})}}stackNodeToPlainText(e,t,n){if(n==="^"){if(e.length===0&&t.length>0)return`^${t.trimStart()}`;if(e.length>0&&t.length===0)return`${e.trimEnd()}^`}return`${e}${n}${t}`}scriptStackToPlainText(e,t,n){if(n!=="^")return null;let i=e.trim().length>0,o=t.trim().length>0;return i===o?null:i?e.trim():t.trim()}parseStackParts(e){let t=[];for(let l=0;l<e.length;l+=1){let c=e[l];(c==="/"||c==="#"||c==="^")&&t.push({index:l,divider:c})}if(t.length!==1)return null;let n=t[0];if(!n)return null;let{index:i,divider:o}=n,a=e.slice(0,i),s=e.slice(i+1);if(o==="^"){let l=a.trim().length>0,c=s.trim().length>0;return!l&&!c?null:{numerator:a,denominator:s,divider:o}}return a.trim().length===0||s.trim().length===0?null:{numerator:a,denominator:s,divider:o}}updateToolbarStackState(){var e;let t=this.getActiveToolbar();if(!t)return;let n=this.getSelectionRange();if(n.isCollapsed){t.setStackActive(!1);return}let i=this.toDocumentIndexFromLogicalIndex(n.start,!0),o=this.toDocumentIndexFromLogicalIndex(n.end,!1),a=this.document.ast.nodes.slice(i,o),s=a.length===1&&((e=a[0])==null?void 0:e.type)==="stack"&&!this.isScriptOnlyStack(a[0]);t.setStackActive(s)}isScriptOnlyStack(e){if(e.divider!=="^")return!1;let t=e.numerator.trim().length>0,n=e.denominator.trim().length>0;return t!==n}inferCurrentFormatFromDocument(){if(this.document.ast.nodes.length===0||this.getChars().length===0)return null;let e=this.selectionStart!==this.selectionEnd?Math.min(this.selectionStart,this.selectionEnd):this.cursorIndex>0?this.cursorIndex-1:0,t=this.getNodeByLogicalCharIndex(e);if(!t)return null;if(t.type==="stack"&&this.isScriptOnlyStack(t)){let n=t.numerator.trim().length>0?"superscript":"subscript";return{...this.toCharFormat(t.style),script:n}}return this.toCharFormat(t.style)}getNodeByLogicalCharIndex(e){let t=this.document.ast.nodes;if(t.length===0)return null;let n=0,i=Math.max(0,e);for(let o of t){let a=this.getNodeLogicalSpan(o);if(i<n+a)return o;n+=a}return t[t.length-1]??null}getNodesByLogicalRange(e,t){let n=this.document.ast.nodes;if(n.length===0)return[];let i=Math.max(0,Math.min(e,t)),o=Math.max(i,Math.max(e,t));if(i===o)return[];let a=[],s=0;for(let l of n){let c=this.getNodeLogicalSpan(l),u=s,h=s+c;c>0&&u<o&&h>i&&a.push(l),s=h}return a}toCharFormat(e){var t,n;let i=Math.max(1,this.defaultTextStyle.fixedTextHeight),o=e.capHeight.isRelative?i*Math.max(0,e.capHeight.value):e.capHeight.value,a=this.defaultTextStyle.font||this.baseFormat.fontFamily,s=e.rgb?this.rgbArrayToColorNumber(e.rgb):this.isExplicitAci(e.aci)?this.resolveAciColor(e.aci):this.resolveBaseColor(),l=this.isExplicitAci(e.aci)?e.aci:this.isExplicitAci(this.baseFormat.aci)?this.baseFormat.aci:null,c=this.toScriptFromStyle(e,i,o),u=Math.max(1,i)*.9,h=o<=u,d=c==="normal"?o:h?o/.7:o,p=(t=e.widthFactor)==null?void 0:t.value,f=typeof p=="number"&&Number.isFinite(p)?Math.max(.01,p):1,m=(n=e.charTrackingFactor)==null?void 0:n.value,g=typeof m=="number"&&Number.isFinite(m)?Math.max(.01,m):1,y=typeof e.oblique=="number"&&Number.isFinite(e.oblique)?e.oblique:0;return{fontFamily:e.fontFace.family||a,fontSize:Math.max(1,d||i),bold:e.fontFace.weight>=700,italic:e.fontFace.style==="Italic",underline:e.underline,overline:e.overline,strike:e.strikeThrough,script:c,aci:l,rgb:s,obliqueAngle:y,widthFactor:f,tracking:g,paragraphAlignment:e.paragraph.align}}toScriptFromStyle(e,t,n){let i=Math.max(1,t)*.9,o=n<=i;return e.script&&e.script!=="normal"?o?e.script:"normal":o&&e.align===lr.TOP?"superscript":o&&e.align===lr.BOTTOM?"subscript":"normal"}createDefaultParseContext(){let e=new Cs;if(e.fontFace.family=this.defaultTextStyle.font||this.baseFormat.fontFamily,e.fontFace.style=this.baseFormat.italic?"Italic":"Regular",e.fontFace.weight=this.baseFormat.bold?700:400,e.capHeight={value:this.defaultTextStyle.fixedTextHeight,isRelative:!1},e.align=lr.BOTTOM,e.widthFactor={value:this.defaultTextStyle.widthFactor??1,isRelative:!1},this.isExplicitAci(this.baseFormat.aci))e.aci=this.baseFormat.aci,e.rgb=null;else{let t=this.resolveBaseColor();e.rgb=this.colorNumberToRgbArray(t),e.aci=256}return e}createNormalizedDocument(e){let t=Qf.fromMText(e,this.createDefaultParseContext()),n={nodes:[]};for(let i of t.ast.nodes)switch(i.type){case"char":n.nodes.push({type:"char",value:i.value,style:this.cloneDocumentStyle(i.style)});break;case"stack":n.nodes.push({type:"stack",numerator:i.numerator,denominator:i.denominator,divider:i.divider,style:this.cloneDocumentStyle(i.style)});break;case"paragraphBreak":n.nodes.push({type:"paragraphBreak",style:this.cloneDocumentStyle(i.style)});break;case"columnBreak":case"wrapAtDimLine":n.nodes.push({type:"paragraphBreak",style:this.cloneDocumentStyle(i.style)});break}return new Qf(n)}computeAttachmentAnchorOnBounds(e,t,n,i,o){let a=(e+t)*.5,s=(n+i)*.5,l=this.position.z;switch(o){case st.TopLeft:return new U(e,i,l);case st.TopCenter:return new U(a,i,l);case st.TopRight:return new U(t,i,l);case st.MiddleLeft:return new U(e,s,l);case st.MiddleCenter:return new U(a,s,l);case st.MiddleRight:return new U(t,s,l);case st.BottomLeft:case st.BaselineLeft:return new U(e,n,l);case st.BottomCenter:case st.BaselineCenter:return new U(a,n,l);case st.BottomRight:case st.BaselineRight:return new U(t,n,l);default:return new U(e,i,l)}}mapRibbonParagraphAlignment(e){switch(e){case"default":return Vt.DEFAULT;case"left":return Vt.LEFT;case"center":return Vt.CENTER;case"right":return Vt.RIGHT;case"justified":return Vt.JUSTIFIED;case"distributed":return Vt.DISTRIBUTED;default:return}}mapRibbonAttachmentCode(e){switch(e.trim().toUpperCase()){case"TL":return st.TopLeft;case"TC":return st.TopCenter;case"TR":return st.TopRight;case"ML":return st.MiddleLeft;case"MC":return st.MiddleCenter;case"MR":return st.MiddleRight;case"BL":return st.BottomLeft;case"BC":return st.BottomCenter;case"BR":return st.BottomRight;default:return}}attachmentPointToRibbonCode(e){switch(e){case st.TopLeft:return"TL";case st.TopCenter:return"TC";case st.TopRight:return"TR";case st.MiddleLeft:return"ML";case st.MiddleCenter:return"MC";case st.MiddleRight:return"MR";case st.BottomLeft:case st.BaselineLeft:return"BL";case st.BottomCenter:case st.BaselineCenter:return"BC";case st.BottomRight:case st.BaselineRight:return"BR";default:return"TL"}}mergeCharFormat(e,t){let n={...e,...t};if(t.aci!==void 0)if(!this.isExplicitAci(t.aci))n.aci=null;else{let i=this.resolveAciColor(t.aci);n.aci=t.aci,n.rgb=i}return t.rgb!==void 0&&(t.rgb===null?n.rgb=null:(n.rgb=this.normalizeColorNumber(t.rgb),t.aci===void 0&&(n.aci=null))),t.paragraphAlignment!==void 0&&(n.paragraphAlignment=t.paragraphAlignment),n}cloneDocumentStyle(e){return{underline:e.underline,overline:e.overline,strikeThrough:e.strikeThrough,script:e.script,aci:e.aci,rgb:e.rgb?[...e.rgb]:null,align:e.align,fontFace:{...e.fontFace},capHeight:{...e.capHeight},widthFactor:{...e.widthFactor},charTrackingFactor:{...e.charTrackingFactor},oblique:e.oblique,paragraph:{indent:e.paragraph.indent,left:e.paragraph.left,right:e.paragraph.right,align:e.paragraph.align,tabs:[...e.paragraph.tabs]}}}toDocumentStyle(e,t){let n=this.isExplicitAci(e.aci)?e.aci:null,i=n!==null?null:this.colorNumberToRgbArray(e.rgb!==null?e.rgb:this.resolveBaseColor()),o=e.script!=="normal",a=Math.max(1,e.fontSize*(o?.7:1)),s=e.script==="superscript"?lr.TOP:e.script==="subscript"?lr.BOTTOM:lr.MIDDLE,l=e.paragraphAlignment;return{underline:e.underline,overline:e.overline,strikeThrough:e.strike,script:e.script,aci:n,rgb:i,align:s,fontFace:{family:e.fontFamily,style:e.italic?"Italic":"Regular",weight:e.bold?700:400},capHeight:{value:a,isRelative:!1},widthFactor:{value:Math.max(.01,e.widthFactor),isRelative:!1},charTrackingFactor:{value:Math.max(.01,e.tracking),isRelative:!1},oblique:e.obliqueAngle,paragraph:{indent:t?.paragraph.indent??0,left:t?.paragraph.left??0,right:t?.paragraph.right??0,align:l,tabs:t!=null&&t.paragraph.tabs?[...t.paragraph.tabs]:[]}}}colorNumberToRgbArray(e){let t=this.normalizeColorNumber(e);return[t>>16&255,t>>8&255,t&255]}rgbArrayToColorNumber(e){let t=Math.max(0,Math.min(255,Math.round(e[0]))),n=Math.max(0,Math.min(255,Math.round(e[1]))),i=Math.max(0,Math.min(255,Math.round(e[2])));return t<<16|n<<8|i}};Me(Rc,"activeEditor",null),Me(Rc,"sharedToolbar",null),Me(Rc,"sharedToolbarContainer",null),Me(Rc,"sharedToolbarFontFamiliesKey",""),Me(Rc,"sharedToolbarColorPickerFactory",null),Me(Rc,"instances",new Set),Me(Rc,"FALLBACK_LINE_ADVANCE_RATIO",1.5),Me(Rc,"DEFAULT_TEXT_STYLE",{name:"MTextInputBoxStyle",standardFlag:0,fixedTextHeight:24,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:24,font:jT,bigFont:""}),Me(Rc,"DEFAULT_LINE_SPACE_FACTOR",.3);var CLe=Rc;function TLe(r){return r.currentSpaceId===r.tables.blockTable.modelSpace.objectId}function jee(r){return r?oe.MODELBKCOLOR:oe.PAPERBKCOLOR}function kLe(r,e){return r?.RGB??(e?cs:Hl)}function uF(r,e){let t=jee(e),n=gt.instance().getVar(t,r);return kLe(n,e)}function ILe(r){let e=r.RGB??cs,t=new je(Be.ByColor);return Wl(e)?t.setRGB(0,0,0):t.setRGB(255,255,255),t}function hF(r){return Wl(r)?"black":"white"}function LLe(r){if(r===void 0)return;let e=r;return e>=1&&e<=12?e:st.TopLeft}var nT="__mlightcadMTextFormatBridge",xb=class Ei{static setDefaultColorPicker(e){Ei.defaultColorPicker=e}static setDefaultToolbarEnabled(e){Ei.defaultToolbarEnabled=e}static getActiveInputBox(){return Ei.activeInputBox}static addActiveInputBoxChangeListener(e){Ei.activeInputBoxChangeListeners.add(e)}static removeActiveInputBoxChangeListener(e){Ei.activeInputBoxChangeListeners.delete(e)}static setActiveInputBox(e){Ei.activeInputBox!==e&&(Ei.activeInputBox=e,Ei.activeInputBoxChangeListeners.forEach(t=>{t(e)}))}static createHiddenToolbarContainer(e){let t=e.ownerDocument.createElement("div");return t.setAttribute("aria-hidden","true"),Object.assign(t.style,{display:"none",pointerEvents:"none"}),e.appendChild(t),t}static attachFormatBridge(e){let t=e;if(t[nT])return;let n=new Set,i=[],o=()=>{n.forEach(s=>{s()})},a=s=>{let l=t[s];typeof l=="function"&&(t[s]=(...c)=>{let u=l.apply(t,c);return o(),u},i.push(()=>{t[s]=l}))};["setCurrentFormat","refreshCurrentFormatFromDocument","toggleCase","toggleStackSelection","toggleScriptSelection","setParagraphAlignment","setAttachmentPoint","setLineSpacingFactor","clearLineSpacing"].forEach(a),t.addCurrentFormatChangeListener=s=>{n.add(s)},t.removeCurrentFormatChangeListener=s=>{n.delete(s)},t.focusEditor=()=>{let s=t,l=s.focusImeInput;if(typeof l=="function"){l.call(t);return}let c=s.refocusImeInputSoon;typeof c=="function"&&c.call(t)},t.isStackSelectionActive=()=>{var s,l;let c=t,u=c.getSelectionRange,h=c.toDocumentIndexFromLogicalIndex,d=c.isScriptOnlyStack,p=c.document;if(typeof u!="function"||typeof h!="function")return!1;let f=u.call(t);if(!f||f.isCollapsed)return!1;let m=h.call(t,f.start,!0),g=h.call(t,f.end,!1),y=((l=(s=p?.ast)==null?void 0:s.nodes)==null?void 0:l.slice(m,g))??[],b=y[0];if(y.length!==1||b?.type!=="stack")return!1;if(typeof d=="function")return!d.call(t,b);if(b.divider!=="^")return!0;let v=(b.numerator??"").trim().length>0,x=(b.denominator??"").trim().length>0;return v===x},t[nT]={addCurrentFormatChangeListener:t.addCurrentFormatChangeListener,removeCurrentFormatChangeListener:t.removeCurrentFormatChangeListener,dispose:()=>{i.forEach(s=>{s()}),n.clear(),delete t.addCurrentFormatChangeListener,delete t.removeCurrentFormatChangeListener,delete t.focusEditor,delete t.isStackSelectionActive,delete t[nT]}}}static detachFormatBridge(e){var t;(t=e[nT])==null||t.dispose()}open(e){let{view:t,location:n,width:i,textHeight:o,initialText:a="",toolbarFontFamilies:s=[],toolbarColorPicker:l,toolbarEnabled:c=Ei.defaultToolbarEnabled,initialAttachmentPoint:u}=e,h=new U(n.x,n.y,n.z??0),d=Wl(t.backgroundColor)?"#000000":"#ffffff",p=Y.instance,f=p.curDocument.database,{layerColor:m}=p.resolveColors(),g=()=>{let S=gt.instance().getVar(oe.COLORTHEME,f);return S===0||S==="0"||S===!1||S==="dark"?"dark":"light"},y=Array.from(new Set(s.map(S=>S.trim()).filter(S=>S.length>0))),b=()=>{let S=f.tables.textStyleTable.getAt(f.textstyle);return S?.textStyle},v=Math.max(1,o),x=b(),w=x?{...x,fixedTextHeight:v,lastHeight:v}:void 0,_=c?null:Ei.createHiddenToolbarContainer(t.container),A=LLe(u),E=new CLe({scene:t.internalScene,camera:t.internalCamera,width:i,position:h.clone(),initialText:a,...A!==void 0?{initialAttachmentPoint:A}:{},textStyle:w,cursorStyle:{color:d,glowColor:d},boundingBoxStyle:{padding:0},imeTarget:t.canvas,colorSettings:{layer:f.clayer,color:new Mi,byLayerColor:m,byBlockColor:m},toolbar:{enabled:!0,theme:g(),fontFamilies:y,container:_??t.container,offsetY:10,colorPicker:l??Ei.defaultColorPicker??void 0}});return Ei.attachFormatBridge(E),Ei.setActiveInputBox(E),new Promise(S=>{let M=!1,T=()=>{M||(E.update(),t.isHtmlDirty=!0)},L=N=>{N.name.toLowerCase()===oe.COLORTHEME.toLowerCase()&&(E.setToolbarTheme(g()),t.isHtmlDirty=!0)},O=()=>{Ei.activeInputBox===E&&Ei.setActiveInputBox(null),Ei.detachFormatBridge(E),E.dispose(),_?.remove(),t.events.renderFrame.removeEventListener(T),E.off("close",z),gt.instance().events.sysVarChanged.removeEventListener(L),t.isHtmlDirty=!0},D=N=>{M||(M=!0,O(),S(N))},z=()=>{var N;let J=E.getMTextInsertionPoint();D({contents:E.getText(),location:{x:J.x,y:J.y,z:J.z},width:i,height:v,lineSpacingFactor:((N=E.getLineSpacingFactor)==null?void 0:N.call(E))??Ei.defaultLineSpacingFactor,attachmentPoint:E.getMTextAttachmentPoint()})};E.on("close",z),t.events.renderFrame.addEventListener(T),gt.instance().events.sysVarChanged.addEventListener(L)})}};xb.defaultLineSpacingFactor=.3,xb.activeInputBox=null,xb.activeInputBoxChangeListeners=new Set,xb.defaultColorPicker=null,xb.defaultToolbarEnabled=!0;var nm=xb,Vee=class Gee{constructor(e){this.view=e}handleKeyDown(e){let t=this.resolveUndoRedoShortcut(e);if(this.shouldIgnoreEditableTargetShortcut(e)&&!t)return!1;if(t)return!this.shouldHandleUndoRedoShortcut(e)||nm.getActiveInputBox()||this.view.editor.isActive?!1:(Y.instance.sendStringToExecute(t),e.preventDefault(),!0);switch(e.code){case"Escape":return this.view.selectionSet.clear(),this.view.htmlTransientManager.deselectAll(),this.view.isHtmlDirty=!0,!1;case"Delete":case"Backspace":if(!this.view.editor.isActive){let n=!1,i=this.view.htmlTransientManager;if(i.hasSelection()){let o=i.getSelectedGroups(),a=o.filter(s=>s.layer===Ln);a.length>0&&Ws(this.view,"Delete Measurement",()=>{for(let s of a)i.detach(s.id)&&(n=!0)}),(o.some(s=>s.layer!==Ln)||o.length===0&&i.hasSelection())&&wa(this.view,"Delete Markup",()=>{n=i.deleteSelected()||n})}if(n)return this.view.isHtmlDirty=!0,e.preventDefault(),!0;Y.instance.lookupGlobalCmd("erase")&&Y.instance.sendStringToExecute("erase")}return!1}return!1}resolveUndoRedoShortcut(e){return!e.ctrlKey&&!e.metaKey?null:e.code==="KeyY"?"redo":e.code==="KeyZ"?e.shiftKey?"redo":"undo":null}shouldIgnoreEditableTargetShortcut(e){if(e.isComposing||e.keyCode===229)return!0;let t=e.target;return t?.tagName==="TEXTAREA"||t!=null&&t.isContentEditable?!0:t?.tagName==="INPUT"}shouldHandleUndoRedoShortcut(e){if(e.isComposing||e.keyCode===229)return!1;let t=e.target;if(t?.tagName==="TEXTAREA"||t!=null&&t.isContentEditable)return!1;if(t?.tagName==="INPUT"){let n=t;return n.classList.contains(Gee.COMMAND_LINE_INPUT_CLASS)?n.value.trim()===""&&!n.readOnly:!1}return!0}};Vee.COMMAND_LINE_INPUT_CLASS="ml-cli-text";var OLe=Vee;function DLe(r,e){if(r.directBatchPrimitive==null)return null;e.beginDirectCapture();let t;try{t=r.worldDraw(e);let n=e.takeDirectCapture();if(!n)return null;let i=BLe(n,e);return i?i.wcsBbox.isEmpty()||e.batchDrawPolicy.resolveDrawMode({anchor:Y_(i.wcsBbox),position:i.position})==="unbatch"?(i.geometry.dispose(),null):{...i,objectId:r.objectId,ownerId:r.ownerId,layerName:r.layer,visible:r.visibility!==!1}:null}catch(n){throw e.cancelDirectCapture(),n}finally{t?.dispose()}}function RLe(r){return!(r instanceof oc||r instanceof Rh)}function BLe(r,e){let t=e.subEntityTraits;if(r.kind==="lineStrip"){let n=e.styleManager.getLineMaterial(t,!1);if(pb(n))return null;let i=Z5(r.points,n);return i?{kind:i.kind==="fat"?"lineFat":"lineBasic",geometry:i.geometry,worldOffset:i.worldOffset,wcsBbox:i.wcsBbox,material:i.material}:null}if(r.kind==="lineSegments"){let n=e.styleManager.getLineMaterial(t,!1);return EZ(r.array,r.itemSize,r.indices,n)}if(r.kind==="point"){let n=e.styleManager.getPointsMaterial(t);return pb(n)?null:MZ(r.point,n)}if(r.kind==="area"){let n=PZ(r.area,t,e.context);return n?pb(n.material)?(n.geometry.dispose(),null):n:null}if(r.kind==="offsetRing"){let n=J5(r.outer,r.inner,t,e.context);return n?pb(n.material)?(n.geometry.dispose(),null):n:null}return null}function AJ(r,e){if(r.length<8)return r;let t=r.map(f=>({value:e==="x"?(f.minX+f.maxX)/2:(f.minY+f.maxY)/2,box:f})).sort((f,m)=>f.value-m.value),n=t[t.length-1].value-t[0].value;if(!(n>0))return r;let i=0,o=0;for(let f=1;f<t.length;f++){let m=t[f].value-t[f-1].value;m>i&&(i=m,o=f)}if(i<n*.2)return r;let a=t.slice(0,o),s=t.slice(o),l=a.length>=s.length?a:s,c=r.map(f=>Math.max(f.maxX-f.minX,f.maxY-f.minY,1e-9));c.sort((f,m)=>f-m);let u=c[Math.floor(c.length/2)]||1,h=[];for(let f=1;f<l.length;f++)h.push(l[f].value-l[f-1].value);h.sort((f,m)=>f-m);let d=h.length>0&&h[Math.floor(h.length/2)]||u,p=Math.max(d*10,u*20);return i<p?r:l.map(f=>f.box)}async function FLe(r,e){if(r.length===0)return null;let t=MJ(r);if(r.length<8)return t;let n=r.slice(),i=-1;for(;n.length!==i;)i=n.length,await e.maybeYield(),n=AJ(n,"x"),await e.maybeYield(),n=AJ(n,"y");return MJ(n)??t}function MJ(r){if(r.length===0)return null;let e=1/0,t=1/0,n=-1/0,i=-1/0;for(let o of r)o.minX<e&&(e=o.minX),o.minY<t&&(t=o.minY),o.maxX>n&&(n=o.maxX),o.maxY>i&&(i=o.maxY);return!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(i)?null:{minX:e,minY:t,maxX:n,maxY:i}}var KF=class{constructor(e,t){this.getLayerTraits=e,this.renderer=t}remap(e,t,n){if(t===n)return;let i=this.getLayerTraits(n);for(let o of e)o.traverse(a=>{let s=a.userData.layerName===t;if(s&&(a.userData.layerName=n),!("material"in a)||!s)return;let l=a.material;if(Array.isArray(l)){let u=l;a.material=u.map(h=>this.shouldRemap(h,t)?this.renderer.getLayerBoundMaterial(this.promoteLayerZeroByLayerColor(h,t),n,i)??h:h),jf(en(a),a.material);return}if(!this.shouldRemap(l,t))return;let c=this.renderer.getLayerBoundMaterial(this.promoteLayerZeroByLayerColor(l,t),n,i);c&&(a.material=c,jf(en(a),c))})}shouldRemap(e,t){let n=Jn(e);return n.isForeground!==!0?!0:t!=="0"?!1:n.isByLayerColor===!0?!0:t==="0"&&(n.isByLayerLineType===!0||n.isByLayerLineWeight===!0||n.isByLayerTransparency===!0)}promoteLayerZeroByLayerColor(e,t){let n=Jn(e);if(n.isByLayerColor===!1&&n.isForeground!==!0)return e;let i=F_(n)&&n.isByLayerColor!==!0;return t==="0"&&i&&bd(e,{isByLayerColor:!0}),e}};function va(r){return Number.isFinite(r.minX)&&Number.isFinite(r.minY)&&Number.isFinite(r.maxX)&&Number.isFinite(r.maxY)}function PJ(r){let e=new Ne;for(let t of r.wcsChildBoxes)va(t)&&e.union(new Ne(new U(t.minX,t.minY,0),new U(t.maxX,t.maxY,0)));return e}var GT=class{constructor(e=8){this.budgetMs=e,this.lastYield=performance.now()}async maybeYield(){performance.now()-this.lastYield<this.budgetMs||(await zl(),this.lastYield=performance.now())}async yieldNow(){await zl(),this.lastYield=performance.now()}};async function NLe(r,e=new GT){let t=await zLe(r,e);if(!t)return;await e.yieldNow();let n=await ULe(t,e);await e.yieldNow();let i=await FLe(n.length>0?n:t,e);if(i)return new ct({x:i.minX,y:i.minY},{x:i.maxX,y:i.maxY})}async function zLe(r,e){let t=[];for(let s=0;s<r.length;s++){let l=r[s];va(l)&&t.push(l),(s&2047)===2047&&await e.maybeYield()}if(t.length===0)return;await e.maybeYield();let n=new Array(t.length);for(let s=0;s<t.length;s++){let l=t[s];n[s]=Math.max(l.maxX-l.minX,l.maxY-l.minY,1e-9),(s&2047)===2047&&await e.maybeYield()}n.sort((s,l)=>s-l),await e.maybeYield();let i=n[Math.floor(n.length/2)]||1,o=Math.max(i*50,1e10),a=[];for(let s=0;s<t.length;s++){let l=t[s];Math.max(l.maxX-l.minX,l.maxY-l.minY)<o&&a.push(l),(s&2047)===2047&&await e.maybeYield()}return a.length>0?a:void 0}async function ULe(r,e){if(r.length<2)return r;let t=[],n=new Array(r.length),i=new Array(r.length),o=new Array(r.length);for(let h=0;h<r.length;h++){let d=r[h],p=(d.minX+d.maxX)/2,f=(d.minY+d.maxY)/2;t.push({x:p,y:f,box:d}),n[h]=p,i[h]=f,o[h]=Math.max(d.maxX-d.minX,d.maxY-d.minY,1e-9),(h&2047)===2047&&await e.maybeYield()}await e.maybeYield(),n.sort((h,d)=>h-d),await e.maybeYield(),i.sort((h,d)=>h-d),await e.maybeYield(),o.sort((h,d)=>h-d),await e.maybeYield();let a=n[Math.floor(n.length/2)],s=i[Math.floor(i.length/2)],l=o[Math.floor(o.length/2)]||1,c=Math.max(l*50,1e10),u=[];for(let h=0;h<t.length;h++){let d=t[h];Math.hypot(d.x-a,d.y-s)<=c&&u.push(d.box),(h&2047)===2047&&await e.maybeYield()}return u.length>0?u:r}var EJ=1,f1=4;function CJ(r){return{isOff:r.isOff,isFrozen:r.isFrozen,isLocked:((r.standardFlags??0)&f1)!==0}}function jLe(r,e){return r.isOff===e.isOff&&r.isFrozen===e.isFrozen&&r.isLocked===e.isLocked}var kn="Layer",VLe="Entity";function Sn(r,e,t){var n;if((n=r.transactionManager)!=null&&n.hasTransaction()||typeof r.runDatabaseEdit!="function")return t();let i;return im(r,e,()=>{i=t()}),i}var Hee=class Ze{constructor(e){this.db=e}static openLayerForWrite(e,t){let n=typeof t=="string"?e.tables.layerTable.getAt(t):t;if(n)return Ze.registerLayerTableRecordForWrite(e,n),n}static registerLayerTableRecordForWrite(e,t){var n,i;let o=e.transactionManager;if(!((n=o?.isRecording)!=null&&n.call(o)))return;let a=(i=o.currentTransaction)==null?void 0:i.call(o);if(!a)return;Ze.ensureLayerUndoHooks(e);let s=t.objectId;a.openedObjects.set(s,t),a.recorder.hasModify(s)||(a.originalStates.set(s,t.clonePreservingIdentity()),a.recorder.recordModify(t)),e.getObjectById(s)!==t&&Ze.ensureLayerFinalizeHook(a)}static resolveLayerForHandleCollision(e,t){var n;let i=(n=t.before)==null?void 0:n.name;if(typeof i!="string")return;let o=e.tables.layerTable.getAt(i);if(!(!o||e.getObjectById(t.objectId)===o))return o}static ensureLayerUndoHooks(e){let t=e.transactionManager.changeApplier;if(!t||Ze.patchedChangeAppliers.has(t))return;let n=t.applyModify.bind(t);t.applyModify=(i,o)=>{let a=Ze.resolveLayerForHandleCollision(e,i);if(a){let s=o?i.after:i.before;if(s){a.restoreFrom(s);return}}n(i,o)},Ze.patchedChangeAppliers.add(t)}static ensureLayerFinalizeHook(e){let t=e.recorder;if(t.__layerFinalizePatched||typeof t.finalize!="function")return;let n=t.finalize.bind(t);t.finalize=i=>{n(i);for(let o of t.getChanges()){if(o.kind!=="modify")continue;let a=e.openedObjects.get(o.objectId);if(!a||i.getObjectById(o.objectId)===a)continue;let s=Ze.resolveLayerForHandleCollision(i,o);s&&(o.after=s.clonePreservingIdentity())}},t.__layerFinalizePatched=!0}static syncLayerModifiedEvent(e,t,n){Object.keys(n).length!==0&&e.getObjectById(t.objectId)!==t&&e.events.layerModified.dispatch({database:e,layer:t,changes:n})}static setLayerFrozenState(e,t){let n=e.standardFlags??0;e.standardFlags=t?n|EJ:n&~EJ}static setLayerLockedState(e,t){let n=e.standardFlags??0;e.standardFlags=t?n|f1:n&~f1}static isLayerLocked(e){return((e.standardFlags??0)&f1)!==0}static applyLayerPreviousSnapshot(e,t){t.states.forEach(i=>{let o=Ze.openLayerForWrite(e,i.name);o&&(o.isOff=!i.isOn,Ze.setLayerFrozenState(o,i.isFrozen),Ze.setLayerLockedState(o,i.isLocked))});let n=Ze.openLayerForWrite(e,t.clayer);return n?(n.isOff=!1,Ze.setLayerFrozenState(n,!1),e.clayer=n.name,!0):!1}parseLayerNameInput(e){let t=[...this.db.tables.layerTable.newIterator()].map(o=>o.name),n=e.trim();if(!n)return[];if(n==="*")return[...t];let i=n.split(",").map(o=>o.trim()).filter(Boolean);return[...new Set(i)]}resolveLayers(e){let t=this.db.tables.layerTable,n=[],i=[];return e.forEach(o=>{let a=t.getAt(o);a?n.push(a):i.push(o)}),{layers:n,missing:i}}getLayerSummaries(){return[...this.db.tables.layerTable.newIterator()].map(e=>({name:e.name,current:this.db.clayer===e.name?"*":"",on:e.isOff?"No":"Yes",frozen:e.isFrozen?"Yes":"No",locked:Ze.isLayerLocked(e)?"Yes":"No",color:e.color.toString()}))}createLayers(e){return Sn(this.db,kn,()=>{let t=this.db.tables.layerTable,n=0,i=[];return e.forEach(o=>{if(t.has(o)){i.push(o);return}t.add(new aa({name:o,isOff:!1,isPlottable:!0,color:new je(Be.ByACI,7),linetype:"Continuous"})),n++}),{created:n,existed:i}})}setCurrentLayer(e){let t=this.db.tables.layerTable.getAt(e);return t?Sn(this.db,kn,()=>{let n=Ze.openLayerForWrite(this.db,t);return n?(n.isOff=!1,Ze.setLayerFrozenState(n,!1),this.db.clayer=n.name,!0):!1}):!1}makeLayer(e){return Sn(this.db,kn,()=>{let t=this.db.tables.layerTable,n=t.getAt(e);n||(n=new aa({name:e,isOff:!1,isPlottable:!0,color:new je(Be.ByACI,7),linetype:"Continuous"}),t.add(n));let i=Ze.openLayerForWrite(this.db,n);return i?(i.isOff=!1,Ze.setLayerFrozenState(i,!1),this.db.clayer=i.name,!0):!1})}setLayerOn(e,t,n={}){if(!e||!this.db.tables.layerTable.getAt(e))return!1;let i=n.switchCurrentLayer??!1;return Sn(this.db,kn,()=>{if(!t&&i&&!this.switchCurrentLayerIfNeeded(e))return!1;let o=Ze.openLayerForWrite(this.db,e);return o?(o.isOff=!t,Ze.syncLayerModifiedEvent(this.db,o,{isOff:o.isOff}),!0):!1})}setLayerFrozen(e,t,n={}){if(!e||!this.db.tables.layerTable.getAt(e))return!1;let i=n.switchCurrentLayer??!1;return Sn(this.db,kn,()=>{if(t&&i&&!this.switchCurrentLayerIfNeeded(e))return!1;let o=Ze.openLayerForWrite(this.db,e);return o?(Ze.setLayerFrozenState(o,t),Ze.syncLayerModifiedEvent(this.db,o,{standardFlags:o.standardFlags}),!0):!1})}setLayerLocked(e,t){return!e||!this.db.tables.layerTable.getAt(e)?!1:Sn(this.db,kn,()=>{let n=Ze.openLayerForWrite(this.db,e);return n?(Ze.setLayerLockedState(n,t),Ze.syncLayerModifiedEvent(this.db,n,{standardFlags:n.standardFlags}),!0):!1})}setLayerLineWeight(e,t){return this.db.tables.layerTable.getAt(e)?Sn(this.db,kn,()=>{let n=Ze.openLayerForWrite(this.db,e);return n?(n.lineWeight=t,!0):!1}):!1}setLayerPlottable(e,t){return this.db.tables.layerTable.getAt(e)?Sn(this.db,kn,()=>{let n=Ze.openLayerForWrite(this.db,e);return n?(n.isPlottable=t,!0):!1}):!1}setLayerLinetype(e,t){return!t||!this.db.tables.layerTable.getAt(e)?!1:Sn(this.db,kn,()=>{let n=Ze.openLayerForWrite(this.db,e);return n?(n.linetype=t,!0):!1})}setLayerTransparency(e,t){return this.db.tables.layerTable.getAt(e)?Sn(this.db,kn,()=>{let n=Ze.openLayerForWrite(this.db,e);return n?(n.transparency=t,!0):!1}):!1}isolateSingleLayer(e){return this.db.tables.layerTable.getAt(e)?Sn(this.db,kn,()=>{for(let t of this.db.tables.layerTable.newIterator()){let n=Ze.openLayerForWrite(this.db,t);if(!n)continue;let i=n.name===e;n.isOff=!i,i&&Ze.setLayerFrozenState(n,!1)}return this.db.clayer=e,!0}):!1}setLayersVisibility(e,t,n={}){let i=n.skipCurrentLayer??!0,{layers:o}=this.resolveLayers(e),a=[];return Sn(this.db,kn,()=>{o.forEach(s=>{if(t&&i&&s.name===this.db.clayer){a.push(s.name);return}let l=Ze.openLayerForWrite(this.db,s);l&&(l.isOff=t,Ze.syncLayerModifiedEvent(this.db,l,{isOff:l.isOff}))})}),{skippedCurrent:a}}setAllLayersOn(){return Sn(this.db,kn,()=>{let e=0;for(let t of this.db.tables.layerTable.newIterator()){if(!t.isOff)continue;let n=Ze.openLayerForWrite(this.db,t);n&&(n.isOff=!1,e++)}return e})}setAllLayersOffExceptCurrent(){return Sn(this.db,kn,()=>{let e=this.db.clayer,t=0;for(let n of this.db.tables.layerTable.newIterator()){if(n.name===e||n.isOff)continue;let i=Ze.openLayerForWrite(this.db,n);i&&(i.isOff=!0,t++)}return t})}setLayersFrozen(e,t,n={}){let i=n.skipCurrentLayer??!0,{layers:o}=this.resolveLayers(e),a=[];return Sn(this.db,kn,()=>{o.forEach(s=>{if(t&&i&&s.name===this.db.clayer){a.push(s.name);return}let l=Ze.openLayerForWrite(this.db,s);l&&(Ze.setLayerFrozenState(l,t),Ze.syncLayerModifiedEvent(this.db,l,{standardFlags:l.standardFlags}))})}),{skippedCurrent:a}}thawAllLayers(){return Sn(this.db,kn,()=>{let e=0;for(let t of this.db.tables.layerTable.newIterator()){if(!t.isFrozen)continue;let n=Ze.openLayerForWrite(this.db,t);n&&(Ze.setLayerFrozenState(n,!1),Ze.syncLayerModifiedEvent(this.db,n,{standardFlags:n.standardFlags}),e++)}return e})}setLayersLocked(e,t){let{layers:n}=this.resolveLayers(e);Sn(this.db,kn,()=>{n.forEach(i=>{let o=Ze.openLayerForWrite(this.db,i);o&&(Ze.setLayerLockedState(o,t),Ze.syncLayerModifiedEvent(this.db,o,{standardFlags:o.standardFlags}))})})}parseColorInput(e){let t=e.trim();if(!t)return;if(/^\d+$/.test(t)){let i=Number(t);return i>=1&&i<=255?new je(Be.ByACI,i):void 0}let n=je.fromString(t);if(n){if(n.isByACI){let i=n.colorIndex;if(i==null||i<1||i>255)return}if(!(n.isByLayer||n.isByBlock))return n}}setLayerColor(e,t){return this.db.tables.layerTable.getAt(e)?Sn(this.db,kn,()=>{let n=Ze.openLayerForWrite(this.db,e);return n?(n.color=t.clone(),!0):!1}):!1}setLayersColor(e,t){let{layers:n}=this.resolveLayers(e);Sn(this.db,kn,()=>{n.forEach(i=>{let o=Ze.openLayerForWrite(this.db,i);o&&(o.color=t.clone())})})}setLayerDescription(e,t){let n=this.db.tables.layerTable.getAt(e);return n?Sn(this.db,kn,()=>{let i=Ze.openLayerForWrite(this.db,n);return i?(i.description=t,!0):!1}):!1}switchCurrentLayerIfNeeded(e){if(this.db.clayer!==e)return!0;let t,n;for(let a of this.db.tables.layerTable.newIterator())if(a.name!==e&&(t??(t=a.name),!a.isOff&&!a.isFrozen)){n=a.name;break}let i=n??t;if(!i)return!1;let o=Ze.openLayerForWrite(this.db,i);return o?(o.isOff=!1,Ze.setLayerFrozenState(o,!1),this.db.clayer=o.name,!0):!1}getLayerNameFromEntity(e){var t;let n=this.db.tables.blockTable.getEntityById(e);return((t=n?.layer)==null?void 0:t.trim())||void 0}collectLayerNamesFromEntities(e){let t=new Set,n=new Set;return e.forEach(i=>{let o=this.getLayerNameFromEntity(i);if(!o)return;let a=this.db.tables.layerTable.getAt(o);a?t.add(a.name):n.add(o)}),{layerNames:[...t],missingLayerNames:[...n]}}freezeLayerByEntity(e){let t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};let n=this.db.tables.layerTable.getAt(t);if(!n)return{ok:!1,reason:"layer_not_found",layerName:t};if(n.name===this.db.clayer)return{ok:!1,reason:"cannot_change_current",layerName:t};if(n.isFrozen)return{ok:!1,reason:"already_frozen",layerName:t};let i=n.isFrozen;return Sn(this.db,kn,()=>{let o=Ze.openLayerForWrite(this.db,n);o&&Ze.setLayerFrozenState(o,!0)}),{ok:!0,layerName:t,previousFrozen:i}}setLayerFrozenByName(e,t){let n=this.db.tables.layerTable.getAt(e);return n?Sn(this.db,kn,()=>{let i=Ze.openLayerForWrite(this.db,n);return i?(Ze.setLayerFrozenState(i,t),!0):!1}):!1}turnOffLayerByEntity(e){let t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};let n=this.db.tables.layerTable.getAt(t);if(!n)return{ok:!1,reason:"layer_not_found",layerName:t};if(n.name===this.db.clayer)return{ok:!1,reason:"cannot_change_current",layerName:t};if(n.isOff)return{ok:!1,reason:"already_off",layerName:t};let i=n.isOff;return Sn(this.db,kn,()=>{let o=Ze.openLayerForWrite(this.db,n);o&&(o.isOff=!0)}),{ok:!0,layerName:t,previousOff:i}}setLayerOffByName(e,t){let n=this.db.tables.layerTable.getAt(e);return n?Sn(this.db,kn,()=>{let i=Ze.openLayerForWrite(this.db,n);return i?(i.isOff=t,!0):!1}):!1}lockLayerByEntity(e){let t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};let n=this.db.tables.layerTable.getAt(t);return n?Ze.isLayerLocked(n)?{ok:!1,reason:"already_locked",layerName:t}:(Sn(this.db,kn,()=>{let i=Ze.openLayerForWrite(this.db,n);i&&Ze.setLayerLockedState(i,!0)}),{ok:!0,layerName:t}):{ok:!1,reason:"layer_not_found",layerName:t}}unlockLayerByEntity(e){let t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};let n=this.db.tables.layerTable.getAt(t);return n?Ze.isLayerLocked(n)?(Sn(this.db,kn,()=>{let i=Ze.openLayerForWrite(this.db,n);i&&Ze.setLayerLockedState(i,!1)}),{ok:!0,layerName:t}):{ok:!1,reason:"already_unlocked",layerName:t}:{ok:!1,reason:"layer_not_found",layerName:t}}isolateLayers(e,t){if(e.length!==0)return Sn(this.db,kn,()=>{let n=this.db.tables.layerTable,i=new Set(e),o=n.getAt(e[0]),a=this.db.clayer,s=new Map;for(let h of n.newIterator())s.set(h.name,CJ(h));o&&(this.db.clayer=o.name);let l=new Set;for(let h of n.newIterator()){let d=Ze.openLayerForWrite(this.db,h);if(d){if(i.has(d.name)){d.isOff&&(d.isOff=!1,l.add(d.name)),d.isFrozen&&(Ze.setLayerFrozenState(d,!1),l.add(d.name)),Ze.isLayerLocked(d)&&(Ze.setLayerLockedState(d,!1),l.add(d.name));continue}if(t==="Off"){d.isOff||(d.isOff=!0,l.add(d.name));continue}Ze.isLayerLocked(d)||(Ze.setLayerLockedState(d,!0),l.add(d.name))}}let c=[];for(let h of n.newIterator()){let d=s.get(h.name);if(!d)continue;let p=CJ(h);jLe(d,p)||c.push({name:h.name,before:d,isolated:p})}let u={currentLayerBefore:a,currentLayerAfter:this.db.clayer,layers:c};return{layerNames:e,affectedLayerCount:l.size,isoSnapshot:u}})}unisolateFromSnapshot(e){return Sn(this.db,kn,()=>{let t=this.db.tables.layerTable,n=0;for(let i of e.layers)t.getAt(i.name)&&this.restoreLayerIfUnchanged(i)&&n++;return this.db.clayer===e.currentLayerAfter&&e.currentLayerBefore!==e.currentLayerAfter&&t.getAt(e.currentLayerBefore)&&(this.db.clayer=e.currentLayerBefore),n})}collectLayerEntities(e){let t=[];for(let n of this.db.tables.blockTable.newIterator())for(let i of n.newIterator())i.layer===e&&t.push({ownerId:n.objectId,objectId:i.objectId,entity:i.clone()});return t}removeLayerEntities(e){let t=new Map;e.forEach(({ownerId:n,objectId:i})=>{let o=t.get(n)??[];o.push(i),t.set(n,o)}),t.forEach((n,i)=>{var o;(o=this.db.tables.blockTable.getIdAt(i))==null||o.removeEntity(n)})}deleteLayer(e){let t=this.db.tables.layerTable.getAt(e);return t?t.name==="0"?{ok:!1,reason:"layer_0",layerName:e}:t.name===this.db.clayer?{ok:!1,reason:"current_layer",layerName:e}:Sn(this.db,kn,()=>{let n=this.collectLayerEntities(t.name);this.removeLayerEntities(n);let i=t.clone();return this.db.tables.layerTable.remove(t.name),this.db.events.layerErased.dispatch({database:this.db,layer:t}),{ok:!0,layerName:t.name,layer:i,entities:n}}):{ok:!1,reason:"not_found",layerName:e}}restoreDeletedLayer(e,t){Sn(this.db,kn,()=>{this.db.tables.layerTable.has(e.name)||this.db.tables.layerTable.add(e.clone());let n=new Map;t.forEach(({ownerId:i,entity:o})=>{let a=n.get(i)??[];a.push(o.clone()),n.set(i,a)}),n.forEach((i,o)=>{(this.db.tables.blockTable.getIdAt(o)??this.db.tables.blockTable.modelSpace).appendEntity(i)})})}restoreLayerIfUnchanged(e){let t=this.db.tables.layerTable.getAt(e.name);if(!t)return!1;let n=Ze.openLayerForWrite(this.db,t);if(!n)return!1;let i=!1;return n.isOff===e.isolated.isOff&&n.isOff!==e.before.isOff&&(n.isOff=e.before.isOff,i=!0),n.isFrozen===e.isolated.isFrozen&&n.isFrozen!==e.before.isFrozen&&(Ze.setLayerFrozenState(n,e.before.isFrozen),i=!0),Ze.isLayerLocked(n)===e.isolated.isLocked&&Ze.isLayerLocked(n)!==e.before.isLocked&&(Ze.setLayerLockedState(n,e.before.isLocked),i=!0),i}getEffectiveLayerTraits(e){return Ze.resolveLayerTraits(this.db,e)}static resolveLayerTraits(e,t){let n=e.tables.layerTable.getAt(t);if(n)return{layer:n.name,color:n.color.clone(),lineType:n.lineStyle,lineWeight:n.lineWeight,transparency:n.transparency}}};Hee.patchedChangeAppliers=new WeakSet;var Xi=Hee,HT=class{constructor(e,t,n){this.scene=e,this.renderer=t,this.getLayerTraits=n}layerStyleMayHaveChanged(e){return e.color!=null||e.linetype!=null||e.lineWeight!==void 0||e.transparency!=null}syncFromLiveRecord(e){let t=this.getEffectiveLayerTraits(e.name);if(!t)return;let n=this.renderer.updateLayerMaterial(e.name,t);this.scene.forEachSceneLayer(e.name,i=>i.syncAppearanceFromRecord(e.name,t,n,this.renderer))}refreshTextMaterialsInObjectTree(e,t){e.traverse(n=>{let i=n.refreshTextMaterials;typeof i=="function"&&i.call(n,t)})}getEffectiveLayerTraits(e){if(this.getLayerTraits)return this.getLayerTraits(e);let t=this.renderer.context.database;if(t)return Xi.resolveLayerTraits(t,e)}};function qF(r,e){var t;let n=1/0,i=1/0,o=-1/0,a=-1/0;for(let s of r)va(s)&&(n=Math.min(n,s.minX),i=Math.min(i,s.minY),o=Math.max(o,s.maxX),a=Math.max(a,s.maxY));return{minX:n,minY:i,maxX:o,maxY:a,id:e??((t=r[0])==null?void 0:t.id)??""}}function WT(r){return!(r.children!==void 0&&r.children.length===0)}function TJ(r){let e=new Map;return r.map(t=>{let n=t.id;if(typeof n!="string"||n.length===0)return t;let i=e.get(n)??0;return e.set(n,i+1),i===0?t:{...t,id:`${n}#${i}`}})}var GLe=40,ZF=class{constructor(){this.items=new Map,this.anonKeySeq=0}storageKey(e){return typeof e.id=="string"&&e.id.length>0?e.id:`__anon_${this.anonKeySeq++}`}insert(e){if(typeof e.id=="string"&&e.id.length>0){this.items.set(e.id,e);return}this.items.set(this.storageKey(e),e)}load(e){for(let t of e)this.insert(t)}remove(e){if(typeof e.id=="string"&&e.id.length>0){this.items.delete(e.id);return}for(let[t,n]of this.items)if(n===e||n.id===e.id&&n.minX===e.minX&&n.minY===e.minY&&n.maxX===e.maxX&&n.maxY===e.maxY){this.items.delete(t);return}}removeById(e){typeof e=="string"&&e.length>0&&this.items.delete(e)}getById(e){if(typeof e=="string"&&e.length>0)return this.items.get(e)}clear(){this.items.clear()}search(e,t){let n=[];for(let i of this.items.values())kJ(i,e)&&(t?.selectionMode==="window"&&!Tb(i,e)||n.push(i));return n}collides(e){for(let t of this.items.values())if(kJ(t,e))return!0;return!1}all(){return Array.from(this.items.values())}getStats(){let e=this.all(),t=e.length;return{kind:"linear",itemCount:t,estimatedBytes:Fee(e)+t*GLe}}};function kJ(r,e){return!(r.maxX<e.minX||r.minX>e.maxX||r.maxY<e.minY||r.minY>e.maxY)}function Wee(r,e,t=0,n=r.length-1,i=HLe){for(;n>t;){if(n-t>600){let l=n-t+1,c=e-t+1,u=Math.log(l),h=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*h*(l-h)/l)*(c-l/2<0?-1:1),p=Math.max(t,Math.floor(e-c*h/l+d)),f=Math.min(n,Math.floor(e+(l-c)*h/l+d));Wee(r,e,p,f,i)}let o=r[e],a=t,s=n;for(Q_(r,t,e),i(r[n],o)>0&&Q_(r,t,n);a<s;){for(Q_(r,a,s),a++,s--;i(r[a],o)<0;)a++;for(;i(r[s],o)>0;)s--}i(r[t],o)===0?Q_(r,t,s):(s++,Q_(r,s,n)),s<=e&&(t=s+1),e<=s&&(n=s-1)}}function Q_(r,e,t){let n=r[e];r[e]=r[t],r[t]=n}function HLe(r,e){return r<e?-1:r>e?1:0}var JF=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data,n=[];if(!iT(e,t))return n;let i=this.toBBox,o=[];for(;t;){for(let a=0;a<t.children.length;a++){let s=t.children[a],l=t.leaf?i(s):s;iT(e,l)&&(t.leaf?n.push(s):pF(e,l)?this._all(s,n):o.push(s))}t=o.pop()}return n}collides(e){let t=this.data;if(!iT(e,t))return!1;let n=[];for(;t;){for(let i=0;i<t.children.length;i++){let o=t.children[i],a=t.leaf?this.toBBox(o):o;if(iT(e,a)){if(t.leaf||pF(e,a))return!0;n.push(o)}}t=n.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let n=0;n<e.length;n++)this.insert(e[n]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){let n=this.data;this.data=t,t=n}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=wb([]),this}remove(e,t){if(!e)return this;let n=this.data,i=this.toBBox(e),o=[],a=[],s,l,c;for(;n||o.length;){if(n||(n=o.pop(),l=o[o.length-1],s=a.pop(),c=!0),n.leaf){let u=WLe(e,n.children,t);if(u!==-1)return n.children.splice(u,1),o.push(n),this._condense(o),this}!c&&!n.leaf&&pF(n,i)?(o.push(n),a.push(s),s=0,l=n,n=n.children[0]):l?(s++,n=l.children[s],c=!1):n=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){let n=[];for(;e;)e.leaf?t.push(...e.children):n.push(...e.children),e=n.pop();return t}_build(e,t,n,i){let o=n-t+1,a=this._maxEntries,s;if(o<=a)return s=wb(e.slice(t,n+1)),gb(s,this.toBBox),s;i||(i=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,i-1))),s=wb([]),s.leaf=!1,s.height=i;let l=Math.ceil(o/a),c=l*Math.ceil(Math.sqrt(a));IJ(e,t,n,c,this.compareMinX);for(let u=t;u<=n;u+=c){let h=Math.min(u+c-1,n);IJ(e,u,h,l,this.compareMinY);for(let d=u;d<=h;d+=l){let p=Math.min(d+l-1,h);s.children.push(this._build(e,d,p,i-1))}}return gb(s,this.toBBox),s}_chooseSubtree(e,t,n,i){for(;i.push(t),!(t.leaf||i.length-1===n);){let o=1/0,a=1/0,s;for(let l=0;l<t.children.length;l++){let c=t.children[l],u=dF(c),h=$Le(e,c)-u;h<a?(a=h,o=u<o?u:o,s=c):h===a&&u<o&&(o=u,s=c)}t=s||t.children[0]}return t}_insert(e,t,n){let i=n?e:this.toBBox(e),o=[],a=this._chooseSubtree(i,this.data,t,o);for(a.children.push(e),l1(a,i);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)}_split(e,t){let n=e[t],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);let a=this._chooseSplitIndex(n,o,i),s=wb(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,gb(n,this.toBBox),gb(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=wb([e,t]),this.data.height=e.height+1,this.data.leaf=!1,gb(this.data,this.toBBox)}_chooseSplitIndex(e,t,n){let i,o=1/0,a=1/0;for(let s=t;s<=n-t;s++){let l=s1(e,0,s,this.toBBox),c=s1(e,s,n,this.toBBox),u=KLe(l,c),h=dF(l)+dF(c);u<o?(o=u,i=s,a=h<a?h:a):u===o&&h<a&&(a=h,i=s)}return i||n-t}_chooseSplitAxis(e,t,n){let i=e.leaf?this.compareMinX:XLe,o=e.leaf?this.compareMinY:YLe,a=this._allDistMargin(e,t,n,i),s=this._allDistMargin(e,t,n,o);a<s&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);let o=this.toBBox,a=s1(e,0,t,o),s=s1(e,n-t,n,o),l=rT(a)+rT(s);for(let c=t;c<n-t;c++){let u=e.children[c];l1(a,e.leaf?o(u):u),l+=rT(a)}for(let c=n-t-1;c>=t;c--){let u=e.children[c];l1(s,e.leaf?o(u):u),l+=rT(s)}return l}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)l1(t[i],e)}_condense(e){for(let t=e.length-1,n;t>=0;t--)e[t].children.length===0?t>0?(n=e[t-1].children,n.splice(n.indexOf(e[t]),1)):this.clear():gb(e[t],this.toBBox)}};function WLe(r,e,t){if(!t)return e.indexOf(r);for(let n=0;n<e.length;n++)if(t(r,e[n]))return n;return-1}function gb(r,e){s1(r,0,r.children.length,e,r)}function s1(r,e,t,n,i){i||(i=wb(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=e;o<t;o++){let a=r.children[o];l1(i,r.leaf?n(a):a)}return i}function l1(r,e){return r.minX=Math.min(r.minX,e.minX),r.minY=Math.min(r.minY,e.minY),r.maxX=Math.max(r.maxX,e.maxX),r.maxY=Math.max(r.maxY,e.maxY),r}function XLe(r,e){return r.minX-e.minX}function YLe(r,e){return r.minY-e.minY}function dF(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function rT(r){return r.maxX-r.minX+(r.maxY-r.minY)}function $Le(r,e){return(Math.max(e.maxX,r.maxX)-Math.min(e.minX,r.minX))*(Math.max(e.maxY,r.maxY)-Math.min(e.minY,r.minY))}function KLe(r,e){let t=Math.max(r.minX,e.minX),n=Math.max(r.minY,e.minY),i=Math.min(r.maxX,e.maxX),o=Math.min(r.maxY,e.maxY);return Math.max(0,i-t)*Math.max(0,o-n)}function pF(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function iT(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function wb(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function IJ(r,e,t,n,i){let o=[e,t];for(;o.length;){if(t=o.pop(),e=o.pop(),t-e<=n)continue;let a=e+Math.ceil((t-e)/n/2)*n;Wee(r,a,e,t,i),o.push(e,a,a,t)}}var qLe=40,ZLe=1.4,XT=class{constructor(e){this.tree=new JF(e),this.idMap=new Map}insert(e){if(!va(e))return;let t=typeof e.id=="string"&&e.id.length>0;if(t){let n=this.idMap.get(e.id);if(n){if(n.minX===e.minX&&n.minY===e.minY&&n.maxX===e.maxX&&n.maxY===e.maxY)return;this.remove(n,(i,o)=>i.id===o.id),this.idMap.delete(e.id)}}this.tree.insert(e),t&&this.idMap.set(e.id,e)}load(e){let t=e.filter(va);this.tree.load(t);for(let n of t)typeof n.id=="string"&&n.id.length>0&&this.idMap.set(n.id,n)}remove(e,t){this.tree.remove(e,t??((n,i)=>n===i||n.id===i.id&&n.minX===i.minX&&n.minY===i.minY&&n.maxX===i.maxX&&n.maxY===i.maxY)),typeof e.id=="string"&&e.id.length>0&&this.idMap.delete(e.id)}removeById(e){typeof e=="string"&&e.length>0&&(this.tree.remove({minX:0,minY:0,maxX:0,maxY:0,id:e},(t,n)=>t.id===n.id),this.idMap.delete(e))}getById(e){if(typeof e=="string"&&e.length>0)return this.idMap.get(e)}clear(){this.tree.clear(),this.idMap.clear()}search(e,t){let n=this.tree.search(e);return t?.selectionMode!=="window"?n:n.filter(i=>Tb(i,e))}collides(e){return this.tree.collides(e)}all(){return this.tree.all()}getStats(){let e=this.tree.all(),t=e.length,n=Fee(e),i=this.idMap.size*qLe;return{kind:"rbush",itemCount:t,estimatedBytes:Math.round(n*ZLe+i)}}},Xee=class Yee{constructor(e){this.childIndexes=new Map,this.lazyChildren=new Map,this.rootIndex=e??new XT}setChildIndex(e,t){this.childIndexes.set(e,t)}removeChildIndex(e){this.childIndexes.delete(e)}insert(e){this.rootIndex.insert(e)}load(e){this.rootIndex.load(e)}remove(e,t){this.rootIndex.remove(e,t),this.childIndexes.delete(e.id),this.lazyChildren.delete(e.id)}removeById(e){this.rootIndex.removeById(e),this.childIndexes.delete(e),this.lazyChildren.delete(e)}clear(){this.rootIndex.clear(),this.childIndexes.forEach(e=>e.clear()),this.childIndexes.clear(),this.lazyChildren.clear()}search(e,t){let n=this.rootIndex.search(e),i=[];for(let o of n){this.materializeLazyChildren(o.id);let a=this.childIndexes.get(o.id);if(!a){(t?.selectionMode!=="window"||Tb(o,e))&&i.push(o);continue}let s=a.search(e),l={...o,children:s};(t?.selectionMode!=="window"||this.isWindowSelectionHit(l,e))&&i.push(l)}return i}isWindowSelectionHit(e,t){let n=this.childIndexes.get(e.id);if(!n)return Tb(e,t);let i=n.all().filter(va);return i.length===0?!1:i.every(o=>Tb(o,t))}collides(e){return this.rootIndex.collides(e)?this.rootIndex.search(e).some(t=>{this.materializeLazyChildren(t.id);let n=this.childIndexes.get(t.id);return n?n.collides(e):!0}):!1}all(){let e=[];for(let t of this.rootIndex.all()){let n=this.childIndexes.get(t.id);n?e.push(...n.all()):e.push(t)}return e}async allAsync(e){let t=[],n=0,i=this.rootIndex.all();for(let o=0;o<i.length;o++){let a=i[o],s=this.childIndexes.get(a.id);if(s){let l=s.all();for(let c=0;c<l.length;c++)t.push(l[c]),n++,e&&(n&2047)===2047&&await e.maybeYield()}else t.push(a),n++,e&&(n&2047)===2047&&await e.maybeYield()}return t}hasChildIndex(e){return this.childIndexes.has(e)||this.lazyChildren.has(e)}setLazyChildSource(e,t){this.lazyChildren.set(e,t)}getRootById(e){var t;let n=this.rootIndex;return(t=n.getById)==null?void 0:t.call(n,e)}getStats(){let e=this.rootIndex.getStats(),t=0,n=0,i=0,o=0;for(let s of this.childIndexes.values()){let l=s.getStats();t+=l.itemCount,n+=l.estimatedBytes,l.kind==="rbush"?i++:l.kind==="linear"&&o++}let a=this.childIndexes.size*64;return{kind:"hierarchical",itemCount:e.itemCount,estimatedBytes:e.estimatedBytes+n+a,rootItemCount:e.itemCount,childIndexCount:this.childIndexes.size,childItemCount:t,rbushChildCount:i,linearChildCount:o}}ensureChildIndex(e,t){let n=TJ(t.filter(va)).map(s=>({...s}));if(n.length===0)return;let i=qF(n,e);va(i)&&this.insert(i);let o=this.childIndexes.get(e);if(o)return o.clear(),o.load(n),o;let a=this.createIndexBySize(n.length);if(a)return a.load(n),this.setChildIndex(e,a),a}createChildIndex(e){return this.ensureChildIndex(e.objectId,e.wcsChildBoxes)}materializeLazyChildren(e){if(this.childIndexes.has(e))return;let t=this.lazyChildren.get(e);if(!t)return;this.lazyChildren.delete(e);let n=[];for(let a=0;a<t.boxes.length;a++){let s=t.boxes[a];!s||!va(s)||n.push(QLe(s,t.matrix))}let i=TJ(n);if(i.length===0)return;let o=this.createIndexBySize(i.length);o&&(o.load(i),this.setChildIndex(e,o))}createIndexBySize(e){if(e>Yee.THRESHOLD)return new XT;if(e>0)return new ZF}};Xee.THRESHOLD=100;var JLe=Xee;function QLe(r,e){let t=e.elements,n=1/0,i=1/0,o=-1/0,a=-1/0,s=[r.minX,r.maxX],l=[r.minY,r.maxY];for(let c=0;c<2;c++)for(let u=0;u<2;u++){let h=s[c],d=l[u],p=t[0]*h+t[4]*d+t[12],f=t[1]*h+t[5]*d+t[13];n=Math.min(n,p),i=Math.min(i,f),o=Math.max(o,p),a=Math.max(a,f)}return{minX:n,minY:i,maxX:o,maxY:a,id:r.id}}var O1=class r{static isLayerVisible(e){return!(e.isFrozen||e.isOff)}constructor(e){this._group=new hZ,this._name=e.name,this._group.name=e.name,this._cachedBox=new Ne,this._boxDirty=!0,this._group.visible=r.isLayerVisible(e)}get name(){return this._name}set name(e){this._name=e,this._group.name=e}get box(){return this._boxDirty&&(this.computeBatchBoundingBox(this._cachedBox),this._boxDirty=!1),this._cachedBox}computeBatchBoundingBox(e=new Ne,t,n){return this.visible?this._group.computeBoundingBox(e,{excludeObjectIds:t,includeObjectIds:n}):(e.makeEmpty(),e)}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get internalObject(){return this._group}get stats(){let e=this._group.stats;return{name:this._name,...e}}get entityCount(){return this._group.entityCount}update(e){let t=this.visible;this.name=e.name,this._group.visible=r.isLayerVisible(e),t!==this.visible&&(this._boxDirty=!0)}updateMaterial(e,t){this._group.updateMaterial(e,t)}syncAppearanceFromRecord(e,t,n,i){let o=Object.entries(n).some(([a,s])=>s.id!==Number(a));for(let a in n){let s=Number(a),l=n[a];this.updateMaterial(s,l)}this._group.syncAppearanceFromRecord(e,t,n,o,(a,s,l)=>i.getLayerBoundMaterial(a,s,l),i.styleManager)}rebindMaterialsForLayer(e,t,n,i){this._group.rebindMaterialsForLayer(e,t,n,i)}rematerializeLayerTextDrawables(e,t,n){this._group.rematerializeLayerTextDrawables(e,t,n)}rerenderPoints(e,t=0){this._group.rerenderPoints(e,t)}collectPointObjectWorldBoxes(e=new Map){return this._group.collectPointObjectWorldBoxes(e)}repaintForegroundMaterials(e){this._group.repaintForegroundMaterials(e)}repaintBackgroundMaterials(e){this._group.repaintBackgroundMaterials(e)}hasEntity(e){return this._group.hasEntity(e)}setEntityVisible(e,t){return this._group.setEntityVisible(e,t)}getEntityVisible(e){return this._group.getEntityVisible(e)}createPreviewSubset(e,t){return this._group.createPreviewSubset(e,t)}addEntity(e,t=!0){this._group.addEntity(e),this._boxDirty=!0}addDirectEntity(e){let t={objectId:e.objectId,visible:e.visible,position:e.position},n=!1;return e.kind==="lineFat"?n=this._group.appendLine2Geometry(e.geometry,e.material,e.worldOffset,t):e.kind==="lineBasic"?n=this._group.appendLineGeometry(e.geometry,e.material,e.worldOffset,t):e.kind==="point"?n=this._group.appendPointGeometry(e.geometry,e.material,e.worldOffset,t):e.kind==="mesh"&&(n=this._group.appendMeshGeometry(e.geometry,e.material,e.worldOffset,t)),n&&(this._boxDirty=!0),n}isIntersectWith(e,t){return this._group.isIntersectWith(e,t)}removeEntity(e){let t=this._group.removeEntity(e);return t&&(this._boxDirty=!0),t}updateEntity(e){return e.objectId?this._group.removeEntity(e.objectId)?(this._group.addEntity(e),this._boxDirty=!0,!0):e.visible?(this._group.addEntity(e),this._boxDirty=!0,!0):!1:!1}clear(){this._group.clear(),this._cachedBox.makeEmpty(),this._boxDirty=!0,this._group.removeFromParent()}hover(e){if(e.length!==0){if(e.length===1){this._group.hover(e[0]);return}this._group.hoverMany(e)}}unhover(e){if(e.length!==0){if(e.length===1){this._group.unhover(e[0]);return}this._group.unhoverMany(e)}}select(e){if(e.length!==0){if(e.length===1){this._group.select(e[0]);return}this._group.selectMany(e)}}unselect(e){if(e.length!==0){if(e.length===1){this._group.unselect(e[0]);return}this._group.unselectMany(e)}}setCompareDisplay(e){this._group.setCompareDisplay(e)}},YT=class{constructor(){this._smartExtentsGeneration=0,this.skipSpatialIndex=!1,this.isReference=!1,this._group=new Zn,this._spatialIndex=new JLe,this._cachedBox=new Ne,this._cachedSmartExtents=void 0,this._boxDirty=!0,this._extentExcludedObjectIds=new Set,this._layers=new Map,this._insertLayerByObjectId=new Map,this._isLoaded=!1}get internalObject(){return this._group}get layers(){return this._layers}get box(){return this._boxDirty&&this.recomputeBox(),this._cachedBox}computeBatchBoundingBox(e=new Ne){return this._boxDirty&&this.recomputeBox(),e.copy(this._cachedBox)}recomputeBox(){this._cachedBox.makeEmpty();let e=new Ne;this._layers.forEach(t=>{t.computeBatchBoundingBox(e,this._extentExcludedObjectIds),e.isEmpty()||this._cachedBox.union(e)}),this._boxDirty=!1}invalidateBox(){this._boxDirty=!0,this.clearSmartExtentsCache()}clearSmartExtentsCache(){this._cachedSmartExtents=void 0,this._smartExtentsGeneration++}get isLoaded(){return this._isLoaded}set isLoaded(e){this._isLoaded=e}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get entityCount(){let e=0;return this._layers.forEach(t=>e+=t.entityCount),e}get spatialIndexStats(){return this._spatialIndex.getStats()}get stats(){let e=[],t=0,n=0,i=0,o=0,a=0,s=0,l=0,c={line:0,mesh:0,point:0,other:0};return this._layers.forEach(u=>{let h=u.stats;e.push(h),i+=h.line.indexed.geometrySize+h.line.nonIndexed.geometrySize,o+=h.mesh.indexed.geometrySize+h.mesh.nonIndexed.geometrySize,a+=h.point.indexed.geometrySize+h.point.nonIndexed.geometrySize,s+=h.unbatched.geometrySize,l+=h.unbatched.count,c.line+=h.unbatched.byType.line,c.mesh+=h.unbatched.byType.mesh,c.point+=h.unbatched.byType.point,c.other+=h.unbatched.byType.other,t+=h.summary.totalGeometrySize,n+=h.summary.totalMappingSize}),{layers:e,summary:{entityCount:this.entityCount,totalSize:{line:i,mesh:o,point:a,unbatched:s,geometry:t,mapping:n,unbatchedCount:l,unbatchedByType:c}}}}clear(){return this._layers.forEach(e=>{e.clear()}),this._layers.clear(),this._cachedBox.makeEmpty(),this.clearSmartExtentsCache(),this._boxDirty=!0,this._extentExcludedObjectIds.clear(),this._insertLayerByObjectId.clear(),this._spatialIndex.clear(),this}rerenderPoints(e,t=0){this._layers.forEach(n=>{n.rerenderPoints(e,t)}),this.refreshPointSpatialIndexes()}refreshPointSpatialIndexes(){let e=new Map;this._layers.forEach(t=>{t.collectPointObjectWorldBoxes(e)}),e.forEach((t,n)=>{if(this._spatialIndex.hasChildIndex(n)){let i=this._spatialIndex.getRootById(n);if(i){this._spatialIndex.insert({id:n,minX:Math.min(i.minX,t.min.x),minY:Math.min(i.minY,t.min.y),maxX:Math.max(i.maxX,t.max.x),maxY:Math.max(i.maxY,t.max.y)});return}}this.registerSpatialIndexBox(n,t)}),this.clearSmartExtentsCache()}repaintForegroundMaterials(e){this._layers.forEach(t=>t.repaintForegroundMaterials(e))}repaintBackgroundMaterials(e){this._layers.forEach(t=>t.repaintBackgroundMaterials(e))}isIntersectWith(e,t){let n=this.getLayersByObjectId(e);for(let i=0;i<n.length;++i){let o=n[i];if(o&&o.isIntersectWith(e,t))return!0}return!1}hasVisibleEntity(e){return this.getLayersByObjectId(e).some(t=>t.visible)}addEntity(e,t=!0){if(!e.objectId)throw new Error("Object id is required to add one entity!");if(!e.layerName)throw new Error("Layer name is required to add one entity!");let n=this._layers.get(e.layerName);if(!n)throw new Error(`layer '${e.layerName}' doesn't exist!`);n.addEntity(e);let i=e.userData.insertLayerName;return i&&this._insertLayerByObjectId.set(e.objectId,i),t?this._extentExcludedObjectIds.delete(e.objectId):this._extentExcludedObjectIds.add(e.objectId),this.invalidateBox(),this.registerEntitySpatialIndex(e),this}addDirectEntity(e,t=!0){if(!e.objectId)throw new Error("Object id is required to add one entity!");if(!e.layerName)throw new Error("Layer name is required to add one entity!");let n=this._layers.get(e.layerName);if(!n)throw new Error(`layer '${e.layerName}' doesn't exist!`);return n.addDirectEntity(e)?(t?this._extentExcludedObjectIds.delete(e.objectId):this._extentExcludedObjectIds.add(e.objectId),this.invalidateBox(),this.registerSpatialIndexBox(e.objectId,e.wcsBbox),!0):!1}removeEntity(e){let t=!1;for(let[n,i]of this._layers)i.removeEntity(e)&&(t=!0);return t&&(this._spatialIndex.removeById(e),this._extentExcludedObjectIds.delete(e),this._insertLayerByObjectId.delete(e),this.invalidateBox()),t}updateEntity(e){for(let[t,n]of this._layers)if(n.updateEntity(e)){let i=e.userData.insertLayerName;return i&&this._insertLayerByObjectId.set(e.objectId,i),this._spatialIndex.removeById(e.objectId),this.registerEntitySpatialIndex(e),this.invalidateBox(),!0}return!1}hasEntity(e){for(let[t,n]of this._layers)if(n.hasEntity(e))return!0;return!1}setEntityVisible(e,t){let n=!1;for(let[i,o]of this._layers)o.setEntityVisible(e,t)&&(n=!0);return n&&this.invalidateBox(),n}getEntityVisible(e){for(let[t,n]of this._layers){let i=n.getEntityVisible(e);if(i!==void 0)return i}}canCreateEntityPreview(e,t){if(e.length===0)return!1;if(t?.requireAllEntities??!0){for(let n of e){if(!this.hasEntity(n))return!1;let i=new Ne;if(this.computeEntityPreviewBoundsBox([n],i),i.isEmpty())return!1}return!0}return!this.computeEntityPreviewBoundsBox(e).isEmpty()}findPreviewableEntityIds(e){let t=[];for(let n of e){if(!this.hasEntity(n))continue;let i=new Ne;this.computeEntityPreviewBoundsBox([n],i),i.isEmpty()||t.push(n)}return t}computeEntityPreviewBoundsBox(e,t=new Ne){if(t.makeEmpty(),e.length===0)return t;let n=new Set(e),i=new Ne;for(let o of this._layers.values())o.computeBatchBoundingBox(i,void 0,n),i.isEmpty()||t.union(i);return t}computeEntityPreviewBounds2d(e,t=1.1){let n=this.computeEntityPreviewBoundsBox(e);return $f.box3ToBounds2d(n,t)}createEntityPreviewRoot(e,t){let n=t?.missingEntity??"fail",i=t?.requireAllEntities??!1;if(i){for(let s of e)if(!this.hasEntity(s))return null}let o=new Map;for(let s of e){let l=this.getLayersByObjectId(s);if(l.length===0){if(i||n==="fail")return null;continue}for(let c of l){let u=o.get(c);u||(u=new Set,o.set(c,u)),u.add(s)}}if(o.size===0)return null;let a=new Zn;a.name="EntityPreviewRoot";for(let[s,l]of o){let c=[...l],u=s.createPreviewSubset(c,{maxSlots:Math.max(1e4,c.length*8),missingEntity:n});if(!u||u.children.length===0){if(n==="fail")return hb(a),null;continue}a.add(u)}return a.children.length===0?null:a}getLayer(e){return this._layers.get(e)}addLayer(e){let t=e.name,n=this._layers.get(t);return n===void 0&&(n=new O1(e),this._layers.set(t,n),this._group.add(n.internalObject),this._compareDisplayOptions&&n.setCompareDisplay(this._compareDisplayOptions)),n}updateLayer(e){let t=this._layers.get(e.name);if(t){let n=t.visible;t.update(e),n!==t.visible&&this.invalidateBox()}return t}applyInsertLayerFreeze(e,t){let n=[];for(let[i,o]of this._insertLayerByObjectId){if(o!==e)continue;let a=!1;for(let s of this.getLayersByObjectId(i))s.name!==e&&s.setEntityVisible(i,!t)&&(a=!0);a&&n.push(i)}return n.length>0&&this.invalidateBox(),n}hover(e){this.applyHighlightToLayers(e,(t,n)=>t.hover(n))}unhover(e){this.applyHighlightToLayers(e,(t,n)=>t.unhover(n))}select(e){this.applyHighlightToLayers(e,(t,n)=>t.select(n))}unselect(e){this.applyHighlightToLayers(e,(t,n)=>t.unselect(n))}setCompareDisplay(e){this._compareDisplayOptions=e,this._layers.forEach(t=>t.setCompareDisplay(e))}applyHighlightToLayers(e,t){let n=new Map;for(let i of e){let o=this.getLayersByObjectId(i);for(let a of o){let s=n.get(a);s?s.push(i):n.set(a,[i])}}n.forEach((i,o)=>t(o,i))}search(e,t){return this._spatialIndex.search({minX:e.min.x,minY:e.min.y,maxX:e.max.x,maxY:e.max.y},t)}collectSpatialExtentBoxes(){return this._spatialIndex.all().filter(va)}async collectSpatialExtentBoxesAsync(e){let t=await this._spatialIndex.allAsync(e),n=[];for(let i=0;i<t.length;i++){let o=t[i];va(o)&&n.push(o),(i&2047)===2047&&await e.maybeYield()}return n}get cachedSmartExtents(){return this._cachedSmartExtents}get smartExtentsGeneration(){return this._smartExtentsGeneration}set cachedSmartExtents(e){this._cachedSmartExtents=e}getLayersByObjectId(e){let t=[];for(let[n,i]of this._layers)i.hasEntity(e)&&t.push(i);return t}getSpatialIndexChildBoxes(e){let t=e.userData.spatialIndexChildBoxes;if(!(!t||t.length===0))return t}registerEntitySpatialIndex(e){if(this.skipSpatialIndex)return;let t=e.userData.lazySpatialChildren;if(t&&t.boxes.length>0){let o={minX:e.wcsBbox.min.x,minY:e.wcsBbox.min.y,maxX:e.wcsBbox.max.x,maxY:e.wcsBbox.max.y,id:e.objectId};va(o)&&this._spatialIndex.insert(o),this._spatialIndex.setLazyChildSource(e.objectId,t);return}let n=this.getSpatialIndexChildBoxes(e),i;if(n&&n.length>0){let o=qF(n);i={minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:e.objectId}}else if(e instanceof Ko&&e.wcsChildBoxes.length>0){let o=qF(e.wcsChildBoxes.map(a=>({minX:a.minX,minY:a.minY,maxX:a.maxX,maxY:a.maxY,id:a.id})));i={minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:e.objectId}}else i={minX:e.wcsBbox.min.x,minY:e.wcsBbox.min.y,maxX:e.wcsBbox.max.x,maxY:e.wcsBbox.max.y,id:e.objectId};va(i)&&(this._spatialIndex.insert({minX:i.minX,minY:i.minY,maxX:i.maxX,maxY:i.maxY,id:e.objectId}),n&&n.length>0&&(e.wcsBbox.min.set(i.minX,i.minY,e.wcsBbox.min.z),e.wcsBbox.max.set(i.maxX,i.maxY,e.wcsBbox.max.z))),n?this._spatialIndex.ensureChildIndex(e.objectId,n):e instanceof Ko&&this._spatialIndex.createChildIndex(e)}registerSpatialIndexBox(e,t){if(this.skipSpatialIndex)return;let n={minX:t.min.x,minY:t.min.y,maxX:t.max.x,maxY:t.max.y,id:e};va(n)&&this._spatialIndex.insert(n)}},QF=class{constructor(){this._skipSpatialIndex=!1,this._scene=new Yh,this._transientManager=new G_(this._scene),this._htmlTransientManager=new V_(this._scene),this._previewOverlayManager=new H_(this._scene),this._layers=new Map,this._layouts=new Map,this._activeLayoutBtrId="",this._modelSpaceBtrId=""}get skipSpatialIndex(){return this._skipSpatialIndex}set skipSpatialIndex(e){this._skipSpatialIndex=e;for(let t of this._layouts.values())t.skipSpatialIndex=e}get htmlTransientManager(){return this._htmlTransientManager}get layers(){return this._layers}get layouts(){return this._layouts}get box(){let e=this.activeLayout;if(!e)return;let t=e.box;return t.isEmpty()?void 0:t}get internalScene(){return this._scene}get modelSpaceBtrId(){return this._modelSpaceBtrId}set modelSpaceBtrId(e){if(this._modelSpaceBtrId=e,!this._layouts.has(e))throw new Error(`[AcTrScene] No layout assiciated with the specified block table record id '${e}'!`)}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layouts.forEach((t,n)=>{t.visible=e==n})}get activeLayout(){if(this._activeLayoutBtrId&&this._layouts.has(this._activeLayoutBtrId))return this._layouts.get(this._activeLayoutBtrId)}get modelSpaceLayout(){if(this._modelSpaceBtrId&&this._layouts.has(this._modelSpaceBtrId))return this._layouts.get(this._modelSpaceBtrId)}get stats(){let e=[],t=0,n=0,i=0,o=0,a=0,s=0,l=0,c=0,u={line:0,mesh:0,point:0,other:0};return this._layouts.forEach(h=>e.push(h.stats)),e.forEach(h=>{t+=h.summary.entityCount,n+=h.summary.totalSize.line,i+=h.summary.totalSize.mesh,o+=h.summary.totalSize.point,a+=h.summary.totalSize.unbatched,s+=h.summary.totalSize.geometry,l+=h.summary.totalSize.mapping,c+=h.summary.totalSize.unbatchedCount,u.line+=h.summary.totalSize.unbatchedByType.line,u.mesh+=h.summary.totalSize.unbatchedByType.mesh,u.point+=h.summary.totalSize.unbatchedByType.point,u.other+=h.summary.totalSize.unbatchedByType.other}),{layouts:e,summary:{layoutCount:e.length,entityCount:t,totalSize:{line:n,mesh:i,point:o,unbatched:a,geometry:s,mapping:l,unbatchedCount:c,unbatchedByType:u}}}}addEmptyLayout(e){let t=this._layouts.get(e);if(t)return t;let n=new YT;return n.skipSpatialIndex=this._skipSpatialIndex,this._layouts.set(e,n),this._scene.add(n.internalObject),n.visible=e==this._activeLayoutBtrId,this._layers.forEach(i=>{n.addLayer(i)}),n}clear(){return this._layouts.forEach(e=>{this._scene.remove(e.internalObject),e.clear()}),this._layouts.clear(),this._layers.clear(),this._transientManager.clear(),this._htmlTransientManager.clear(),this._previewOverlayManager.clear(),this._scene.clear(),this._transientManager=new G_(this._scene),this._htmlTransientManager=new V_(this._scene),this._previewOverlayManager=new H_(this._scene),this}hover(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.hover(e)),!0)}unhover(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.unhover(e)),!0)}select(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.select(e)),!0)}unselect(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.unselect(e)),!0)}setCompareDisplay(e){this._layouts.forEach(t=>{t.isReference||t.setCompareDisplay(e)})}search(e,t){let n=this.activeLayout;return n?n.search(e,t):[]}addLayer(e){let t=[];return this._layers.set(e.name,e),this._layouts.forEach(n=>{let i=n.addLayer(e);i&&t.push(i)}),t}updateLayer(e){let t=this._layers.get(e.name),n=t?.isFrozen??!1,i=[];this._layers.set(e.name,e);let o=new Set;return this._layouts.forEach(a=>{let s=a.updateLayer(e);if(s&&i.push(s),e.isFrozen&&!n)for(let l of a.applyInsertLayerFreeze(e.name,!0))o.add(l);else if(!e.isFrozen&&n)for(let l of a.applyInsertLayerFreeze(e.name,!1))o.add(l)}),{updatedLayers:i,touchedObjectIds:o}}forEachSceneLayer(e,t){this._layouts.forEach(n=>{let i=n.getLayer(e);i&&t(i,n)})}repaintForegroundMaterials(e){this._layouts.forEach(t=>t.repaintForegroundMaterials(e))}repaintBackgroundMaterials(e){this._layouts.forEach(t=>t.repaintBackgroundMaterials(e))}addTransientEntity(e){this._transientManager.update(e)}removeTransientEntity(e){this._transientManager.remove(e)}setTransientEntityVisible(e,t){let n=this._transientManager.get(e);return!n||n.visible===t?!1:(n.visible=t,!0)}updateTransientPreviewTransforms(e){let t=e.map(n=>({id:n.objectId,matrix:n.matrix}));return{webgl:this._transientManager.applyTransforms(t),html:this._htmlTransientManager.applyTransforms(t)}}canCreatePreview(e){let t=this.activeLayout;return t?t.canCreateEntityPreview(e,{requireAllEntities:!0}):!1}computeEntityPreviewBounds2d(e,t=1.1,n="active-first"){let i=this.computeEntityPreviewBoundsBox(e,n);return $f.box3ToBounds2d(i,t)}findPreviewableEntityIds(e,t="active-first"){if(e.length===0)return[];if(t==="all"){let n=[],i=new Set(e);for(let o of this.getOrderedLayouts("all")){if(i.size===0)break;let a=o.findPreviewableEntityIds([...i]);if(a.length!==0){n.push(...a);for(let s of a)i.delete(s)}}return n}for(let n of this.getOrderedLayouts("active-first")){let i=n.findPreviewableEntityIds(e);if(i.length>0)return i}return[]}createEntityPreviewRoot(e,t){if(e.length===0)return null;let n=t?.scope??"active-first",i={missingEntity:"skip",...t?.layoutOptions};if(n==="all")return this.mergeEntityPreviewRoots(e,this.getOrderedLayouts("all"),i);for(let o of this.getOrderedLayouts("active-first")){let a=o.createEntityPreviewRoot(e,i);if(a)return a}return null}mergeEntityPreviewRoots(e,t,n){let i=new Set(e),o=new Zn;o.name="EntityPreviewRoot";for(let a of t){if(i.size===0)break;let s=a.findPreviewableEntityIds([...i]);if(s.length===0)continue;let l=a.createEntityPreviewRoot(s,n);if(l){o.add(l);for(let c of s)i.delete(c)}}return o.children.length>0?o:null}getOrderedLayouts(e){if(e==="all")return[...this._layouts.values()];let t=[],n=this.activeLayout,i=this.modelSpaceLayout;n&&t.push(n),i&&i!==n&&t.push(i);for(let o of this._layouts.values())o!==n&&o!==i&&t.push(o);return t}computeEntityPreviewBoundsBox(e,t="active-first"){let n=new Ne,i=new Ne;if(t==="all"){let o=new Set(e);for(let a of this.getOrderedLayouts("all")){if(o.size===0)break;let s=a.findPreviewableEntityIds([...o]);if(s.length!==0){a.computeEntityPreviewBoundsBox(s,i),i.isEmpty()||n.union(i);for(let l of s)o.delete(l)}}return n}for(let o of this.getOrderedLayouts("active-first"))if(o.computeEntityPreviewBoundsBox(e,i),!i.isEmpty())return n.copy(i),n;return n.makeEmpty(),n}createPreview(e){let t=this.activeLayout;if(!t)return null;let n=t.createEntityPreviewRoot(e,{missingEntity:"fail",requireAllEntities:!0});return n?this._previewOverlayManager.add(n).id:null}updatePreview(e,t){return this._previewOverlayManager.update(e,t)}removePreview(e){return this._previewOverlayManager.remove(e)}addEntity(e,t=!0){let n=e.ownerId;if(n){let i=this._layouts.get(n);i||(i=this.addEmptyLayout(n)),i.addEntity(e,t)}else kt.warn("[AcTrSecene] The owner id of one entity cannot be empty!");return this}addDirectEntity(e,t=!0){let n=e.ownerId;if(!n)return kt.warn("[AcTrSecene] The owner id of one entity cannot be empty!"),!1;let i=this._layouts.get(n);return i||(i=this.addEmptyLayout(n)),i.addDirectEntity(e,t)}removeEntity(e){for(let[t,n]of this._layouts)if(n.removeEntity(e))return!0;return!1}updateEntity(e){for(let[t,n]of this._layouts)if(n.updateEntity(e))return!0;return!1}hasEntity(e){for(let[t,n]of this._layouts)if(n.hasEntity(e))return!0;return!1}setEntityVisible(e,t){let n=!1;for(let[i,o]of this._layouts)o.setEntityVisible(e,t)&&(n=!0);return n}getEntityVisible(e){for(let[t,n]of this._layouts){let i=n.getEntityVisible(e);if(i!==void 0)return i}}},eN=null;function eOe(r){eN=r}function oT(){if(!eN)throw new Error("[AcApCommandServices] Not bound. Create AcApDocManager before running commands.");return eN}var at=(r=>(r[r.Read=0]="Read",r[r.Review=4]="Review",r[r.Write=8]="Write",r))(at||{}),kb=class extends Error{constructor(){super("session-accessory-mount-skipped"),this.name="AcEdSessionAccessoryMountSkippedError"}},xt=class{constructor(){this._mode=at.Read,this.recordsUndoStack=!0,this.sessionAccessory=null,this._globalName="",this._localName="",this._userData={}}get userData(){return this._userData}get globalName(){return this._globalName}set globalName(e){this._globalName=e}get localName(){return this._localName}set localName(e){this._localName=e}get mode(){return this._mode}set mode(e){this._mode=e}onCommandWillStart(e){}onCommandEnded(e){}async trigger(e){let t=e.doc.database.transactionManager,n=this.shouldRecordUndoStack(e),i=!1,o=!1,a=this.sessionAccessory;n&&(t.startUndoMark(this.globalName||this.localName),t.startTransaction(),i=!0);try{if(this.onCommandWillStart(e),e.view.editor.events.commandWillStart.dispatch({command:this}),a)try{let s=e.view.sessionAccessoryHost,l={host:s.host,type:s.type,view:e.view},c={command:this,accessory:a,options:l,source:"command"};e.view.editor.events.beforeMountSessionAccessory.dispatch(c),a.mount(l),e.view.editor.events.afterMountSessionAccessory.dispatch(c),o=!0}catch(s){s instanceof kb}await this.execute(e)}catch(s){throw i&&t.hasTransaction()&&t.abortTransaction(),i&&(t.cancelUndoMark(),i=!1),s}finally{if(o&&a)try{let s={command:this,accessory:a,source:"command"};e.view.editor.events.beforeUnmountSessionAccessory.dispatch(s),a.unmount(),e.view.editor.events.afterUnmountSessionAccessory.dispatch(s)}catch{}i&&t.hasTransaction()&&(t.commitTransaction(),t.endUndoMark(),i=!1,Gt.emit("session-db-edit-committed",{}),um()),e.view.editor.events.commandEnded.dispatch({command:this}),this.onCommandEnded(e)}}shouldRecordUndoStack(e){return this.recordsUndoStack?e.doc.openMode>=at.Review&&this.mode>=at.Review:!1}async execute(e){}showMessage(e,t="info",n){oT().showMessage(e,t,n)}notify(e,t="info"){Gt.emit("message",{message:e,type:t})}showBusyIndicator(e){oT().showBusyIndicator(e)}hideBusyIndicator(){oT().hideBusyIndicator()}async withBusyIndicator(e,t){return oT().withBusyIndicator(e,t)}},tN=class{constructor(e){this._index=0,this._commands=[],e.forEach(t=>{let n=t.groupName;t.commandsByGlobalName.forEach(i=>{this._commands.push({command:i,commandGroup:n})})})}[Symbol.iterator](){return this}get command(){return this._index<this._commands.length?this._commands[this._index].command:null}get commandGroup(){return this._index<this._commands.length?this._commands[this._index].commandGroup:null}next(){for(;this._index<this._commands.length;){let e=this._commands[this._index];return this._index+=1,{value:e,done:!1}}return{value:null,done:!0}}},nN=class rN{constructor(){this._activeCommand=null,this._activeView=null,this._activePromise=null,this._commandsByGroup=[],this._systemCommandGroup={groupName:rN.SYSTEMT_COMMAND_GROUP_NAME,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._defaultCommandGroup={groupName:rN.DEFAUT_COMMAND_GROUP_NAME,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._commandsByGroup.push(this._systemCommandGroup),this._commandsByGroup.push(this._defaultCommandGroup)}addCommand(e,t,n,i,o){if(e=e.toUpperCase(),t=t.toUpperCase(),n=n.toUpperCase(),!t)throw new Error("[AcEdCommandStack] The global name of the command is required!");n||(n=t);let a=this._defaultCommandGroup;if(e){let l=this._commandsByGroup.find(c=>c.groupName==e);l?a=l:(a={groupName:e,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._commandsByGroup.push(a))}if(a.commandsByGlobalName.has(t))throw new Error(`[AcEdCommandStack] The command with global name '${t}' already exists!`);if(a.commandsByLocalName.has(n))throw new Error(`[AcEdCommandStack] The command with local name '${n}' already exists!`);let s=this.normalizeAliases(o,t,n);for(let l of s){if(a.commandsByAlias.has(l))throw new Error(`[AcEdCommandStack] The command alias '${l}' already exists!`);if(a.commandsByGlobalName.has(l)||a.commandsByLocalName.has(l))throw new Error(`[AcEdCommandStack] The command alias '${l}' conflicts with existing command name!`)}a.commandsByGlobalName.set(t,i),a.commandsByLocalName.set(n,i),s.forEach(l=>{a.commandsByAlias.set(l,i)}),a.aliasesByCommand.set(i,new Set(s)),i.globalName=t,i.localName=n}iterator(){return new tN(this._commandsByGroup)}searchCommandsByPrefix(e,t){e=e.toUpperCase();let n=[],i=this.iterator(),o=i.next();for(;!o.done;){let{command:a}=o.value;(a.globalName.startsWith(e)||a.localName.startsWith(e)||this.commandAliasStartsWith(o.value.commandGroup,a,e))&&(t===void 0||this.isModeCompatible(t,a.mode))&&n.push(o.value),o=i.next()}return n}lookupGlobalCmd(e,t){e=e.toUpperCase();let n;for(let i of this._commandsByGroup)if(n=i.commandsByGlobalName.get(e),n||(n=i.commandsByAlias.get(e)),n){if(t===void 0||this.isModeCompatible(t,n.mode))break;n=void 0}return n}lookupLocalCmd(e,t){e=e.toUpperCase();let n;for(let i of this._commandsByGroup)if(n=i.commandsByLocalName.get(e),n||(n=i.commandsByAlias.get(e)),n){if(t===void 0||this.isModeCompatible(t,n.mode))break;n=void 0}return n}removeCmd(e,t){e=e.toUpperCase(),t=t.toUpperCase();for(let n of this._commandsByGroup)if(n.groupName==e){let i=n.commandsByGlobalName.get(t);if(!i)return!1;n.commandsByGlobalName.delete(t),n.commandsByLocalName.delete(i.localName);let o=n.aliasesByCommand.get(i);return o?.forEach(a=>{n.commandsByAlias.delete(a)}),n.aliasesByCommand.delete(i),!0}return!1}removeGroup(e){e=e.toUpperCase();let t=this._commandsByGroup.findIndex(n=>n.groupName===e);return t>=0?(this._commandsByGroup.splice(t,1),!0):!1}get activeCommand(){return this._activeCommand}markActive(e,t,n){this._activeCommand=e,this._activeView=t,this._activePromise=n}async runActive(e,t,n){let i,o=new Promise(a=>{i=a});this.markActive(e,t,o);try{await n()}finally{this.clearActive(e),i()}}clearActive(e){this._activeCommand===e&&(this._activeCommand=null,this._activeView=null,this._activePromise=null)}async cancelActive(){let e=this._activeView,t=this._activePromise;if(this._activeCommand&&(e?.editor.cancelActiveInput(),t))try{await t}catch{}}removeAll(){this._defaultCommandGroup.commandsByGlobalName.clear(),this._defaultCommandGroup.commandsByLocalName.clear(),this._defaultCommandGroup.commandsByAlias.clear(),this._defaultCommandGroup.aliasesByCommand.clear(),this._systemCommandGroup.commandsByGlobalName.clear(),this._systemCommandGroup.commandsByLocalName.clear(),this._systemCommandGroup.commandsByAlias.clear(),this._systemCommandGroup.aliasesByCommand.clear(),this._commandsByGroup=[this._systemCommandGroup,this._defaultCommandGroup]}getCommandAliases(e,t){let n=t?.trim().toUpperCase(),i=n?this._commandsByGroup.filter(o=>o.groupName===n):this._commandsByGroup;for(let o of i){let a=o.aliasesByCommand.get(e);if(a)return[...a]}return[]}commandAliasStartsWith(e,t,n){let i=this._commandsByGroup.find(a=>a.groupName===e);if(!i)return!1;let o=i.aliasesByCommand.get(t);if(!o)return!1;for(let a of o)if(a.startsWith(n))return!0;return!1}normalizeAliases(e,t,n){let i=Array.isArray(e)?e:e?[e]:[],o=new Set;return i.forEach(a=>{let s=a.trim().toUpperCase();s&&s!==t&&s!==n&&o.add(s)}),[...o]}isModeCompatible(e,t){return e>=t}};nN.SYSTEMT_COMMAND_GROUP_NAME="ACAD",nN.DEFAUT_COMMAND_GROUP_NAME="USER";var kl=nN,Bb="draw-style",iN=class{constructor(){this.providers=new Map}set(e,t){this.providers.set(e,t)}get(e){return this.providers.get(e)}has(e){return this.providers.has(e)}delete(e){return this.providers.delete(e)}};var m1=class{constructor(e,t,n=1e3,i=0){this.condition=e,this.action=t,this.checkInterval=n,this.timeout=i,this.timerId=null,this.timeoutId=null}start(){if(this.timerId===null){if(this.condition()){this.executeAndStop();return}this.timerId=setInterval(()=>{this.condition()&&this.executeAndStop()},this.checkInterval),this.timeout>0&&(this.timeoutId=setTimeout(()=>{kt.warn("AcEdConditionWaiter: Timeout reached."),this.executeAndStop()},this.timeout))}}stop(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}executeAndStop(){this.stop(),this.action()}isRunning(){return this.timerId!==null}},tOe={light:{"--ml-ui-text":"#303133","--ml-ui-text-muted":"#606266","--ml-ui-bg":"#ffffff","--ml-ui-border":"#dcdfe6","--ml-ui-shadow":"0 2px 6px rgba(0, 0, 0, 0.12)","--ml-ui-overlay":"rgba(0, 0, 0, 0.18)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"},dark:{"--ml-ui-text":"#e5eaf3","--ml-ui-text-muted":"#cfd3dc","--ml-ui-bg":"#1d1e1f","--ml-ui-border":"#4c4d4f","--ml-ui-shadow":"0 6px 18px rgba(0, 0, 0, 0.35)","--ml-ui-overlay":"rgba(0, 0, 0, 0.5)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"}},nOe={light:{"--ml-ui-text":"var(--el-text-color-primary, #303133)","--ml-ui-text-muted":"var(--el-text-color-regular, #606266)","--ml-ui-bg":"var(--el-bg-color-overlay, #ffffff)","--ml-ui-border":"var(--el-border-color, #dcdfe6)","--ml-ui-shadow":"var(--el-box-shadow, 0 2px 6px rgba(0, 0, 0, 0.12))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.18))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"},dark:{"--ml-ui-text":"var(--el-text-color-primary, #e5eaf3)","--ml-ui-text-muted":"var(--el-text-color-regular, #cfd3dc)","--ml-ui-bg":"var(--el-bg-color-overlay, #1d1e1f)","--ml-ui-border":"var(--el-border-color, #4c4d4f)","--ml-ui-shadow":"var(--el-box-shadow, 0 6px 18px rgba(0, 0, 0, 0.35))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.5))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"}},oN=new Set,fF=0;function Qz(r){return oN.add(r),()=>{oN.delete(r)}}function zs(r,e=document.documentElement,t){let n=t!=null&&t.isolated?tOe[r]:nOe[r];if(Object.keys(n).forEach(i=>{e.style.setProperty(i,n[i])}),e.setAttribute("data-ml-ui-theme",r),e.style.colorScheme=r,!(!(e===document.documentElement||e.hasAttribute("data-ml-ui-theme-root"))||fF>0)){fF++;try{for(let i of[...oN])try{i(r)}catch{}}finally{fF--}}}function LJ(r){if(r.classList.contains("ml-theme-dark")||r.classList.contains("dark"))return"dark";if(r.classList.contains("ml-theme-light"))return"light"}function Jo(r){let e=r;for(;e;){let o=e.getAttribute("data-ml-ui-theme");if(o==="light"||o==="dark")return o;let a=LJ(e);if(a)return a;e=e.parentElement}let t=document.documentElement.getAttribute("data-ml-ui-theme");if(t==="light"||t==="dark")return t;let n=document.documentElement.getAttribute("data-mlcad-theme");return n==="light"||n==="dark"?n:LJ(document.documentElement)||"dark"}var eU=600,$ee=`(max-width: ${eU}px)`,g1=440,Kee=24,aN=`calc(100vw - ${Kee}px)`;var rOe=2,iOe=45,oOe=46,aOe=47,sOe=48;function kk(){var r;return((r=window.matchMedia)==null?void 0:r.call(window,$ee).matches)??!1}var lOe=960,qee=`(max-width: ${lOe}px)`;function cOe(){var r;return((r=window.matchMedia)==null?void 0:r.call(window,qee).matches)??!1}var uOe="(pointer: coarse)",hOe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;function dOe(){var r;if(typeof navigator>"u")return!1;let e=navigator;return hOe.test(e.userAgent||"")||e.platform==="MacIntel"&&(e.maxTouchPoints??0)>1?!0:((r=window.matchMedia)==null?void 0:r.call(window,uOe).matches)??!1}function $T(){return kk()?"phone":cOe()?"pad":"desktop"}function Rd(){return $T()!=="desktop"||dOe()}function pOe(r){return kk()?!0:r&&Rd()}function Ik(r){if(typeof window.matchMedia!="function")return()=>{};let e=window.matchMedia($ee),t=window.matchMedia(qee),n=$T(),i=()=>{let o=$T();o!==n&&(n=o,r(o))};return e.addEventListener("change",i),t.addEventListener("change",i),()=>{e.removeEventListener("change",i),t.removeEventListener("change",i)}}var fOe="--ml-ui-grip-size",mOe="--ml-ui-grip-normal",gOe="--ml-ui-grip-hot",yOe=8;function Zee(r,e){r.style.setProperty(fOe,`${e.size}px`),r.style.setProperty(mOe,e.colorCss),r.style.setProperty(gOe,e.hotColorCss)}function OJ(r){let e=new je(Be.ByACI,r);return e.cssColor??`rgb(${e.red}, ${e.green}, ${e.blue})`}function DJ(r){let e=gt.instance(),t=e.getVar(oe.GRIPSIZE,r),n=e.getVar(oe.GRIPCOLOR,r),i=e.getVar(oe.GRIPHOT,r);return{size:t>0&&Number.isFinite(t)?t:yOe,colorCss:OJ(n),hotColorCss:OJ(i)}}var bOe=new Set([oe.GRIPSIZE.toLowerCase(),oe.GRIPCOLOR.toLowerCase(),oe.GRIPHOT.toLowerCase()]);function vOe(r){return bOe.has(r.toLowerCase())}var xOe={isDebug:!1,isShowCommandLine:!0,isShowCoordinate:!0,isShowEntityInfo:!1,isShowLanguageSelector:!0,isShowRibbon:!0,isShowToolbar:!0,isShowShortCutToolbar:!0,isShowStats:!1,fontMapping:{},osnapModes:l0([ne.EndPoint,ne.MidPoint,ne.Center,ne.Quadrant,ne.Intersection,ne.Nearest]),hideTouchPointTutorial:!1,touchPointTutorialSnoozeDate:null,useSimulatedMouseOnTouch:!0},Jee="settings";function wOe(r){let e={...r},t=!1;return!("isShowRibbon"in e)&&typeof e.isShowMainMenu=="boolean"&&(e.isShowRibbon=e.isShowMainMenu,t=!0),"isShowMainMenu"in e&&(delete e.isShowMainMenu,t=!0),"isShowFileName"in e&&(delete e.isShowFileName,t=!0),{settings:e,migrated:t}}var Qee=class c1{constructor(){this.events={modified:new wt},this._user={},this._session={},this.reloadFromStorage()}static configure(e){e.storageKey!=null&&e.storageKey!==""&&(this._storageKey=e.storageKey),this._instance&&this._instance.reloadFromStorage()}static get instance(){return this._instance||(this._instance=new c1),this._instance}static resetInstanceForTesting(){this._instance=void 0,this._storageKey=Jee}reloadFromStorage(){this._user=this.readUserFromStorage(),this._session={}}readUserFromStorage(){let e=localStorage.getItem(c1._storageKey);if(e==null)return{};let t;try{t=JSON.parse(e)}catch{return{}}let{settings:n,migrated:i}=wOe(t);return i&&localStorage.setItem(c1._storageKey,JSON.stringify(n)),n}persistUser(){localStorage.setItem(c1._storageKey,JSON.stringify(this._user))}computeEffective(){return{...xOe,...this._user,...this._session}}set(e,t,n){let i=n?.persist!==!1;this._session[e]=t,i&&(this._user[e]=t,this.persistUser()),this.events.modified.dispatch({key:e,value:t})}apply(e,t){for(let n of Object.keys(e)){let i=e[n];i!==void 0&&this.set(n,i,t)}}clearSessionOverride(e){Object.prototype.hasOwnProperty.call(this._session,e)&&(delete this._session[e],this.events.modified.dispatch({key:e,value:this.get(e)}))}get(e){return this.settings[e]}toggle(e){let t=this.get(e);this.set(e,!t)}get isDebug(){return this.get("isDebug")}set isDebug(e){this.set("isDebug",e)}get isShowCommandLine(){return this.get("isShowCommandLine")}set isShowCommandLine(e){this.set("isShowCommandLine",e)}get isShowCoordinate(){return this.get("isShowCoordinate")}set isShowCoordinate(e){this.set("isShowCoordinate",e)}get isShowEntityInfo(){return this.get("isShowEntityInfo")}set isShowEntityInfo(e){this.set("isShowEntityInfo",e)}get isShowLanguageSelector(){return this.get("isShowLanguageSelector")}set isShowLanguageSelector(e){this.set("isShowLanguageSelector",e)}get isShowRibbon(){return this.get("isShowRibbon")}set isShowRibbon(e){this.set("isShowRibbon",e)}get isShowToolbar(){return this.get("isShowToolbar")}set isShowToolbar(e){this.set("isShowToolbar",e)}get isShowShortCutToolbar(){return this.get("isShowShortCutToolbar")}set isShowShortCutToolbar(e){this.set("isShowShortCutToolbar",e)}get isShowStats(){return this.get("isShowStats")}set isShowStats(e){this.set("isShowStats",e)}get fontMapping(){return this.get("fontMapping")}set fontMapping(e){this.set("fontMapping",e)}setFontMapping(e,t){let n={...this.get("fontMapping")};n[e]=t,this.set("fontMapping",n)}get osnapModes(){return this.get("osnapModes")}set osnapModes(e){this.set("osnapModes",e)}get settings(){return this.computeEffective()}};Qee._storageKey=Jee;var hr=Qee,_Oe=1e-10,e1=32;function KT(r,e,t,n){return Math.hypot(r-t,e-n)}function SOe(r,e,t,n,i,o){let a=i-t,s=o-n,l=a*a+s*s;if(l<1e-18)return KT(r,e,t,n);let c=((r-t)*a+(e-n)*s)/l;return c=Math.max(0,Math.min(1,c)),KT(r,e,t+c*a,n+c*s)}function AOe(r,e,t){if(Math.abs(t)>_Oe)try{let n=new Ke(r,e,t);return!(n.radius>0)||!Number.isFinite(n.radius)?void 0:n}catch{return}}function Ib(r){return{x:r.x,y:r.y,z:r.z??0}}function MOe(r,e){let t=new k(r.x,r.y,r.z).applyMatrix4(e);return Ib(t)}function POe(r){return typeof r!="string"?r:r.replace(/#\d+$/,"")}function EOe(r){if(typeof r!="string")return 0;let e=/#(\d+)$/.exec(r);return e?Number(e[1]):0}function COe(r){var e;if(r instanceof zh){let i=r.numberOfVertices;return Array.from({length:i},(o,a)=>{let s=r.getPointAt(a);return{x:s.x,y:s.y,bulge:r.getBulgeAt(a)}})}let t=(e=r._geo)==null?void 0:e.vertices;if(t&&t.length>0)return t.map(i=>({x:i.x,y:i.y,bulge:i.bulge??0}));let n=r.numberOfVertices;return Array.from({length:n},(i,o)=>{let a=r.getPoint2dAt(o);return{x:a.x,y:a.y,bulge:0}})}function TOe(r,e){let t=COe(r);if(t.length<2)return;let n=r.closed?t.length:t.length-1,i=Number.POSITIVE_INFINITY,o;for(let a=0;a<n;a++){let s=t[a],l=t[(a+1)%t.length],c=AOe(s,l,s.bulge),u;if(c){let h=c.nearestPoint(e);u=KT(e.x,e.y,h.x,h.y)}else u=SOe(e.x,e.y,s.x,s.y,l.x,l.y);u<i&&(i=u,o=c)}if(o)return Ib({x:o.center.x,y:o.center.y,z:r.elevation})}function sN(r,e,t){let n=[];return r.subGetOsnapPoints(ne.Center,e,e,n,t),n.map(i=>Ib(i))}function kOe(r){return new Ie().setFromExtrusionDirection(r.normal).multiply(r.blockTransform)}function lN(r,e,t=new Ie,n){let i=EOe(e);return ete(r,POe(e),i,t,n,i===0&&n!=null).found}function IOe(r,e,t=1e-4){return e.x>=r.min.x-t&&e.x<=r.max.x+t&&e.y>=r.min.y-t&&e.y<=r.max.y+t}function ete(r,e,t,n,i,o){let a=r.blockTableRecord;if(!a)return{found:void 0,remaining:t};let s=new Ie().multiplyMatrices(n,kOe(r)),l;o&&i!=null&&t===0&&(l=new k(i).applyMatrix4(s.clone().invert()));for(let c of a.newIterator()){if(c.objectId===e){if(t>0){t-=1;continue}return{found:{entity:c,transform:s},remaining:0}}if(c instanceof pn){if(o&&t===0&&l){let h=c.geometricExtents;if(!h.isEmpty()&&!IOe(h,l))continue}let u=ete(c,e,t,s,i,o);if(u.found)return u;t=u.remaining}}return{found:void 0,remaining:t}}function LOe(r,e,t){if(!t)return sN(r,e);let n=lN(r,t,new Ie,e);if(!n)return sN(r,e,t);let i=n.transform.clone().invert(),o=new k(e).applyMatrix4(i);return cN(n.entity,o).map(a=>MOe(a,n.transform))}function cN(r,e,t){if(r instanceof pn)return LOe(r,e,t);if(r instanceof Do)return[Ib(r.center)];if(r instanceof ms)return[Ib(r.center)];if(r instanceof Jl)return[Ib(r.center)];if(r instanceof Dt||r instanceof zh){let n=TOe(r,e);return n?[n]:[]}return sN(r,e,t)}function OOe(r,e){if(e.length===0)return r.length<=e1?r:r.slice(-e1);let t=[...r],n=r.length>e1;for(let i of e){let o=t.findIndex(a=>tte(a,i));if(o>=0){if(o!==t.length-1){let[a]=t.splice(o,1);t.push(a),n=!0}}else t.push(i),n=!0}return t.length>e1?t.slice(t.length-e1):n?t:r}function tte(r,e,t=1e-8){return KT(r.x,r.y,e.x,e.y)<=t}var DOe=20,mF=16,ROe=48,BOe=8,FOe=32;function NOe(r,e){return r.min.x<=e.max.x&&r.max.x>=e.min.x&&r.min.y<=e.max.y&&r.max.y>=e.min.y}function RJ(r){return new De({x:r.minX,y:r.minY,z:-1/0},{x:r.maxX,y:r.maxY,z:1/0})}function nte(r){return r.equals(Ie.IDENTITY)}function BJ(r,e){if(nte(e))return r;if(r instanceof Bo)return new Bo(new k(r.startPoint).applyMatrix4(e),new k(r.endPoint).applyMatrix4(e));if(r instanceof Do){let t=e.getMaxScaleOnAxis();return!(t>0)||!Number.isFinite(t)?void 0:new Do(new k(r.center).applyMatrix4(e),r.radius*t,r.normal)}if(r instanceof ms){let t=e.getMaxScaleOnAxis();return!(t>0)||!Number.isFinite(t)?void 0:new ms(new k(r.center).applyMatrix4(e),r.radius*t,r.startAngle,r.endAngle,r.normal)}}function zOe(r){let e=r.subGetIntersectCurves().length;return e>0&&e<=FOe}function gF(r,e){return nte(e)?r:r.map(t=>new k(t.x,t.y,t.z).applyMatrix4(e))}function UOe(r,e){if(r.transform.equals(e.transform))return gF(r.entity.intersectWith(e.entity),r.transform);let t=new Ie().multiplyMatrices(r.transform.clone().invert(),e.transform),n=BJ(e.entity,t);if(n)return gF(r.entity.intersectWith(n),r.transform);let i=new Ie().multiplyMatrices(e.transform.clone().invert(),r.transform),o=BJ(r.entity,i);return o?gF(e.entity.intersectWith(o),e.transform):[]}var Nc=class r{constructor(e){this._acquiredCenters=[],this._view=e}get acquiredCenterMarks(){return this._acquiredCenters}clearAcquiredCenters(){this._acquiredCenters=[]}static displayCenterMarks(e,t){return!t||t.type!==ne.Center?e:e.filter(n=>!tte(n,t))}resolve(e){let t=e.hitRadiusPx??DOe,n=e.lastPoint??e.cursorWcs,i=this._view.screenToWorld({x:0,y:0}),o=this._view.screenToWorld({x:t,y:0}),a=Math.abs(o.x-i.x),s=this.collectOsnapPoints(e.cursorWcs,n,t,a);for(let h of this._acquiredCenters)s.push({x:h.x,y:h.y,z:h.z,type:ne.Center});if(s.length===0)return;let l=Number.MAX_VALUE,c=Number.MAX_VALUE,u=-1;for(let h=0;h<s.length;h++){let d=s[h],p=e.cursorWcs.x-d.x,f=e.cursorWcs.y-d.y,m=Math.hypot(p,f);if(m>=a)continue;let g=r.osnapModePriority(d.type);(g<l||g===l&&m<c)&&(l=g,c=m,u=h)}return u!==-1?s[u]:void 0}static osnapModeToMarkerType(e){switch(e){case ne.EndPoint:return"rect";case ne.MidPoint:return"triangle";case ne.Center:return"circle";case ne.Quadrant:return"diamond";case ne.Nearest:return"x";case ne.Intersection:return"intersection";default:return"rect"}}static osnapModePriority(e){switch(e){case ne.EndPoint:case ne.MidPoint:case ne.Center:case ne.Intersection:return 0;case ne.Quadrant:return 1;case ne.Nearest:return 2;default:return 1}}collectOsnapPointsByMode(e,t,n,i,o,a){let s=n.length;e.subGetOsnapPoints(t,i,o,n,a);for(let l=s;l<n.length;l++)n[l].type=t}collectOsnapPointsInAvailableModes(e,t,n,i,o){lg(hr.instance.osnapModes).forEach(a=>{a!==ne.Intersection&&this.collectOsnapPointsByMode(e,a,t,n,i,o)})}collectOsnapPointsFromResolvedSubEntity(e,t,n,i){let o=e.transform.clone().invert(),a=new k(n).applyMatrix4(o),s=new k(i).applyMatrix4(o),l=lg(hr.instance.osnapModes),c=e.entity instanceof pn;for(let u of l){if(u===ne.Intersection)continue;let h=[];if(c){e.entity.subGetOsnapPoints(u,a,s,h,e.entity.objectId,e.transform);for(let d of h)t.push({x:d.x,y:d.y,z:d.z??0,type:u})}else{e.entity.subGetOsnapPoints(u,a,s,h);for(let d of h){let p=new k(d).applyMatrix4(e.transform);t.push({x:p.x,y:p.y,z:p.z,type:u})}}}}static childBoxHint(e){if(!(e.minX==null||e.minY==null||e.maxX==null||e.maxY==null))return{x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2,z:0}}collectIntersectionOsnapPoints(e,t,n,i,o){let a=[],s=new Set,l=d=>{a.length>=mF||s.has(d.key)||d.box.isEmpty()||zOe(d.entity)&&(s.add(d.key),a.push(d))};for(let d of e){if(a.length>=mF)break;if(!WT(d))continue;let p=r.getEntityById(t,d.id);if(!p)continue;let f=d.viewportId;if(!(f!=null&&!this._view.getViewportCoordinateMapper(f))){if(d.children&&d.children.length>0){for(let m of d.children){if(a.length>=mF)break;let g=`${d.id}:${m.id}`;if(p instanceof pn){let y=lN(p,m.id,new Ie,r.childBoxHint(m));if(!y)continue;l({key:g,box:RJ(m),entity:y.entity,transform:y.transform,viewportId:f})}else l({key:g,box:RJ(m),entity:p,transform:new Ie,viewportId:f})}continue}p instanceof pn||l({key:d.id,box:p.geometricExtents,entity:p,transform:new Ie,viewportId:f})}}if(a.length<2)return;let c=o*o,u=performance.now(),h=0;for(let d=0;d<a.length;d++)for(let p=d+1;p<a.length;p++){if(h>=ROe||performance.now()-u>BOe)return;if(a[d].viewportId!==a[p].viewportId||!NOe(a[d].box,a[p].box))continue;h++;let f=a[d].viewportId,m=f!=null?this._view.getViewportCoordinateMapper(f):void 0;if(f!=null&&!m)continue;let g=UOe(a[d],a[p]);for(let y of g){let b=m?m.modelToPaper(y):y;if(m&&!m.containsPaperPoint(b))continue;let v=b.x-i.x,x=b.y-i.y;v*v+x*x>c||n.push({x:b.x,y:b.y,z:y.z,type:ne.Intersection})}}}static getEntityById(e,t){let n=e.getObjectById(t);return n instanceof bt?n:void 0}collectOsnapPoints(e,t,n,i){let o=this._view.pick(e,n),a=Fr().workingDatabase,s=[],l=Rn.point2dToPoint3d(e),c=Rn.point2dToPoint3d(t);return o.forEach(u=>{let h=r.getEntityById(a,u.id);if(!h)return;let d=u.viewportId!=null?this._view.getViewportCoordinateMapper(u.viewportId):void 0;if(u.viewportId!=null&&!d)return;let p=d?Rn.point2dToPoint3d(d.paperToModel(e)):l,f=d?Rn.point2dToPoint3d(d.paperToModel(t)):c,m=[];if(u.children&&u.children.length>0?u.children.forEach(g=>{if(h instanceof pn){let y=lN(h,g.id,new Ie,r.childBoxHint(g));if(y){this.collectOsnapPointsFromResolvedSubEntity(y,m,p,f);return}}this.collectOsnapPointsInAvailableModes(h,m,p,f,g.id)}):this.collectOsnapPointsInAvailableModes(h,m,p,f),!d){s.push(...m);return}for(let g of m){let y=d.modelToPaper(g);d.containsPaperPoint(y)&&s.push({x:y.x,y:y.y,z:g.z,type:g.type})}}),cg(hr.instance.osnapModes,ne.Intersection)&&this.collectIntersectionOsnapPoints(o,a,s,e,i),this.updateAcquiredCenters(o,a,l),s}updateAcquiredCenters(e,t,n){if(!cg(hr.instance.osnapModes,ne.Center)){this._acquiredCenters=[];return}let i=[];e.forEach(o=>{let a=r.getEntityById(t,o.id);if(!a)return;let s=o.viewportId!=null?this._view.getViewportCoordinateMapper(o.viewportId):void 0;if(o.viewportId!=null&&!s)return;let l=s?Rn.point2dToPoint3d(s.paperToModel(n)):n,c=[];if(o.children&&o.children.length>0?o.children.forEach(u=>{c.push(...cN(a,l,u.id))}):c.push(...cN(a,l)),!s){i.push(...c);return}for(let u of c){let h=s.modelToPaper(u);s.containsPaperPoint(h)&&i.push({...u,x:h.x,y:h.y})}}),this._acquiredCenters=OOe(this._acquiredCenters,i)}},qT=class r{constructor(e="rect",t=12,n="var(--ml-ui-canvas-line, green)",i){this._type=e,this._size=t,this._color=n,this._host=i,r.injectCSS(),getComputedStyle(this._host).position==="static"&&(this._host.style.position="relative"),this._el=document.createElement("div"),this._el.classList.add("ml-marker"),this._el.style.color=n,this.applyShape(),this._host.appendChild(this._el)}get color(){return this._color}set color(e){this._color=e,this._el.style.color=e}get type(){return this._type}set type(e){this._type=e,this.applyShape()}static injectCSS(){if(document.getElementById("ml-marker-style"))return;let e=document.createElement("style");e.id="ml-marker-style",e.textContent=`
  4560. .ml-marker {
  4561. position: absolute;
  4562. pointer-events: none;
  4563. transform: translate(-50%, -50%);
  4564. z-index: 1;
  4565. box-sizing: border-box;
  4566. }
  4567. .ml-marker-circle {
  4568. border-radius: 50%;
  4569. border: 2px solid currentColor;
  4570. background: transparent;
  4571. }
  4572. .ml-marker-rect {
  4573. border: 2px solid currentColor;
  4574. background: transparent;
  4575. }
  4576. .ml-marker-triangle {
  4577. background: currentColor;
  4578. clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  4579. /* Centroid of the upward triangle is 2/3 of the height from the apex. */
  4580. transform: translate(-50%, -66.6667%);
  4581. }
  4582. .ml-marker-diamond {
  4583. border: 2px solid currentColor;
  4584. background: transparent;
  4585. transform: translate(-50%, -50%) rotate(45deg);
  4586. }
  4587. .ml-marker-x::before,
  4588. .ml-marker-x::after {
  4589. content: '';
  4590. position: absolute;
  4591. top: 50%;
  4592. left: 50%;
  4593. width: 100%;
  4594. height: 2px;
  4595. background: currentColor;
  4596. transform-origin: center;
  4597. }
  4598. .ml-marker-x::before {
  4599. transform: translate(-50%, -50%) rotate(45deg);
  4600. }
  4601. .ml-marker-x::after {
  4602. transform: translate(-50%, -50%) rotate(-45deg);
  4603. }
  4604. .ml-marker-plus::before,
  4605. .ml-marker-plus::after {
  4606. content: '';
  4607. position: absolute;
  4608. top: 50%;
  4609. left: 50%;
  4610. background: currentColor;
  4611. transform-origin: center;
  4612. }
  4613. .ml-marker-plus::before {
  4614. width: 100%;
  4615. height: 2px;
  4616. transform: translate(-50%, -50%);
  4617. }
  4618. .ml-marker-plus::after {
  4619. width: 2px;
  4620. height: 100%;
  4621. transform: translate(-50%, -50%);
  4622. }
  4623. .ml-marker-intersection {
  4624. border: 2px solid currentColor;
  4625. background: transparent;
  4626. }
  4627. .ml-marker-intersection::before,
  4628. .ml-marker-intersection::after {
  4629. content: '';
  4630. position: absolute;
  4631. top: 50%;
  4632. left: 50%;
  4633. width: 70%;
  4634. height: 2px;
  4635. background: currentColor;
  4636. transform-origin: center;
  4637. }
  4638. .ml-marker-intersection::before {
  4639. transform: translate(-50%, -50%) rotate(45deg);
  4640. }
  4641. .ml-marker-intersection::after {
  4642. transform: translate(-50%, -50%) rotate(-45deg);
  4643. }
  4644. `,document.head.appendChild(e)}applyShape(){switch(this._el.className="ml-marker",this._el.style.width="",this._el.style.height="",this._el.style.fontSize="",this._el.style.transform="translate(-50%, -50%)",this._type){case"circle":this._el.classList.add("ml-marker-circle"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"rect":this._el.classList.add("ml-marker-rect"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"triangle":this._el.classList.add("ml-marker-triangle"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"diamond":this._el.classList.add("ml-marker-diamond"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"x":this._el.classList.add("ml-marker-x"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"plus":this._el.classList.add("ml-marker-plus"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"intersection":this._el.classList.add("ml-marker-intersection"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break}}setPosition(e){this._el.style.left=`${e.x}px`,this._el.style.top=`${e.y}px`}destroy(){this._el.remove()}},Fb=class{constructor(e){this.stack=[],this.hintMarkers=[],this.hintPositions=[],this.view=e}showMarker(e,t,n,i){let o=this.createMarker(e,t,n,i);return this.stack.push(o),o}setHintMarkers(e,t="plus",n,i){if(this.hintPositionsMatch(e))return;let o=e.map(s=>({x:s.x,y:s.y})),a=Math.min(this.hintMarkers.length,o.length);for(let s=0;s<a;s++)this.hintMarkers[s].setPosition(this.toContainerPos(o[s]));if(o.length<this.hintMarkers.length){for(let s=o.length;s<this.hintMarkers.length;s++)this.hintMarkers[s].destroy();this.hintMarkers.length=o.length}else for(let s=a;s<o.length;s++)this.hintMarkers.push(this.createMarker(o[s],t,n,i));this.hintPositions=o}showOrRepositionMarker(e,t,n,i){let o=this.top();return o?(t!=null&&o.type!==t&&(o.type=t),this.repositionTop(e),o):this.showMarker(e,t,n,i)}repositionHints(){for(let e=0;e<this.hintMarkers.length;e++){let t=this.hintPositions[e];t&&this.hintMarkers[e].setPosition(this.toContainerPos(t))}}repositionTop(e){let t=this.top();if(!t)return;let n=this.view.worldToScreen(e),i=this.view.canvasToContainer(n);t.setPosition(i)}hideMarker(){let e=this.stack.pop();e&&e.destroy()}clear(){this.clearHintMarkers();for(let e of this.stack)e.destroy();this.stack=[]}top(){return this.stack[this.stack.length-1]}createMarker(e,t,n,i){let o=new qT(t,n,i,this.view.container);return o.setPosition(this.toContainerPos(e)),o}toContainerPos(e){let t=this.view.worldToScreen(e);return this.view.canvasToContainer(t)}hintPositionsMatch(e){if(e.length!==this.hintPositions.length)return!1;for(let t=0;t<e.length;t++){let n=e[t],i=this.hintPositions[t];if(n.x!==i.x||n.y!==i.y)return!1}return!0}clearHintMarkers(){for(let e of this.hintMarkers)e.destroy();this.hintMarkers=[],this.hintPositions=[]}},It=class{constructor(e){this.view=e}get entity(){return null}render(){this.entity&&this.view.addTransientEntity(this.entity)}end(){this.entity&&this.view.removeTransientEntity(this.entity.objectId)}},uN=class extends It{constructor(e,t,n,i){super(e),this._previewEntity=null,this._view=e;let o=t.clone();if(!o)throw new Error("Failed to clone entity for grip preview.");this._sourceClone=o,this._gripIndex=n,this._gripBaseWcs=new k(i)}get entity(){return this._previewEntity}update(e){this._previewEntity&&(this._view.removeTransientEntity(this._previewEntity.objectId),this._previewEntity=null);let t=this._sourceClone.clone();t&&(t.subMoveGripPointsAt([this._gripIndex],this.computeOffset(e)),this._previewEntity=t)}computeOffset(e){return new G(e.x-this._gripBaseWcs.x,e.y-this._gripBaseWcs.y,(e.z??0)-(this._gripBaseWcs.z??0))}render(){this._previewEntity&&this._view.addTransientEntity(this._previewEntity)}end(){this._previewEntity&&(this._view.removeTransientEntity(this._previewEntity.objectId),this._previewEntity=null)}},hN=class{constructor(e,t,n,i){this._boundMouseMove=o=>this.onMouseMove(o),this._boundMouseUp=o=>this.onMouseUp(o),this._boundKeyDown=o=>this.onKeyDown(o),this._view=e,this._entity=t,this._target=n,this._onEnd=i,this._osnapMarkerManager=new Fb(e),this._jig=new uN(e,t,n.gripIndex,n.gripBaseWcs),document.addEventListener("mousemove",this._boundMouseMove),document.addEventListener("mouseup",this._boundMouseUp),document.addEventListener("keydown",this._boundKeyDown)}onMouseMove(e){let t=this.resolveWcs(e);this._jig.update(t),this._jig.render()}onMouseUp(e){if(e.button!==0)return;let t=this.resolveWcs(e),n=this._jig.computeOffset(t),i=this._entity.database;im(i,"Grip Edit",()=>{let o=i.openEntityForWrite(this._entity);o&&o.subMoveGripPointsAt([this._target.gripIndex],n)}),this.finish()}onKeyDown(e){e.key==="Escape"&&(e.preventDefault(),this.cancel())}cancel(){this.finish()}finish(){this._jig.end(),this._osnapMarkerManager.clear(),this._view.osnapResolver.clearAcquiredCenters(),document.removeEventListener("mousemove",this._boundMouseMove),document.removeEventListener("mouseup",this._boundMouseUp),document.removeEventListener("keydown",this._boundKeyDown),this._onEnd()}resolveWcs(e){let t=this._view.viewportToCanvas({x:e.clientX,y:e.clientY}),n=this._view.screenToWorld(t),i={x:n.x,y:n.y,z:0},o=this._view.osnapResolver.resolve({cursorWcs:i,lastPoint:this._target.gripBaseWcs});return this._osnapMarkerManager.setHintMarkers(Nc.displayCenterMarks(this._view.osnapResolver.acquiredCenterMarks,o)),o?(this._osnapMarkerManager.showOrRepositionMarker(o,Nc.osnapModeToMarkerType(o.type)),{x:o.x,y:o.y,z:o.z??0}):(this._osnapMarkerManager.hideMarker(),i)}},dN=class{constructor(e,t){this._host=e,this._state="normal",kZ(),getComputedStyle(this._host).position==="static"&&(this._host.style.position="relative"),this._el=document.createElement("div"),this._el.className="ml-grip-handle ml-grip-handle-normal",this.applyAppearance(t),this._host.appendChild(this._el)}get element(){return this._el}get state(){return this._state}setState(e){this._state!==e&&(this._state=e,this._el.className=`ml-grip-handle ml-grip-handle-${e}`)}setPosition(e){this._el.style.left=`${e.x}px`,this._el.style.top=`${e.y}px`}applyAppearance(e){Zee(this._host,e)}destroy(){this._el.remove()}};function jOe(r,e){return e<=0?!1:r>e}function VOe(r,e,t,n,i){return r!==at.Write||e||t?!1:!jOe(n,i)}var pN=class{constructor(e){this._entries=[],this._editSession=null,this._hotEntry=null,this._boundRefresh=()=>this.refresh(),this._boundReposition=()=>this.repositionAll(),this._boundSysVarChanged=t=>this.onGripSysVarChanged(t.name),this._view=e,this.bindEvents(),queueMicrotask(()=>this.applyAppearance())}get isDragging(){return this._editSession!=null}dispose(){this.unbindEvents(),this.clear()}refresh(){if(this.clearEntries(),this.applyAppearance(),!this.canShowGrips())return;let e=Y.instance.curDocument,t=e.database.tables.blockTable,n=DJ(e.database);for(let i of this._view.selectionSet.ids){let o=t.getEntityById(i);if(!o)continue;let a=o.subGetGripPoints();for(let s=0;s<a.length;++s){let l=a[s],c=new dN(this._view.container,n),u={entityId:i,gripIndex:s,wcsPoint:l,handle:c};this.wireHandleEvents(u),this._entries.push(u),this.positionEntry(u)}}}canShowGrips(){let e=Y.instance.curDocument,t=gt.instance().getVar(oe.GRIPOBJLIMIT,e.database);return VOe(e.openMode,this._view.editor.isActive,!!nm.getActiveInputBox(),this._view.selectionSet.count,t)}bindEvents(){let{selectionSet:e,editor:t,events:n}=this._view;e.events.selectionAdded.addEventListener(this._boundRefresh),e.events.selectionRemoved.addEventListener(this._boundRefresh),n.viewChanged.addEventListener(this._boundReposition),n.viewResize.addEventListener(this._boundReposition),t.events.commandWillStart.addEventListener(this._boundRefresh),t.events.commandEnded.addEventListener(this._boundRefresh),gt.instance().events.sysVarChanged.addEventListener(this._boundSysVarChanged)}unbindEvents(){let{selectionSet:e,editor:t,events:n}=this._view;e.events.selectionAdded.removeEventListener(this._boundRefresh),e.events.selectionRemoved.removeEventListener(this._boundRefresh),n.viewChanged.removeEventListener(this._boundReposition),n.viewResize.removeEventListener(this._boundReposition),t.events.commandWillStart.removeEventListener(this._boundRefresh),t.events.commandEnded.removeEventListener(this._boundRefresh),gt.instance().events.sysVarChanged.removeEventListener(this._boundSysVarChanged)}onGripSysVarChanged(e){let t=e.toLowerCase();if(t===oe.GRIPOBJLIMIT.toLowerCase()){this.refresh();return}vOe(t)&&this.applyAppearance()}applyAppearance(){try{let e=Y.instance.curDocument;if(!(e!=null&&e.database))return;let t=DJ(e.database);Zee(this._view.container,t);for(let n of this._entries)n.handle.applyAppearance(t)}catch(e){if(e instanceof Error&&e.message.includes("instance is not created yet"))return;throw e}}wireHandleEvents(e){let{element:t}=e.handle;t.addEventListener("mouseenter",()=>{this.isDragging||e.handle.setState("hover")}),t.addEventListener("mouseleave",()=>{this._hotEntry!==e&&e.handle.setState("normal")}),t.addEventListener("mousedown",n=>{n.button===0&&this.canShowGrips()&&(n.preventDefault(),n.stopPropagation(),this._hotEntry=e,e.handle.setState("hot"),this.startEdit(e))})}startEdit(e){let t=Y.instance.curDocument.database.tables.blockTable.getEntityById(e.entityId);if(!t){this.endEdit();return}this.hideEntriesForDrag();let n={entityId:e.entityId,gripIndex:e.gripIndex,gripBaseWcs:e.wcsPoint};this._editSession=new hN(this._view,t,n,()=>this.endEdit())}endEdit(){this._editSession=null,this._hotEntry=null,this.refresh()}hideEntriesForDrag(){this.clearEntries()}positionEntry(e){let t=this._view.worldToScreen(e.wcsPoint),n=this._view.canvasToContainer(t);e.handle.setPosition(n)}repositionAll(){for(let e of this._entries)this.positionEntry(e)}clearEntries(){for(let e of this._entries)e.handle.destroy();this._entries.length=0,this._hotEntry=null}clear(){var e;(e=this._editSession)==null||e.cancel(),this._editSession=null,this.clearEntries()}},eS=(r=>(r[r.NoSpecialCursor=-1]="NoSpecialCursor",r[r.Crosshair=0]="Crosshair",r[r.RectCursor=1]="RectCursor",r[r.RubberBand=2]="RubberBand",r[r.NotRotated=3]="NotRotated",r[r.TargetBox=4]="TargetBox",r[r.RotatedCrosshair=5]="RotatedCrosshair",r[r.CrosshairNoRotate=6]="CrosshairNoRotate",r[r.Invisible=7]="Invisible",r[r.EntitySelect=8]="EntitySelect",r[r.Parallelogram=9]="Parallelogram",r[r.EntitySelectNoPersp=10]="EntitySelectNoPersp",r[r.PkfirstOrGrips=11]="PkfirstOrGrips",r[r.CrosshairDashed=12]="CrosshairDashed",r[r.Grab=13]="Grab",r))(eS||{}),fN=class{constructor(e){this._backgroundColor=cs,this._totalLength=20,this._view=e,this._cursorMap=new Map,this.setCursorColor(hF(this._backgroundColor)),gt.instance().events.sysVarChanged.addEventListener(t=>{if(t.name===oe.PICKBOX.toLowerCase()){let n=t.newVal;n=n>=0?n:0,this._cursorMap.set(0,this.createRectCrossIcon(n,this._totalLength-n,hF(this._backgroundColor))),this.setCursor(this._currentCursor)}}),this.setCursor(0)}get currentCursor(){return this._currentCursor}setCursor(e){let t=this._view.canvas;if(e<=-1)t.style.cursor="default";else if(e==13)t.style.cursor="grab";else{let n=this._cursorMap.get(e);n&&(t.style.cursor=n)}this._currentCursor=e}syncBackgroundColor(e){this._backgroundColor=e,this.setCursorColor(hF(e))}setCursorColor(e){let t=this.createRectCrossIcon(10,this._totalLength-10,e);this._cursorMap.set(0,t),this._currentCursor===0&&(this._view.canvas.style.cursor=t)}encodeSvgToCursor(e,t,n){return`url('data:image/svg+xml;base64,${btoa(e)}') ${t} ${n}, auto`}createRectCrossIcon(e,t,n="white"){let i=e/2,o=e+2*t,a=`
  4645. <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
  4646. <rect x="${t}" y="${t}" width="${e}" height="${e}" fill="none" stroke="${n}" />
  4647. <line x1="${i+t}" y1="0" x2="${i+t}" y2="${t}" stroke="${n}" />
  4648. <line x1="${e+t}" y1="${i+t}" x2="${e+2*t}" y2="${i+t}" stroke="${n}" />
  4649. <line x1="${i+t}" y1="${e+t}" x2="${i+t}" y2="${e+2*t}" stroke="${n}" />
  4650. <line x1="0" y1="${i+t}" x2="${t}" y2="${i+t}" stroke="${n}" />
  4651. </svg>
  4652. `;return this.encodeSvgToCursor(a,i+t,i+t)}},js=(r=>(r[r.SELECTION=0]="SELECTION",r[r.PAN=1]="PAN",r))(js||{}),GOe={showsConfirmedPointMarks:!1,usesSessionChrome:!1,swallowsPromptContextMenu:!1,showsCursorDynamicInput:!0,showsSnapLoupeOnTouchPick:!1},HOe={showsConfirmedPointMarks:!0,usesSessionChrome:!0,swallowsPromptContextMenu:!0,showsCursorDynamicInput:!1,showsSnapLoupeOnTouchPick:!0},mN=class{constructor(){this.point=GOe}canIdleTouchBox(e){return e===js.SELECTION}acquireBox(e,t){return e.acquireTwoPointBox(t)}},gN=class{constructor(){this.point=HOe}canIdleTouchBox(e){return e===js.SELECTION||e===js.PAN}acquireBox(e,t){return e.acquireHoldDragBox(t)}},WOe=new mN,XOe=new gN;function ba(){return Rd()?XOe:WOe}function YOe(r){if(!ba().point.showsCursorDynamicInput)return!1;let e=r??Fr().workingDatabase;return Number(gt.instance().getVar(oe.DYNMODE,e))!==0}function $Oe(r){let e=r??Fr().workingDatabase,t=gt.instance().getVar(oe.ORTHOMODE,e);return Number(t)!==0}function KOe(r,e){let t=r.x-e.x,n=r.y-e.y;return Math.abs(t)>=Math.abs(n)?{x:r.x,y:e.y}:{x:e.x,y:r.y}}var rte=2,qOe=4;function Lk(r){return r??Fr().workingDatabase}function ite(r,e,t){let n=gt.instance().getVar(r,e),i=Number(n);return Number.isFinite(i)?i:t}function ZOe(r,e){let t=gt.instance().getVar(r,e);return t==null?"":String(t)}function ote(r){let e=Lk(r);return ite(oe.POLARMODE,e,0)}function JOe(r){let e=Lk(r);return ite(oe.POLARANG,e,90)}function QOe(r){let e=Lk(r);return ZOe(oe.POLARADDANG,e)}function e3e(r){return(ote(r)&rte)!==0}function t3e(r,e,t){let n=r-e;return t===1&&(n=-n),xe.normalizeAngle(n)}function n3e(r,e,t){let n=r;return t===1&&(n=-n),xe.normalizeAngle(n+e)}function r3e(r){if(!r.trim())return[];let e=[];for(let t of r.split(";")){let n=t.trim();if(!n)continue;let i=Number(n);if(Number.isFinite(i)&&(e.push((i%360+360)%360),e.length>=10))break}return e}function i3e(r,e){let t=ote(r),n=(t&rte)!==0,i=(t&qOe)!==0,o=new Set;if(e.includeOrtho)for(let a of[0,90,180,270])o.add(a);if(n){let a=JOe(r);if(a>0){let s=Math.max(1,Math.round(360/a));for(let l=0;l<s;l++)o.add((l*a%360+360)%360)}if(i)for(let s of r3e(QOe(r)))o.add(s)}return[...o].map(xe.degToRad)}function FJ(r,e){let t=Math.abs(xe.normalizeAngle(r-e));return Math.min(t,Math.PI*2-t)}function o3e(r,e){let t=e[0],n=FJ(r,t);for(let i=1;i<e.length;i++){let o=e[i],a=FJ(r,o);a<n&&(n=a,t=o)}return t}function a3e(r,e,t){let n=Lk(t),i=$Oe(n),o=e3e(n);if(!i&&!o)return r;if(i&&!o)return KOe(r,e);let a=r.x-e.x,s=r.y-e.y,l=Math.hypot(a,s);if(l<1e-10)return r;let c=Math.atan2(s,a),u=t3e(c,n.angbase,n.angdir),h=i3e(n,{includeOrtho:i});if(h.length===0)return r;let d=o3e(u,h),p=n3e(d,n.angbase,n.angdir);return{x:e.x+l*Math.cos(p),y:e.y+l*Math.sin(p)}}var D1=class{constructor(e=[]){this.events={selectionAdded:new wt,selectionRemoved:new wt},this._ids=new Set(e)}get ids(){return Array.from(this._ids)}get count(){return this._ids.size}add(e){Array.isArray(e)?(e.forEach(t=>this._ids.add(t)),this.events.selectionAdded.dispatch({ids:e})):(this._ids.add(e),this.events.selectionAdded.dispatch({ids:[e]}))}delete(e){Array.isArray(e)?(e.forEach(t=>this._ids.delete(t)),this.events.selectionRemoved.dispatch({ids:e})):(this._ids.delete(e),this.events.selectionRemoved.dispatch({ids:[e]}))}has(e){return this._ids.has(e)}clear(){if(this._ids.size>0){let e=Array.from(this._ids);this._ids.clear(),this.events.selectionRemoved.dispatch({ids:e})}}},ZT=class{constructor(e,t,n,i=!0,o=!1,a=!0){this._displayName=e,this._globalName=t??e,this._localName=n??this._globalName,this._enabled=i,this._isReadOnly=o,this._visible=a}get displayName(){return this._displayName}set displayName(e){this._isReadOnly||(this._displayName=e)}get enabled(){return this._enabled}set enabled(e){this._isReadOnly||(this._enabled=e)}get globalName(){return this._globalName}set globalName(e){this._isReadOnly||(this._globalName=e)}get isReadOnly(){return this._isReadOnly}get localName(){return this._localName}set localName(e){this._isReadOnly||(this._localName=e)}get visible(){return this._visible}set visible(e){this._isReadOnly||(this._visible=e)}get alias(){return this._globalName.replace(/[^A-Z]/g,"")}},yN=class{constructor(e){if(this._keywords=[],!e)return;let t=e.trim().split(/\s+/),n=[],i=[],o=!1;for(let s of t){if(s==="_"){o=!0;continue}(o?i:n).push(s)}let a=Math.max(n.length,i.length);for(let s=0;s<a;s++){let l=n[s],c=i[s],u=b=>{if(!b)return;let v=b.indexOf(",");return v>=0?b.substring(0,v):b},h=u(c),d=u(l),p=h!==void 0,f=d!==void 0,m=p?h:"",g=f?d:void 0,y=new ZT(m||g||"",m,g,!0,!1,!0);this._keywords.push(y)}}add(e,t,n,i=!0,o=!0){let a,s,l;t===void 0?(a=e,s=e,l=e):n===void 0?(a=t,s=e,l=t):(a=e,s=t,l=n);let c=new ZT(a,s,l,i,!1,o);return this._keywords.push(c),c}clear(){this._keywords=[],this._defaultKeyword=void 0}toArray(){return this._keywords.slice()}get default(){return this._defaultKeyword}set default(e){if(e&&!this._keywords.includes(e))throw new Error("Default keyword must be one of the collection's keywords");this._defaultKeyword=e}getDisplayString(e=!1){return this._keywords.filter(t=>t.visible&&t.enabled).map(t=>(!e&&this._defaultKeyword,t.displayName)).join("/")}getPromptFormat(){let e=this._keywords.filter(o=>o.visible).map(o=>o.displayName),t=this._defaultKeyword&&this._defaultKeyword.visible?this._defaultKeyword.displayName:void 0,n=`[${e.join("/")}]`,i=t?` <${t}>`:"";return{visibleKeywords:e,defaultKeyword:t,formattedTail:`${n}${i}:`}}[Symbol.iterator](){let e=0,t=this._keywords;return{next(){return e<t.length?{done:!1,value:t[e++]}:{done:!0,value:void 0}}}}findByDisplayName(e){return this._keywords.find(t=>t.displayName.toLowerCase()===e.toLowerCase())}findByGlobalName(e){return this._keywords.find(t=>t.globalName.toLowerCase()===e.toLowerCase())}findByName(e){if(!e)return;let t=e.trim();if(!t)return;let n=t.startsWith("_");n&&(t=t.substring(1));let i=t.toLowerCase();return this._keywords.find(o=>o.enabled?o.globalName.toLowerCase()===i?!0:n?!1:!!(o.localName&&o.localName.toLowerCase()===i||o.alias&&o.alias.toLowerCase()===i||o.displayName.toLowerCase()===i):!1)}get count(){return this._keywords.length}},Dl=class{constructor(e,t){this._message="",this._appendKeywordsToMessage=!0,this._isReadOnly=!1,this._keywords=new yN,t!==void 0?this.setMessageAndKeywords(e,t):this._message=e}get jig(){return this._jig}set jig(e){this._isReadOnly||(this._jig=e)}get message(){return this._message}set message(e){this._isReadOnly||(this._message=e)}getDefaultValueDisplayText(){}getDisplayMessage(){let e=this.getDefaultValueDisplayText();return e==null?this._message:`${this._message.trim().replace(/[::]\s*$/,"")} <${e}>`}get appendKeywordsToMessage(){return this._appendKeywordsToMessage}set appendKeywordsToMessage(e){this._isReadOnly||(this._appendKeywordsToMessage=e)}get isReadOnly(){return this._isReadOnly}get keywords(){return this._keywords}getKeywordPromptFormat(){return this._keywords.getPromptFormat()}setMessageAndKeywords(e,t){if(this._isReadOnly)return this;let n=e.match(/^(.*?)\s*\[(.*?)\](.*)?$/);if(n){let[,i,o]=n;if(this._message=i.trim(),o!==void 0){let a=o.split("/").map(s=>s.trim()).filter(s=>s.length>0);this._keywords.clear();for(let s of a){let l=t.split(/\s+/).find(c=>c.toLowerCase()===s.toLowerCase());l||(l=s),this._keywords.add(s,l)}}}return this}},_a=class extends Dl{constructor(e,t){super(e,t),this._useBasePoint=!0,this._useDashedLine=!0,this._useAngleBase=!1,this._defaultValue=0,this._useDefaultValue=!1,this._allowZero=!0,this._allowNegative=!1,this._allowNone=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new k(e))}get baseAngle(){return this._baseAngle??0}set baseAngle(e){this.isReadOnly||(this._baseAngle=e)}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get useAngleBase(){return this._useAngleBase}set useAngleBase(e){this.isReadOnly||(this._useAngleBase=e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return String(this._defaultValue)}get allowZero(){return this._allowZero}set allowZero(e){this.isReadOnly||(this._allowZero=e)}get allowNegative(){return this._allowNegative}set allowNegative(e){this.isReadOnly||(this._allowNegative=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}},R1=class extends Dl{constructor(e,t){super(e),this._useBasePoint=!1,this._useDashedLine=!1,this._disableOSnap=!1,this._allowNone=!1,this._secondCornerMessage=t}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get firstCornerMessage(){return this.message}set firstCornerMessage(e){this.isReadOnly||(this.message=e)}get secondCornerMessage(){return this._secondCornerMessage}set secondCornerMessage(e){this.isReadOnly||(this._secondCornerMessage=e)}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get disableOSnap(){return this._disableOSnap}set disableOSnap(e){this.isReadOnly||(this._disableOSnap=e)}},Ns=class{constructor(e,t){this.status=e,this.stringResult=t}},ah=class extends Ns{constructor(e,t,n){super(e,n),this.value=t}},B1=class extends Dl{constructor(e,t){super(e,t),this._defaultValue=0,this._useDefaultValue=!1,this._allowNone=!1,this._allowArbitraryInput=!1,this._allowNegative=!1,this._allowZero=!0}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return String(this._defaultValue)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowArbitraryInput(){return this._allowArbitraryInput}set allowArbitraryInput(e){this.isReadOnly||(this._allowArbitraryInput=e)}get allowNegative(){return this._allowNegative}set allowNegative(e){this.isReadOnly||(this._allowNegative=e)}get allowZero(){return this._allowZero}set allowZero(e){this.isReadOnly||(this._allowZero=e)}},Zo=class extends B1{constructor(e){super(e),this._useBasePoint=!1,this._useDashedLine=!0,this._only2d=!0,this.allowNegative=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new k(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get only2d(){return this._only2d}set only2d(e){this.isReadOnly||(this._only2d=e)}},Gr=class extends B1{},JT=class extends Ns{constructor(e,t){super(e,void 0),this.value=t}},ya=class extends JT{constructor(e,t){super(e,t)}},Rl=class extends Dl{constructor(e,t){super(e,t),this._allowNone=!1,this._allowObjectOnLockedLayer=!1,this._rejectMessage="Invalid object selected.",this._allowedClasses=new Set}normalizeClassName(e){let t=e.trim();return t.startsWith("AcDb")?t.slice(4):t}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowObjectOnLockedLayer(){return this._allowObjectOnLockedLayer}set allowObjectOnLockedLayer(e){this.isReadOnly||(this._allowObjectOnLockedLayer=e)}get rejectMessage(){return this._rejectMessage}setRejectMessage(e){return this.isReadOnly||(this._rejectMessage=e),this}addAllowedClass(e){if(!this.isReadOnly){let t=this.normalizeClassName(e);t&&this._allowedClasses.add(t)}return this}removeAllowedClass(e){if(!this.isReadOnly){let t=this.normalizeClassName(e);t&&this._allowedClasses.delete(t)}return this}clearAllowedClasses(){return this.isReadOnly||this._allowedClasses.clear(),this}isClassAllowed(e){let t=this.normalizeClassName(e);return this._allowedClasses.size===0||this._allowedClasses.has(t)}},F1=class extends Ns{constructor(e,t,n){super(e),this.objectId=t,this.pickedPoint=n}},QT=class extends B1{constructor(e,t,n){super(e),typeof t=="number"&&(this._lowerLimit=Math.floor(t)),typeof n=="number"&&(this._upperLimit=Math.ceil(n))}get lowerLimit(){return this._lowerLimit}set lowerLimit(e){this.isReadOnly||(this._lowerLimit=typeof e=="number"?Math.floor(e):void 0)}get upperLimit(){return this._upperLimit}set upperLimit(e){this.isReadOnly||(this._upperLimit=typeof e=="number"?Math.floor(e):void 0)}},y1=class extends JT{constructor(e,t){super(e,t)}},Hr=class extends Dl{constructor(e,t){super(e,t),this._allowNone=!1,this._allowArbitraryInput=!1}get valueDefaultDisplayText(){return this._valueDefaultDisplayText}set valueDefaultDisplayText(e){this.isReadOnly||(this._valueDefaultDisplayText=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowArbitraryInput(){return this._allowArbitraryInput}set allowArbitraryInput(e){this.isReadOnly||(this._allowArbitraryInput=e)}},Ae=class extends Dl{constructor(e,t){super(e,t),this._useBasePoint=!1,this._useDashedLine=!1,this._allowNone=!1,this._disableOSnap=!1,this._useDefaultValue=!1}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(e==null?this._defaultValue=e:this._defaultValue=this._defaultValue?this._defaultValue.copy(e):new k(e))}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(!this._useDefaultValue||!this._defaultValue)return;let{x:e,y:t,z:n}=this._defaultValue;return n===0?`${e},${t}`:`${e},${t},${n}`}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new k(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get disableOSnap(){return this._disableOSnap}set disableOSnap(e){this.isReadOnly||(this._disableOSnap=e)}get showConfirmedPointMark(){return this._showConfirmedPointMark}set showConfirmedPointMark(e){this.isReadOnly||(this._showConfirmedPointMark=e)}},N1=class extends Ns{constructor(e,t){super(e,void 0),this.value=t}},Bd=class extends Dl{constructor(e,t){super(e,t),this._singleOnly=!1}get singleOnly(){return this._singleOnly}set singleOnly(e){this._singleOnly=e}},Nb=class extends Ns{constructor(e,t,n){super(e,n),this.value=t}},fi=class extends Dl{constructor(e,t){super(e,t),this._allowSpaces=!0,this._allowEmpty=!1,this._defaultValue="",this._useDefaultValue=!1}get allowSpaces(){return this._allowSpaces}set allowSpaces(e){this.isReadOnly||(this._allowSpaces=e)}get allowEmpty(){return this._allowEmpty}set allowEmpty(e){this.isReadOnly||(this._allowEmpty=e)}get maxLength(){return this._maxLength}set maxLength(e){this.isReadOnly||(this._maxLength=e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return this._defaultValue}},V=(r=>(r[r.Cancel=-5002]="Cancel",r[r.Error=-5001]="Error",r[r.Keyword=-5005]="Keyword",r[r.Modeless=5027]="Modeless",r[r.None=5e3]="None",r[r.OK=5100]="OK",r[r.Other=5028]="Other",r))(V||{});function s3e(r){r.style.touchAction="none",r.style.userSelect="none",r.style.setProperty("-webkit-user-select","none"),r.style.setProperty("-webkit-touch-callout","none"),r.style.setProperty("-webkit-tap-highlight-color","transparent")}function ate(){var r;let e=(r=window.getSelection)==null?void 0:r.call(window);e==null||e.rangeCount===0||e.removeAllRanges()}function l3e(r,e){s3e(r),e&&(e.style.setProperty("-webkit-touch-callout","none"),e.style.setProperty("-webkit-tap-highlight-color","transparent"));let t=o=>{o.preventDefault()},n=o=>{o.preventDefault()},i={passive:!1,capture:!0};return r.addEventListener("touchstart",t,i),r.addEventListener("selectstart",n,!0),()=>{r.removeEventListener("touchstart",t,i),r.removeEventListener("selectstart",n,!0)}}var Sd=class{static get messages(){return this._messages}static getLocaleMessage(e){return this._messages[e]}static mergeLocaleMessage(e,t){ste(this._messages[e],t)}static registerMessage(e,t){this.mergeLocaleMessage(e,t)}static setCurrentLocale(e){if(this._currentLocale===e)return;let t=this._currentLocale;this._currentLocale=e,this.events.localeChanged.dispatch({old:t,new:this._currentLocale})}static get currentLocale(){return this._currentLocale}static t(e,t){let n=this._currentLocale,i=this._messages[n],o=e.split("."),a=i;for(let s of o){if(!a||typeof a!="object")return t?.fallback??e;a=a[s]}return typeof a=="string"?a:t?.fallback??e}static cmdKey(e,t,n){return`command.${e}.${t.toLowerCase()}.${n}`}static cmd(e,t,n){return this.t(this.cmdKey(e,t,n))}static cmdDescription(e,t){return this.cmd(e,t,"description")}static cmdPrompt(e,t){return this.cmd(e,t,"prompt")}static sysCmd(e,t){return this.cmd(kl.SYSTEMT_COMMAND_GROUP_NAME,e,t)}static sysCmdKey(e,t){return this.cmdKey(kl.SYSTEMT_COMMAND_GROUP_NAME,e,t)}static userCmd(e,t){return this.cmd(kl.DEFAUT_COMMAND_GROUP_NAME,e,t)}static userCmdKey(e,t){return this.cmdKey(kl.DEFAUT_COMMAND_GROUP_NAME,e,t)}static sysCmdDescription(e){return this.cmdDescription(kl.SYSTEMT_COMMAND_GROUP_NAME,e)}static sysCmdPrompt(e){return this.cmdPrompt(kl.SYSTEMT_COMMAND_GROUP_NAME,e)}};Sd._messages={en:{},zh:{},tr:{},cs:{},ar:{}},Sd._currentLocale="en",Sd.events={localeChanged:new wt},Sd.userCmdDescription=r=>Sd.cmdDescription(kl.DEFAUT_COMMAND_GROUP_NAME,r),Sd.userCmdPrompt=r=>Sd.cmdPrompt(kl.DEFAUT_COMMAND_GROUP_NAME,r);var P=Sd;function ste(r,e){for(let t of Object.keys(e)){let n=e[t],i=r[t];NJ(i)&&NJ(n)?ste(i,n):r[t]=n}}function NJ(r){return typeof r=="object"&&r!==null}var he={ACAD:{"-hatch":{description:"Creates hatch fills through command-line options without the ribbon UI"},"-layer":{description:"Manages layers through command-line options"},about:{description:"Displays information about mlightcad"},acadver:{description:"Stores the drawing database version identifier (read-only)"},angbase:{description:"Sets the base angle 0 direction with respect to the current UCS"},angdir:{description:"Sets whether positive angles are measured clockwise or counterclockwise"},arc:{description:"Creates an arc"},aunits:{description:"Sets the display format for angles"},auprec:{description:"Sets the display precision for angles, used together with AUNITS"},bmpout:{description:"Exports to BMP"},cdxf:{description:"Exports current drawing to DXF"},cpdf:{description:"Exports current drawing to PDF"},"-cpdf":{description:"Exports current drawing to PDF using command-line options"},cecolor:{description:"Sets the current default color for newly created objects"},celtscale:{description:"Controls the linetype scale factor for newly created objects"},celtype:{description:"Sets the linetype for newly created objects"},celweight:{description:"Sets the default lineweight for newly created objects"},cetransparency:{description:"Sets the transparency for newly created objects"},cachefont:{description:"Caches a local font file into IndexedDB for text rendering"},circle:{description:"Creates one circle by center and radius"},clayer:{description:"Sets the current layer for new objects and editing operations"},cmleaderstyle:{description:"Sets the name of the current multileader style"},cmlscale:{description:"Controls the overall width of a multiline"},cmlstyle:{description:"Sets the name of the current multiline style"},colortheme:{description:"Controls the color theme of the user interface (dark or light)"},copy:{description:"Copies selected entities by cloning them to new positions",prompt:"Select entities"},csvg:{description:"Converts current drawing to SVG"},chtml:{description:"Exports current drawing to a standalone offline HTML file"},"-chtml":{description:"Exports current drawing to HTML using command-line options"},dimlinear:{description:"Creates linear dimensions"},dimstyle:{description:"Sets the name of the current dimension style"},dwgname:{description:"Stores the name of the current drawing file (read-only)"},loginname:{description:"Displays the user's login name (read-only)"},dynmode:{description:"Controls Dynamic Input settings at the cursor"},dynprompt:{description:"Controls display of prompts in Dynamic Input tooltips"},ellipse:{description:"Creates an ellipse or elliptical arc by axis endpoints or center"},erase:{description:"Deletes selected entities from the drawing",prompt:"Select entities"},extmax:{description:"Stores the upper-right corner of the model-space drawing extents (read-only)"},extmin:{description:"Stores the lower-left corner of the model-space drawing extents (read-only)"},entout:{description:"Exports a merged preview image for selected entities",prompt:"Select entities"},hideobjects:{description:"Temporarily suppresses the display of selected objects",prompt:"Select objects"},imageattach:{description:"Attaches a raster image as an external reference to the current drawing"},"-insert":{description:"Inserts a block definition into the current drawing (command-line)"},xattach:{description:"Attaches a DWG or DXF drawing as an external reference to the current drawing"},gripcolor:{description:"Sets the color of unselected grips displayed on selected objects"},griphot:{description:"Sets the color of selected (hot) grips"},gripobjlimit:{description:"Suppresses grip display when the selection set exceeds the specified number of objects (0 = no limit)"},grips:{description:"Controls whether grips are displayed on selected objects"},gripsize:{description:"Sets the size of grip boxes in pixels"},hatch:{description:"Fills an enclosed area or selected objects with a hatch pattern"},ipdf:{description:"Imports vector geometry from a PDF file"},hpang:{description:"Sets the default angle, in radians, for newly created hatch patterns"},hpassoc:{description:"Controls whether newly created hatches are associative"},hpbackgroundcolor:{description:"Sets the default background color for newly created hatch patterns"},hpcolor:{description:"Sets the default color for newly created hatches"},hpdouble:{description:"Controls whether user-defined hatch patterns are doubled"},hpislanddetection:{description:"Controls how islands within newly created hatch boundaries are treated"},hplayer:{description:"Sets the default layer for newly created hatches and fills"},hpname:{description:"Sets the default pattern name for newly created hatches in this session"},hpscale:{description:"Sets the default scale factor for newly created hatch patterns"},hpseparate:{description:"Controls whether one or separate hatch objects are created for multiple boundaries"},hptransparency:{description:"Sets the default transparency for newly created hatches and fills"},insunits:{description:"Specifies drawing units for automatic scaling of inserted blocks, images, or xrefs"},jpgout:{description:"Exports to JPEG"},laycur:{description:"Changes the layer property of selected objects to the current layer",prompt:"Select objects to be changed to the current layer"},laydel:{description:"Deletes a layer and all objects on that layer"},layerclose:{description:"Closes the Layer Properties Manager"},layerp:{description:"Undoes the last change or set of changes made to layer settings"},layfrz:{description:"Freezes the layer of selected objects",prompt:"Select object on layer to freeze"},layiso:{description:"Isolates the layers of selected objects",prompt:"Select objects on layers to isolate"},laylck:{description:"Locks the layer of selected objects",prompt:"Select object on layer to lock"},layoff:{description:"Turns off the layer of selected objects",prompt:"Select object on layer to turn off"},layon:{description:"Turns on all layers in the drawing"},laythw:{description:"Thaws all frozen layers in the drawing"},layulk:{description:"Unlocks the layer of selected objects",prompt:"Select object on layer to unlock"},layuniso:{description:"Restores layers hidden or locked by LAYISO"},line:{description:"Draws straight line segments between points"},log:{description:"Logs debug information in console"},ltscale:{description:"Sets the global linetype scale factor for the drawing"},lunits:{description:"Sets the display format for coordinates and distances"},luprec:{description:"Sets the display precision for linear units, used together with LUNITS"},lwdisplay:{description:"Controls whether lineweights are displayed in the drawing"},clearmeasurements:{description:"Removes all measurements from the current layout"},measurementvis:{description:"Shows or hides measurements on the current layout"},measurementpanel:{description:"Opens the measurement palette"},measurementexport:{description:"Exports measurements to a sidecar JSON file"},measurementimport:{description:"Imports measurements from a sidecar JSON file"},measurearea:{description:"Calculates the area and perimeter of selected objects or points"},measureangle:{description:"Measures the angle between two lines or three points"},measurearc:{description:"Measures the length of an arc segment"},measuredistance:{description:"Measures the distance and delta values between two points"},measurecontinuous:{description:"Measures chained distances by picking successive points until Enter or Cancel"},measurepoint:{description:"Measures the X/Y coordinates of a picked point"},measurement:{description:"Sets whether the drawing uses English (imperial) or metric units"},measurementcolor:{description:"Sets the color used for measurement overlays"},modelbkcolor:{description:"Sets the background color of the model-space drawing area"},mline:{description:"Creates multiple parallel lines as one multiline object"},move:{description:"Moves selected entities by a displacement vector",prompt:"Select entities"},offset:{description:"Creates parallel curves, polylines, or circles at a specified distance"},mtext:{description:"Creates one mtext entity"},open:{description:"Opens an existing drawing file"},openprof:{description:"Controls whether open-file stage timing profiles are logged to the console"},openperf:{description:"Opens the Open Performance palette with timings from the last drawing open"},orthomode:{description:"Constrains cursor movement to the horizontal or vertical axis"},osmode:{description:"Sets running Object Snap modes using a bitcode value"},pan:{description:"Shifts the view without changing the viewing direction or magnification"},paperbkcolor:{description:"Sets the background color of the paper-space (layout) drawing area"},pdmode:{description:"Controls how POINT entities are displayed"},pdsize:{description:"Sets the display size for POINT entities"},pickbox:{description:"Sets the size (in pixels) of the selection box used to pick objects"},pline:{description:"Creates a polyline by specifying multiple points"},pngout:{description:"Exports to PNG"},point:{description:"Creates points"},polaraddang:{description:"Stores additional polar tracking angles as a semicolon-separated list"},polarang:{description:"Sets the polar angle increment for polar tracking"},polarmode:{description:"Controls polar and object snap tracking settings"},polygon:{description:"Creates a regular polygon by center/radius or by one polygon edge"},qnew:{description:"Starts a new drawing"},close:{description:"Closes the current drawing"},ray:{description:"Creates a ray that starts at a point and extends to infinity"},rectang:{description:"Creates a rectangle by specifying two opposite corners"},regen:{description:"Redraws the current drawing"},revcloud:{description:"Creates or modifies a revision cloud"},markuptext:{description:"Places a text markup label"},markupline:{description:"Creates a line markup"},markuparrow:{description:"Creates an arrow markup"},markupcloud:{description:"Creates a revision cloud markup"},markuprect:{description:"Creates a rectangle markup"},markupcircle:{description:"Creates a circle markup"},markuphighlight:{description:"Creates a highlight rectangle markup"},markupcallout:{description:"Creates a callout: pick leader tip, place text box, then enter text"},markupstamp:{description:"Places a stamp or custom symbol"},markupvis:{description:"Shows or hides markups"},clearmarkups:{description:"Clears all markups on the current layout"},markupexport:{description:"Exports markups to a sidecar JSON file"},markupimport:{description:"Imports markups from a sidecar JSON file"},markuppanel:{description:"Opens the markup palette"},rotate:{description:"Rotates selected entities around a base point",prompt:"Select entities"},select:{description:"Selects entities"},shortcutmenu:{description:"Controls the availability of shortcut menus in the drawing area"},sketch:{description:"Creates a series of freehand line segments"},spline:{description:"Creates a smooth spline curve by specifying control points"},textstyle:{description:"Sets the name of the current text style"},unitmode:{description:"Controls fractional display of coordinates when LUNITS is Architectural or Fractional"},switchbg:{description:"Toggles the drawing area background between white and black"},readingmode:{description:"Toggles reading mode: black linework on a white canvas for easier review"},unisolateobjects:{description:"Redisplay all objects hidden by HIDEOBJECTS"},undo:{description:"Undoes the last database editing operation",nothingToUndo:"Nothing to undo."},redo:{description:"Redoes the last undone database editing operation",nothingToRedo:"Nothing to redo."},xline:{description:"Creates a construction line that extends infinitely in both directions"},zoom:{description:"Zooms to display the maximum extents of all entities"}},USER:{}},c3e={...he,ACAD:{...he.ACAD,"-hatch":{...he.ACAD["-hatch"],description:"\u0625\u0646\u0634\u0627\u0621 \u062A\u0639\u0628\u0626\u0629 \u062A\u0647\u0634\u064A\u0631 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u062E\u064A\u0627\u0631\u0627\u062A \u0633\u0637\u0631 \u0627\u0644\u0623\u0648\u0627\u0645\u0631 \u062F\u0648\u0646 \u0648\u0627\u062C\u0647\u0629 \u0627\u0644\u0634\u0631\u064A\u0637"},"-layer":{...he.ACAD["-layer"],description:"\u0625\u062F\u0627\u0631\u0629 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u062E\u064A\u0627\u0631\u0627\u062A \u0633\u0637\u0631 \u0627\u0644\u0623\u0648\u0627\u0645\u0631"},about:{...he.ACAD.about,description:"\u0639\u0631\u0636 \u0645\u0639\u0644\u0648\u0645\u0627\u062A \u062D\u0648\u0644 mlightcad"},acadver:{...he.ACAD.acadver,description:"\u0639\u0631\u0636 \u0645\u0639\u0631\u0651\u0641 \u0625\u0635\u062F\u0627\u0631 \u0642\u0627\u0639\u062F\u0629 \u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u0631\u0633\u0645 (\u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637)"},angbase:{...he.ACAD.angbase,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u062A\u062C\u0627\u0647 \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u0623\u0633\u0627\u0633 0 \u0628\u0627\u0644\u0646\u0633\u0628\u0629 \u0625\u0644\u0649 \u0646\u0638\u0627\u0645 \u0627\u0644\u0625\u062D\u062F\u0627\u062B\u064A\u0627\u062A UCS \u0627\u0644\u062D\u0627\u0644\u064A"},angdir:{...he.ACAD.angdir,description:"\u062A\u062D\u062F\u064A\u062F \u0645\u0627 \u0625\u0630\u0627 \u0643\u0627\u0646\u062A \u0627\u0644\u0632\u0648\u0627\u064A\u0627 \u0627\u0644\u0645\u0648\u062C\u0628\u0629 \u062A\u064F\u0642\u0627\u0633 \u0645\u0639 \u0623\u0648 \u0639\u0643\u0633 \u0627\u062A\u062C\u0627\u0647 \u0639\u0642\u0627\u0631\u0628 \u0627\u0644\u0633\u0627\u0639\u0629"},arc:{...he.ACAD.arc,description:"\u0625\u0646\u0634\u0627\u0621 \u0642\u0648\u0633"},aunits:{...he.ACAD.aunits,description:"\u062A\u062D\u062F\u064A\u062F \u062A\u0646\u0633\u064A\u0642 \u0639\u0631\u0636 \u0627\u0644\u0632\u0648\u0627\u064A\u0627"},auprec:{...he.ACAD.auprec,description:"\u062A\u062D\u062F\u064A\u062F \u062F\u0642\u0629 \u0639\u0631\u0636 \u0627\u0644\u0632\u0648\u0627\u064A\u0627 \u0628\u0627\u0644\u062A\u0643\u0627\u0645\u0644 \u0645\u0639 AUNITS"},bmpout:{...he.ACAD.bmpout,description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0625\u0644\u0649 BMP"},cdxf:{...he.ACAD.cdxf,description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A \u0625\u0644\u0649 DXF"},cpdf:{...he.ACAD.cpdf,description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A \u0625\u0644\u0649 PDF"},"-cpdf":{...he.ACAD["-cpdf"],description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A \u0625\u0644\u0649 PDF \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u062E\u064A\u0627\u0631\u0627\u062A \u0633\u0637\u0631 \u0627\u0644\u0623\u0648\u0627\u0645\u0631"},cecolor:{...he.ACAD.cecolor,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0644\u0648\u0646 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A \u0627\u0644\u062D\u0627\u0644\u064A \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},celtscale:{...he.ACAD.celtscale,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0645\u0639\u0627\u0645\u0644 \u0645\u0642\u064A\u0627\u0633 \u0646\u0648\u0639 \u0627\u0644\u062E\u0637 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},celtype:{...he.ACAD.celtype,description:"\u062A\u062D\u062F\u064A\u062F \u0646\u0648\u0639 \u0627\u0644\u062E\u0637 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},celweight:{...he.ACAD.celweight,description:"\u062A\u062D\u062F\u064A\u062F \u0633\u064F\u0645\u0643 \u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},cetransparency:{...he.ACAD.cetransparency,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0634\u0641\u0627\u0641\u064A\u0629 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},cachefont:{...he.ACAD.cachefont,description:"\u062A\u062E\u0632\u064A\u0646 \u0645\u0644\u0641 \u062E\u0637 \u0645\u062D\u0644\u064A \u0645\u0624\u0642\u062A\u064B\u0627 \u0641\u064A IndexedDB \u0644\u0627\u0633\u062A\u062E\u062F\u0627\u0645\u0647 \u0641\u064A \u0639\u0631\u0636 \u0627\u0644\u0646\u0635"},circle:{...he.ACAD.circle,description:"\u0625\u0646\u0634\u0627\u0621 \u062F\u0627\u0626\u0631\u0629 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0645\u0631\u0643\u0632 \u0648\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631"},clayer:{...he.ACAD.clayer,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629 \u0648\u0639\u0645\u0644\u064A\u0627\u062A \u0627\u0644\u062A\u062D\u0631\u064A\u0631"},cmleaderstyle:{...he.ACAD.cmleaderstyle,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0633\u0645 \u0646\u0645\u0637 Multileader \u0627\u0644\u062D\u0627\u0644\u064A"},cmlscale:{...he.ACAD.cmlscale,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0643\u0644\u064A \u0644\u0644\u062E\u0637 \u0645\u062A\u0639\u062F\u062F \u0627\u0644\u0645\u0633\u0627\u0631\u0627\u062A"},cmlstyle:{...he.ACAD.cmlstyle,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0633\u0645 \u0646\u0645\u0637 \u0627\u0644\u062E\u0637 \u0645\u062A\u0639\u062F\u062F \u0627\u0644\u0645\u0633\u0627\u0631\u0627\u062A \u0627\u0644\u062D\u0627\u0644\u064A"},colortheme:{...he.ACAD.colortheme,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0633\u0645\u0629 \u0623\u0644\u0648\u0627\u0646 \u0648\u0627\u062C\u0647\u0629 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0628\u064A\u0646 \u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u062F\u0627\u0643\u0646 \u0648\u0627\u0644\u0641\u0627\u062A\u062D"},copy:{...he.ACAD.copy,description:"\u0646\u0633\u062E \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0625\u0644\u0649 \u0645\u0648\u0627\u0636\u0639 \u062C\u062F\u064A\u062F\u0629",prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631"},csvg:{...he.ACAD.csvg,description:"\u062A\u062D\u0648\u064A\u0644 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A \u0625\u0644\u0649 SVG"},chtml:{...he.ACAD.chtml,description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A \u0625\u0644\u0649 \u0645\u0644\u0641 HTML \u0645\u0633\u062A\u0642\u0644 \u064A\u0639\u0645\u0644 \u062F\u0648\u0646 \u0627\u062A\u0635\u0627\u0644"},"-chtml":{...he.ACAD["-chtml"],description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A \u0625\u0644\u0649 HTML \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u062E\u064A\u0627\u0631\u0627\u062A \u0633\u0637\u0631 \u0627\u0644\u0623\u0648\u0627\u0645\u0631"},dimlinear:{...he.ACAD.dimlinear,description:"\u0625\u0646\u0634\u0627\u0621 \u0623\u0628\u0639\u0627\u062F \u062E\u0637\u064A\u0629"},dimstyle:{...he.ACAD.dimstyle,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0633\u0645 \u0646\u0645\u0637 \u0627\u0644\u0623\u0628\u0639\u0627\u062F \u0627\u0644\u062D\u0627\u0644\u064A"},dwgname:{...he.ACAD.dwgname,description:"\u0639\u0631\u0636 \u0627\u0633\u0645 \u0645\u0644\u0641 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A (\u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637)"},loginname:{...he.ACAD.loginname,description:"\u0639\u0631\u0636 \u0627\u0633\u0645 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 (\u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637)"},dynmode:{...he.ACAD.dynmode,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u062F\u064A\u0646\u0627\u0645\u064A\u0643\u064A \u0639\u0646\u062F \u0627\u0644\u0645\u0624\u0634\u0631"},dynprompt:{...he.ACAD.dynprompt,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0639\u0631\u0636 \u0631\u0633\u0627\u0626\u0644 \u0627\u0644\u0623\u0648\u0627\u0645\u0631 \u062F\u0627\u062E\u0644 \u062A\u0644\u0645\u064A\u062D\u0627\u062A \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u062F\u064A\u0646\u0627\u0645\u064A\u0643\u064A"},ellipse:{...he.ACAD.ellipse,description:"\u0625\u0646\u0634\u0627\u0621 \u0642\u0637\u0639 \u0646\u0627\u0642\u0635 \u0623\u0648 \u0642\u0648\u0633 \u0628\u064A\u0636\u0627\u0648\u064A \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0646\u0647\u0627\u064A\u0627\u062A \u0627\u0644\u0645\u062D\u0648\u0631 \u0623\u0648 \u0627\u0644\u0645\u0631\u0643\u0632"},erase:{...he.ACAD.erase,description:"\u062D\u0630\u0641 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0645\u0646 \u0627\u0644\u0631\u0633\u0645",prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631"},extmax:{...he.ACAD.extmax,description:"\u0639\u0631\u0636 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0639\u0644\u0648\u064A \u0627\u0644\u0623\u064A\u0645\u0646 \u0644\u062D\u062F\u0648\u062F \u0627\u0644\u0631\u0633\u0645 \u0641\u064A \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0646\u0645\u0648\u0630\u062C (\u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637)"},extmin:{...he.ACAD.extmin,description:"\u0639\u0631\u0636 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0633\u0641\u0644\u064A \u0627\u0644\u0623\u064A\u0633\u0631 \u0644\u062D\u062F\u0648\u062F \u0627\u0644\u0631\u0633\u0645 \u0641\u064A \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0646\u0645\u0648\u0630\u062C (\u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637)"},entout:{...he.ACAD.entout,description:"\u062A\u0635\u062F\u064A\u0631 \u0635\u0648\u0631\u0629 \u0645\u0639\u0627\u064A\u0646\u0629 \u0645\u062F\u0645\u062C\u0629 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631"},hideobjects:{...he.ACAD.hideobjects,description:"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0645\u0624\u0642\u062A\u064B\u0627 \u0645\u0646 \u0627\u0644\u0639\u0631\u0636",prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631"},imageattach:{...he.ACAD.imageattach,description:"\u0625\u0631\u0641\u0627\u0642 \u0635\u0648\u0631\u0629 \u0646\u0642\u0637\u064A\u0629 \u0643\u0645\u0631\u062C\u0639 \u062E\u0627\u0631\u062C\u064A \u0625\u0644\u0649 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A"},"-insert":{...he.ACAD["-insert"],description:"\u0625\u062F\u0631\u0627\u062C \u062A\u0639\u0631\u064A\u0641 \u0643\u062A\u0644\u0629 \u062F\u0627\u062E\u0644 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0633\u0637\u0631 \u0627\u0644\u0623\u0648\u0627\u0645\u0631"},xattach:{...he.ACAD.xattach,description:"\u0625\u0631\u0641\u0627\u0642 \u0631\u0633\u0645 DWG \u0623\u0648 DXF \u0643\u0645\u0631\u062C\u0639 \u062E\u0627\u0631\u062C\u064A \u0625\u0644\u0649 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A"},gripcolor:{...he.ACAD.gripcolor,description:"\u062A\u062D\u062F\u064A\u062F \u0644\u0648\u0646 \u0645\u0642\u0627\u0628\u0636 \u0627\u0644\u062A\u062D\u0643\u0645 \u063A\u064A\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629"},griphot:{...he.ACAD.griphot,description:"\u062A\u062D\u062F\u064A\u062F \u0644\u0648\u0646 \u0645\u0642\u0627\u0628\u0636 \u0627\u0644\u062A\u062D\u0643\u0645 \u0627\u0644\u0645\u062D\u062F\u062F\u0629"},gripobjlimit:{...he.ACAD.gripobjlimit,description:"\u0625\u064A\u0642\u0627\u0641 \u0639\u0631\u0636 \u0645\u0642\u0627\u0628\u0636 \u0627\u0644\u062A\u062D\u0643\u0645 \u0639\u0646\u062F\u0645\u0627 \u064A\u062A\u062C\u0627\u0648\u0632 \u0639\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0627\u0644\u062D\u062F \u0627\u0644\u0645\u0639\u064A\u0646\u060C \u0648\u0627\u0644\u0642\u064A\u0645\u0629 0 \u062A\u0639\u0646\u064A \u0639\u062F\u0645 \u0648\u062C\u0648\u062F \u062D\u062F"},grips:{...he.ACAD.grips,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0639\u0631\u0636 \u0645\u0642\u0627\u0628\u0636 \u0627\u0644\u062A\u062D\u0643\u0645 \u0639\u0644\u0649 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629"},gripsize:{...he.ACAD.gripsize,description:"\u062A\u062D\u062F\u064A\u062F \u062D\u062C\u0645 \u0645\u0631\u0628\u0639\u0627\u062A \u0645\u0642\u0627\u0628\u0636 \u0627\u0644\u062A\u062D\u0643\u0645 \u0628\u0627\u0644\u0628\u0643\u0633\u0644"},hatch:{...he.ACAD.hatch,description:"\u0645\u0644\u0621 \u0645\u0646\u0637\u0642\u0629 \u0645\u063A\u0644\u0642\u0629 \u0623\u0648 \u0639\u0646\u0627\u0635\u0631 \u0645\u062D\u062F\u062F\u0629 \u0628\u0646\u0645\u0637 \u062A\u0647\u0634\u064A\u0631"},ipdf:{...he.ACAD.ipdf,description:"\u0627\u0633\u062A\u064A\u0631\u0627\u062F \u0627\u0644\u0647\u0646\u062F\u0633\u0629 \u0627\u0644\u0645\u062A\u062C\u0647\u064A\u0629 \u0645\u0646 \u0645\u0644\u0641 PDF"},hpang:{...he.ACAD.hpang,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A\u0629 \u0628\u0627\u0644\u0631\u0627\u062F\u064A\u0627\u0646 \u0644\u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},hpassoc:{...he.ACAD.hpassoc,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0643\u0648\u0646 \u0627\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u062C\u062F\u064A\u062F \u062A\u0631\u0627\u0628\u0637\u064A\u064B\u0627"},hpbackgroundcolor:{...he.ACAD.hpbackgroundcolor,description:"\u062A\u062D\u062F\u064A\u062F \u0644\u0648\u0646 \u0627\u0644\u062E\u0644\u0641\u064A\u0629 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A \u0644\u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},hpcolor:{...he.ACAD.hpcolor,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0644\u0648\u0646 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A \u0644\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u062C\u062F\u064A\u062F"},hpdouble:{...he.ACAD.hpdouble,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0645\u0636\u0627\u0639\u0641\u0629 \u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u0645\u0639\u0631\u0641\u0629 \u0628\u0648\u0627\u0633\u0637\u0629 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645"},hpislanddetection:{...he.ACAD.hpislanddetection,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0643\u064A\u0641\u064A\u0629 \u0627\u0644\u062A\u0639\u0627\u0645\u0644 \u0645\u0639 \u0627\u0644\u062C\u0632\u0631 \u062F\u0627\u062E\u0644 \u062D\u062F\u0648\u062F \u0627\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},hplayer:{...he.ACAD.hplayer,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A\u0629 \u0644\u0644\u062A\u0647\u0634\u064A\u0631 \u0648\u0627\u0644\u062A\u0639\u0628\u0626\u0629 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},hpname:{...he.ACAD.hpname,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0633\u0645 \u0646\u0645\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629 \u0641\u064A \u0627\u0644\u062C\u0644\u0633\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629"},hpscale:{...he.ACAD.hpscale,description:"\u062A\u062D\u062F\u064A\u062F \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A \u0644\u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},hpseparate:{...he.ACAD.hpseparate,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0625\u0646\u0634\u0627\u0621 \u0639\u0646\u0635\u0631 \u062A\u0647\u0634\u064A\u0631 \u0648\u0627\u062D\u062F \u0623\u0648 \u0639\u0646\u0627\u0635\u0631 \u0645\u0646\u0641\u0635\u0644\u0629 \u0639\u0646\u062F \u0648\u062C\u0648\u062F \u0639\u062F\u0629 \u062D\u062F\u0648\u062F"},hptransparency:{...he.ACAD.hptransparency,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0634\u0641\u0627\u0641\u064A\u0629 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A\u0629 \u0644\u0644\u062A\u0647\u0634\u064A\u0631 \u0648\u0627\u0644\u062A\u0639\u0628\u0626\u0629 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},insunits:{...he.ACAD.insunits,description:"\u062A\u062D\u062F\u064A\u062F \u0648\u062D\u062F\u0627\u062A \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645\u0629 \u0641\u064A \u0627\u0644\u062A\u062D\u062C\u064A\u0645 \u0627\u0644\u062A\u0644\u0642\u0627\u0626\u064A \u0644\u0644\u0643\u062A\u0644 \u0648\u0627\u0644\u0635\u0648\u0631 \u0648\u0627\u0644\u0645\u0631\u0627\u062C\u0639 \u0627\u0644\u062E\u0627\u0631\u062C\u064A\u0629 \u0639\u0646\u062F \u0627\u0644\u0625\u062F\u0631\u0627\u062C"},jpgout:{...he.ACAD.jpgout,description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0625\u0644\u0649 JPEG"},laycur:{...he.ACAD.laycur,description:"\u062A\u063A\u064A\u064A\u0631 \u0637\u0628\u0642\u0629 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629",prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0646\u0642\u0644\u0647\u0627 \u0625\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629"},laydel:{...he.ACAD.laydel,description:"\u062D\u0630\u0641 \u0637\u0628\u0642\u0629 \u0648\u062C\u0645\u064A\u0639 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u0648\u062C\u0648\u062F\u0629 \u0639\u0644\u064A\u0647\u0627"},layerclose:{...he.ACAD.layerclose,description:"\u0625\u063A\u0644\u0627\u0642 \u0645\u062F\u064A\u0631 \u062E\u0635\u0627\u0626\u0635 \u0627\u0644\u0637\u0628\u0642\u0627\u062A"},layerp:{...he.ACAD.layerp,description:"\u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646 \u0622\u062E\u0631 \u062A\u063A\u064A\u064A\u0631 \u0623\u0648 \u0645\u062C\u0645\u0648\u0639\u0629 \u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0641\u064A \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0637\u0628\u0642\u0627\u062A"},layfrz:{...he.ACAD.layfrz,description:"\u062A\u062C\u0645\u064A\u062F \u0637\u0628\u0642\u0629 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0631\u0627\u062F \u062A\u062C\u0645\u064A\u062F\u0647\u0627"},layiso:{...he.ACAD.layiso,description:"\u0639\u0632\u0644 \u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",prompt:"\u062D\u062F\u062F \u0639\u0646\u0627\u0635\u0631 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0631\u0627\u062F \u0639\u0632\u0644\u0647\u0627"},laylck:{...he.ACAD.laylck,description:"\u0642\u0641\u0644 \u0637\u0628\u0642\u0629 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0631\u0627\u062F \u0642\u0641\u0644\u0647\u0627"},layoff:{...he.ACAD.layoff,description:"\u0625\u064A\u0642\u0627\u0641 \u0637\u0628\u0642\u0629 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0631\u0627\u062F \u0625\u064A\u0642\u0627\u0641\u0647\u0627"},layon:{...he.ACAD.layon,description:"\u062A\u0634\u063A\u064A\u0644 \u062C\u0645\u064A\u0639 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0641\u064A \u0627\u0644\u0631\u0633\u0645"},laythw:{...he.ACAD.laythw,description:"\u0625\u0644\u063A\u0627\u0621 \u062A\u062C\u0645\u064A\u062F \u062C\u0645\u064A\u0639 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u062C\u0645\u062F\u0629 \u0641\u064A \u0627\u0644\u0631\u0633\u0645"},layulk:{...he.ACAD.layulk,description:"\u0625\u0644\u063A\u0627\u0621 \u0642\u0641\u0644 \u0637\u0628\u0642\u0629 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0631\u0627\u062F \u0625\u0644\u063A\u0627\u0621 \u0642\u0641\u0644\u0647\u0627"},layuniso:{...he.ACAD.layuniso,description:"\u0627\u0633\u062A\u0639\u0627\u062F\u0629 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u062A\u064A \u062A\u0645 \u0625\u062E\u0641\u0627\u0624\u0647\u0627 \u0623\u0648 \u0642\u0641\u0644\u0647\u0627 \u0628\u0648\u0627\u0633\u0637\u0629 LAYISO"},line:{...he.ACAD.line,description:"\u0631\u0633\u0645 \u0645\u0642\u0627\u0637\u0639 \u062E\u0637\u0648\u0637 \u0645\u0633\u062A\u0642\u064A\u0645\u0629 \u0628\u064A\u0646 \u0627\u0644\u0646\u0642\u0627\u0637"},log:{...he.ACAD.log,description:"\u062A\u0633\u062C\u064A\u0644 \u0645\u0639\u0644\u0648\u0645\u0627\u062A \u062A\u0635\u062D\u064A\u062D \u0627\u0644\u0623\u062E\u0637\u0627\u0621 \u0641\u064A \u0648\u062D\u062F\u0629 \u0627\u0644\u062A\u062D\u0643\u0645"},ltscale:{...he.ACAD.ltscale,description:"\u062A\u062D\u062F\u064A\u062F \u0645\u0639\u0627\u0645\u0644 \u0645\u0642\u064A\u0627\u0633 \u0646\u0648\u0639 \u0627\u0644\u062E\u0637 \u0627\u0644\u0639\u0627\u0645 \u0644\u0644\u0631\u0633\u0645"},lunits:{...he.ACAD.lunits,description:"\u062A\u062D\u062F\u064A\u062F \u062A\u0646\u0633\u064A\u0642 \u0639\u0631\u0636 \u0627\u0644\u0625\u062D\u062F\u0627\u062B\u064A\u0627\u062A \u0648\u0627\u0644\u0645\u0633\u0627\u0641\u0627\u062A"},luprec:{...he.ACAD.luprec,description:"\u062A\u062D\u062F\u064A\u062F \u062F\u0642\u0629 \u0639\u0631\u0636 \u0627\u0644\u0648\u062D\u062F\u0627\u062A \u0627\u0644\u062E\u0637\u064A\u0629 \u0628\u0627\u0644\u062A\u0643\u0627\u0645\u0644 \u0645\u0639 LUNITS"},lwdisplay:{...he.ACAD.lwdisplay,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0639\u0631\u0636 \u0633\u064F\u0645\u0643 \u0627\u0644\u062E\u0637\u0648\u0637 \u062F\u0627\u062E\u0644 \u0627\u0644\u0631\u0633\u0645"},clearmeasurements:{...he.ACAD.clearmeasurements,description:"\u0625\u0632\u0627\u0644\u0629 \u062C\u0645\u064A\u0639 \u0627\u0644\u0642\u064A\u0627\u0633\u0627\u062A \u0645\u0646 \u0627\u0644\u0645\u062E\u0637\u0637 \u0627\u0644\u062D\u0627\u0644\u064A"},measurementvis:{...he.ACAD.measurementvis,description:"\u0625\u0638\u0647\u0627\u0631 \u0623\u0648 \u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u0642\u064A\u0627\u0633\u0627\u062A \u0641\u064A \u0627\u0644\u0645\u062E\u0637\u0637 \u0627\u0644\u062D\u0627\u0644\u064A"},measurementpanel:{...he.ACAD.measurementpanel,description:"\u0641\u062A\u062D \u0644\u0648\u062D\u0629 \u0627\u0644\u0642\u064A\u0627\u0633"},measurementexport:{...he.ACAD.measurementexport,description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0642\u064A\u0627\u0633\u0627\u062A \u0625\u0644\u0649 \u0645\u0644\u0641 JSON \u062C\u0627\u0646\u0628\u064A"},measurementimport:{...he.ACAD.measurementimport,description:"\u0627\u0633\u062A\u064A\u0631\u0627\u062F \u0627\u0644\u0642\u064A\u0627\u0633\u0627\u062A \u0645\u0646 \u0645\u0644\u0641 JSON \u062C\u0627\u0646\u0628\u064A"},measurearea:{...he.ACAD.measurearea,description:"\u062D\u0633\u0627\u0628 \u0627\u0644\u0645\u0633\u0627\u062D\u0629 \u0648\u0627\u0644\u0645\u062D\u064A\u0637 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0623\u0648 \u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u0645\u062D\u062F\u062F\u0629"},measureangle:{...he.ACAD.measureangle,description:"\u0642\u064A\u0627\u0633 \u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u0628\u064A\u0646 \u062E\u0637\u064A\u0646 \u0623\u0648 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u062B\u0644\u0627\u062B \u0646\u0642\u0627\u0637"},measurearc:{...he.ACAD.measurearc,description:"\u0642\u064A\u0627\u0633 \u0637\u0648\u0644 \u0645\u0642\u0637\u0639 \u0642\u0648\u0633"},measuredistance:{...he.ACAD.measuredistance,description:"\u0642\u064A\u0627\u0633 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0648\u0641\u0631\u0648\u0642 \u0627\u0644\u0625\u062D\u062F\u0627\u062B\u064A\u0627\u062A \u0628\u064A\u0646 \u0646\u0642\u0637\u062A\u064A\u0646"},measurecontinuous:{...he.ACAD.measurecontinuous,description:"\u0642\u064A\u0627\u0633 \u0645\u0633\u0627\u0641\u0627\u062A \u0645\u062A\u0633\u0644\u0633\u0644\u0629 \u0628\u0627\u062E\u062A\u064A\u0627\u0631 \u0646\u0642\u0627\u0637 \u0645\u062A\u062A\u0627\u0644\u064A\u0629 \u062D\u062A\u0649 Enter \u0623\u0648 \u0625\u0644\u063A\u0627\u0621"},measurepoint:{...he.ACAD.measurepoint,description:"\u0642\u064A\u0627\u0633 \u0625\u062D\u062F\u0627\u062B\u064A\u0627\u062A X \u0648Y \u0644\u0646\u0642\u0637\u0629 \u0645\u062D\u062F\u062F\u0629"},measurement:{...he.ACAD.measurement,description:"\u062A\u062D\u062F\u064A\u062F \u0645\u0627 \u0625\u0630\u0627 \u0643\u0627\u0646 \u0627\u0644\u0631\u0633\u0645 \u064A\u0633\u062A\u062E\u062F\u0645 \u0627\u0644\u0648\u062D\u062F\u0627\u062A \u0627\u0644\u0625\u0645\u0628\u0631\u0627\u0637\u0648\u0631\u064A\u0629 \u0623\u0648 \u0627\u0644\u0645\u062A\u0631\u064A\u0629"},measurementcolor:{...he.ACAD.measurementcolor,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0644\u0648\u0646 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0644\u062A\u0631\u0627\u0643\u0628\u0627\u062A \u0627\u0644\u0642\u064A\u0627\u0633"},modelbkcolor:{...he.ACAD.modelbkcolor,description:"\u062A\u062D\u062F\u064A\u062F \u0644\u0648\u0646 \u062E\u0644\u0641\u064A\u0629 \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0646\u0645\u0648\u0630\u062C"},mline:{...he.ACAD.mline,description:"\u0625\u0646\u0634\u0627\u0621 \u0639\u062F\u0629 \u062E\u0637\u0648\u0637 \u0645\u062A\u0648\u0627\u0632\u064A\u0629 \u0643\u0639\u0646\u0635\u0631 \u0645\u062A\u0639\u062F\u062F \u0627\u0644\u062E\u0637\u0648\u0637 \u0648\u0627\u062D\u062F"},move:{...he.ACAD.move,description:"\u0646\u0642\u0644 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0645\u062A\u062C\u0647 \u0625\u0632\u0627\u062D\u0629",prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631"},offset:{...he.ACAD.offset,description:"\u0625\u0646\u0634\u0627\u0621 \u0645\u0646\u062D\u0646\u064A\u0627\u062A \u0623\u0648 \u062E\u0637\u0648\u0637 \u0645\u062A\u0639\u062F\u062F\u0629 \u0623\u0648 \u062F\u0648\u0627\u0626\u0631 \u0645\u0648\u0627\u0632\u064A\u0629 \u0639\u0644\u0649 \u0645\u0633\u0627\u0641\u0629 \u0645\u062D\u062F\u062F\u0629"},mtext:{...he.ACAD.mtext,description:"\u0625\u0646\u0634\u0627\u0621 \u0639\u0646\u0635\u0631 \u0646\u0635 \u0645\u062A\u0639\u062F\u062F \u0627\u0644\u0623\u0633\u0637\u0631"},open:{...he.ACAD.open,description:"\u0641\u062A\u062D \u0645\u0644\u0641 \u0631\u0633\u0645 \u0645\u0648\u062C\u0648\u062F"},openprof:{...he.ACAD.openprof,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u062A\u0633\u062C\u064A\u0644 \u0623\u0632\u0645\u0646\u0629 \u0645\u0631\u0627\u062D\u0644 \u0641\u062A\u062D \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u062F\u0627\u062E\u0644 \u0648\u062D\u062F\u0629 \u0627\u0644\u062A\u062D\u0643\u0645"},openperf:{...he.ACAD.openperf,description:"\u0641\u062A\u062D \u0644\u0648\u062D\u0629 \u0623\u062F\u0627\u0621 \u0627\u0644\u0641\u062A\u062D \u0648\u0639\u0631\u0636 \u0623\u0632\u0645\u0646\u0629 \u0622\u062E\u0631 \u0639\u0645\u0644\u064A\u0629 \u0641\u062A\u062D \u0644\u0644\u0631\u0633\u0645"},orthomode:{...he.ACAD.orthomode,description:"\u062A\u0642\u064A\u064A\u062F \u062D\u0631\u0643\u0629 \u0627\u0644\u0645\u0624\u0634\u0631 \u0639\u0644\u0649 \u0627\u0644\u0645\u062D\u0648\u0631 \u0627\u0644\u0623\u0641\u0642\u064A \u0623\u0648 \u0627\u0644\u0631\u0623\u0633\u064A"},osmode:{...he.ACAD.osmode,description:"\u062A\u062D\u062F\u064A\u062F \u0623\u0648\u0636\u0627\u0639 Object Snap \u0627\u0644\u0645\u0633\u062A\u0645\u0631\u0629 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0642\u064A\u0645\u0629 bitcode"},pan:{...he.ACAD.pan,description:"\u062A\u062D\u0631\u064A\u0643 \u0627\u0644\u0639\u0631\u0636 \u062F\u0648\u0646 \u062A\u063A\u064A\u064A\u0631 \u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u0631\u0624\u064A\u0629 \u0623\u0648 \u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u062A\u0643\u0628\u064A\u0631"},paperbkcolor:{...he.ACAD.paperbkcolor,description:"\u062A\u062D\u062F\u064A\u062F \u0644\u0648\u0646 \u062E\u0644\u0641\u064A\u0629 \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0648\u0631\u0642 \u0623\u0648 \u0627\u0644\u0645\u062E\u0637\u0637"},pdmode:{...he.ACAD.pdmode,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0637\u0631\u064A\u0642\u0629 \u0639\u0631\u0636 \u0639\u0646\u0627\u0635\u0631 POINT"},pdsize:{...he.ACAD.pdsize,description:"\u062A\u062D\u062F\u064A\u062F \u062D\u062C\u0645 \u0639\u0631\u0636 \u0639\u0646\u0627\u0635\u0631 POINT"},pickbox:{...he.ACAD.pickbox,description:"\u062A\u062D\u062F\u064A\u062F \u062D\u062C\u0645 \u0645\u0631\u0628\u0639 \u0627\u0644\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0644\u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0628\u0627\u0644\u0628\u0643\u0633\u0644"},pline:{...he.ACAD.pline,description:"\u0625\u0646\u0634\u0627\u0621 \u0645\u062A\u0639\u062F\u062F \u062E\u0637\u0648\u0637 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0639\u062F\u0629 \u0646\u0642\u0627\u0637"},pngout:{...he.ACAD.pngout,description:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0631\u0633\u0645 \u0625\u0644\u0649 PNG"},point:{...he.ACAD.point,description:"\u0625\u0646\u0634\u0627\u0621 \u0646\u0642\u0627\u0637"},polaraddang:{...he.ACAD.polaraddang,description:"\u062A\u062E\u0632\u064A\u0646 \u0632\u0648\u0627\u064A\u0627 \u0625\u0636\u0627\u0641\u064A\u0629 \u0644\u0644\u062A\u062A\u0628\u0639 \u0627\u0644\u0642\u0637\u0628\u064A \u0643\u0642\u0627\u0626\u0645\u0629 \u0645\u0641\u0635\u0648\u0644\u0629 \u0628\u0641\u0648\u0627\u0635\u0644 \u0645\u0646\u0642\u0648\u0637\u0629"},polarang:{...he.ACAD.polarang,description:"\u062A\u062D\u062F\u064A\u062F \u0645\u0642\u062F\u0627\u0631 \u0632\u064A\u0627\u062F\u0629 \u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u0644\u0644\u062A\u062A\u0628\u0639 \u0627\u0644\u0642\u0637\u0628\u064A"},polarmode:{...he.ACAD.polarmode,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u062A\u062A\u0628\u0639 \u0627\u0644\u0642\u0637\u0628\u064A \u0648\u062A\u062A\u0628\u0639 Object Snap"},polygon:{...he.ACAD.polygon,description:"\u0625\u0646\u0634\u0627\u0621 \u0645\u0636\u0644\u0639 \u0645\u0646\u062A\u0638\u0645 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0645\u0631\u0643\u0632 \u0648\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631 \u0623\u0648 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0623\u062D\u062F \u0623\u0636\u0644\u0627\u0639 \u0627\u0644\u0645\u0636\u0644\u0639"},qnew:{...he.ACAD.qnew,description:"\u0628\u062F\u0621 \u0631\u0633\u0645 \u062C\u062F\u064A\u062F"},close:{...he.ACAD.close,description:"\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A"},ray:{...he.ACAD.ray,description:"\u0625\u0646\u0634\u0627\u0621 \u0634\u0639\u0627\u0639 \u064A\u0628\u062F\u0623 \u0645\u0646 \u0646\u0642\u0637\u0629 \u0648\u064A\u0645\u062A\u062F \u0625\u0644\u0649 \u0645\u0627 \u0644\u0627 \u0646\u0647\u0627\u064A\u0629"},rectang:{...he.ACAD.rectang,description:"\u0625\u0646\u0634\u0627\u0621 \u0645\u0633\u062A\u0637\u064A\u0644 \u0628\u062A\u062D\u062F\u064A\u062F \u0631\u0643\u0646\u064A\u0646 \u0645\u062A\u0642\u0627\u0628\u0644\u064A\u0646"},regen:{...he.ACAD.regen,description:"\u0625\u0639\u0627\u062F\u0629 \u0631\u0633\u0645 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u062D\u0627\u0644\u064A"},revcloud:{...he.ACAD.revcloud,description:"\u0625\u0646\u0634\u0627\u0621 \u0623\u0648 \u062A\u0639\u062F\u064A\u0644 \u0633\u062D\u0627\u0628\u0629 \u0645\u0631\u0627\u062C\u0639\u0629"},markuptext:{...he.ACAD.markuptext,description:"\u0648\u0636\u0639 \u0639\u0644\u0627\u0645\u0629 \u0645\u0631\u0627\u062C\u0639\u0629 \u0646\u0635\u064A\u0629"},markupline:{...he.ACAD.markupline,description:"\u0625\u0646\u0634\u0627\u0621 \u0639\u0644\u0627\u0645\u0629 \u0645\u0631\u0627\u062C\u0639\u0629 \u062E\u0637\u064A\u0629"},markuparrow:{...he.ACAD.markuparrow,description:"\u0625\u0646\u0634\u0627\u0621 \u0633\u0647\u0645 \u0645\u0631\u0627\u062C\u0639\u0629"},markupcloud:{...he.ACAD.markupcloud,description:"\u0625\u0646\u0634\u0627\u0621 \u0633\u062D\u0627\u0628\u0629 \u0645\u0631\u0627\u062C\u0639\u0629"},markuprect:{...he.ACAD.markuprect,description:"\u0625\u0646\u0634\u0627\u0621 \u0645\u0633\u062A\u0637\u064A\u0644 \u0645\u0631\u0627\u062C\u0639\u0629"},markupcircle:{...he.ACAD.markupcircle,description:"\u0625\u0646\u0634\u0627\u0621 \u062F\u0627\u0626\u0631\u0629 \u0645\u0631\u0627\u062C\u0639\u0629"},markuphighlight:{...he.ACAD.markuphighlight,description:"\u0625\u0646\u0634\u0627\u0621 \u0645\u0633\u062A\u0637\u064A\u0644 \u062A\u0645\u064A\u064A\u0632"},markupcallout:{...he.ACAD.markupcallout,description:"\u0625\u0646\u0634\u0627\u0621 \u0648\u0633\u064A\u0644\u0629 \u0634\u0631\u062D: \u062D\u062F\u062F \u0631\u0623\u0633 \u062E\u0637 \u0627\u0644\u062A\u0648\u062C\u064A\u0647 \u062B\u0645 \u0645\u0648\u0636\u0639 \u0645\u0631\u0628\u0639 \u0627\u0644\u0646\u0635 \u062B\u0645 \u0623\u062F\u062E\u0644 \u0627\u0644\u0646\u0635"},markupstamp:{...he.ACAD.markupstamp,description:"\u0648\u0636\u0639 \u062E\u062A\u0645 \u0623\u0648 \u0631\u0645\u0632 \u0645\u062E\u0635\u0635"},markupvis:{...he.ACAD.markupvis,description:"\u0625\u0638\u0647\u0627\u0631 \u0623\u0648 \u0625\u062E\u0641\u0627\u0621 \u0639\u0644\u0627\u0645\u0627\u062A \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629"},clearmarkups:{...he.ACAD.clearmarkups,description:"\u0645\u0633\u062D \u062C\u0645\u064A\u0639 \u0639\u0644\u0627\u0645\u0627\u062A \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629 \u0645\u0646 \u0627\u0644\u0645\u062E\u0637\u0637 \u0627\u0644\u062D\u0627\u0644\u064A"},markupexport:{...he.ACAD.markupexport,description:"\u062A\u0635\u062F\u064A\u0631 \u0639\u0644\u0627\u0645\u0627\u062A \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629 \u0625\u0644\u0649 \u0645\u0644\u0641 JSON \u062C\u0627\u0646\u0628\u064A"},markupimport:{...he.ACAD.markupimport,description:"\u0627\u0633\u062A\u064A\u0631\u0627\u062F \u0639\u0644\u0627\u0645\u0627\u062A \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629 \u0645\u0646 \u0645\u0644\u0641 JSON \u062C\u0627\u0646\u0628\u064A"},markuppanel:{...he.ACAD.markuppanel,description:"\u0641\u062A\u062D \u0644\u0648\u062D\u0629 \u0639\u0644\u0627\u0645\u0627\u062A \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629"},rotate:{...he.ACAD.rotate,description:"\u062A\u062F\u0648\u064A\u0631 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u062D\u0648\u0644 \u0646\u0642\u0637\u0629 \u0623\u0633\u0627\u0633",prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631"},select:{...he.ACAD.select,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631"},shortcutmenu:{...he.ACAD.shortcutmenu,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0625\u062A\u0627\u062D\u0629 \u0627\u0644\u0642\u0648\u0627\u0626\u0645 \u0627\u0644\u0645\u062E\u062A\u0635\u0631\u0629 \u062F\u0627\u062E\u0644 \u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u0631\u0633\u0645"},sketch:{...he.ACAD.sketch,description:"\u0625\u0646\u0634\u0627\u0621 \u0633\u0644\u0633\u0644\u0629 \u0645\u0646 \u0645\u0642\u0627\u0637\u0639 \u0627\u0644\u062E\u0637\u0648\u0637 \u0628\u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0631"},spline:{...he.ACAD.spline,description:"\u0625\u0646\u0634\u0627\u0621 \u0645\u0646\u062D\u0646\u0649 Spline \u0646\u0627\u0639\u0645 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0646\u0642\u0627\u0637 \u0627\u0644\u062A\u062D\u0643\u0645"},textstyle:{...he.ACAD.textstyle,description:"\u062A\u062D\u062F\u064A\u062F \u0627\u0633\u0645 \u0646\u0645\u0637 \u0627\u0644\u0646\u0635 \u0627\u0644\u062D\u0627\u0644\u064A"},unitmode:{...he.ACAD.unitmode,description:"\u0627\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0639\u0631\u0636 \u0627\u0644\u0643\u0633\u0648\u0631 \u0644\u0644\u0625\u062D\u062F\u0627\u062B\u064A\u0627\u062A \u0639\u0646\u062F\u0645\u0627 \u064A\u0643\u0648\u0646 LUNITS \u0645\u0646 \u0627\u0644\u0646\u0648\u0639 Architectural \u0623\u0648 Fractional"},switchbg:{...he.ACAD.switchbg,description:"\u0627\u0644\u062A\u0628\u062F\u064A\u0644 \u0628\u064A\u0646 \u0627\u0644\u062E\u0644\u0641\u064A\u0629 \u0627\u0644\u0628\u064A\u0636\u0627\u0621 \u0648\u0627\u0644\u0633\u0648\u062F\u0627\u0621 \u0644\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u0631\u0633\u0645"},unisolateobjects:{...he.ACAD.unisolateobjects,description:"\u0625\u0639\u0627\u062F\u0629 \u0639\u0631\u0636 \u062C\u0645\u064A\u0639 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u062A\u064A \u062A\u0645 \u0625\u062E\u0641\u0627\u0624\u0647\u0627 \u0628\u0648\u0627\u0633\u0637\u0629 HIDEOBJECTS"},undo:{...he.ACAD.undo,description:"\u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646 \u0622\u062E\u0631 \u0639\u0645\u0644\u064A\u0629 \u062A\u062D\u0631\u064A\u0631 \u0641\u064A \u0642\u0627\u0639\u062F\u0629 \u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u0631\u0633\u0645",nothingToUndo:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0639\u0645\u0644\u064A\u0629 \u064A\u0645\u0643\u0646 \u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646\u0647\u0627."},redo:{...he.ACAD.redo,description:"\u0625\u0639\u0627\u062F\u0629 \u0622\u062E\u0631 \u0639\u0645\u0644\u064A\u0629 \u062A\u0645 \u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646\u0647\u0627",nothingToRedo:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0639\u0645\u0644\u064A\u0629 \u064A\u0645\u0643\u0646 \u0625\u0639\u0627\u062F\u062A\u0647\u0627."},xline:{...he.ACAD.xline,description:"\u0625\u0646\u0634\u0627\u0621 \u062E\u0637 \u0625\u0646\u0634\u0627\u0626\u064A \u064A\u0645\u062A\u062F \u0625\u0644\u0649 \u0645\u0627 \u0644\u0627 \u0646\u0647\u0627\u064A\u0629 \u0641\u064A \u0627\u0644\u0627\u062A\u062C\u0627\u0647\u064A\u0646"},zoom:{...he.ACAD.zoom,description:"\u0627\u0644\u062A\u0643\u0628\u064A\u0631 \u0623\u0648 \u0627\u0644\u062A\u0635\u063A\u064A\u0631 \u0644\u0639\u0631\u0636 \u0623\u0642\u0635\u0649 \u0627\u0645\u062A\u062F\u0627\u062F \u0644\u062C\u0645\u064A\u0639 \u0627\u0644\u0639\u0646\u0627\u0635\u0631"}},USER:{...he.USER}},ze={arc:{startPointOrCenter:"Specify start point of arc or",secondPointOrOptions:"Specify second point of arc or",secondPoint:"Specify second point of arc",startPoint:"Specify start point of arc",centerPoint:"Specify center point of arc",endPoint:"Specify end point of arc",endPointOrOptions:"Specify end point of arc or",centerPointOrOptions:"Specify center point of arc",includedAngle:"Specify included angle",chordLength:"Specify chord length",tangentDirection:"Specify tangent direction for start point of arc",radius:"Specify radius of arc",keywords:{center:{display:"Center(C)",local:"Center",global:"Center"},end:{display:"End(E)",local:"End",global:"End"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},chordLength:{display:"chord Length(L)",local:"Chord Length",global:"ChordLength"},direction:{display:"Direction(D)",local:"Direction",global:"Direction"},radius:{display:"Radius(R)",local:"Radius",global:"Radius"}},invalid:{threePoint:"Invalid 3-point arc: points are collinear or cannot define an arc.",center:"Invalid center input: start and end points must lie on the same circle.",angle:"Invalid angle input: included angle must be greater than 0 and less than 360 degrees.",chordLength:"Invalid chord length: value is out of range for the current radius.",direction:"Invalid direction: cannot construct an arc from this tangent direction.",radius:"Invalid radius: the specified radius cannot connect start and end points."}},circle:{center:"Specify the center of circle",centerOrOptions:"Specify center point of circle or",radius:"Specify the radius of circle",radiusOrDiameter:"Specify radius of circle or",diameter:"Specify diameter of circle",twoPointFirst:"Specify first endpoint of circle diameter",twoPointSecond:"Specify second endpoint of circle diameter",threePointFirst:"Specify first point on circle",threePointSecond:"Specify second point on circle",threePointThird:"Specify third point on circle",keywords:{threeP:{display:"3P(3P)",local:"3P",global:"3P"},twoP:{display:"2P(2P)",local:"2P",global:"2P"},diameter:{display:"Diameter(D)",local:"Diameter",global:"Diameter"}}},copy:{basePointOrOptions:"Specify base point or",displacementOrArray:"Specify displacement or",secondPointOrArray:"Specify second point or",modePrompt:"Enter copy mode option",arrayItemCount:"Enter the number of items in the array including the original",arraySecondPointOrFit:"Specify second point or",arrayFitSecondPoint:"Specify second point",keywords:{displacement:{display:"Displacement(D)",local:"Displacement",global:"Displacement"},mode:{display:"Mode(O)",local:"Mode",global:"Mode"},multiple:{display:"Multiple(M)",local:"Multiple",global:"Multiple"},single:{display:"Single(S)",local:"Single",global:"Single"},array:{display:"Array(A)",local:"Array",global:"Array"},fit:{display:"Fit(F)",local:"Fit",global:"Fit"}}},dimlinear:{xLine1Point:"Specify the first extension line origin",xLine2Point:"Specify the second extension line origin",dimLinePoint:"Specify dimension line location"},ellipse:{axisEndpointOrOptions:"Specify axis endpoint of ellipse or",arcAxisEndpointOrCenter:"Specify axis endpoint of elliptical arc or",center:"Specify center of ellipse",firstAxisEndpoint:"Specify endpoint of axis",secondAxisEndpoint:"Specify other endpoint of axis",otherAxisOrRotation:"Specify distance to other axis or",rotationAngle:"Specify rotation angle around major axis",arcStartAngle:"Specify start angle of elliptical arc",arcEndAngle:"Specify end angle of elliptical arc",keywords:{arc:{display:"Arc(A)",local:"Arc",global:"Arc"},center:{display:"Center(C)",local:"Center",global:"Center"},rotation:{display:"Rotation(R)",local:"Rotation",global:"Rotation"}},invalid:{axis:"Invalid axis input: axis length must be greater than 0.",otherAxis:"Invalid other-axis input: distance must be greater than 0.",rotation:"Invalid rotation input: resulting minor axis must be greater than 0."}},hatch:{prompt:"Select boundary object or",pickPoint:"Specify internal point (or press Enter to finish)",select:"Select objects to hatch",patternName:"Enter hatch pattern name",scale:"Specify hatch pattern scale",angle:"Specify hatch pattern angle",style:"Enter hatch style",associative:"Specify associativity",invalidBoundary:"Selected objects do not form a closed boundary.",keywords:{pick:{display:"Pick points(P)",local:"Pick points",global:"PickPoints"},select:{display:"Select objects(S)",local:"Select objects",global:"SelectObjects"},cancel:{display:"Cancel(C)",local:"Cancel",global:"Cancel"},pattern:{display:"Pattern(P)",local:"Pattern",global:"Pattern"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},style:{display:"Style(T)",local:"Style",global:"HatchStyle"},associative:{display:"Associative(AS)",local:"Associative",global:"AssociativeMode"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},outer:{display:"Outer(O)",local:"Outer",global:"Outer"},ignore:{display:"Ignore(I)",local:"Ignore",global:"Ignore"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}},hideobjects:{hidden:"object(s) hidden",restored:"object(s) restored",nothingToRestore:"No hidden objects to restore"},entout:{longSidePrompt:"Enter preview long side size in pixels",exported:"object preview(s) exported",skipped:"object(s) skipped",failed:{"no-preview-root":"Unable to build preview geometry for the selection","no-bounds":"Unable to compute preview bounds for the selection","capture-failed":"Unable to render the entity preview image","download-failed":"Preview rendered but the PNG download failed"}},layer:{main:"Enter option",listSummary:"Layer list was printed to browser console",emptyInput:"No layer name was entered.",newPrompt:"Enter name for new layer(s)",makePrompt:"Enter name of layer to make current",setPrompt:"Enter name of layer to set current",onPrompt:"Enter layer name(s) to turn on",offPrompt:"Enter layer name(s) to turn off",freezePrompt:"Enter layer name(s) to freeze",thawPrompt:"Enter layer name(s) to thaw",lockPrompt:"Enter layer name(s) to lock",unlockPrompt:"Enter layer name(s) to unlock",colorLayerPrompt:"Enter layer name(s) to change color",colorValuePrompt:"Enter color (ACI 1-255, RGB like 255,0,0, or CSS color name)",invalidColor:"Invalid color input.",descriptionLayerPrompt:"Enter layer name to edit description",descriptionValuePrompt:"Enter new layer description",created:"Created layer count",alreadyExists:"Layer already exists",notFound:"Layer not found",cannotChangeCurrent:"Cannot turn off or freeze the current layer.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Make(M)",local:"Make",global:"Make"},set:{display:"Set(S)",local:"Set",global:"Set"},new:{display:"New(N)",local:"New",global:"New"},on:{display:"On(ON)",local:"On",global:"On"},off:{display:"Off(OF)",local:"Off",global:"Off"},color:{display:"Color(C)",local:"Color",global:"Color"},freeze:{display:"Freeze(F)",local:"Freeze",global:"Freeze"},thaw:{display:"Thaw(T)",local:"Thaw",global:"Thaw"},lock:{display:"Lock(L)",local:"Lock",global:"Lock"},unlock:{display:"Unlock(U)",local:"Unlock",global:"Unlock"},description:{display:"Description(D)",local:"Description",global:"Description"}}},layon:{alreadyOn:"All layers are already on.",turnedOn:"Turned on layers"},laycur:{prompt:"Select objects to be changed to the current layer",currentLayerNotFound:"Current layer not found.",noObjects:"No valid objects were selected.",alreadyCurrent:"Selected objects are already on the current layer.",changed:"Changed objects to current layer"},layfrz:{prompt:"Select object on layer to freeze or",invalidSelection:"Invalid object selected.",settingsPrompt:"Enter LAYFRZ setting to change",viewportPrompt:"Specify viewport freeze behavior",blockSelectionPrompt:"Specify nested block selection behavior",vpfreezeFallback:"Current viewer does not support per-viewport layer freeze; using Freeze behavior instead.",nestedSelectionLimited:"Nested block selection settings are stored, but current picking still resolves the top-level entity layer.",layerNotFound:"Layer not found",cannotFreezeCurrent:"Cannot freeze the current layer.",alreadyFrozen:"Layer is already frozen",frozen:"Frozen layer",restored:"Restored layer",nothingToUndo:"There is no LAYFRZ action to undo.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},viewports:{display:"Viewports(V)",local:"Viewports",global:"Viewports"},blockSelection:{display:"Block selection(B)",local:"Block selection",global:"BlockSelection"},freeze:{display:"Freeze(F)",local:"Freeze",global:"Freeze"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"},block:{display:"Block(B)",local:"Block",global:"Block"},entity:{display:"Entity(E)",local:"Entity",global:"Entity"},none:{display:"None(N)",local:"None",global:"None"}}},layiso:{prompt:"Select objects on the layer(s) to be isolated or",settingsPrompt:"Enter setting for layers not isolated",offModePrompt:"Enter off behavior for layers not isolated",noLayers:"No valid layers were selected.",layerNotFound:"Layer not found",isolated:"Isolated layer(s)",affectedLayers:"affected layers",vpfreezeFallback:"Current viewer does not support per-viewport layer freeze; using Off behavior instead.",lockFadeFallback:"Current viewer does not support layer fade display; non-isolated layers will be locked without fade.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},off:{display:"Off(O)",local:"Off",global:"Off"},lockAndFade:{display:"Lock and fade(L)",local:"Lock and fade",global:"LockAndFade"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"}}},layuniso:{noPrevious:"No previous LAYISO layer state to restore.",layerNotFound:"Layer not found",nothingRestored:"No LAYISO layer changes were restored.",restored:"Restored layers"},laythw:{alreadyThawed:"All layers are already thawed.",thawed:"Thawed layers"},laylck:{prompt:"Select an object on the layer to be locked",invalidSelection:"Invalid object selected.",layerNotFound:"Layer not found",alreadyLocked:"Layer is already locked",locked:"Locked layer"},layulk:{prompt:"Select an object on the layer to be unlocked",invalidSelection:"Invalid object selected.",layerNotFound:"Layer not found",alreadyUnlocked:"Layer is already unlocked",unlocked:"Unlocked layer"},layoff:{prompt:"Select object on layer to turn off or",invalidSelection:"Invalid object selected.",settingsPrompt:"Enter LAYOFF setting to change",viewportPrompt:"Specify viewport behavior",blockSelectionPrompt:"Specify nested block selection behavior",vpfreezeFallback:"Current viewer does not support per-viewport layer off; using Off behavior instead.",nestedSelectionLimited:"Nested block selection settings are stored, but current picking still resolves the top-level entity layer.",layerNotFound:"Layer not found",cannotTurnOffCurrent:"Cannot turn off the current layer.",alreadyOff:"Layer is already off",turnedOff:"Turned off layer",restored:"Restored layer",nothingToUndo:"There is no LAYOFF action to undo.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},viewports:{display:"Viewports(V)",local:"Viewports",global:"Viewports"},blockSelection:{display:"Block selection(B)",local:"Block selection",global:"BlockSelection"},off:{display:"Off(O)",local:"Off",global:"Off"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"},block:{display:"Block(B)",local:"Block",global:"Block"},entity:{display:"Entity(E)",local:"Entity",global:"Entity"},none:{display:"None(N)",local:"None",global:"None"}}},layerp:{restored:"Restored previous layer state.",noPreviousState:"There is no previous layer state to restore."},line:{firstPoint:"Specify the first point",firstPointOrContinue:"Specify first point or",nextPoint:"Specify the next point",nextPointWithOptions:"Specify next point or",keywords:{continue:{display:"Continue(C)",local:"Continue",global:"Continue"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"}}},xline:{firstPointOrOptions:"Specify a point or",secondPoint:"Specify second point",throughPoint:"Specify through point",angle:"Enter angle of xline",invalidDirection:"Invalid direction for XLINE.",keywords:{hor:{display:"Hor(H)",local:"Hor",global:"Hor"},ver:{display:"Ver(V)",local:"Ver",global:"Ver"},ang:{display:"Ang(A)",local:"Ang",global:"Ang"}}},ray:{startPoint:"Specify start point",throughPoint:"Specify through point"},mline:{startPointWithOptions:"Specify start point or",nextPointWithOptions:"Specify next point or",justificationPrompt:"Enter justification type",scalePrompt:"Specify mline scale",stylePrompt:"Enter mline style name or [?] for list",styleNotFound:"Mline style not found",styleListHeader:"Loaded mline styles",styleListEmpty:"No mline style is loaded in current drawing.",keywords:{justification:{display:"Justification(J)",local:"Justification",global:"Justification"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},style:{display:"Style(ST)",local:"Style",global:"Style"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},top:{display:"Top(T)",local:"Top",global:"Top"},zero:{display:"Zero(Z)",local:"Zero",global:"Zero"},bottom:{display:"Bottom(B)",local:"Bottom",global:"Bottom"}}},measureAngle:{vertex:"Specify vertex point",arm1:"Specify point on first arm",arm2:"Specify point on second arm"},measureArc:{startPoint:"Specify arc start point",throughPoint:"Specify a point on the arc",endPoint:"Specify arc end point",lockedEndPoint:"Specify arc end point (Ctrl to switch major/minor arc)",invalidPoints:"The three points are collinear and do not define an arc."},measureArea:{firstPoint:"Specify first point",nextPoint:"Specify next point (or press Enter to finish)"},measureDistance:{firstPoint:"Specify first point",secondPoint:"Specify second point"},measureContinuous:{firstPoint:"Specify first point",nextPoint:"Specify next point (or press Enter to finish)"},measurePoint:{point:"Specify point"},measurement:{import:{chooseFile:"Choose a measurement sidecar JSON file"}},markup:{author:"Specify review author (saved for later)",text:{point:"Specify text markup point",content:"Enter markup text"},line:{firstPoint:"Specify first point of line markup",secondPoint:"Specify second point of line markup"},arrow:{firstPoint:"Specify arrow start point",secondPoint:"Specify arrow tip"},cloud:{firstCorner:"Specify first corner of cloud",secondCorner:"Specify opposite corner of cloud"},rect:{firstCorner:"Specify first corner of rectangle",secondCorner:"Specify opposite corner of rectangle"},circle:{center:"Specify center of circle",radius:"Specify radius of circle"},shape:{calloutOn:"[Callout on]",calloutOff:"[Callout off]",calloutAnchor:"Specify callout text location",keywords:{callout:{display:"Callout(C)",local:"Callout",global:"Callout"},noCallout:{display:"NoCallout(N)",local:"NoCallout",global:"NoCallout"}}},highlight:{firstCorner:"Specify first corner of highlight",secondCorner:"Specify opposite corner of highlight"},callout:{tip:"Specify leader tip, or a cloud / rectangle / circle outline without a callout",anchor:"Specify callout text location",content:"Enter callout text"},stamp:{kind:"Enter stamp id [approved/rejected/revised/for-review/custom]",imageUrl:"Enter custom stamp image URL (optional)",caption:"Enter stamp caption (optional)",point:"Specify stamp insertion point"},import:{chooseFile:"Choose a markup sidecar JSON file"}},move:{basePointOrDisplacement:"Specify base point or",secondPointOrDisplacement:"Specify second point or",displacement:"Specify displacement",keywords:{displacement:{display:"Displacement(D)",local:"Displacement",global:"Displacement"}}},offset:{distance:"Specify offset distance",selectObject:"Select object to offset or press Enter to finish",sidePoint:"Specify point on side to offset",invalidDistance:"Offset distance must be greater than 0.",invalidSelection:"Selected object cannot be offset.",offsetFailed:"Unable to create an offset curve for the specified side."},mtext:{point:"Specify mtext insertion point"},bmpout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},jpgout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},pngout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},imageattach:{insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",decodeFailed:"Failed to read the selected image file."},insert:{blockName:"Enter block name:",insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",invalidBlockName:"Invalid block name.",blockNotFound:"Block not found",xrefNotAllowed:"Cannot insert an external reference with -INSERT."},xattach:{insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",unsupportedFile:"Please select a DWG or DXF file.",loading:"Loading external reference...",loadFailed:"Failed to read the selected drawing file."},point:{point:"Specify a point"},polygon:{numberOfSides:"Enter number of sides",centerOrEdge:"Specify center of polygon or",radiusOrType:"Enter options",edgeStart:"Specify first endpoint of edge",edgeEnd:"Specify second endpoint of edge",keywords:{edge:{display:"Edge(E)",local:"Edge",global:"Edge"},inscribed:{display:"Inscribed in circle(I)",local:"Inscribed in circle",global:"Inscribed"},circumscribed:{display:"Circumscribed about circle(C)",local:"Circumscribed about circle",global:"Circumscribed"}},invalid:{sides:"Invalid number of sides. Enter an integer between 3 and 1024.",radius:"Invalid radius. Radius must be greater than 0.",edge:"Invalid edge. The edge length must be greater than 0."}},polyline:{firstPoint:"Specify the first point",nextPoint:"Specify the next point (or press Enter to finish)",nextPointWithOptions:"Specify next point or",nextPointWithArcOptions:"Specify next point or",keywords:{arc:{display:"Arc(A)",local:"Arc",global:"Arc"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},line:{display:"Line(L)",local:"Line",global:"Line"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},center:{display:"Center(C)",local:"Center",global:"Center"},secondPoint:{display:"Second point(P)",local:"Second point",global:"SecondPoint"},radius:{display:"Radius(R)",local:"Radius",global:"Radius"}},arcAngle:"Specify arc angle",arcCenter:"Specify center point",arcSecondPoint:"Specify second point on arc",arcEndPoint:"Specify arc end point",arcRadius:"Specify arc radius"},rect:{firstPoint:"Specify first corner point",nextPoint:"Specify other corner point",firstPointWithOptions:"Specify first corner point or",otherCornerWithOptions:"Specify other corner point or",chamferFirst:"Specify first chamfer distance",chamferSecond:"Specify second chamfer distance",filletRadius:"Specify fillet radius",segmentWidth:"Specify rectangle line width",elevationValue:"Specify elevation",thicknessValue:"Specify thickness",rotationAngle:"Specify rectangle rotation angle",dimensionLength:"Specify rectangle length",dimensionWidth:"Specify rectangle width",areaValue:"Specify rectangle area",areaLengthOrWidth:"Specify rectangle length",areaSpecifyWidth:"Specify rectangle width",invalidPositive:"Invalid input. Please enter a value greater than 0.",invalidRect:"Unable to create rectangle. Please specify valid corners or dimensions.",thicknessNotSupported:"Rectangle thickness is currently not written to entity data. The thickness setting is ignored.",keywords:{chamfer:{display:"Chamfer(C)",local:"Chamfer",global:"Chamfer"},elevation:{display:"Elevation(E)",local:"Elevation",global:"Elevation"},fillet:{display:"Fillet(F)",local:"Fillet",global:"Fillet"},thickness:{display:"Thickness(T)",local:"Thickness",global:"Thickness"},width:{display:"Width(W)",local:"Width",global:"Width"},area:{display:"Area(A)",local:"Area",global:"Area"},dimensions:{display:"Dimensions(D)",local:"Dimensions",global:"Dimensions"},rotation:{display:"Rotation(R)",local:"Rotation",global:"Rotation"},length:{display:"Length(L)",local:"Length",global:"Length"},rectWidth:{display:"Width(W)",local:"Width",global:"Width"}}},rotate:{basePoint:"Specify base point",rotationAngleOrOptions:"Specify rotation angle or",referenceAngleOrPoints:"Specify reference angle or",firstReferencePoint:"Specify first point of reference angle",secondReferencePoint:"Specify second point",newAngle:"Specify new angle",keywords:{copy:{display:"Copy(C)",local:"Copy",global:"Copy"},reference:{display:"Reference(R)",local:"Reference",global:"Reference"},points:{display:"Points(P)",local:"Points",global:"Points"}},invalid:{referencePoints:"Invalid reference points: points must be different."}},revcloud:{firstCornerOrOptions:"Specify first corner point or",firstCorner:"Specify first corner point",oppositeCorner:"Specify opposite corner",startPoint:"Specify start point",nextPoint:"Specify next point",nextPointOrUndo:"Specify next point or",firstPoint:"Specify first point",guideCursor:"Guide cursor along cloud path (press Enter to finish)",arcLength:"Specify arc length",selectObject:"Select object",style:"Enter revision cloud arc style",reverseDirection:"Reverse direction",invalidArcLength:"Arc length must be greater than 0.",invalidObject:"Selected object cannot be converted to a revision cloud.",keywords:{arcLength:{display:"Arc length(A)",local:"Arc length",global:"ArcLength"},object:{display:"Object(O)",local:"Object",global:"Object"},rectangular:{display:"Rectangular(R)",local:"Rectangular",global:"Rectangular"},polygonal:{display:"Polygonal(P)",local:"Polygonal",global:"Polygonal"},freehand:{display:"Freehand(F)",local:"Freehand",global:"Freehand"},style:{display:"Style(S)",local:"Style",global:"Style"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},calligraphy:{display:"Calligraphy(C)",local:"Calligraphy",global:"Calligraphy"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}},sketch:{specifySketch:"Specify sketch or",sketching:"Move the pointer to sketch (click or press Enter to stop)",type:"Enter sketch type",increment:"Specify sketch increment",tolerance:"Specify spline tolerance",firstPoint:"Specify the first point",nextPoint:"Specify the end point",keywords:{type:{display:"Type(T)",local:"Type",global:"Type"},increment:{display:"Increment(I)",local:"Increment",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"Lines(L)",local:"Lines",global:"Lines"},polyline:{display:"Polyline(P)",local:"Polyline",global:"Polyline"},spline:{display:"Spline(S)",local:"Spline",global:"Spline"}}},spline:{firstPoint:"Specify the first point",nextPoint:"Specify the next point (or press Enter to finish)",firstPointWithOptions:"Specify first point or",nextPointWithFitOptions:"Specify next point or",nextPointWithCvOptions:"Specify next control vertex or",methodPrompt:"Enter spline creation method",knotsPrompt:"Enter knot parameterization",degreePrompt:"Specify spline degree",keywords:{method:{display:"Method(M)",local:"Method",global:"Method"},fit:{display:"Fit(F)",local:"Fit",global:"Fit"},cv:{display:"CV(C)",local:"CV",global:"CV"},knots:{display:"Knots(K)",local:"Knots",global:"Knots"},degree:{display:"Degree(D)",local:"Degree",global:"Degree"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},chord:{display:"Chord(C)",local:"Chord",global:"Chord"},sqrtChord:{display:"Sqrt chord(S)",local:"Sqrt chord",global:"SqrtChord"},uniform:{display:"Uniform(U)",local:"Uniform",global:"Uniform"}}},sysvar:{prompt:"Please input new value"},zoom:{mainPrompt:"Specify corner of window or",firstCorner:"Specify first corner",secondCorner:"Specify opposite corner",centerPoint:"Specify center point",heightOrScale:"Enter height or scale factor (nX or nXP)",scaleFactor:"Enter scale factor (nX or nXP)",keywords:{all:{display:"All(A)",local:"All",global:"All"},center:{display:"Center(C)",local:"Center",global:"Center"},extents:{display:"Extents(E)",local:"Extents",global:"Extents"},previous:{display:"Previous(P)",local:"Previous",global:"Previous"},original:{display:"Original(O)",local:"Original",global:"Original"},saved:{display:"Saved(V)",local:"Saved",global:"Saved"},smart:{display:"Smart(I)",local:"Smart",global:"Smart"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},window:{display:"Window(W)",local:"Window",global:"Window"}}},chtml:{exportFormat:"Export format",exportInvisibleLayers:"Export invisible layers",exportLayouts:"Export layouts",initialView:"Initial view when opening HTML",viewerMode:"Offline viewer mode",chunkSizeMiB:"Chunk size in MiB (multi-file package)",compressChunks:"Compress chunks (multi-file package)",keywords:{single:{display:"Single(S)",local:"Single",global:"Single"},multi:{display:"Multi-file package(M)",local:"Multi-file package",global:"Multi"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"},extents:{display:"Extents(E)",local:"Extents",global:"Extents"},current:{display:"Current(C)",local:"Current",global:"Current"},view:{display:"View(V)",local:"View",global:"View"},measure:{display:"Measure & Review(M)",local:"Measure & Review",global:"Measure"}}},cpdf:{modelSpaceFit:"Model space frame",exportLayouts:"Export layouts",textMode:"Text rendering",keywords:{extents:{display:"Extents(E)",local:"Extents",global:"Extents"},display:{display:"Display(D)",local:"Display",global:"Display"},text:{display:"Text(T)",local:"Text",global:"Text"},vector:{display:"Vector(V)",local:"Vector",global:"Vector"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}}},u3e={...ze,arc:{...ze.arc,startPointOrCenter:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633 \u0623\u0648",secondPointOrOptions:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0644\u0644\u0642\u0648\u0633 \u0623\u0648",secondPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0644\u0644\u0642\u0648\u0633",startPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633",centerPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0645\u0631\u0643\u0632 \u0627\u0644\u0642\u0648\u0633",endPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633",endPointOrOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633 \u0623\u0648",centerPointOrOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0645\u0631\u0643\u0632 \u0627\u0644\u0642\u0648\u0633",includedAngle:"\u062D\u062F\u062F \u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u0645\u062D\u0635\u0648\u0631\u0629",chordLength:"\u062D\u062F\u062F \u0637\u0648\u0644 \u0627\u0644\u0648\u062A\u0631",tangentDirection:"\u062D\u062F\u062F \u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u0645\u0645\u0627\u0633 \u0639\u0646\u062F \u0646\u0642\u0637\u0629 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633",radius:"\u062D\u062F\u062F \u0646\u0635\u0641 \u0642\u0637\u0631 \u0627\u0644\u0642\u0648\u0633",invalid:{...ze.arc.invalid,threePoint:"\u0642\u0648\u0633 \u0627\u0644\u062B\u0644\u0627\u062B \u0646\u0642\u0627\u0637 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u0627\u0644\u0646\u0642\u0627\u0637 \u0639\u0644\u0649 \u0627\u0633\u062A\u0642\u0627\u0645\u0629 \u0648\u0627\u062D\u062F\u0629 \u0623\u0648 \u0644\u0627 \u064A\u0645\u0643\u0646\u0647\u0627 \u062A\u0639\u0631\u064A\u0641 \u0642\u0648\u0633.",center:"\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0645\u0631\u0643\u0632 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u064A\u062C\u0628 \u0623\u0646 \u062A\u0642\u0639 \u0646\u0642\u0637\u062A\u0627 \u0627\u0644\u0628\u062F\u0627\u064A\u0629 \u0648\u0627\u0644\u0646\u0647\u0627\u064A\u0629 \u0639\u0644\u0649 \u0627\u0644\u062F\u0627\u0626\u0631\u0629 \u0646\u0641\u0633\u0647\u0627.",angle:"\u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629: \u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u0645\u062D\u0635\u0648\u0631\u0629 \u0623\u0643\u0628\u0631 \u0645\u0646 0 \u0648\u0623\u0642\u0644 \u0645\u0646 360 \u062F\u0631\u062C\u0629.",chordLength:"\u0637\u0648\u0644 \u0627\u0644\u0648\u062A\u0631 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u0627\u0644\u0642\u064A\u0645\u0629 \u062E\u0627\u0631\u062C \u0627\u0644\u0646\u0637\u0627\u0642 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647 \u0644\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631 \u0627\u0644\u062D\u0627\u0644\u064A.",direction:"\u0627\u0644\u0627\u062A\u062C\u0627\u0647 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u0644\u0627 \u064A\u0645\u0643\u0646 \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0642\u0648\u0633 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u0645\u0645\u0627\u0633 \u0627\u0644\u0645\u062D\u062F\u062F.",radius:"\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u0644\u0627 \u064A\u0645\u0643\u0646 \u0644\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631 \u0627\u0644\u0645\u062D\u062F\u062F \u062A\u0648\u0635\u064A\u0644 \u0646\u0642\u0637\u062A\u064A \u0627\u0644\u0628\u062F\u0627\u064A\u0629 \u0648\u0627\u0644\u0646\u0647\u0627\u064A\u0629."},keywords:{...ze.arc.keywords,center:{display:"\u0627\u0644\u0645\u0631\u0643\u0632(C)",local:"\u0627\u0644\u0645\u0631\u0643\u0632",global:"Center"},end:{display:"\u0627\u0644\u0646\u0647\u0627\u064A\u0629(E)",local:"\u0627\u0644\u0646\u0647\u0627\u064A\u0629",global:"End"},angle:{display:"\u0632\u0627\u0648\u064A\u0629(A)",local:"\u0632\u0627\u0648\u064A\u0629",global:"Angle"},chordLength:{display:"\u0637\u0648\u0644 \u0627\u0644\u0648\u062A\u0631(L)",local:"\u0637\u0648\u0644 \u0627\u0644\u0648\u062A\u0631",global:"ChordLength"},direction:{display:"\u0627\u0644\u0627\u062A\u062C\u0627\u0647(D)",local:"\u0627\u0644\u0627\u062A\u062C\u0627\u0647",global:"Direction"},radius:{display:"\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631(R)",local:"\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631",global:"Radius"}}},circle:{...ze.circle,center:"\u062D\u062F\u062F \u0645\u0631\u0643\u0632 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",centerOrOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0645\u0631\u0643\u0632 \u0627\u0644\u062F\u0627\u0626\u0631\u0629 \u0623\u0648",radius:"\u062D\u062F\u062F \u0646\u0635\u0641 \u0642\u0637\u0631 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",radiusOrDiameter:"\u062D\u062F\u062F \u0646\u0635\u0641 \u0642\u0637\u0631 \u0627\u0644\u062F\u0627\u0626\u0631\u0629 \u0623\u0648",diameter:"\u062D\u062F\u062F \u0642\u0637\u0631 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",twoPointFirst:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 \u0644\u0642\u0637\u0631 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",twoPointSecond:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0644\u0642\u0637\u0631 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",threePointFirst:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 \u0639\u0644\u0649 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",threePointSecond:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0639\u0644\u0649 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",threePointThird:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0644\u062B\u0629 \u0639\u0644\u0649 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",keywords:{...ze.circle.keywords,threeP:{display:"3 \u0646\u0642\u0627\u0637(3P)",local:"3 \u0646\u0642\u0627\u0637",global:"3P"},twoP:{display:"\u0646\u0642\u0637\u062A\u0627\u0646(2P)",local:"\u0646\u0642\u0637\u062A\u0627\u0646",global:"2P"},diameter:{display:"\u0627\u0644\u0642\u0637\u0631(D)",local:"\u0627\u0644\u0642\u0637\u0631",global:"Diameter"}}},copy:{...ze.copy,basePointOrOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0633\u0627\u0633 \u0623\u0648",displacementOrArray:"\u062D\u062F\u062F \u0627\u0644\u0625\u0632\u0627\u062D\u0629 \u0623\u0648",secondPointOrArray:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0623\u0648",modePrompt:"\u0623\u062F\u062E\u0644 \u062E\u064A\u0627\u0631 \u0648\u0636\u0639 \u0627\u0644\u0646\u0633\u062E",arrayItemCount:"\u0623\u062F\u062E\u0644 \u0639\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0641\u064A \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u0645\u0627 \u0641\u064A \u0630\u0644\u0643 \u0627\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0623\u0635\u0644\u064A",arraySecondPointOrFit:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0623\u0648",arrayFitSecondPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629",keywords:{...ze.copy.keywords,displacement:{display:"\u0625\u0632\u0627\u062D\u0629(D)",local:"\u0625\u0632\u0627\u062D\u0629",global:"Displacement"},mode:{display:"\u0648\u0636\u0639(O)",local:"\u0648\u0636\u0639",global:"Mode"},multiple:{display:"\u0645\u062A\u0639\u062F\u062F(M)",local:"\u0645\u062A\u0639\u062F\u062F",global:"Multiple"},single:{display:"\u0645\u0641\u0631\u062F(S)",local:"\u0645\u0641\u0631\u062F",global:"Single"},array:{display:"\u0645\u0635\u0641\u0648\u0641\u0629(A)",local:"\u0645\u0635\u0641\u0648\u0641\u0629",global:"Array"},fit:{display:"\u0645\u0644\u0627\u0621\u0645\u0629(F)",local:"\u0645\u0644\u0627\u0621\u0645\u0629",global:"Fit"}}},dimlinear:{...ze.dimlinear,xLine1Point:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0623\u0635\u0644 \u062E\u0637 \u0627\u0644\u0627\u0645\u062A\u062F\u0627\u062F \u0627\u0644\u0623\u0648\u0644",xLine2Point:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0623\u0635\u0644 \u062E\u0637 \u0627\u0644\u0627\u0645\u062A\u062F\u0627\u062F \u0627\u0644\u062B\u0627\u0646\u064A",dimLinePoint:"\u062D\u062F\u062F \u0645\u0648\u0642\u0639 \u062E\u0637 \u0627\u0644\u0628\u064F\u0639\u062F"},ellipse:{...ze.ellipse,axisEndpointOrOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0645\u062D\u0648\u0631 \u0627\u0644\u0642\u0637\u0639 \u0627\u0644\u0646\u0627\u0642\u0635 \u0623\u0648",arcAxisEndpointOrCenter:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0645\u062D\u0648\u0631 \u0627\u0644\u0642\u0648\u0633 \u0627\u0644\u0628\u064A\u0636\u0627\u0648\u064A \u0623\u0648",center:"\u062D\u062F\u062F \u0645\u0631\u0643\u0632 \u0627\u0644\u0642\u0637\u0639 \u0627\u0644\u0646\u0627\u0642\u0635",firstAxisEndpoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0645\u062D\u0648\u0631 \u0627\u0644\u0623\u0648\u0644\u0649",secondAxisEndpoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0623\u062E\u0631\u0649 \u0644\u0644\u0645\u062D\u0648\u0631",otherAxisOrRotation:"\u062D\u062F\u062F \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0648\u0631 \u0627\u0644\u0622\u062E\u0631 \u0623\u0648",rotationAngle:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u062F\u0648\u0631\u0627\u0646 \u062D\u0648\u0644 \u0627\u0644\u0645\u062D\u0648\u0631 \u0627\u0644\u0623\u0643\u0628\u0631",arcStartAngle:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633 \u0627\u0644\u0628\u064A\u0636\u0627\u0648\u064A",arcEndAngle:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633 \u0627\u0644\u0628\u064A\u0636\u0627\u0648\u064A",invalid:{...ze.ellipse.invalid,axis:"\u0627\u0644\u0645\u062D\u0648\u0631 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0637\u0648\u0644 \u0627\u0644\u0645\u062D\u0648\u0631 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",otherAxis:"\u0627\u0644\u0645\u062D\u0648\u0631 \u0627\u0644\u0622\u062E\u0631 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",rotation:"\u0627\u0644\u062F\u0648\u0631\u0627\u0646 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0627\u0644\u0645\u062D\u0648\u0631 \u0627\u0644\u0623\u0635\u063A\u0631 \u0627\u0644\u0646\u0627\u062A\u062C \u0623\u0643\u0628\u0631 \u0645\u0646 0."},keywords:{...ze.ellipse.keywords,arc:{display:"\u0642\u0648\u0633(A)",local:"\u0642\u0648\u0633",global:"Arc"},center:{display:"\u0627\u0644\u0645\u0631\u0643\u0632(C)",local:"\u0627\u0644\u0645\u0631\u0643\u0632",global:"Center"},rotation:{display:"\u062F\u0648\u0631\u0627\u0646(R)",local:"\u062F\u0648\u0631\u0627\u0646",global:"Rotation"}}},hatch:{...ze.hatch,prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631 \u062D\u062F\u0648\u062F \u0623\u0648",pickPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u062F\u0627\u062E\u0644\u064A\u0629 (\u0623\u0648 \u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u0646\u0647\u0627\u0621)",select:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u0647\u0634\u064A\u0631\u0647\u0627",patternName:"\u0623\u062F\u062E\u0644 \u0627\u0633\u0645 \u0646\u0645\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631",scale:"\u062D\u062F\u062F \u0645\u0642\u064A\u0627\u0633 \u0646\u0645\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631",angle:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0646\u0645\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631",style:"\u0623\u062F\u062E\u0644 \u0646\u0645\u0637 \u0627\u0644\u062A\u0647\u0634\u064A\u0631",associative:"\u062D\u062F\u062F \u062D\u0627\u0644\u0629 \u0627\u0644\u062A\u0631\u0627\u0628\u0637",invalidBoundary:"\u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0644\u0627 \u062A\u0643\u0648\u0651\u0646 \u062D\u062F\u0648\u062F\u064B\u0627 \u0645\u063A\u0644\u0642\u0629.",keywords:{...ze.hatch.keywords,pick:{display:"\u0627\u062E\u062A\u064A\u0627\u0631 \u0646\u0642\u0627\u0637(P)",local:"\u0627\u062E\u062A\u064A\u0627\u0631 \u0646\u0642\u0627\u0637",global:"PickPoints"},select:{display:"\u062A\u062D\u062F\u064A\u062F \u0643\u0627\u0626\u0646\u0627\u062A(S)",local:"\u062A\u062D\u062F\u064A\u062F \u0643\u0627\u0626\u0646\u0627\u062A",global:"SelectObjects"},cancel:{display:"\u0625\u0644\u063A\u0627\u0621(C)",local:"\u0625\u0644\u063A\u0627\u0621",global:"Cancel"},pattern:{display:"\u0646\u0645\u0637(P)",local:"\u0646\u0645\u0637",global:"Pattern"},scale:{display:"\u0645\u0642\u064A\u0627\u0633(S)",local:"\u0645\u0642\u064A\u0627\u0633",global:"Scale"},angle:{display:"\u0632\u0627\u0648\u064A\u0629(A)",local:"\u0632\u0627\u0648\u064A\u0629",global:"Angle"},style:{display:"\u0623\u0633\u0644\u0648\u0628(T)",local:"\u0623\u0633\u0644\u0648\u0628",global:"HatchStyle"},associative:{display:"\u062A\u0631\u0627\u0628\u0637\u064A(AS)",local:"\u062A\u0631\u0627\u0628\u0637\u064A",global:"AssociativeMode"},normal:{display:"\u0639\u0627\u062F\u064A(N)",local:"\u0639\u0627\u062F\u064A",global:"Normal"},outer:{display:"\u062E\u0627\u0631\u062C\u064A(O)",local:"\u062E\u0627\u0631\u062C\u064A",global:"Outer"},ignore:{display:"\u062A\u062C\u0627\u0647\u0644(I)",local:"\u062A\u062C\u0627\u0647\u0644",global:"Ignore"},yes:{display:"\u0646\u0639\u0645(Y)",local:"\u0646\u0639\u0645",global:"Yes"},no:{display:"\u0644\u0627(N)",local:"\u0644\u0627",global:"No"}}},line:{...ze.line,firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",firstPointOrContinue:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 \u0623\u0648",nextPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",nextPointWithOptions:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0623\u0648",keywords:{...ze.line.keywords,continue:{display:"\u0645\u062A\u0627\u0628\u0639\u0629(C)",local:"\u0645\u062A\u0627\u0628\u0639\u0629",global:"Continue"},undo:{display:"\u062A\u0631\u0627\u062C\u0639(U)",local:"\u062A\u0631\u0627\u062C\u0639",global:"Undo"},close:{display:"\u0625\u063A\u0644\u0627\u0642(C)",local:"\u0625\u063A\u0644\u0627\u0642",global:"Close"}}},xline:{...ze.xline,firstPointOrOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0623\u0648",secondPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629",throughPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u064A\u0645\u0631 \u0628\u0647\u0627 \u0627\u0644\u062E\u0637",angle:"\u0623\u062F\u062E\u0644 \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u062E\u0637 \u0627\u0644\u0625\u0646\u0634\u0627\u0626\u064A",invalidDirection:"\u0627\u062A\u062C\u0627\u0647 XLINE \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.",keywords:{...ze.xline.keywords,hor:{display:"\u0623\u0641\u0642\u064A(H)",local:"\u0623\u0641\u0642\u064A",global:"Hor"},ver:{display:"\u0631\u0623\u0633\u064A(V)",local:"\u0631\u0623\u0633\u064A",global:"Ver"},ang:{display:"\u0632\u0627\u0648\u064A\u0629(A)",local:"\u0632\u0627\u0648\u064A\u0629",global:"Ang"}}},ray:{...ze.ray,startPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0628\u062F\u0627\u064A\u0629",throughPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u064A\u0645\u0631 \u0628\u0647\u0627 \u0627\u0644\u0634\u0639\u0627\u0639"},move:{...ze.move,basePointOrDisplacement:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0633\u0627\u0633 \u0623\u0648",secondPointOrDisplacement:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0623\u0648",displacement:"\u062D\u062F\u062F \u0627\u0644\u0625\u0632\u0627\u062D\u0629",keywords:{...ze.move.keywords,displacement:{display:"\u0625\u0632\u0627\u062D\u0629(D)",local:"\u0625\u0632\u0627\u062D\u0629",global:"Displacement"}}},offset:{...ze.offset,distance:"\u062D\u062F\u062F \u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0625\u0632\u0627\u062D\u0629",selectObject:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0625\u0632\u0627\u062D\u062A\u0647 \u0623\u0648 \u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u0646\u0647\u0627\u0621",sidePoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0641\u064A \u062C\u0647\u0629 \u0627\u0644\u0625\u0632\u0627\u062D\u0629",invalidDistance:"\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0625\u0632\u0627\u062D\u0629 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",invalidSelection:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u0625\u0646\u0634\u0627\u0621 \u0625\u0632\u0627\u062D\u0629 \u0644\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F.",offsetFailed:"\u062A\u0639\u0630\u0631 \u0625\u0646\u0634\u0627\u0621 \u0645\u0646\u062D\u0646\u0649 \u0625\u0632\u0627\u062D\u0629 \u0641\u064A \u0627\u0644\u062C\u0647\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629."},mtext:{...ze.mtext,point:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0625\u062F\u0631\u0627\u062C \u0627\u0644\u0646\u0635 \u0645\u062A\u0639\u062F\u062F \u0627\u0644\u0623\u0633\u0637\u0631"},point:{...ze.point,point:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629"},polygon:{...ze.polygon,numberOfSides:"\u0623\u062F\u062E\u0644 \u0639\u062F\u062F \u0627\u0644\u0623\u0636\u0644\u0627\u0639",centerOrEdge:"\u062D\u062F\u062F \u0645\u0631\u0643\u0632 \u0627\u0644\u0645\u0636\u0644\u0639 \u0623\u0648",radiusOrType:"\u0623\u062F\u062E\u0644 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",edgeStart:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 \u0644\u0644\u0636\u0644\u0639",edgeEnd:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0644\u0644\u0636\u0644\u0639",invalid:{...ze.polygon.invalid,sides:"\u0639\u062F\u062F \u0627\u0644\u0623\u0636\u0644\u0627\u0639 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D. \u0623\u062F\u062E\u0644 \u0639\u062F\u062F\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627 \u0628\u064A\u0646 3 \u06481024.",radius:"\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D. \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",edge:"\u0627\u0644\u0636\u0644\u0639 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D. \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0637\u0648\u0644 \u0627\u0644\u0636\u0644\u0639 \u0623\u0643\u0628\u0631 \u0645\u0646 0."},keywords:{...ze.polygon.keywords,edge:{display:"\u062D\u0627\u0641\u0629(E)",local:"\u062D\u0627\u0641\u0629",global:"Edge"},inscribed:{display:"\u062F\u0627\u062E\u0644 \u0627\u0644\u062F\u0627\u0626\u0631\u0629(I)",local:"\u062F\u0627\u062E\u0644 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",global:"Inscribed"},circumscribed:{display:"\u0645\u062D\u064A\u0637 \u0628\u0627\u0644\u062F\u0627\u0626\u0631\u0629(C)",local:"\u0645\u062D\u064A\u0637 \u0628\u0627\u0644\u062F\u0627\u0626\u0631\u0629",global:"Circumscribed"}}},polyline:{...ze.polyline,firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",nextPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 (\u0623\u0648 \u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u0646\u0647\u0627\u0621)",nextPointWithOptions:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0623\u0648",nextPointWithArcOptions:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0623\u0648",arcAngle:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u0642\u0648\u0633",arcCenter:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0645\u0631\u0643\u0632 \u0627\u0644\u0642\u0648\u0633",arcSecondPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0639\u0644\u0649 \u0627\u0644\u0642\u0648\u0633",arcEndPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633",arcRadius:"\u062D\u062F\u062F \u0646\u0635\u0641 \u0642\u0637\u0631 \u0627\u0644\u0642\u0648\u0633",keywords:{...ze.polyline.keywords,arc:{display:"\u0642\u0648\u0633(A)",local:"\u0642\u0648\u0633",global:"Arc"},undo:{display:"\u062A\u0631\u0627\u062C\u0639(U)",local:"\u062A\u0631\u0627\u062C\u0639",global:"Undo"},close:{display:"\u0625\u063A\u0644\u0627\u0642(C)",local:"\u0625\u063A\u0644\u0627\u0642",global:"Close"},line:{display:"\u062E\u0637(L)",local:"\u062E\u0637",global:"Line"},angle:{display:"\u0632\u0627\u0648\u064A\u0629(A)",local:"\u0632\u0627\u0648\u064A\u0629",global:"Angle"},center:{display:"\u0627\u0644\u0645\u0631\u0643\u0632(C)",local:"\u0627\u0644\u0645\u0631\u0643\u0632",global:"Center"},secondPoint:{display:"\u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629(P)",local:"\u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629",global:"SecondPoint"},radius:{display:"\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631(R)",local:"\u0646\u0635\u0641 \u0627\u0644\u0642\u0637\u0631",global:"Radius"}}},rect:{...ze.rect,firstPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644",nextPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644",firstPointWithOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0623\u0648",otherCornerWithOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0622\u062E\u0631 \u0623\u0648",chamferFirst:"\u062D\u062F\u062F \u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0634\u0637\u0641 \u0627\u0644\u0623\u0648\u0644\u0649",chamferSecond:"\u062D\u062F\u062F \u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0634\u0637\u0641 \u0627\u0644\u062B\u0627\u0646\u064A\u0629",filletRadius:"\u062D\u062F\u062F \u0646\u0635\u0641 \u0642\u0637\u0631 \u0627\u0644\u062A\u062F\u0648\u064A\u0631",segmentWidth:"\u062D\u062F\u062F \u0639\u0631\u0636 \u062E\u0637 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",elevationValue:"\u062D\u062F\u062F \u0627\u0644\u0645\u0646\u0633\u0648\u0628",thicknessValue:"\u062D\u062F\u062F \u0627\u0644\u0633\u0645\u0627\u0643\u0629",rotationAngle:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u062F\u0648\u0631\u0627\u0646 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",dimensionLength:"\u062D\u062F\u062F \u0637\u0648\u0644 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",dimensionWidth:"\u062D\u062F\u062F \u0639\u0631\u0636 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",areaValue:"\u062D\u062F\u062F \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",areaLengthOrWidth:"\u062D\u062F\u062F \u0637\u0648\u0644 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",areaSpecifyWidth:"\u062D\u062F\u062F \u0639\u0631\u0636 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",invalidPositive:"\u0625\u062F\u062E\u0627\u0644 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D. \u0623\u062F\u062E\u0644 \u0642\u064A\u0645\u0629 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",invalidRect:"\u062A\u0639\u0630\u0631 \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644. \u062D\u062F\u062F \u0623\u0631\u0643\u0627\u0646\u064B\u0627 \u0623\u0648 \u0623\u0628\u0639\u0627\u062F\u064B\u0627 \u0635\u0627\u0644\u062D\u0629.",thicknessNotSupported:"\u0633\u0645\u0627\u0643\u0629 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644 \u0644\u0627 \u062A\u064F\u0643\u062A\u0628 \u062D\u0627\u0644\u064A\u064B\u0627 \u0625\u0644\u0649 \u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u0639\u0646\u0635\u0631\u060C \u0644\u0630\u0644\u0643 \u0633\u064A\u062A\u0645 \u062A\u062C\u0627\u0647\u0644 \u0625\u0639\u062F\u0627\u062F \u0627\u0644\u0633\u0645\u0627\u0643\u0629.",keywords:{...ze.rect.keywords,chamfer:{display:"\u0634\u0637\u0641(C)",local:"\u0634\u0637\u0641",global:"Chamfer"},elevation:{display:"\u0627\u0631\u062A\u0641\u0627\u0639(E)",local:"\u0627\u0631\u062A\u0641\u0627\u0639",global:"Elevation"},fillet:{display:"\u062A\u0642\u0648\u064A\u0633(F)",local:"\u062A\u0642\u0648\u064A\u0633",global:"Fillet"},thickness:{display:"\u0627\u0644\u0633\u0645\u0627\u0643\u0629(T)",local:"\u0627\u0644\u0633\u0645\u0627\u0643\u0629",global:"Thickness"},width:{display:"\u0627\u0644\u0639\u0631\u0636(W)",local:"\u0627\u0644\u0639\u0631\u0636",global:"Width"},area:{display:"\u0645\u0633\u0627\u062D\u0629(A)",local:"\u0645\u0633\u0627\u062D\u0629",global:"Area"},dimensions:{display:"\u0627\u0644\u0623\u0628\u0639\u0627\u062F(D)",local:"\u0627\u0644\u0623\u0628\u0639\u0627\u062F",global:"Dimensions"},rotation:{display:"\u062F\u0648\u0631\u0627\u0646(R)",local:"\u062F\u0648\u0631\u0627\u0646",global:"Rotation"},length:{display:"\u0637\u0648\u0644(L)",local:"\u0637\u0648\u0644",global:"Length"},rectWidth:{display:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644(W)",local:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0633\u062A\u0637\u064A\u0644",global:"Width"}}},rotate:{...ze.rotate,basePoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0633\u0627\u0633",rotationAngleOrOptions:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u062F\u0648\u0631\u0627\u0646 \u0623\u0648",referenceAngleOrPoints:"\u062D\u062F\u062F \u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u0645\u0631\u062C\u0639\u064A\u0629 \u0623\u0648",firstReferencePoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 \u0644\u0644\u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u0645\u0631\u062C\u0639\u064A\u0629",secondReferencePoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629",newAngle:"\u062D\u062F\u062F \u0627\u0644\u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u062C\u062F\u064A\u062F\u0629",invalid:{...ze.rotate.invalid,referencePoints:"\u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u0645\u0631\u062C\u0639\u064A\u0629 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629: \u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0646\u0642\u0637\u062A\u0627\u0646 \u0645\u062E\u062A\u0644\u0641\u062A\u064A\u0646."},keywords:{...ze.rotate.keywords,copy:{display:"\u0646\u0633\u062E(C)",local:"\u0646\u0633\u062E",global:"Copy"},reference:{display:"\u0645\u0631\u062C\u0639(R)",local:"\u0645\u0631\u062C\u0639",global:"Reference"},points:{display:"\u0646\u0642\u0627\u0637(P)",local:"\u0646\u0642\u0627\u0637",global:"Points"}}},spline:{...ze.spline,firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",nextPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 (\u0623\u0648 \u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u0646\u0647\u0627\u0621)",firstPointWithOptions:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 \u0623\u0648",nextPointWithFitOptions:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0623\u0648",nextPointWithCvOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u062D\u0643\u0645 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0623\u0648",methodPrompt:"\u0623\u062F\u062E\u0644 \u0637\u0631\u064A\u0642\u0629 \u0625\u0646\u0634\u0627\u0621 Spline",knotsPrompt:"\u0623\u062F\u062E\u0644 \u0637\u0631\u064A\u0642\u0629 \u062A\u0648\u0632\u064A\u0639 \u0627\u0644\u0639\u0642\u062F",degreePrompt:"\u062D\u062F\u062F \u062F\u0631\u062C\u0629 \u0645\u0646\u062D\u0646\u0649 Spline",keywords:{...ze.spline.keywords,method:{display:"\u0637\u0631\u064A\u0642\u0629(M)",local:"\u0637\u0631\u064A\u0642\u0629",global:"Method"},fit:{display:"\u0645\u0644\u0627\u0621\u0645\u0629(F)",local:"\u0645\u0644\u0627\u0621\u0645\u0629",global:"Fit"},cv:{display:"\u0646\u0642\u0627\u0637 \u0627\u0644\u062A\u062D\u0643\u0645(C)",local:"\u0646\u0642\u0627\u0637 \u0627\u0644\u062A\u062D\u0643\u0645",global:"CV"},knots:{display:"\u0639\u064F\u0642\u062F(K)",local:"\u0639\u064F\u0642\u062F",global:"Knots"},degree:{display:"\u062F\u0631\u062C\u0629(D)",local:"\u062F\u0631\u062C\u0629",global:"Degree"},undo:{display:"\u062A\u0631\u0627\u062C\u0639(U)",local:"\u062A\u0631\u0627\u062C\u0639",global:"Undo"},close:{display:"\u0625\u063A\u0644\u0627\u0642(C)",local:"\u0625\u063A\u0644\u0627\u0642",global:"Close"},chord:{display:"\u0648\u062A\u0631(C)",local:"\u0648\u062A\u0631",global:"Chord"},sqrtChord:{display:"\u062C\u0630\u0631 \u0627\u0644\u0648\u062A\u0631(S)",local:"\u062C\u0630\u0631 \u0627\u0644\u0648\u062A\u0631",global:"SqrtChord"},uniform:{display:"\u0645\u0646\u062A\u0638\u0645(U)",local:"\u0645\u0646\u062A\u0638\u0645",global:"Uniform"}}},zoom:{...ze.zoom,mainPrompt:"\u062D\u062F\u062F \u0631\u0643\u0646 \u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u062A\u0643\u0628\u064A\u0631 \u0623\u0648",firstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644",secondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644",centerPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0645\u0631\u0643\u0632",heightOrScale:"\u0623\u062F\u062E\u0644 \u0627\u0644\u0627\u0631\u062A\u0641\u0627\u0639 \u0623\u0648 \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633 (nX \u0623\u0648 nXP)",scaleFactor:"\u0623\u062F\u062E\u0644 \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633 (nX \u0623\u0648 nXP)",keywords:{...ze.zoom.keywords,all:{display:"\u0627\u0644\u0643\u0644(A)",local:"\u0627\u0644\u0643\u0644",global:"All"},center:{display:"\u0627\u0644\u0645\u0631\u0643\u0632(C)",local:"\u0627\u0644\u0645\u0631\u0643\u0632",global:"Center"},extents:{display:"\u0627\u0644\u062D\u062F\u0648\u062F(E)",local:"\u0627\u0644\u062D\u062F\u0648\u062F",global:"Extents"},previous:{display:"\u0627\u0644\u0633\u0627\u0628\u0642(P)",local:"\u0627\u0644\u0633\u0627\u0628\u0642",global:"Previous"},original:{display:"\u0627\u0644\u0623\u0635\u0644\u064A(O)",local:"\u0627\u0644\u0623\u0635\u0644\u064A",global:"Original"},saved:{display:"\u0627\u0644\u0645\u062D\u0641\u0648\u0638(V)",local:"\u0627\u0644\u0645\u062D\u0641\u0648\u0638",global:"Saved"},smart:{display:"\u0630\u0643\u064A(I)",local:"\u0630\u0643\u064A",global:"Smart"},scale:{display:"\u0645\u0642\u064A\u0627\u0633(S)",local:"\u0645\u0642\u064A\u0627\u0633",global:"Scale"},window:{display:"\u0646\u0627\u0641\u0630\u0629(W)",local:"\u0646\u0627\u0641\u0630\u0629",global:"Window"}}},hideobjects:{...ze.hideobjects,hidden:"\u062A\u0645 \u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u0639\u0646\u0627\u0635\u0631",restored:"\u062A\u0645\u062A \u0627\u0633\u062A\u0639\u0627\u062F\u0629 \u0627\u0644\u0639\u0646\u0627\u0635\u0631",nothingToRestore:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0639\u0646\u0627\u0635\u0631 \u0645\u062E\u0641\u064A\u0629 \u0644\u0627\u0633\u062A\u0639\u0627\u062F\u062A\u0647\u0627"},entout:{...ze.entout,longSidePrompt:"\u0623\u062F\u062E\u0644 \u062D\u062C\u0645 \u0627\u0644\u0636\u0644\u0639 \u0627\u0644\u0623\u0637\u0648\u0644 \u0644\u0644\u0645\u0639\u0627\u064A\u0646\u0629 \u0628\u0627\u0644\u0628\u0643\u0633\u0644",exported:"\u062A\u0645 \u062A\u0635\u062F\u064A\u0631 \u0645\u0639\u0627\u064A\u0646\u0627\u062A \u0627\u0644\u0639\u0646\u0627\u0635\u0631",skipped:"\u062A\u0645 \u062A\u062E\u0637\u064A \u0628\u0639\u0636 \u0627\u0644\u0639\u0646\u0627\u0635\u0631",failed:{...ze.entout.failed,"no-preview-root":"\u062A\u0639\u0630\u0631 \u0625\u0646\u0634\u0627\u0621 \u0647\u0646\u062F\u0633\u0629 \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","no-bounds":"\u062A\u0639\u0630\u0631 \u062D\u0633\u0627\u0628 \u062D\u062F\u0648\u062F \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629 \u0644\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","capture-failed":"\u062A\u0639\u0630\u0631 \u0639\u0631\u0636 \u0635\u0648\u0631\u0629 \u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0639\u0646\u0627\u0635\u0631","download-failed":"\u062A\u0645 \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629 \u0648\u0644\u0643\u0646 \u0641\u0634\u0644 \u062A\u0646\u0632\u064A\u0644 \u0645\u0644\u0641 PNG"}},layer:{...ze.layer,main:"\u0623\u062F\u062E\u0644 \u062E\u064A\u0627\u0631\u064B\u0627",listSummary:"\u062A\u0645\u062A \u0637\u0628\u0627\u0639\u0629 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0641\u064A \u0648\u062D\u062F\u0629 \u062A\u062D\u0643\u0645 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",emptyInput:"\u0644\u0645 \u064A\u062A\u0645 \u0625\u062F\u062E\u0627\u0644 \u0627\u0633\u0645 \u0637\u0628\u0642\u0629.",newPrompt:"\u0623\u062F\u062E\u0644 \u0627\u0633\u0645 \u0627\u0644\u0637\u0628\u0642\u0629 \u0623\u0648 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u062C\u062F\u064A\u062F\u0629",makePrompt:"\u0623\u062F\u062E\u0644 \u0627\u0633\u0645 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0625\u0646\u0634\u0627\u0624\u0647\u0627 \u0648\u062C\u0639\u0644\u0647\u0627 \u062D\u0627\u0644\u064A\u0629",setPrompt:"\u0623\u062F\u062E\u0644 \u0627\u0633\u0645 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062C\u0639\u0644\u0647\u0627 \u062D\u0627\u0644\u064A\u0629",onPrompt:"\u0623\u062F\u062E\u0644 \u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u0634\u063A\u064A\u0644\u0647\u0627",offPrompt:"\u0623\u062F\u062E\u0644 \u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0625\u064A\u0642\u0627\u0641\u0647\u0627",freezePrompt:"\u0623\u062F\u062E\u0644 \u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u062C\u0645\u064A\u062F\u0647\u0627",thawPrompt:"\u0623\u062F\u062E\u0644 \u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0625\u0644\u063A\u0627\u0621 \u062A\u062C\u0645\u064A\u062F\u0647\u0627",lockPrompt:"\u0623\u062F\u062E\u0644 \u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0642\u0641\u0644\u0647\u0627",unlockPrompt:"\u0623\u062F\u062E\u0644 \u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0625\u0644\u063A\u0627\u0621 \u0642\u0641\u0644\u0647\u0627",colorLayerPrompt:"\u0623\u062F\u062E\u0644 \u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u063A\u064A\u064A\u0631 \u0644\u0648\u0646\u0647\u0627",colorValuePrompt:"\u0623\u062F\u062E\u0644 \u0627\u0644\u0644\u0648\u0646 (ACI \u0645\u0646 1 \u0625\u0644\u0649 255\u060C \u0623\u0648 RGB \u0645\u062B\u0644 255,0,0\u060C \u0623\u0648 \u0627\u0633\u0645 \u0644\u0648\u0646 CSS)",invalidColor:"\u0642\u064A\u0645\u0629 \u0627\u0644\u0644\u0648\u0646 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629.",descriptionLayerPrompt:"\u0623\u062F\u062E\u0644 \u0627\u0633\u0645 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u0639\u062F\u064A\u0644 \u0648\u0635\u0641\u0647\u0627",descriptionValuePrompt:"\u0623\u062F\u062E\u0644 \u0648\u0635\u0641 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062C\u062F\u064A\u062F",created:"\u0639\u062F\u062F \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u062A\u064A \u062A\u0645 \u0625\u0646\u0634\u0627\u0624\u0647\u0627",alreadyExists:"\u0627\u0644\u0637\u0628\u0642\u0629 \u0645\u0648\u062C\u0648\u062F\u0629 \u0628\u0627\u0644\u0641\u0639\u0644",notFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",cannotChangeCurrent:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629 \u0623\u0648 \u062A\u062C\u0645\u064A\u062F\u0647\u0627.",keywords:{...ze.layer.keywords,list:{display:"\u0642\u0627\u0626\u0645\u0629(?)",local:"\u0642\u0627\u0626\u0645\u0629",global:"?"},make:{display:"\u0625\u0646\u0634\u0627\u0621(M)",local:"\u0625\u0646\u0634\u0627\u0621",global:"Make"},set:{display:"\u062A\u0639\u064A\u064A\u0646(S)",local:"\u062A\u0639\u064A\u064A\u0646",global:"Set"},new:{display:"\u062C\u062F\u064A\u062F(N)",local:"\u062C\u062F\u064A\u062F",global:"New"},on:{display:"\u062A\u0634\u063A\u064A\u0644(ON)",local:"\u062A\u0634\u063A\u064A\u0644",global:"On"},off:{display:"\u0625\u064A\u0642\u0627\u0641(OF)",local:"\u0625\u064A\u0642\u0627\u0641",global:"Off"},color:{display:"\u0644\u0648\u0646(C)",local:"\u0644\u0648\u0646",global:"Color"},freeze:{display:"\u062A\u062C\u0645\u064A\u062F(F)",local:"\u062A\u062C\u0645\u064A\u062F",global:"Freeze"},thaw:{display:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u062A\u062C\u0645\u064A\u062F(T)",local:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u062A\u062C\u0645\u064A\u062F",global:"Thaw"},lock:{display:"\u0642\u0641\u0644(L)",local:"\u0642\u0641\u0644",global:"Lock"},unlock:{display:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0642\u0641\u0644(U)",local:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0642\u0641\u0644",global:"Unlock"},description:{display:"\u0648\u0635\u0641(D)",local:"\u0648\u0635\u0641",global:"Description"}}},layon:{...ze.layon,alreadyOn:"\u062C\u0645\u064A\u0639 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0642\u064A\u062F \u0627\u0644\u062A\u0634\u063A\u064A\u0644 \u0628\u0627\u0644\u0641\u0639\u0644.",turnedOn:"\u062A\u0645 \u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0637\u0628\u0642\u0627\u062A"},laycur:{...ze.laycur,prompt:"\u062D\u062F\u062F \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0646\u0642\u0644\u0647\u0627 \u0625\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629",currentLayerNotFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629.",noObjects:"\u0644\u0645 \u064A\u062A\u0645 \u062A\u062D\u062F\u064A\u062F \u0639\u0646\u0627\u0635\u0631 \u0635\u0627\u0644\u062D\u0629.",alreadyCurrent:"\u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0645\u0648\u062C\u0648\u062F\u0629 \u0628\u0627\u0644\u0641\u0639\u0644 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629.",changed:"\u062A\u0645 \u0646\u0642\u0644 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 \u0625\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629"},layfrz:{...ze.layfrz,prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u062C\u0645\u064A\u062F\u0647\u0627 \u0623\u0648",invalidSelection:"\u0627\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.",settingsPrompt:"\u0623\u062F\u062E\u0644 \u0625\u0639\u062F\u0627\u062F LAYFRZ \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u063A\u064A\u064A\u0631\u0647",viewportPrompt:"\u062D\u062F\u062F \u0633\u0644\u0648\u0643 \u0627\u0644\u062A\u062C\u0645\u064A\u062F \u062F\u0627\u062E\u0644 \u0645\u0646\u0641\u0630 \u0627\u0644\u0639\u0631\u0636",blockSelectionPrompt:"\u062D\u062F\u062F \u0633\u0644\u0648\u0643 \u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u0643\u062A\u0644 \u0627\u0644\u0645\u062A\u062F\u0627\u062E\u0644\u0629",vpfreezeFallback:"\u0627\u0644\u0639\u0627\u0631\u0636 \u0627\u0644\u062D\u0627\u0644\u064A \u0644\u0627 \u064A\u062F\u0639\u0645 \u062A\u062C\u0645\u064A\u062F \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0628\u0634\u0643\u0644 \u0645\u0633\u062A\u0642\u0644 \u0644\u0643\u0644 \u0645\u0646\u0641\u0630 \u0639\u0631\u0636\u061B \u0633\u064A\u062A\u0645 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u062A\u062C\u0645\u064A\u062F \u0627\u0644\u0639\u0627\u062F\u064A \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643.",nestedSelectionLimited:"\u062A\u0645 \u062D\u0641\u0638 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u0643\u062A\u0644 \u0627\u0644\u0645\u062A\u062F\u0627\u062E\u0644\u0629\u060C \u0644\u0643\u0646 \u0627\u0644\u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u062D\u0627\u0644\u064A \u0645\u0627 \u0632\u0627\u0644 \u064A\u0639\u062A\u0645\u062F \u0637\u0628\u0642\u0629 \u0627\u0644\u0639\u0646\u0635\u0631 \u0630\u064A \u0627\u0644\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0623\u0639\u0644\u0649.",layerNotFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",cannotFreezeCurrent:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u062C\u0645\u064A\u062F \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629.",alreadyFrozen:"\u0627\u0644\u0637\u0628\u0642\u0629 \u0645\u062C\u0645\u062F\u0629 \u0628\u0627\u0644\u0641\u0639\u0644",frozen:"\u062A\u0645 \u062A\u062C\u0645\u064A\u062F \u0627\u0644\u0637\u0628\u0642\u0629",restored:"\u062A\u0645\u062A \u0627\u0633\u062A\u0639\u0627\u062F\u0629 \u0627\u0644\u0637\u0628\u0642\u0629",nothingToUndo:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0639\u0645\u0644\u064A\u0629 LAYFRZ \u064A\u0645\u0643\u0646 \u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646\u0647\u0627.",keywords:{...ze.layfrz.keywords,settings:{display:"\u0625\u0639\u062F\u0627\u062F\u0627\u062A(S)",local:"\u0625\u0639\u062F\u0627\u062F\u0627\u062A",global:"Settings"},undo:{display:"\u062A\u0631\u0627\u062C\u0639(U)",local:"\u062A\u0631\u0627\u062C\u0639",global:"Undo"},viewports:{display:"\u0625\u0637\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0636(V)",local:"\u0625\u0637\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0636",global:"Viewports"},blockSelection:{display:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u062A\u0644\u0629(B)",local:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u062A\u0644\u0629",global:"BlockSelection"},freeze:{display:"\u062A\u062C\u0645\u064A\u062F(F)",local:"\u062A\u062C\u0645\u064A\u062F",global:"Freeze"},vpfreeze:{display:"\u062A\u062C\u0645\u064A\u062F \u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0631\u0636(V)",local:"\u062A\u062C\u0645\u064A\u062F \u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0631\u0636",global:"Vpfreeze"},block:{display:"\u0643\u062A\u0644\u0629(B)",local:"\u0643\u062A\u0644\u0629",global:"Block"},entity:{display:"\u0643\u064A\u0627\u0646(E)",local:"\u0643\u064A\u0627\u0646",global:"Entity"},none:{display:"\u0644\u0627 \u0634\u064A\u0621(N)",local:"\u0644\u0627 \u0634\u064A\u0621",global:"None"}}},layiso:{...ze.layiso,prompt:"\u062D\u062F\u062F \u0639\u0646\u0627\u0635\u0631 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0623\u0648 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0639\u0632\u0644\u0647\u0627 \u0623\u0648",settingsPrompt:"\u0623\u062F\u062E\u0644 \u0625\u0639\u062F\u0627\u062F \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u063A\u064A\u0631 \u0627\u0644\u0645\u0639\u0632\u0648\u0644\u0629",offModePrompt:"\u062D\u062F\u062F \u0633\u0644\u0648\u0643 \u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u063A\u064A\u0631 \u0627\u0644\u0645\u0639\u0632\u0648\u0644\u0629",noLayers:"\u0644\u0645 \u064A\u062A\u0645 \u062A\u062D\u062F\u064A\u062F \u0637\u0628\u0642\u0627\u062A \u0635\u0627\u0644\u062D\u0629.",layerNotFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",isolated:"\u062A\u0645 \u0639\u0632\u0644 \u0627\u0644\u0637\u0628\u0642\u0627\u062A",affectedLayers:"\u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0645\u062A\u0623\u062B\u0631\u0629",vpfreezeFallback:"\u0627\u0644\u0639\u0627\u0631\u0636 \u0627\u0644\u062D\u0627\u0644\u064A \u0644\u0627 \u064A\u062F\u0639\u0645 \u0627\u0644\u062A\u062C\u0645\u064A\u062F \u0627\u0644\u0645\u0633\u062A\u0642\u0644 \u0644\u0643\u0644 \u0645\u0646\u0641\u0630 \u0639\u0631\u0636\u061B \u0633\u064A\u062A\u0645 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0625\u064A\u0642\u0627\u0641 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643.",lockFadeFallback:"\u0627\u0644\u0639\u0627\u0631\u0636 \u0627\u0644\u062D\u0627\u0644\u064A \u0644\u0627 \u064A\u062F\u0639\u0645 \u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0628\u062A\u0623\u062B\u064A\u0631 \u0627\u0644\u062A\u0644\u0627\u0634\u064A\u061B \u0633\u064A\u062A\u0645 \u0642\u0641\u0644 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u063A\u064A\u0631 \u0627\u0644\u0645\u0639\u0632\u0648\u0644\u0629 \u062F\u0648\u0646 \u062A\u0644\u0627\u0634\u064A.",keywords:{...ze.layiso.keywords,settings:{display:"\u0625\u0639\u062F\u0627\u062F\u0627\u062A(S)",local:"\u0625\u0639\u062F\u0627\u062F\u0627\u062A",global:"Settings"},off:{display:"\u0625\u064A\u0642\u0627\u0641(O)",local:"\u0625\u064A\u0642\u0627\u0641",global:"Off"},lockAndFade:{display:"\u0642\u0641\u0644 \u0648\u062A\u0639\u062A\u064A\u0645(L)",local:"\u0642\u0641\u0644 \u0648\u062A\u0639\u062A\u064A\u0645",global:"LockAndFade"},vpfreeze:{display:"\u062A\u062C\u0645\u064A\u062F \u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0631\u0636(V)",local:"\u062A\u062C\u0645\u064A\u062F \u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0631\u0636",global:"Vpfreeze"}}},layuniso:{...ze.layuniso,noPrevious:"\u0644\u0627 \u062A\u0648\u062C\u062F \u062D\u0627\u0644\u0629 LAYISO \u0633\u0627\u0628\u0642\u0629 \u0644\u0627\u0633\u062A\u0639\u0627\u062F\u062A\u0647\u0627.",layerNotFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",nothingRestored:"\u0644\u0645 \u062A\u062A\u0645 \u0627\u0633\u062A\u0639\u0627\u062F\u0629 \u0623\u064A \u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0637\u0628\u0642\u0627\u062A \u0645\u0646 LAYISO.",restored:"\u062A\u0645\u062A \u0627\u0633\u062A\u0639\u0627\u062F\u0629 \u0627\u0644\u0637\u0628\u0642\u0627\u062A"},laythw:{...ze.laythw,alreadyThawed:"\u062C\u0645\u064A\u0639 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u063A\u064A\u0631 \u0645\u062C\u0645\u062F\u0629 \u0628\u0627\u0644\u0641\u0639\u0644.",thawed:"\u062A\u0645 \u0625\u0644\u063A\u0627\u0621 \u062A\u062C\u0645\u064A\u062F \u0627\u0644\u0637\u0628\u0642\u0627\u062A"},laylck:{...ze.laylck,prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0642\u0641\u0644\u0647\u0627",invalidSelection:"\u0627\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.",layerNotFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",alreadyLocked:"\u0627\u0644\u0637\u0628\u0642\u0629 \u0645\u0642\u0641\u0644\u0629 \u0628\u0627\u0644\u0641\u0639\u0644",locked:"\u062A\u0645 \u0642\u0641\u0644 \u0627\u0644\u0637\u0628\u0642\u0629"},layulk:{...ze.layulk,prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0625\u0644\u063A\u0627\u0621 \u0642\u0641\u0644\u0647\u0627",invalidSelection:"\u0627\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.",layerNotFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",alreadyUnlocked:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0642\u0641\u0644\u0629 \u0628\u0627\u0644\u0641\u0639\u0644",unlocked:"\u062A\u0645 \u0625\u0644\u063A\u0627\u0621 \u0642\u0641\u0644 \u0627\u0644\u0637\u0628\u0642\u0629"},layoff:{...ze.layoff,prompt:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627 \u0639\u0644\u0649 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0625\u064A\u0642\u0627\u0641\u0647\u0627 \u0623\u0648",invalidSelection:"\u0627\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.",settingsPrompt:"\u0623\u062F\u062E\u0644 \u0625\u0639\u062F\u0627\u062F LAYOFF \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062A\u063A\u064A\u064A\u0631\u0647",viewportPrompt:"\u062D\u062F\u062F \u0633\u0644\u0648\u0643 \u0645\u0646\u0641\u0630 \u0627\u0644\u0639\u0631\u0636",blockSelectionPrompt:"\u062D\u062F\u062F \u0633\u0644\u0648\u0643 \u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u0643\u062A\u0644 \u0627\u0644\u0645\u062A\u062F\u0627\u062E\u0644\u0629",vpfreezeFallback:"\u0627\u0644\u0639\u0627\u0631\u0636 \u0627\u0644\u062D\u0627\u0644\u064A \u0644\u0627 \u064A\u062F\u0639\u0645 \u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0628\u0634\u0643\u0644 \u0645\u0633\u062A\u0642\u0644 \u0644\u0643\u0644 \u0645\u0646\u0641\u0630 \u0639\u0631\u0636\u061B \u0633\u064A\u062A\u0645 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0639\u0627\u062F\u064A \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643.",nestedSelectionLimited:"\u062A\u0645 \u062D\u0641\u0638 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u0643\u062A\u0644 \u0627\u0644\u0645\u062A\u062F\u0627\u062E\u0644\u0629\u060C \u0644\u0643\u0646 \u0627\u0644\u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u062D\u0627\u0644\u064A \u0645\u0627 \u0632\u0627\u0644 \u064A\u0639\u062A\u0645\u062F \u0637\u0628\u0642\u0629 \u0627\u0644\u0639\u0646\u0635\u0631 \u0630\u064A \u0627\u0644\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0623\u0639\u0644\u0649.",layerNotFound:"\u0627\u0644\u0637\u0628\u0642\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",cannotTurnOffCurrent:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629.",alreadyOff:"\u0627\u0644\u0637\u0628\u0642\u0629 \u0645\u062A\u0648\u0642\u0641\u0629 \u0628\u0627\u0644\u0641\u0639\u0644",turnedOff:"\u062A\u0645 \u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0637\u0628\u0642\u0629",restored:"\u062A\u0645\u062A \u0627\u0633\u062A\u0639\u0627\u062F\u0629 \u0627\u0644\u0637\u0628\u0642\u0629",nothingToUndo:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0639\u0645\u0644\u064A\u0629 LAYOFF \u064A\u0645\u0643\u0646 \u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646\u0647\u0627.",keywords:{...ze.layoff.keywords,settings:{display:"\u0625\u0639\u062F\u0627\u062F\u0627\u062A(S)",local:"\u0625\u0639\u062F\u0627\u062F\u0627\u062A",global:"Settings"},undo:{display:"\u062A\u0631\u0627\u062C\u0639(U)",local:"\u062A\u0631\u0627\u062C\u0639",global:"Undo"},viewports:{display:"\u0625\u0637\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0636(V)",local:"\u0625\u0637\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0636",global:"Viewports"},blockSelection:{display:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u062A\u0644\u0629(B)",local:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u062A\u0644\u0629",global:"BlockSelection"},off:{display:"\u0625\u064A\u0642\u0627\u0641(O)",local:"\u0625\u064A\u0642\u0627\u0641",global:"Off"},vpfreeze:{display:"\u062A\u062C\u0645\u064A\u062F \u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0631\u0636(V)",local:"\u062A\u062C\u0645\u064A\u062F \u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0631\u0636",global:"Vpfreeze"},block:{display:"\u0643\u062A\u0644\u0629(B)",local:"\u0643\u062A\u0644\u0629",global:"Block"},entity:{display:"\u0643\u064A\u0627\u0646(E)",local:"\u0643\u064A\u0627\u0646",global:"Entity"},none:{display:"\u0644\u0627 \u0634\u064A\u0621(N)",local:"\u0644\u0627 \u0634\u064A\u0621",global:"None"}}},layerp:{...ze.layerp,restored:"\u062A\u0645\u062A \u0627\u0633\u062A\u0639\u0627\u062F\u0629 \u062D\u0627\u0644\u0629 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u0627\u0644\u0633\u0627\u0628\u0642\u0629.",noPreviousState:"\u0644\u0627 \u062A\u0648\u062C\u062F \u062D\u0627\u0644\u0629 \u0637\u0628\u0642\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0644\u0627\u0633\u062A\u0639\u0627\u062F\u062A\u0647\u0627."},mline:{...ze.mline,startPointWithOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0628\u062F\u0627\u064A\u0629 \u0623\u0648",nextPointWithOptions:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0623\u0648",justificationPrompt:"\u0623\u062F\u062E\u0644 \u0646\u0648\u0639 \u0627\u0644\u0645\u062D\u0627\u0630\u0627\u0629",scalePrompt:"\u062D\u062F\u062F \u0645\u0642\u064A\u0627\u0633 \u0627\u0644\u062E\u0637 \u0627\u0644\u0645\u062A\u0639\u062F\u062F",stylePrompt:"\u0623\u062F\u062E\u0644 \u0627\u0633\u0645 \u0646\u0645\u0637 \u0627\u0644\u062E\u0637 \u0627\u0644\u0645\u062A\u0639\u062F\u062F \u0623\u0648 [?] \u0644\u0639\u0631\u0636 \u0627\u0644\u0642\u0627\u0626\u0645\u0629",styleNotFound:"\u0646\u0645\u0637 \u0627\u0644\u062E\u0637 \u0627\u0644\u0645\u062A\u0639\u062F\u062F \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F",styleListHeader:"\u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u062E\u0637\u0648\u0637 \u0627\u0644\u0645\u062A\u0639\u062F\u062F\u0629 \u0627\u0644\u0645\u062D\u0645\u0644\u0629",styleListEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0623\u0646\u0645\u0627\u0637 \u062E\u0637\u0648\u0637 \u0645\u062A\u0639\u062F\u062F\u0629 \u0645\u062D\u0645\u0644\u0629 \u0641\u064A \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0627\u0644\u064A.",keywords:{...ze.mline.keywords,justification:{display:"\u0645\u062D\u0627\u0630\u0627\u0629(J)",local:"\u0645\u062D\u0627\u0630\u0627\u0629",global:"Justification"},scale:{display:"\u0645\u0642\u064A\u0627\u0633(S)",local:"\u0645\u0642\u064A\u0627\u0633",global:"Scale"},style:{display:"\u0623\u0633\u0644\u0648\u0628(ST)",local:"\u0623\u0633\u0644\u0648\u0628",global:"Style"},undo:{display:"\u062A\u0631\u0627\u062C\u0639(U)",local:"\u062A\u0631\u0627\u062C\u0639",global:"Undo"},close:{display:"\u0625\u063A\u0644\u0627\u0642(C)",local:"\u0625\u063A\u0644\u0627\u0642",global:"Close"},top:{display:"\u0623\u0639\u0644\u0649(T)",local:"\u0623\u0639\u0644\u0649",global:"Top"},zero:{display:"\u0635\u0641\u0631(Z)",local:"\u0635\u0641\u0631",global:"Zero"},bottom:{display:"\u0623\u0633\u0641\u0644(B)",local:"\u0623\u0633\u0641\u0644",global:"Bottom"}}},measureAngle:{...ze.measureAngle,vertex:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0631\u0623\u0633 \u0627\u0644\u0632\u0627\u0648\u064A\u0629",arm1:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0639\u0644\u0649 \u0627\u0644\u0636\u0644\u0639 \u0627\u0644\u0623\u0648\u0644",arm2:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0639\u0644\u0649 \u0627\u0644\u0636\u0644\u0639 \u0627\u0644\u062B\u0627\u0646\u064A"},measureArc:{...ze.measureArc,startPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633",throughPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0639\u0644\u0649 \u0627\u0644\u0642\u0648\u0633",endPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633",lockedEndPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0646\u0647\u0627\u064A\u0629 \u0627\u0644\u0642\u0648\u0633 (\u0627\u0633\u062A\u062E\u062F\u0645 Ctrl \u0644\u0644\u062A\u0628\u062F\u064A\u0644 \u0628\u064A\u0646 \u0627\u0644\u0642\u0648\u0633 \u0627\u0644\u0623\u0643\u0628\u0631 \u0648\u0627\u0644\u0623\u0635\u063A\u0631)",invalidPoints:"\u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u062B\u0644\u0627\u062B \u0639\u0644\u0649 \u0627\u0633\u062A\u0642\u0627\u0645\u0629 \u0648\u0627\u062D\u062F\u0629 \u0648\u0644\u0627 \u064A\u0645\u0643\u0646\u0647\u0627 \u062A\u0639\u0631\u064A\u0641 \u0642\u0648\u0633."},measureArea:{...ze.measureArea,firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",nextPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 (\u0623\u0648 \u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u0646\u0647\u0627\u0621)"},measureDistance:{...ze.measureDistance,firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",secondPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629"},measureContinuous:{...ze.measureContinuous,firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",nextPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 (\u0623\u0648 \u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u0646\u0647\u0627\u0621)"},measurePoint:{...ze.measurePoint,point:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629"},measurement:{...ze.measurement,import:{...ze.measurement.import,chooseFile:"\u0627\u062E\u062A\u0631 \u0645\u0644\u0641 JSON \u062C\u0627\u0646\u0628\u064A\u064B\u0627 \u064A\u062D\u062A\u0648\u064A \u0639\u0644\u0649 \u0627\u0644\u0642\u064A\u0627\u0633\u0627\u062A"}},markup:{...ze.markup,author:"\u062D\u062F\u062F \u0627\u0633\u0645 \u0645\u0624\u0644\u0641 \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629 (\u0633\u064A\u062A\u0645 \u062D\u0641\u0638\u0647 \u0644\u0644\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0644\u0627\u062D\u0642\u064B\u0627)",text:{...ze.markup.text,point:"\u062D\u062F\u062F \u0645\u0648\u0636\u0639 \u0639\u0644\u0627\u0645\u0629 \u0627\u0644\u0646\u0635",content:"\u0623\u062F\u062E\u0644 \u0646\u0635 \u0639\u0644\u0627\u0645\u0629 \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629"},line:{...ze.markup.line,firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 \u0644\u062E\u0637 \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629",secondPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062B\u0627\u0646\u064A\u0629 \u0644\u062E\u0637 \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629"},arrow:{...ze.markup.arrow,firstPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0633\u0647\u0645",secondPoint:"\u062D\u062F\u062F \u0631\u0623\u0633 \u0627\u0644\u0633\u0647\u0645"},cloud:{...ze.markup.cloud,firstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0644\u0644\u0633\u062D\u0627\u0628\u0629",secondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644 \u0644\u0644\u0633\u062D\u0627\u0628\u0629"},rect:{...ze.markup.rect,firstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0644\u0644\u0645\u0633\u062A\u0637\u064A\u0644",secondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644 \u0644\u0644\u0645\u0633\u062A\u0637\u064A\u0644"},circle:{...ze.markup.circle,center:"\u062D\u062F\u062F \u0645\u0631\u0643\u0632 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",radius:"\u062D\u062F\u062F \u0646\u0635\u0641 \u0642\u0637\u0631 \u0627\u0644\u062F\u0627\u0626\u0631\u0629"},shape:{...ze.markup.shape,calloutOn:"[\u0648\u0633\u064A\u0644\u0629 \u0627\u0644\u0634\u0631\u062D \u0645\u0641\u0639\u0644\u0629]",calloutOff:"[\u0648\u0633\u064A\u0644\u0629 \u0627\u0644\u0634\u0631\u062D \u0645\u0639\u0637\u0644\u0629]",calloutAnchor:"\u062D\u062F\u062F \u0645\u0648\u0636\u0639 \u0646\u0635 \u0648\u0633\u064A\u0644\u0629 \u0627\u0644\u0634\u0631\u062D",keywords:{...ze.markup.shape.keywords,callout:{display:"\u062A\u0639\u0644\u064A\u0642 \u062A\u0648\u0636\u064A\u062D\u064A(C)",local:"\u062A\u0639\u0644\u064A\u0642 \u062A\u0648\u0636\u064A\u062D\u064A",global:"Callout"},noCallout:{display:"\u0628\u062F\u0648\u0646 \u062A\u0639\u0644\u064A\u0642 \u062A\u0648\u0636\u064A\u062D\u064A(N)",local:"\u0628\u062F\u0648\u0646 \u062A\u0639\u0644\u064A\u0642 \u062A\u0648\u0636\u064A\u062D\u064A",global:"NoCallout"}}},highlight:{...ze.markup.highlight,firstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0644\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u062A\u0645\u064A\u064A\u0632",secondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644 \u0644\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u062A\u0645\u064A\u064A\u0632"},callout:{...ze.markup.callout,tip:"\u062D\u062F\u062F \u0631\u0623\u0633 \u062E\u0637 \u0627\u0644\u062A\u0648\u062C\u064A\u0647\u060C \u0623\u0648 \u062D\u062F\u062F \u0625\u0637\u0627\u0631 \u0633\u062D\u0627\u0628\u0629/\u0645\u0633\u062A\u0637\u064A\u0644/\u062F\u0627\u0626\u0631\u0629 \u0628\u062F\u0648\u0646 \u062A\u0639\u0644\u064A\u0642 \u062A\u0648\u0636\u064A\u062D\u064A",anchor:"\u062D\u062F\u062F \u0645\u0648\u0636\u0639 \u0646\u0635 \u0648\u0633\u064A\u0644\u0629 \u0627\u0644\u0634\u0631\u062D",content:"\u0623\u062F\u062E\u0644 \u0646\u0635 \u0648\u0633\u064A\u0644\u0629 \u0627\u0644\u0634\u0631\u062D"},stamp:{...ze.markup.stamp,kind:"\u0623\u062F\u062E\u0644 \u0645\u0639\u0631\u0651\u0641 \u0627\u0644\u062E\u062A\u0645 [approved/rejected/revised/for-review/custom]",imageUrl:"\u0623\u062F\u062E\u0644 \u0631\u0627\u0628\u0637 \u0635\u0648\u0631\u0629 \u0627\u0644\u062E\u062A\u0645 \u0627\u0644\u0645\u062E\u0635\u0635 (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",caption:"\u0623\u062F\u062E\u0644 \u062A\u0633\u0645\u064A\u0629 \u0627\u0644\u062E\u062A\u0645 (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",point:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0625\u062F\u0631\u0627\u062C \u0627\u0644\u062E\u062A\u0645"},import:{...ze.markup.import,chooseFile:"\u0627\u062E\u062A\u0631 \u0645\u0644\u0641 JSON \u062C\u0627\u0646\u0628\u064A\u064B\u0627 \u064A\u062D\u062A\u0648\u064A \u0639\u0644\u0649 \u0639\u0644\u0627\u0645\u0627\u062A \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629"}},bmpout:{...ze.bmpout,boundsFirstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0644\u062D\u062F\u0648\u062F \u0627\u0644\u0635\u0648\u0631\u0629",boundsSecondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644",longSidePrompt:"\u0623\u062F\u062E\u0644 \u062D\u062C\u0645 \u0627\u0644\u0636\u0644\u0639 \u0627\u0644\u0623\u0637\u0648\u0644 \u0628\u0627\u0644\u0628\u0643\u0633\u0644"},jpgout:{...ze.jpgout,boundsFirstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0644\u062D\u062F\u0648\u062F \u0627\u0644\u0635\u0648\u0631\u0629",boundsSecondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644",longSidePrompt:"\u0623\u062F\u062E\u0644 \u062D\u062C\u0645 \u0627\u0644\u0636\u0644\u0639 \u0627\u0644\u0623\u0637\u0648\u0644 \u0628\u0627\u0644\u0628\u0643\u0633\u0644"},pngout:{...ze.pngout,boundsFirstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0644\u062D\u062F\u0648\u062F \u0627\u0644\u0635\u0648\u0631\u0629",boundsSecondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644",longSidePrompt:"\u0623\u062F\u062E\u0644 \u062D\u062C\u0645 \u0627\u0644\u0636\u0644\u0639 \u0627\u0644\u0623\u0637\u0648\u0644 \u0628\u0627\u0644\u0628\u0643\u0633\u0644"},imageattach:{...ze.imageattach,insertionPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0625\u062F\u0631\u0627\u062C:",scale:"\u062D\u062F\u062F \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633:",rotation:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u062F\u0648\u0631\u0627\u0646:",invalidScale:"\u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",decodeFailed:"\u0641\u0634\u0644\u062A \u0642\u0631\u0627\u0621\u0629 \u0645\u0644\u0641 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u062D\u062F\u062F."},insert:{...ze.insert,blockName:"\u0623\u062F\u062E\u0644 \u0627\u0633\u0645 \u0627\u0644\u0643\u062A\u0644\u0629:",insertionPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0625\u062F\u0631\u0627\u062C:",scale:"\u062D\u062F\u062F \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633:",rotation:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u062F\u0648\u0631\u0627\u0646:",invalidScale:"\u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",invalidBlockName:"\u0627\u0633\u0645 \u0627\u0644\u0643\u062A\u0644\u0629 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.",blockNotFound:"\u0627\u0644\u0643\u062A\u0644\u0629 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629",xrefNotAllowed:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u0625\u062F\u0631\u0627\u062C \u0645\u0631\u062C\u0639 \u062E\u0627\u0631\u062C\u064A \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 -INSERT."},xattach:{...ze.xattach,insertionPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0625\u062F\u0631\u0627\u062C:",scale:"\u062D\u062F\u062F \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633:",rotation:"\u062D\u062F\u062F \u0632\u0627\u0648\u064A\u0629 \u0627\u0644\u062F\u0648\u0631\u0627\u0646:",invalidScale:"\u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0639\u0627\u0645\u0644 \u0627\u0644\u0645\u0642\u064A\u0627\u0633 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",unsupportedFile:"\u0627\u062E\u062A\u0631 \u0645\u0644\u0641 DWG \u0623\u0648 DXF.",loading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0631\u062C\u0639 \u0627\u0644\u062E\u0627\u0631\u062C\u064A...",loadFailed:"\u0641\u0634\u0644\u062A \u0642\u0631\u0627\u0621\u0629 \u0645\u0644\u0641 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u0645\u062D\u062F\u062F."},revcloud:{...ze.revcloud,firstCornerOrOptions:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0623\u0648",firstCorner:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644",oppositeCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0645\u0642\u0627\u0628\u0644",startPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0628\u062F\u0627\u064A\u0629",nextPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",nextPointOrUndo:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0623\u0648",firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",guideCursor:"\u062D\u0631\u0651\u0643 \u0627\u0644\u0645\u0624\u0634\u0631 \u0639\u0644\u0649 \u0645\u0633\u0627\u0631 \u0627\u0644\u0633\u062D\u0627\u0628\u0629 (\u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u0646\u0647\u0627\u0621)",arcLength:"\u062D\u062F\u062F \u0637\u0648\u0644 \u0627\u0644\u0642\u0648\u0633",selectObject:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627",style:"\u0623\u062F\u062E\u0644 \u0646\u0645\u0637 \u0623\u0642\u0648\u0627\u0633 \u0633\u062D\u0627\u0628\u0629 \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629",reverseDirection:"\u0627\u0639\u0643\u0633 \u0627\u0644\u0627\u062A\u062C\u0627\u0647",invalidArcLength:"\u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0637\u0648\u0644 \u0627\u0644\u0642\u0648\u0633 \u0623\u0643\u0628\u0631 \u0645\u0646 0.",invalidObject:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u062D\u0648\u064A\u0644 \u0627\u0644\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u062D\u062F\u062F \u0625\u0644\u0649 \u0633\u062D\u0627\u0628\u0629 \u0645\u0631\u0627\u062C\u0639\u0629.",keywords:{...ze.revcloud.keywords,arcLength:{display:"\u0637\u0648\u0644 \u0627\u0644\u0642\u0648\u0633(A)",local:"\u0637\u0648\u0644 \u0627\u0644\u0642\u0648\u0633",global:"ArcLength"},object:{display:"\u0643\u0627\u0626\u0646(O)",local:"\u0643\u0627\u0626\u0646",global:"Object"},rectangular:{display:"\u0645\u0633\u062A\u0637\u064A\u0644(R)",local:"\u0645\u0633\u062A\u0637\u064A\u0644",global:"Rectangular"},polygonal:{display:"\u0645\u0636\u0644\u0651\u0639(P)",local:"\u0645\u0636\u0644\u0651\u0639",global:"Polygonal"},freehand:{display:"\u064A\u062F\u0648\u064A(F)",local:"\u064A\u062F\u0648\u064A",global:"Freehand"},style:{display:"\u0623\u0633\u0644\u0648\u0628(S)",local:"\u0623\u0633\u0644\u0648\u0628",global:"Style"},normal:{display:"\u0639\u0627\u062F\u064A(N)",local:"\u0639\u0627\u062F\u064A",global:"Normal"},calligraphy:{display:"\u062E\u0637 \u0632\u062E\u0631\u0641\u064A(C)",local:"\u062E\u0637 \u0632\u062E\u0631\u0641\u064A",global:"Calligraphy"},undo:{display:"\u062A\u0631\u0627\u062C\u0639(U)",local:"\u062A\u0631\u0627\u062C\u0639",global:"Undo"},yes:{display:"\u0646\u0639\u0645(Y)",local:"\u0646\u0639\u0645",global:"Yes"},no:{display:"\u0644\u0627(N)",local:"\u0644\u0627",global:"No"}}},sketch:{...ze.sketch,specifySketch:"\u062D\u062F\u062F \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0631 \u0623\u0648",sketching:"\u062D\u0631\u0651\u0643 \u0627\u0644\u0645\u0624\u0634\u0631 \u0644\u0644\u0631\u0633\u0645 (\u0627\u0646\u0642\u0631 \u0623\u0648 \u0627\u0636\u063A\u0637 Enter \u0644\u0644\u0625\u064A\u0642\u0627\u0641)",type:"\u0623\u062F\u062E\u0644 \u0646\u0648\u0639 \u0627\u0644\u0631\u0633\u0645 \u0627\u0644\u062D\u0631",increment:"\u062D\u062F\u062F \u0645\u0642\u062F\u0627\u0631 \u0632\u064A\u0627\u062F\u0629 \u0627\u0644\u0631\u0633\u0645",tolerance:"\u062D\u062F\u062F \u0633\u0645\u0627\u062D\u064A\u0629 \u0645\u0646\u062D\u0646\u0649 Spline",firstPoint:"\u062D\u062F\u062F \u0627\u0644\u0646\u0642\u0637\u0629 \u0627\u0644\u0623\u0648\u0644\u0649",nextPoint:"\u062D\u062F\u062F \u0646\u0642\u0637\u0629 \u0627\u0644\u0646\u0647\u0627\u064A\u0629",keywords:{...ze.sketch.keywords,type:{display:"\u0646\u0648\u0639(T)",local:"\u0646\u0648\u0639",global:"Type"},increment:{display:"\u0632\u064A\u0627\u062F\u0629(I)",local:"\u0632\u064A\u0627\u062F\u0629",global:"Increment"},tolerance:{display:"\u0633\u0645\u0627\u062D\u064A\u0629(L)",local:"\u0633\u0645\u0627\u062D\u064A\u0629",global:"Tolerance"},line:{display:"\u062E\u0637(L)",local:"\u062E\u0637",global:"Lines"},polyline:{display:"\u062E\u0637 \u0645\u062A\u0639\u062F\u062F(P)",local:"\u062E\u0637 \u0645\u062A\u0639\u062F\u062F",global:"Polyline"},spline:{display:"\u0645\u0646\u062D\u0646\u0649 \u0633\u0628\u0644\u0627\u064A\u0646(S)",local:"\u0645\u0646\u062D\u0646\u0649 \u0633\u0628\u0644\u0627\u064A\u0646",global:"Spline"}}},sysvar:{...ze.sysvar,prompt:"\u0623\u062F\u062E\u0644 \u0627\u0644\u0642\u064A\u0645\u0629 \u0627\u0644\u062C\u062F\u064A\u062F\u0629"},chtml:{...ze.chtml,exportFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u062A\u0635\u062F\u064A\u0631",exportInvisibleLayers:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0637\u0628\u0642\u0627\u062A \u063A\u064A\u0631 \u0627\u0644\u0645\u0631\u0626\u064A\u0629",exportLayouts:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0645\u062E\u0637\u0637\u0627\u062A",initialView:"\u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0623\u0648\u0644\u064A \u0639\u0646\u062F \u0641\u062A\u062D HTML",viewerMode:"\u0648\u0636\u0639 \u0627\u0644\u0639\u0627\u0631\u0636 \u062F\u0648\u0646 \u0627\u062A\u0635\u0627\u0644",chunkSizeMiB:"\u062D\u062C\u0645 \u0627\u0644\u062C\u0632\u0621 \u0628\u0627\u0644\u0645\u064A\u0628\u064A\u0628\u0627\u064A\u062A (\u062D\u0632\u0645\u0629 \u0645\u062A\u0639\u062F\u062F\u0629 \u0627\u0644\u0645\u0644\u0641\u0627\u062A)",compressChunks:"\u0636\u063A\u0637 \u0627\u0644\u0623\u062C\u0632\u0627\u0621 (\u062D\u0632\u0645\u0629 \u0645\u062A\u0639\u062F\u062F\u0629 \u0627\u0644\u0645\u0644\u0641\u0627\u062A)",keywords:{...ze.chtml.keywords,single:{display:"\u0645\u0644\u0641 \u0648\u0627\u062D\u062F(S)",local:"\u0645\u0644\u0641 \u0648\u0627\u062D\u062F",global:"Single"},multi:{display:"\u062D\u0632\u0645\u0629 \u0645\u062A\u0639\u062F\u062F\u0629 \u0627\u0644\u0645\u0644\u0641\u0627\u062A(M)",local:"\u062D\u0632\u0645\u0629 \u0645\u062A\u0639\u062F\u062F\u0629 \u0627\u0644\u0645\u0644\u0641\u0627\u062A",global:"Multi"},yes:{display:"\u0646\u0639\u0645(Y)",local:"\u0646\u0639\u0645",global:"Yes"},no:{display:"\u0644\u0627(N)",local:"\u0644\u0627",global:"No"},extents:{display:"\u0627\u0644\u062D\u062F\u0648\u062F(E)",local:"\u0627\u0644\u062D\u062F\u0648\u062F",global:"Extents"},current:{display:"\u0627\u0644\u062D\u0627\u0644\u064A(C)",local:"\u0627\u0644\u062D\u0627\u0644\u064A",global:"Current"},view:{display:"\u0639\u0631\u0636(V)",local:"\u0639\u0631\u0636",global:"View"},measure:{display:"\u0642\u064A\u0627\u0633(M)",local:"\u0642\u064A\u0627\u0633",global:"Measure"}}},cpdf:{...ze.cpdf,modelSpaceFit:"\u0625\u0637\u0627\u0631 \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0646\u0645\u0648\u0630\u062C",exportLayouts:"\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0645\u062E\u0637\u0637\u0627\u062A",textMode:"\u0639\u0631\u0636 \u0627\u0644\u0646\u0635",keywords:{...ze.cpdf.keywords,extents:{display:"\u0627\u0644\u0627\u0645\u062A\u062F\u0627\u062F\u0627\u062A(E)",local:"\u0627\u0644\u0627\u0645\u062A\u062F\u0627\u062F\u0627\u062A",global:"Extents"},display:{display:"\u0627\u0644\u0639\u0631\u0636(D)",local:"\u0627\u0644\u0639\u0631\u0636",global:"Display"},yes:{display:"\u0646\u0639\u0645(Y)",local:"\u0646\u0639\u0645",global:"Yes"},no:{display:"\u0644\u0627(N)",local:"\u0644\u0627",global:"No"}}}},h3e={document:{untitled:"\u0628\u0644\u0627 \u0639\u0646\u0648\u0627\u0646"},commandLine:{noLast:"(\u0644\u0627 \u064A\u0648\u062C\u062F \u0623\u0645\u0631 \u0633\u0627\u0628\u0642)",unknownCommand:"\u0623\u0645\u0631 \u063A\u064A\u0631 \u0645\u0639\u0631\u0648\u0641",executed:"\u062A\u0645 \u062A\u0646\u0641\u064A\u0630 \u0627\u0644\u0623\u0645\u0631",showHistory:"\u0639\u0631\u0636 \u0633\u062C\u0644 \u0627\u0644\u0623\u0648\u0627\u0645\u0631",placeholder:"\u0627\u0643\u062A\u0628 \u0623\u0645\u0631\u064B\u0627",showMessages:"\u0639\u0631\u0636 \u0633\u062C\u0644 \u0627\u0644\u0631\u0633\u0627\u0626\u0644",canceled:"*\u062A\u0645 \u0627\u0644\u0625\u0644\u063A\u0627\u0621*",noHistory:"(\u0644\u0627 \u064A\u0648\u062C\u062F \u0633\u062C\u0644)",invalidInput:"\u0625\u062F\u062E\u0627\u0644 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.",close:"\u0625\u063A\u0644\u0627\u0642 \u0633\u0637\u0631 \u0627\u0644\u0623\u0648\u0627\u0645\u0631"},mobileCommand:{length:"\u0627\u0644\u0637\u0648\u0644",angle:"\u0627\u0644\u0632\u0627\u0648\u064A\u0629",dx:"\u0394X",dy:"\u0394Y",x:"X",y:"Y",confirm:"\u062A\u0623\u0643\u064A\u062F",cancel:"\u0625\u0644\u063A\u0627\u0621",help:"\u0645\u0633\u0627\u0639\u062F\u0629",back:"\u0631\u062C\u0648\u0639",collapse:"\u0637\u064A",expand:"\u062A\u0648\u0633\u064A\u0639"},inputManager:{firstCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u0623\u0648\u0644 \u0623\u0648",secondCorner:"\u062D\u062F\u062F \u0627\u0644\u0631\u0643\u0646 \u0627\u0644\u062B\u0627\u0646\u064A \u0623\u0648"},message:{fetchingDrawingFile:"\u062C\u0627\u0631\u064D \u062C\u0644\u0628 \u0645\u0644\u0641 \u0627\u0644\u0631\u0633\u0645 ...",exportingDxf:"\u062C\u0627\u0631\u064D \u062A\u0635\u062F\u064A\u0631 DXF ...",exportingPdf:"\u062C\u0627\u0631\u064D \u062A\u0635\u062F\u064A\u0631 PDF ...",exportingSvg:"\u062C\u0627\u0631\u064D \u062A\u0635\u062F\u064A\u0631 SVG ...",calculatingSmartExtents:"\u062C\u0627\u0631\u064D \u062D\u0633\u0627\u0628 \u0627\u0644\u0645\u0644\u0627\u0621\u0645\u0629 \u0627\u0644\u0630\u0643\u064A\u0629 ...",importingPdf:"\u062C\u0627\u0631\u064D \u0627\u0633\u062A\u064A\u0631\u0627\u062F PDF ...",exportingEntityPreview:"\u062C\u0627\u0631\u064D \u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0635\u0648\u0631\u0629 ...",collectingMemoryProfile:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0630\u0627\u0643\u0631\u0629 ...",fontCached:"\u062A\u0645 \u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0637 \u0628\u0646\u062C\u0627\u062D",fontCacheFailed:"\u0641\u0634\u0644 \u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u062E\u0637",fontsNotFound:"\u062E\u0637\u0648\u0637 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629 \u0641\u064A \u0645\u0633\u062A\u0648\u062F\u0639 \u0627\u0644\u062E\u0637\u0648\u0637: {fonts}.",fontsNotLoaded:"\u062A\u0639\u0630\u0631 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062E\u0637\u0648\u0637: {fonts}.",fontMissedInDrawing:'\u0627\u0644\u062E\u0637 "{font}" \u0645\u0637\u0644\u0648\u0628 \u0628\u0648\u0627\u0633\u0637\u0629 {count} \u0645\u0646 \u0643\u0627\u0626\u0646\u0627\u062A \u0627\u0644\u0646\u0635 \u0648\u0644\u0643\u0646\u0647 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D. \u064A\u062A\u0645 \u0627\u0644\u0639\u0631\u0636 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 "{replacementFont}".',fontMissedReplacement:'"{font}" (\u064A\u064F\u0639\u0631\u0636 \u0628\u0640 "{replacement}")',failedToGetAvaiableFonts:'\u062A\u0639\u0630\u0631 \u0627\u0644\u062D\u0635\u0648\u0644 \u0639\u0644\u0649 \u0627\u0644\u062E\u0637\u0648\u0637 \u0645\u0646 "{url}"!',failedToOpenFile:'\u0641\u0634\u0644 \u0641\u062A\u062D \u0627\u0644\u0645\u0644\u0641 "{fileName}"!',failedToOpenFileToast:'\u0641\u0634\u0644 \u0641\u062A\u062D "{fileName}". \u0631\u0627\u062C\u0639 \u0645\u0631\u0643\u0632 \u0627\u0644\u0625\u0634\u0639\u0627\u0631\u0627\u062A \u0644\u0644\u062A\u0641\u0627\u0635\u064A\u0644.',failedToOpenFileWorkerOom:'\u0641\u0634\u0644 \u0641\u062A\u062D "{fileName}". \u0641\u0634\u0644 \u0627\u0644\u062A\u062D\u0644\u064A\u0644 \u0628\u0633\u0628\u0628 \u0646\u0641\u0627\u062F \u0627\u0644\u0630\u0627\u0643\u0631\u0629 \u0627\u0644\u0645\u062A\u0627\u062D\u0629 (\u0645\u062D\u0644\u0644 LibreDWG). \u064A\u0645\u0643\u0646\u0643 \u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 {dwgParserLink} \u0644\u0634\u0631\u0627\u0621 \u0645\u062D\u0644\u0644 DWG \u0627\u0644\u062A\u062C\u0627\u0631\u064A \u0648\u0641\u062A\u062D \u0627\u0644\u0631\u0633\u0648\u0645\u0627\u062A \u0627\u0644\u0643\u0628\u064A\u0631\u0629 \u062F\u0648\u0646 \u062D\u062F\u0648\u062B \u0647\u0630\u0627 \u0627\u0644\u0627\u0646\u0647\u064A\u0627\u0631.',failedToOpenFileWorkerOomLink:"\u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629",failedToOpenFileWorkerTimeout:'\u0641\u0634\u0644 \u0641\u062A\u062D "{fileName}". \u0627\u0646\u062A\u0647\u062A \u0645\u0647\u0644\u0629 \u0627\u0644\u0639\u0645\u0644\u064A\u0629 \u0623\u062B\u0646\u0627\u0621 \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0631\u0633\u0645.',failedToOpenFileFontLoadFailed:'\u0641\u0634\u0644 \u0641\u062A\u062D "{fileName}". \u062A\u0639\u0630\u0631 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062E\u0637\u0648\u0637 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629.',failedToOpenFileLicenseExpired:'\u0641\u0634\u0644 \u0641\u062A\u062D "{fileName}". \u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u062A\u0631\u062E\u064A\u0635 \u0645\u062D\u0648\u0644 DWG.',failedToOpenFileLicenseInvalid:'\u0641\u0634\u0644 \u0641\u062A\u062D "{fileName}". \u062A\u0631\u062E\u064A\u0635 \u0645\u062D\u0648\u0644 DWG \u0645\u0641\u0642\u0648\u062F \u0623\u0648 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D.',unknownEntities:"\u064A\u062D\u062A\u0648\u064A \u0647\u0630\u0627 \u0627\u0644\u0631\u0633\u0645 \u0639\u0644\u0649 {count} \u0639\u0646\u0635\u0631 \u063A\u064A\u0631 \u0645\u0639\u0631\u0648\u0641 \u0623\u0648 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645. \u0644\u0646 \u064A\u062A\u0645 \u0639\u0631\u0636 \u0647\u0630\u0647 \u0627\u0644\u0639\u0646\u0627\u0635\u0631.",tianzhengEntities:"\u064A\u062D\u062A\u0648\u064A \u0647\u0630\u0627 \u0627\u0644\u0631\u0633\u0645 \u0639\u0644\u0649 \u0643\u064A\u0627\u0646\u0627\u062A \u0645\u062E\u0635\u0635\u0629 \u0645\u0646 TArch / Tianzheng (\u0623\u0648 \u062C\u0647\u0627\u062A \u062E\u0627\u0631\u062C\u064A\u0629 \u0645\u0634\u0627\u0628\u0647\u0629) (\u062D\u0648\u0627\u0644\u064A {count}). \u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u062D\u0644\u064A\u0644\u0647\u0627 \u0628\u0627\u0644\u0643\u0627\u0645\u0644 \u0641\u064A \u0647\u0630\u0647 \u0627\u0644\u0628\u064A\u0626\u0629\u060C \u0644\u0630\u0644\u0643 \u0642\u062F \u0644\u0627 \u064A\u064F\u0639\u0631\u0636 \u0628\u0639\u0636 \u0627\u0644\u0645\u062D\u062A\u0648\u0649.",emptyProxyEntities:"\u064A\u062D\u062A\u0648\u064A \u0647\u0630\u0627 \u0627\u0644\u0631\u0633\u0645 \u0639\u0644\u0649 {count} \u0643\u064A\u0627\u0646 \u0645\u062E\u0635\u0635 \u0628\u062F\u0648\u0646 \u0631\u0633\u0648\u0645\u0627\u062A \u0648\u0643\u064A\u0644\u0629. \u0644\u0646 \u064A\u062A\u0645 \u0639\u0631\u0636 \u0647\u0630\u0647 \u0627\u0644\u0639\u0646\u0627\u0635\u0631."},notification:{center:{title:"\u0627\u0644\u0625\u0634\u0639\u0627\u0631\u0627\u062A",clearAll:"\u0645\u0633\u062D \u0627\u0644\u0643\u0644",noNotifications:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0625\u0634\u0639\u0627\u0631\u0627\u062A"},group:{fontMissed:"\u062E\u0637\u0648\u0637 \u0645\u0641\u0642\u0648\u062F\u0629",fontMissedSummary:"{count} \u0631\u0633\u0627\u0626\u0644 \u0645\u062A\u0639\u0644\u0642\u0629 \u0628\u0627\u0644\u062E\u0637\u0648\u0637. \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u0641\u0627\u0635\u064A\u0644.",unsupportedEntities:"\u0643\u064A\u0627\u0646\u0627\u062A \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645\u0629",unsupportedEntitiesSummary:"{count} \u0631\u0633\u0627\u0626\u0644 \u0645\u062A\u0639\u0644\u0642\u0629 \u0628\u0627\u0644\u062A\u062D\u0644\u064A\u0644. \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u0641\u0627\u0635\u064A\u0644.",genericSummary:"{count} \u0631\u0633\u0627\u0626\u0644. \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u0641\u0627\u0635\u064A\u0644."},title:{failedToOpenFile:"\u0641\u0634\u0644 \u0641\u062A\u062D \u0627\u0644\u0645\u0644\u0641",failedToOpenFileWorkerOom:"\u0646\u0641\u0627\u062F \u0627\u0644\u0630\u0627\u0643\u0631\u0629",failedToOpenFileWorkerTimeout:"\u0627\u0646\u062A\u0647\u062A \u0645\u0647\u0644\u0629 \u0641\u062A\u062D \u0627\u0644\u0631\u0633\u0645",failedToOpenFileFontLoadFailed:"\u0641\u0634\u0644 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062E\u0637\u0648\u0637",failedToOpenFileLicenseExpired:"\u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u0627\u0644\u062A\u0631\u062E\u064A\u0635",failedToOpenFileLicenseInvalid:"\u062A\u0631\u062E\u064A\u0635 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D",fontNotFound:"\u0627\u0644\u062E\u0637 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F",fontNotLoaded:"\u0644\u0645 \u064A\u062A\u0645 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062E\u0637",parsingWarning:"\u0645\u0634\u0643\u0644\u0627\u062A \u0623\u062B\u0646\u0627\u0621 \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0631\u0633\u0645",systemMessage:"\u0631\u0633\u0627\u0644\u0629 \u0627\u0644\u0646\u0638\u0627\u0645",systemWarning:"\u062A\u062D\u0630\u064A\u0631 \u0627\u0644\u0646\u0638\u0627\u0645",systemError:"\u062E\u0637\u0623 \u0627\u0644\u0646\u0638\u0627\u0645",systemInfo:"\u0645\u0639\u0644\u0648\u0645\u0627\u062A \u0627\u0644\u0646\u0638\u0627\u0645"}},progress:{start:"\u0628\u062F\u0621 \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0645\u0644\u0641 ...",parse:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0645\u0644\u0641 ...",font:"\u062C\u0627\u0631\u064D \u062A\u0646\u0632\u064A\u0644 \u0627\u0644\u062E\u0637\u0648\u0637 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629 \u0644\u0647\u0630\u0627 \u0627\u0644\u0631\u0633\u0645 ...",ltype:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0623\u0646\u0648\u0627\u0639 \u0627\u0644\u062E\u0637\u0648\u0637 ...",style:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u0646\u0635 ...",dimstyle:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u0623\u0628\u0639\u0627\u062F ...",layer:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0637\u0628\u0642\u0627\u062A ...",vport:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0645\u0646\u0627\u0641\u0630 \u0627\u0644\u0639\u0631\u0636 ...",blockrecord:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0633\u062C\u0644\u0627\u062A \u0627\u0644\u0643\u062A\u0644 ...",header:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0631\u0623\u0633 \u0627\u0644\u0645\u0644\u0641 ...",block:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0643\u062A\u0644 ...",entity:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0639\u0646\u0627\u0635\u0631 ...",object:"\u062C\u0627\u0631\u064D \u062A\u062D\u0644\u064A\u0644 \u0627\u0644\u0642\u0648\u0627\u0645\u064A\u0633 \u0627\u0644\u0645\u0633\u0645\u0627\u0629 ...",rendering:"\u062C\u0627\u0631\u064D \u0639\u0631\u0636 \u0627\u0644\u0631\u0633\u0645 ...",end:"\u0627\u0643\u062A\u0645\u0644!"},about:{title:"\u062D\u0648\u0644",close:"\u0625\u063A\u0644\u0627\u0642",product:"\u0639\u0627\u0631\u0636 CAD",tagline:"\u0639\u0627\u0631\u0636 CAD \u0639\u0627\u0644\u064A \u0627\u0644\u0623\u062F\u0627\u0621 \u0644\u0644\u0648\u064A\u0628 \u0644\u0645\u0644\u0641\u0627\u062A DWG \u0648DXF.",website:"\u0627\u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",docs:"\u0627\u0644\u062A\u0648\u062B\u064A\u0642",repository:"GitHub",copyright:"\xA9 {year} mlightcad. \u062C\u0645\u064A\u0639 \u0627\u0644\u062D\u0642\u0648\u0642 \u0645\u062D\u0641\u0648\u0638\u0629.",ok:"\u0645\u0648\u0627\u0641\u0642"},drawStyle:{color:"\u0627\u0644\u0644\u0648\u0646",fontSize:"\u0627\u0631\u062A\u0641\u0627\u0639 \u0627\u0644\u0646\u0635"},shortCutToolbar:{more:"\u0627\u0644\u0645\u0632\u064A\u062F",undo:"\u062A\u0631\u0627\u062C\u0639",redo:"\u0625\u0639\u0627\u062F\u0629",erase:"\u062D\u0630\u0641",collapse:"\u0637\u064A \u0634\u0631\u064A\u0637 \u0627\u0644\u0623\u062F\u0648\u0627\u062A",expand:"\u062A\u0648\u0633\u064A\u0639 \u0634\u0631\u064A\u0637 \u0627\u0644\u0623\u062F\u0648\u0627\u062A"},textHeight:{title:"\u0627\u0631\u062A\u0641\u0627\u0639 \u0627\u0644\u0646\u0635",close:"\u0625\u063A\u0644\u0627\u0642",ok:"\u0645\u0648\u0627\u0641\u0642",cancel:"\u0625\u0644\u063A\u0627\u0621",adaptive:"\u0645\u0644\u0627\u0621\u0645\u0629 \u0627\u0644\u0634\u0627\u0634\u0629",custom:"\u0627\u0631\u062A\u0641\u0627\u0639 \u0646\u0635 \u0645\u062E\u0635\u0635",customPlaceholder:"\u0627\u0631\u062A\u0641\u0627\u0639 \u0627\u0644\u0639\u0627\u0644\u0645",fromScreen:"\u0645\u0646 \u062D\u062C\u0645 \u0627\u0644\u0634\u0627\u0634\u0629",fromScreenHint:"\u0623\u062F\u062E\u0644 \u062D\u062C\u0645 \u0627\u0644\u0646\u0635 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0639\u0644\u0649 \u0627\u0644\u0634\u0627\u0634\u0629 \u0639\u0646\u062F \u0627\u0644\u062A\u0643\u0628\u064A\u0631 \u0627\u0644\u062D\u0627\u0644\u064A. \u064A\u064F\u062D\u0648\u0651\u064E\u0644 \u0625\u0644\u0649 \u0627\u0631\u062A\u0641\u0627\u0639 \u062B\u0627\u0628\u062A \u0641\u064A \u0625\u062D\u062F\u0627\u062B\u064A\u0627\u062A \u0627\u0644\u0631\u0633\u0645 \u0648\u064A\u0628\u0642\u0649 \u0643\u0645\u0627 \u0647\u0648 \u0639\u0646\u062F \u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062A\u0643\u0628\u064A\u0631 \u0644\u0627\u062D\u0642\u064B\u0627.",screenPxPlaceholder:"\u062D\u062C\u0645 \u0627\u0644\u062E\u0637",screenUnit:"px",convert:"\u062A\u062D\u0648\u064A\u0644"},entityPick:{cancel:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u062A\u062D\u062F\u064A\u062F"},colorPicker:{title:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0644\u0648\u0646",close:"\u0625\u063A\u0644\u0627\u0642",ok:"\u0645\u0648\u0627\u0641\u0642",cancel:"\u0625\u0644\u063A\u0627\u0621",index:"\u0641\u0647\u0631\u0633 \u0627\u0644\u0644\u0648\u0646: ",rgb:"RGB: ",input:"\u0627\u0644\u0644\u0648\u0646",inputPlaceholder:"1-255 \u0623\u0648 #RRGGBB"},touchPointTutorial:{title:"\u0643\u064A\u0641 \u0623\u062E\u062A\u0627\u0631 \u0627\u0644\u0646\u0642\u0627\u0637 \u0628\u062F\u0642\u0629\u061F",description:"\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0639\u0644\u0649 \u0627\u0644\u0634\u0627\u0634\u0629 \u0644\u0645\u062F\u0629 \u0646\u0635\u0641 \u062B\u0627\u0646\u064A\u0629 \u062A\u0642\u0631\u064A\u0628\u0627\u064B. \u064A\u0638\u0647\u0631 \u0635\u0644\u064A\u0628 \u0641\u0648\u0642 \u0625\u0635\u0628\u0639\u0643 \u0648\u064A\u062A\u0628\u0639\u0647 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062D\u0631\u0643\u0629 \u0648\u064A\u0644\u062A\u0642\u0637 \u0625\u0644\u0649 \u0627\u0644\u0647\u0646\u062F\u0633\u0629 \u0644\u0627\u062E\u062A\u064A\u0627\u0631 \u0623\u062F\u0642.",snoozeToday:"\u0644\u0627 \u062A\u0630\u0643\u0631\u0646\u064A \u0627\u0644\u064A\u0648\u0645",hideForever:"\u0644\u0627 \u062A\u0630\u0643\u0631\u0646\u064A \u0645\u0631\u0629 \u0623\u062E\u0631\u0649",ok:"\u0641\u0647\u0645\u062A"},dataSource:{open:"\u0641\u062A\u062D",local:"\u0645\u0644\u0641 \u0645\u062D\u0644\u064A",url:"\u0645\u0646 \u0639\u0646\u0648\u0627\u0646 URL",openFrom:"\u0641\u062A\u062D \u0645\u0646 {name}",signInTo:"\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0625\u0644\u0649 {name}",signOutOf:"\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062E\u0631\u0648\u062C \u0645\u0646 {name}",signOutOfAccount:"\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062E\u0631\u0648\u062C \u0645\u0646 {name} ({account})",urlDialogTitle:"\u0641\u062A\u062D \u0645\u0646 \u0639\u0646\u0648\u0627\u0646 URL",urlDialogHint:"\u0623\u062F\u062E\u0644 \u0639\u0646\u0648\u0627\u0646 URL \u0644\u0645\u0644\u0641 .dwg \u0623\u0648 .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"\u0625\u0644\u063A\u0627\u0621",onedrive:"OneDrive",googledrive:"Google Drive",or:"\u0623\u0648",dropFile:"\u0623\u0633\u0642\u0637 \u0645\u0644\u0641\u064B\u0627 \u0647\u0646\u0627 \u0623\u0648",browse:"\u062A\u0635\u0641\u062D",dropOrBrowse:"\u0623\u0633\u0642\u0637 \u0645\u0644\u0641 DWG \u0623\u0648 DXF \u0647\u0646\u0627\u060C \u0623\u0648 \u062A\u0635\u0641\u062D",newDrawing:"\u0631\u0633\u0645 \u062C\u062F\u064A\u062F",source:"\u0627\u0644\u0645\u0635\u062F\u0631",unavailable:"\u0647\u0630\u0627 \u0627\u0644\u0645\u0635\u062F\u0631 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D \u062D\u0627\u0644\u064A\u064B\u0627.",selectFile:"\u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u0644\u0641",signInRequired:"\u0633\u062C\u0651\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0623\u0648\u0644\u0627\u064B \u0644\u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u0644\u0641.",downloading:"\u062C\u0627\u0631\u064D \u062A\u0646\u0632\u064A\u0644 \u0627\u0644\u0645\u0644\u0641 ..."}},d3e={ACAD:{"-hatch":{description:"Vytv\xE1\u0159\xED \u0161rafov\xE1n\xED pomoc\xED voleb p\u0159\xEDkazov\xE9ho \u0159\xE1dku bez rozhran\xED p\xE1su karet"},"-layer":{description:"Spravuje hladiny pomoc\xED voleb p\u0159\xEDkazov\xE9ho \u0159\xE1dku"},about:{description:"Zobraz\xED informace o mlightcad"},acadver:{description:"Ukl\xE1d\xE1 identifik\xE1tor verze datab\xE1ze v\xFDkresu (pouze pro \u010Dten\xED)"},angbase:{description:"Nastav\xED sm\u011Br z\xE1kladn\xEDho \xFAhlu 0 vzhledem k aktu\xE1ln\xEDmu USS"},angdir:{description:"Ur\u010Duje, zda se kladn\xE9 \xFAhly m\u011B\u0159\xED po sm\u011Bru nebo proti sm\u011Bru hodinov\xFDch ru\u010Di\u010Dek"},arc:{description:"Vytvo\u0159\xED oblouk"},aunits:{description:"Nastav\xED form\xE1t zobrazen\xED \xFAhl\u016F"},auprec:{description:"Nastav\xED p\u0159esnost zobrazen\xED \xFAhl\u016F, pou\u017E\xEDv\xE1 se spole\u010Dn\u011B s AUNITS"},bmpout:{description:"Exportuje do BMP"},cdxf:{description:"Exportuje aktu\xE1ln\xED v\xFDkres do DXF"},cpdf:{description:"Exportuje aktu\xE1ln\xED v\xFDkres do PDF"},"-cpdf":{description:"Exportuje aktu\xE1ln\xED v\xFDkres do PDF pomoc\xED p\u0159\xEDkazov\xE9ho \u0159\xE1dku"},cecolor:{description:"Nastav\xED aktu\xE1ln\xED v\xFDchoz\xED barvu pro nov\u011B vytv\xE1\u0159en\xE9 objekty"},celtscale:{description:"\u0158\xEDd\xED m\u011B\u0159\xEDtko typu \u010D\xE1ry pro nov\u011B vytv\xE1\u0159en\xE9 objekty"},celtype:{description:"Nastav\xED typ \u010D\xE1ry pro nov\u011B vytv\xE1\u0159en\xE9 objekty"},celweight:{description:"Nastav\xED v\xFDchoz\xED tlou\u0161\u0165ku \u010D\xE1ry pro nov\u011B vytv\xE1\u0159en\xE9 objekty"},cetransparency:{description:"Nastav\xED pr\u016Fhlednost pro nov\u011B vytv\xE1\u0159en\xE9 objekty"},cachefont:{description:"Ulo\u017E\xED m\xEDstn\xED soubor fontu do IndexedDB pro vykreslov\xE1n\xED textu"},circle:{description:"Vytvo\u0159\xED jednu kru\u017Enici zad\xE1n\xEDm st\u0159edu a polom\u011Bru"},clayer:{description:"Nastav\xED aktu\xE1ln\xED hladinu pro nov\xE9 objekty a operace \xFAprav"},cmleaderstyle:{description:"Nastav\xED n\xE1zev aktu\xE1ln\xEDho stylu multiodkazu"},cmlscale:{description:"\u0158\xEDd\xED celkovou \u0161\xED\u0159ku multi\u010D\xE1ry"},cmlstyle:{description:"Nastav\xED n\xE1zev aktu\xE1ln\xEDho stylu multi\u010D\xE1ry"},colortheme:{description:"\u0158\xEDd\xED barevn\xFD motiv u\u017Eivatelsk\xE9ho rozhran\xED (tmav\xFD nebo sv\u011Btl\xFD)"},copy:{description:"Kop\xEDruje vybran\xE9 objekty vytvo\u0159en\xEDm kopi\xED na nov\xFDch pozic\xEDch",prompt:"Vyberte objekty"},csvg:{description:"P\u0159evede aktu\xE1ln\xED v\xFDkres na SVG"},chtml:{description:"Exportuje aktu\xE1ln\xED v\xFDkres do samostatn\xE9ho offline souboru HTML"},"-chtml":{description:"Exportuje aktu\xE1ln\xED v\xFDkres do HTML pomoc\xED voleb p\u0159\xEDkazov\xE9ho \u0159\xE1dku"},dimlinear:{description:"Vytvo\u0159\xED line\xE1rn\xED k\xF3ty"},dimstyle:{description:"Nastav\xED n\xE1zev aktu\xE1ln\xEDho stylu k\xF3tov\xE1n\xED"},dwgname:{description:"Ukl\xE1d\xE1 n\xE1zev aktu\xE1ln\xEDho souboru v\xFDkresu (pouze pro \u010Dten\xED)"},loginname:{description:"Zobraz\xED p\u0159ihla\u0161ovac\xED jm\xE9no u\u017Eivatele (pouze pro \u010Dten\xED)"},dynmode:{description:"\u0158\xEDd\xED nastaven\xED dynamick\xE9ho zad\xE1v\xE1n\xED u kurzoru"},dynprompt:{description:"\u0158\xEDd\xED zobrazen\xED v\xFDzev v popisc\xEDch dynamick\xE9ho zad\xE1v\xE1n\xED"},ellipse:{description:"Vytvo\u0159\xED elipsu nebo eliptick\xFD oblouk pomoc\xED koncov\xFDch bod\u016F os nebo st\u0159edu"},erase:{description:"Odstran\xED vybran\xE9 objekty z v\xFDkresu",prompt:"Vyberte objekty"},extmax:{description:"Ukl\xE1d\xE1 prav\xFD horn\xED roh rozsahu v\xFDkresu v modelov\xE9m prostoru (pouze pro \u010Dten\xED)"},extmin:{description:"Ukl\xE1d\xE1 lev\xFD doln\xED roh rozsahu v\xFDkresu v modelov\xE9m prostoru (pouze pro \u010Dten\xED)"},entout:{description:"Exportuje slou\u010Den\xFD n\xE1hledov\xFD obr\xE1zek vybran\xFDch objekt\u016F",prompt:"Vyberte objekty"},hideobjects:{description:"Do\u010Dasn\u011B potla\u010D\xED zobrazen\xED vybran\xFDch objekt\u016F",prompt:"Vyberte objekty"},imageattach:{description:"P\u0159ipoj\xED rastrov\xFD obr\xE1zek jako extern\xED referenci k aktu\xE1ln\xEDmu v\xFDkresu"},"-insert":{description:"Vlo\u017E\xED definici bloku do aktu\xE1ln\xEDho v\xFDkresu (p\u0159\xEDkazov\xFD \u0159\xE1dek)"},xattach:{description:"P\u0159ipoj\xED v\xFDkres DWG nebo DXF jako extern\xED referenci k aktu\xE1ln\xEDmu v\xFDkresu"},gripcolor:{description:"Nastav\xED barvu nevybran\xFDch grip\u016F zobrazen\xFDch na vybran\xFDch objektech"},griphot:{description:"Nastav\xED barvu vybran\xFDch (aktivn\xEDch) grip\u016F"},gripobjlimit:{description:"Potla\u010D\xED zobrazen\xED grip\u016F, kdy\u017E v\xFDb\u011Br p\u0159es\xE1hne zadan\xFD po\u010Det objekt\u016F (0 = bez omezen\xED)"},grips:{description:"\u0158\xEDd\xED, zda se na vybran\xFDch objektech zobrazuj\xED gripy"},gripsize:{description:"Nastav\xED velikost grip\u016F v pixelech"},hatch:{description:"Vypln\xED uzav\u0159enou oblast nebo vybran\xE9 objekty vzorem \u0161rafov\xE1n\xED"},ipdf:{description:"Importuje vektorovou geometrii ze souboru PDF"},hpang:{description:"Nastav\xED v\xFDchoz\xED \xFAhel v radi\xE1nech pro nov\u011B vytv\xE1\u0159en\xE9 vzory \u0161rafov\xE1n\xED"},hpassoc:{description:"\u0158\xEDd\xED, zda jsou nov\u011B vytv\xE1\u0159en\xE1 \u0161rafov\xE1n\xED asociativn\xED"},hpbackgroundcolor:{description:"Nastav\xED v\xFDchoz\xED barvu pozad\xED pro nov\u011B vytv\xE1\u0159en\xE9 vzory \u0161rafov\xE1n\xED"},hpcolor:{description:"Nastav\xED v\xFDchoz\xED barvu pro nov\u011B vytv\xE1\u0159en\xE1 \u0161rafov\xE1n\xED"},hpdouble:{description:"\u0158\xEDd\xED, zda jsou u\u017Eivatelsky definovan\xE9 vzory \u0161rafov\xE1n\xED zdvojen\xE9"},hpislanddetection:{description:"\u0158\xEDd\xED, jak se nakl\xE1d\xE1 s ostr\u016Fvky uvnit\u0159 nov\u011B vytv\xE1\u0159en\xFDch hranic \u0161rafov\xE1n\xED"},hplayer:{description:"Nastav\xED v\xFDchoz\xED hladinu pro nov\u011B vytv\xE1\u0159en\xE1 \u0161rafov\xE1n\xED a v\xFDpln\u011B"},hpname:{description:"Nastav\xED v\xFDchoz\xED n\xE1zev vzoru pro nov\u011B vytv\xE1\u0159en\xE1 \u0161rafov\xE1n\xED v t\xE9to relaci"},hpscale:{description:"Nastav\xED v\xFDchoz\xED m\u011B\u0159\xEDtko pro nov\u011B vytv\xE1\u0159en\xE9 vzory \u0161rafov\xE1n\xED"},hpseparate:{description:"\u0158\xEDd\xED, zda se pro v\xEDce hranic vytvo\u0159\xED jeden nebo samostatn\xE9 objekty \u0161rafov\xE1n\xED"},hptransparency:{description:"Nastav\xED v\xFDchoz\xED pr\u016Fhlednost pro nov\u011B vytv\xE1\u0159en\xE1 \u0161rafov\xE1n\xED a v\xFDpln\u011B"},insunits:{description:"Ur\u010Duje jednotky v\xFDkresu pro automatick\xE9 m\u011B\u0159\xEDtko vkl\xE1dan\xFDch blok\u016F, obr\xE1zk\u016F nebo extern\xEDch referenc\xED"},jpgout:{description:"Exportuje do JPEG"},laycur:{description:"Zm\u011Bn\xED hladinu vybran\xFDch objekt\u016F na aktu\xE1ln\xED hladinu",prompt:"Vyberte objekty pro zm\u011Bnu na aktu\xE1ln\xED hladinu"},laydel:{description:"Odstran\xED hladinu a v\u0161echny objekty na t\xE9to hladin\u011B"},layerclose:{description:"Zav\u0159e Spr\xE1vce vlastnost\xED hladin"},layerp:{description:"Vr\xE1t\xED posledn\xED zm\u011Bnu nebo sadu zm\u011Bn proveden\xFDch v nastaven\xED hladin"},layfrz:{description:"Zmraz\xED hladinu vybran\xFDch objekt\u016F",prompt:"Vyberte objekt na hladin\u011B ke zmrazen\xED"},layiso:{description:"Izoluje hladiny vybran\xFDch objekt\u016F",prompt:"Vyberte objekty na hladin\xE1ch k izolaci"},laylck:{description:"Uzamkne hladinu vybran\xFDch objekt\u016F",prompt:"Vyberte objekt na hladin\u011B k uzam\u010Den\xED"},layoff:{description:"Vypne hladinu vybran\xFDch objekt\u016F",prompt:"Vyberte objekt na hladin\u011B k vypnut\xED"},layon:{description:"Zapne v\u0161echny hladiny ve v\xFDkresu"},laythw:{description:"Rozmraz\xED v\u0161echny zmrazen\xE9 hladiny ve v\xFDkresu"},layulk:{description:"Odemkne hladinu vybran\xFDch objekt\u016F",prompt:"Vyberte objekt na hladin\u011B k odem\u010Den\xED"},layuniso:{description:"Obnov\xED hladiny skryt\xE9 nebo uzam\u010Den\xE9 p\u0159\xEDkazem LAYISO"},line:{description:"Kresl\xED \xFAse\u010Dky mezi body"},log:{description:"Zaznamen\xE1v\xE1 ladic\xED informace do konzole"},ltscale:{description:"Nastav\xED glob\xE1ln\xED m\u011B\u0159\xEDtko typu \u010D\xE1ry pro v\xFDkres"},lunits:{description:"Nastav\xED form\xE1t zobrazen\xED sou\u0159adnic a vzd\xE1lenost\xED"},luprec:{description:"Nastav\xED p\u0159esnost zobrazen\xED d\xE9lkov\xFDch jednotek, pou\u017E\xEDv\xE1 se spole\u010Dn\u011B s LUNITS"},lwdisplay:{description:"\u0158\xEDd\xED, zda se ve v\xFDkresu zobrazuj\xED tlou\u0161\u0165ky \u010Dar"},clearmeasurements:{description:"Odstran\xED v\u0161echna m\u011B\u0159en\xED z aktu\xE1ln\xEDho rozvr\u017Een\xED"},measurementvis:{description:"Zobraz\xED nebo skryje m\u011B\u0159en\xED na aktu\xE1ln\xEDm rozvr\u017Een\xED"},measurementpanel:{description:"Otev\u0159e paletu m\u011B\u0159en\xED"},measurementexport:{description:"Exportuje m\u011B\u0159en\xED do sidecar JSON souboru"},measurementimport:{description:"Importuje m\u011B\u0159en\xED ze sidecar JSON souboru"},measurearea:{description:"Vypo\u010D\xEDt\xE1 plochu a obvod vybran\xFDch objekt\u016F nebo bod\u016F"},measureangle:{description:"Zm\u011B\u0159\xED \xFAhel mezi dv\u011Bma \u010Darami nebo t\u0159emi body"},measurearc:{description:"Zm\u011B\u0159\xED d\xE9lku oblouku"},measuredistance:{description:"Zm\u011B\u0159\xED vzd\xE1lenost a p\u0159\xEDr\u016Fstky mezi dv\u011Bma body"},measurecontinuous:{description:"M\u011B\u0159\xED \u0159et\u011Bzen\xE9 vzd\xE1lenosti postupn\xFDm zad\xE1v\xE1n\xEDm bod\u016F, dokud nestisknete Enter nebo Zru\u0161it"},measurepoint:{description:"Zm\u011B\u0159\xED sou\u0159adnice X/Y vybran\xE9ho bodu"},measurement:{description:"Nastav\xED, zda v\xFDkres pou\u017E\xEDv\xE1 anglosask\xE9 (imperi\xE1ln\xED) nebo metrick\xE9 jednotky"},measurementcolor:{description:"Nastav\xED barvu pou\u017Eitou pro p\u0159ekryvy m\u011B\u0159en\xED"},modelbkcolor:{description:"Nastav\xED barvu pozad\xED kreslic\xED oblasti modelov\xE9ho prostoru"},mline:{description:"Vytvo\u0159\xED n\u011Bkolik rovnob\u011B\u017En\xFDch \u010Dar jako jeden objekt multi\u010D\xE1ry"},move:{description:"Posune vybran\xE9 objekty o vektor p\u0159em\xEDst\u011Bn\xED",prompt:"Vyberte objekty"},offset:{description:"Vytvo\u0159\xED rovnob\u011B\u017En\xE9 kopie k\u0159ivek, lomen\xFDch \u010Dar nebo kru\u017Enic v zadan\xE9 vzd\xE1lenosti"},mtext:{description:"Vytvo\u0159\xED jeden objekt v\xEDce\u0159\xE1dkov\xE9ho textu"},open:{description:"Otev\u0159e existuj\xEDc\xED soubor v\xFDkresu"},openprof:{description:"\u0158\xEDd\xED, zda se do konzole zaznamen\xE1vaj\xED \u010Dasov\xE9 profily f\xE1z\xED otev\xEDr\xE1n\xED souboru"},openperf:{description:"Otev\u0159e paletu v\xFDkonu otev\u0159en\xED s \u010Dasy z posledn\xEDho otev\u0159en\xED v\xFDkresu"},orthomode:{description:"Omez\xED pohyb kurzoru na vodorovnou nebo svislou osu"},osmode:{description:"Nastav\xED trval\xE9 re\u017Eimy uchopen\xED objekt\u016F pomoc\xED bitov\xE9 hodnoty"},pan:{description:"Posune pohled beze zm\u011Bny sm\u011Bru pohledu nebo zv\u011Bt\u0161en\xED"},paperbkcolor:{description:"Nastav\xED barvu pozad\xED kreslic\xED oblasti v\xFDkresov\xE9ho prostoru (rozvr\u017Een\xED)"},pdmode:{description:"\u0158\xEDd\xED zp\u016Fsob zobrazen\xED bodov\xFDch entit POINT"},pdsize:{description:"Nastav\xED velikost zobrazen\xED bodov\xFDch entit POINT"},pickbox:{description:"Nastav\xED velikost (v pixelech) v\xFDb\u011Brov\xE9ho r\xE1me\u010Dku pro v\xFDb\u011Br objekt\u016F"},pline:{description:"Vytvo\u0159\xED k\u0159ivku zad\xE1n\xEDm v\xEDce bod\u016F"},pngout:{description:"Exportuje do PNG"},point:{description:"Vytvo\u0159\xED body"},polaraddang:{description:"Ukl\xE1d\xE1 dal\u0161\xED \xFAhly pol\xE1rn\xEDho sledov\xE1n\xED jako seznam odd\u011Blen\xFD st\u0159edn\xEDky"},polarang:{description:"Nastav\xED p\u0159\xEDr\u016Fstek pol\xE1rn\xEDho \xFAhlu pro pol\xE1rn\xED sledov\xE1n\xED"},polarmode:{description:"\u0158\xEDd\xED nastaven\xED pol\xE1rn\xEDho sledov\xE1n\xED a sledov\xE1n\xED uchopen\xED objekt\u016F"},polygon:{description:"Vytvo\u0159\xED pravideln\xFD mnoho\xFAheln\xEDk podle st\u0159edu/polom\u011Bru nebo jedn\xE9 hrany"},qnew:{description:"Zah\xE1j\xED nov\xFD v\xFDkres"},close:{description:"Zav\u0159e aktu\xE1ln\xED v\xFDkres"},ray:{description:"Vytvo\u0159\xED polop\u0159\xEDmku, kter\xE1 za\u010D\xEDn\xE1 v bod\u011B a pokra\u010Duje do nekone\u010Dna"},rectang:{description:"Vytvo\u0159\xED obd\xE9ln\xEDk zad\xE1n\xEDm dvou protilehl\xFDch roh\u016F"},regen:{description:"P\u0159ekresl\xED aktu\xE1ln\xED v\xFDkres"},revcloud:{description:"Vytvo\u0159\xED nebo uprav\xED revizn\xED obl\xE1\u010Dek"},markuptext:{description:"Um\xEDst\xED textovou pozn\xE1mku"},markupline:{description:"Vytvo\u0159\xED \xFAse\u010Dkovou pozn\xE1mku"},markuparrow:{description:"Vytvo\u0159\xED \u0161ipkovou pozn\xE1mku"},markupcloud:{description:"Vytvo\u0159\xED revizn\xED obl\xE1\u010Dek"},markuprect:{description:"Vytvo\u0159\xED obd\xE9ln\xEDkovou pozn\xE1mku"},markupcircle:{description:"Vytvo\u0159\xED kruhovou pozn\xE1mku"},markuphighlight:{description:"Vytvo\u0159\xED zv\xFDraz\u0148ovac\xED obd\xE9ln\xEDk"},markupcallout:{description:"Vytvo\u0159\xED odkazovou pozn\xE1mku: zadejte hrot odkazu, um\xEDst\u011Bte textov\xE9 pole a zadejte text"},markupstamp:{description:"Um\xEDst\xED raz\xEDtko nebo vlastn\xED symbol"},markupvis:{description:"Zobraz\xED nebo skryje pozn\xE1mky"},clearmarkups:{description:"Vyma\u017Ee v\u0161echny pozn\xE1mky na aktu\xE1ln\xEDm rozvr\u017Een\xED"},markupexport:{description:"Exportuje pozn\xE1mky do sidecar JSON souboru"},markupimport:{description:"Importuje pozn\xE1mky ze sidecar JSON souboru"},markuppanel:{description:"Otev\u0159e paletu pozn\xE1mek"},rotate:{description:"Oto\u010D\xED vybran\xE9 objekty kolem z\xE1kladn\xEDho bodu",prompt:"Vyberte objekty"},select:{description:"Vyb\xEDr\xE1 objekty"},shortcutmenu:{description:"\u0158\xEDd\xED dostupnost m\xEDstn\xEDch nab\xEDdek v oblasti v\xFDkresu"},sketch:{description:"Vytvo\u0159\xED \u0159adu \xFAse\u010Dek kreslen\xFDch od ruky"},spline:{description:"Vytvo\u0159\xED hladkou k\u0159ivku splajn zad\xE1n\xEDm \u0159\xEDdic\xEDch bod\u016F"},textstyle:{description:"Nastav\xED n\xE1zev aktu\xE1ln\xEDho textov\xE9ho stylu"},unitmode:{description:"\u0158\xEDd\xED zlomkov\xE9 zobrazen\xED sou\u0159adnic, kdy\u017E je LUNITS architektonick\xFD nebo zlomkov\xFD"},switchbg:{description:"P\u0159ep\xEDn\xE1 pozad\xED oblasti v\xFDkresu mezi b\xEDlou a \u010Dernou"},unisolateobjects:{description:"Znovu zobraz\xED v\u0161echny objekty skryt\xE9 p\u0159\xEDkazem HIDEOBJECTS"},undo:{description:"Vr\xE1t\xED zp\u011Bt posledn\xED operaci \xFApravy datab\xE1ze",nothingToUndo:"Nen\xED co vr\xE1tit zp\u011Bt."},redo:{description:"Zopakuje posledn\xED vr\xE1cenou operaci \xFApravy datab\xE1ze",nothingToRedo:"Nen\xED co zopakovat."},xline:{description:"Vytvo\u0159\xED konstruk\u010Dn\xED p\u0159\xEDmku, kter\xE1 se rozprost\xEDr\xE1 do nekone\u010Dna na ob\u011B strany"},zoom:{description:"Zv\u011Bt\u0161\xED na maxim\xE1ln\xED rozsah v\u0161ech objekt\u016F"}},USER:{}},p3e={arc:{startPointOrCenter:"Zadejte po\u010D\xE1te\u010Dn\xED bod oblouku nebo",secondPointOrOptions:"Zadejte druh\xFD bod oblouku nebo",secondPoint:"Zadejte druh\xFD bod oblouku",startPoint:"Zadejte po\u010D\xE1te\u010Dn\xED bod oblouku",centerPoint:"Zadejte st\u0159edov\xFD bod oblouku",endPoint:"Zadejte koncov\xFD bod oblouku",endPointOrOptions:"Zadejte koncov\xFD bod oblouku nebo",centerPointOrOptions:"Zadejte st\u0159edov\xFD bod oblouku",includedAngle:"Zadejte st\u0159edov\xFD \xFAhel",chordLength:"Zadejte d\xE9lku t\u011Btivy",tangentDirection:"Zadejte sm\u011Br te\u010Dny v po\u010D\xE1te\u010Dn\xEDm bod\u011B oblouku",radius:"Zadejte polom\u011Br oblouku",keywords:{center:{display:"St\u0159ed(C)",local:"St\u0159ed",global:"Center"},end:{display:"Konec(E)",local:"Konec",global:"End"},angle:{display:"\xDAhel(A)",local:"\xDAhel",global:"Angle"},chordLength:{display:"d\xE9lka T\u011Btivy(L)",local:"D\xE9lka t\u011Btivy",global:"ChordLength"},direction:{display:"Sm\u011Br(D)",local:"Sm\u011Br",global:"Direction"},radius:{display:"Polom\u011Br(R)",local:"Polom\u011Br",global:"Radius"}},invalid:{threePoint:"Neplatn\xFD 3bodov\xFD oblouk: body jsou koline\xE1rn\xED nebo nelze definovat oblouk.",center:"Neplatn\xFD vstup st\u0159edu: po\u010D\xE1te\u010Dn\xED a koncov\xFD bod mus\xED le\u017Eet na stejn\xE9 kru\u017Enici.",angle:"Neplatn\xFD vstup \xFAhlu: st\u0159edov\xFD \xFAhel mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0 a men\u0161\xED ne\u017E 360 stup\u0148\u016F.",chordLength:"Neplatn\xE1 d\xE9lka t\u011Btivy: hodnota je mimo rozsah pro aktu\xE1ln\xED polom\u011Br.",direction:"Neplatn\xFD sm\u011Br: z tohoto sm\u011Bru te\u010Dny nelze sestrojit oblouk.",radius:"Neplatn\xFD polom\u011Br: zadan\xFD polom\u011Br nem\u016F\u017Ee spojit po\u010D\xE1te\u010Dn\xED a koncov\xFD bod."}},circle:{center:"Zadejte st\u0159ed kru\u017Enice",centerOrOptions:"Zadejte st\u0159edov\xFD bod kru\u017Enice nebo",radius:"Zadejte polom\u011Br kru\u017Enice",radiusOrDiameter:"Zadejte polom\u011Br kru\u017Enice nebo",diameter:"Zadejte pr\u016Fm\u011Br kru\u017Enice",twoPointFirst:"Zadejte prvn\xED koncov\xFD bod pr\u016Fm\u011Bru kru\u017Enice",twoPointSecond:"Zadejte druh\xFD koncov\xFD bod pr\u016Fm\u011Bru kru\u017Enice",threePointFirst:"Zadejte prvn\xED bod na kru\u017Enici",threePointSecond:"Zadejte druh\xFD bod na kru\u017Enici",threePointThird:"Zadejte t\u0159et\xED bod na kru\u017Enici",keywords:{threeP:{display:"3B(3P)",local:"3B",global:"3P"},twoP:{display:"2B(2P)",local:"2B",global:"2P"},diameter:{display:"Pr\u016Fm\u011Br(D)",local:"Pr\u016Fm\u011Br",global:"Diameter"}}},copy:{basePointOrOptions:"Zadejte z\xE1kladn\xED bod nebo",displacementOrArray:"Zadejte p\u0159em\xEDst\u011Bn\xED nebo",secondPointOrArray:"Zadejte druh\xFD bod nebo",modePrompt:"Zadejte volbu re\u017Eimu kop\xEDrov\xE1n\xED",arrayItemCount:"Zadejte po\u010Det polo\u017Eek v poli v\u010Detn\u011B origin\xE1lu",arraySecondPointOrFit:"Zadejte druh\xFD bod nebo",arrayFitSecondPoint:"Zadejte druh\xFD bod",keywords:{displacement:{display:"P\u0159em\xEDst\u011Bn\xED(D)",local:"P\u0159em\xEDst\u011Bn\xED",global:"Displacement"},mode:{display:"Re\u017Eim(O)",local:"Re\u017Eim",global:"Mode"},multiple:{display:"V\xEDcen\xE1sobn\xE9(M)",local:"V\xEDcen\xE1sobn\xE9",global:"Multiple"},single:{display:"Jednoduch\xE9(S)",local:"Jednoduch\xE9",global:"Single"},array:{display:"Pole(A)",local:"Pole",global:"Array"},fit:{display:"P\u0159izp\u016Fsobit(F)",local:"P\u0159izp\u016Fsobit",global:"Fit"}}},dimlinear:{xLine1Point:"Zadejte po\u010D\xE1tek prvn\xED pomocn\xE9 \u010D\xE1ry",xLine2Point:"Zadejte po\u010D\xE1tek druh\xE9 pomocn\xE9 \u010D\xE1ry",dimLinePoint:"Zadejte um\xEDst\u011Bn\xED k\xF3tovac\xED \u010D\xE1ry"},ellipse:{axisEndpointOrOptions:"Zadejte koncov\xFD bod osy elipsy nebo",arcAxisEndpointOrCenter:"Zadejte koncov\xFD bod osy eliptick\xE9ho oblouku nebo",center:"Zadejte st\u0159ed elipsy",firstAxisEndpoint:"Zadejte koncov\xFD bod osy",secondAxisEndpoint:"Zadejte druh\xFD koncov\xFD bod osy",otherAxisOrRotation:"Zadejte vzd\xE1lenost k druh\xE9 ose nebo",rotationAngle:"Zadejte \xFAhel oto\u010Den\xED kolem hlavn\xED osy",arcStartAngle:"Zadejte po\u010D\xE1te\u010Dn\xED \xFAhel eliptick\xE9ho oblouku",arcEndAngle:"Zadejte koncov\xFD \xFAhel eliptick\xE9ho oblouku",keywords:{arc:{display:"Oblouk(A)",local:"Oblouk",global:"Arc"},center:{display:"St\u0159ed(C)",local:"St\u0159ed",global:"Center"},rotation:{display:"Oto\u010Den\xED(R)",local:"Oto\u010Den\xED",global:"Rotation"}},invalid:{axis:"Neplatn\xFD vstup osy: d\xE9lka osy mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",otherAxis:"Neplatn\xFD vstup druh\xE9 osy: vzd\xE1lenost mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",rotation:"Neplatn\xFD vstup oto\u010Den\xED: v\xFDsledn\xE1 vedlej\u0161\xED osa mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0."}},hatch:{prompt:"Vyberte objekt hranice nebo",pickPoint:"Zadejte vnit\u0159n\xED bod (nebo stiskn\u011Bte Enter pro dokon\u010Den\xED)",select:"Vyberte objekty k \u0161rafov\xE1n\xED",patternName:"Zadejte n\xE1zev vzoru \u0161rafov\xE1n\xED",scale:"Zadejte m\u011B\u0159\xEDtko vzoru \u0161rafov\xE1n\xED",angle:"Zadejte \xFAhel vzoru \u0161rafov\xE1n\xED",style:"Zadejte styl \u0161rafov\xE1n\xED",associative:"Zadejte asociativitu",invalidBoundary:"Vybran\xE9 objekty netvo\u0159\xED uzav\u0159enou hranici.",keywords:{pick:{display:"Vybrat body(P)",local:"Vybrat body",global:"PickPoints"},select:{display:"Vybrat objekty(S)",local:"Vybrat objekty",global:"SelectObjects"},cancel:{display:"Zru\u0161it(C)",local:"Zru\u0161it",global:"Cancel"},pattern:{display:"Vzor(P)",local:"Vzor",global:"Pattern"},scale:{display:"M\u011B\u0159\xEDtko(S)",local:"M\u011B\u0159\xEDtko",global:"Scale"},angle:{display:"\xDAhel(A)",local:"\xDAhel",global:"Angle"},style:{display:"Styl(T)",local:"Styl",global:"HatchStyle"},associative:{display:"Asociativn\xED(AS)",local:"Asociativn\xED",global:"AssociativeMode"},normal:{display:"Norm\xE1ln\xED(N)",local:"Norm\xE1ln\xED",global:"Normal"},outer:{display:"Vn\u011Bj\u0161\xED(O)",local:"Vn\u011Bj\u0161\xED",global:"Outer"},ignore:{display:"Ignorovat(I)",local:"Ignorovat",global:"Ignore"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}},hideobjects:{hidden:"objekt(\u016F) skryto",restored:"objekt(\u016F) obnoveno",nothingToRestore:"\u017D\xE1dn\xE9 skryt\xE9 objekty k obnoven\xED"},entout:{longSidePrompt:"Zadejte velikost del\u0161\xED strany n\xE1hledu v pixelech",exported:"n\xE1hled(\u016F) objekt\u016F exportov\xE1no",skipped:"objekt(\u016F) p\u0159esko\u010Deno",failed:{"no-preview-root":"Nelze sestavit geometrii n\xE1hledu pro v\xFDb\u011Br","no-bounds":"Nelze vypo\u010D\xEDtat rozsah n\xE1hledu pro v\xFDb\u011Br","capture-failed":"Nelze vykreslit n\xE1hledov\xFD obr\xE1zek entity","download-failed":"N\xE1hled byl vykreslen, ale sta\u017Een\xED PNG selhalo"}},layer:{main:"Zadejte volbu",listSummary:"Seznam hladin byl vyps\xE1n do konzole prohl\xED\u017Ee\u010De",emptyInput:"Nebyl zad\xE1n \u017E\xE1dn\xFD n\xE1zev hladiny.",newPrompt:"Zadejte n\xE1zev nov\xE9 hladiny (nebo hladin)",makePrompt:"Zadejte n\xE1zev hladiny, kter\xE1 se m\xE1 st\xE1t aktu\xE1ln\xED",setPrompt:"Zadejte n\xE1zev hladiny, kter\xE1 se m\xE1 nastavit jako aktu\xE1ln\xED",onPrompt:"Zadejte n\xE1zev (n\xE1zvy) hladiny k zapnut\xED",offPrompt:"Zadejte n\xE1zev (n\xE1zvy) hladiny k vypnut\xED",freezePrompt:"Zadejte n\xE1zev (n\xE1zvy) hladiny ke zmrazen\xED",thawPrompt:"Zadejte n\xE1zev (n\xE1zvy) hladiny k rozmrazen\xED",lockPrompt:"Zadejte n\xE1zev (n\xE1zvy) hladiny k uzam\u010Den\xED",unlockPrompt:"Zadejte n\xE1zev (n\xE1zvy) hladiny k odem\u010Den\xED",colorLayerPrompt:"Zadejte n\xE1zev (n\xE1zvy) hladiny ke zm\u011Bn\u011B barvy",colorValuePrompt:"Zadejte barvu (ACI 1-255, RGB nap\u0159. 255,0,0, nebo CSS n\xE1zev barvy)",invalidColor:"Neplatn\xFD vstup barvy.",descriptionLayerPrompt:"Zadejte n\xE1zev hladiny k \xFAprav\u011B popisu",descriptionValuePrompt:"Zadejte nov\xFD popis hladiny",created:"Po\u010Det vytvo\u0159en\xFDch hladin",alreadyExists:"Hladina ji\u017E existuje",notFound:"Hladina nenalezena",cannotChangeCurrent:"Nelze vypnout ani zmrazit aktu\xE1ln\xED hladinu.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Vytvo\u0159it(M)",local:"Vytvo\u0159it",global:"Make"},set:{display:"Nastavit(S)",local:"Nastavit",global:"Set"},new:{display:"Nov\xE1(N)",local:"Nov\xE1",global:"New"},on:{display:"Zapnout(ON)",local:"Zapnout",global:"On"},off:{display:"Vypnout(OF)",local:"Vypnout",global:"Off"},color:{display:"Barva(C)",local:"Barva",global:"Color"},freeze:{display:"Zmrazit(F)",local:"Zmrazit",global:"Freeze"},thaw:{display:"Rozmrazit(T)",local:"Rozmrazit",global:"Thaw"},lock:{display:"Uzamknout(L)",local:"Uzamknout",global:"Lock"},unlock:{display:"Odemknout(U)",local:"Odemknout",global:"Unlock"},description:{display:"Popis(D)",local:"Popis",global:"Description"}}},layon:{alreadyOn:"V\u0161echny hladiny jsou ji\u017E zapnut\xE9.",turnedOn:"Zapnut\xE9 hladiny"},laycur:{prompt:"Vyberte objekty ke zm\u011Bn\u011B na aktu\xE1ln\xED hladinu",currentLayerNotFound:"Aktu\xE1ln\xED hladina nenalezena.",noObjects:"Nebyly vybr\xE1ny \u017E\xE1dn\xE9 platn\xE9 objekty.",alreadyCurrent:"Vybran\xE9 objekty jsou ji\u017E na aktu\xE1ln\xED hladin\u011B.",changed:"Objekty zm\u011Bn\u011Bny na aktu\xE1ln\xED hladinu"},layfrz:{prompt:"Vyberte objekt na hladin\u011B ke zmrazen\xED nebo",invalidSelection:"Vybr\xE1n neplatn\xFD objekt.",settingsPrompt:"Zadejte nastaven\xED LAYFRZ ke zm\u011Bn\u011B",viewportPrompt:"Zadejte chov\xE1n\xED zmrazen\xED ve v\xFD\u0159ezu",blockSelectionPrompt:"Zadejte chov\xE1n\xED v\xFDb\u011Bru vno\u0159en\xE9ho bloku",vpfreezeFallback:"Aktu\xE1ln\xED prohl\xED\u017Ee\u010D nepodporuje zmrazen\xED hladiny podle v\xFD\u0159ezu; m\xEDsto toho se pou\u017Eije chov\xE1n\xED Zmrazit.",nestedSelectionLimited:"Nastaven\xED v\xFDb\u011Bru vno\u0159en\xE9ho bloku se ulo\u017E\xED, ale aktu\xE1ln\xED v\xFDb\u011Br st\xE1le vyhodnocuje hladinu entity nejvy\u0161\u0161\xED \xFArovn\u011B.",layerNotFound:"Hladina nenalezena",cannotFreezeCurrent:"Nelze zmrazit aktu\xE1ln\xED hladinu.",alreadyFrozen:"Hladina je ji\u017E zmrazen\xE1",frozen:"Zmrazen\xE1 hladina",restored:"Obnoven\xE1 hladina",nothingToUndo:"Neexistuje \u017E\xE1dn\xE1 akce LAYFRZ k vr\xE1cen\xED zp\u011Bt.",keywords:{settings:{display:"Nastaven\xED(S)",local:"Nastaven\xED",global:"Settings"},undo:{display:"Zp\u011Bt(U)",local:"Zp\u011Bt",global:"Undo"},viewports:{display:"V\xFD\u0159ezy(V)",local:"V\xFD\u0159ezy",global:"Viewports"},blockSelection:{display:"V\xFDb\u011Br bloku(B)",local:"V\xFDb\u011Br bloku",global:"BlockSelection"},freeze:{display:"Zmrazit(F)",local:"Zmrazit",global:"Freeze"},vpfreeze:{display:"Zmrazit ve v\xFD\u0159ezu(V)",local:"Zmrazit ve v\xFD\u0159ezu",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Entita(E)",local:"Entita",global:"Entity"},none:{display:"\u017D\xE1dn\xFD(N)",local:"\u017D\xE1dn\xFD",global:"None"}}},layiso:{prompt:"Vyberte objekty na hladin\u011B (hladin\xE1ch) k izolaci nebo",settingsPrompt:"Zadejte nastaven\xED pro neizolovan\xE9 hladiny",offModePrompt:"Zadejte chov\xE1n\xED vypnut\xED pro neizolovan\xE9 hladiny",noLayers:"Nebyly vybr\xE1ny \u017E\xE1dn\xE9 platn\xE9 hladiny.",layerNotFound:"Hladina nenalezena",isolated:"Izolovan\xE1 hladina (hladiny)",affectedLayers:"ovlivn\u011Bn\xE9 hladiny",vpfreezeFallback:"Aktu\xE1ln\xED prohl\xED\u017Ee\u010D nepodporuje zmrazen\xED hladiny podle v\xFD\u0159ezu; m\xEDsto toho se pou\u017Eije chov\xE1n\xED Vypnout.",lockFadeFallback:"Aktu\xE1ln\xED prohl\xED\u017Ee\u010D nepodporuje ztlumen\xED zobrazen\xED hladiny; neizolovan\xE9 hladiny budou uzam\u010Deny bez ztlumen\xED.",keywords:{settings:{display:"Nastaven\xED(S)",local:"Nastaven\xED",global:"Settings"},off:{display:"Vypnout(O)",local:"Vypnout",global:"Off"},lockAndFade:{display:"Uzamknout a ztlumit(L)",local:"Uzamknout a ztlumit",global:"LockAndFade"},vpfreeze:{display:"Zmrazit ve v\xFD\u0159ezu(V)",local:"Zmrazit ve v\xFD\u0159ezu",global:"Vpfreeze"}}},layuniso:{noPrevious:"Neexistuje \u017E\xE1dn\xFD p\u0159edchoz\xED stav hladin LAYISO k obnoven\xED.",layerNotFound:"Hladina nenalezena",nothingRestored:"Nebyly obnoveny \u017E\xE1dn\xE9 zm\u011Bny hladin LAYISO.",restored:"Obnoven\xE9 hladiny"},laythw:{alreadyThawed:"V\u0161echny hladiny jsou ji\u017E rozmrazen\xE9.",thawed:"Rozmrazen\xE9 hladiny"},laylck:{prompt:"Vyberte objekt na hladin\u011B k uzam\u010Den\xED",invalidSelection:"Vybr\xE1n neplatn\xFD objekt.",layerNotFound:"Hladina nenalezena",alreadyLocked:"Hladina je ji\u017E uzam\u010Den\xE1",locked:"Uzam\u010Den\xE1 hladina"},layulk:{prompt:"Vyberte objekt na hladin\u011B k odem\u010Den\xED",invalidSelection:"Vybr\xE1n neplatn\xFD objekt.",layerNotFound:"Hladina nenalezena",alreadyUnlocked:"Hladina je ji\u017E odem\u010Den\xE1",unlocked:"Odem\u010Den\xE1 hladina"},layoff:{prompt:"Vyberte objekt na hladin\u011B k vypnut\xED nebo",invalidSelection:"Vybr\xE1n neplatn\xFD objekt.",settingsPrompt:"Zadejte nastaven\xED LAYOFF ke zm\u011Bn\u011B",viewportPrompt:"Zadejte chov\xE1n\xED v\xFD\u0159ezu",blockSelectionPrompt:"Zadejte chov\xE1n\xED v\xFDb\u011Bru vno\u0159en\xE9ho bloku",vpfreezeFallback:"Aktu\xE1ln\xED prohl\xED\u017Ee\u010D nepodporuje vypnut\xED hladiny podle v\xFD\u0159ezu; m\xEDsto toho se pou\u017Eije chov\xE1n\xED Vypnout.",nestedSelectionLimited:"Nastaven\xED v\xFDb\u011Bru vno\u0159en\xE9ho bloku se ulo\u017E\xED, ale aktu\xE1ln\xED v\xFDb\u011Br st\xE1le vyhodnocuje hladinu entity nejvy\u0161\u0161\xED \xFArovn\u011B.",layerNotFound:"Hladina nenalezena",cannotTurnOffCurrent:"Nelze vypnout aktu\xE1ln\xED hladinu.",alreadyOff:"Hladina je ji\u017E vypnut\xE1",turnedOff:"Vypnut\xE1 hladina",restored:"Obnoven\xE1 hladina",nothingToUndo:"Neexistuje \u017E\xE1dn\xE1 akce LAYOFF k vr\xE1cen\xED zp\u011Bt.",keywords:{settings:{display:"Nastaven\xED(S)",local:"Nastaven\xED",global:"Settings"},undo:{display:"Zp\u011Bt(U)",local:"Zp\u011Bt",global:"Undo"},viewports:{display:"V\xFD\u0159ezy(V)",local:"V\xFD\u0159ezy",global:"Viewports"},blockSelection:{display:"V\xFDb\u011Br bloku(B)",local:"V\xFDb\u011Br bloku",global:"BlockSelection"},off:{display:"Vypnout(O)",local:"Vypnout",global:"Off"},vpfreeze:{display:"Zmrazit ve v\xFD\u0159ezu(V)",local:"Zmrazit ve v\xFD\u0159ezu",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Entita(E)",local:"Entita",global:"Entity"},none:{display:"\u017D\xE1dn\xFD(N)",local:"\u017D\xE1dn\xFD",global:"None"}}},layerp:{restored:"Obnoven p\u0159edchoz\xED stav hladin.",noPreviousState:"Neexistuje \u017E\xE1dn\xFD p\u0159edchoz\xED stav hladin k obnoven\xED."},line:{firstPoint:"Zadejte prvn\xED bod",firstPointOrContinue:"Zadejte prvn\xED bod nebo",nextPoint:"Zadejte dal\u0161\xED bod",nextPointWithOptions:"Zadejte dal\u0161\xED bod nebo",keywords:{continue:{display:"Pokra\u010Dovat(C)",local:"Pokra\u010Dovat",global:"Continue"},undo:{display:"Zp\u011Bt(U)",local:"Zp\u011Bt",global:"Undo"},close:{display:"Uzav\u0159\xEDt(C)",local:"Uzav\u0159\xEDt",global:"Close"}}},xline:{firstPointOrOptions:"Zadejte bod nebo",secondPoint:"Zadejte druh\xFD bod",throughPoint:"Zadejte bod, kter\xFDm m\xE1 p\u0159\xEDmka proch\xE1zet",angle:"Zadejte \xFAhel konstruk\u010Dn\xED p\u0159\xEDmky",invalidDirection:"Neplatn\xFD sm\u011Br pro XLINE.",keywords:{hor:{display:"Vodorovn\u011B(H)",local:"Vodorovn\u011B",global:"Hor"},ver:{display:"Svisle(V)",local:"Svisle",global:"Ver"},ang:{display:"\xDAhel(A)",local:"\xDAhel",global:"Ang"}}},ray:{startPoint:"Zadejte po\u010D\xE1te\u010Dn\xED bod",throughPoint:"Zadejte bod, kter\xFDm m\xE1 polop\u0159\xEDmka proch\xE1zet"},mline:{startPointWithOptions:"Zadejte po\u010D\xE1te\u010Dn\xED bod nebo",nextPointWithOptions:"Zadejte dal\u0161\xED bod nebo",justificationPrompt:"Zadejte typ zarovn\xE1n\xED",scalePrompt:"Zadejte m\u011B\u0159\xEDtko multi\u010D\xE1ry",stylePrompt:"Zadejte n\xE1zev stylu multi\u010D\xE1ry nebo [?] pro seznam",styleNotFound:"Styl multi\u010D\xE1ry nenalezen",styleListHeader:"Na\u010Dten\xE9 styly multi\u010D\xE1ry",styleListEmpty:"V aktu\xE1ln\xEDm v\xFDkresu nen\xED na\u010Dten \u017E\xE1dn\xFD styl multi\u010D\xE1ry.",keywords:{justification:{display:"Zarovn\xE1n\xED(J)",local:"Zarovn\xE1n\xED",global:"Justification"},scale:{display:"M\u011B\u0159\xEDtko(S)",local:"M\u011B\u0159\xEDtko",global:"Scale"},style:{display:"Styl(ST)",local:"Styl",global:"Style"},undo:{display:"Zp\u011Bt(U)",local:"Zp\u011Bt",global:"Undo"},close:{display:"Uzav\u0159\xEDt(C)",local:"Uzav\u0159\xEDt",global:"Close"},top:{display:"Naho\u0159e(T)",local:"Naho\u0159e",global:"Top"},zero:{display:"Nula(Z)",local:"Nula",global:"Zero"},bottom:{display:"Dole(B)",local:"Dole",global:"Bottom"}}},measureAngle:{vertex:"Zadejte vrchol",arm1:"Zadejte bod na prvn\xEDm rameni",arm2:"Zadejte bod na druh\xE9m rameni"},measureArc:{startPoint:"Zadejte po\u010D\xE1te\u010Dn\xED bod oblouku",throughPoint:"Zadejte bod na oblouku",endPoint:"Zadejte koncov\xFD bod oblouku",lockedEndPoint:"Zadejte koncov\xFD bod oblouku (Ctrl p\u0159epne velk\xFD/mal\xFD oblouk)",invalidPoints:"T\u0159i body jsou koline\xE1rn\xED a nedefinuj\xED oblouk."},measureArea:{firstPoint:"Zadejte prvn\xED bod",nextPoint:"Zadejte dal\u0161\xED bod (nebo stiskn\u011Bte Enter pro dokon\u010Den\xED)"},measureDistance:{firstPoint:"Zadejte prvn\xED bod",secondPoint:"Zadejte druh\xFD bod"},measureContinuous:{firstPoint:"Zadejte prvn\xED bod",nextPoint:"Zadejte dal\u0161\xED bod (nebo stiskn\u011Bte Enter pro dokon\u010Den\xED)"},measurePoint:{point:"Zadejte bod"},measurement:{import:{chooseFile:"Vyberte sidecar JSON soubor m\u011B\u0159en\xED"}},markup:{author:"Zadejte autora kontroly (ulo\u017E\xED se pro pozd\u011Bj\u0161\xED pou\u017Eit\xED)",text:{point:"Zadejte bod textov\xE9 pozn\xE1mky",content:"Zadejte text pozn\xE1mky"},line:{firstPoint:"Zadejte prvn\xED bod \xFAse\u010Dkov\xE9 pozn\xE1mky",secondPoint:"Zadejte druh\xFD bod \xFAse\u010Dkov\xE9 pozn\xE1mky"},arrow:{firstPoint:"Zadejte po\u010D\xE1te\u010Dn\xED bod \u0161ipky",secondPoint:"Zadejte hrot \u0161ipky"},cloud:{firstCorner:"Zadejte prvn\xED roh obl\xE1\u010Dku",secondCorner:"Zadejte protilehl\xFD roh obl\xE1\u010Dku"},rect:{firstCorner:"Zadejte prvn\xED roh obd\xE9ln\xEDku",secondCorner:"Zadejte protilehl\xFD roh obd\xE9ln\xEDku"},circle:{center:"Zadejte st\u0159ed kru\u017Enice",radius:"Zadejte polom\u011Br kru\u017Enice"},shape:{calloutOn:"[Odkaz zapnut]",calloutOff:"[Odkaz vypnut]",calloutAnchor:"Zadejte um\xEDst\u011Bn\xED textu odkazu",keywords:{callout:{display:"Odkaz(C)",local:"Odkaz",global:"Callout"},noCallout:{display:"BezOdkazu(N)",local:"BezOdkazu",global:"NoCallout"}}},highlight:{firstCorner:"Zadejte prvn\xED roh zv\xFDrazn\u011Bn\xED",secondCorner:"Zadejte protilehl\xFD roh zv\xFDrazn\u011Bn\xED"},callout:{tip:"Zadejte hrot vod\xEDtka, nebo obrys obl\xE1\u010Dku/obd\xE9ln\xEDku/kru\u017Enice bez odkazu",anchor:"Zadejte um\xEDst\u011Bn\xED textu odkazu",content:"Zadejte text odkazu"},stamp:{kind:"Zadejte identifik\xE1tor raz\xEDtka [approved/rejected/revised/for-review/custom]",imageUrl:"Zadejte URL vlastn\xEDho obr\xE1zku raz\xEDtka (voliteln\xE9)",caption:"Zadejte popisek raz\xEDtka (voliteln\xE9)",point:"Zadejte bod vlo\u017Een\xED raz\xEDtka"},import:{chooseFile:"Vyberte sidecar JSON soubor pozn\xE1mek"}},move:{basePointOrDisplacement:"Zadejte z\xE1kladn\xED bod nebo",secondPointOrDisplacement:"Zadejte druh\xFD bod nebo",displacement:"Zadejte p\u0159em\xEDst\u011Bn\xED",keywords:{displacement:{display:"P\u0159em\xEDst\u011Bn\xED(D)",local:"P\u0159em\xEDst\u011Bn\xED",global:"Displacement"}}},offset:{distance:"Zadejte vzd\xE1lenost offsetu",selectObject:"Vyberte objekt k offsetu nebo stiskn\u011Bte Enter pro dokon\u010Den\xED",sidePoint:"Zadejte bod na stran\u011B pro offset",invalidDistance:"Vzd\xE1lenost offsetu mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",invalidSelection:"Vybran\xFD objekt nelze offsetovat.",offsetFailed:"Nelze vytvo\u0159it offsetovou k\u0159ivku na zadan\xE9 stran\u011B."},mtext:{point:"Zadejte bod vlo\u017Een\xED v\xEDce\u0159\xE1dkov\xE9ho textu"},bmpout:{boundsFirstCorner:"Zadejte prvn\xED roh rozsahu",boundsSecondCorner:"Zadejte protilehl\xFD roh",longSidePrompt:"Zadejte velikost del\u0161\xED strany v pixelech"},jpgout:{boundsFirstCorner:"Zadejte prvn\xED roh rozsahu",boundsSecondCorner:"Zadejte protilehl\xFD roh",longSidePrompt:"Zadejte velikost del\u0161\xED strany v pixelech"},pngout:{boundsFirstCorner:"Zadejte prvn\xED roh rozsahu",boundsSecondCorner:"Zadejte protilehl\xFD roh",longSidePrompt:"Zadejte velikost del\u0161\xED strany v pixelech"},imageattach:{insertionPoint:"Zadejte bod vlo\u017Een\xED:",scale:"Zadejte faktor m\u011B\u0159\xEDtka:",rotation:"Zadejte \xFAhel oto\u010Den\xED:",invalidScale:"Faktor m\u011B\u0159\xEDtka mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",decodeFailed:"Nepoda\u0159ilo se na\u010D\xEDst vybran\xFD soubor obr\xE1zku."},insert:{blockName:"Zadejte n\xE1zev bloku:",insertionPoint:"Zadejte bod vlo\u017Een\xED:",scale:"Zadejte faktor m\u011B\u0159\xEDtka:",rotation:"Zadejte \xFAhel oto\u010Den\xED:",invalidScale:"Faktor m\u011B\u0159\xEDtka mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",invalidBlockName:"Neplatn\xFD n\xE1zev bloku.",blockNotFound:"Blok nenalezen",xrefNotAllowed:"Nelze vlo\u017Eit extern\xED referenci pomoc\xED -INSERT."},xattach:{insertionPoint:"Zadejte bod vlo\u017Een\xED:",scale:"Zadejte faktor m\u011B\u0159\xEDtka:",rotation:"Zadejte \xFAhel oto\u010Den\xED:",invalidScale:"Faktor m\u011B\u0159\xEDtka mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",unsupportedFile:"Vyberte soubor DWG nebo DXF.",loading:"Na\u010D\xEDt\xE1m extern\xED referenci...",loadFailed:"Nepoda\u0159ilo se na\u010D\xEDst vybran\xFD soubor v\xFDkresu."},point:{point:"Zadejte bod"},polygon:{numberOfSides:"Zadejte po\u010Det stran",centerOrEdge:"Zadejte st\u0159ed mnoho\xFAheln\xEDku nebo",radiusOrType:"Zadejte volby",edgeStart:"Zadejte prvn\xED koncov\xFD bod hrany",edgeEnd:"Zadejte druh\xFD koncov\xFD bod hrany",keywords:{edge:{display:"Hrana(E)",local:"Hrana",global:"Edge"},inscribed:{display:"Vepsan\xFD do kru\u017Enice(I)",local:"Vepsan\xFD do kru\u017Enice",global:"Inscribed"},circumscribed:{display:"Opsan\xFD kolem kru\u017Enice(C)",local:"Opsan\xFD kolem kru\u017Enice",global:"Circumscribed"}},invalid:{sides:"Neplatn\xFD po\u010Det stran. Zadejte cel\xE9 \u010D\xEDslo mezi 3 a 1024.",radius:"Neplatn\xFD polom\u011Br. Polom\u011Br mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",edge:"Neplatn\xE1 hrana. D\xE9lka hrany mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0."}},polyline:{firstPoint:"Zadejte prvn\xED bod",nextPoint:"Zadejte dal\u0161\xED bod (nebo stiskn\u011Bte Enter pro dokon\u010Den\xED)",nextPointWithOptions:"Zadejte dal\u0161\xED bod nebo",nextPointWithArcOptions:"Zadejte dal\u0161\xED bod nebo",keywords:{arc:{display:"Oblouk(A)",local:"Oblouk",global:"Arc"},undo:{display:"Zp\u011Bt(U)",local:"Zp\u011Bt",global:"Undo"},close:{display:"Uzav\u0159\xEDt(C)",local:"Uzav\u0159\xEDt",global:"Close"},line:{display:"\xDAse\u010Dka(L)",local:"\xDAse\u010Dka",global:"Line"},angle:{display:"\xDAhel(A)",local:"\xDAhel",global:"Angle"},center:{display:"St\u0159ed(C)",local:"St\u0159ed",global:"Center"},secondPoint:{display:"Druh\xFD bod(P)",local:"Druh\xFD bod",global:"SecondPoint"},radius:{display:"Polom\u011Br(R)",local:"Polom\u011Br",global:"Radius"}},arcAngle:"Zadejte \xFAhel oblouku",arcCenter:"Zadejte st\u0159edov\xFD bod",arcSecondPoint:"Zadejte druh\xFD bod na oblouku",arcEndPoint:"Zadejte koncov\xFD bod oblouku",arcRadius:"Zadejte polom\u011Br oblouku"},rect:{firstPoint:"Zadejte prvn\xED roh",nextPoint:"Zadejte druh\xFD roh",firstPointWithOptions:"Zadejte prvn\xED roh nebo",otherCornerWithOptions:"Zadejte druh\xFD roh nebo",chamferFirst:"Zadejte prvn\xED vzd\xE1lenost zkosen\xED",chamferSecond:"Zadejte druhou vzd\xE1lenost zkosen\xED",filletRadius:"Zadejte polom\u011Br zaoblen\xED",segmentWidth:"Zadejte \u0161\xED\u0159ku \u010D\xE1ry obd\xE9ln\xEDku",elevationValue:"Zadejte v\xFD\u0161ku",thicknessValue:"Zadejte tlou\u0161\u0165ku",rotationAngle:"Zadejte \xFAhel oto\u010Den\xED obd\xE9ln\xEDku",dimensionLength:"Zadejte d\xE9lku obd\xE9ln\xEDku",dimensionWidth:"Zadejte \u0161\xED\u0159ku obd\xE9ln\xEDku",areaValue:"Zadejte plochu obd\xE9ln\xEDku",areaLengthOrWidth:"Zadejte d\xE9lku obd\xE9ln\xEDku",areaSpecifyWidth:"Zadejte \u0161\xED\u0159ku obd\xE9ln\xEDku",invalidPositive:"Neplatn\xFD vstup. Zadejte hodnotu v\u011Bt\u0161\xED ne\u017E 0.",invalidRect:"Nelze vytvo\u0159it obd\xE9ln\xEDk. Zadejte platn\xE9 rohy nebo rozm\u011Bry.",thicknessNotSupported:"Tlou\u0161\u0165ka obd\xE9ln\xEDku se aktu\xE1ln\u011B nezapisuje do dat entity. Nastaven\xED tlou\u0161\u0165ky se ignoruje.",keywords:{chamfer:{display:"Zkosen\xED(C)",local:"Zkosen\xED",global:"Chamfer"},elevation:{display:"V\xFD\u0161ka(E)",local:"V\xFD\u0161ka",global:"Elevation"},fillet:{display:"Zaoblen\xED(F)",local:"Zaoblen\xED",global:"Fillet"},thickness:{display:"Tlou\u0161\u0165ka(T)",local:"Tlou\u0161\u0165ka",global:"Thickness"},width:{display:"\u0160\xED\u0159ka(W)",local:"\u0160\xED\u0159ka",global:"Width"},area:{display:"Plocha(A)",local:"Plocha",global:"Area"},dimensions:{display:"Rozm\u011Bry(D)",local:"Rozm\u011Bry",global:"Dimensions"},rotation:{display:"Oto\u010Den\xED(R)",local:"Oto\u010Den\xED",global:"Rotation"},length:{display:"D\xE9lka(L)",local:"D\xE9lka",global:"Length"},rectWidth:{display:"\u0160\xED\u0159ka(W)",local:"\u0160\xED\u0159ka",global:"Width"}}},rotate:{basePoint:"Zadejte z\xE1kladn\xED bod",rotationAngleOrOptions:"Zadejte \xFAhel oto\u010Den\xED nebo",referenceAngleOrPoints:"Zadejte referen\u010Dn\xED \xFAhel nebo",firstReferencePoint:"Zadejte prvn\xED bod referen\u010Dn\xEDho \xFAhlu",secondReferencePoint:"Zadejte druh\xFD bod",newAngle:"Zadejte nov\xFD \xFAhel",keywords:{copy:{display:"Kop\xEDrovat(C)",local:"Kop\xEDrovat",global:"Copy"},reference:{display:"Reference(R)",local:"Reference",global:"Reference"},points:{display:"Body(P)",local:"Body",global:"Points"}},invalid:{referencePoints:"Neplatn\xE9 referen\u010Dn\xED body: body mus\xED b\xFDt r\u016Fzn\xE9."}},revcloud:{firstCornerOrOptions:"Zadejte prvn\xED rohov\xFD bod nebo",firstCorner:"Zadejte prvn\xED rohov\xFD bod",oppositeCorner:"Zadejte protilehl\xFD roh",startPoint:"Zadejte po\u010D\xE1te\u010Dn\xED bod",nextPoint:"Zadejte dal\u0161\xED bod",nextPointOrUndo:"Zadejte dal\u0161\xED bod nebo",firstPoint:"Zadejte prvn\xED bod",guideCursor:"Ve\u010Fte kurzor pod\xE9l obl\xE1\u010Dku (Enter dokon\u010D\xED)",arcLength:"Zadejte d\xE9lku oblouku",selectObject:"Vyberte objekt",style:"Zadejte styl oblouk\u016F revizn\xEDho obl\xE1\u010Dku",reverseDirection:"Obr\xE1tit sm\u011Br",invalidArcLength:"D\xE9lka oblouku mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E 0.",invalidObject:"Vybran\xFD objekt nelze p\u0159ev\xE9st na revizn\xED obl\xE1\u010Dek.",keywords:{arcLength:{display:"D\xE9lka oblouku(A)",local:"D\xE9lka oblouku",global:"ArcLength"},object:{display:"Objekt(O)",local:"Objekt",global:"Object"},rectangular:{display:"Obd\xE9ln\xEDkov\xFD(R)",local:"Obd\xE9ln\xEDkov\xFD",global:"Rectangular"},polygonal:{display:"Mnoho\xFAheln\xEDkov\xFD(P)",local:"Mnoho\xFAheln\xEDkov\xFD",global:"Polygonal"},freehand:{display:"Od ruky(F)",local:"Od ruky",global:"Freehand"},style:{display:"Styl(S)",local:"Styl",global:"Style"},normal:{display:"Norm\xE1ln\xED(N)",local:"Norm\xE1ln\xED",global:"Normal"},calligraphy:{display:"Kaligrafie(C)",local:"Kaligrafie",global:"Calligraphy"},undo:{display:"Zp\u011Bt(U)",local:"Zp\u011Bt",global:"Undo"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}},sketch:{specifySketch:"Zadejte skicu nebo",sketching:"Pohybem ukazatele kreslete (kliknut\xEDm nebo Enter zastav\xEDte)",type:"Zadejte typ skici",increment:"Zadejte p\u0159\xEDr\u016Fstek skici",tolerance:"Zadejte toleranci splajnu",firstPoint:"Zadejte prvn\xED bod",nextPoint:"Zadejte koncov\xFD bod",keywords:{type:{display:"Typ(T)",local:"Typ",global:"Type"},increment:{display:"P\u0159\xEDr\u016Fstek(I)",local:"P\u0159\xEDr\u016Fstek",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"\xDAse\u010Dky(L)",local:"\xDAse\u010Dky",global:"Lines"},polyline:{display:"K\u0159ivka(P)",local:"K\u0159ivka",global:"Polyline"},spline:{display:"Splajn(S)",local:"Splajn",global:"Spline"}}},spline:{firstPoint:"Zadejte prvn\xED bod",nextPoint:"Zadejte dal\u0161\xED bod (nebo stiskn\u011Bte Enter pro dokon\u010Den\xED)",firstPointWithOptions:"Zadejte prvn\xED bod nebo",nextPointWithFitOptions:"Zadejte dal\u0161\xED bod nebo",nextPointWithCvOptions:"Zadejte dal\u0161\xED \u0159\xEDdic\xED bod nebo",methodPrompt:"Zadejte metodu vytvo\u0159en\xED splajnu",knotsPrompt:"Zadejte parametrizaci uzl\u016F",degreePrompt:"Zadejte stupe\u0148 splajnu",keywords:{method:{display:"Metoda(M)",local:"Metoda",global:"Method"},fit:{display:"P\u0159izp\u016Fsobit(F)",local:"P\u0159izp\u016Fsobit",global:"Fit"},cv:{display:"\u0158B(C)",local:"\u0158B",global:"CV"},knots:{display:"Uzly(K)",local:"Uzly",global:"Knots"},degree:{display:"Stupe\u0148(D)",local:"Stupe\u0148",global:"Degree"},undo:{display:"Zp\u011Bt(U)",local:"Zp\u011Bt",global:"Undo"},close:{display:"Uzav\u0159\xEDt(C)",local:"Uzav\u0159\xEDt",global:"Close"},chord:{display:"T\u011Btiva(C)",local:"T\u011Btiva",global:"Chord"},sqrtChord:{display:"Odmocnina t\u011Btivy(S)",local:"Odmocnina t\u011Btivy",global:"SqrtChord"},uniform:{display:"Rovnom\u011Brn\xE9(U)",local:"Rovnom\u011Brn\xE9",global:"Uniform"}}},sysvar:{prompt:"Zadejte novou hodnotu"},zoom:{mainPrompt:"Zadejte roh okna nebo",firstCorner:"Zadejte prvn\xED roh",secondCorner:"Zadejte protilehl\xFD roh",centerPoint:"Zadejte st\u0159edov\xFD bod",heightOrScale:"Zadejte v\xFD\u0161ku nebo faktor m\u011B\u0159\xEDtka (nX nebo nXP)",scaleFactor:"Zadejte faktor m\u011B\u0159\xEDtka (nX nebo nXP)",keywords:{all:{display:"V\u0161e(A)",local:"V\u0161e",global:"All"},center:{display:"St\u0159ed(C)",local:"St\u0159ed",global:"Center"},extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},previous:{display:"P\u0159edchoz\xED(P)",local:"P\u0159edchoz\xED",global:"Previous"},original:{display:"P\u016Fvodn\xED(O)",local:"P\u016Fvodn\xED",global:"Original"},saved:{display:"Ulo\u017Een\xFD(V)",local:"Ulo\u017Een\xFD",global:"Saved"},smart:{display:"Chytr\xFD(I)",local:"Chytr\xFD",global:"Smart"},scale:{display:"M\u011B\u0159\xEDtko(S)",local:"M\u011B\u0159\xEDtko",global:"Scale"},window:{display:"Okno(W)",local:"Okno",global:"Window"}}},chtml:{exportFormat:"Form\xE1t exportu",exportInvisibleLayers:"Exportovat neviditeln\xE9 hladiny",exportLayouts:"Exportovat rozvr\u017Een\xED",initialView:"Po\u010D\xE1te\u010Dn\xED pohled p\u0159i otev\u0159en\xED HTML",viewerMode:"Re\u017Eim offline prohl\xED\u017Ee\u010De",chunkSizeMiB:"Velikost \u010D\xE1sti v MiB (v\xEDcesouborov\xFD bal\xED\u010Dek)",compressChunks:"Komprimovat \u010D\xE1sti (v\xEDcesouborov\xFD bal\xED\u010Dek)",keywords:{single:{display:"Jeden soubor(S)",local:"Jeden soubor",global:"Single"},multi:{display:"V\xEDcesouborov\xFD bal\xED\u010Dek(M)",local:"V\xEDcesouborov\xFD bal\xED\u010Dek",global:"Multi"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"},extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},current:{display:"Aktu\xE1ln\xED(C)",local:"Aktu\xE1ln\xED",global:"Current"},view:{display:"Pohled(V)",local:"Pohled",global:"View"},measure:{display:"M\u011B\u0159en\xED a kontrola(M)",local:"M\u011B\u0159en\xED a kontrola",global:"Measure"}}},cpdf:{modelSpaceFit:"R\xE1m modelov\xE9ho prostoru",exportLayouts:"Exportovat rozvr\u017Een\xED",textMode:"Vykreslen\xED textu",keywords:{extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},display:{display:"Zobrazen\xED(D)",local:"Zobrazen\xED",global:"Display"},text:{display:"Text(T)",local:"Text",global:"Text"},vector:{display:"Vektor(V)",local:"Vektor",global:"Vector"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}}},f3e={document:{untitled:"Bez n\xE1zvu"},commandLine:{noLast:"(\u017E\xE1dn\xFD p\u0159edchoz\xED p\u0159\xEDkaz)",unknownCommand:"Nezn\xE1m\xFD p\u0159\xEDkaz",executed:"Proveden\xFD p\u0159\xEDkaz",showHistory:"Zobrazit historii p\u0159\xEDkaz\u016F",placeholder:"Zadejte p\u0159\xEDkaz",showMessages:"Zobrazit historii zpr\xE1v",canceled:"*Zru\u0161eno*",noHistory:"(\u017E\xE1dn\xE1 historie)",invalidInput:"Neplatn\xFD vstup.",close:"Zav\u0159\xEDt p\u0159\xEDkazov\xFD \u0159\xE1dek"},mobileCommand:{length:"D\xE9lka",angle:"\xDAhel",dx:"\u0394X",dy:"\u0394Y",x:"X",y:"Y",confirm:"Potvrdit",cancel:"Zru\u0161it",help:"N\xE1pov\u011Bda",back:"Zp\u011Bt",collapse:"Sbalit",expand:"Rozbalit"},inputManager:{firstCorner:"Zadejte prvn\xED roh nebo",secondCorner:"Zadejte druh\xFD roh nebo"},message:{fetchingDrawingFile:"Na\u010D\xEDt\xE1m soubor\u2026",exportingDxf:"Exportuji DXF\u2026",exportingPdf:"Exportuji PDF\u2026",exportingSvg:"Exportuji SVG\u2026",calculatingSmartExtents:"Po\u010D\xEDt\xE1m chytr\xFD rozsah\u2026",importingPdf:"Importuji PDF\u2026",exportingEntityPreview:"Exportuji obr\xE1zek\u2026",collectingMemoryProfile:"Analyzuji pam\u011B\u0165\u2026",fontCached:"Font \xFAsp\u011B\u0161n\u011B ulo\u017Een do mezipam\u011Bti",fontCacheFailed:"Ulo\u017Een\xED fontu do mezipam\u011Bti selhalo",fontsNotFound:"Fonty nenalezen\xE9 v \xFAlo\u017Ei\u0161ti: {fonts}.",fontsNotLoaded:"Nepoda\u0159ilo se na\u010D\xEDst fonty: {fonts}.",fontMissedInDrawing:"Font \u201E{font}\u201C vy\u017Eaduje {count} textov\xFDch objekt\u016F, ale nen\xED k dispozici. Zobrazuje se jako \u201E{replacementFont}\u201C.",fontMissedReplacement:"\u201E{font}\u201C (zobrazeno fontem \u201E{replacement}\u201C)",failedToGetAvaiableFonts:"Nepoda\u0159ilo se z\xEDskat fonty z \u201E{url}\u201C!",failedToOpenFile:"Nepoda\u0159ilo se otev\u0159\xEDt soubor \u201E{fileName}\u201C!",failedToOpenFileToast:"Nepoda\u0159ilo se otev\u0159\xEDt \u201E{fileName}\u201C. Podrobnosti najdete v centru ozn\xE1men\xED.",failedToOpenFileWorkerOom:"Nepoda\u0159ilo se otev\u0159\xEDt \u201E{fileName}\u201C. Anal\xFDza selhala kv\u016Fli nedostatku dostupn\xE9 pam\u011Bti (LibreDWG parser). Kliknut\xEDm na {dwgParserLink} m\u016F\u017Eete zakoupit komer\u010Dn\xED DWG parser a otev\xEDrat velk\xE9 v\xFDkresy bez tohoto p\xE1du.",failedToOpenFileWorkerOomLink:"tuto str\xE1nku",failedToOpenFileWorkerTimeout:"Nepoda\u0159ilo se otev\u0159\xEDt \u201E{fileName}\u201C. P\u0159i na\u010D\xEDt\xE1n\xED v\xFDkresu vypr\u0161el \u010Dasov\xFD limit.",failedToOpenFileFontLoadFailed:"Nepoda\u0159ilo se otev\u0159\xEDt \u201E{fileName}\u201C. Pot\u0159ebn\xE9 fonty se nepoda\u0159ilo na\u010D\xEDst.",failedToOpenFileLicenseExpired:"Nepoda\u0159ilo se otev\u0159\xEDt \u201E{fileName}\u201C. Licence p\u0159evodn\xEDku DWG vypr\u0161ela.",failedToOpenFileLicenseInvalid:"Nepoda\u0159ilo se otev\u0159\xEDt \u201E{fileName}\u201C. Licence p\u0159evodn\xEDku DWG chyb\xED nebo je neplatn\xE1.",unknownEntities:"Tento v\xFDkres obsahuje {count} nezn\xE1m\xFDch nebo nepodporovan\xFDch objekt\u016F! Tyto objekty nebudou zobrazeny.",tianzhengEntities:"Tento v\xFDkres obsahuje vlastn\xED objekty TArch / Tianzheng (nebo podobn\xE9 t\u0159et\xED strany) (asi {count}). V tomto prost\u0159ed\xED je nelze pln\u011B zpracovat, tak\u017Ee se \u010D\xE1st obsahu nemus\xED zobrazit.",emptyProxyEntities:"Tento v\xFDkres obsahuje {count} vlastn\xEDch objekt\u016F bez proxy grafiky! Tyto objekty nebudou zobrazeny."},notification:{center:{title:"Ozn\xE1men\xED",clearAll:"Vymazat v\u0161e",noNotifications:"\u017D\xE1dn\xE1 ozn\xE1men\xED"},group:{fontMissed:"Chyb\u011Bj\xEDc\xED fonty",fontMissedSummary:"{count} zpr\xE1v o fontech. Kliknut\xEDm zobraz\xEDte podrobnosti.",unsupportedEntities:"Nepodporovan\xE9 objekty",unsupportedEntitiesSummary:"{count} zpr\xE1v o na\u010D\xEDt\xE1n\xED. Kliknut\xEDm zobraz\xEDte podrobnosti.",genericSummary:"{count} zpr\xE1v. Kliknut\xEDm zobraz\xEDte podrobnosti."},title:{failedToOpenFile:"Nepoda\u0159ilo se otev\u0159\xEDt soubor",failedToOpenFileWorkerOom:"Nedostatek pam\u011Bti",failedToOpenFileWorkerTimeout:"Vypr\u0161el \u010Dasov\xFD limit otev\u0159en\xED",failedToOpenFileFontLoadFailed:"Na\u010Dten\xED fontu selhalo",failedToOpenFileLicenseExpired:"Licence vypr\u0161ela",failedToOpenFileLicenseInvalid:"Neplatn\xE1 licence",fontNotFound:"Font nenalezen",fontNotLoaded:"Font nena\u010Dten",parsingWarning:"Probl\xE9my p\u0159i na\u010D\xEDt\xE1n\xED v\xFDkresu",systemMessage:"Syst\xE9mov\xE1 zpr\xE1va",systemWarning:"Syst\xE9mov\xE9 varov\xE1n\xED",systemError:"Syst\xE9mov\xE1 chyba",systemInfo:"Syst\xE9mov\xE9 informace"}},progress:{start:"Zahajuji na\u010D\xEDt\xE1n\xED souboru\u2026",parse:"Na\u010D\xEDt\xE1m soubor\u2026",font:"Stahuji fonty pot\u0159ebn\xE9 pro tento v\xFDkres\u2026",ltype:"Na\u010D\xEDt\xE1m typy \u010Dar\u2026",style:"Na\u010D\xEDt\xE1m textov\xE9 styly\u2026",dimstyle:"Na\u010D\xEDt\xE1m k\xF3tovac\xED styly\u2026",layer:"Na\u010D\xEDt\xE1m hladiny\u2026",vport:"Na\u010D\xEDt\xE1m v\xFD\u0159ezy\u2026",blockrecord:"Na\u010D\xEDt\xE1m z\xE1znamy blok\u016F\u2026",header:"Na\u010D\xEDt\xE1m hlavi\u010Dku\u2026",block:"Na\u010D\xEDt\xE1m bloky\u2026",entity:"Na\u010D\xEDt\xE1m objekty\u2026",object:"Na\u010D\xEDt\xE1m pojmenovan\xE9 slovn\xEDky\u2026",rendering:"Vykreslov\xE1n\xED v\xFDkresu ...",end:"Hotovo!"},about:{title:"O aplikaci",close:"Zav\u0159\xEDt",product:"CAD Viewer",tagline:"Vysokov\xFDkonn\xFD webov\xFD CAD prohl\xED\u017Ee\u010D pro v\xFDkresy DWG a DXF.",website:"Web",docs:"Dokumentace",repository:"GitHub",copyright:"\xA9 {year} mlightcad. V\u0161echna pr\xE1va vyhrazena.",ok:"OK"},drawStyle:{color:"Barva",fontSize:"V\xFD\u0161ka textu"},shortCutToolbar:{more:"V\xEDce",undo:"Zp\u011Bt",redo:"Znovu",erase:"Smazat",collapse:"Sbalit panel n\xE1stroj\u016F",expand:"Rozbalit panel n\xE1stroj\u016F"},textHeight:{title:"V\xFD\u0161ka textu",close:"Zav\u0159\xEDt",ok:"OK",cancel:"Zru\u0161it",adaptive:"P\u0159izp\u016Fsobit obrazovce",custom:"Vlastn\xED v\xFD\u0161ka textu",customPlaceholder:"Sv\u011Btov\xE1 v\xFD\u0161ka",fromScreen:"Ze velikosti na obrazovce",fromScreenHint:"Zadejte, jak velk\xFD m\xE1 text vypadat na obrazovce p\u0159i aktu\xE1ln\xEDm zoomu. P\u0159epo\u010D\xEDt\xE1 se na pevnou sv\u011Btovou v\xFD\u0161ku, kter\xE1 se p\u0159i pozd\u011Bj\u0161\xEDm zoomov\xE1n\xED nem\u011Bn\xED.",screenPxPlaceholder:"Velikost p\xEDsma",screenUnit:"px",convert:"P\u0159epo\u010D\xEDtat"},entityPick:{cancel:"Zru\u0161it v\xFDb\u011Br"},colorPicker:{title:"Vybrat barvu",close:"Zav\u0159\xEDt",ok:"OK",cancel:"Zru\u0161it",index:"Index barvy: ",rgb:"RGB: ",input:"Barva",inputPlaceholder:"1-255 nebo #RRGGBB"},touchPointTutorial:{title:"Jak p\u0159esn\u011B vybrat bod?",description:"Podr\u017Ete prst na obrazovce asi 0,5 sekundy. Nad prstem se objev\xED k\u0159\xED\u017E, kter\xFD p\u0159i pohybu sleduje prst a p\u0159ichyt\xE1v\xE1 se k geometrii pro p\u0159esn\u011Bj\u0161\xED v\xFDb\u011Br.",snoozeToday:"Dnes u\u017E nep\u0159ipom\xEDnat",hideForever:"U\u017E nep\u0159ipom\xEDnat",ok:"Rozum\xEDm"},dataSource:{open:"Otev\u0159\xEDt",local:"M\xEDstn\xED soubor",url:"Z URL",openFrom:"Otev\u0159\xEDt z {name}",signInTo:"P\u0159ihl\xE1sit se k {name}",signOutOf:"Odhl\xE1sit se z {name}",signOutOfAccount:"Odhl\xE1sit se z {name} ({account})",urlDialogTitle:"Otev\u0159\xEDt z URL",urlDialogHint:"Zadejte URL souboru .dwg nebo .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Zru\u0161it",onedrive:"OneDrive",googledrive:"Google Drive",or:"nebo",dropFile:"P\u0159et\xE1hn\u011Bte soubor sem nebo",browse:"proch\xE1zet",dropOrBrowse:"P\u0159et\xE1hn\u011Bte soubor DWG nebo DXF sem, nebo proch\xE1zejte",newDrawing:"Nov\xFD v\xFDkres",source:"Zdroj",unavailable:"Tento zdroj zat\xEDm nen\xED k dispozici.",selectFile:"Vybrat soubor",signInRequired:"Nejprve se p\u0159ihlaste a pak vyberte soubor.",downloading:"Stahuji soubor ..."}},m3e={document:{untitled:"Untitled"},commandLine:{noLast:"(no last command)",unknownCommand:"Unknown command",executed:"Executed command",showHistory:"Show command history",placeholder:"Type command",showMessages:"Show message history",canceled:"*Canceled*",noHistory:"(no history)",invalidInput:"Invalid input.",close:"Close command line"},mobileCommand:{length:"Length",angle:"Angle",dx:"\u0394X",dy:"\u0394Y",x:"X",y:"Y",confirm:"Confirm",cancel:"Cancel",help:"Help",back:"Back",collapse:"Collapse",expand:"Expand"},inputManager:{firstCorner:"Specify the first corner or",secondCorner:"Specify the second corner or"},message:{fetchingDrawingFile:"Fetching file ...",exportingDxf:"Exporting DXF ...",exportingPdf:"Exporting PDF ...",exportingSvg:"Exporting SVG ...",calculatingSmartExtents:"Calculating smart extents ...",importingPdf:"Importing PDF ...",exportingEntityPreview:"Exporting image ...",collectingMemoryProfile:"Analyzing memory ...",fontCached:"Font cached successfully",fontCacheFailed:"Failed to cache font",fontsNotFound:"Fonts not found in the font repository: {fonts}.",fontsNotLoaded:"Failed to load fonts: {fonts}.",fontMissedInDrawing:'Font "{font}" is required by {count} text object(s) but is not available. Displaying with "{replacementFont}".',fontMissedReplacement:'"{font}" (displaying with "{replacement}")',failedToGetAvaiableFonts:'Failed to get available fonts from "{url}"!',failedToOpenFile:'Failed to open file "{fileName}"!',failedToOpenFileToast:'Failed to open "{fileName}". Check the notification center for details.',failedToOpenFileWorkerOom:'Failed to open "{fileName}". Parsing failed because available memory was insufficient (LibreDWG parser). You can click {dwgParserLink} to purchase the commercial DWG parser and open large drawings without this crash.',failedToOpenFileWorkerOomLink:"this page",failedToOpenFileWorkerTimeout:'Failed to open "{fileName}". The operation timed out while parsing the drawing.',failedToOpenFileFontLoadFailed:'Failed to open "{fileName}". Required fonts could not be loaded.',failedToOpenFileLicenseExpired:'Failed to open "{fileName}". The DWG converter license has expired.',failedToOpenFileLicenseInvalid:'Failed to open "{fileName}". The DWG converter license is missing or invalid.',unknownEntities:"This drawing contains {count} unknown or unsupported entities! Those entities will not be shown.",tianzhengEntities:"This drawing contains TArch / Tianzheng (or similar third-party) custom entities (about {count}). They cannot be fully parsed in this environment, so some content may not display.",emptyProxyEntities:"This drawing contains {count} custom entities without proxy graphics! Those entities will not be shown."},notification:{center:{title:"Notifications",clearAll:"Clear All",noNotifications:"No notifications"},group:{fontMissed:"Missing Fonts",fontMissedSummary:"{count} font-related messages. Click to expand details.",unsupportedEntities:"Unsupported Entities",unsupportedEntitiesSummary:"{count} parsing-related messages. Click to expand details.",genericSummary:"{count} messages. Click to expand details."},title:{failedToOpenFile:"Failed to Open File",failedToOpenFileWorkerOom:"Insufficient Memory",failedToOpenFileWorkerTimeout:"Open Timed Out",failedToOpenFileFontLoadFailed:"Font Load Failed",failedToOpenFileLicenseExpired:"License Expired",failedToOpenFileLicenseInvalid:"Invalid License",fontNotFound:"Font Not Found",fontNotLoaded:"Font Not Loaded",parsingWarning:"Issues on Parsing Drawing",systemMessage:"System Message",systemWarning:"System Warning",systemError:"System Error",systemInfo:"System Info"}},progress:{start:"Start parsing file ...",parse:"Parsing file ...",font:"Downloading fonts needed by this drawing ...",ltype:"Parsing line types ...",style:"Parsing text syltes ...",dimstyle:"Parsing dimension styles ...",layer:"Parsing layers ...",vport:"Parsing viewports ...",blockrecord:"Parsing block record ...",header:"Parsing header ...",block:"Parsing blocks ...",entity:"Parsing entities ...",object:"Parsing named dictionaries ...",rendering:"Rendering drawing ...",end:"Finished!"},about:{title:"About",close:"Close",product:"CAD Viewer",tagline:"High-performance web CAD viewer for DWG and DXF drawings.",website:"Website",docs:"Documentation",repository:"GitHub",copyright:"\xA9 {year} mlightcad. All rights reserved.",ok:"OK"},drawStyle:{color:"Color",fontSize:"Text height"},shortCutToolbar:{more:"More",undo:"Undo",redo:"Redo",erase:"Delete",collapse:"Collapse toolbar",expand:"Expand toolbar"},textHeight:{title:"Text Height",close:"Close",ok:"OK",cancel:"Cancel",adaptive:"Fit to screen",custom:"Custom text height",customPlaceholder:"World height",fromScreen:"From screen size",fromScreenHint:"Enter how large the text should look on screen at the current zoom. It is converted to a fixed world-space height that stays constant when you zoom later.",screenPxPlaceholder:"Font size",screenUnit:"px",convert:"Convert"},entityPick:{cancel:"Cancel selection"},colorPicker:{title:"Select Color",close:"Close",ok:"OK",cancel:"Cancel",index:"Color Index: ",rgb:"RGB: ",input:"Color",inputPlaceholder:"1-255 or #RRGGBB"},touchPointTutorial:{title:"How to pick points precisely?",description:"Long-press on the screen for about 0.5 seconds. A cross appears above your finger and follows as you move, snapping to geometry for more accurate picks.",snoozeToday:"Don't remind me today",hideForever:"Don't remind me again",ok:"Got it"},dataSource:{open:"Open",local:"Local file",url:"From URL",openFrom:"Open from {name}",signInTo:"Sign in to {name}",signOutOf:"Sign out of {name}",signOutOfAccount:"Sign out of {name} ({account})",urlDialogTitle:"Open from URL",urlDialogHint:"Enter a URL to a .dwg or .dxf file.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Cancel",onedrive:"OneDrive",googledrive:"Google Drive",or:"or",dropFile:"Drop a file here or",browse:"browse",dropOrBrowse:"Drop a DWG or DXF file here, or browse",newDrawing:"New Drawing",source:"Source",unavailable:"This source is not available yet.",selectFile:"Select file",signInRequired:"Sign in first to select a file.",downloading:"Downloading file ..."}},g3e={ACAD:{"-hatch":{description:"\u015Eerit men\xFCs\xFC olmadan komut sat\u0131r\u0131 se\xE7enekleriyle tarama dolgular olu\u015Fturur"},"-layer":{description:"Komut sat\u0131r\u0131 se\xE7enekleriyle katmanlar\u0131 y\xF6netir"},about:{description:"mlightcad hakk\u0131nda bilgi g\xF6sterir"},acadver:{description:"\xC7izim veritaban\u0131 s\xFCr\xFCm tan\u0131mlay\u0131c\u0131s\u0131n\u0131 saklar (salt okunur)"},angbase:{description:"Ge\xE7erli KKS'ye g\xF6re 0 a\xE7\u0131 temel y\xF6n\xFCn\xFC ayarlar"},angdir:{description:"Pozitif a\xE7\u0131lar\u0131n saat y\xF6n\xFCnde mi yoksa saat y\xF6n\xFCn\xFCn tersine mi \xF6l\xE7\xFClece\u011Fini ayarlar"},arc:{description:"Bir yay olu\u015Fturur"},aunits:{description:"A\xE7\u0131lar i\xE7in g\xF6r\xFCnt\xFCleme bi\xE7imini ayarlar"},auprec:{description:"AUNITS ile birlikte kullan\u0131lan, a\xE7\u0131lar i\xE7in g\xF6r\xFCnt\xFCleme hassasiyetini ayarlar"},bmpout:{description:"BMP olarak d\u0131\u015Fa aktar\u0131r"},cdxf:{description:"Ge\xE7erli \xE7izimi DXF olarak d\u0131\u015Fa aktar\u0131r"},cpdf:{description:"Ge\xE7erli \xE7izimi PDF olarak d\u0131\u015Fa aktar\u0131r"},"-cpdf":{description:"Ge\xE7erli \xE7izimi komut sat\u0131r\u0131 se\xE7enekleriyle PDF olarak d\u0131\u015Fa aktar\u0131r"},cecolor:{description:"Yeni olu\u015Fturulan nesneler i\xE7in ge\xE7erli varsay\u0131lan rengi ayarlar"},celtscale:{description:"Yeni olu\u015Fturulan nesneler i\xE7in \xE7izgi tipi \xF6l\xE7ek fakt\xF6r\xFCn\xFC denetler"},celtype:{description:"Yeni olu\u015Fturulan nesneler i\xE7in \xE7izgi tipini ayarlar"},celweight:{description:"Yeni olu\u015Fturulan nesneler i\xE7in varsay\u0131lan \xE7izgi kal\u0131nl\u0131\u011F\u0131n\u0131 ayarlar"},cetransparency:{description:"Yeni olu\u015Fturulan nesneler i\xE7in saydaml\u0131\u011F\u0131 ayarlar"},cachefont:{description:"Metin i\u015Fleme i\xE7in yerel bir yaz\u0131 tipi dosyas\u0131n\u0131 IndexedDB'ye \xF6nbelle\u011Fe al\u0131r"},circle:{description:"Merkez ve yar\u0131\xE7apa g\xF6re bir daire olu\u015Fturur"},clayer:{description:"Yeni nesneler ve d\xFCzenleme i\u015Flemleri i\xE7in ge\xE7erli katman\u0131 ayarlar"},cmleaderstyle:{description:"Ge\xE7erli \xE7oklu lider stilinin ad\u0131n\u0131 ayarlar"},cmlscale:{description:"Bir \xE7oklu \xE7izginin genel geni\u015Fli\u011Fini denetler"},cmlstyle:{description:"Ge\xE7erli \xE7oklu \xE7izgi stilinin ad\u0131n\u0131 ayarlar"},colortheme:{description:"Kullan\u0131c\u0131 aray\xFCz\xFCn\xFCn renk temas\u0131n\u0131 denetler (koyu veya a\xE7\u0131k)"},copy:{description:"Se\xE7ili varl\u0131klar\u0131 klonlayarak yeni konumlara kopyalar",prompt:"Varl\u0131klar\u0131 se\xE7in"},csvg:{description:"Ge\xE7erli \xE7izimi SVG'ye d\xF6n\xFC\u015Ft\xFCr\xFCr"},chtml:{description:"Ge\xE7erli \xE7izimi ba\u011F\u0131ms\u0131z, \xE7evrimd\u0131\u015F\u0131 bir HTML dosyas\u0131na d\u0131\u015Fa aktar\u0131r"},"-chtml":{description:"Komut sat\u0131r\u0131 se\xE7eneklerini kullanarak ge\xE7erli \xE7izimi HTML'e d\u0131\u015Fa aktar\u0131r"},dimlinear:{description:"Do\u011Frusal \xF6l\xE7\xFClendirmeler olu\u015Fturur"},dimstyle:{description:"Ge\xE7erli \xF6l\xE7\xFClendirme stilinin ad\u0131n\u0131 ayarlar"},dwgname:{description:"Ge\xE7erli \xE7izim dosyas\u0131n\u0131n ad\u0131n\u0131 saklar (salt okunur)"},loginname:{description:"Kullan\u0131c\u0131n\u0131n oturum a\xE7ma ad\u0131n\u0131 g\xF6r\xFCnt\xFCler (salt okunur)"},dynmode:{description:"\u0130mle\xE7teki Dinamik Girdi ayarlar\u0131n\u0131 denetler"},dynprompt:{description:"Dinamik Girdi ara\xE7 ipu\xE7lar\u0131nda istemlerin g\xF6r\xFCnt\xFClenmesini denetler"},ellipse:{description:"Eksen u\xE7 noktalar\u0131na veya merkeze g\xF6re bir elips veya eliptik yay olu\u015Fturur"},erase:{description:"Se\xE7ili varl\u0131klar\u0131 \xE7izimden siler",prompt:"Varl\u0131klar\u0131 se\xE7in"},extmax:{description:"Model alan\u0131 \xE7izim kapsam\u0131n\u0131n sa\u011F \xFCst k\xF6\u015Fesini saklar (salt okunur)"},extmin:{description:"Model alan\u0131 \xE7izim kapsam\u0131n\u0131n sol alt k\xF6\u015Fesini saklar (salt okunur)"},entout:{description:"Se\xE7ili varl\u0131klar i\xE7in birle\u015Ftirilmi\u015F bir \xF6nizleme g\xF6r\xFCnt\xFCs\xFC d\u0131\u015Fa aktar\u0131r",prompt:"Varl\u0131klar\u0131 se\xE7in"},hideobjects:{description:"Se\xE7ili nesnelerin g\xF6r\xFCnt\xFClenmesini ge\xE7ici olarak gizler",prompt:"Nesneleri se\xE7in"},imageattach:{description:"Ge\xE7erli \xE7izime harici ba\u015Fvuru olarak bir raster g\xF6r\xFCnt\xFC ekler"},"-insert":{description:"Bir blok tan\u0131m\u0131n\u0131 ge\xE7erli \xE7izime ekler (komut sat\u0131r\u0131)"},xattach:{description:"Ge\xE7erli \xE7izime harici ba\u015Fvuru olarak bir DWG veya DXF \xE7izimi ekler"},gripcolor:{description:"Se\xE7ili nesneler \xFCzerinde g\xF6r\xFCnt\xFClenen se\xE7ilmemi\u015F tutama\xE7lar\u0131n rengini ayarlar"},griphot:{description:"Se\xE7ili (s\u0131cak) tutama\xE7lar\u0131n rengini ayarlar"},gripobjlimit:{description:"Se\xE7im k\xFCmesi belirtilen nesne say\u0131s\u0131n\u0131 a\u015Ft\u0131\u011F\u0131nda tutama\xE7 g\xF6r\xFCnt\xFClenmesini engeller (0 = s\u0131n\u0131r yok)"},grips:{description:"Se\xE7ili nesnelerde tutama\xE7lar\u0131n g\xF6r\xFCnt\xFClenip g\xF6r\xFCnt\xFClenmeyece\u011Fini denetler"},gripsize:{description:"Tutama\xE7 kutular\u0131n\u0131n piksel cinsinden boyutunu ayarlar"},hatch:{description:"Kapal\u0131 bir alan\u0131 veya se\xE7ili nesneleri bir tarama deseniyle doldurur"},ipdf:{description:"Bir PDF dosyas\u0131ndan vekt\xF6r geometrisini i\xE7e aktar\u0131r"},hpang:{description:"Yeni olu\u015Fturulan tarama desenleri i\xE7in varsay\u0131lan a\xE7\u0131y\u0131 radyan cinsinden ayarlar"},hpassoc:{description:"Yeni olu\u015Fturulan taramalar\u0131n ili\u015Fkisel olup olmayaca\u011F\u0131n\u0131 denetler"},hpbackgroundcolor:{description:"Yeni olu\u015Fturulan tarama desenleri i\xE7in varsay\u0131lan arka plan rengini ayarlar"},hpcolor:{description:"Yeni olu\u015Fturulan taramalar i\xE7in varsay\u0131lan rengi ayarlar"},hpdouble:{description:"Kullan\u0131c\u0131 tan\u0131ml\u0131 tarama desenlerinin ikiye katlan\u0131p katlanmayaca\u011F\u0131n\u0131 denetler"},hpislanddetection:{description:"Yeni olu\u015Fturulan tarama s\u0131n\u0131rlar\u0131 i\xE7indeki adalar\u0131n nas\u0131l i\u015Flenece\u011Fini denetler"},hplayer:{description:"Yeni olu\u015Fturulan taramalar ve dolgular i\xE7in varsay\u0131lan katman\u0131 ayarlar"},hpname:{description:"Bu oturumda yeni olu\u015Fturulan taramalar i\xE7in varsay\u0131lan desen ad\u0131n\u0131 ayarlar"},hpscale:{description:"Yeni olu\u015Fturulan tarama desenleri i\xE7in varsay\u0131lan \xF6l\xE7ek fakt\xF6r\xFCn\xFC ayarlar"},hpseparate:{description:"Birden \xE7ok s\u0131n\u0131r i\xE7in tek mi yoksa ayr\u0131 tarama nesneleri mi olu\u015Fturulaca\u011F\u0131n\u0131 denetler"},hptransparency:{description:"Yeni olu\u015Fturulan taramalar ve dolgular i\xE7in varsay\u0131lan saydaml\u0131\u011F\u0131 ayarlar"},insunits:{description:"Eklenen bloklar\u0131n, g\xF6r\xFCnt\xFClerin veya d\u0131\u015F referanslar\u0131n otomatik \xF6l\xE7eklendirilmesi i\xE7in \xE7izim birimlerini belirtir"},jpgout:{description:"JPEG olarak d\u0131\u015Fa aktar\u0131r"},laycur:{description:"Se\xE7ili nesnelerin katman \xF6zelli\u011Fini ge\xE7erli katman olarak de\u011Fi\u015Ftirir",prompt:"Ge\xE7erli katmana de\u011Fi\u015Ftirilecek nesneleri se\xE7in"},laydel:{description:"Bir katman\u0131 ve o katmandaki t\xFCm nesneleri siler"},layerclose:{description:"Katman \xD6zellikleri Y\xF6neticisi'ni kapat\u0131r"},layerp:{description:"Katman ayarlar\u0131nda yap\u0131lan son de\u011Fi\u015Fikli\u011Fi veya de\u011Fi\u015Fiklik k\xFCmesini geri al\u0131r"},layfrz:{description:"Se\xE7ili nesnelerin katman\u0131n\u0131 dondurur",prompt:"Dondurulacak katmandaki nesneyi se\xE7in"},layiso:{description:"Se\xE7ili nesnelerin katmanlar\u0131n\u0131 izole eder",prompt:"\u0130zole edilecek katmanlardaki nesneleri se\xE7in"},laylck:{description:"Se\xE7ili nesnelerin katman\u0131n\u0131 kilitler",prompt:"Kilitlenecek katmandaki nesneyi se\xE7in"},layoff:{description:"Se\xE7ili nesnelerin katman\u0131n\u0131 kapat\u0131r",prompt:"Kapat\u0131lacak katmandaki nesneyi se\xE7in"},layon:{description:"\xC7izimdeki t\xFCm katmanlar\u0131 a\xE7ar"},laythw:{description:"\xC7izimdeki t\xFCm donmu\u015F katmanlar\u0131 \xE7\xF6zer"},layulk:{description:"Se\xE7ili nesnelerin katman\u0131n\u0131n kilidini a\xE7ar",prompt:"Kilidi a\xE7\u0131lacak katmandaki nesneyi se\xE7in"},layuniso:{description:"LAYISO taraf\u0131ndan gizlenen veya kilitlenen katmanlar\u0131 geri y\xFCkler"},line:{description:"Noktalar aras\u0131nda d\xFCz \xE7izgi par\xE7alar\u0131 \xE7izer"},log:{description:"Hata ay\u0131klama bilgilerini konsola kaydeder"},ltscale:{description:"\xC7izim i\xE7in genel \xE7izgi tipi \xF6l\xE7ek fakt\xF6r\xFCn\xFC ayarlar"},lunits:{description:"Koordinatlar ve mesafeler i\xE7in g\xF6r\xFCnt\xFCleme bi\xE7imini ayarlar"},luprec:{description:"LUNITS ile birlikte kullan\u0131lan, do\u011Frusal birimler i\xE7in g\xF6r\xFCnt\xFCleme hassasiyetini ayarlar"},lwdisplay:{description:"\xC7izgi kal\u0131nl\u0131klar\u0131n\u0131n \xE7izimde g\xF6r\xFCnt\xFClenip g\xF6r\xFCnt\xFClenmeyece\u011Fini denetler"},clearmeasurements:{description:"Ge\xE7erli yerle\u015Fimdeki t\xFCm \xF6l\xE7\xFCmleri kald\u0131r\u0131r"},measurementvis:{description:"Ge\xE7erli yerle\u015Fimdeki \xF6l\xE7\xFCmleri g\xF6sterir veya gizler"},measurementpanel:{description:"\xD6l\xE7\xFCm paletini a\xE7ar"},measurementexport:{description:"\xD6l\xE7\xFCmleri sidecar JSON dosyas\u0131na d\u0131\u015Fa aktar\u0131r"},measurementimport:{description:"\xD6l\xE7\xFCmleri sidecar JSON dosyas\u0131ndan i\xE7e aktar\u0131r"},measurearea:{description:"Se\xE7ili nesnelerin veya noktalar\u0131n alan\u0131n\u0131 ve \xE7evresini hesaplar"},measureangle:{description:"\u0130ki \xE7izgi veya \xFC\xE7 nokta aras\u0131ndaki a\xE7\u0131y\u0131 \xF6l\xE7er"},measurearc:{description:"Bir yay par\xE7as\u0131n\u0131n uzunlu\u011Funu \xF6l\xE7er"},measuredistance:{description:"\u0130ki nokta aras\u0131ndaki mesafeyi ve delta de\u011Ferlerini \xF6l\xE7er"},measurecontinuous:{description:"Enter veya \u0130ptal edilene kadar ard\u0131\u015F\u0131k noktalar se\xE7erek zincirleme mesafeleri \xF6l\xE7er"},measurepoint:{description:"Se\xE7ilen noktan\u0131n X/Y koordinatlar\u0131n\u0131 \xF6l\xE7er"},measurement:{description:"\xC7izimin \u0130ngiliz (emperyal) birimlerini mi yoksa metrik birimleri mi kullanaca\u011F\u0131n\u0131 ayarlar"},measurementcolor:{description:"\xD6l\xE7\xFCm katmanlar\u0131 i\xE7in kullan\u0131lan rengi ayarlar"},modelbkcolor:{description:"Model alan\u0131 \xE7izim alan\u0131n\u0131n arka plan rengini ayarlar"},mline:{description:"Tek bir \xE7oklu \xE7izgi nesnesi olarak birden \xE7ok paralel \xE7izgi olu\u015Fturur"},move:{description:"Se\xE7ili varl\u0131klar\u0131 bir yer de\u011Fi\u015Ftirme vekt\xF6r\xFCne g\xF6re ta\u015F\u0131r",prompt:"Varl\u0131klar\u0131 se\xE7in"},offset:{description:"Belirtilen bir mesafede paralel e\u011Friler, \xE7oklu \xE7izgiler veya daireler olu\u015Fturur"},mtext:{description:"Bir \xE7oklu metin varl\u0131\u011F\u0131 olu\u015Fturur"},open:{description:"Mevcut bir \xE7izim dosyas\u0131n\u0131 a\xE7ar"},openprof:{description:"Dosya a\xE7ma a\u015Famas\u0131 zamanlama profillerinin konsola kaydedilip kaydedilmeyece\u011Fini denetler"},openperf:{description:"Son \xE7izim a\xE7\u0131l\u0131\u015F\u0131n\u0131n zamanlamalar\u0131n\u0131 Open Performance paletinde g\xF6sterir"},orthomode:{description:"\u0130mle\xE7 hareketini yatay veya dikey eksenle s\u0131n\u0131rlar"},osmode:{description:"Bit kodu de\u011Feri kullanarak \xE7al\u0131\u015Fan Nesne Yakalama modlar\u0131n\u0131 ayarlar"},pan:{description:"G\xF6r\xFCnt\xFCleme y\xF6n\xFCn\xFC veya b\xFCy\xFCtmeyi de\u011Fi\u015Ftirmeden g\xF6r\xFCn\xFCm\xFC kayd\u0131r\u0131r"},paperbkcolor:{description:"Ka\u011F\u0131t alan\u0131 (d\xFCzen) \xE7izim alan\u0131n\u0131n arka plan rengini ayarlar"},pdmode:{description:"POINT varl\u0131klar\u0131n\u0131n nas\u0131l g\xF6r\xFCnt\xFClenece\u011Fini denetler"},pdsize:{description:"POINT varl\u0131klar\u0131 i\xE7in g\xF6r\xFCnt\xFCleme boyutunu ayarlar"},pickbox:{description:"Nesneleri se\xE7mek i\xE7in kullan\u0131lan se\xE7im kutusunun boyutunu (piksel cinsinden) ayarlar"},pline:{description:"Birden \xE7ok nokta belirterek bir \xE7oklu \xE7izgi olu\u015Fturur"},pngout:{description:"PNG olarak d\u0131\u015Fa aktar\u0131r"},point:{description:"Noktalar olu\u015Fturur"},polaraddang:{description:"Ek kutupsal izleme a\xE7\u0131lar\u0131n\u0131 noktal\u0131 virg\xFClle ayr\u0131lm\u0131\u015F liste olarak saklar"},polarang:{description:"Kutupsal izleme i\xE7in kutupsal a\xE7\u0131 art\u0131m\u0131n\u0131 ayarlar"},polarmode:{description:"Kutupsal ve nesne yakalama izleme ayarlar\u0131n\u0131 denetler"},polygon:{description:"Merkez/yar\u0131\xE7apa veya bir \xE7okgen kenar\u0131na g\xF6re d\xFCzg\xFCn bir \xE7okgen olu\u015Fturur"},qnew:{description:"Yeni bir \xE7izim ba\u015Flat\u0131r"},close:{description:"Ge\xE7erli \xE7izimi kapat\u0131r"},ray:{description:"Bir noktadan ba\u015Flay\u0131p sonsuza uzanan bir \u0131\u015F\u0131n olu\u015Fturur"},rectang:{description:"\u0130ki kar\u015F\u0131t k\xF6\u015Fe belirterek bir dikd\xF6rtgen olu\u015Fturur"},regen:{description:"Ge\xE7erli \xE7izimi yeniden \xE7izer"},revcloud:{description:"Revizyon bulutu olu\u015Fturur veya de\u011Fi\u015Ftirir"},markuptext:{description:"Metin i\u015Fareti yerle\u015Ftirir"},markupline:{description:"\xC7izgi i\u015Fareti olu\u015Fturur"},markuparrow:{description:"Ok i\u015Fareti olu\u015Fturur"},markupcloud:{description:"Revizyon bulutu i\u015Fareti olu\u015Fturur"},markuprect:{description:"Dikd\xF6rtgen i\u015Fareti olu\u015Fturur"},markupcircle:{description:"Daire i\u015Fareti olu\u015Fturur"},markuphighlight:{description:"Vurgu dikd\xF6rtgeni i\u015Fareti olu\u015Fturur"},markupcallout:{description:"\xC7a\u011Fr\u0131 notu olu\u015Fturur: \xF6nce lider ucunu, sonra metin kutusunu belirtin, ard\u0131ndan metni girin"},markupstamp:{description:"Damga veya \xF6zel sembol yerle\u015Ftirir"},markupvis:{description:"\u0130\u015Faretleri g\xF6sterir veya gizler"},clearmarkups:{description:"Ge\xE7erli yerle\u015Fimdeki t\xFCm i\u015Faretleri temizler"},markupexport:{description:"\u0130\u015Faretleri sidecar JSON dosyas\u0131na d\u0131\u015Fa aktar\u0131r"},markupimport:{description:"\u0130\u015Faretleri sidecar JSON dosyas\u0131ndan i\xE7e aktar\u0131r"},markuppanel:{description:"\u0130\u015Faret paletini a\xE7ar"},rotate:{description:"Se\xE7ili varl\u0131klar\u0131 bir taban noktas\u0131 etraf\u0131nda d\xF6nd\xFCr\xFCr",prompt:"Varl\u0131klar\u0131 se\xE7in"},select:{description:"Varl\u0131klar\u0131 se\xE7er"},shortcutmenu:{description:"\xC7izim alan\u0131ndaki k\u0131sayol men\xFClerinin kullan\u0131labilirli\u011Fini denetler"},sketch:{description:"Bir dizi serbest el \xE7izgi par\xE7as\u0131 olu\u015Fturur"},spline:{description:"Kontrol noktalar\u0131 belirterek d\xFCzg\xFCn bir spline e\u011Frisi olu\u015Fturur"},textstyle:{description:"Ge\xE7erli metin stilinin ad\u0131n\u0131 ayarlar"},unitmode:{description:"LUNITS Mimari veya Kesirli oldu\u011Funda koordinatlar\u0131n kesirli g\xF6r\xFCnt\xFClenmesini denetler"},switchbg:{description:"\xC7izim alan\u0131 arka plan\u0131n\u0131 beyaz ve siyah aras\u0131nda de\u011Fi\u015Ftirir"},unisolateobjects:{description:"HIDEOBJECTS taraf\u0131ndan gizlenen t\xFCm nesneleri yeniden g\xF6r\xFCnt\xFCler"},undo:{description:"Son veritaban\u0131 d\xFCzenleme i\u015Flemini geri al\u0131r",nothingToUndo:"Geri al\u0131nacak i\u015Flem yok."},redo:{description:"Geri al\u0131nan son veritaban\u0131 d\xFCzenleme i\u015Flemini yineler",nothingToRedo:"Yinelenecek i\u015Flem yok."},xline:{description:"Her iki y\xF6nde de sonsuza uzanan bir yap\u0131 \xE7izgisi olu\u015Fturur"},zoom:{description:"T\xFCm varl\u0131klar\u0131n maksimum s\u0131n\u0131rlar\u0131n\u0131 g\xF6r\xFCnt\xFClemek i\xE7in yak\u0131nla\u015Ft\u0131r\u0131r"}},USER:{}},y3e={arc:{startPointOrCenter:"Yay\u0131n ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin veya",secondPointOrOptions:"Yay\u0131n ikinci noktas\u0131n\u0131 belirtin veya",secondPoint:"Yay\u0131n ikinci noktas\u0131n\u0131 belirtin",startPoint:"Yay\u0131n ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin",centerPoint:"Yay\u0131n merkez noktas\u0131n\u0131 belirtin",endPoint:"Yay\u0131n biti\u015F noktas\u0131n\u0131 belirtin",endPointOrOptions:"Yay\u0131n biti\u015F noktas\u0131n\u0131 belirtin veya",centerPointOrOptions:"Yay\u0131n merkez noktas\u0131n\u0131 belirtin",includedAngle:"\u0130\xE7 a\xE7\u0131y\u0131 belirtin",chordLength:"Kiri\u015F uzunlu\u011Funu belirtin",tangentDirection:"Yay\u0131n ba\u015Flang\u0131\xE7 noktas\u0131 i\xE7in te\u011Fet y\xF6n\xFCn\xFC belirtin",radius:"Yay\u0131n yar\u0131\xE7ap\u0131n\u0131 belirtin",keywords:{center:{display:"Merkez(M)",local:"Merkez",global:"Center"},end:{display:"Biti\u015F(B)",local:"Biti\u015F",global:"End"},angle:{display:"A\xE7\u0131(A)",local:"A\xE7\u0131",global:"Angle"},chordLength:{display:"kiri\u015F Uzunlu\u011Fu(U)",local:"Kiri\u015F Uzunlu\u011Fu",global:"ChordLength"},direction:{display:"Y\xF6n(Y)",local:"Y\xF6n",global:"Direction"},radius:{display:"Yar\u0131\xE7ap(R)",local:"Yar\u0131\xE7ap",global:"Radius"}},invalid:{threePoint:"Ge\xE7ersiz 3 noktal\u0131 yay: noktalar ayn\u0131 do\u011Fru \xFCzerinde veya bir yay tan\u0131mlayam\u0131yor.",center:"Ge\xE7ersiz merkez giri\u015Fi: ba\u015Flang\u0131\xE7 ve biti\u015F noktalar\u0131 ayn\u0131 \xE7ember \xFCzerinde olmal\u0131d\u0131r.",angle:"Ge\xE7ersiz a\xE7\u0131 giri\u015Fi: i\xE7 a\xE7\u0131 0 dereceden b\xFCy\xFCk ve 360 dereceden k\xFC\xE7\xFCk olmal\u0131d\u0131r.",chordLength:"Ge\xE7ersiz kiri\u015F uzunlu\u011Fu: de\u011Fer mevcut yar\u0131\xE7ap i\xE7in ge\xE7erli aral\u0131\u011F\u0131n d\u0131\u015F\u0131nda.",direction:"Ge\xE7ersiz y\xF6n: bu te\u011Fet y\xF6n\xFCnden bir yay olu\u015Fturulam\u0131yor.",radius:"Ge\xE7ersiz yar\u0131\xE7ap: belirtilen yar\u0131\xE7ap ba\u015Flang\u0131\xE7 ve biti\u015F noktalar\u0131n\u0131 birle\u015Ftiremiyor."}},circle:{center:"\xC7emberin merkezini belirtin",centerOrOptions:"\xC7emberin merkez noktas\u0131n\u0131 belirtin veya",radius:"\xC7emberin yar\u0131\xE7ap\u0131n\u0131 belirtin",radiusOrDiameter:"\xC7emberin yar\u0131\xE7ap\u0131n\u0131 belirtin veya",diameter:"\xC7emberin \xE7ap\u0131n\u0131 belirtin",twoPointFirst:"\xC7ember \xE7ap\u0131n\u0131n ilk u\xE7 noktas\u0131n\u0131 belirtin",twoPointSecond:"\xC7ember \xE7ap\u0131n\u0131n ikinci u\xE7 noktas\u0131n\u0131 belirtin",threePointFirst:"\xC7ember \xFCzerindeki ilk noktay\u0131 belirtin",threePointSecond:"\xC7ember \xFCzerindeki ikinci noktay\u0131 belirtin",threePointThird:"\xC7ember \xFCzerindeki \xFC\xE7\xFCnc\xFC noktay\u0131 belirtin",keywords:{threeP:{display:"3N(3N)",local:"3N",global:"3P"},twoP:{display:"2N(2N)",local:"2N",global:"2P"},diameter:{display:"\xC7ap(\xC7)",local:"\xC7ap",global:"Diameter"}}},copy:{basePointOrOptions:"Temel noktay\u0131 belirtin veya",displacementOrArray:"Yer de\u011Fi\u015Ftirmeyi belirtin veya",secondPointOrArray:"\u0130kinci noktay\u0131 belirtin veya",modePrompt:"Kopyalama modu se\xE7ene\u011Fini girin",arrayItemCount:"Orijinal dahil dizideki \xF6\u011Fe say\u0131s\u0131n\u0131 girin",arraySecondPointOrFit:"\u0130kinci noktay\u0131 belirtin veya",arrayFitSecondPoint:"\u0130kinci noktay\u0131 belirtin",keywords:{displacement:{display:"Yer de\u011Fi\u015Ftirme(Y)",local:"Yer de\u011Fi\u015Ftirme",global:"Displacement"},mode:{display:"Mod(O)",local:"Mod",global:"Mode"},multiple:{display:"\xC7oklu(\xC7)",local:"\xC7oklu",global:"Multiple"},single:{display:"Tekli(T)",local:"Tekli",global:"Single"},array:{display:"Dizi(D)",local:"Dizi",global:"Array"},fit:{display:"Uydur(U)",local:"Uydur",global:"Fit"}}},dimlinear:{xLine1Point:"\u0130lk uzatma \xE7izgisinin ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin",xLine2Point:"\u0130kinci uzatma \xE7izgisinin ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin",dimLinePoint:"\xD6l\xE7\xFC \xE7izgisi konumunu belirtin"},ellipse:{axisEndpointOrOptions:"Elipsin eksen u\xE7 noktas\u0131n\u0131 belirtin veya",arcAxisEndpointOrCenter:"Eliptik yay\u0131n eksen u\xE7 noktas\u0131n\u0131 belirtin veya",center:"Elipsin merkezini belirtin",firstAxisEndpoint:"Eksenin u\xE7 noktas\u0131n\u0131 belirtin",secondAxisEndpoint:"Eksenin di\u011Fer u\xE7 noktas\u0131n\u0131 belirtin",otherAxisOrRotation:"Di\u011Fer eksene olan mesafeyi belirtin veya",rotationAngle:"Ana eksen etraf\u0131ndaki d\xF6nd\xFCrme a\xE7\u0131s\u0131n\u0131 belirtin",arcStartAngle:"Eliptik yay\u0131n ba\u015Flang\u0131\xE7 a\xE7\u0131s\u0131n\u0131 belirtin",arcEndAngle:"Eliptik yay\u0131n biti\u015F a\xE7\u0131s\u0131n\u0131 belirtin",keywords:{arc:{display:"Yay(Y)",local:"Yay",global:"Arc"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},rotation:{display:"D\xF6nd\xFCrme(D)",local:"D\xF6nd\xFCrme",global:"Rotation"}},invalid:{axis:"Ge\xE7ersiz eksen giri\u015Fi: eksen uzunlu\u011Fu 0'dan b\xFCy\xFCk olmal\u0131d\u0131r.",otherAxis:"Ge\xE7ersiz di\u011Fer eksen giri\u015Fi: mesafe 0'dan b\xFCy\xFCk olmal\u0131d\u0131r.",rotation:"Ge\xE7ersiz d\xF6nd\xFCrme giri\u015Fi: elde edilen k\xFC\xE7\xFCk eksen 0'dan b\xFCy\xFCk olmal\u0131d\u0131r."}},hatch:{prompt:"S\u0131n\u0131r nesnesini se\xE7in veya",pickPoint:"\u0130\xE7 noktay\u0131 belirtin (bitirmek i\xE7in Enter'a bas\u0131n)",select:"Tarama yap\u0131lacak nesneleri se\xE7in",patternName:"Tarama deseni ad\u0131n\u0131 girin",scale:"Tarama deseni \xF6l\xE7e\u011Fini belirtin",angle:"Tarama deseni a\xE7\u0131s\u0131n\u0131 belirtin",style:"Tarama stilini girin",associative:"\u0130li\u015Fkiselli\u011Fi belirtin",invalidBoundary:"Se\xE7ilen nesneler kapal\u0131 bir s\u0131n\u0131r olu\u015Fturmuyor.",keywords:{pick:{display:"Nokta se\xE7(N)",local:"Nokta se\xE7",global:"PickPoints"},select:{display:"Nesne se\xE7(S)",local:"Nesne se\xE7",global:"SelectObjects"},cancel:{display:"\u0130ptal(\u0130)",local:"\u0130ptal",global:"Cancel"},pattern:{display:"Desen(D)",local:"Desen",global:"Pattern"},scale:{display:"\xD6l\xE7ek(\xD6)",local:"\xD6l\xE7ek",global:"Scale"},angle:{display:"A\xE7\u0131(A)",local:"A\xE7\u0131",global:"Angle"},style:{display:"Stil(T)",local:"Stil",global:"HatchStyle"},associative:{display:"\u0130li\u015Fkisel(\u0130L)",local:"\u0130li\u015Fkisel",global:"AssociativeMode"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},outer:{display:"D\u0131\u015F(D)",local:"D\u0131\u015F",global:"Outer"},ignore:{display:"Yoksay(Y)",local:"Yoksay",global:"Ignore"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hay\u0131r(H)",local:"Hay\u0131r",global:"No"}}},hideobjects:{hidden:"nesne gizlendi",restored:"nesne geri y\xFCklendi",nothingToRestore:"Geri y\xFCklenecek gizli nesne yok"},entout:{longSidePrompt:"\xD6nizleme uzun kenar boyutunu piksel olarak girin",exported:"nesne \xF6nizlemesi d\u0131\u015Fa aktar\u0131ld\u0131",skipped:"nesne atland\u0131",failed:{"no-preview-root":"Se\xE7im i\xE7in \xF6nizleme geometrisi olu\u015Fturulamad\u0131","no-bounds":"Se\xE7im i\xE7in \xF6nizleme s\u0131n\u0131rlar\u0131 hesaplanamad\u0131","capture-failed":"Nesne \xF6nizleme g\xF6r\xFCnt\xFCs\xFC olu\u015Fturulamad\u0131","download-failed":"\xD6nizleme olu\u015Fturuldu ancak PNG indirmesi ba\u015Far\u0131s\u0131z oldu"}},layer:{main:"Se\xE7enek girin",listSummary:"Katman listesi taray\u0131c\u0131 konsoluna yazd\u0131r\u0131ld\u0131",emptyInput:"Katman ad\u0131 girilmedi.",newPrompt:"Yeni katman(lar) i\xE7in ad girin",makePrompt:"Ge\xE7erli yap\u0131lacak katman\u0131n ad\u0131n\u0131 girin",setPrompt:"Ge\xE7erli olarak ayarlanacak katman\u0131n ad\u0131n\u0131 girin",onPrompt:"A\xE7\u0131lacak katman ad(lar)\u0131n\u0131 girin",offPrompt:"Kapat\u0131lacak katman ad(lar)\u0131n\u0131 girin",freezePrompt:"Dondurulacak katman ad(lar)\u0131n\u0131 girin",thawPrompt:"\xC7\xF6z\xFClecek katman ad(lar)\u0131n\u0131 girin",lockPrompt:"Kilitlenecek katman ad(lar)\u0131n\u0131 girin",unlockPrompt:"Kilidi a\xE7\u0131lacak katman ad(lar)\u0131n\u0131 girin",colorLayerPrompt:"Rengi de\u011Fi\u015Ftirilecek katman ad(lar)\u0131n\u0131 girin",colorValuePrompt:"Renk girin (ACI 1-255, 255,0,0 gibi RGB veya CSS renk ad\u0131)",invalidColor:"Ge\xE7ersiz renk giri\u015Fi.",descriptionLayerPrompt:"A\xE7\u0131klamas\u0131 d\xFCzenlenecek katman ad\u0131n\u0131 girin",descriptionValuePrompt:"Yeni katman a\xE7\u0131klamas\u0131n\u0131 girin",created:"Olu\u015Fturulan katman say\u0131s\u0131",alreadyExists:"Katman zaten mevcut",notFound:"Katman bulunamad\u0131",cannotChangeCurrent:"Ge\xE7erli katman kapat\u0131lamaz veya dondurulamaz.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Yap(Y)",local:"Yap",global:"Make"},set:{display:"Ayarla(A)",local:"Ayarla",global:"Set"},new:{display:"Yeni(Y)",local:"Yeni",global:"New"},on:{display:"A\xE7(A)",local:"A\xE7",global:"On"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},color:{display:"Renk(R)",local:"Renk",global:"Color"},freeze:{display:"Dondur(D)",local:"Dondur",global:"Freeze"},thaw:{display:"\xC7\xF6z(\xC7)",local:"\xC7\xF6z",global:"Thaw"},lock:{display:"Kilitle(K)",local:"Kilitle",global:"Lock"},unlock:{display:"Kilidi a\xE7(A)",local:"Kilidi a\xE7",global:"Unlock"},description:{display:"A\xE7\u0131klama(A)",local:"A\xE7\u0131klama",global:"Description"}}},layon:{alreadyOn:"T\xFCm katmanlar zaten a\xE7\u0131k.",turnedOn:"A\xE7\u0131lan katmanlar"},laycur:{prompt:"Ge\xE7erli katmana de\u011Fi\u015Ftirilecek nesneleri se\xE7in",currentLayerNotFound:"Ge\xE7erli katman bulunamad\u0131.",noObjects:"Ge\xE7erli nesne se\xE7ilmedi.",alreadyCurrent:"Se\xE7ilen nesneler zaten ge\xE7erli katmanda.",changed:"Ge\xE7erli katmana de\u011Fi\u015Ftirilen nesneler"},layfrz:{prompt:"Dondurulacak katmandaki nesneyi se\xE7in veya",invalidSelection:"Ge\xE7ersiz nesne se\xE7ildi.",settingsPrompt:"De\u011Fi\u015Ftirilecek LAYFRZ ayar\u0131n\u0131 girin",viewportPrompt:"G\xF6r\xFCnt\xFC penceresi dondurma davran\u0131\u015F\u0131n\u0131 belirtin",blockSelectionPrompt:"\u0130\xE7 i\xE7e blok se\xE7im davran\u0131\u015F\u0131n\u0131 belirtin",vpfreezeFallback:"Mevcut g\xF6r\xFCnt\xFCleyici, g\xF6r\xFCnt\xFC penceresi ba\u015F\u0131na katman dondurmay\u0131 desteklemiyor; bunun yerine Dondur davran\u0131\u015F\u0131 kullan\u0131l\u0131yor.",nestedSelectionLimited:"\u0130\xE7 i\xE7e blok se\xE7im ayarlar\u0131 kaydedildi, ancak mevcut se\xE7im i\u015Flemi yine de \xFCst d\xFCzey nesnenin katman\u0131n\u0131 \xE7\xF6z\xFCml\xFCyor.",layerNotFound:"Katman bulunamad\u0131",cannotFreezeCurrent:"Ge\xE7erli katman dondurulamaz.",alreadyFrozen:"Katman zaten donuk",frozen:"Dondurulan katman",restored:"Geri y\xFCklenen katman",nothingToUndo:"Geri al\u0131nacak bir LAYFRZ i\u015Flemi yok.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},viewports:{display:"G\xF6r\xFCnt\xFC pencereleri(G)",local:"G\xF6r\xFCnt\xFC pencereleri",global:"Viewports"},blockSelection:{display:"Blok se\xE7imi(B)",local:"Blok se\xE7imi",global:"BlockSelection"},freeze:{display:"Dondur(D)",local:"Dondur",global:"Freeze"},vpfreeze:{display:"G\xF6r\xFCnt\xFC dondur(V)",local:"G\xF6r\xFCnt\xFC dondur",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Nesne(N)",local:"Nesne",global:"Entity"},none:{display:"Hi\xE7biri(H)",local:"Hi\xE7biri",global:"None"}}},layiso:{prompt:"\u0130zole edilecek katman(lar)daki nesneleri se\xE7in veya",settingsPrompt:"\u0130zole edilmeyen katmanlar i\xE7in ayar\u0131 girin",offModePrompt:"\u0130zole edilmeyen katmanlar i\xE7in kapatma davran\u0131\u015F\u0131n\u0131 girin",noLayers:"Ge\xE7erli katman se\xE7ilmedi.",layerNotFound:"Katman bulunamad\u0131",isolated:"\u0130zole edilen katman(lar)",affectedLayers:"etkilenen katmanlar",vpfreezeFallback:"Mevcut g\xF6r\xFCnt\xFCleyici, g\xF6r\xFCnt\xFC penceresi ba\u015F\u0131na katman dondurmay\u0131 desteklemiyor; bunun yerine Kapat davran\u0131\u015F\u0131 kullan\u0131l\u0131yor.",lockFadeFallback:"Mevcut g\xF6r\xFCnt\xFCleyici katman solma g\xF6r\xFCnt\xFCs\xFCn\xFC desteklemiyor; izole edilmeyen katmanlar solma olmadan kilitlenecek.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},lockAndFade:{display:"Kilitle ve soldur(K)",local:"Kilitle ve soldur",global:"LockAndFade"},vpfreeze:{display:"G\xF6r\xFCnt\xFC dondur(V)",local:"G\xF6r\xFCnt\xFC dondur",global:"Vpfreeze"}}},layuniso:{noPrevious:"Geri y\xFCklenecek \xF6nceki LAYISO katman durumu yok.",layerNotFound:"Katman bulunamad\u0131",nothingRestored:"Hi\xE7bir LAYISO katman de\u011Fi\u015Fikli\u011Fi geri y\xFCklenmedi.",restored:"Geri y\xFCklenen katmanlar"},laythw:{alreadyThawed:"T\xFCm katmanlar zaten \xE7\xF6z\xFClm\xFC\u015F.",thawed:"\xC7\xF6z\xFClen katmanlar"},laylck:{prompt:"Kilitlenecek katmandaki bir nesneyi se\xE7in",invalidSelection:"Ge\xE7ersiz nesne se\xE7ildi.",layerNotFound:"Katman bulunamad\u0131",alreadyLocked:"Katman zaten kilitli",locked:"Kilitlenen katman"},layulk:{prompt:"Kilidi a\xE7\u0131lacak katmandaki bir nesneyi se\xE7in",invalidSelection:"Ge\xE7ersiz nesne se\xE7ildi.",layerNotFound:"Katman bulunamad\u0131",alreadyUnlocked:"Katman\u0131n kilidi zaten a\xE7\u0131k",unlocked:"Kilidi a\xE7\u0131lan katman"},layoff:{prompt:"Kapat\u0131lacak katmandaki nesneyi se\xE7in veya",invalidSelection:"Ge\xE7ersiz nesne se\xE7ildi.",settingsPrompt:"De\u011Fi\u015Ftirilecek LAYOFF ayar\u0131n\u0131 girin",viewportPrompt:"G\xF6r\xFCnt\xFC penceresi davran\u0131\u015F\u0131n\u0131 belirtin",blockSelectionPrompt:"\u0130\xE7 i\xE7e blok se\xE7im davran\u0131\u015F\u0131n\u0131 belirtin",vpfreezeFallback:"Mevcut g\xF6r\xFCnt\xFCleyici, g\xF6r\xFCnt\xFC penceresi ba\u015F\u0131na katman kapatmay\u0131 desteklemiyor; bunun yerine Kapat davran\u0131\u015F\u0131 kullan\u0131l\u0131yor.",nestedSelectionLimited:"\u0130\xE7 i\xE7e blok se\xE7im ayarlar\u0131 kaydedildi, ancak mevcut se\xE7im i\u015Flemi yine de \xFCst d\xFCzey nesnenin katman\u0131n\u0131 \xE7\xF6z\xFCml\xFCyor.",layerNotFound:"Katman bulunamad\u0131",cannotTurnOffCurrent:"Ge\xE7erli katman kapat\u0131lamaz.",alreadyOff:"Katman zaten kapal\u0131",turnedOff:"Kapat\u0131lan katman",restored:"Geri y\xFCklenen katman",nothingToUndo:"Geri al\u0131nacak bir LAYOFF i\u015Flemi yok.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},viewports:{display:"G\xF6r\xFCnt\xFC pencereleri(G)",local:"G\xF6r\xFCnt\xFC pencereleri",global:"Viewports"},blockSelection:{display:"Blok se\xE7imi(B)",local:"Blok se\xE7imi",global:"BlockSelection"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},vpfreeze:{display:"G\xF6r\xFCnt\xFC dondur(V)",local:"G\xF6r\xFCnt\xFC dondur",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Nesne(N)",local:"Nesne",global:"Entity"},none:{display:"Hi\xE7biri(H)",local:"Hi\xE7biri",global:"None"}}},layerp:{restored:"\xD6nceki katman durumu geri y\xFCklendi.",noPreviousState:"Geri y\xFCklenecek \xF6nceki bir katman durumu yok."},line:{firstPoint:"\u0130lk noktay\u0131 belirtin",firstPointOrContinue:"\u0130lk noktay\u0131 belirtin veya",nextPoint:"Sonraki noktay\u0131 belirtin",nextPointWithOptions:"Sonraki noktay\u0131 belirtin veya",keywords:{continue:{display:"Devam et(D)",local:"Devam et",global:"Continue"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"}}},xline:{firstPointOrOptions:"Bir nokta belirtin veya",secondPoint:"\u0130kinci noktay\u0131 belirtin",throughPoint:"Ge\xE7i\u015F noktas\u0131n\u0131 belirtin",angle:"Sonsuz do\u011Fru a\xE7\u0131s\u0131n\u0131 girin",invalidDirection:"XLINE i\xE7in ge\xE7ersiz y\xF6n.",keywords:{hor:{display:"Yatay(Y)",local:"Yatay",global:"Hor"},ver:{display:"Dikey(D)",local:"Dikey",global:"Ver"},ang:{display:"A\xE7\u0131(A)",local:"A\xE7\u0131",global:"Ang"}}},ray:{startPoint:"Ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin",throughPoint:"Ge\xE7i\u015F noktas\u0131n\u0131 belirtin"},mline:{startPointWithOptions:"Ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin veya",nextPointWithOptions:"Sonraki noktay\u0131 belirtin veya",justificationPrompt:"Hizalama t\xFCr\xFCn\xFC girin",scalePrompt:"\xC7oklu \xE7izgi \xF6l\xE7e\u011Fini belirtin",stylePrompt:"\xC7oklu \xE7izgi stil ad\u0131n\u0131 girin veya liste i\xE7in [?]",styleNotFound:"\xC7oklu \xE7izgi stili bulunamad\u0131",styleListHeader:"Y\xFCklenen \xE7oklu \xE7izgi stilleri",styleListEmpty:"Mevcut \xE7izimde y\xFCkl\xFC \xE7oklu \xE7izgi stili yok.",keywords:{justification:{display:"Hizalama(H)",local:"Hizalama",global:"Justification"},scale:{display:"\xD6l\xE7ek(\xD6)",local:"\xD6l\xE7ek",global:"Scale"},style:{display:"Stil(ST)",local:"Stil",global:"Style"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},top:{display:"\xDCst(\xDC)",local:"\xDCst",global:"Top"},zero:{display:"S\u0131f\u0131r(S)",local:"S\u0131f\u0131r",global:"Zero"},bottom:{display:"Alt(A)",local:"Alt",global:"Bottom"}}},measureAngle:{vertex:"K\xF6\u015Fe noktas\u0131n\u0131 belirtin",arm1:"Birinci kol \xFCzerindeki noktay\u0131 belirtin",arm2:"\u0130kinci kol \xFCzerindeki noktay\u0131 belirtin"},measureArc:{startPoint:"Yay\u0131n ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin",throughPoint:"Yay \xFCzerinde bir nokta belirtin",endPoint:"Yay\u0131n biti\u015F noktas\u0131n\u0131 belirtin",lockedEndPoint:"Yay\u0131n biti\u015F noktas\u0131n\u0131 belirtin (Ctrl ile b\xFCy\xFCk/k\xFC\xE7\xFCk yay aras\u0131nda ge\xE7i\u015F)",invalidPoints:"\xDC\xE7 nokta do\u011Frusal ve bir yay tan\u0131mlam\u0131yor."},measureArea:{firstPoint:"\u0130lk noktay\u0131 belirtin",nextPoint:"Sonraki noktay\u0131 belirtin (bitirmek i\xE7in Enter'a bas\u0131n)"},measureDistance:{firstPoint:"\u0130lk noktay\u0131 belirtin",secondPoint:"\u0130kinci noktay\u0131 belirtin"},measureContinuous:{firstPoint:"\u0130lk noktay\u0131 belirtin",nextPoint:"Sonraki noktay\u0131 belirtin (bitirmek i\xE7in Enter'a bas\u0131n)"},measurePoint:{point:"Noktay\u0131 belirtin"},measurement:{import:{chooseFile:"Bir \xF6l\xE7\xFCm sidecar JSON dosyas\u0131 se\xE7in"}},markup:{author:"\u0130nceleme yazar\u0131n\u0131 belirtin (sonraki kullan\u0131mlar i\xE7in kaydedilir)",text:{point:"Metin i\u015Faretinin noktas\u0131n\u0131 belirtin",content:"\u0130\u015Faret metnini girin"},line:{firstPoint:"\xC7izgi i\u015Faretinin ilk noktas\u0131n\u0131 belirtin",secondPoint:"\xC7izgi i\u015Faretinin ikinci noktas\u0131n\u0131 belirtin"},arrow:{firstPoint:"Okun ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin",secondPoint:"Ok ucunu belirtin"},cloud:{firstCorner:"Bulutun ilk k\xF6\u015Fesini belirtin",secondCorner:"Bulutun kar\u015F\u0131 k\xF6\u015Fesini belirtin"},rect:{firstCorner:"Dikd\xF6rtgenin ilk k\xF6\u015Fesini belirtin",secondCorner:"Dikd\xF6rtgenin kar\u015F\u0131 k\xF6\u015Fesini belirtin"},circle:{center:"Dairenin merkezini belirtin",radius:"Dairenin yar\u0131\xE7ap\u0131n\u0131 belirtin"},shape:{calloutOn:"[\xC7a\u011Fr\u0131 a\xE7\u0131k]",calloutOff:"[\xC7a\u011Fr\u0131 kapal\u0131]",calloutAnchor:"\xC7a\u011Fr\u0131 metninin konumunu belirtin",keywords:{callout:{display:"\xC7a\u011Fr\u0131(C)",local:"\xC7a\u011Fr\u0131",global:"Callout"},noCallout:{display:"\xC7a\u011Fr\u0131Yok(N)",local:"\xC7a\u011Fr\u0131Yok",global:"NoCallout"}}},highlight:{firstCorner:"Vurgu dikd\xF6rtgeninin ilk k\xF6\u015Fesini belirtin",secondCorner:"Vurgu dikd\xF6rtgeninin kar\u015F\u0131 k\xF6\u015Fesini belirtin"},callout:{tip:"Lider ucunu veya \xE7a\u011Fr\u0131s\u0131 olmayan bulut/dikd\xF6rtgen/daire d\u0131\u015F \xE7er\xE7evesini belirtin",anchor:"\xC7a\u011Fr\u0131 metninin konumunu belirtin",content:"\xC7a\u011Fr\u0131 metnini girin"},stamp:{kind:"Damga kimli\u011Fini girin [approved/rejected/revised/for-review/custom]",imageUrl:"\xD6zel damga g\xF6r\xFCnt\xFCs\xFC URL\u2019sini girin (iste\u011Fe ba\u011Fl\u0131)",caption:"Damga a\xE7\u0131klamas\u0131n\u0131 girin (iste\u011Fe ba\u011Fl\u0131)",point:"Damga ekleme noktas\u0131n\u0131 belirtin"},import:{chooseFile:"Bir i\u015Faret sidecar JSON dosyas\u0131 se\xE7in"}},move:{basePointOrDisplacement:"Temel noktay\u0131 belirtin veya",secondPointOrDisplacement:"\u0130kinci noktay\u0131 belirtin veya",displacement:"Yer de\u011Fi\u015Ftirmeyi belirtin",keywords:{displacement:{display:"Yer de\u011Fi\u015Ftirme(Y)",local:"Yer de\u011Fi\u015Ftirme",global:"Displacement"}}},offset:{distance:"\xD6teleme mesafesini belirtin",selectObject:"\xD6telenecek nesneyi se\xE7in veya bitirmek i\xE7in Enter'a bas\u0131n",sidePoint:"\xD6telenecek tarafta bir nokta belirtin",invalidDistance:"\xD6teleme mesafesi 0'dan b\xFCy\xFCk olmal\u0131d\u0131r.",invalidSelection:"Se\xE7ilen nesne \xF6telenemez.",offsetFailed:"Belirtilen taraf i\xE7in bir \xF6teleme e\u011Frisi olu\u015Fturulamad\u0131."},mtext:{point:"\xC7ok sat\u0131rl\u0131 metin ekleme noktas\u0131n\u0131 belirtin"},bmpout:{boundsFirstCorner:"S\u0131n\u0131rlar\u0131n ilk k\xF6\u015Fesini belirtin",boundsSecondCorner:"Kar\u015F\u0131 k\xF6\u015Feyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},jpgout:{boundsFirstCorner:"S\u0131n\u0131rlar\u0131n ilk k\xF6\u015Fesini belirtin",boundsSecondCorner:"Kar\u015F\u0131 k\xF6\u015Feyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},pngout:{boundsFirstCorner:"S\u0131n\u0131rlar\u0131n ilk k\xF6\u015Fesini belirtin",boundsSecondCorner:"Kar\u015F\u0131 k\xF6\u015Feyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},imageattach:{insertionPoint:"Ekleme noktas\u0131n\u0131 belirtin:",scale:"\xD6l\xE7ek fakt\xF6r\xFCn\xFC belirtin:",rotation:"D\xF6nd\xFCrme a\xE7\u0131s\u0131n\u0131 belirtin:",invalidScale:"\xD6l\xE7ek fakt\xF6r\xFC 0 dan b\xFCy\xFCk olmal\u0131d\u0131r.",decodeFailed:"Se\xE7ilen g\xF6r\xFCnt\xFC dosyas\u0131 okunamad\u0131."},insert:{blockName:"Blok ad\u0131n\u0131 girin:",insertionPoint:"Ekleme noktas\u0131n\u0131 belirtin:",scale:"\xD6l\xE7ek fakt\xF6r\xFCn\xFC belirtin:",rotation:"D\xF6nd\xFCrme a\xE7\u0131s\u0131n\u0131 belirtin:",invalidScale:"\xD6l\xE7ek fakt\xF6r\xFC 0 dan b\xFCy\xFCk olmal\u0131d\u0131r.",invalidBlockName:"Ge\xE7ersiz blok ad\u0131.",blockNotFound:"Blok bulunamad\u0131",xrefNotAllowed:"Harici referans -INSERT ile eklenemez."},xattach:{insertionPoint:"Ekleme noktas\u0131n\u0131 belirtin:",scale:"\xD6l\xE7ek fakt\xF6r\xFCn\xFC belirtin:",rotation:"D\xF6nd\xFCrme a\xE7\u0131s\u0131n\u0131 belirtin:",invalidScale:"\xD6l\xE7ek fakt\xF6r\xFC 0 dan b\xFCy\xFCk olmal\u0131d\u0131r.",unsupportedFile:"L\xFCtfen bir DWG veya DXF dosyas\u0131 se\xE7in.",loading:"Harici referans y\xFCkleniyor...",loadFailed:"Se\xE7ilen \xE7izim dosyas\u0131 okunamad\u0131."},point:{point:"Bir nokta belirtin"},polygon:{numberOfSides:"Kenar say\u0131s\u0131n\u0131 girin",centerOrEdge:"\xC7okgenin merkezini belirtin veya",radiusOrType:"Se\xE7enekleri girin",edgeStart:"Kenar\u0131n ilk u\xE7 noktas\u0131n\u0131 belirtin",edgeEnd:"Kenar\u0131n ikinci u\xE7 noktas\u0131n\u0131 belirtin",keywords:{edge:{display:"Kenar(K)",local:"Kenar",global:"Edge"},inscribed:{display:"\xC7embere i\xE7 te\u011Fet(\u0130)",local:"\xC7embere i\xE7 te\u011Fet",global:"Inscribed"},circumscribed:{display:"\xC7embere d\u0131\u015F te\u011Fet(D)",local:"\xC7embere d\u0131\u015F te\u011Fet",global:"Circumscribed"}},invalid:{sides:"Ge\xE7ersiz kenar say\u0131s\u0131. 3 ile 1024 aras\u0131nda bir tam say\u0131 girin.",radius:"Ge\xE7ersiz yar\u0131\xE7ap. Yar\u0131\xE7ap 0'dan b\xFCy\xFCk olmal\u0131d\u0131r.",edge:"Ge\xE7ersiz kenar. Kenar uzunlu\u011Fu 0'dan b\xFCy\xFCk olmal\u0131d\u0131r."}},polyline:{firstPoint:"\u0130lk noktay\u0131 belirtin",nextPoint:"Sonraki noktay\u0131 belirtin (bitirmek i\xE7in Enter'a bas\u0131n)",nextPointWithOptions:"Sonraki noktay\u0131 belirtin veya",nextPointWithArcOptions:"Sonraki noktay\u0131 belirtin veya",keywords:{arc:{display:"Yay(Y)",local:"Yay",global:"Arc"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},line:{display:"Do\u011Fru(D)",local:"Do\u011Fru",global:"Line"},angle:{display:"A\xE7\u0131(A)",local:"A\xE7\u0131",global:"Angle"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},secondPoint:{display:"\u0130kinci nokta(\u0130)",local:"\u0130kinci nokta",global:"SecondPoint"},radius:{display:"Yar\u0131\xE7ap(R)",local:"Yar\u0131\xE7ap",global:"Radius"}},arcAngle:"Yay a\xE7\u0131s\u0131n\u0131 belirtin",arcCenter:"Merkez noktas\u0131n\u0131 belirtin",arcSecondPoint:"Yay \xFCzerinde ikinci noktay\u0131 belirtin",arcEndPoint:"Yay\u0131n biti\u015F noktas\u0131n\u0131 belirtin",arcRadius:"Yay yar\u0131\xE7ap\u0131n\u0131 belirtin"},rect:{firstPoint:"\u0130lk k\xF6\u015Fe noktas\u0131n\u0131 belirtin",nextPoint:"Di\u011Fer k\xF6\u015Fe noktas\u0131n\u0131 belirtin",firstPointWithOptions:"\u0130lk k\xF6\u015Fe noktas\u0131n\u0131 belirtin veya",otherCornerWithOptions:"Di\u011Fer k\xF6\u015Fe noktas\u0131n\u0131 belirtin veya",chamferFirst:"\u0130lk pah mesafesini belirtin",chamferSecond:"\u0130kinci pah mesafesini belirtin",filletRadius:"Yuvarlatma yar\u0131\xE7ap\u0131n\u0131 belirtin",segmentWidth:"Dikd\xF6rtgen \xE7izgi geni\u015Fli\u011Fini belirtin",elevationValue:"Kotu belirtin",thicknessValue:"Kal\u0131nl\u0131\u011F\u0131 belirtin",rotationAngle:"Dikd\xF6rtgen d\xF6nd\xFCrme a\xE7\u0131s\u0131n\u0131 belirtin",dimensionLength:"Dikd\xF6rtgen uzunlu\u011Funu belirtin",dimensionWidth:"Dikd\xF6rtgen geni\u015Fli\u011Fini belirtin",areaValue:"Dikd\xF6rtgen alan\u0131n\u0131 belirtin",areaLengthOrWidth:"Dikd\xF6rtgen uzunlu\u011Funu belirtin",areaSpecifyWidth:"Dikd\xF6rtgen geni\u015Fli\u011Fini belirtin",invalidPositive:"Ge\xE7ersiz giri\u015F. L\xFCtfen 0'dan b\xFCy\xFCk bir de\u011Fer girin.",invalidRect:"Dikd\xF6rtgen olu\u015Fturulamad\u0131. L\xFCtfen ge\xE7erli k\xF6\u015Feler veya boyutlar belirtin.",thicknessNotSupported:"Dikd\xF6rtgen kal\u0131nl\u0131\u011F\u0131 \u015Fu anda nesne verisine yaz\u0131lm\u0131yor. Kal\u0131nl\u0131k ayar\u0131 yok say\u0131l\u0131yor.",keywords:{chamfer:{display:"Pah(P)",local:"Pah",global:"Chamfer"},elevation:{display:"Kot(K)",local:"Kot",global:"Elevation"},fillet:{display:"Yuvarlatma(Y)",local:"Yuvarlatma",global:"Fillet"},thickness:{display:"Kal\u0131nl\u0131k(K)",local:"Kal\u0131nl\u0131k",global:"Thickness"},width:{display:"Geni\u015Flik(G)",local:"Geni\u015Flik",global:"Width"},area:{display:"Alan(A)",local:"Alan",global:"Area"},dimensions:{display:"Boyutlar(B)",local:"Boyutlar",global:"Dimensions"},rotation:{display:"D\xF6nd\xFCrme(D)",local:"D\xF6nd\xFCrme",global:"Rotation"},length:{display:"Uzunluk(U)",local:"Uzunluk",global:"Length"},rectWidth:{display:"Geni\u015Flik(G)",local:"Geni\u015Flik",global:"Width"}}},rotate:{basePoint:"Temel noktay\u0131 belirtin",rotationAngleOrOptions:"D\xF6nd\xFCrme a\xE7\u0131s\u0131n\u0131 belirtin veya",referenceAngleOrPoints:"Referans a\xE7\u0131s\u0131n\u0131 belirtin veya",firstReferencePoint:"Referans a\xE7\u0131s\u0131n\u0131n ilk noktas\u0131n\u0131 belirtin",secondReferencePoint:"\u0130kinci noktay\u0131 belirtin",newAngle:"Yeni a\xE7\u0131y\u0131 belirtin",keywords:{copy:{display:"Kopyala(K)",local:"Kopyala",global:"Copy"},reference:{display:"Referans(R)",local:"Referans",global:"Reference"},points:{display:"Noktalar(N)",local:"Noktalar",global:"Points"}},invalid:{referencePoints:"Ge\xE7ersiz referans noktalar\u0131: noktalar farkl\u0131 olmal\u0131d\u0131r."}},revcloud:{firstCornerOrOptions:"\u0130lk k\xF6\u015Fe noktas\u0131n\u0131 belirtin veya",firstCorner:"\u0130lk k\xF6\u015Fe noktas\u0131n\u0131 belirtin",oppositeCorner:"Kar\u015F\u0131 k\xF6\u015Feyi belirtin",startPoint:"Ba\u015Flang\u0131\xE7 noktas\u0131n\u0131 belirtin",nextPoint:"Sonraki noktay\u0131 belirtin",nextPointOrUndo:"Sonraki noktay\u0131 belirtin veya",firstPoint:"\u0130lk noktay\u0131 belirtin",guideCursor:"\u0130mleci bulut yolu boyunca g\xF6t\xFCr\xFCn (bitirmek i\xE7in Enter)",arcLength:"Yay uzunlu\u011Funu belirtin",selectObject:"Nesne se\xE7in",style:"Revizyon bulutu yay stilini girin",reverseDirection:"Y\xF6n\xFC ters \xE7evir",invalidArcLength:"Yay uzunlu\u011Fu 0'dan b\xFCy\xFCk olmal\u0131d\u0131r.",invalidObject:"Se\xE7ilen nesne revizyon bulutuna d\xF6n\xFC\u015Ft\xFCr\xFClemez.",keywords:{arcLength:{display:"Yay uzunlu\u011Fu(A)",local:"Yay uzunlu\u011Fu",global:"ArcLength"},object:{display:"Nesne(O)",local:"Nesne",global:"Object"},rectangular:{display:"Dikd\xF6rtgen(R)",local:"Dikd\xF6rtgen",global:"Rectangular"},polygonal:{display:"\xC7okgen(P)",local:"\xC7okgen",global:"Polygonal"},freehand:{display:"Serbest(F)",local:"Serbest",global:"Freehand"},style:{display:"Stil(S)",local:"Stil",global:"Style"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},calligraphy:{display:"Kaligrafi(C)",local:"Kaligrafi",global:"Calligraphy"},undo:{display:"Geri al(U)",local:"Geri al",global:"Undo"},yes:{display:"Evet(Y)",local:"Evet",global:"Yes"},no:{display:"Hay\u0131r(N)",local:"Hay\u0131r",global:"No"}}},sketch:{specifySketch:"Eskizi belirtin veya",sketching:"Eskiz i\xE7in i\u015Faret\xE7iyi hareket ettirin (durdurmak i\xE7in t\u0131klay\u0131n veya Enter)",type:"Eskiz t\xFCr\xFCn\xFC girin",increment:"Eskiz art\u0131\u015F\u0131n\u0131 belirtin",tolerance:"Spline tolerans\u0131n\u0131 belirtin",firstPoint:"\u0130lk noktay\u0131 belirtin",nextPoint:"Biti\u015F noktas\u0131n\u0131 belirtin",keywords:{type:{display:"T\xFCr(T)",local:"T\xFCr",global:"Type"},increment:{display:"Art\u0131\u015F(I)",local:"Art\u0131\u015F",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"\xC7izgiler(L)",local:"\xC7izgiler",global:"Lines"},polyline:{display:"\xC7oklu \xE7izgi(P)",local:"\xC7oklu \xE7izgi",global:"Polyline"},spline:{display:"Spline(S)",local:"Spline",global:"Spline"}}},spline:{firstPoint:"\u0130lk noktay\u0131 belirtin",nextPoint:"Sonraki noktay\u0131 belirtin (bitirmek i\xE7in Enter'a bas\u0131n)",firstPointWithOptions:"\u0130lk noktay\u0131 belirtin veya",nextPointWithFitOptions:"Sonraki noktay\u0131 belirtin veya",nextPointWithCvOptions:"Sonraki kontrol noktas\u0131n\u0131 belirtin veya",methodPrompt:"Spline olu\u015Fturma y\xF6ntemini girin",knotsPrompt:"D\xFC\u011F\xFCm parametrelemesini girin",degreePrompt:"Spline derecesini belirtin",keywords:{method:{display:"Y\xF6ntem(Y)",local:"Y\xF6ntem",global:"Method"},fit:{display:"Uydur(U)",local:"Uydur",global:"Fit"},cv:{display:"KN(K)",local:"KN",global:"CV"},knots:{display:"D\xFC\u011F\xFCmler(D)",local:"D\xFC\u011F\xFCmler",global:"Knots"},degree:{display:"Derece(D)",local:"Derece",global:"Degree"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},chord:{display:"Kiri\u015F(K)",local:"Kiri\u015F",global:"Chord"},sqrtChord:{display:"Karek\xF6k kiri\u015F(K)",local:"Karek\xF6k kiri\u015F",global:"SqrtChord"},uniform:{display:"D\xFCzg\xFCn(D)",local:"D\xFCzg\xFCn",global:"Uniform"}}},sysvar:{prompt:"L\xFCtfen yeni de\u011Feri girin"},zoom:{mainPrompt:"Pencerenin k\xF6\u015Fesini belirtin veya",firstCorner:"\u0130lk k\xF6\u015Feyi belirtin",secondCorner:"Kar\u015F\u0131 k\xF6\u015Feyi belirtin",centerPoint:"Merkez noktas\u0131n\u0131 belirtin",heightOrScale:"Y\xFCkseklik veya \xF6l\xE7ek fakt\xF6r\xFCn\xFC girin (nX veya nXP)",scaleFactor:"\xD6l\xE7ek fakt\xF6r\xFCn\xFC girin (nX veya nXP)",keywords:{all:{display:"T\xFCm\xFC(T)",local:"T\xFCm\xFC",global:"All"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},previous:{display:"\xD6nceki(\xD6)",local:"\xD6nceki",global:"Previous"},original:{display:"Orijinal(O)",local:"Orijinal",global:"Original"},saved:{display:"Kay\u0131tl\u0131(V)",local:"Kay\u0131tl\u0131",global:"Saved"},smart:{display:"Ak\u0131ll\u0131(I)",local:"Ak\u0131ll\u0131",global:"Smart"},scale:{display:"\xD6l\xE7ek(\xD6)",local:"\xD6l\xE7ek",global:"Scale"},window:{display:"Pencere(P)",local:"Pencere",global:"Window"}}},chtml:{exportFormat:"D\u0131\u015Fa aktarma bi\xE7imi",exportInvisibleLayers:"G\xF6r\xFCnmez katmanlar\u0131 d\u0131\u015Fa aktar",exportLayouts:"Yerle\u015Fimleri d\u0131\u015Fa aktar",initialView:"HTML a\xE7\u0131l\u0131rken ba\u015Flang\u0131\xE7 g\xF6r\xFCn\xFCm\xFC",viewerMode:"\xC7evrimd\u0131\u015F\u0131 g\xF6r\xFCnt\xFCleyici modu",chunkSizeMiB:"Par\xE7a boyutu (MiB, \xE7ok dosyal\u0131 paket)",compressChunks:"Par\xE7alar\u0131 s\u0131k\u0131\u015Ft\u0131r (\xE7ok dosyal\u0131 paket)",keywords:{single:{display:"Tek dosya(S)",local:"Tek dosya",global:"Single"},multi:{display:"\xC7ok dosyal\u0131 paket(M)",local:"\xC7ok dosyal\u0131 paket",global:"Multi"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hay\u0131r(H)",local:"Hay\u0131r",global:"No"},extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},current:{display:"Ge\xE7erli(G)",local:"Ge\xE7erli",global:"Current"},view:{display:"G\xF6r\xFCn\xFCm(G)",local:"G\xF6r\xFCn\xFCm",global:"View"},measure:{display:"\xD6l\xE7\xFCm ve \u0130nceleme(\xD6)",local:"\xD6l\xE7\xFCm ve \u0130nceleme",global:"Measure"}}},cpdf:{modelSpaceFit:"Model alan\u0131 \xE7er\xE7evesi",exportLayouts:"Yerle\u015Fimleri d\u0131\u015Fa aktar",textMode:"Metin i\u015Fleme",keywords:{extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},display:{display:"G\xF6r\xFCnt\xFC(G)",local:"G\xF6r\xFCnt\xFC",global:"Display"},text:{display:"Metin(M)",local:"Metin",global:"Text"},vector:{display:"Vekt\xF6r(V)",local:"Vekt\xF6r",global:"Vector"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hay\u0131r(H)",local:"Hay\u0131r",global:"No"}}}},b3e={document:{untitled:"Ads\u0131z"},commandLine:{noLast:"(\xF6nceki komut yok)",unknownCommand:"Bilinmeyen komut",executed:"Komut \xE7al\u0131\u015Ft\u0131r\u0131ld\u0131",showHistory:"Komut ge\xE7mi\u015Fini g\xF6ster",placeholder:"Komut girin",showMessages:"Mesaj ge\xE7mi\u015Fini g\xF6ster",canceled:"*\u0130ptal edildi*",noHistory:"(ge\xE7mi\u015F yok)",invalidInput:"Ge\xE7ersiz giri\u015F.",close:"Komut sat\u0131r\u0131n\u0131 kapat"},mobileCommand:{length:"Uzunluk",angle:"A\xE7\u0131",dx:"\u0394X",dy:"\u0394Y",x:"X",y:"Y",confirm:"Onayla",cancel:"\u0130ptal",help:"Yard\u0131m",back:"Geri",collapse:"Daralt",expand:"Geni\u015Flet"},inputManager:{firstCorner:"\u0130lk k\xF6\u015Feyi belirtin veya",secondCorner:"\u0130kinci k\xF6\u015Feyi belirtin veya"},message:{fetchingDrawingFile:"Dosya al\u0131n\u0131yor ...",exportingDxf:"DXF d\u0131\u015Fa aktar\u0131l\u0131yor ...",exportingPdf:"PDF d\u0131\u015Fa aktar\u0131l\u0131yor ...",exportingSvg:"SVG d\u0131\u015Fa aktar\u0131l\u0131yor ...",calculatingSmartExtents:"Ak\u0131ll\u0131 s\u0131n\u0131rlar hesaplan\u0131yor ...",importingPdf:"PDF i\xE7e aktar\u0131l\u0131yor ...",exportingEntityPreview:"G\xF6r\xFCnt\xFC d\u0131\u015Fa aktar\u0131l\u0131yor ...",collectingMemoryProfile:"Bellek analiz ediliyor ...",fontCached:"Yaz\u0131 tipi ba\u015Far\u0131yla \xF6nbelle\u011Fe al\u0131nd\u0131",fontCacheFailed:"Yaz\u0131 tipi \xF6nbelle\u011Fe al\u0131namad\u0131",fontsNotFound:"Yaz\u0131 tipi deposunda bulunamad\u0131: {fonts}.",fontsNotLoaded:"Yaz\u0131 tipleri y\xFCklenemedi: {fonts}.",fontMissedInDrawing:'"{font}" yaz\u0131 tipi {count} metin nesnesi taraf\u0131ndan gerekli, ancak kullan\u0131lam\u0131yor. "{replacementFont}" ile g\xF6steriliyor.',fontMissedReplacement:'"{font}" ("{replacement}" ile g\xF6steriliyor)',failedToGetAvaiableFonts:'"{url}" adresinden yaz\u0131 tipleri al\u0131namad\u0131!',failedToOpenFile:'"{fileName}" dosyas\u0131 a\xE7\u0131lamad\u0131!',failedToOpenFileToast:'"{fileName}" a\xE7\u0131lamad\u0131. Ayr\u0131nt\u0131lar i\xE7in bildirim merkezine bak\u0131n.',failedToOpenFileWorkerOom:'"{fileName}" a\xE7\u0131lamad\u0131. Ayr\u0131\u015Ft\u0131rma, yetersiz bellek nedeniyle ba\u015Far\u0131s\u0131z oldu (LibreDWG parser). B\xFCy\xFCk \xE7izimleri \xE7\xF6kmeden a\xE7mak i\xE7in ticari DWG parser sat\u0131n almak \xFCzere {dwgParserLink} ba\u011Flant\u0131s\u0131na t\u0131klayabilirsiniz.',failedToOpenFileWorkerOomLink:"bu sayfa",failedToOpenFileWorkerTimeout:'"{fileName}" a\xE7\u0131lamad\u0131. \xC7izim ayr\u0131\u015Ft\u0131r\u0131l\u0131rken i\u015Flem zaman a\u015F\u0131m\u0131na u\u011Frad\u0131.',failedToOpenFileFontLoadFailed:'"{fileName}" a\xE7\u0131lamad\u0131. Gerekli yaz\u0131 tipleri y\xFCklenemedi.',failedToOpenFileLicenseExpired:'"{fileName}" a\xE7\u0131lamad\u0131. DWG d\xF6n\xFC\u015Ft\xFCr\xFCc\xFC lisans\u0131 s\xFCresi dolmu\u015F.',failedToOpenFileLicenseInvalid:'"{fileName}" a\xE7\u0131lamad\u0131. DWG d\xF6n\xFC\u015Ft\xFCr\xFCc\xFC lisans\u0131 eksik veya ge\xE7ersiz.',unknownEntities:"Bu \xE7izim {count} bilinmeyen veya desteklenmeyen varl\u0131k i\xE7eriyor! Bu varl\u0131klar g\xF6sterilmeyecek.",tianzhengEntities:"Bu \xE7izim TArch / Tianzheng (veya benzeri \xFC\xE7\xFCnc\xFC taraf) \xF6zel varl\u0131klar i\xE7eriyor (yakla\u015F\u0131k {count}). Bu ortamda tam olarak ayr\u0131\u015Ft\u0131r\u0131lamazlar, bu nedenle baz\u0131 i\xE7erikler g\xF6r\xFCnt\xFClenmeyebilir.",emptyProxyEntities:"Bu \xE7izim proxy grafi\u011Fi olmayan {count} \xF6zel varl\u0131k i\xE7eriyor! Bu varl\u0131klar g\xF6sterilmeyecek."},notification:{center:{title:"Bildirimler",clearAll:"T\xFCm\xFCn\xFC Temizle",noNotifications:"Bildirim yok"},group:{fontMissed:"Eksik Yaz\u0131 Tipleri",fontMissedSummary:"{count} yaz\u0131 tipi ile ilgili mesaj. Ayr\u0131nt\u0131lar i\xE7in t\u0131klay\u0131n.",unsupportedEntities:"Desteklenmeyen Varl\u0131klar",unsupportedEntitiesSummary:"{count} ayr\u0131\u015Ft\u0131rma ile ilgili mesaj. Ayr\u0131nt\u0131lar i\xE7in t\u0131klay\u0131n.",genericSummary:"{count} mesaj. Ayr\u0131nt\u0131lar i\xE7in t\u0131klay\u0131n."},title:{failedToOpenFile:"Dosya A\xE7\u0131lamad\u0131",failedToOpenFileWorkerOom:"Yetersiz Bellek",failedToOpenFileWorkerTimeout:"A\xE7ma Zaman A\u015F\u0131m\u0131",failedToOpenFileFontLoadFailed:"Yaz\u0131 Tipi Y\xFCklenemedi",failedToOpenFileLicenseExpired:"Lisans S\xFCresi Doldu",failedToOpenFileLicenseInvalid:"Ge\xE7ersiz Lisans",fontNotFound:"Yaz\u0131 Tipi Bulunamad\u0131",fontNotLoaded:"Yaz\u0131 Tipi Y\xFCklenemedi",parsingWarning:"\xC7izim Ayr\u0131\u015Ft\u0131rma Sorunlar\u0131",systemMessage:"Sistem Mesaj\u0131",systemWarning:"Sistem Uyar\u0131s\u0131",systemError:"Sistem Hatas\u0131",systemInfo:"Sistem Bilgisi"}},progress:{start:"Dosya ayr\u0131\u015Ft\u0131rma ba\u015Flat\u0131l\u0131yor ...",parse:"Dosya ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",font:"Bu \xE7izim i\xE7in gerekli yaz\u0131 tipleri indiriliyor ...",ltype:"\xC7izgi tipleri ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",style:"Metin stilleri ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",dimstyle:"\xD6l\xE7\xFClendirme stilleri ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",layer:"Katmanlar ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",vport:"G\xF6r\xFCnt\xFC portlar\u0131 ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",blockrecord:"Blok kayd\u0131 ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",header:"Ba\u015Fl\u0131k ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",block:"Bloklar ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",entity:"Nesneler ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",object:"Adland\u0131r\u0131lm\u0131\u015F s\xF6zl\xFCkler ayr\u0131\u015Ft\u0131r\u0131l\u0131yor ...",rendering:"\xC7izim render ediliyor ...",end:"Tamamland\u0131!"},about:{title:"Hakk\u0131nda",close:"Kapat",product:"CAD Viewer",tagline:"DWG ve DXF \xE7izimleri i\xE7in y\xFCksek performansl\u0131 web CAD g\xF6r\xFCnt\xFCleyici.",website:"Web sitesi",docs:"Belgeler",repository:"GitHub",copyright:"\xA9 {year} mlightcad. T\xFCm haklar\u0131 sakl\u0131d\u0131r.",ok:"Tamam"},drawStyle:{color:"Renk",fontSize:"Yaz\u0131 y\xFCksekli\u011Fi"},shortCutToolbar:{more:"Daha fazla",undo:"Geri al",redo:"Yinele",erase:"Sil",collapse:"Ara\xE7 \xE7ubu\u011Funu daralt",expand:"Ara\xE7 \xE7ubu\u011Funu geni\u015Flet"},textHeight:{title:"Yaz\u0131 Y\xFCksekli\u011Fi",close:"Kapat",ok:"Tamam",cancel:"\u0130ptal",adaptive:"Ekrana uyarla",custom:"\xD6zel yaz\u0131 y\xFCksekli\u011Fi",customPlaceholder:"D\xFCnya y\xFCksekli\u011Fi",fromScreen:"Ekran boyutundan",fromScreenHint:"Ge\xE7erli yak\u0131nla\u015Ft\u0131rmada ekranda istedi\u011Finiz yaz\u0131 boyutunu girin. Sabit bir d\xFCnya y\xFCksekli\u011Fine d\xF6n\xFC\u015Ft\xFCr\xFCl\xFCr; sonra yak\u0131nla\u015Ft\u0131r\u0131nca bu y\xFCkseklik de\u011Fi\u015Fmez.",screenPxPlaceholder:"Yaz\u0131 boyutu",screenUnit:"px",convert:"D\xF6n\xFC\u015Ft\xFCr"},entityPick:{cancel:"Se\xE7imi iptal et"},colorPicker:{title:"Renk Se\xE7",close:"Kapat",ok:"Tamam",cancel:"\u0130ptal",index:"Renk \u0130ndeksi: ",rgb:"RGB: ",input:"Renk",inputPlaceholder:"1-255 veya #RRGGBB"},touchPointTutorial:{title:"Noktalar nas\u0131l hassas se\xE7ilir?",description:"Ekranda yakla\u015F\u0131k 0,5 saniye bas\u0131l\u0131 tutun. Parma\u011F\u0131n\u0131z\u0131n \xFCst\xFCnde bir art\u0131 belirir ve hareket ederken geometriye yap\u0131\u015Farak daha do\u011Fru se\xE7im yapman\u0131z\u0131 sa\u011Flar.",snoozeToday:"Bug\xFCn tekrar hat\u0131rlatma",hideForever:"Bir daha hat\u0131rlatma",ok:"Anlad\u0131m"},dataSource:{open:"A\xE7",local:"Yerel dosya",url:"URL'den",openFrom:"{name} konumundan a\xE7",signInTo:"{name} oturumu a\xE7",signOutOf:"{name} oturumunu kapat",signOutOfAccount:"{name} oturumunu kapat ({account})",urlDialogTitle:"URL'den a\xE7",urlDialogHint:".dwg veya .dxf dosyas\u0131n\u0131n URL'sini girin.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"\u0130ptal",onedrive:"OneDrive",googledrive:"Google Drive",or:"veya",dropFile:"Dosyay\u0131 buraya b\u0131rak\u0131n veya",browse:"g\xF6z at\u0131n",dropOrBrowse:"DWG veya DXF dosyas\u0131n\u0131 buraya b\u0131rak\u0131n veya g\xF6z at\u0131n",newDrawing:"Yeni \xE7izim",source:"Kaynak",unavailable:"Bu kaynak hen\xFCz kullan\u0131lam\u0131yor.",selectFile:"Dosya se\xE7",signInRequired:"Dosya se\xE7mek i\xE7in \xF6nce oturum a\xE7\u0131n.",downloading:"Dosya indiriliyor ..."}},v3e={ACAD:{"-hatch":{description:"\u901A\u8FC7\u547D\u4EE4\u884C\u9009\u9879\u521B\u5EFA\u586B\u5145\uFF0C\u4E0D\u663E\u793A Ribbon \u754C\u9762"},"-layer":{description:"\u901A\u8FC7\u547D\u4EE4\u884C\u9009\u9879\u7BA1\u7406\u56FE\u5C42"},about:{description:"\u663E\u793A mlightcad \u4EA7\u54C1\u4FE1\u606F"},acadver:{description:"\u5B58\u50A8\u56FE\u5F62\u6570\u636E\u5E93\u7248\u672C\u6807\u8BC6\u7B26\uFF08\u53EA\u8BFB\uFF09"},angbase:{description:"\u8BBE\u7F6E\u5F53\u524D UCS \u4E2D 0 \u5EA6\u7684\u57FA\u51C6\u89D2\u65B9\u5411"},angdir:{description:"\u8BBE\u7F6E\u6B63\u89D2\u5EA6\u7684\u65B9\u5411\u4E3A\u987A\u65F6\u9488\u6216\u9006\u65F6\u9488"},arc:{description:"\u521B\u5EFA\u5706\u5F27"},aunits:{description:"\u8BBE\u7F6E\u89D2\u5EA6\u663E\u793A\u683C\u5F0F"},auprec:{description:"\u8BBE\u7F6E\u89D2\u5EA6\u663E\u793A\u7CBE\u5EA6\uFF08\u5C0F\u6570\u4F4D\u6570\uFF09\uFF0C\u4E0E AUNITS \u914D\u5408\u4F7F\u7528"},bmpout:{description:"\u5BFC\u51FA\u4E3A BMP \u56FE\u7247"},cdxf:{description:"\u5BFC\u51FA\u5F53\u524D\u56FE\u7EB8\u4E3ADXF\u683C\u5F0F"},cpdf:{description:"\u5BFC\u51FA\u5F53\u524D\u56FE\u7EB8\u4E3APDF\u683C\u5F0F"},"-cpdf":{description:"\u4F7F\u7528\u547D\u4EE4\u884C\u9009\u9879\u5C06\u5F53\u524D\u56FE\u7EB8\u5BFC\u51FA\u4E3APDF"},cecolor:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u5BF9\u8C61\u7684\u5F53\u524D\u9ED8\u8BA4\u989C\u8272"},celtscale:{description:"\u63A7\u5236\u65B0\u521B\u5EFA\u5BF9\u8C61\u7684\u7EBF\u578B\u6BD4\u4F8B\u7CFB\u6570"},celtype:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u5BF9\u8C61\u7684\u7EBF\u578B"},celweight:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u5BF9\u8C61\u7684\u9ED8\u8BA4\u7EBF\u5BBD"},cetransparency:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u5BF9\u8C61\u7684\u900F\u660E\u5EA6"},cachefont:{description:"\u5C06\u672C\u5730\u5B57\u4F53\u6587\u4EF6\u7F13\u5B58\u5230 IndexedDB \u4EE5\u4F9B\u6587\u5B57\u6E32\u67D3\u4F7F\u7528"},circle:{description:"\u4F7F\u7528\u5706\u5FC3\u548C\u534A\u5F84\u521B\u5EFA\u5706"},clayer:{description:"\u8BBE\u7F6E\u65B0\u5EFA\u5BF9\u8C61\u548C\u7F16\u8F91\u64CD\u4F5C\u6240\u4F7F\u7528\u7684\u5F53\u524D\u56FE\u5C42"},cmleaderstyle:{description:"\u8BBE\u7F6E\u5F53\u524D\u591A\u91CD\u5F15\u7EBF\u6837\u5F0F\u540D\u79F0"},cmlscale:{description:"\u63A7\u5236\u591A\u7EBF\u7684\u6574\u4F53\u5BBD\u5EA6"},cmlstyle:{description:"\u8BBE\u7F6E\u5F53\u524D\u591A\u7EBF\u6837\u5F0F\u540D\u79F0"},colortheme:{description:"\u63A7\u5236\u7528\u6237\u754C\u9762\u7684\u989C\u8272\u4E3B\u9898\uFF08\u6DF1\u8272\u6216\u6D45\u8272\uFF09"},copy:{description:"\u901A\u8FC7\u514B\u9686\u5C06\u6240\u9009\u56FE\u5143\u590D\u5236\u5230\u65B0\u4F4D\u7F6E",prompt:"\u9009\u62E9\u5BF9\u8C61"},csvg:{description:"\u8F6C\u6362\u5F53\u524D\u56FE\u7EB8\u4E3ASVG\u683C\u5F0F"},chtml:{description:"\u5C06\u5F53\u524D\u56FE\u7EB8\u5BFC\u51FA\u4E3A\u53EF\u79BB\u7EBF\u6253\u5F00\u7684 HTML \u6587\u4EF6"},"-chtml":{description:"\u901A\u8FC7\u547D\u4EE4\u884C\u9009\u9879\u5C06\u5F53\u524D\u56FE\u7EB8\u5BFC\u51FA\u4E3A HTML \u6587\u4EF6"},dimlinear:{description:"\u521B\u5EFA\u7EBF\u6027\u5C3A\u5BF8\u6807\u6CE8"},dimstyle:{description:"\u8BBE\u7F6E\u5F53\u524D\u6807\u6CE8\u6837\u5F0F\u7684\u540D\u79F0"},dwgname:{description:"\u5B58\u50A8\u5F53\u524D\u56FE\u5F62\u6587\u4EF6\u7684\u540D\u79F0\uFF08\u53EA\u8BFB\uFF09"},loginname:{description:"\u663E\u793A\u5F53\u524D\u7528\u6237\u7684\u767B\u5F55\u540D\uFF08\u53EA\u8BFB\uFF09"},dynmode:{description:"\u63A7\u5236\u5149\u6807\u5904\u7684\u52A8\u6001\u8F93\u5165\u8BBE\u7F6E"},dynprompt:{description:"\u63A7\u5236\u52A8\u6001\u8F93\u5165\u5DE5\u5177\u63D0\u793A\u4E2D\u63D0\u793A\u7684\u663E\u793A"},ellipse:{description:"\u901A\u8FC7\u8F74\u7AEF\u70B9\u6216\u4E2D\u5FC3\u70B9\u521B\u5EFA\u692D\u5706\u6216\u692D\u5706\u5F27"},erase:{description:"\u4ECE\u56FE\u7EB8\u4E2D\u5220\u9664\u6240\u9009\u5BF9\u8C61",prompt:"\u9009\u62E9\u5BF9\u8C61"},extmax:{description:"\u5B58\u50A8\u6A21\u578B\u7A7A\u95F4\u56FE\u5F62\u8303\u56F4\u7684\u53F3\u4E0A\u89D2\uFF08\u53EA\u8BFB\uFF09"},extmin:{description:"\u5B58\u50A8\u6A21\u578B\u7A7A\u95F4\u56FE\u5F62\u8303\u56F4\u7684\u5DE6\u4E0B\u89D2\uFF08\u53EA\u8BFB\uFF09"},entout:{description:"\u5BFC\u51FA\u6240\u9009\u5BF9\u8C61\u7684\u5408\u5E76\u9884\u89C8\u56FE",prompt:"\u9009\u62E9\u5BF9\u8C61"},hideobjects:{description:"\u4E34\u65F6\u9690\u85CF\u6240\u9009\u5BF9\u8C61\u7684\u663E\u793A",prompt:"\u9009\u62E9\u5BF9\u8C61"},imageattach:{description:"\u5C06\u5149\u6805\u56FE\u50CF\u4F5C\u4E3A\u5916\u90E8\u53C2\u7167\u9644\u7740\u5230\u5F53\u524D\u56FE\u5F62"},"-insert":{description:"\u5C06\u5757\u5B9A\u4E49\u63D2\u5165\u5230\u5F53\u524D\u56FE\u5F62\uFF08\u547D\u4EE4\u884C\uFF09"},xattach:{description:"\u5C06 DWG \u6216 DXF \u56FE\u5F62\u4F5C\u4E3A\u5916\u90E8\u53C2\u7167\u9644\u7740\u5230\u5F53\u524D\u56FE\u5F62"},gripcolor:{description:"\u8BBE\u7F6E\u6240\u9009\u5BF9\u8C61\u4E0A\u672A\u9009\u4E2D\u5939\u70B9\u7684\u989C\u8272"},griphot:{description:"\u8BBE\u7F6E\u6240\u9009\uFF08\u70ED\uFF09\u5939\u70B9\u7684\u989C\u8272"},gripobjlimit:{description:"\u5F53\u9009\u62E9\u96C6\u4E2D\u7684\u5BF9\u8C61\u6570\u8D85\u8FC7\u6307\u5B9A\u503C\u65F6\u4E0D\u663E\u793A\u5939\u70B9\uFF080 \u8868\u793A\u65E0\u9650\u5236\uFF09"},grips:{description:"\u63A7\u5236\u662F\u5426\u5728\u6240\u9009\u5BF9\u8C61\u4E0A\u663E\u793A\u5939\u70B9"},gripsize:{description:"\u8BBE\u7F6E\u5939\u70B9\u6846\u7684\u5927\u5C0F\uFF08\u50CF\u7D20\uFF09"},hatch:{description:"\u7528\u586B\u5145\u56FE\u6848\u586B\u5145\u5C01\u95ED\u533A\u57DF\u6216\u6240\u9009\u5BF9\u8C61"},ipdf:{description:"\u4ECE PDF \u6587\u4EF6\u5BFC\u5165\u77E2\u91CF\u51E0\u4F55"},hpang:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u586B\u5145\u56FE\u6848\u7684\u9ED8\u8BA4\u89D2\u5EA6\uFF08\u5F27\u5EA6\uFF09"},hpassoc:{description:"\u63A7\u5236\u65B0\u521B\u5EFA\u7684\u586B\u5145\u662F\u5426\u5177\u6709\u5173\u8054\u6027"},hpbackgroundcolor:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u586B\u5145\u56FE\u6848\u7684\u9ED8\u8BA4\u80CC\u666F\u989C\u8272"},hpcolor:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u586B\u5145\u7684\u9ED8\u8BA4\u989C\u8272"},hpdouble:{description:"\u63A7\u5236\u7528\u6237\u5B9A\u4E49\u7684\u586B\u5145\u56FE\u6848\u662F\u5426\u52A0\u500D"},hpislanddetection:{description:"\u63A7\u5236\u65B0\u521B\u5EFA\u586B\u5145\u8FB9\u754C\u5185\u5B64\u5C9B\u7684\u5904\u7406\u65B9\u5F0F"},hplayer:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u586B\u5145\u548C\u586B\u5145\u533A\u57DF\u7684\u9ED8\u8BA4\u56FE\u5C42"},hpname:{description:"\u8BBE\u7F6E\u5F53\u524D\u4F1A\u8BDD\u4E2D\u65B0\u521B\u5EFA\u586B\u5145\u7684\u9ED8\u8BA4\u56FE\u6848\u540D\u79F0"},hpscale:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u586B\u5145\u56FE\u6848\u7684\u9ED8\u8BA4\u6BD4\u4F8B\u7CFB\u6570"},hpseparate:{description:"\u63A7\u5236\u4E3A\u591A\u4E2A\u8FB9\u754C\u521B\u5EFA\u5355\u4E2A\u8FD8\u662F\u72EC\u7ACB\u7684\u586B\u5145\u5BF9\u8C61"},hptransparency:{description:"\u8BBE\u7F6E\u65B0\u521B\u5EFA\u586B\u5145\u548C\u586B\u5145\u533A\u57DF\u7684\u9ED8\u8BA4\u900F\u660E\u5EA6"},insunits:{description:"\u6307\u5B9A\u63D2\u5165\u5757\u3001\u56FE\u50CF\u6216\u5916\u90E8\u53C2\u7167\u65F6\u7528\u4E8E\u81EA\u52A8\u7F29\u653E\u7684\u56FE\u5F62\u5355\u4F4D"},jpgout:{description:"\u5BFC\u51FA\u4E3A JPEG \u56FE\u7247"},laycur:{description:"\u5C06\u6240\u9009\u5BF9\u8C61\u7684\u56FE\u5C42\u5C5E\u6027\u66F4\u6539\u4E3A\u5F53\u524D\u56FE\u5C42",prompt:"\u9009\u62E9\u8981\u66F4\u6539\u5230\u5F53\u524D\u56FE\u5C42\u7684\u5BF9\u8C61"},laydel:{description:"\u5220\u9664\u56FE\u5C42\u53CA\u8BE5\u56FE\u5C42\u4E0A\u7684\u6240\u6709\u5BF9\u8C61"},layerclose:{description:"\u5173\u95ED\u56FE\u5C42\u5C5E\u6027\u7BA1\u7406\u5668"},layerp:{description:"\u64A4\u9500\u5BF9\u56FE\u5C42\u8BBE\u7F6E\u7684\u6700\u540E\u4E00\u6B21\u66F4\u6539\u6216\u4E00\u7EC4\u66F4\u6539"},layfrz:{description:"\u51BB\u7ED3\u6240\u9009\u5BF9\u8C61\u6240\u5728\u7684\u56FE\u5C42",prompt:"\u9009\u62E9\u8981\u51BB\u7ED3\u5176\u56FE\u5C42\u7684\u5BF9\u8C61"},layiso:{description:"\u9694\u79BB\u6240\u9009\u5BF9\u8C61\u6240\u5728\u7684\u56FE\u5C42",prompt:"\u9009\u62E9\u8981\u9694\u79BB\u5176\u56FE\u5C42\u7684\u5BF9\u8C61"},laylck:{description:"\u9501\u5B9A\u6240\u9009\u5BF9\u8C61\u6240\u5728\u7684\u56FE\u5C42",prompt:"\u9009\u62E9\u8981\u9501\u5B9A\u5176\u56FE\u5C42\u7684\u5BF9\u8C61"},layoff:{description:"\u5173\u95ED\u6240\u9009\u5BF9\u8C61\u6240\u5728\u7684\u56FE\u5C42",prompt:"\u9009\u62E9\u8981\u5173\u95ED\u5176\u56FE\u5C42\u7684\u5BF9\u8C61"},layon:{description:"\u6253\u5F00\u56FE\u7EB8\u4E2D\u7684\u6240\u6709\u56FE\u5C42"},laythw:{description:"\u89E3\u51BB\u56FE\u7EB8\u4E2D\u7684\u6240\u6709\u51BB\u7ED3\u56FE\u5C42"},layulk:{description:"\u89E3\u9501\u6240\u9009\u5BF9\u8C61\u6240\u5728\u7684\u56FE\u5C42",prompt:"\u9009\u62E9\u8981\u89E3\u9501\u5176\u56FE\u5C42\u7684\u5BF9\u8C61"},layuniso:{description:"\u6062\u590D\u7531 LAYISO \u9690\u85CF\u6216\u9501\u5B9A\u7684\u56FE\u5C42"},line:{description:"\u5728\u6307\u5B9A\u70B9\u4E4B\u95F4\u7ED8\u5236\u76F4\u7EBF\u6BB5"},log:{description:"\u5728\u63A7\u5236\u53F0\u8F93\u51FA\u8C03\u8BD5\u4FE1\u606F"},ltscale:{description:"\u8BBE\u7F6E\u56FE\u5F62\u7684\u5168\u5C40\u7EBF\u578B\u6BD4\u4F8B\u7CFB\u6570"},lunits:{description:"\u8BBE\u7F6E\u5750\u6807\u548C\u8DDD\u79BB\u7684\u663E\u793A\u683C\u5F0F"},luprec:{description:"\u8BBE\u7F6E\u7EBF\u6027\u5355\u4F4D\u7684\u663E\u793A\u7CBE\u5EA6\uFF08\u5C0F\u6570\u4F4D\u6570\uFF09\uFF0C\u4E0E LUNITS \u914D\u5408\u4F7F\u7528"},lwdisplay:{description:"\u7528\u4E8E\u63A7\u5236\u662F\u5426\u5728\u56FE\u7EB8\u4E2D\u663E\u793A\u7EBF\u5BBD\u6548\u679C"},clearmeasurements:{description:"\u6E05\u9664\u5F53\u524D\u5E03\u5C40\u4E0A\u7684\u6240\u6709\u6D4B\u91CF\u6807\u6CE8"},measurementvis:{description:"\u663E\u793A\u6216\u9690\u85CF\u5F53\u524D\u5E03\u5C40\u4E0A\u7684\u6D4B\u91CF\u6807\u6CE8"},measurementpanel:{description:"\u6253\u5F00\u6D4B\u91CF\u9762\u677F"},measurementexport:{description:"\u5C06\u6D4B\u91CF\u6807\u6CE8\u5BFC\u51FA\u4E3A sidecar JSON \u6587\u4EF6"},measurementimport:{description:"\u4ECE sidecar JSON \u6587\u4EF6\u5BFC\u5165\u6D4B\u91CF\u6807\u6CE8"},measurearea:{description:"\u8BA1\u7B97\u6240\u9009\u5BF9\u8C61\u6216\u70B9\u5B9A\u4E49\u533A\u57DF\u7684\u9762\u79EF\u548C\u5468\u957F"},measureangle:{description:"\u6D4B\u91CF\u4E24\u6761\u7EBF\u6216\u4E09\u4E2A\u70B9\u4E4B\u95F4\u7684\u5939\u89D2"},measurearc:{description:"\u6D4B\u91CF\u5706\u5F27\u6BB5\u7684\u5F27\u957F"},measuredistance:{description:"\u6D4B\u91CF\u4E24\u70B9\u4E4B\u95F4\u7684\u8DDD\u79BB\u53CA\u5750\u6807\u589E\u91CF"},measurecontinuous:{description:"\u8FDE\u7EED\u62FE\u53D6\u591A\u4E2A\u70B9\u6D4B\u91CF\u5404\u6BB5\u8DDD\u79BB\uFF0C\u76F4\u5230\u6309 Enter \u6216\u53D6\u6D88"},measurepoint:{description:"\u6D4B\u91CF\u62FE\u53D6\u70B9\u7684 X/Y \u5750\u6807"},measurement:{description:"\u8BBE\u7F6E\u56FE\u5F62\u4F7F\u7528\u82F1\u5236\u6216\u516C\u5236\u5355\u4F4D"},measurementcolor:{description:"\u8BBE\u7F6E\u6D4B\u91CF\u6807\u6CE8\u8986\u76D6\u56FE\u5F62\u4F7F\u7528\u7684\u989C\u8272"},modelbkcolor:{description:"\u8BBE\u7F6E\u6A21\u578B\u7A7A\u95F4\u7ED8\u56FE\u533A\u57DF\u7684\u80CC\u666F\u989C\u8272"},mline:{description:"\u521B\u5EFA\u7531\u591A\u6761\u5E73\u884C\u7EBF\u7EC4\u6210\u7684\u591A\u7EBF\u5BF9\u8C61"},move:{description:"\u901A\u8FC7\u4F4D\u79FB\u5411\u91CF\u79FB\u52A8\u6240\u9009\u56FE\u5143",prompt:"\u9009\u62E9\u5BF9\u8C61"},offset:{description:"\u6309\u6307\u5B9A\u8DDD\u79BB\u521B\u5EFA\u5E73\u884C\u66F2\u7EBF\u3001\u591A\u6BB5\u7EBF\u6216\u5706"},mtext:{description:"\u521B\u5EFA\u591A\u884C\u6587\u672C"},open:{description:"\u6253\u5F00\u56FE\u7EB8"},openprof:{description:"\u63A7\u5236\u662F\u5426\u5728\u63A7\u5236\u53F0\u8BB0\u5F55\u6587\u4EF6\u6253\u5F00\u9636\u6BB5\u7684\u8017\u65F6\u5206\u6790"},openperf:{description:"\u6253\u5F00\u201C\u6253\u5F00\u6027\u80FD\u201D\u9762\u677F\uFF0C\u663E\u793A\u6700\u8FD1\u4E00\u6B21\u6253\u5F00\u56FE\u7EB8\u7684\u5173\u952E\u8017\u65F6"},orthomode:{description:"\u5C06\u5149\u6807\u79FB\u52A8\u9650\u5236\u4E3A\u6C34\u5E73\u6216\u5782\u76F4\u65B9\u5411"},osmode:{description:"\u4F7F\u7528\u4F4D\u7801\u8BBE\u7F6E\u8FD0\u884C\u4E2D\u7684\u5BF9\u8C61\u6355\u6349\u6A21\u5F0F"},pan:{description:"\u5E73\u79FB\u89C6\u56FE"},paperbkcolor:{description:"\u8BBE\u7F6E\u56FE\u7EB8\u7A7A\u95F4\uFF08\u5E03\u5C40\uFF09\u7ED8\u56FE\u533A\u57DF\u7684\u80CC\u666F\u989C\u8272"},pdmode:{description:"\u63A7\u5236\u70B9\u5BF9\u8C61\u7684\u663E\u793A\u6837\u5F0F"},pdsize:{description:"\u8BBE\u7F6E\u70B9\u5BF9\u8C61\u7684\u663E\u793A\u5927\u5C0F"},pickbox:{description:"\u63A7\u5236\u7528\u4E8E\u9009\u62E9\u5BF9\u8C61\u7684\u62FE\u53D6\u6846\u5927\u5C0F\uFF08\u50CF\u7D20\uFF09"},pline:{description:"\u901A\u8FC7\u6307\u5B9A\u591A\u4E2A\u70B9\u521B\u5EFA\u591A\u6BB5\u7EBF"},pngout:{description:"\u5BFC\u51FA\u4E3A PNG \u56FE\u7247"},point:{description:"\u8FDE\u7EED\u521B\u5EFA\u70B9"},polaraddang:{description:"\u4EE5\u5206\u53F7\u5206\u9694\u7684\u5217\u8868\u5B58\u50A8\u9644\u52A0\u6781\u8F74\u8FFD\u8E2A\u89D2\u5EA6"},polarang:{description:"\u8BBE\u7F6E\u6781\u8F74\u8FFD\u8E2A\u7684\u6781\u8F74\u89D2\u589E\u91CF"},polarmode:{description:"\u63A7\u5236\u6781\u8F74\u8FFD\u8E2A\u548C\u5BF9\u8C61\u6355\u6349\u8FFD\u8E2A\u8BBE\u7F6E"},polygon:{description:"\u901A\u8FC7\u4E2D\u5FC3\u548C\u534A\u5F84\u6216\u6307\u5B9A\u4E00\u6761\u8FB9\u521B\u5EFA\u6B63\u591A\u8FB9\u5F62"},qnew:{description:"\u521B\u5EFA\u65B0\u56FE\u7EB8"},close:{description:"\u5173\u95ED\u5F53\u524D\u56FE\u7EB8"},ray:{description:"\u521B\u5EFA\u4ECE\u8D77\u70B9\u5411\u5355\u4E00\u65B9\u5411\u65E0\u9650\u5EF6\u4F38\u7684\u5C04\u7EBF"},rectang:{description:"\u901A\u8FC7\u6307\u5B9A\u4E24\u4E2A\u5BF9\u89D2\u70B9\u521B\u5EFA\u77E9\u5F62"},regen:{description:"\u91CD\u7ED8\u56FE\u7EB8"},revcloud:{description:"\u521B\u5EFA\u6216\u4FEE\u6539\u4FEE\u8BA2\u4E91\u7EBF"},markuptext:{description:"\u653E\u7F6E\u6587\u5B57\u6279\u6CE8"},markupline:{description:"\u521B\u5EFA\u76F4\u7EBF\u6279\u6CE8"},markuparrow:{description:"\u521B\u5EFA\u7BAD\u5934\u6279\u6CE8"},markupcloud:{description:"\u521B\u5EFA\u4FEE\u8BA2\u4E91\u7EBF\u6279\u6CE8"},markuprect:{description:"\u521B\u5EFA\u77E9\u5F62\u6279\u6CE8"},markupcircle:{description:"\u521B\u5EFA\u5706\u5F62\u6279\u6CE8"},markuphighlight:{description:"\u521B\u5EFA\u9AD8\u4EAE\u77E9\u5F62\u6279\u6CE8"},markupcallout:{description:"\u521B\u5EFA\u6807\u6CE8\uFF1A\u5148\u6307\u5B9A\u5F15\u7EBF\u5C16\u7AEF\uFF0C\u518D\u653E\u7F6E\u6587\u5B57\u6846\uFF0C\u6700\u540E\u8F93\u5165\u6587\u5B57"},markupstamp:{description:"\u653E\u7F6E\u56FE\u7AE0\u6216\u81EA\u5B9A\u4E49\u7B26\u53F7"},markupvis:{description:"\u663E\u793A\u6216\u9690\u85CF\u6279\u6CE8"},clearmarkups:{description:"\u6E05\u9664\u5F53\u524D\u5E03\u5C40\u4E0A\u7684\u6240\u6709\u6279\u6CE8"},markupexport:{description:"\u5C06\u6279\u6CE8\u5BFC\u51FA\u4E3A sidecar JSON \u6587\u4EF6"},markupimport:{description:"\u4ECE sidecar JSON \u6587\u4EF6\u5BFC\u5165\u6279\u6CE8"},markuppanel:{description:"\u6253\u5F00\u6279\u6CE8\u9762\u677F"},rotate:{description:"\u7ED5\u57FA\u70B9\u65CB\u8F6C\u6240\u9009\u56FE\u5143",prompt:"\u9009\u62E9\u5BF9\u8C61"},select:{description:"\u9009\u62E9\u56FE\u5143"},shortcutmenu:{description:"\u63A7\u5236\u56FE\u5F62\u533A\u57DF\u4E2D\u5FEB\u6377\u83DC\u5355\u7684\u53EF\u7528\u6027"},sketch:{description:"\u521B\u5EFA\u4E00\u7CFB\u5217\u5F92\u624B\u7EBF\u6BB5"},spline:{description:"\u901A\u8FC7\u6307\u5B9A\u63A7\u5236\u70B9\u521B\u5EFA\u5E73\u6ED1\u7684\u6837\u6761\u66F2\u7EBF"},textstyle:{description:"\u8BBE\u7F6E\u5F53\u524D\u6587\u5B57\u6837\u5F0F\u7684\u540D\u79F0"},unitmode:{description:"\u5F53 LUNITS \u4E3A\u5EFA\u7B51\u6216\u5206\u6570\u683C\u5F0F\u65F6\uFF0C\u63A7\u5236\u5750\u6807\u7684\u5206\u6570\u663E\u793A\u683C\u5F0F"},switchbg:{description:"\u5207\u6362\u7ED8\u56FE\u533A\u57DF\u80CC\u666F\u989C\u8272\uFF0C\u5728\u767D\u8272\u548C\u9ED1\u8272\u80CC\u666F\u4E4B\u95F4\u5207\u6362"},readingmode:{description:"\u5207\u6362\u9605\u8BFB\u6A21\u5F0F\uFF1A\u767D\u5E95\u9ED1\u7EBF\uFF0C\u4FBF\u4E8E\u9605\u8BFB\u590D\u6742\u56FE\u7EB8"},unisolateobjects:{description:"\u91CD\u65B0\u663E\u793A HIDEOBJECTS \u9690\u85CF\u7684\u6240\u6709\u5BF9\u8C61"},undo:{description:"\u64A4\u9500\u4E0A\u4E00\u6B21\u6570\u636E\u5E93\u7F16\u8F91\u64CD\u4F5C",nothingToUndo:"\u6CA1\u6709\u53EF\u64A4\u9500\u7684\u64CD\u4F5C\u3002"},redo:{description:"\u91CD\u505A\u4E0A\u4E00\u6B21\u64A4\u9500\u7684\u64CD\u4F5C",nothingToRedo:"\u6CA1\u6709\u53EF\u91CD\u505A\u7684\u64CD\u4F5C\u3002"},xline:{description:"\u521B\u5EFA\u5728\u4E24\u4E2A\u65B9\u5411\u4E0A\u65E0\u9650\u5EF6\u4F38\u7684\u6784\u9020\u7EBF"},zoom:{description:"\u7F29\u653E\u4EE5\u663E\u793A\u6240\u6709\u5BF9\u8C61"}},USER:{}},x3e={arc:{startPointOrCenter:"\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9\u6216",secondPointOrOptions:"\u6307\u5B9A\u5706\u5F27\u4E0A\u7684\u7B2C\u4E8C\u70B9\u6216",secondPoint:"\u6307\u5B9A\u5706\u5F27\u4E0A\u7684\u7B2C\u4E8C\u70B9",startPoint:"\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9",centerPoint:"\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3",endPoint:"\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9",endPointOrOptions:"\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9\u6216",centerPointOrOptions:"\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3\u6216",includedAngle:"\u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2",chordLength:"\u6307\u5B9A\u5706\u5F27\u7684\u5F26\u957F",tangentDirection:"\u6307\u5B9A\u5706\u5F27\u8D77\u70B9\u7684\u5207\u7EBF\u65B9\u5411",radius:"\u6307\u5B9A\u5706\u5F27\u7684\u534A\u5F84",keywords:{center:{display:"\u5706\u5FC3(C)",local:"\u5706\u5FC3",global:"Center"},end:{display:"\u7AEF\u70B9(E)",local:"\u7AEF\u70B9",global:"End"},angle:{display:"\u89D2\u5EA6(A)",local:"\u89D2\u5EA6",global:"Angle"},chordLength:{display:"\u5F26\u957F(L)",local:"\u5F26\u957F",global:"ChordLength"},direction:{display:"\u65B9\u5411(D)",local:"\u65B9\u5411",global:"Direction"},radius:{display:"\u534A\u5F84(R)",local:"\u534A\u5F84",global:"Radius"}},invalid:{threePoint:"\u4E09\u70B9\u5706\u5F27\u65E0\u6548\uFF1A\u4E09\u70B9\u5171\u7EBF\u6216\u65E0\u6CD5\u786E\u5B9A\u5706\u5F27\u3002",center:"\u5706\u5FC3\u8F93\u5165\u65E0\u6548\uFF1A\u8D77\u70B9\u4E0E\u7EC8\u70B9\u5FC5\u987B\u5728\u540C\u4E00\u5706\u4E0A\u3002",angle:"\u89D2\u5EA6\u8F93\u5165\u65E0\u6548\uFF1A\u5939\u89D2\u5FC5\u987B\u5927\u4E8E 0 \u4E14\u5C0F\u4E8E 360 \u5EA6\u3002",chordLength:"\u5F26\u957F\u8F93\u5165\u65E0\u6548\uFF1A\u8BE5\u503C\u8D85\u51FA\u5F53\u524D\u534A\u5F84\u53EF\u7528\u8303\u56F4\u3002",direction:"\u65B9\u5411\u8F93\u5165\u65E0\u6548\uFF1A\u65E0\u6CD5\u6839\u636E\u8BE5\u5207\u7EBF\u65B9\u5411\u6784\u9020\u5706\u5F27\u3002",radius:"\u534A\u5F84\u8F93\u5165\u65E0\u6548\uFF1A\u6307\u5B9A\u534A\u5F84\u65E0\u6CD5\u8FDE\u63A5\u8D77\u70B9\u4E0E\u7EC8\u70B9\u3002"}},circle:{center:"\u6307\u5B9A\u5706\u7684\u5706\u5FC3",centerOrOptions:"\u6307\u5B9A\u5706\u7684\u5706\u5FC3\u6216",radius:"\u6307\u5B9A\u5706\u7684\u534A\u5F84",radiusOrDiameter:"\u6307\u5B9A\u5706\u7684\u534A\u5F84\u6216",diameter:"\u6307\u5B9A\u5706\u7684\u76F4\u5F84",twoPointFirst:"\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9",twoPointSecond:"\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9",threePointFirst:"\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9",threePointSecond:"\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9",threePointThird:"\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9",keywords:{threeP:{display:"\u4E09\u70B9(3P)",local:"\u4E09\u70B9",global:"3P"},twoP:{display:"\u4E24\u70B9(2P)",local:"\u4E24\u70B9",global:"2P"},diameter:{display:"\u76F4\u5F84(D)",local:"\u76F4\u5F84",global:"Diameter"}}},copy:{basePointOrOptions:"\u6307\u5B9A\u57FA\u70B9\u6216",displacementOrArray:"\u6307\u5B9A\u4F4D\u79FB\u6216",secondPointOrArray:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9\u6216",modePrompt:"\u8F93\u5165\u590D\u5236\u6A21\u5F0F\u9009\u9879",arrayItemCount:"\u8F93\u5165\u9635\u5217\u4E2D\u7684\u9879\u76EE\u6570\uFF08\u5305\u62EC\u539F\u5BF9\u8C61\uFF09",arraySecondPointOrFit:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9\u6216",arrayFitSecondPoint:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9",keywords:{displacement:{display:"\u4F4D\u79FB(D)",local:"\u4F4D\u79FB",global:"Displacement"},mode:{display:"\u6A21\u5F0F(O)",local:"\u6A21\u5F0F",global:"Mode"},multiple:{display:"\u591A\u4E2A(M)",local:"\u591A\u4E2A",global:"Multiple"},single:{display:"\u5355\u4E2A(S)",local:"\u5355\u4E2A",global:"Single"},array:{display:"\u9635\u5217(A)",local:"\u9635\u5217",global:"Array"},fit:{display:"\u5E03\u6EE1(F)",local:"\u5E03\u6EE1",global:"Fit"}}},dimlinear:{xLine1Point:"\u6307\u5B9A\u7B2C\u4E00\u6761\u5C3A\u5BF8\u754C\u9650\u539F\u70B9",xLine2Point:"\u6307\u5B9A\u7B2C\u4E8C\u6761\u5C3A\u5BF8\u754C\u9650\u539F\u70B9",dimLinePoint:"\u6307\u5B9A\u5C3A\u5BF8\u7EBF\u4F4D\u7F6E"},ellipse:{axisEndpointOrOptions:"\u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9\u6216",arcAxisEndpointOrCenter:"\u6307\u5B9A\u692D\u5706\u5F27\u7684\u8F74\u7AEF\u70B9\u6216",center:"\u6307\u5B9A\u692D\u5706\u4E2D\u5FC3\u70B9",firstAxisEndpoint:"\u6307\u5B9A\u8F74\u7684\u7AEF\u70B9",secondAxisEndpoint:"\u6307\u5B9A\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9",otherAxisOrRotation:"\u6307\u5B9A\u5230\u53E6\u4E00\u8F74\u7684\u8DDD\u79BB\u6216",rotationAngle:"\u6307\u5B9A\u7ED5\u957F\u8F74\u7684\u65CB\u8F6C\u89D2\u5EA6",arcStartAngle:"\u6307\u5B9A\u692D\u5706\u5F27\u8D77\u59CB\u89D2",arcEndAngle:"\u6307\u5B9A\u692D\u5706\u5F27\u7EC8\u6B62\u89D2",keywords:{arc:{display:"\u5706\u5F27(A)",local:"\u5706\u5F27",global:"Arc"},center:{display:"\u4E2D\u5FC3\u70B9(C)",local:"\u4E2D\u5FC3\u70B9",global:"Center"},rotation:{display:"\u65CB\u8F6C(R)",local:"\u65CB\u8F6C",global:"Rotation"}},invalid:{axis:"\u8F74\u8F93\u5165\u65E0\u6548\uFF1A\u8F74\u957F\u5FC5\u987B\u5927\u4E8E 0\u3002",otherAxis:"\u53E6\u4E00\u8F74\u8F93\u5165\u65E0\u6548\uFF1A\u8DDD\u79BB\u5FC5\u987B\u5927\u4E8E 0\u3002",rotation:"\u65CB\u8F6C\u8F93\u5165\u65E0\u6548\uFF1A\u8BA1\u7B97\u5F97\u5230\u7684\u77ED\u8F74\u5FC5\u987B\u5927\u4E8E 0\u3002"}},hatch:{prompt:"\u9009\u62E9\u8FB9\u754C\u5BF9\u8C61\u6216",pickPoint:"\u6307\u5B9A\u5185\u90E8\u70B9\uFF08\u6216\u6309 Enter \u7ED3\u675F\uFF09",select:"\u9009\u62E9\u8981\u586B\u5145\u7684\u5BF9\u8C61",patternName:"\u8F93\u5165\u586B\u5145\u56FE\u6848\u540D\u79F0",scale:"\u6307\u5B9A\u586B\u5145\u56FE\u6848\u6BD4\u4F8B",angle:"\u6307\u5B9A\u586B\u5145\u56FE\u6848\u89D2\u5EA6",style:"\u8F93\u5165\u586B\u5145\u6837\u5F0F",associative:"\u6307\u5B9A\u5173\u8054\u6027",invalidBoundary:"\u6240\u9009\u5BF9\u8C61\u65E0\u6CD5\u6784\u6210\u95ED\u5408\u8FB9\u754C\u3002",keywords:{pick:{display:"\u62FE\u53D6\u70B9(P)",local:"\u62FE\u53D6\u70B9",global:"PickPoints"},select:{display:"\u9009\u62E9\u5BF9\u8C61(S)",local:"\u9009\u62E9\u5BF9\u8C61",global:"SelectObjects"},cancel:{display:"\u653E\u5F03(C)",local:"\u653E\u5F03",global:"Cancel"},pattern:{display:"\u56FE\u6848(P)",local:"\u56FE\u6848",global:"Pattern"},scale:{display:"\u6BD4\u4F8B(S)",local:"\u6BD4\u4F8B",global:"Scale"},angle:{display:"\u89D2\u5EA6(A)",local:"\u89D2\u5EA6",global:"Angle"},style:{display:"\u6837\u5F0F(T)",local:"\u6837\u5F0F",global:"HatchStyle"},associative:{display:"\u5173\u8054(AS)",local:"\u5173\u8054",global:"AssociativeMode"},normal:{display:"\u666E\u901A(N)",local:"\u666E\u901A",global:"Normal"},outer:{display:"\u5916\u90E8(O)",local:"\u5916\u90E8",global:"Outer"},ignore:{display:"\u5FFD\u7565(I)",local:"\u5FFD\u7565",global:"Ignore"},yes:{display:"\u662F(Y)",local:"\u662F",global:"Yes"},no:{display:"\u5426(N)",local:"\u5426",global:"No"}}},hideobjects:{hidden:"\u4E2A\u5BF9\u8C61\u5DF2\u9690\u85CF",restored:"\u4E2A\u5BF9\u8C61\u5DF2\u6062\u590D\u663E\u793A",nothingToRestore:"\u6CA1\u6709\u53EF\u6062\u590D\u663E\u793A\u7684\u5BF9\u8C61"},entout:{longSidePrompt:"\u8F93\u5165\u9884\u89C8\u56FE\u957F\u8FB9\u50CF\u7D20\u5C3A\u5BF8",exported:"\u4E2A\u5BF9\u8C61\u9884\u89C8\u5DF2\u5BFC\u51FA",skipped:"\u4E2A\u5BF9\u8C61\u5DF2\u8DF3\u8FC7",failed:{"no-preview-root":"\u65E0\u6CD5\u4E3A\u6240\u9009\u5BF9\u8C61\u6784\u5EFA\u9884\u89C8\u51E0\u4F55","no-bounds":"\u65E0\u6CD5\u8BA1\u7B97\u6240\u9009\u5BF9\u8C61\u7684\u9884\u89C8\u8303\u56F4","capture-failed":"\u65E0\u6CD5\u6E32\u67D3\u5B9E\u4F53\u9884\u89C8\u56FE","download-failed":"\u9884\u89C8\u5DF2\u6E32\u67D3\uFF0C\u4F46 PNG \u4E0B\u8F7D\u5931\u8D25"}},layer:{main:"\u8F93\u5165\u9009\u9879",listSummary:"\u56FE\u5C42\u5217\u8868\u5DF2\u8F93\u51FA\u5230\u6D4F\u89C8\u5668\u63A7\u5236\u53F0",emptyInput:"\u672A\u8F93\u5165\u56FE\u5C42\u540D\u3002",newPrompt:"\u8F93\u5165\u65B0\u5EFA\u56FE\u5C42\u540D\u79F0\uFF08\u53EF\u7528\u9017\u53F7\u5206\u9694\u591A\u4E2A\uFF09",makePrompt:"\u8F93\u5165\u8981\u521B\u5EFA\u5E76\u8BBE\u4E3A\u5F53\u524D\u7684\u56FE\u5C42\u540D",setPrompt:"\u8F93\u5165\u8981\u8BBE\u4E3A\u5F53\u524D\u7684\u56FE\u5C42\u540D",onPrompt:"\u8F93\u5165\u8981\u6253\u5F00\u7684\u56FE\u5C42\u540D",offPrompt:"\u8F93\u5165\u8981\u5173\u95ED\u7684\u56FE\u5C42\u540D",freezePrompt:"\u8F93\u5165\u8981\u51BB\u7ED3\u7684\u56FE\u5C42\u540D",thawPrompt:"\u8F93\u5165\u8981\u89E3\u51BB\u7684\u56FE\u5C42\u540D",lockPrompt:"\u8F93\u5165\u8981\u9501\u5B9A\u7684\u56FE\u5C42\u540D",unlockPrompt:"\u8F93\u5165\u8981\u89E3\u9501\u7684\u56FE\u5C42\u540D",colorLayerPrompt:"\u8F93\u5165\u8981\u4FEE\u6539\u989C\u8272\u7684\u56FE\u5C42\u540D",colorValuePrompt:"\u8F93\u5165\u989C\u8272\uFF08ACI 1-255\u3001RGB \u5982 255,0,0 \u6216\u989C\u8272\u540D\uFF09",invalidColor:"\u989C\u8272\u8F93\u5165\u65E0\u6548\u3002",descriptionLayerPrompt:"\u8F93\u5165\u8981\u4FEE\u6539\u8BF4\u660E\u7684\u56FE\u5C42\u540D",descriptionValuePrompt:"\u8F93\u5165\u65B0\u7684\u56FE\u5C42\u8BF4\u660E",created:"\u5DF2\u521B\u5EFA\u56FE\u5C42\u6570\u91CF",alreadyExists:"\u56FE\u5C42\u5DF2\u5B58\u5728",notFound:"\u672A\u627E\u5230\u56FE\u5C42",cannotChangeCurrent:"\u4E0D\u80FD\u5173\u95ED\u6216\u51BB\u7ED3\u5F53\u524D\u56FE\u5C42\u3002",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"\u521B\u5EFA\u5E76\u7F6E\u4E3A\u5F53\u524D(M)",local:"\u521B\u5EFA\u5E76\u7F6E\u4E3A\u5F53\u524D",global:"Make"},set:{display:"\u7F6E\u4E3A\u5F53\u524D(S)",local:"\u7F6E\u4E3A\u5F53\u524D",global:"Set"},new:{display:"\u65B0\u5EFA(N)",local:"\u65B0\u5EFA",global:"New"},on:{display:"\u6253\u5F00(ON)",local:"\u6253\u5F00",global:"On"},off:{display:"\u5173\u95ED(OF)",local:"\u5173\u95ED",global:"Off"},color:{display:"\u989C\u8272(C)",local:"\u989C\u8272",global:"Color"},freeze:{display:"\u51BB\u7ED3(F)",local:"\u51BB\u7ED3",global:"Freeze"},thaw:{display:"\u89E3\u51BB(T)",local:"\u89E3\u51BB",global:"Thaw"},lock:{display:"\u9501\u5B9A(L)",local:"\u9501\u5B9A",global:"Lock"},unlock:{display:"\u89E3\u9501(U)",local:"\u89E3\u9501",global:"Unlock"},description:{display:"\u8BF4\u660E(D)",local:"\u8BF4\u660E",global:"Description"}}},layon:{alreadyOn:"\u6240\u6709\u56FE\u5C42\u90FD\u5DF2\u7ECF\u6253\u5F00\u3002",turnedOn:"\u5DF2\u6253\u5F00\u56FE\u5C42\u6570\u91CF"},laycur:{prompt:"\u9009\u62E9\u8981\u66F4\u6539\u5230\u5F53\u524D\u56FE\u5C42\u7684\u5BF9\u8C61",currentLayerNotFound:"\u672A\u627E\u5230\u5F53\u524D\u56FE\u5C42\u3002",noObjects:"\u6CA1\u6709\u9009\u62E9\u6709\u6548\u5BF9\u8C61\u3002",alreadyCurrent:"\u6240\u9009\u5BF9\u8C61\u5DF2\u4F4D\u4E8E\u5F53\u524D\u56FE\u5C42\u3002",changed:"\u5DF2\u5C06\u5BF9\u8C61\u66F4\u6539\u5230\u5F53\u524D\u56FE\u5C42"},layfrz:{prompt:"\u9009\u62E9\u8981\u51BB\u7ED3\u5176\u56FE\u5C42\u7684\u5BF9\u8C61\u6216",invalidSelection:"\u6240\u9009\u5BF9\u8C61\u65E0\u6548\u3002",settingsPrompt:"\u8F93\u5165\u8981\u4FEE\u6539\u7684 LAYFRZ \u8BBE\u7F6E",viewportPrompt:"\u6307\u5B9A\u89C6\u53E3\u51BB\u7ED3\u884C\u4E3A",blockSelectionPrompt:"\u6307\u5B9A\u5D4C\u5957\u5757\u9009\u62E9\u884C\u4E3A",vpfreezeFallback:"\u5F53\u524D viewer \u4E0D\u652F\u6301\u6309\u89C6\u53E3\u51BB\u7ED3\u56FE\u5C42\uFF0C\u5DF2\u9000\u5316\u4E3A\u666E\u901A Freeze \u884C\u4E3A\u3002",nestedSelectionLimited:"\u5D4C\u5957\u5757\u9009\u62E9\u8BBE\u7F6E\u4F1A\u88AB\u4FDD\u5B58\uFF0C\u4F46\u5F53\u524D\u62FE\u53D6\u4ECD\u53EA\u80FD\u89E3\u6790\u9876\u5C42\u5BF9\u8C61\u6240\u5728\u56FE\u5C42\u3002",layerNotFound:"\u672A\u627E\u5230\u56FE\u5C42",cannotFreezeCurrent:"\u4E0D\u80FD\u51BB\u7ED3\u5F53\u524D\u56FE\u5C42\u3002",alreadyFrozen:"\u56FE\u5C42\u5DF2\u5904\u4E8E\u51BB\u7ED3\u72B6\u6001",frozen:"\u5DF2\u51BB\u7ED3\u56FE\u5C42",restored:"\u5DF2\u6062\u590D\u56FE\u5C42",nothingToUndo:"\u5F53\u524D\u6CA1\u6709\u53EF\u64A4\u9500\u7684 LAYFRZ \u64CD\u4F5C\u3002",keywords:{settings:{display:"\u8BBE\u7F6E(S)",local:"\u8BBE\u7F6E",global:"Settings"},undo:{display:"\u653E\u5F03(U)",local:"\u653E\u5F03",global:"Undo"},viewports:{display:"\u89C6\u53E3(V)",local:"\u89C6\u53E3",global:"Viewports"},blockSelection:{display:"\u5757\u9009\u62E9(B)",local:"\u5757\u9009\u62E9",global:"BlockSelection"},freeze:{display:"\u51BB\u7ED3(F)",local:"\u51BB\u7ED3",global:"Freeze"},vpfreeze:{display:"\u89C6\u53E3\u51BB\u7ED3(V)",local:"\u89C6\u53E3\u51BB\u7ED3",global:"Vpfreeze"},block:{display:"\u5757(B)",local:"\u5757",global:"Block"},entity:{display:"\u5BF9\u8C61(E)",local:"\u5BF9\u8C61",global:"Entity"},none:{display:"\u65E0(N)",local:"\u65E0",global:"None"}}},layiso:{prompt:"\u9009\u62E9\u8981\u9694\u79BB\u5176\u56FE\u5C42\u7684\u5BF9\u8C61\u6216",settingsPrompt:"\u8F93\u5165\u672A\u9694\u79BB\u56FE\u5C42\u7684\u5904\u7406\u8BBE\u7F6E",offModePrompt:"\u8F93\u5165\u672A\u9694\u79BB\u56FE\u5C42\u7684\u5173\u95ED\u884C\u4E3A",noLayers:"\u672A\u9009\u62E9\u6709\u6548\u56FE\u5C42\u3002",layerNotFound:"\u672A\u627E\u5230\u56FE\u5C42",isolated:"\u5DF2\u9694\u79BB\u56FE\u5C42",affectedLayers:"\u53D7\u5F71\u54CD\u56FE\u5C42\u6570",vpfreezeFallback:"\u5F53\u524D viewer \u4E0D\u652F\u6301\u6309\u89C6\u53E3\u51BB\u7ED3\u56FE\u5C42\uFF0C\u5DF2\u9000\u5316\u4E3A\u666E\u901A Off \u884C\u4E3A\u3002",lockFadeFallback:"\u5F53\u524D viewer \u4E0D\u652F\u6301\u56FE\u5C42\u6DE1\u663E\u663E\u793A\uFF0C\u672A\u9694\u79BB\u56FE\u5C42\u5C06\u4EC5\u88AB\u9501\u5B9A\u3002",keywords:{settings:{display:"\u8BBE\u7F6E(S)",local:"\u8BBE\u7F6E",global:"Settings"},off:{display:"\u5173\u95ED(O)",local:"\u5173\u95ED",global:"Off"},lockAndFade:{display:"\u9501\u5B9A\u5E76\u6DE1\u663E(L)",local:"\u9501\u5B9A\u5E76\u6DE1\u663E",global:"LockAndFade"},vpfreeze:{display:"\u89C6\u53E3\u51BB\u7ED3(V)",local:"\u89C6\u53E3\u51BB\u7ED3",global:"Vpfreeze"}}},laythw:{alreadyThawed:"\u6240\u6709\u56FE\u5C42\u90FD\u5DF2\u7ECF\u89E3\u51BB\u3002",thawed:"\u5DF2\u89E3\u51BB\u56FE\u5C42\u6570\u91CF"},layuniso:{noPrevious:"\u6CA1\u6709\u53EF\u6062\u590D\u7684\u4E0A\u4E00\u6B21 LAYISO \u56FE\u5C42\u72B6\u6001\u3002",layerNotFound:"\u672A\u627E\u5230\u56FE\u5C42",nothingRestored:"\u6CA1\u6709\u6062\u590D\u4EFB\u4F55 LAYISO \u56FE\u5C42\u6539\u52A8\u3002",restored:"\u5DF2\u6062\u590D\u56FE\u5C42\u6570\u91CF"},laylck:{prompt:"\u9009\u62E9\u8981\u9501\u5B9A\u5176\u56FE\u5C42\u7684\u5BF9\u8C61",invalidSelection:"\u6240\u9009\u5BF9\u8C61\u65E0\u6548\u3002",layerNotFound:"\u672A\u627E\u5230\u56FE\u5C42",alreadyLocked:"\u56FE\u5C42\u5DF2\u5904\u4E8E\u9501\u5B9A\u72B6\u6001",locked:"\u5DF2\u9501\u5B9A\u56FE\u5C42"},layulk:{prompt:"\u9009\u62E9\u8981\u89E3\u9501\u5176\u56FE\u5C42\u7684\u5BF9\u8C61",invalidSelection:"\u6240\u9009\u5BF9\u8C61\u65E0\u6548\u3002",layerNotFound:"\u672A\u627E\u5230\u56FE\u5C42",alreadyUnlocked:"\u56FE\u5C42\u5DF2\u5904\u4E8E\u89E3\u9501\u72B6\u6001",unlocked:"\u5DF2\u89E3\u9501\u56FE\u5C42"},layoff:{prompt:"\u9009\u62E9\u8981\u5173\u95ED\u5176\u56FE\u5C42\u7684\u5BF9\u8C61\u6216",invalidSelection:"\u6240\u9009\u5BF9\u8C61\u65E0\u6548\u3002",settingsPrompt:"\u8F93\u5165\u8981\u4FEE\u6539\u7684 LAYOFF \u8BBE\u7F6E",viewportPrompt:"\u6307\u5B9A\u89C6\u53E3\u884C\u4E3A",blockSelectionPrompt:"\u6307\u5B9A\u5D4C\u5957\u5757\u9009\u62E9\u884C\u4E3A",vpfreezeFallback:"\u5F53\u524D viewer \u4E0D\u652F\u6301\u6309\u89C6\u53E3\u5173\u95ED\u56FE\u5C42\uFF0C\u5DF2\u9000\u5316\u4E3A\u666E\u901A Off \u884C\u4E3A\u3002",nestedSelectionLimited:"\u5D4C\u5957\u5757\u9009\u62E9\u8BBE\u7F6E\u4F1A\u88AB\u4FDD\u5B58\uFF0C\u4F46\u5F53\u524D\u62FE\u53D6\u4ECD\u53EA\u80FD\u89E3\u6790\u9876\u5C42\u5BF9\u8C61\u6240\u5728\u56FE\u5C42\u3002",layerNotFound:"\u672A\u627E\u5230\u56FE\u5C42",cannotTurnOffCurrent:"\u4E0D\u80FD\u5173\u95ED\u5F53\u524D\u56FE\u5C42\u3002",alreadyOff:"\u56FE\u5C42\u5DF2\u5904\u4E8E\u5173\u95ED\u72B6\u6001",turnedOff:"\u5DF2\u5173\u95ED\u56FE\u5C42",restored:"\u5DF2\u6062\u590D\u56FE\u5C42",nothingToUndo:"\u5F53\u524D\u6CA1\u6709\u53EF\u64A4\u9500\u7684 LAYOFF \u64CD\u4F5C\u3002",keywords:{settings:{display:"\u8BBE\u7F6E(S)",local:"\u8BBE\u7F6E",global:"Settings"},undo:{display:"\u653E\u5F03(U)",local:"\u653E\u5F03",global:"Undo"},viewports:{display:"\u89C6\u53E3(V)",local:"\u89C6\u53E3",global:"Viewports"},blockSelection:{display:"\u5757\u9009\u62E9(B)",local:"\u5757\u9009\u62E9",global:"BlockSelection"},off:{display:"\u5173\u95ED(O)",local:"\u5173\u95ED",global:"Off"},vpfreeze:{display:"\u89C6\u53E3\u51BB\u7ED3(V)",local:"\u89C6\u53E3\u51BB\u7ED3",global:"Vpfreeze"},block:{display:"\u5757(B)",local:"\u5757",global:"Block"},entity:{display:"\u5BF9\u8C61(E)",local:"\u5BF9\u8C61",global:"Entity"},none:{display:"\u65E0(N)",local:"\u65E0",global:"None"}}},layerp:{restored:"\u6062\u590D\u4E86\u4E4B\u524D\u7684\u56FE\u5C42\u72B6\u6001\u3002",noPreviousState:"\u6CA1\u6709\u53EF\u6062\u590D\u7684\u5148\u524D\u56FE\u5C42\u72B6\u6001\u3002"},line:{firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",firstPointOrContinue:"\u8BF7\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9\u6216",nextPoint:"\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9",nextPointWithOptions:"\u8BF7\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\u6216",keywords:{continue:{display:"\u7EE7\u7EED(C)",local:"\u7EE7\u7EED",global:"Continue"},undo:{display:"\u653E\u5F03(U)",local:"\u653E\u5F03",global:"Undo"},close:{display:"\u95ED\u5408(C)",local:"\u95ED\u5408",global:"Close"}}},xline:{firstPointOrOptions:"\u6307\u5B9A\u70B9\u6216",secondPoint:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9",throughPoint:"\u6307\u5B9A\u7A7F\u8FC7\u70B9",angle:"\u8F93\u5165\u6784\u9020\u7EBF\u89D2\u5EA6",invalidDirection:"XLINE \u7684\u65B9\u5411\u65E0\u6548\u3002",keywords:{hor:{display:"\u6C34\u5E73(H)",local:"\u6C34\u5E73",global:"Hor"},ver:{display:"\u5782\u76F4(V)",local:"\u5782\u76F4",global:"Ver"},ang:{display:"\u89D2\u5EA6(A)",local:"\u89D2\u5EA6",global:"Ang"}}},ray:{startPoint:"\u6307\u5B9A\u8D77\u70B9",throughPoint:"\u6307\u5B9A\u901A\u8FC7\u70B9"},mline:{startPointWithOptions:"\u6307\u5B9A\u8D77\u70B9\u6216",nextPointWithOptions:"\u6307\u5B9A\u4E0B\u4E00\u70B9\u6216",justificationPrompt:"\u8F93\u5165\u5BF9\u6B63\u65B9\u5F0F",scalePrompt:"\u6307\u5B9A\u591A\u7EBF\u6BD4\u4F8B",stylePrompt:"\u8F93\u5165\u591A\u7EBF\u6837\u5F0F\u540D\u6216 [?] \u5217\u51FA\u6837\u5F0F",styleNotFound:"\u672A\u627E\u5230\u591A\u7EBF\u6837\u5F0F",styleListHeader:"\u5DF2\u52A0\u8F7D\u7684\u591A\u7EBF\u6837\u5F0F",styleListEmpty:"\u5F53\u524D\u56FE\u7EB8\u6CA1\u6709\u5DF2\u52A0\u8F7D\u7684\u591A\u7EBF\u6837\u5F0F\u3002",keywords:{justification:{display:"\u5BF9\u6B63(J)",local:"\u5BF9\u6B63",global:"Justification"},scale:{display:"\u6BD4\u4F8B(S)",local:"\u6BD4\u4F8B",global:"Scale"},style:{display:"\u6837\u5F0F(ST)",local:"\u6837\u5F0F",global:"Style"},undo:{display:"\u653E\u5F03(U)",local:"\u653E\u5F03",global:"Undo"},close:{display:"\u95ED\u5408(C)",local:"\u95ED\u5408",global:"Close"},top:{display:"\u4E0A(T)",local:"\u4E0A",global:"Top"},zero:{display:"\u96F6(Z)",local:"\u96F6",global:"Zero"},bottom:{display:"\u4E0B(B)",local:"\u4E0B",global:"Bottom"}}},measureArc:{startPoint:"\u6307\u5B9A\u5F27\u7684\u8D77\u70B9",throughPoint:"\u6307\u5B9A\u5F27\u4E0A\u7684\u4E00\u4E2A\u70B9",endPoint:"\u6307\u5B9A\u5F27\u7684\u7EC8\u70B9",lockedEndPoint:"\u6307\u5B9A\u5F27\u7684\u7EC8\u70B9\uFF08\u6309 Ctrl \u5728\u5927\u5F27\u4E0E\u5C0F\u5F27\u4E4B\u95F4\u5207\u6362\uFF09",invalidPoints:"\u4E09\u70B9\u5171\u7EBF\uFF0C\u65E0\u6CD5\u6D4B\u91CF\u5F27\u957F\u3002"},measureAngle:{vertex:"\u6307\u5B9A\u9876\u70B9",arm1:"\u6307\u5B9A\u7B2C\u4E00\u6761\u8FB9\u4E0A\u7684\u70B9",arm2:"\u6307\u5B9A\u7B2C\u4E8C\u6761\u8FB9\u4E0A\u7684\u70B9"},measureArea:{firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",nextPoint:"\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\uFF08\u6216\u6309 Enter \u5B8C\u6210\uFF09"},measureDistance:{firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",secondPoint:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9"},measureContinuous:{firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",nextPoint:"\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\uFF08\u6216\u6309 Enter \u5B8C\u6210\uFF09"},measurePoint:{point:"\u6307\u5B9A\u70B9"},measurement:{import:{chooseFile:"\u9009\u62E9\u6D4B\u91CF sidecar JSON \u6587\u4EF6"}},markup:{author:"\u6307\u5B9A\u6279\u6CE8\u4F5C\u8005\uFF08\u5C06\u4FDD\u5B58\u4F9B\u4EE5\u540E\u4F7F\u7528\uFF09",text:{point:"\u6307\u5B9A\u6587\u5B57\u6279\u6CE8\u70B9",content:"\u8F93\u5165\u6279\u6CE8\u6587\u5B57"},line:{firstPoint:"\u6307\u5B9A\u76F4\u7EBF\u6279\u6CE8\u7684\u7B2C\u4E00\u70B9",secondPoint:"\u6307\u5B9A\u76F4\u7EBF\u6279\u6CE8\u7684\u7B2C\u4E8C\u70B9"},arrow:{firstPoint:"\u6307\u5B9A\u7BAD\u5934\u8D77\u70B9",secondPoint:"\u6307\u5B9A\u7BAD\u5934\u5C16\u7AEF"},cloud:{firstCorner:"\u6307\u5B9A\u4E91\u7EBF\u7684\u7B2C\u4E00\u4E2A\u89D2\u70B9",secondCorner:"\u6307\u5B9A\u4E91\u7EBF\u7684\u5BF9\u89D2\u70B9"},rect:{firstCorner:"\u6307\u5B9A\u77E9\u5F62\u7684\u7B2C\u4E00\u4E2A\u89D2\u70B9",secondCorner:"\u6307\u5B9A\u77E9\u5F62\u7684\u5BF9\u89D2\u70B9"},circle:{center:"\u6307\u5B9A\u5706\u5FC3",radius:"\u6307\u5B9A\u5706\u7684\u534A\u5F84"},shape:{calloutOn:"[\u6807\u6CE8\u5F00\u542F]",calloutOff:"[\u6807\u6CE8\u5173\u95ED]",calloutAnchor:"\u6307\u5B9A\u6807\u6CE8\u6587\u5B57\u6846\u4F4D\u7F6E",keywords:{callout:{display:"\u6807\u6CE8(C)",local:"\u6807\u6CE8",global:"Callout"},noCallout:{display:"\u65E0\u6807\u6CE8(N)",local:"\u65E0\u6807\u6CE8",global:"NoCallout"}}},highlight:{firstCorner:"\u6307\u5B9A\u9AD8\u4EAE\u7684\u7B2C\u4E00\u4E2A\u89D2\u70B9",secondCorner:"\u6307\u5B9A\u9AD8\u4EAE\u7684\u5BF9\u89D2\u70B9"},callout:{tip:"\u6307\u5B9A\u5F15\u7EBF\u8D77\u70B9\uFF0C\u6216\u9009\u62E9\u5C1A\u65E0\u6807\u6CE8\u7684\u4E91\u7EBF/\u77E9\u5F62/\u5706\u5916\u6846",anchor:"\u6307\u5B9A\u6807\u6CE8\u6587\u5B57\u6846\u4F4D\u7F6E",content:"\u8F93\u5165\u6807\u6CE8\u6587\u5B57"},stamp:{kind:"\u8F93\u5165\u56FE\u7AE0\u7C7B\u578B [approved/rejected/revised/for-review/custom]",imageUrl:"\u8F93\u5165\u81EA\u5B9A\u4E49\u56FE\u7AE0\u56FE\u7247 URL\uFF08\u53EF\u9009\uFF09",caption:"\u8F93\u5165\u56FE\u7AE0\u8BF4\u660E\u6587\u5B57\uFF08\u53EF\u9009\uFF09",point:"\u6307\u5B9A\u56FE\u7AE0\u63D2\u5165\u70B9"},import:{chooseFile:"\u9009\u62E9\u6279\u6CE8 sidecar JSON \u6587\u4EF6"}},move:{basePointOrDisplacement:"\u6307\u5B9A\u57FA\u70B9\u6216",secondPointOrDisplacement:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9\u6216",displacement:"\u6307\u5B9A\u4F4D\u79FB",keywords:{displacement:{display:"\u4F4D\u79FB(D)",local:"\u4F4D\u79FB",global:"Displacement"}}},offset:{distance:"\u6307\u5B9A\u504F\u79FB\u8DDD\u79BB",selectObject:"\u9009\u62E9\u8981\u504F\u79FB\u7684\u5BF9\u8C61\uFF0C\u6216\u6309 Enter \u7ED3\u675F",sidePoint:"\u6307\u5B9A\u8981\u504F\u79FB\u5230\u7684\u90A3\u4E00\u4FA7\u7684\u70B9",invalidDistance:"\u504F\u79FB\u8DDD\u79BB\u5FC5\u987B\u5927\u4E8E 0\u3002",invalidSelection:"\u6240\u9009\u5BF9\u8C61\u4E0D\u80FD\u504F\u79FB\u3002",offsetFailed:"\u65E0\u6CD5\u5728\u6307\u5B9A\u4FA7\u521B\u5EFA\u504F\u79FB\u66F2\u7EBF\u3002"},mtext:{point:"\u6307\u5B9A\u591A\u884C\u6587\u672C\u63D2\u5165\u70B9"},bmpout:{boundsFirstCorner:"\u6307\u5B9A\u8FB9\u754C\u7684\u7B2C\u4E00\u4E2A\u89D2\u70B9",boundsSecondCorner:"\u6307\u5B9A\u5BF9\u89D2\u70B9",longSidePrompt:"\u8F93\u5165\u957F\u8FB9\u50CF\u7D20\u5927\u5C0F"},jpgout:{boundsFirstCorner:"\u6307\u5B9A\u8FB9\u754C\u7684\u7B2C\u4E00\u4E2A\u89D2\u70B9",boundsSecondCorner:"\u6307\u5B9A\u5BF9\u89D2\u70B9",longSidePrompt:"\u8F93\u5165\u957F\u8FB9\u50CF\u7D20\u5927\u5C0F"},pngout:{boundsFirstCorner:"\u6307\u5B9A\u8FB9\u754C\u7684\u7B2C\u4E00\u4E2A\u89D2\u70B9",boundsSecondCorner:"\u6307\u5B9A\u5BF9\u89D2\u70B9",longSidePrompt:"\u8F93\u5165\u957F\u8FB9\u50CF\u7D20\u5927\u5C0F"},imageattach:{insertionPoint:"\u6307\u5B9A\u63D2\u5165\u70B9\uFF1A",scale:"\u6307\u5B9A\u6BD4\u4F8B\u56E0\u5B50\uFF1A",rotation:"\u6307\u5B9A\u65CB\u8F6C\u89D2\u5EA6\uFF1A",invalidScale:"\u6BD4\u4F8B\u56E0\u5B50\u5FC5\u987B\u5927\u4E8E 0\u3002",decodeFailed:"\u65E0\u6CD5\u8BFB\u53D6\u6240\u9009\u56FE\u50CF\u6587\u4EF6\u3002"},insert:{blockName:"\u8F93\u5165\u5757\u540D\uFF1A",insertionPoint:"\u6307\u5B9A\u63D2\u5165\u70B9\uFF1A",scale:"\u6307\u5B9A\u6BD4\u4F8B\u56E0\u5B50\uFF1A",rotation:"\u6307\u5B9A\u65CB\u8F6C\u89D2\u5EA6\uFF1A",invalidScale:"\u6BD4\u4F8B\u56E0\u5B50\u5FC5\u987B\u5927\u4E8E 0\u3002",invalidBlockName:"\u65E0\u6548\u7684\u5757\u540D\u3002",blockNotFound:"\u672A\u627E\u5230\u5757",xrefNotAllowed:"\u4E0D\u80FD\u4F7F\u7528 -INSERT \u63D2\u5165\u5916\u90E8\u53C2\u7167\u3002"},xattach:{insertionPoint:"\u6307\u5B9A\u63D2\u5165\u70B9\uFF1A",scale:"\u6307\u5B9A\u6BD4\u4F8B\u56E0\u5B50\uFF1A",rotation:"\u6307\u5B9A\u65CB\u8F6C\u89D2\u5EA6\uFF1A",invalidScale:"\u6BD4\u4F8B\u56E0\u5B50\u5FC5\u987B\u5927\u4E8E 0\u3002",unsupportedFile:"\u8BF7\u9009\u62E9 DWG \u6216 DXF \u6587\u4EF6\u3002",loading:"\u6B63\u5728\u52A0\u8F7D\u5916\u90E8\u53C2\u7167...",loadFailed:"\u65E0\u6CD5\u8BFB\u53D6\u6240\u9009\u56FE\u5F62\u6587\u4EF6\u3002"},point:{point:"\u6307\u5B9A\u70B9"},polygon:{numberOfSides:"\u8F93\u5165\u8FB9\u6570",centerOrEdge:"\u6307\u5B9A\u591A\u8FB9\u5F62\u4E2D\u5FC3\u70B9\u6216",radiusOrType:"\u8F93\u5165\u9009\u9879",edgeStart:"\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9",edgeEnd:"\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9",keywords:{edge:{display:"\u8FB9(E)",local:"\u8FB9",global:"Edge"},inscribed:{display:"\u5185\u63A5\u4E8E\u5706(I)",local:"\u5185\u63A5\u4E8E\u5706",global:"Inscribed"},circumscribed:{display:"\u5916\u5207\u4E8E\u5706(C)",local:"\u5916\u5207\u4E8E\u5706",global:"Circumscribed"}},invalid:{sides:"\u8FB9\u6570\u65E0\u6548\uFF1A\u8BF7\u8F93\u5165 3 \u5230 1024 \u4E4B\u95F4\u7684\u6574\u6570\u3002",radius:"\u534A\u5F84\u65E0\u6548\uFF1A\u534A\u5F84\u5FC5\u987B\u5927\u4E8E 0\u3002",edge:"\u8FB9\u65E0\u6548\uFF1A\u8FB9\u957F\u5FC5\u987B\u5927\u4E8E 0\u3002"}},polyline:{firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",nextPoint:"\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\uFF08\u6216\u6309 Enter \u5B8C\u6210\uFF09",nextPointWithOptions:"\u8BF7\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\u6216",nextPointWithArcOptions:"\u8BF7\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\u6216",keywords:{arc:{display:"\u5706\u5F27(A)",local:"\u5706\u5F27",global:"Arc"},undo:{display:"\u653E\u5F03(U)",local:"\u653E\u5F03",global:"Undo"},close:{display:"\u95ED\u5408(C)",local:"\u95ED\u5408",global:"Close"},line:{display:"\u76F4\u7EBF(L)",local:"\u76F4\u7EBF",global:"Line"},angle:{display:"\u89D2\u5EA6(A)",local:"\u89D2\u5EA6",global:"Angle"},center:{display:"\u5706\u5FC3(C)",local:"\u5706\u5FC3",global:"Center"},secondPoint:{display:"\u7B2C\u4E8C\u70B9(P)",local:"\u7B2C\u4E8C\u70B9",global:"SecondPoint"},radius:{display:"\u534A\u5F84(R)",local:"\u534A\u5F84",global:"Radius"}},arcAngle:"\u6307\u5B9A\u5F27\u89D2\u5EA6",arcCenter:"\u6307\u5B9A\u5706\u5FC3",arcSecondPoint:"\u6307\u5B9A\u5F27\u4E0A\u7684\u7B2C\u4E8C\u70B9",arcEndPoint:"\u6307\u5B9A\u5F27\u7684\u7EC8\u70B9",arcRadius:"\u6307\u5B9A\u5F27\u534A\u5F84"},rotate:{basePoint:"\u6307\u5B9A\u57FA\u70B9",rotationAngleOrOptions:"\u6307\u5B9A\u65CB\u8F6C\u89D2\u5EA6\u6216",referenceAngleOrPoints:"\u6307\u5B9A\u53C2\u8003\u89D2\u6216",firstReferencePoint:"\u6307\u5B9A\u53C2\u8003\u89D2\u7684\u7B2C\u4E00\u70B9",secondReferencePoint:"\u6307\u5B9A\u7B2C\u4E8C\u70B9",newAngle:"\u6307\u5B9A\u65B0\u89D2\u5EA6",keywords:{copy:{display:"\u590D\u5236(C)",local:"\u590D\u5236",global:"Copy"},reference:{display:"\u53C2\u7167(R)",local:"\u53C2\u7167",global:"Reference"},points:{display:"\u70B9(P)",local:"\u70B9",global:"Points"}},invalid:{referencePoints:"\u53C2\u8003\u70B9\u8F93\u5165\u65E0\u6548\uFF1A\u4E24\u70B9\u5FC5\u987B\u4E0D\u540C\u3002"}},rect:{firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u89D2\u70B9",nextPoint:"\u6307\u5B9A\u53E6\u4E00\u4E2A\u89D2\u70B9",firstPointWithOptions:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u89D2\u70B9\u6216\u8005",otherCornerWithOptions:"\u6307\u5B9A\u53E6\u4E00\u4E2A\u89D2\u70B9\u6216\u8005",chamferFirst:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u5012\u89D2\u8DDD\u79BB",chamferSecond:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u5012\u89D2\u8DDD\u79BB",filletRadius:"\u6307\u5B9A\u5706\u89D2\u534A\u5F84",segmentWidth:"\u6307\u5B9A\u77E9\u5F62\u7EBF\u5BBD",elevationValue:"\u6307\u5B9A\u6807\u9AD8",thicknessValue:"\u6307\u5B9A\u539A\u5EA6",rotationAngle:"\u6307\u5B9A\u77E9\u5F62\u65CB\u8F6C\u89D2\u5EA6",dimensionLength:"\u6307\u5B9A\u77E9\u5F62\u957F\u5EA6",dimensionWidth:"\u6307\u5B9A\u77E9\u5F62\u5BBD\u5EA6",areaValue:"\u6307\u5B9A\u77E9\u5F62\u9762\u79EF",areaLengthOrWidth:"\u6307\u5B9A\u77E9\u5F62\u957F\u5EA6",areaSpecifyWidth:"\u6307\u5B9A\u77E9\u5F62\u5BBD\u5EA6",invalidPositive:"\u8F93\u5165\u65E0\u6548\uFF1A\u8BF7\u8F93\u5165\u5927\u4E8E 0 \u7684\u6570\u503C\u3002",invalidRect:"\u65E0\u6CD5\u521B\u5EFA\u77E9\u5F62\uFF1A\u8BF7\u8F93\u5165\u6709\u6548\u7684\u89D2\u70B9\u6216\u5C3A\u5BF8\u3002",thicknessNotSupported:"\u5F53\u524D\u7248\u672C\u6682\u4E0D\u652F\u6301\u5C06\u77E9\u5F62\u539A\u5EA6\u5199\u5165\u56FE\u5143\uFF0C\u5DF2\u5FFD\u7565\u539A\u5EA6\u8BBE\u7F6E\u3002",keywords:{chamfer:{display:"\u5012\u89D2(C)",local:"\u5012\u89D2",global:"Chamfer"},elevation:{display:"\u6807\u9AD8(E)",local:"\u6807\u9AD8",global:"Elevation"},fillet:{display:"\u5706\u89D2(F)",local:"\u5706\u89D2",global:"Fillet"},thickness:{display:"\u539A\u5EA6(T)",local:"\u539A\u5EA6",global:"Thickness"},width:{display:"\u5BBD\u5EA6(W)",local:"\u5BBD\u5EA6",global:"Width"},area:{display:"\u9762\u79EF(A)",local:"\u9762\u79EF",global:"Area"},dimensions:{display:"\u5C3A\u5BF8(D)",local:"\u5C3A\u5BF8",global:"Dimensions"},rotation:{display:"\u65CB\u8F6C(R)",local:"\u65CB\u8F6C",global:"Rotation"},length:{display:"\u957F\u5EA6(L)",local:"\u957F\u5EA6",global:"Length"},rectWidth:{display:"\u5BBD\u5EA6(W)",local:"\u5BBD\u5EA6",global:"Width"}}},revcloud:{firstCornerOrOptions:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u89D2\u70B9\u6216",firstCorner:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u89D2\u70B9",oppositeCorner:"\u6307\u5B9A\u5BF9\u89D2\u70B9",startPoint:"\u6307\u5B9A\u8D77\u70B9",nextPoint:"\u6307\u5B9A\u4E0B\u4E00\u70B9",nextPointOrUndo:"\u6307\u5B9A\u4E0B\u4E00\u70B9\u6216",firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",guideCursor:"\u6CBF\u4E91\u7EBF\u8DEF\u5F84\u79FB\u52A8\u5149\u6807\uFF08\u6309 Enter \u7ED3\u675F\uFF09",arcLength:"\u6307\u5B9A\u5706\u5F27\u957F\u5EA6",selectObject:"\u9009\u62E9\u5BF9\u8C61",style:"\u8F93\u5165\u4FEE\u8BA2\u4E91\u7EBF\u5706\u5F27\u6837\u5F0F",reverseDirection:"\u53CD\u8F6C\u65B9\u5411",invalidArcLength:"\u5706\u5F27\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E 0\u3002",invalidObject:"\u6240\u9009\u5BF9\u8C61\u65E0\u6CD5\u8F6C\u6362\u4E3A\u4FEE\u8BA2\u4E91\u7EBF\u3002",keywords:{arcLength:{display:"\u5706\u5F27\u957F\u5EA6(A)",local:"\u5706\u5F27\u957F\u5EA6",global:"ArcLength"},object:{display:"\u5BF9\u8C61(O)",local:"\u5BF9\u8C61",global:"Object"},rectangular:{display:"\u77E9\u5F62(R)",local:"\u77E9\u5F62",global:"Rectangular"},polygonal:{display:"\u591A\u8FB9\u5F62(P)",local:"\u591A\u8FB9\u5F62",global:"Polygonal"},freehand:{display:"\u624B\u7ED8(F)",local:"\u624B\u7ED8",global:"Freehand"},style:{display:"\u6837\u5F0F(S)",local:"\u6837\u5F0F",global:"Style"},normal:{display:"\u666E\u901A(N)",local:"\u666E\u901A",global:"Normal"},calligraphy:{display:"\u4E66\u6CD5(C)",local:"\u4E66\u6CD5",global:"Calligraphy"},undo:{display:"\u653E\u5F03(U)",local:"\u653E\u5F03",global:"Undo"},yes:{display:"\u662F(Y)",local:"\u662F",global:"Yes"},no:{display:"\u5426(N)",local:"\u5426",global:"No"}}},sketch:{specifySketch:"\u6307\u5B9A\u8349\u56FE\u6216",sketching:"\u79FB\u52A8\u6307\u9488\u8FDB\u884C\u8349\u56FE\u7ED8\u5236\uFF08\u5355\u51FB\u6216\u6309 Enter \u505C\u6B62\uFF09",type:"\u8F93\u5165\u8349\u56FE\u7C7B\u578B",increment:"\u6307\u5B9A\u8349\u56FE\u589E\u91CF",tolerance:"\u6307\u5B9A\u6837\u6761\u66F2\u7EBF\u516C\u5DEE",firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",nextPoint:"\u6307\u5B9A\u7ED3\u675F\u70B9",keywords:{type:{display:"\u7C7B\u578B(T)",local:"\u7C7B\u578B",global:"Type"},increment:{display:"\u589E\u91CF(I)",local:"\u589E\u91CF",global:"Increment"},tolerance:{display:"\u516C\u5DEE(L)",local:"\u516C\u5DEE",global:"Tolerance"},line:{display:"\u76F4\u7EBF(L)",local:"\u76F4\u7EBF",global:"Lines"},polyline:{display:"\u591A\u6BB5\u7EBF(P)",local:"\u591A\u6BB5\u7EBF",global:"Polyline"},spline:{display:"\u6837\u6761\u66F2\u7EBF(S)",local:"\u6837\u6761\u66F2\u7EBF",global:"Spline"}}},spline:{firstPoint:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9",nextPoint:"\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\uFF08\u6216\u6309 Enter \u5B8C\u6210\uFF09",firstPointWithOptions:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9\u6216",nextPointWithFitOptions:"\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9\u6216",nextPointWithCvOptions:"\u6307\u5B9A\u4E0B\u4E00\u4E2A\u63A7\u5236\u9876\u70B9\u6216",methodPrompt:"\u8F93\u5165\u6837\u6761\u521B\u5EFA\u65B9\u5F0F",knotsPrompt:"\u8F93\u5165\u8282\u70B9\u53C2\u6570\u5316\u65B9\u5F0F",degreePrompt:"\u6307\u5B9A\u6837\u6761\u6B21\u6570",keywords:{method:{display:"\u65B9\u6CD5(M)",local:"\u65B9\u6CD5",global:"Method"},fit:{display:"\u62DF\u5408(F)",local:"\u62DF\u5408",global:"Fit"},cv:{display:"\u63A7\u5236\u9876\u70B9(C)",local:"\u63A7\u5236\u9876\u70B9",global:"CV"},knots:{display:"\u8282\u70B9(K)",local:"\u8282\u70B9",global:"Knots"},degree:{display:"\u6B21\u6570(D)",local:"\u6B21\u6570",global:"Degree"},undo:{display:"\u653E\u5F03(U)",local:"\u653E\u5F03",global:"Undo"},close:{display:"\u95ED\u5408(C)",local:"\u95ED\u5408",global:"Close"},chord:{display:"\u5F26\u957F(C)",local:"\u5F26\u957F",global:"Chord"},sqrtChord:{display:"\u5E73\u65B9\u6839\u5F26\u957F(S)",local:"\u5E73\u65B9\u6839\u5F26\u957F",global:"SqrtChord"},uniform:{display:"\u5747\u5300(U)",local:"\u5747\u5300",global:"Uniform"}}},sysvar:{prompt:"\u8BF7\u8F93\u5165\u65B0\u7684\u503C"},zoom:{mainPrompt:"\u6307\u5B9A\u7A97\u53E3\u89D2\u70B9\u6216",firstCorner:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u89D2\u70B9",secondCorner:"\u6307\u5B9A\u5BF9\u89D2\u70B9",centerPoint:"\u6307\u5B9A\u7F29\u653E\u4E2D\u5FC3\u70B9",heightOrScale:"\u8F93\u5165\u9AD8\u5EA6\u6216\u6BD4\u4F8B\u56E0\u5B50\uFF08nX \u6216 nXP\uFF09",scaleFactor:"\u8F93\u5165\u6BD4\u4F8B\u56E0\u5B50\uFF08nX \u6216 nXP\uFF09",keywords:{all:{display:"\u5168\u90E8(A)",local:"\u5168\u90E8",global:"All"},center:{display:"\u4E2D\u5FC3(C)",local:"\u4E2D\u5FC3",global:"Center"},extents:{display:"\u8303\u56F4(E)",local:"\u8303\u56F4",global:"Extents"},previous:{display:"\u4E0A\u4E00\u4E2A(P)",local:"\u4E0A\u4E00\u4E2A",global:"Previous"},original:{display:"\u539F\u59CB\u89C6\u53E3(O)",local:"\u539F\u59CB\u89C6\u53E3",global:"Original"},saved:{display:"\u4FDD\u5B58\u7684\u89C6\u56FE(V)",local:"\u4FDD\u5B58\u7684\u89C6\u56FE",global:"Saved"},smart:{display:"\u667A\u80FD\u8303\u56F4(I)",local:"\u667A\u80FD\u8303\u56F4",global:"Smart"},scale:{display:"\u6BD4\u4F8B(S)",local:"\u6BD4\u4F8B",global:"Scale"},window:{display:"\u7A97\u53E3(W)",local:"\u7A97\u53E3",global:"Window"}}},chtml:{exportFormat:"\u5BFC\u51FA\u683C\u5F0F",exportInvisibleLayers:"\u662F\u5426\u5BFC\u51FA\u4E0D\u53EF\u89C1\u56FE\u5C42",exportLayouts:"\u662F\u5426\u5BFC\u51FA\u5E03\u5C40",initialView:"\u6253\u5F00 HTML \u65F6\u7684\u521D\u59CB\u89C6\u56FE",viewerMode:"\u79BB\u7EBF\u67E5\u770B\u5668\u6A21\u5F0F",chunkSizeMiB:"\u6BCF\u4E2A\u5206\u7247\u5927\u5C0F\uFF08MiB\uFF0C\u591A\u6587\u4EF6\u5305\uFF09",compressChunks:"\u662F\u5426\u538B\u7F29\u5206\u7247\uFF08\u591A\u6587\u4EF6\u5305\uFF09",keywords:{single:{display:"\u5355\u6587\u4EF6(S)",local:"\u5355\u6587\u4EF6",global:"Single"},multi:{display:"\u591A\u6587\u4EF6\u5305(M)",local:"\u591A\u6587\u4EF6\u5305",global:"Multi"},yes:{display:"\u662F(Y)",local:"\u662F",global:"Yes"},no:{display:"\u5426(N)",local:"\u5426",global:"No"},extents:{display:"\u8303\u56F4(E)",local:"\u8303\u56F4",global:"Extents"},current:{display:"\u5F53\u524D(C)",local:"\u5F53\u524D",global:"Current"},view:{display:"\u67E5\u770B(V)",local:"\u67E5\u770B",global:"View"},measure:{display:"\u6D4B\u91CF\u4E0E\u6279\u6CE8(M)",local:"\u6D4B\u91CF\u4E0E\u6279\u6CE8",global:"Measure"}}},cpdf:{modelSpaceFit:"\u6A21\u578B\u7A7A\u95F4\u8303\u56F4",exportLayouts:"\u662F\u5426\u5BFC\u51FA\u5E03\u5C40",textMode:"\u6587\u5B57\u6E32\u67D3\u65B9\u5F0F",keywords:{extents:{display:"\u8303\u56F4(E)",local:"\u8303\u56F4",global:"Extents"},display:{display:"\u663E\u793A(D)",local:"\u663E\u793A",global:"Display"},text:{display:"\u6587\u5B57(T)",local:"\u6587\u5B57",global:"Text"},vector:{display:"\u77E2\u91CF(V)",local:"\u77E2\u91CF",global:"Vector"},yes:{display:"\u662F(Y)",local:"\u662F",global:"Yes"},no:{display:"\u5426(N)",local:"\u5426",global:"No"}}}},w3e={document:{untitled:"\u672A\u547D\u540D"},commandLine:{noLast:"(\u65E0\u4E0A\u4E00\u6B21\u547D\u4EE4)",unknownCommand:"\u672A\u77E5\u547D\u4EE4",executed:"\u5DF2\u6267\u884C\u547D\u4EE4",showHistory:"\u663E\u793A\u547D\u4EE4\u5386\u53F2",placeholder:"\u8F93\u5165\u547D\u4EE4",showMessages:"\u663E\u793A\u6D88\u606F\u5386\u53F2",canceled:"*\u5DF2\u53D6\u6D88*",noHistory:"(\u65E0\u5386\u53F2\u8BB0\u5F55)",invalidInput:"\u8F93\u5165\u65E0\u6548\u3002",close:"\u5173\u95ED\u547D\u4EE4\u884C"},mobileCommand:{length:"\u957F\u5EA6",angle:"\u89D2\u5EA6",dx:"\u0394X",dy:"\u0394Y",x:"X",y:"Y",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",help:"\u5E2E\u52A9",back:"\u8FD4\u56DE",collapse:"\u6536\u8D77",expand:"\u5C55\u5F00"},inputManager:{firstCorner:"\u6307\u5B9A\u7B2C\u4E00\u4E2A\u89D2\u70B9\u6216",secondCorner:"\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u89D2\u70B9\u6216"},message:{fetchingDrawingFile:"\u6B63\u5728\u52A0\u8F7D\u56FE\u7EB8\u6587\u4EF6...",exportingDxf:"\u6B63\u5728\u5BFC\u51FA DXF ...",exportingPdf:"\u6B63\u5728\u5BFC\u51FA PDF ...",exportingSvg:"\u6B63\u5728\u5BFC\u51FA SVG ...",calculatingSmartExtents:"\u6B63\u5728\u8BA1\u7B97\u667A\u80FD\u8303\u56F4 ...",importingPdf:"\u6B63\u5728\u5BFC\u5165 PDF ...",exportingEntityPreview:"\u6B63\u5728\u5BFC\u51FA\u56FE\u7247 ...",collectingMemoryProfile:"\u6B63\u5728\u5206\u6790\u5185\u5B58 ...",fontCached:"\u5B57\u4F53\u5DF2\u6210\u529F\u7F13\u5B58",fontCacheFailed:"\u7F13\u5B58\u5B57\u4F53\u5931\u8D25",fontsNotFound:"\u5728\u5B57\u4F53\u5E93\u4E2D\u627E\u4E0D\u5230\u5B57\u4F53\uFF1A{fonts}\u3002",fontsNotLoaded:"\u65E0\u6CD5\u52A0\u8F7D\u5B57\u4F53\uFF1A{fonts}\u3002",fontMissedInDrawing:'\u5B57\u4F53 "{font}" \u88AB {count} \u4E2A\u6587\u5B57\u5BF9\u8C61\u4F7F\u7528\uFF0C\u4F46\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4F7F\u7528 "{replacementFont}" \u663E\u793A\u3002',fontMissedReplacement:'"{font}"\uFF08\u5DF2\u7528 "{replacement}" \u663E\u793A\uFF09',failedToGetAvaiableFonts:'\u65E0\u6CD5\u4ECE"{url}"\u83B7\u53D6\u53EF\u7528\u7684\u5B57\u4F53\u4FE1\u606F\uFF01',failedToOpenFile:'\u65E0\u6CD5\u6253\u5F00\u6587\u4EF6"{fileName}"\uFF01',failedToOpenFileToast:'\u65E0\u6CD5\u6253\u5F00"{fileName}"\u3002\u8BE6\u60C5\u8BF7\u67E5\u770B\u901A\u77E5\u4E2D\u5FC3\u3002',failedToOpenFileWorkerOom:'\u65E0\u6CD5\u6253\u5F00"{fileName}"\u3002\u4F7F\u7528 LibreDWG \u89E3\u6790\u5668\u65F6\u5185\u5B58\u4E0D\u8DB3\uFF0C\u5BFC\u81F4\u6253\u5F00\u5931\u8D25\u3002\u53EF\u70B9\u51FB{dwgParserLink}\u8D2D\u4E70\u5546\u7528 DWG Parser\uFF0C\u4EE5\u652F\u6301\u66F4\u5927\u56FE\u7EB8\u5E76\u907F\u514D\u6B64\u95EE\u9898\u3002',failedToOpenFileWorkerOomLink:"\u6B64\u9875\u9762",failedToOpenFileWorkerTimeout:'\u65E0\u6CD5\u6253\u5F00"{fileName}"\u3002\u89E3\u6790\u56FE\u7EB8\u65F6\u64CD\u4F5C\u8D85\u65F6\u3002',failedToOpenFileFontLoadFailed:'\u65E0\u6CD5\u6253\u5F00"{fileName}"\u3002\u65E0\u6CD5\u52A0\u8F7D\u56FE\u7EB8\u6240\u9700\u7684\u5B57\u4F53\u3002',failedToOpenFileLicenseExpired:'\u65E0\u6CD5\u6253\u5F00"{fileName}"\u3002DWG \u8F6C\u6362\u5668\u8BB8\u53EF\u8BC1\u5DF2\u8FC7\u671F\u3002',failedToOpenFileLicenseInvalid:'\u65E0\u6CD5\u6253\u5F00"{fileName}"\u3002DWG \u8F6C\u6362\u5668\u8BB8\u53EF\u8BC1\u7F3A\u5931\u6216\u65E0\u6548\u3002',unknownEntities:"\u8FD9\u5F20\u56FE\u7EB8\u4E2D\u5305\u542B\u4E86{count}\u4E2A\u672A\u77E5\u6216\u4E0D\u652F\u6301\u7684\u5B9E\u4F53\uFF0C\u8FD9\u4E9B\u5B9E\u4F53\u5C06\u65E0\u6CD5\u663E\u793A\uFF01",tianzhengEntities:"\u68C0\u6D4B\u5230\u5929\u6B63\uFF08\u6216\u540C\u7C7B\u7B2C\u4E09\u65B9\uFF09\u81EA\u5B9A\u4E49\u56FE\u5143\uFF08\u7EA6 {count} \u4E2A\uFF09\u3002\u5F53\u524D\u73AF\u5883\u65E0\u6CD5\u5B8C\u6574\u89E3\u6790\u8FD9\u4E9B\u56FE\u5143\uFF0C\u90E8\u5206\u5185\u5BB9\u53EF\u80FD\u65E0\u6CD5\u663E\u793A\u3002",emptyProxyEntities:"\u8FD9\u5F20\u56FE\u7EB8\u4E2D\u5305\u542B\u4E86{count}\u4E2A\u7F3A\u5C11\u4EE3\u7406\u56FE\u5F62\u7684\u81EA\u5B9A\u4E49\u5B9E\u4F53\uFF0C\u8FD9\u4E9B\u5B9E\u4F53\u5C06\u65E0\u6CD5\u663E\u793A\uFF01"},notification:{center:{title:"\u901A\u77E5",clearAll:"\u6E05\u9664\u5168\u90E8",noNotifications:"\u6682\u65E0\u901A\u77E5"},group:{fontMissed:"\u5B57\u4F53\u7F3A\u5931",fontMissedSummary:"\u5171 {count} \u6761\u5B57\u4F53\u76F8\u5173\u6D88\u606F\uFF0C\u70B9\u51FB\u5C55\u5F00\u67E5\u770B\u8BE6\u60C5",unsupportedEntities:"\u4E0D\u652F\u6301\u7684\u56FE\u5143",unsupportedEntitiesSummary:"\u5171 {count} \u6761\u89E3\u6790\u76F8\u5173\u6D88\u606F\uFF0C\u70B9\u51FB\u5C55\u5F00\u67E5\u770B\u8BE6\u60C5",genericSummary:"\u5171 {count} \u6761\u6D88\u606F\uFF0C\u70B9\u51FB\u5C55\u5F00\u67E5\u770B\u8BE6\u60C5"},title:{failedToOpenFile:"\u65E0\u6CD5\u6253\u5F00\u6587\u4EF6",failedToOpenFileWorkerOom:"\u5185\u5B58\u4E0D\u8DB3",failedToOpenFileWorkerTimeout:"\u6253\u5F00\u8D85\u65F6",failedToOpenFileFontLoadFailed:"\u5B57\u4F53\u52A0\u8F7D\u5931\u8D25",failedToOpenFileLicenseExpired:"\u8BB8\u53EF\u8BC1\u5DF2\u8FC7\u671F",failedToOpenFileLicenseInvalid:"\u8BB8\u53EF\u8BC1\u65E0\u6548",fontNotFound:"\u627E\u4E0D\u5230\u5B57\u4F53",fontNotLoaded:"\u65E0\u6CD5\u52A0\u8F7D\u5B57\u4F53",parsingWarning:"\u89E3\u6790\u56FE\u7EB8\u95EE\u9898",systemMessage:"\u7CFB\u7EDF\u6D88\u606F",systemWarning:"\u7CFB\u7EDF\u8B66\u544A",systemError:"\u7CFB\u7EDF\u9519\u8BEF",systemInfo:"\u7CFB\u7EDF\u4FE1\u606F"}},progress:{start:"\u5F00\u59CB\u89E3\u6790\u6587\u4EF6...",parse:"\u6B63\u5728\u89E3\u6790\u6587\u4EF6 ...",font:"\u6B63\u5728\u4E0B\u8F7D\u56FE\u7EB8\u6240\u9700\u5B57\u4F53...",ltype:"\u6B63\u5728\u89E3\u6790\u7EBF\u5F62...",style:"\u6B63\u5728\u89E3\u6790\u6587\u5B57\u6837\u5F0F...",dimstyle:"\u6B63\u5728\u89E3\u6790\u6807\u6CE8\u6837\u5F0F...",layer:"\u6B63\u5728\u89E3\u6790\u56FE\u5C42...",vport:"\u6B63\u5728\u89E3\u6790\u89C6\u53E3...",blockrecord:"\u6B63\u5728\u89E3\u6790BTRs...",header:"\u6B63\u5728\u89E3\u6790\u6587\u4EF6\u5934...",block:"\u6B63\u5728\u89E3\u6790\u5757..",entity:"\u6B63\u5728\u89E3\u6790\u56FE\u5143...",object:"\u6B63\u5728\u89E3\u6790NODs...",rendering:"\u6B63\u5728\u6E32\u67D3\u56FE\u7EB8 ...",end:"\u5B8C\u6210\uFF01"},about:{title:"\u5173\u4E8E",close:"\u5173\u95ED",product:"CAD \u67E5\u770B\u5668",tagline:"\u9762\u5411 DWG/DXF \u56FE\u7EB8\u7684\u9AD8\u6027\u80FD Web CAD \u67E5\u770B\u5668\u3002",website:"\u5B98\u7F51",docs:"\u6587\u6863",repository:"GitHub",copyright:"\xA9 {year} mlightcad\u3002\u4FDD\u7559\u6240\u6709\u6743\u5229\u3002",ok:"\u786E\u5B9A"},drawStyle:{color:"\u989C\u8272",fontSize:"\u5B57\u9AD8"},shortCutToolbar:{more:"\u66F4\u591A",undo:"\u64A4\u9500",redo:"\u91CD\u505A",erase:"\u5220\u9664",collapse:"\u6536\u8D77\u5DE5\u5177\u680F",expand:"\u5C55\u5F00\u5DE5\u5177\u680F"},textHeight:{title:"\u5B57\u9AD8\u8BBE\u7F6E",close:"\u5173\u95ED",ok:"\u786E\u5B9A",cancel:"\u53D6\u6D88",adaptive:"\u81EA\u9002\u5E94\u5C4F\u5E55",custom:"\u81EA\u5B9A\u4E49\u5B57\u9AD8",customPlaceholder:"\u4E16\u754C\u5750\u6807\u5B57\u9AD8",fromScreen:"\u6309\u5C4F\u5E55\u5B57\u53F7\u6362\u7B97",fromScreenHint:"\u6309\u5F53\u524D\u89C6\u56FE\u7F29\u653E\uFF0C\u8F93\u5165\u5E0C\u671B\u770B\u5230\u7684\u5C4F\u5E55\u5B57\u53F7\uFF08\u50CF\u7D20\uFF09\uFF0C\u6362\u7B97\u4E3A\u56FA\u5B9A\u7684\u4E16\u754C\u5750\u6807\u5B57\u9AD8\uFF1B\u4E4B\u540E\u7F29\u653E\u65F6\u5B57\u7684\u4E16\u754C\u9AD8\u5EA6\u4E0D\u53D8\u3002",screenPxPlaceholder:"\u5C4F\u5E55\u5B57\u53F7",screenUnit:"px",convert:"\u6362\u7B97"},entityPick:{cancel:"\u53D6\u6D88\u9009\u62E9"},colorPicker:{title:"\u9009\u62E9\u989C\u8272",close:"\u5173\u95ED",ok:"\u786E\u5B9A",cancel:"\u53D6\u6D88",index:"\u989C\u8272\u7D22\u5F15\uFF1A",rgb:"RGB\uFF1A",input:"\u989C\u8272",inputPlaceholder:"1-255 \u6216 #RRGGBB"},touchPointTutorial:{title:"\u600E\u6837\u53EF\u4EE5\u7CBE\u786E\u53D6\u70B9\uFF1F",description:"\u624B\u6307\u5728\u5C4F\u5E55\u4E0A\u957F\u63090.5s\u5DE6\u53F3\uFF0C\u4E0A\u65B9\u51FA\u73B0\u5341\u5B57\uFF0C\u624B\u6307\u79FB\u52A8\u65F6\u5341\u5B57\u8DDF\u968F\u79FB\u52A8\u5E76\u81EA\u52A8\u6355\u6349\u3002\u53D6\u70B9\u66F4\u7CBE\u51C6\u3002",snoozeToday:"\u4ECA\u65E5\u4E0D\u518D\u63D0\u9192",hideForever:"\u4E0D\u518D\u63D0\u9192",ok:"\u6211\u77E5\u9053\u4E86"},dataSource:{open:"\u6253\u5F00",local:"\u672C\u5730\u6587\u4EF6",url:"\u4ECE URL \u6253\u5F00",openFrom:"\u4ECE {name} \u6253\u5F00",signInTo:"\u767B\u5F55 {name}",signOutOf:"\u9000\u51FA {name}",signOutOfAccount:"\u9000\u51FA {name}\uFF08{account}\uFF09",urlDialogTitle:"\u4ECE URL \u6253\u5F00",urlDialogHint:"\u8BF7\u8F93\u5165 .dwg \u6216 .dxf \u6587\u4EF6\u7684\u7F51\u5740\u3002",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"\u53D6\u6D88",onedrive:"OneDrive",googledrive:"Google Drive",or:"\u6216",dropFile:"\u5C06\u6587\u4EF6\u62D6\u653E\u5230\u6B64\u5904\uFF0C\u6216",browse:"\u6D4F\u89C8",dropOrBrowse:"\u5C06 DWG \u6216 DXF \u6587\u4EF6\u62D6\u653E\u5230\u6B64\u5904\uFF0C\u6216\u6D4F\u89C8\u9009\u62E9",newDrawing:"\u65B0\u5EFA\u56FE\u7EB8",source:"\u6570\u636E\u6E90",unavailable:"\u8BE5\u6570\u636E\u6E90\u6682\u4E0D\u53EF\u7528\u3002",selectFile:"\u9009\u62E9\u6587\u4EF6",signInRequired:"\u8BF7\u5148\u767B\u5F55\u540E\u518D\u9009\u62E9\u6587\u4EF6\u3002",downloading:"\u6B63\u5728\u4E0B\u8F7D\u6587\u4EF6 ..."}};P.mergeLocaleMessage("en",{command:he,jig:ze,main:m3e});P.mergeLocaleMessage("zh",{command:v3e,jig:x3e,main:w3e});P.mergeLocaleMessage("tr",{command:g3e,jig:y3e,main:b3e});P.mergeLocaleMessage("cs",{command:d3e,jig:p3e,main:f3e});P.mergeLocaleMessage("ar",{command:c3e,jig:u3e,main:h3e});var z1=class{constructor(e){this.options=e}parse(e){let t=e.trim();if(t.length===0)return this.options.allowNone,null;let n=this.options.keywords.findByName(t);return n?n.globalName:this.options.allowArbitraryInput?t:null}parseCommandLine(e,t){return this.parse(e)}},ek=class{start(){return new Promise(e=>{this.resolve=e,this.onStart()})}finish(e){this.cleanup(),this.resolve(e)}},bN=class extends ek{constructor(e,t,n=!0){super(),this.cli=e,this.options=t,this.allowTyping=n,this.handler=new z1(t)}onStart(){this.cli.clearInput(),this.cli.setInputReadOnly(!this.allowTyping),this.cli.renderKeywordPrompt(this.options,e=>this.finish(e)),this.cli.focusInput()}handleEnter(e){if(!this.allowTyping)return!0;if(!e.trim()){let n=this.options.keywords.default;return n!=null&&n.enabled?(this.finish(n.globalName),!0):this.options.allowNone?(this.finish(""),!0):!1}let t=this.handler.parse(e);return t!==null?(this.finish(t),!0):!1}handleEscape(){this.finish("")}cleanup(){this.cli.setInputReadOnly(!1),this.cli.clear()}},vN=class extends ek{constructor(e,t,n,i,o,a=!0){super(),this.cli=e,this.options=t,this.parseValue=n,this.mode=i,this.allowNone=o,this.allowTyping=a,this.options.keywords.count>0&&(this.keywordHandler=new z1(this.options))}onStart(){this.cli.clearInput(),this.cli.setInputReadOnly(!this.allowTyping),this.cli.renderKeywordPrompt(this.options,e=>this.finish({kind:"keyword",keyword:e})),this.cli.focusInput()}handleEnter(e){if(!this.allowTyping)return!0;if(!e.trim()){let n=this.options.keywords.default;return n!=null&&n.enabled?(this.finish({kind:"keyword",keyword:n.globalName}),!0):this.allowNone?(this.finish({kind:"none"}),!0):!1}if(this.mode==="keyword")return this.tryResolveKeyword(e);if(this.mode==="string"){if(this.tryResolveKeyword(e))return!0;let n=this.parseValue(e);return n!==null?(this.finish({kind:"value",value:n}),!0):!1}let t=this.parseValue(e);return t!==null?(this.finish({kind:"value",value:t}),!0):this.tryResolveKeyword(e)}handleEscape(){this.finish({kind:"none"})}cleanup(){this.cli.setInputReadOnly(!1),this.cli.clear()}tryResolveKeyword(e){if(!this.keywordHandler)return!1;let t=this.keywordHandler.parse(e);return t===null?!1:(this.finish({kind:"keyword",keyword:t}),!0)}},xN=class{constructor(e=document.body){this.isPromptActive=!1,this.recentMessages=[],this.isCommandLifecycleBound=!1,this._domAbortController=new AbortController,this._onLocaleChanged=()=>this.refreshLocale(),this._disposed=!1,this.container=e,this.history=[],this.historyIndex=-1,this.lastExecuted=null,this.isCmdPopupOpen=!1,this.isMsgPanelOpen=!1,this.minWidth=420,this.widthRatio=.66,this.autoCompleteIndex=-1,this.injectCSS(),this.createUI(),this.bindEvents(),this.bindCommandLifecycleEvents(),this.resizeHandler();let t=this._domAbortController.signal;window.addEventListener("resize",()=>this.resizeHandler(),{signal:t}),this.resizeObserver=new ResizeObserver(()=>this.resizeHandler()),this.resizeObserver.observe(this.container),P.events.localeChanged.addEventListener(this._onLocaleChanged)}dispose(){var e;if(!this._disposed){this._disposed=!0,this.cancelActiveSession(),this.cancelRecentAutoHide(),this._domAbortController.abort(),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0,P.events.localeChanged.removeEventListener(this._onLocaleChanged);try{let t=Y.instance.editor.events;this._onCommandWillStart&&t.commandWillStart.removeEventListener(this._onCommandWillStart),this._onCommandEnded&&t.commandEnded.removeEventListener(this._onCommandEnded)}catch{}this.cliContainer.remove()}}get visible(){return this.cliContainer.style.display!=="none"}set visible(e){this.cliContainer.style.display=e?"block":"none"}setPrompt(e){this.isPromptActive=!0;let t=e?.trim().replace(/[::]\s*$/,"")??"";this.promptEl.innerHTML=t?`${t}: `:"",this.textInput.placeholder="",this.recordRecentMessage(t?`${t}:`:e)}clear(){this.clearPrompt(),this.clearInput()}clearPrompt(){this.promptEl.innerHTML="",this.isPromptActive=!1}clearInput(){this.textInput.value="",this.textInput.placeholder=this.isPromptActive?"":this.localize("main.commandLine.placeholder")}focusInput(){this.textInput.focus()}setInputReadOnly(e){this.textInput.readOnly=e}showMessage(e,t="info",n){this.appendMessage(e,t,n)}cancelActiveSession(){this.activeSession&&(this.activeSession.handleEscape(),this.activeSession=void 0)}async getKeywords(e,t=!0){let n=new bN(this,e,t);this.activeSession=n;try{return await n.start()}finally{this.activeSession=void 0}}async getPromptInput(e,t,n){let i=new vN(this,e,t,n.mode,n.allowNone,n.allowTyping??!0);this.activeSession=i;try{return await i.start()}finally{this.activeSession=void 0}}localize(e,t){return P.t(e,{fallback:t})}refreshLocale(){Array.from(this.msgPanel.children).forEach(e=>{var t,n,i,o;let a=e,s=a.dataset.msgKey;if(s)if(s==="main.commandLine.executed"){let l=((n=(t=a.textContent)==null?void 0:t.split(":")[1])==null?void 0:n.trim())??"";a.textContent=`${this.localize(s)}: ${l}`}else if(s==="main.commandLine.unknownCommand"){let l=((o=(i=a.textContent)==null?void 0:i.split(":")[1])==null?void 0:o.trim())??"";a.textContent=`${this.localize(s)}: ${l}`}else a.textContent=this.localize(s)}),this.centerEl.setAttribute("data-placeholder",this.localize("main.commandLine.placeholder")),!this.isPromptActive&&!this.textInput.value&&(this.textInput.placeholder=this.localize("main.commandLine.placeholder")),this.downBtn.title=this.localize("main.commandLine.showHistory"),this.upBtn.title=this.localize("main.commandLine.showMessages")}executeCommand(e){if(!e||!e.trim())if(this.lastExecuted)e=this.lastExecuted;else{this.showMessage(this.localize("main.commandLine.noLast","(no last command)"));return}let t=this.resolveCommand(e);if(!t){let i=this.localize("main.commandLine.unknownCommand");this.showMessage(`${i}: ${e}`,"warning");return}this.history.push(t.globalName),this.historyIndex=this.history.length,this.lastExecuted=t.globalName,this.printHistoryLine(e);let n=this.localize("main.commandLine.executed");this.showMessage(`${n}: ${t.localName}`),Y.instance.sendStringToExecute(e),this.clearInput()}injectCSS(){let e=document.createElement("style");e.textContent=`
  4653. .ml-cli-container {
  4654. position: fixed;
  4655. bottom: 10px;
  4656. left: 50%;
  4657. transform: translateX(-50%);
  4658. font-family: "Segoe UI", Arial, sans-serif;
  4659. font-size: 13px;
  4660. box-sizing: border-box;
  4661. user-select: none;
  4662. max-width: calc(100% - 20px);
  4663. z-index: 5;
  4664. }
  4665. .ml-cli-bar {
  4666. display: flex;
  4667. align-items: center;
  4668. gap: 6px;
  4669. border-radius: 6px;
  4670. background: var(--ml-ui-bg, linear-gradient(#ededed, #e0e0e0));
  4671. border: 1px solid var(--ml-ui-border, rgba(0, 0, 0, 0.35));
  4672. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.25));
  4673. min-width: 300px;
  4674. height: 30px;
  4675. max-width: 100%;
  4676. overflow: hidden;
  4677. }
  4678. .ml-cli-left {
  4679. display: flex;
  4680. align-items: center;
  4681. gap: 4px;
  4682. background: var(--ml-ui-bg, rgba(0, 0, 0, 0.06));
  4683. border-radius: 4px;
  4684. border: 1px solid var(--ml-ui-border, rgba(0, 0, 0, 0.08));
  4685. height: 100%;
  4686. }
  4687. .ml-cli-close-btn {
  4688. width: 18px;
  4689. height: 16px;
  4690. display: inline-flex;
  4691. align-items: center;
  4692. justify-content: center;
  4693. font-weight: 700;
  4694. color: var(--ml-ui-text, #222);
  4695. font-size: 12px;
  4696. background: transparent;
  4697. cursor: pointer;
  4698. padding: 0;
  4699. }
  4700. .ml-cli-close-btn:hover {
  4701. background: var(--ml-ui-border, rgba(0, 0, 0, 0.10));
  4702. }
  4703. .ml-cli-down,
  4704. .ml-cli-up {
  4705. width: 16px;
  4706. height: 16px;
  4707. display: inline-flex;
  4708. align-items: center;
  4709. justify-content: center;
  4710. border-radius: 3px;
  4711. background: transparent;
  4712. border: none;
  4713. cursor: pointer;
  4714. font-size: 16px;
  4715. color: var(--ml-ui-text, #222);
  4716. padding: 0;
  4717. }
  4718. .ml-cli-up {
  4719. transform: rotate(180deg);
  4720. transform-origin: center;
  4721. }
  4722. .ml-cli-right {
  4723. display: flex;
  4724. align-items: center;
  4725. justify-content: center;
  4726. background: var(--ml-ui-bg, rgba(0, 0, 0, 0.06));
  4727. border-radius: 4px;
  4728. border: 1px solid var(--ml-ui-border, rgba(0, 0, 0, 0.08));
  4729. height: 100%;
  4730. }
  4731. .ml-cli-center {
  4732. display: flex;
  4733. align-items: center;
  4734. flex: 1;
  4735. min-width: 0;
  4736. overflow: hidden;
  4737. color: var(--ml-ui-text-muted, #333);
  4738. height: 100%;
  4739. }
  4740. .ml-cli-prompt {
  4741. display: flex;
  4742. align-items: center;
  4743. white-space: nowrap;
  4744. flex: 0 1 auto;
  4745. min-width: 0;
  4746. max-width: calc(100% - 80px);
  4747. overflow: hidden;
  4748. user-select: none;
  4749. margin-right: 4px;
  4750. line-height: 1;
  4751. font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  4752. font-size: 12px;
  4753. letter-spacing: 0;
  4754. word-spacing: 0;
  4755. }
  4756. .ml-cli-text {
  4757. flex: 1;
  4758. min-width: 76px;
  4759. height: 100%;
  4760. border: none;
  4761. outline: none;
  4762. background: transparent;
  4763. font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  4764. font-size: 13px;
  4765. line-height: 1;
  4766. letter-spacing: 0;
  4767. word-spacing: 0;
  4768. padding: 0;
  4769. margin: 0;
  4770. display: flex;
  4771. align-items: center;
  4772. color: var(--ml-ui-text-muted, #333);
  4773. }
  4774. .ml-cli-option {
  4775. display: inline-block;
  4776. background: var(--ml-ui-bg, #f7f7f7);
  4777. border: 1px solid var(--ml-ui-border, rgba(0, 0, 0, 0.06));
  4778. padding: 1px 4px;
  4779. border-radius: 3px;
  4780. margin: 0 1px;
  4781. cursor: pointer;
  4782. font-size: 12px;
  4783. line-height: 1.1;
  4784. letter-spacing: 0;
  4785. word-spacing: 0;
  4786. }
  4787. .ml-cli-option:hover {
  4788. background: var(--ml-ui-border, #eaeaea);
  4789. }
  4790. .ml-cli-cmd-popup {
  4791. position: absolute;
  4792. bottom: 100%;
  4793. left: 0;
  4794. transform: translate(0, 0);
  4795. max-height: 220px;
  4796. overflow-y: auto;
  4797. background: var(--ml-ui-bg, #333);
  4798. border: 1px solid var(--ml-ui-border, rgba(0, 0, 0, 0.5));
  4799. box-shadow: var(--ml-ui-shadow, 0 6px 18px rgba(0, 0, 0, 0.35));
  4800. border-radius: 4px;
  4801. padding: 6px 0;
  4802. color: var(--ml-ui-text, #fff);
  4803. z-index: 3;
  4804. }
  4805. .ml-cli-cmd-popup .item {
  4806. padding: 8px 14px;
  4807. cursor: pointer;
  4808. color: var(--ml-ui-text, #fff);
  4809. font-size: 14px;
  4810. }
  4811. .ml-cli-cmd-popup .item:hover {
  4812. background: var(--ml-ui-border, #444);
  4813. }
  4814. .ml-cli-msg-panel {
  4815. position: absolute;
  4816. bottom: 100%;
  4817. left: 0;
  4818. transform: translate(0, 0);
  4819. max-height: 340px;
  4820. overflow-y: auto;
  4821. background: var(--ml-ui-bg, #333);
  4822. border: 1px solid var(--ml-ui-border, rgba(0, 0, 0, 0.5));
  4823. box-shadow: var(--ml-ui-shadow, 0 6px 18px rgba(0, 0, 0, 0.35));
  4824. border-radius: 4px;
  4825. padding: 6px 0;
  4826. font-family: "Microsoft YaHei", Arial, sans-serif;
  4827. color: var(--ml-ui-text, #fff);
  4828. font-size: 14px;
  4829. white-space: pre-wrap;
  4830. line-height: 1.35;
  4831. z-index: 4;
  4832. }
  4833. .ml-cli-history-line {
  4834. padding: 4px 6px;
  4835. color: var(--ml-ui-text, #fff);
  4836. }
  4837. .ml-cli-msg-error {
  4838. color: var(--ml-ui-danger, #ff5555);
  4839. }
  4840. .ml-cli-wrapper {
  4841. position: relative;
  4842. width: 100%;
  4843. }
  4844. .ml-cli-recent {
  4845. position: absolute;
  4846. left: 0;
  4847. bottom: calc(100% + 8px);
  4848. display: flex;
  4849. flex-direction: column;
  4850. align-items: flex-start;
  4851. gap: 4px;
  4852. pointer-events: none;
  4853. z-index: 2;
  4854. }
  4855. .ml-cli-recent-line {
  4856. display: inline-block;
  4857. max-width: 100%;
  4858. overflow: hidden;
  4859. text-overflow: ellipsis;
  4860. white-space: nowrap;
  4861. color: rgba(230, 233, 238, 0.95);
  4862. background: rgba(45, 48, 54, 0.88);
  4863. border-radius: 4px;
  4864. padding: 4px 8px;
  4865. font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  4866. font-size: 12px;
  4867. line-height: 1.25;
  4868. letter-spacing: 0;
  4869. word-spacing: 0;
  4870. }
  4871. .ml-cli-recent-covered {
  4872. opacity: 0;
  4873. }
  4874. /* Scoped name avoids clashing with Tailwind's .hidden utility. */
  4875. .ml-cli-hidden {
  4876. display: none !important;
  4877. }
  4878. .ml-cli-cmd-popup::-webkit-scrollbar,
  4879. .ml-cli-msg-panel::-webkit-scrollbar {
  4880. width: 10px;
  4881. }
  4882. .ml-cli-cmd-popup::-webkit-scrollbar-thumb,
  4883. .ml-cli-msg-panel::-webkit-scrollbar-thumb {
  4884. background: var(--ml-ui-border, rgba(255, 255, 255, 0.2));
  4885. border-radius: 6px;
  4886. }
  4887. `,document.head.appendChild(e)}createUI(){this.cliContainer=document.createElement("div"),this.cliContainer.className="ml-cli-container",this.cliContainer.style.position=this.useViewportPositioning()?"fixed":"absolute",this.useViewportPositioning()||getComputedStyle(this.container).position==="static"&&(this.container.style.position="relative"),this.wrapper=document.createElement("div"),this.wrapper.className="ml-cli-wrapper",this.cliContainer.appendChild(this.wrapper),this.recentPanel=document.createElement("div"),this.recentPanel.className="ml-cli-recent",this.wrapper.appendChild(this.recentPanel),this.bar=document.createElement("div"),this.bar.className="ml-cli-bar",this.wrapper.appendChild(this.bar),this.leftGroup=document.createElement("div"),this.leftGroup.className="ml-cli-left",this.bar.appendChild(this.leftGroup),this.closeBtn=document.createElement("div"),this.closeBtn.className="ml-cli-close-btn",this.closeBtn.innerHTML="&#10005;",this.leftGroup.appendChild(this.closeBtn),this.downBtn=document.createElement("button"),this.downBtn.className="ml-cli-down",this.downBtn.innerHTML="&#9662;",this.leftGroup.appendChild(this.downBtn),this.centerEl=document.createElement("div"),this.centerEl.className="ml-cli-center",this.bar.appendChild(this.centerEl),this.promptEl=document.createElement("div"),this.promptEl.className="ml-cli-prompt",this.centerEl.appendChild(this.promptEl),this.textInput=document.createElement("input"),this.textInput.className="ml-cli-text",this.textInput.type="text",this.textInput.spellcheck=!1,this.textInput.autocomplete="off",this.textInput.placeholder=this.localize("main.commandLine.placeholder"),this.centerEl.appendChild(this.textInput);let e=document.createElement("div");e.className="ml-cli-right",this.bar.appendChild(e),this.upBtn=document.createElement("button"),this.upBtn.className="ml-cli-up",this.upBtn.innerHTML="&#9662;",e.appendChild(this.upBtn),this.cmdPopup=document.createElement("div"),this.cmdPopup.className="ml-cli-cmd-popup ml-cli-hidden",this.wrapper.appendChild(this.cmdPopup),this.msgPanel=document.createElement("div"),this.msgPanel.className="ml-cli-msg-panel ml-cli-hidden",this.wrapper.appendChild(this.msgPanel),this.container.appendChild(this.cliContainer)}bindEvents(){let e=this._domAbortController.signal;this.closeBtn.addEventListener("click",t=>{t.stopPropagation(),this.visible=!1,hr.instance.isShowCommandLine=!1},{signal:e}),this.downBtn.addEventListener("click",t=>{t.stopPropagation(),this.isCmdPopupOpen=!this.isCmdPopupOpen,this.updatePopups({showCmd:this.isCmdPopupOpen,showMsg:!1}),this.isCmdPopupOpen&&this.showCommandHistoryPopup()},{signal:e}),this.upBtn.addEventListener("click",t=>{t.stopPropagation(),this.isMsgPanelOpen=!this.isMsgPanelOpen,this.updatePopups({showCmd:!1,showMsg:this.isMsgPanelOpen}),this.isMsgPanelOpen&&this.showMessagePanel()},{signal:e}),document.addEventListener("click",t=>{this.cliContainer.contains(t.target)||this.updatePopups({showCmd:!1,showMsg:!1})},{signal:e}),this.textInput.addEventListener("keydown",t=>this.handleKeyDown(t),{signal:e}),this.textInput.addEventListener("input",()=>this.handleInputChange(),{signal:e}),this.centerEl.addEventListener("focus",()=>this.updatePopups({showCmd:!1,showMsg:!1}),{signal:e}),this.cmdPopup.addEventListener("click",t=>{let n=t.target.closest(".item");n&&(this.setInputText(n.dataset.value||""),this.centerEl.focus(),this.updatePopups({showCmd:!1,showMsg:!1}))},{signal:e})}handleKeyDown(e){if(!e.isComposing)switch(e.key){case"Enter":{if(e.preventDefault(),e.stopImmediatePropagation(),this.activeSession){this.activeSession.handleEnter(this.getInputText())||this.showMessage(this.localize("main.commandLine.invalidInput","Invalid input."),"warning");return}this.executeCommand(this.getInputText()),this.historyIndex=this.history.length,this.updatePopups({showCmd:!1,showMsg:!1});return}case"Escape":{if(e.preventDefault(),e.stopImmediatePropagation(),this.activeSession){this.activeSession.handleEscape(),this.activeSession=void 0;return}this.clear(),this.showMessage(this.localize("main.commandLine.canceled")),this.updatePopups({showCmd:!1,showMsg:!1});return}case"ArrowUp":{e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(-1):this.navigateHistory(-1);return}case"ArrowDown":{e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(1):this.navigateHistory(1);return}case"Backspace":case"Delete":{e.stopPropagation(),e.stopImmediatePropagation();return}}}handleInputChange(){let e=this.getInputText();if(!e){this.updatePopups({showCmd:!1});return}let t=Y.instance.searchCommandsByPrefix(e);t.length?(this.autoCompleteIndex=-1,this.cmdPopup.innerHTML="",t.forEach((n,i)=>{let o=document.createElement("div");o.className="item",o.dataset.value=n.command.globalName;let a=P.cmdDescription(n.commandGroup,n.command.globalName),s=Y.instance.commandManager.getCommandAliases(n.command,n.commandGroup),l=s.length?`(${s.join(", ")})`:"";o.innerHTML=`<strong>${n.command.globalName}${l} - ${a}</strong>`,i===this.autoCompleteIndex&&o.classList.add("selected"),this.cmdPopup.appendChild(o)}),this.updatePopups({showCmd:!0})):this.updatePopups({showCmd:!1})}navigateAutoComplete(e){let t=Array.from(this.cmdPopup.querySelectorAll(".item"));if(!t.length)return;this.autoCompleteIndex+=e,this.autoCompleteIndex<0&&(this.autoCompleteIndex=0),this.autoCompleteIndex>=t.length&&(this.autoCompleteIndex=t.length-1),t.forEach((i,o)=>{i.classList.toggle("selected",o===this.autoCompleteIndex)});let n=t[this.autoCompleteIndex];n&&this.setInputText(n.dataset.value??"")}navigateHistory(e){this.history.length&&(this.historyIndex===-1&&(this.historyIndex=this.history.length),this.historyIndex+=e,this.historyIndex<0&&(this.historyIndex=0),this.historyIndex>this.history.length&&(this.historyIndex=this.history.length),this.historyIndex>=0&&this.historyIndex<this.history.length?this.setInputText(this.history[this.historyIndex]):this.setInputText(""))}getInputText(){return this.textInput.value.trim()}setInputText(e=""){this.textInput.value=e,this.textInput.focus()}renderKeywordPrompt(e,t){var n;if(this.promptEl.innerHTML="",this.isPromptActive=!0,this.textInput.placeholder="",e.message){let s=e.message.trim().replace(/[::]\s*$/,"");this.promptEl.append(s+" ")}let i=e.getKeywordPromptFormat(),o=((n=e.keywords)==null?void 0:n.toArray().filter(s=>s.visible))??[];o.length&&(this.promptEl.append("["),o.forEach((s,l)=>{l>0&&this.promptEl.append("/");let c=document.createElement("span");c.className="ml-cli-option",c.textContent=s.displayName,s.enabled?c.onclick=()=>t(s.globalName):(c.style.opacity="0.45",c.style.pointerEvents="none"),this.promptEl.append(c)}),this.promptEl.append("]"));let a=i.defaultKeyword??e.valueDefaultDisplayText;a&&this.promptEl.append(` <${a}>`),this.promptEl.append(": "),this.recordRecentMessage(this.promptEl.textContent??e.message)}bindCommandLifecycleEvents(){if(this.isCommandLifecycleBound)return;let e;try{e=Y.instance.editor.events}catch{setTimeout(()=>this.bindCommandLifecycleEvents(),0);return}this._onCommandWillStart=()=>{this.cancelRecentAutoHide(),this.showRecentPanel()},this._onCommandEnded=()=>{this.scheduleRecentAutoHide()},e.commandWillStart.addEventListener(this._onCommandWillStart),e.commandEnded.addEventListener(this._onCommandEnded),this.isCommandLifecycleBound=!0}resolveCommand(e){let t=e.trim().split(/\s+/)[0].toUpperCase();return Y.instance.lookupLocalCmd(t)}updatePopups({showCmd:e=!1,showMsg:t=!1}={}){this.isCmdPopupOpen=e,this.isMsgPanelOpen=t,this.cmdPopup.classList.toggle("ml-cli-hidden",!e),this.msgPanel.classList.toggle("ml-cli-hidden",!t),this.recentPanel.classList.toggle("ml-cli-recent-covered",t),e&&this.positionCmdPopup(),t&&this.positionMsgPanel()}showCommandHistoryPopup(){if(this.cmdPopup.innerHTML="",this.history.length)for(let e=this.history.length-1;e>=0;e--){let t=document.createElement("div");t.className="item",t.dataset.value=this.history[e],t.textContent=this.history[e],this.cmdPopup.appendChild(t)}else{let e=document.createElement("div");e.className="item",e.textContent=this.localize("main.commandLine.noHistory"),this.cmdPopup.appendChild(e)}this.positionCmdPopup()}positionCmdPopup(){this.cmdPopup.style.left="0px",this.cmdPopup.style.width=this.bar.offsetWidth+"px"}showMessagePanel(){if(!this.msgPanel.children.length){let e=document.createElement("div");e.className="ml-cli-history-line",e.textContent=this.localize("main.commandLine.noHistory"),e.dataset.msgKey="main.commandLine.noHistory",this.msgPanel.appendChild(e)}this.msgPanel.scrollTop=this.msgPanel.scrollHeight,this.positionMsgPanel()}positionMsgPanel(){this.msgPanel.style.width=this.bar.offsetWidth+"px"}clearNoHistoryPlaceholder(){Array.from(this.msgPanel.children).forEach(e=>{let t=e;t.dataset.msgKey==="main.commandLine.noHistory"&&this.msgPanel.removeChild(t)})}appendMessage(e,t="info",n){this.clearNoHistoryPlaceholder();let i=document.createElement("div");i.className=t==="warning"?"ml-cli-history-line ml-cli-msg-error":"ml-cli-history-line",i.textContent=e,n&&(i.dataset.msgKey=n),this.msgPanel.appendChild(i),this.recordRecentMessage(e),this.showMessagePanel()}printHistoryLine(e){this.clearNoHistoryPlaceholder();let t=document.createElement("div");t.className="ml-cli-history-line",t.textContent="> "+e,t.dataset.msgKey="main.commandLine.executed",this.msgPanel.appendChild(t),this.showMessagePanel()}resizeHandler(){let e=this.useViewportPositioning()?window.innerWidth:this.container.getBoundingClientRect().width,t=Math.max(this.minWidth,e*this.widthRatio);t=Math.min(t,Math.max(200,e-20)),this.bar.style.width=t+"px",this.recentPanel.style.width=t+"px",this.positionMsgPanel(),this.positionCmdPopup()}recordRecentMessage(e){let t=e?.replace(/\s+/g," ").trim();t&&(this.recentMessages.push(t),this.recentMessages.length>2&&this.recentMessages.shift(),this.showRecentPanel(),this.renderRecentMessages())}renderRecentMessages(){this.recentPanel.innerHTML="",this.recentMessages.forEach(e=>{let t=document.createElement("div");t.className="ml-cli-recent-line",t.textContent=e,this.recentPanel.appendChild(t)})}scheduleRecentAutoHide(){this.cancelRecentAutoHide(),this.recentHideTimer=setTimeout(()=>{this.hideRecentPanel(),this.recentHideTimer=void 0},2e3)}cancelRecentAutoHide(){this.recentHideTimer&&(clearTimeout(this.recentHideTimer),this.recentHideTimer=void 0)}showRecentPanel(){this.recentPanel.classList.remove("ml-cli-hidden")}hideRecentPanel(){this.recentPanel.classList.add("ml-cli-hidden")}useViewportPositioning(){return this.container===document.body}},_3e="ml-desktop-session-accessory-styles",S3e=`
  4888. .ml-desktop-session-accessory {
  4889. position: absolute;
  4890. top: 20px;
  4891. left: 50%;
  4892. transform: translateX(-50%);
  4893. z-index: ${iOe};
  4894. display: none;
  4895. align-items: center;
  4896. gap: 8px;
  4897. padding: 4px 8px;
  4898. box-sizing: border-box;
  4899. border: 1px solid var(--ml-ui-border, #dcdfe6);
  4900. border-radius: 6px;
  4901. background: var(--ml-ui-bg, rgba(255, 255, 255, 0.96));
  4902. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
  4903. color: var(--ml-ui-text, #303133);
  4904. pointer-events: auto;
  4905. }
  4906. .ml-desktop-session-accessory.is-visible {
  4907. display: inline-flex;
  4908. }
  4909. .ml-desktop-session-accessory__slot {
  4910. display: flex;
  4911. align-items: center;
  4912. gap: 8px;
  4913. }
  4914. `,lte=class cte{constructor(e){cte.injectCss(),getComputedStyle(e).position==="static"&&(e.style.position="relative"),this.root=document.createElement("div"),this.root.className="ml-desktop-session-accessory",this.root.hidden=!0,this.root.setAttribute("aria-hidden","true"),this.slot=document.createElement("div"),this.slot.className="ml-desktop-session-accessory__slot",this.root.appendChild(this.slot),this.sinkPointer(this.root),this.sinkPointer(this.slot),zs(Jo(e),this.root),e.appendChild(this.root)}get host(){return this.slot}prepare(){this.root.hidden=!1,this.root.classList.add("is-visible"),this.root.setAttribute("aria-hidden","false")}clear(){this.slot.replaceChildren(),this.root.hidden=!0,this.root.classList.remove("is-visible"),this.root.setAttribute("aria-hidden","true")}dispose(){this.clear(),this.root.remove()}sinkPointer(e){e.addEventListener("pointerdown",t=>{t.stopPropagation()})}static injectCss(){if(this.stylesInjected||typeof document>"u")return;this.stylesInjected=!0;let e=document.createElement("style");e.id=_3e,e.textContent=S3e,document.head.appendChild(e)}};lte.stylesInjected=!1;var A3e=lte;function tU(...r){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1024 1024">${r.map(e=>`<path fill="currentColor" d="${e}"/>`).join("")}</svg>`}var ute='<path fill="currentColor" d="M9.3333 14.125 5.875 10.6667V14.125H9.3333Zm4.7917-3.4583-3.4583 3.4583H14.125V10.6667ZM10.6667 5.875 14.125 9.3333V5.875H10.6667ZM5.875 9.3333 9.3333 5.875H5.875V9.3333Zm9.2083 5.475c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917S.9417 7.275 4.1083 4.1083C7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Z"/>',ast=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${ute}</svg>`;var M3e='<path fill="currentColor" fill-rule="evenodd" d="M2.25 15h15.5v3.4H2.25Zm1.5 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Z"/>',In="var(--el-color-primary, var(--ml-ui-accent, #409eff))";function hm(r){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${r}${M3e}</svg>`}var sst=hm(`<rect fill="${In}" x="2.9" y="2.5" width="1.25" height="8.8" rx=".2"/><rect fill="${In}" x="15.85" y="2.5" width="1.25" height="8.8" rx=".2"/><path fill="${In}" d="M4.4 6.9 7.2 5.05v3.7Z"/><path fill="${In}" d="M15.6 6.9 12.8 5.05v3.7Z"/><rect fill="${In}" x="6.7" y="6.25" width="6.6" height="1.3"/>`),lst=hm(`<rect fill="${In}" x="2.9" y="2.5" width="1.25" height="8.8" rx=".2"/><rect fill="${In}" x="15.85" y="2.5" width="1.25" height="8.8" rx=".2"/><path fill="${In}" d="M4.4 6.9 7.2 5.05v3.7Z"/><path fill="${In}" d="M15.6 6.9 12.8 5.05v3.7Z"/><rect fill="${In}" x="6.7" y="6.25" width="6.6" height="1.3"/><circle fill="currentColor" cx="10" cy="3.45" r="2.2"/><text x="10" y="4.42" text-anchor="middle" font-size="3.15" font-weight="700" font-family="Arial,Helvetica,sans-serif" fill="${In}">n</text>`),cst=hm(`<g fill="none" stroke="${In}" stroke-linejoin="miter"><path stroke-width="1.55" stroke-linecap="butt" d="M16.9 12.25H4.9L11.6 3.03"/><path stroke-width="1.7" stroke-linecap="butt" d="M11.05 12.25A6.15 6.15 0 0 0 8.51 7.27"/></g><path fill="${In}" d="M11.05 12.25 9.85 10.55h2.4Z"/><path fill="${In}" d="M8.51 7.27 10.46 7.39 9.23 9.09Z"/>`),ust=hm(`<path fill="${In}" d="M5 12V4.2A7.8 7.8 0 0 1 12.8 12Z"/>`),hst=hm(`<g fill="none" stroke-linejoin="miter"><path stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" d="M4.9 11.6A8.3 8.3 0 0 1 13.2 3.3"/><path stroke="currentColor" stroke-width="1.35" stroke-linecap="square" d="M10.4 11.6H13.2V8.8"/><path stroke="currentColor" stroke-width="1.35" stroke-linecap="butt" d="M13.2 11.6v1.7"/><rect stroke="${In}" stroke-width="1.15" x="3.65" y="10.35" width="2.5" height="2.5"/><rect stroke="${In}" stroke-width="1.15" x="11.95" y="2.05" width="2.5" height="2.5"/></g>`),dst=hm(`<circle fill="none" stroke="${In}" stroke-width="1.4" cx="9.1" cy="7.3" r="4.7"/><circle fill="${In}" cx="9.1" cy="7.3" r="1.05"/><path fill="none" stroke="${In}" stroke-width="1.35" stroke-linecap="round" d="M9.1 7.3 13.35 3.7"/><path fill="${In}" d="M13.35 3.7 11.15 4.2 12.55 5.7Z"/>`),pst=hm(`<g fill="none" stroke="${In}" stroke-linecap="round" stroke-linejoin="round"><path stroke-width="1.4" d="M4 4.8v7.4h7.6"/><path stroke-width="1.2" stroke-dasharray="1.7 1.2" d="M4 6.9h7M11 12.2V6.9"/></g><path fill="${In}" d="M4 2.5 2.45 4.8h3.1ZM13.8 12.2 11.5 10.7v3Z"/><circle fill="${In}" cx="11" cy="6.9" r="1.3"/>`);var P3e='<path fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="butt" stroke-linejoin="miter" d="M2.6 6.8v8.5h5.2l2.2 2.4 2.2-2.4h5.2"/>',hte='<g fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" transform="rotate(46 14.8 9)"><rect x="13.65" y="4.7" width="2.3" height="5.6" rx="1.05"/><path d="M13.65 10.3 14.8 12.9 15.95 10.3"/></g>';function Yb(r){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${P3e}${r}</svg>`}var fst=Yb('<path fill="currentColor" d="M6.4 12.2c-1.85 0-3.3-1.25-3.3-2.85 0-1.35.95-2.5 2.3-2.8.45-1.7 1.95-2.85 3.7-2.85 1.25 0 2.35.55 3.05 1.45.55-.7 1.45-1.15 2.5-1.15 1.85 0 3.25 1.3 3.25 2.95 0 .3-.05.55-.1.8 1.2.4 2.05 1.4 2.05 2.65 0 1.55-1.5 2.8-3.4 2.8H6.4Z"/>'),mst=Yb(`<rect fill="none" stroke="currentColor" stroke-width="1.35" x="5" y="2.8" width="8.2" height="7.2"/><rect fill="${In}" x="4.2" y="2" width="2" height="2"/><rect fill="${In}" x="12.2" y="9" width="2" height="2"/>${hte}`),gst=Yb(`<ellipse fill="none" stroke="currentColor" stroke-width="1.35" cx="9" cy="6.6" rx="4" ry="3.6"/><rect fill="${In}" x="8" y="2.1" width="2" height="2"/><rect fill="${In}" x="4" y="5.6" width="2" height="2"/>${hte}`),yst=Yb('<path fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" d="M4.4 12.6 10.2 7"/><rect fill="currentColor" x="10.2" y="1.2" width="7.8" height="5.8" rx=".35"/>'),bst=Yb('<path fill="currentColor" fill-rule="evenodd" d="M10 2.2 15.3 13.1h-2.2l-1.05-2.95H7.95L6.9 13.1H4.7L10 2.2Zm0 3.4-1.15 3.2h2.3L10 5.6Z"/>');var vst=Yb('<g transform="rotate(-40 10 7.6)" fill="currentColor"><path d="M3.5 6.75h9V5.15L16.7 7.6 12.5 10.05V8.45h-9Z"/></g>'),xst=tU("M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"),wst=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3.5" y="3" width="13" height="14" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.5"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M3.5 6.5h13"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M6.5 9.5h7M6.5 12h7M6.5 14.5h3.2"/><g fill="none" stroke="${In}" stroke-width="1.7" stroke-linecap="round"><circle cx="14.5" cy="14.7" r="4.2"/><path d="M17.5 17.7 19.5 19.7"/></g></svg>`;var _st=tU("M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"),Sst=tU("M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176","M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48");var E3e='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 6.5 5.5 11h9L10 6.5Z"/></svg>',C3e='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 13.5 14.5 9h-9L10 13.5Z"/></svg>',dte='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M13.5 10 9 14.5V5.5L13.5 10Z"/></svg>',pte='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M6.5 10 11 14.5V5.5L6.5 10Z"/></svg>';var Ast=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${ute}<path fill="${In}" d="M14.85 0.85 15.95 4.05 19.15 5.15 15.95 6.25 14.85 9.45 13.75 6.25 10.55 5.15 13.75 4.05Z"/><path fill="${In}" d="M17.55 8.35 18.15 10.15 19.95 10.75 18.15 11.35 17.55 13.15 16.95 11.35 15.15 10.75 16.95 10.15Z"/></svg>`;var fte='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><circle cx="4" cy="10" r="1.6" fill="currentColor"/><circle cx="10" cy="10" r="1.6" fill="currentColor"/><circle cx="16" cy="10" r="1.6" fill="currentColor"/></svg>',T3e='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11"/></svg>',k3e='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 14 5-5-5-5"/><path d="M20 9H9.5a5.5 5.5 0 0 0 0 11H13"/></svg>',I3e='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>',L3e='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none"><text x="2" y="18" font-family="Georgia, Times New Roman, serif" font-size="16" font-weight="600" fill="currentColor">A</text><g stroke="#2dd4bf" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M18 4v16"/><path d="M15.5 6.5 18 4l2.5 2.5"/><path d="M15.5 17.5 18 20l2.5-2.5"/></g></svg>',O3e='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>';function Ll(r,e="ml-ex-ui-icon"){if(typeof r=="function")return r();if(r instanceof HTMLElement)return r.cloneNode(!0);let t=document.createElement("span");return t.className=e,t.innerHTML=r,t}var zJ="ml-entity-pick-cancel-styles",D3e=`
  4915. .ml-entity-pick-cancel {
  4916. position: absolute;
  4917. top: 48px;
  4918. right: 12px;
  4919. z-index: ${aOe};
  4920. width: 36px;
  4921. height: 36px;
  4922. padding: 0;
  4923. display: inline-flex;
  4924. align-items: center;
  4925. justify-content: center;
  4926. border: 1px solid var(--ml-ui-border, #dcdfe6);
  4927. border-radius: 8px;
  4928. background: var(--ml-ui-bg, rgba(255, 255, 255, 0.96));
  4929. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
  4930. color: var(--ml-ui-text, #303133);
  4931. cursor: pointer;
  4932. pointer-events: auto;
  4933. box-sizing: border-box;
  4934. }
  4935. .ml-entity-pick-cancel[hidden] {
  4936. display: none !important;
  4937. }
  4938. .ml-entity-pick-cancel .ml-ex-ui-icon {
  4939. display: inline-flex;
  4940. width: 18px;
  4941. height: 18px;
  4942. }
  4943. .ml-entity-pick-cancel .ml-ex-ui-icon svg {
  4944. width: 18px;
  4945. height: 18px;
  4946. }
  4947. `;function R3e(){if(typeof document>"u"||document.getElementById(zJ))return;let r=document.createElement("style");r.id=zJ,r.textContent=D3e,document.head.appendChild(r)}var wN=class{constructor(e){this.options=e,this.visible=!1,R3e(),this.onCancel=e.onCancel,getComputedStyle(e.container).position==="static"&&(e.container.style.position="relative"),this.button=document.createElement("button"),this.button.type="button",this.button.className="ml-entity-pick-cancel",this.button.hidden=!0;let t=e.label??"Cancel";this.button.title=t,this.button.setAttribute("aria-label",t),e.topOffsetPx!=null&&(this.button.style.top=`${e.topOffsetPx}px`),this.button.appendChild(Ll(O3e)),this.button.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.onCancel()}),zs(Jo(e.container),this.button),e.container.appendChild(this.button)}setLabel(e){this.button.title=e,this.button.setAttribute("aria-label",e)}setTopOffset(e){this.button.style.top=`${e}px`}show(){this.visible=!0,this.button.hidden=!1,zs(Jo(this.options.container),this.button)}hide(){this.visible=!1,this.button.hidden=!0}get isVisible(){return this.visible}dispose(){this.button.remove()}},mte=500,B3e=10,_T=class ih{constructor(e){this.disposed=!1,ih.ensureStyles();let t=e.host??document.body;this.host=t,this.hostPositionRestore=ih.ensureHostContainingBlock(t);let n=e.titleId??`ml-ui-dialog-title-${ih.nextTitleId++}`;this.closeOnEscape=e.closeOnEscape??!0,this.previouslyFocused=document.activeElement instanceof HTMLElement?document.activeElement:null,this.backdrop=document.createElement("div"),this.backdrop.className="ml-ui-dialog-backdrop",zs(e.theme??Jo(t),this.backdrop),(e.closeOnBackdrop??!0)&&this.backdrop.addEventListener("mousedown",o=>{o.target===this.backdrop&&this.close()}),this.dialog=document.createElement("div"),this.dialog.className=["ml-ui-dialog",e.layoutWidth===!1?ih.compactClass:"",e.dialogClassName].filter(Boolean).join(" "),this.dialog.setAttribute("role","dialog"),this.dialog.setAttribute("aria-modal","true"),this.dialog.setAttribute("aria-labelledby",n),this.dialog.tabIndex=-1,this.dialog.addEventListener("mousedown",o=>o.stopPropagation());let i=document.createElement("div");if(i.className="ml-ui-dialog-header",e.titleAlign==="center"&&i.classList.add("ml-ui-dialog-header--center"),this.titleEl=document.createElement("div"),this.titleEl.id=n,this.titleEl.className="ml-ui-dialog-title",this.titleEl.textContent=e.title,i.appendChild(this.titleEl),e.showCloseButton!==!1){let o=document.createElement("button");o.type="button",o.className="ml-ui-dialog-close",o.setAttribute("aria-label",e.closeLabel??"Close"),o.textContent="\xD7",o.addEventListener("click",()=>this.close()),i.appendChild(o)}this.bodyEl=document.createElement("div"),this.bodyEl.className="ml-ui-dialog-body",this.footerEl=document.createElement("div"),this.footerEl.className="ml-ui-dialog-footer",this.dialog.appendChild(i),this.dialog.appendChild(this.bodyEl),this.dialog.appendChild(this.footerEl),this.backdrop.appendChild(this.dialog),t.appendChild(this.backdrop),this.onKeyDown=o=>{if(o.key==="Escape"){if(!this.closeOnEscape)return;o.preventDefault(),this.close();return}o.key==="Tab"&&this.trapFocus(o)},window.addEventListener("keydown",this.onKeyDown)}show(){return this.openPromise||(this.openPromise=new Promise(e=>{this.resolve=e})),this.openPromise}close(){var e,t;this.disposed||(this.disposed=!0,window.removeEventListener("keydown",this.onKeyDown),this.backdrop.parentNode&&this.backdrop.parentNode.removeChild(this.backdrop),this.hostPositionRestore!==null&&(this.host.style.position=this.hostPositionRestore),(e=this.previouslyFocused)==null||e.focus(),(t=this.resolve)==null||t.call(this),this.resolve=void 0)}focusAfterOpen(e){queueMicrotask(()=>e.focus())}trapFocus(e){let t=this.getFocusableElements();if(t.length===0){e.preventDefault(),this.dialog.focus();return}let n=t[0],i=t[t.length-1],o=document.activeElement;if(e.shiftKey){(o===n||!this.dialog.contains(o))&&(e.preventDefault(),i.focus());return}(o===i||!this.dialog.contains(o))&&(e.preventDefault(),n.focus())}getFocusableElements(){let e=["a[href]","button:not([disabled])","textarea:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(this.dialog.querySelectorAll(e)).filter(t=>!t.hasAttribute("disabled")&&t.getAttribute("aria-hidden")!=="true"&&t.tabIndex>=0&&t.offsetParent!==null)}static ensureHostContainingBlock(e){if((getComputedStyle(e).position||"static")!=="static")return null;let t=e.style.position;return e.style.position="relative",t}static ensureStyles(){if(document.getElementById(ih.styleId))return;let e=document.createElement("style");e.id=ih.styleId,e.textContent=`
  4948. .ml-ui-dialog-backdrop {
  4949. position: absolute;
  4950. inset: 0;
  4951. z-index: 10050;
  4952. display: flex;
  4953. align-items: center;
  4954. justify-content: center;
  4955. background: var(--ml-ui-overlay, rgba(0, 0, 0, 0.45));
  4956. font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  4957. }
  4958. .ml-ui-dialog {
  4959. width: ${g1}px;
  4960. max-width: ${aN};
  4961. max-height: 100%;
  4962. overflow: auto;
  4963. box-sizing: border-box;
  4964. padding: 16px 18px 14px;
  4965. border-radius: 10px;
  4966. border: 1px solid var(--ml-ui-border, #dcdfe6);
  4967. background: var(--ml-ui-bg, #ffffff);
  4968. color: var(--ml-ui-text, #303133);
  4969. box-shadow: var(--ml-ui-shadow, 0 8px 28px rgba(0, 0, 0, 0.28));
  4970. }
  4971. .ml-ui-dialog.${ih.compactClass} {
  4972. width: min(360px, calc(100vw - 32px));
  4973. max-width: none;
  4974. }
  4975. @media (max-width: ${eU}px) {
  4976. .ml-ui-dialog:not(.${ih.compactClass}) {
  4977. width: 100%;
  4978. max-width: none;
  4979. padding-left: max(12px, env(safe-area-inset-left, 0px));
  4980. padding-right: max(12px, env(safe-area-inset-right, 0px));
  4981. }
  4982. }
  4983. .ml-ui-dialog-header {
  4984. display: flex;
  4985. align-items: center;
  4986. justify-content: space-between;
  4987. margin-bottom: 14px;
  4988. }
  4989. .ml-ui-dialog-header--center {
  4990. justify-content: center;
  4991. }
  4992. .ml-ui-dialog-header--center .ml-ui-dialog-title {
  4993. flex: 1;
  4994. text-align: center;
  4995. }
  4996. .ml-ui-dialog-title {
  4997. font-size: 14px;
  4998. font-weight: 600;
  4999. }
  5000. .ml-ui-dialog-close {
  5001. border: none;
  5002. background: transparent;
  5003. color: var(--ml-ui-text-muted, #606266);
  5004. cursor: pointer;
  5005. font-size: 18px;
  5006. line-height: 1;
  5007. padding: 2px 6px;
  5008. }
  5009. .ml-ui-dialog-body {
  5010. min-width: 0;
  5011. }
  5012. .ml-ui-dialog-footer:empty {
  5013. display: none;
  5014. }
  5015. .ml-ui-dialog-footer:not(:empty) {
  5016. display: flex;
  5017. justify-content: flex-end;
  5018. margin-top: 16px;
  5019. gap: 8px;
  5020. }
  5021. .ml-ui-dialog-btn {
  5022. min-width: 72px;
  5023. padding: 6px 14px;
  5024. border-radius: 4px;
  5025. border: 1px solid var(--ml-ui-accent, #0b84ff);
  5026. background: var(--ml-ui-accent, #0b84ff);
  5027. color: #fff;
  5028. cursor: pointer;
  5029. font-size: 12px;
  5030. }
  5031. .ml-ui-dialog-btn:hover {
  5032. filter: brightness(1.05);
  5033. }
  5034. .ml-ui-dialog-btn-secondary {
  5035. border: 1px solid var(--ml-ui-border, #dcdfe6);
  5036. background: var(--ml-ui-bg, #ffffff);
  5037. color: var(--ml-ui-text, #303133);
  5038. }
  5039. .ml-ui-dialog-btn-secondary:hover {
  5040. filter: none;
  5041. background: var(--ml-ui-border, #dcdfe6);
  5042. }
  5043. `.trim(),document.head.appendChild(e)}};_T.styleId="ml-ui-dialog-styles",_T.compactClass="ml-ui-dialog--compact",_T.nextTitleId=0;var tS=_T,UJ="ml-ui-touch-point-tutorial-styles",Dc=1e4,gte=38,yte=42,_N=4,F3e=500,aT=500,jJ=2e3,N3e=900,Kf=1800,z3e=400,sT=280,yF=180,U3e=36,j3e=U3e/2,V3e=5,SN=18,bte=SN/2,G3e=j3e+V3e+bte;function vte(r=new Date){let e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`}function H3e(r,e){return!(!r()||e.hideForever||e.snoozeDate!=null&&e.snoozeDate===vte())}var xte=class _r extends tS{constructor(e){super({host:e.host,title:e.labels.title,theme:e.theme,layoutWidth:!1,showCloseButton:!1,titleAlign:"center",closeOnBackdrop:!1,closeOnEscape:!1,dialogClassName:"ml-ui-touch-point-tutorial"}),this.config=e,_r.ensureTutorialStyles(e.longPressMs);let t=document.createElement("p");t.className="ml-ui-touch-point-tutorial-desc",t.textContent=e.labels.description,this.bodyEl.appendChild(t),this.bodyEl.appendChild(_r.createDemo());let n=document.createElement("div");n.className="ml-ui-touch-point-tutorial-options",this.snoozeTodayCheckbox=document.createElement("input"),this.snoozeTodayCheckbox.type="checkbox",this.snoozeTodayCheckbox.id="ml-touch-tutorial-snooze-today",this.snoozeTodayCheckbox.checked=!0;let i=document.createElement("label");i.className="ml-ui-touch-point-tutorial-option",i.htmlFor=this.snoozeTodayCheckbox.id,i.append(this.snoozeTodayCheckbox,document.createTextNode("")),i.lastChild.textContent=e.labels.snoozeToday,this.hideForeverCheckbox=document.createElement("input"),this.hideForeverCheckbox.type="checkbox",this.hideForeverCheckbox.id="ml-touch-tutorial-hide-forever";let o=document.createElement("label");o.className="ml-ui-touch-point-tutorial-option",o.htmlFor=this.hideForeverCheckbox.id,o.append(this.hideForeverCheckbox,document.createTextNode("")),o.lastChild.textContent=e.labels.hideForever,this.hideForeverCheckbox.addEventListener("change",()=>{this.hideForeverCheckbox.checked&&(this.snoozeTodayCheckbox.checked=!1)}),this.snoozeTodayCheckbox.addEventListener("change",()=>{this.snoozeTodayCheckbox.checked&&(this.hideForeverCheckbox.checked=!1)}),n.append(i,o),this.bodyEl.appendChild(n);let a=document.createElement("button");a.type="button",a.className="ml-ui-touch-point-tutorial-ok",a.textContent=e.labels.ok,a.addEventListener("click",()=>this.dismiss()),this.footerEl.appendChild(a),this.focusAfterOpen(a)}static maybeShow(e){var t;if(!e.shouldShow())return Promise.resolve();(t=_r.openInstance)==null||t.close();let n=new _r(e);return _r.openInstance=n,n.show()}close(){_r.openInstance===this&&(_r.openInstance=null),super.close()}dismiss(){let e=this.config.readPrefs();this.hideForeverCheckbox.checked?this.config.writePrefs({hideForever:!0,snoozeDate:null}):this.snoozeTodayCheckbox.checked&&this.config.writePrefs({hideForever:e.hideForever,snoozeDate:vte()}),this.close()}static createDemo(){let e=X3e(),t=document.createElement("div");t.className="ml-touch-tutorial-demo",t.setAttribute("aria-hidden","true");let n=document.createElement("div");n.className="ml-touch-tutorial-canvas",n.style.setProperty("--ml-touch-snap-x",`${e.xPct}%`),n.style.setProperty("--ml-touch-snap-y",`${e.yPct}%`),n.style.setProperty("--ml-touch-cross-above",`${G3e}px`),n.style.setProperty("--ml-touch-cross-half",`${bte}px`);let i=document.createElement("div");i.className="ml-touch-tutorial-roads",i.innerHTML=Y3e();let o=document.createElement("div");o.className="ml-touch-tutorial-snap-box";let a=document.createElement("div");a.className="ml-touch-tutorial-touch-group";let s=document.createElement("div");s.className="ml-touch-tutorial-touch-zone",s.innerHTML=$3e();let l=document.createElement("div");l.className="ml-touch-tutorial-finger",l.innerHTML=K3e();let c=document.createElement("div");return c.className="ml-touch-tutorial-cross",c.innerHTML=q3e(),a.append(s,l),n.append(i,o,a,c),t.appendChild(n),t}static pct(e){return(e/Dc*100).toFixed(2)}static pctAfter(e,t){return _r.pct(e+t)}static ensureTutorialStyles(e){if(document.getElementById(UJ))return;let t=_r.pct(sT),n=_r.pct(sT+yF),i=n,o=_r.pct(sT+yF+F3e),a=_r.pct(e),s=_r.pctAfter(e,Kf),l=_r.pctAfter(e,Kf+z3e),c=_r.pctAfter(e,Kf+aT),u=_r.pctAfter(e,Kf+aT+jJ),h=u,d=_r.pctAfter(e,Kf+aT+jJ+N3e),p=_r.pct(Dc-400),f=_r.pctAfter(sT+yF,80),m=_r.pctAfter(e,60),g=_r.pctAfter(e,Kf+1),y=_r.pctAfter(e,Kf+aT+1),b=document.createElement("style");b.id=UJ,b.textContent=`
  5044. .ml-ui-touch-point-tutorial {
  5045. padding: 16px 18px;
  5046. }
  5047. .ml-ui-touch-point-tutorial-desc {
  5048. margin: 0 0 12px;
  5049. font-size: 12px;
  5050. line-height: 1.55;
  5051. color: var(--ml-ui-text-muted, #606266);
  5052. text-align: center;
  5053. }
  5054. .ml-touch-tutorial-demo {
  5055. margin: 0 auto 14px;
  5056. max-width: 100%;
  5057. }
  5058. .ml-touch-tutorial-canvas {
  5059. position: relative;
  5060. width: 100%;
  5061. aspect-ratio: 16 / 10;
  5062. background: #0a0a0a;
  5063. border-radius: 4px;
  5064. overflow: hidden;
  5065. }
  5066. .ml-touch-tutorial-roads {
  5067. position: absolute;
  5068. inset: 0;
  5069. width: 100%;
  5070. height: 100%;
  5071. pointer-events: none;
  5072. }
  5073. .ml-touch-tutorial-roads svg {
  5074. display: block;
  5075. width: 100%;
  5076. height: 100%;
  5077. }
  5078. .ml-touch-tutorial-touch-group {
  5079. position: absolute;
  5080. left: 70%;
  5081. top: 76%;
  5082. width: 0;
  5083. height: 0;
  5084. animation: ml-touch-group ${Dc}ms ease-in-out infinite;
  5085. z-index: 4;
  5086. }
  5087. .ml-touch-tutorial-touch-zone {
  5088. position: absolute;
  5089. left: 0;
  5090. top: 0;
  5091. width: 36px;
  5092. height: 36px;
  5093. margin: -18px 0 0 -18px;
  5094. pointer-events: none;
  5095. opacity: 0;
  5096. animation: ml-touch-zone-opacity ${Dc}ms linear infinite;
  5097. z-index: 1;
  5098. }
  5099. .ml-touch-tutorial-touch-zone svg {
  5100. display: block;
  5101. width: 100%;
  5102. height: 100%;
  5103. }
  5104. .ml-touch-tutorial-touch-fill {
  5105. opacity: 1;
  5106. }
  5107. .ml-touch-tutorial-touch-ring {
  5108. fill: none;
  5109. stroke: rgba(255, 255, 255, 0.95);
  5110. stroke-width: 2;
  5111. stroke-dasharray: 113.1;
  5112. stroke-dashoffset: 113.1;
  5113. animation: ml-touch-ring ${Dc}ms linear infinite;
  5114. }
  5115. .ml-touch-tutorial-finger {
  5116. position: absolute;
  5117. left: 0;
  5118. top: 0;
  5119. width: 30px;
  5120. height: 38px;
  5121. margin: -6px 0 0 -15px;
  5122. opacity: 0;
  5123. animation: ml-touch-finger-opacity ${Dc}ms linear infinite;
  5124. z-index: 2;
  5125. }
  5126. .ml-touch-tutorial-finger svg {
  5127. display: block;
  5128. width: 100%;
  5129. height: 100%;
  5130. filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  5131. }
  5132. .ml-touch-tutorial-cross {
  5133. position: absolute;
  5134. left: 70%;
  5135. top: calc(76% - var(--ml-touch-cross-above));
  5136. width: ${SN}px;
  5137. height: ${SN}px;
  5138. margin: calc(-1 * var(--ml-touch-cross-half)) 0 0 calc(-1 * var(--ml-touch-cross-half));
  5139. color: var(--ml-ui-accent, #0b84ff);
  5140. opacity: 0;
  5141. animation:
  5142. ml-touch-cross-move ${Dc}ms ease-in-out infinite,
  5143. ml-touch-cross-opacity ${Dc}ms linear infinite,
  5144. ml-touch-cross-color ${Dc}ms step-end infinite;
  5145. z-index: 5;
  5146. }
  5147. .ml-touch-tutorial-cross svg {
  5148. display: block;
  5149. width: 100%;
  5150. height: 100%;
  5151. }
  5152. .ml-touch-tutorial-snap-box {
  5153. position: absolute;
  5154. left: var(--ml-touch-snap-x);
  5155. top: var(--ml-touch-snap-y);
  5156. width: 22px;
  5157. height: 22px;
  5158. margin: -11px 0 0 -11px;
  5159. border: 2px solid #0f0;
  5160. border-radius: 1px;
  5161. box-sizing: border-box;
  5162. opacity: 0;
  5163. pointer-events: none;
  5164. animation: ml-touch-snap-box ${Dc}ms step-end infinite;
  5165. z-index: 3;
  5166. }
  5167. @keyframes ml-touch-group {
  5168. 0%, ${a}% {
  5169. left: 70%;
  5170. top: 76%;
  5171. }
  5172. ${s}%, ${u}% {
  5173. left: var(--ml-touch-snap-x);
  5174. top: calc(var(--ml-touch-snap-y) + var(--ml-touch-cross-above) + var(--ml-touch-cross-half));
  5175. }
  5176. ${d}%, 100% {
  5177. left: 70%;
  5178. top: 76%;
  5179. }
  5180. }
  5181. @keyframes ml-touch-zone-opacity {
  5182. 0%, ${n}% { opacity: 0; }
  5183. ${f}%, ${h}% { opacity: 1; }
  5184. ${d}%, 100% { opacity: 0; }
  5185. }
  5186. @keyframes ml-touch-finger-opacity {
  5187. 0%, 2% { opacity: 0; }
  5188. ${t}%, 99.99% { opacity: 1; }
  5189. 100% { opacity: 0; }
  5190. }
  5191. @keyframes ml-touch-ring {
  5192. 0%, ${i}% { stroke-dashoffset: 113.1; }
  5193. ${o}%, ${p}% { stroke-dashoffset: 0; }
  5194. 100% { stroke-dashoffset: 113.1; }
  5195. }
  5196. @keyframes ml-touch-cross-move {
  5197. 0%, ${a}% {
  5198. left: 70%;
  5199. top: calc(76% - var(--ml-touch-cross-above));
  5200. }
  5201. ${s}%, ${l}% {
  5202. left: var(--ml-touch-snap-x);
  5203. top: calc(var(--ml-touch-snap-y) + var(--ml-touch-cross-half));
  5204. }
  5205. ${l}%, 99.99% {
  5206. left: var(--ml-touch-snap-x);
  5207. top: var(--ml-touch-snap-y);
  5208. }
  5209. 100% {
  5210. left: 70%;
  5211. top: calc(76% - var(--ml-touch-cross-above));
  5212. }
  5213. }
  5214. @keyframes ml-touch-cross-opacity {
  5215. 0%, ${a}% { opacity: 0; }
  5216. ${m}%, ${d}% { opacity: 1; }
  5217. ${p}%, 100% { opacity: 0; }
  5218. }
  5219. @keyframes ml-touch-cross-color {
  5220. 0%, ${c}% { color: var(--ml-ui-accent, #0b84ff); }
  5221. ${y}%, ${d}% { color: #0f0; }
  5222. 100% { color: var(--ml-ui-accent, #0b84ff); }
  5223. }
  5224. @keyframes ml-touch-snap-box {
  5225. 0%, ${s}% { opacity: 0; }
  5226. ${g}%, ${c}% { opacity: 1; }
  5227. ${y}%, 100% { opacity: 0; }
  5228. }
  5229. .ml-ui-touch-point-tutorial-options {
  5230. display: flex;
  5231. flex-direction: column;
  5232. gap: 8px;
  5233. margin-bottom: 4px;
  5234. }
  5235. .ml-ui-touch-point-tutorial-option {
  5236. display: flex;
  5237. align-items: center;
  5238. gap: 8px;
  5239. font-size: 12px;
  5240. color: var(--ml-ui-text, #303133);
  5241. cursor: pointer;
  5242. user-select: none;
  5243. }
  5244. .ml-ui-touch-point-tutorial-option input[type='checkbox'] {
  5245. width: 16px;
  5246. height: 16px;
  5247. margin: 0;
  5248. accent-color: var(--ml-ui-accent, #0b84ff);
  5249. }
  5250. .ml-ui-touch-point-tutorial .ml-ui-dialog-footer {
  5251. justify-content: center;
  5252. margin-top: 12px;
  5253. padding-top: 12px;
  5254. border-top: 1px solid var(--ml-ui-border, #ebeef5);
  5255. }
  5256. .ml-ui-touch-point-tutorial-ok {
  5257. border: none;
  5258. background: transparent;
  5259. color: var(--ml-ui-accent, #0b84ff);
  5260. font-size: 14px;
  5261. font-weight: 500;
  5262. cursor: pointer;
  5263. padding: 4px 16px;
  5264. }
  5265. .ml-ui-touch-point-tutorial-ok:hover {
  5266. filter: brightness(1.08);
  5267. }
  5268. `.trim(),document.head.appendChild(b)}};xte.openInstance=null;var W3e=xte;function X3e(){let r=160*gte/100,e=100*yte/100;return{xPct:(r+_N)/160*100,yPct:(e+_N)/100*100}}function Y3e(){let r=160*gte/100,e=100*yte/100,t=_N,n=r-t,i=r+t,o=e-t,a=e+t,s="rgba(210, 210, 210, 0.55)",l="rgba(230, 70, 70, 0.95)";return`<svg viewBox="0 0 160 100" preserveAspectRatio="none" aria-hidden="true">
  5269. <line x1="0" y1="${o}" x2="${n}" y2="${o}" stroke="${s}" stroke-width="0.9"/>
  5270. <line x1="${i}" y1="${o}" x2="160" y2="${o}" stroke="${s}" stroke-width="0.9"/>
  5271. <line x1="0" y1="${a}" x2="${n}" y2="${a}" stroke="${s}" stroke-width="0.9"/>
  5272. <line x1="${i}" y1="${a}" x2="160" y2="${a}" stroke="${s}" stroke-width="0.9"/>
  5273. <line x1="${n}" y1="0" x2="${n}" y2="${o}" stroke="${s}" stroke-width="0.9"/>
  5274. <line x1="${n}" y1="${a}" x2="${n}" y2="100" stroke="${s}" stroke-width="0.9"/>
  5275. <line x1="${i}" y1="0" x2="${i}" y2="${o}" stroke="${s}" stroke-width="0.9"/>
  5276. <line x1="${i}" y1="${a}" x2="${i}" y2="100" stroke="${s}" stroke-width="0.9"/>
  5277. <line x1="0" y1="${e}" x2="160" y2="${e}" stroke="${l}" stroke-width="1.1"/>
  5278. <line x1="${r}" y1="0" x2="${r}" y2="100" stroke="${l}" stroke-width="1.1"/>
  5279. </svg>`}function $3e(){return`<svg viewBox="0 0 36 36" aria-hidden="true">
  5280. <circle class="ml-touch-tutorial-touch-fill" cx="18" cy="18" r="16"
  5281. fill="rgba(120, 120, 120, 0.42)"/>
  5282. <circle class="ml-touch-tutorial-touch-ring" cx="18" cy="18" r="18"/>
  5283. </svg>`}function K3e(){return`<svg viewBox="0 0 24 32" aria-hidden="true">
  5284. <path fill="#f5dcc8" stroke="#c9a88a" stroke-width="0.6"
  5285. d="M12 2c-2.2 0-4 1.6-4 4.2v8.3c0 .6-.5 1-1 1s-1-.4-1-1V8.5C6 5.5 4 4 2 4.5 1 4.7.5 5.5.8 6.4c1.2 3.8 3.2 7.2 5.8 10.1 1.8 2 3.4 3.2 5.4 3.2 3.5 0 6-2.8 6-6.6V6.2C18 3.8 15.4 2 12 2z"/>
  5286. <ellipse cx="12" cy="28" rx="9" ry="2.5" fill="rgba(0,0,0,0.25)"/>
  5287. </svg>`}function q3e(){return`<svg viewBox="0 0 16 16" aria-hidden="true">
  5288. <path fill="none" stroke="currentColor" stroke-width="2"
  5289. d="M8 2v12M2 8h12"/>
  5290. </svg>`}function Z3e(){let r=hr.instance;return H3e(Rd,{hideForever:r.get("hideTouchPointTutorial"),snoozeDate:r.get("touchPointTutorialSnoozeDate")})}var AN=class{static maybeShow(e=document.body){return W3e.maybeShow({host:e,theme:Jo(e),longPressMs:mte,labels:{title:P.t("main.touchPointTutorial.title"),description:P.t("main.touchPointTutorial.description"),snoozeToday:P.t("main.touchPointTutorial.snoozeToday"),hideForever:P.t("main.touchPointTutorial.hideForever"),ok:P.t("main.touchPointTutorial.ok")},shouldShow:Z3e,readPrefs:()=>({hideForever:hr.instance.get("hideTouchPointTutorial"),snoozeDate:hr.instance.get("touchPointTutorialSnoozeDate")}),writePrefs:t=>{let n=hr.instance;n.set("hideTouchPointTutorial",t.hideForever),n.set("touchPointTutorialSnoozeDate",t.snoozeDate)}})}},MN=class{constructor(e){this.options=e}parse(e){let t=Number(e);return isNaN(t)||!this.options.allowNegative&&t<0||!this.options.allowZero&&t===0?null:t}parseCommandLine(e,t){let n=e.trim();return n?this.parse(n):null}},U1=class{constructor(e){this.options=e}parse(e){let t=Number(e);return isNaN(t)||!this.options.allowNegative&&t<0||!this.options.allowZero&&t===0?null:t}parseCommandLine(e,t){let n=e.trim();return n?this.parse(n):null}},PN=class extends U1{},EN=class extends U1{},tk=class extends U1{constructor(e){super(e)}parse(e){let t=super.parse(e);return t==null?t:!Number.isInteger(t)||this.options.lowerLimit!==void 0&&t<this.options.lowerLimit||this.options.upperLimit!==void 0&&t>this.options.upperLimit?null:t}},J3e=/^-?(?:\d+\.?\d*|\.\d+)$/;function Q3e(r){let e=r.trim();if(!e)return;if(e.includes(",")){let n=e.split(",").map(i=>i.trim());return n.length!==2&&n.length!==3||n.length===3&&Number.isNaN(Number(n[2]))?void 0:{x:n[0],y:n[1]}}let t=e.split(/\s+/);if(!(t.length<2))return{x:t[0],y:t[1]}}var em=class{constructor(e){this.options=e}parse(e,t){let n=Number(e),i=Number(t);return isNaN(n)||isNaN(i)?null:{x:n,y:i,z:0}}parseCommandLine(e,t){let n=e.trim();if(!n)return null;let i=n.startsWith("@"),o=i?n.slice(1).trim():n;if(!o)return null;let a=t?.referencePoint??void 0,s=o.indexOf("<");if(s>=0){let c=o.slice(0,s).trim(),u=o.slice(s+1).trim(),h=Number(c),d=Number(u);if(Number.isNaN(h)||Number.isNaN(d))return null;let p=d*Math.PI/180,f=h*Math.cos(p),m=h*Math.sin(p);return i?a?this.parse(String(a.x+f),String(a.y+m)):null:this.parse(String(f),String(m))}let l=Q3e(o);if(l){let c=Number(l.x),u=Number(l.y);return Number.isNaN(c)||Number.isNaN(u)?null:i?a?this.parse(String(a.x+c),String(a.y+u)):null:this.parse(l.x,l.y)}if(J3e.test(o)){let c=Number(o),u=t?.cursorPoint;if(!a||!u||Number.isNaN(c))return null;let h=u.x-a.x,d=u.y-a.y,p=Math.hypot(h,d)>1e-10?Math.atan2(d,h):0;return this.parse(String(a.x+c*Math.cos(p)),String(a.y+c*Math.sin(p)))}return null}},Ab=class{constructor(e){this.options=e}parse(e){return!this.options.allowSpaces&&e.includes(" ")||!this.options.allowEmpty&&e.length===0||this.options.maxLength&&e.length>this.options.maxLength?null:e}parseCommandLine(e,t){return this.parse(e)}},nk=class{constructor(e){this.userTyped=!1,this.parent=e,this.input=document.createElement("input"),this.input.type="text",this.boundOnInput=()=>{this.userTyped=!0,this.resetValidation()},this.input.addEventListener("input",this.boundOnInput),this.parent.appendChild(this.input)}markInvalid(){this.input.classList.add("invalid")}markValid(){this.input.classList.remove("invalid")}resetValidation(){this.input.classList.remove("invalid")}get placeholder(){return this.input.placeholder}set placeholder(e){e&&(this.input.placeholder=e)}set value(e){if(e===void 0)return;let t=this.focused&&!this.userTyped;this.input.value=e,t&&this.input.select()}get value(){return this.input.value}get focused(){return document.activeElement===this.input}focus(){this.input.focus(),this.userTyped||this.input.select()}blur(){this.input.blur()}select(){this.input.select()}remove(){this.input.remove()}isEventTarget(e){return e.target===this.input}dispose(){this.input.removeEventListener("input",this.boundOnInput),this.remove()}addEventListener(e,t,n){this.input.addEventListener(e,t,n)}removeEventListener(e,t,n){this.input.removeEventListener(e,t,n)}},CN=class{constructor(e){this.parent=e.parent,this.twoInputs=e.twoInputs??!0,this.boundOnInput=()=>this.handleInput(),this.boundOnKeyDown=t=>this.handleKeyDown(t),this.xInput=new nk(this.parent),this.xInput.addEventListener("input",this.boundOnInput),this.xInput.addEventListener("keydown",this.boundOnKeyDown),this.twoInputs&&(this.yInput=new nk(this.parent),this.yInput.addEventListener("input",this.boundOnInput),this.yInput.addEventListener("keydown",this.boundOnKeyDown)),this.validateFn=e.validate,this.onCommit=e.onCommit,this.onChange=e.onChange,this.onCancel=e.onCancel,this.onNone=e.onNone,this.allowNone=e.allowNone??!1,this.useDefaultValue=e.useDefaultValue??!1,this.defaultValue=e.defaultValue,e.autoFocus!==!1&&setTimeout(()=>{this.yInput&&this.yInput.select(),this.xInput.focus(),this.xInput.select()},0)}get userTyped(){var e;return this.xInput.userTyped||!!((e=this.yInput)!=null&&e.userTyped)}get focused(){var e;return this.xInput.focused||((e=this.yInput)==null?void 0:e.focused)}focus(){this.xInput.focus()}blur(){var e;this.xInput.blur(),(e=this.yInput)==null||e.blur()}setValue(e){this.xInput.userTyped||(this.xInput.value=e.x),this.twoInputs&&this.yInput&&!this.yInput.userTyped&&(this.yInput.value=e.y??"")}dispose(){var e;this.xInput.removeEventListener("input",this.boundOnInput),this.xInput.removeEventListener("keydown",this.boundOnKeyDown),this.xInput.dispose(),this.yInput&&(this.yInput.removeEventListener("input",this.boundOnInput),this.yInput.removeEventListener("keydown",this.boundOnKeyDown),(e=this.yInput)==null||e.dispose())}handleInput(){var e;let t=this.validate();(e=this.onChange)==null||e.call(this,t)}handleKeyDown(e){var t,n,i;let o=this.xInput,a=this.yInput;if(this.yInput&&this.yInput.isEventTarget(e)&&(o=this.yInput,a=this.xInput),e.key==="Enter"){if(this.useDefaultValue&&!this.userTyped){!this.onCommit||this.onCommit(this.defaultValue)?o.markValid():o.markInvalid(),e.preventDefault(),e.stopPropagation();return}if(!this.userTyped)this.allowNone?(t=this.onNone)==null||t.call(this):o.markInvalid();else{let s=this.validate();s.isValid&&s.value!=null?((n=this.onCommit)==null||n.call(this,s.value),o.markValid()):o.markInvalid()}e.preventDefault(),e.stopPropagation()}else e.key==="Escape"?((i=this.onCancel)==null||i.call(this),e.preventDefault(),e.stopPropagation()):e.key==="Tab"&&(e.preventDefault(),a&&(a?.focus(),a?.select()))}validate(){let e=this.xInput.value.trim(),t=this.twoInputs&&this.yInput?this.yInput.value.trim():void 0;return this.validateFn({x:e,y:t})}},wte=class TN{constructor(e,t){this.visible=!1,this.disposed=!1,this.isHovering=!1,this.view=e,this.parent=t.parent??this.view.canvas,this.host=this.view.container,getComputedStyle(this.host).position==="static"&&(this.host.style.position="relative"),this.container=document.createElement("div"),this.container.className="ml-floating-input",this.allowPrompt=t.allowPrompt!==!1;let n=t.message??"";this.label=document.createElement("span"),this.label.className="ml-floating-input-label",this.label.textContent=n,n.trim()||(this.label.style.display="none"),this.container.appendChild(this.label),this.host.appendChild(this.container),this.boundOnMouseEnter=i=>this.handleMouseEnter(i),this.boundOnMouseLeave=()=>this.handleMouseLeave(),this.boundOnMouseMove=i=>this.handleMouseMove(i),this.parent.addEventListener("mouseenter",this.boundOnMouseEnter),this.parent.addEventListener("mouseleave",this.boundOnMouseLeave),this.boundOnSysVarChanged=i=>{var o;let a=(o=i.name)==null?void 0:o.toLowerCase();(a===oe.DYNMODE.toLowerCase()||a===oe.DYNPROMPT.toLowerCase())&&this.updateDynamicDisplay()},gt.instance().events.sysVarChanged.addEventListener(this.boundOnSysVarChanged),this.updateDynamicDisplay(),this.injectCSS()}injectCSS(){if(TN.stylesInjected)return;TN.stylesInjected=!0;let e=document.createElement("style");e.textContent=`
  5291. .ml-floating-input {
  5292. position: absolute;
  5293. display: flex;
  5294. align-items: center;
  5295. padding: 2px 4px;
  5296. background: var(--ml-ui-bg, #444);
  5297. color: var(--ml-ui-text, #fff);
  5298. border-radius: 4px;
  5299. font-size: 12px;
  5300. pointer-events: none;
  5301. z-index: 2;
  5302. }
  5303. .ml-floating-input-label {
  5304. white-space: nowrap;
  5305. color: var(--ml-ui-text, #fff);
  5306. }
  5307. `,document.head.appendChild(e)}get isVisible(){return this.visible}showAt(e){this.disposed||this.shouldShowPrompt()&&(this.visible=!0,this.container.style.display="flex",this.setPosition(e),this.parent.addEventListener("mousemove",this.boundOnMouseMove))}hide(){this.visible&&(this.visible=!1,this.container.style.display="none",this.parent.removeEventListener("mousemove",this.boundOnMouseMove))}dispose(){this.disposed||(this.disposed=!0,this.hide(),this.parent.removeEventListener("mouseenter",this.boundOnMouseEnter),this.parent.removeEventListener("mouseleave",this.boundOnMouseLeave),gt.instance().events.sysVarChanged.removeEventListener(this.boundOnSysVarChanged),this.container.remove())}setPosition(e){let t=this.host.getBoundingClientRect(),n=this.container.getBoundingClientRect(),i=this.view.viewportToCanvas(e),o=this.view.viewportToContainer(e),a=o.x+10,s=o.y+10;return a=Math.min(a,t.width-n.width),s=Math.min(s,t.height-n.height),a=Math.max(a,0),s=Math.max(s,0),this.container.style.left=`${a}px`,this.container.style.top=`${s}px`,i}handleMouseEnter(e){this.isHovering=!0,this.showAt(e)}handleMouseLeave(){this.isHovering=!1,this.hide()}handleMouseMove(e){this.visible&&this.setPosition(e)}getSysVarValue(e){let t=Fr().workingDatabase;return gt.instance().getVar(e,t)}isDynamicInputEnabled(){return YOe()}isDynamicPromptEnabled(){return!!this.getSysVarValue(oe.DYNPROMPT)}shouldShowPrompt(){var e;return!(!((e=this.label.textContent)!=null&&e.trim())||!this.allowPrompt||!this.isDynamicInputEnabled()||!this.isDynamicPromptEnabled())}updateDynamicDisplay(){if(!this.shouldShowPrompt()){this.hide();return}this.isHovering&&this.showAt(this.view.canvasToViewport(this.view.curMousePos))}};wte.stylesInjected=!1;var ST=wte,rk=class{constructor(e){this.container=null,this.baseLine=null,this.perpLineAtBase=null,this.perpLineAtCursor=null,this.connectorLine=null,this.labelEl=null,this.angleLabelEl=null,this.xAxisLine=null,this.angleSvg=null,this.anglePath=null,this.options={},this.view=e}get element(){return this.container}toContainerPoint(e){return this.view.canvasToContainer(this.view.worldToScreen(e))}ensureHostPositioned(){let e=this.view.container;getComputedStyle(e).position==="static"&&(e.style.position="relative")}start(e,t){this.basePoint=new k(e),this.options=t||{};let n=this.options.color||"var(--ml-ui-canvas-line, #0f0)";this.ensureHostPositioned(),this.container=document.createElement("div"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.width="100%",this.container.style.height="100%",this.container.style.pointerEvents="none",this.container.style.zIndex="1",this.view.container.appendChild(this.container),this.baseLine=document.createElement("div"),this.baseLine.style.position="absolute",this.baseLine.style.borderTop=`1px solid ${n}`,this.container.appendChild(this.baseLine);let i=()=>{let o=document.createElement("div");return o.style.position="absolute",o.style.borderTop=`1px dashed ${n}`,this.container.appendChild(o),o};this.options.showBaseLineOnly||(this.perpLineAtBase=i(),this.perpLineAtCursor=i(),this.connectorLine=i(),this.labelEl=document.createElement("div"),this.labelEl.style.position="absolute",this.labelEl.style.color=n,this.labelEl.style.fontSize="12px",this.labelEl.style.padding="2px 4px",this.labelEl.style.borderRadius="4px",this.container.appendChild(this.labelEl),this.xAxisLine=document.createElement("div"),this.xAxisLine.style.position="absolute",this.xAxisLine.style.borderTop=`1px solid ${n}`,this.container.appendChild(this.xAxisLine),this.angleSvg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.angleSvg.setAttribute("style","position:absolute; overflow:visible; pointer-events:none;"),this.anglePath=document.createElementNS("http://www.w3.org/2000/svg","path"),this.anglePath.setAttribute("fill","none"),this.anglePath.setAttribute("stroke",n),this.anglePath.setAttribute("stroke-width","1"),this.anglePath.setAttribute("stroke-dasharray","4 4"),this.angleSvg.appendChild(this.anglePath),this.container.appendChild(this.angleSvg),this.angleLabelEl=document.createElement("div"),this.angleLabelEl.style.position="absolute",this.angleLabelEl.style.color=n,this.angleLabelEl.style.fontSize="12px",this.angleLabelEl.style.padding="2px 4px",this.angleLabelEl.style.borderRadius="4px",this.container.appendChild(this.angleLabelEl))}update(e){var t,n;if(!this.container||!this.basePoint||!this.baseLine)return;let i=this.toContainerPoint(this.basePoint),o=this.toContainerPoint(e),a=(m,g,y)=>{let b=y.x-g.x,v=y.y-g.y,x=Math.sqrt(b*b+v*v),w=Math.atan2(v,b)*(180/Math.PI);m.style.width=`${x}px`,m.style.transformOrigin="0 0",m.style.transform=`translate(${g.x}px, ${g.y}px) rotate(${w}deg)`};if(a(this.baseLine,i,o),this.options.showBaseLineOnly||!this.perpLineAtBase||!this.perpLineAtCursor||!this.connectorLine)return;let s=o.x-i.x,l=o.y-i.y,c=Math.sqrt(s*s+l*l);if(c===0){this.perpLineAtBase&&(this.perpLineAtBase.style.width="0px"),this.perpLineAtCursor&&(this.perpLineAtCursor.style.width="0px"),this.connectorLine&&(this.connectorLine.style.width="0px"),this.xAxisLine&&(this.xAxisLine.style.width="0px"),this.anglePath&&this.anglePath.setAttribute("d",""),this.angleLabelEl&&(this.angleLabelEl.style.display="none");return}let u=this.options.perpendicularLength??50,h=-l/c,d=s/c,p={x:i.x+h*u,y:i.y+d*u},f={x:o.x+h*u,y:o.y+d*u};if(a(this.perpLineAtBase,i,p),a(this.perpLineAtCursor,o,f),a(this.connectorLine,p,f),this.labelEl){let m=(p.x+f.x)/2,g=(p.y+f.y)/2-24,y=Math.sqrt((e.x-this.basePoint.x)**2+(e.y-this.basePoint.y)**2),b=(t=Y.instance.curDocument)==null?void 0:t.database;this.labelEl.textContent=b?b.formatter.formatLength(y):y.toFixed(3),this.labelEl.style.left=`${m-20}px`,this.labelEl.style.top=`${g}px`,this.labelEl.style.display=""}if(this.xAxisLine){let m=(this.options.baseAngle??0)*Math.PI/180,g={x:this.basePoint.x+Math.cos(m),y:this.basePoint.y+Math.sin(m),z:0},y=this.toContainerPoint(g),b=Math.atan2(y.y-i.y,y.x-i.x),v={x:i.x+c*Math.cos(b),y:i.y+c*Math.sin(b)};a(this.xAxisLine,i,v)}if(this.angleSvg&&this.anglePath&&this.angleLabelEl){let m=c,g=i.x,y=i.y,b=(this.options.baseAngle??0)*Math.PI/180,v={x:this.basePoint.x+Math.cos(b),y:this.basePoint.y+Math.sin(b),z:0},x=this.toContainerPoint(v),w=Math.atan2(x.y-i.y,x.x-i.x),_=Math.atan2(o.y-i.y,o.x-i.x)-w;for(;_<=-Math.PI;)_+=Math.PI*2;for(;_>Math.PI;)_-=Math.PI*2;let A=w+_/2,E=g-m,S=y-m,M=m*2;this.angleSvg.style.left=`${E}px`,this.angleSvg.style.top=`${S}px`,this.angleSvg.setAttribute("width",`${M}`),this.angleSvg.setAttribute("height",`${M}`),this.angleSvg.setAttribute("viewBox",`0 0 ${M} ${M}`);let T=m,L=m,O=T+m*Math.cos(w),D=L+m*Math.sin(w),z=T+m*Math.cos(w+_),N=L+m*Math.sin(w+_),J=Math.abs(_)>Math.PI?"1":"0",X=_>=0?"1":"0",Q=`M ${O} ${D} A ${m} ${m} 0 ${J} ${X} ${z} ${N}`;this.anglePath.setAttribute("d",Q);let ce=Math.abs(_),H=(n=Y.instance.curDocument)==null?void 0:n.database,de=H?H.formatter.formatAngle(ce,{showUnits:!0,applyAngbaseAngdir:!1}):`${(ce*180/Math.PI).toFixed(1)}\xB0`,Se=g+m*Math.cos(A),te=y+m*Math.sin(A);this.angleLabelEl.textContent=de;let ue=40;this.angleLabelEl.style.left=`${Se-ue/2}px`,this.angleLabelEl.style.top=`${te-12}px`,this.angleLabelEl.style.display=""}}dispose(){this.container&&this.container.remove(),this.container=null,this.baseLine=null,this.perpLineAtBase=null,this.perpLineAtCursor=null,this.connectorLine=null,this.labelEl=null,this.angleLabelEl=null,this.xAxisLine=null,this.angleSvg=null,this.anglePath=null}},lT=9,kN=new WeakMap,VJ=!1;function eDe(){if(VJ)return;VJ=!0;let r=document.createElement("style");r.id="ml-simulated-mouse-cursor-styles",r.textContent=`
  5308. .ml-simulated-mouse-cursor {
  5309. position: absolute;
  5310. width: ${lT*2}px;
  5311. height: ${lT*2}px;
  5312. margin: -${lT}px 0 0 -${lT}px;
  5313. pointer-events: none;
  5314. z-index: 40;
  5315. color: var(--ml-ui-canvas-line, #0f0);
  5316. display: none;
  5317. }
  5318. .ml-simulated-mouse-cursor svg {
  5319. display: block;
  5320. width: 100%;
  5321. height: 100%;
  5322. filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.85));
  5323. }
  5324. `.trim(),document.head.appendChild(r)}function tDe(r){let e=kN.get(r);return e||(eDe(),e=document.createElement("div"),e.className="ml-simulated-mouse-cursor",e.setAttribute("aria-hidden","true"),e.innerHTML=`<svg viewBox="0 0 18 18" aria-hidden="true">
  5325. <path fill="none" stroke="currentColor" stroke-width="2"
  5326. d="M9 1v16M1 9h16"/>
  5327. </svg>`,getComputedStyle(r.container).position==="static"&&(r.container.style.position="relative"),r.container.appendChild(e),kN.set(r,e),e)}function nDe(r,e,t){let n=tDe(r),i=r.viewportToCanvas({x:e,y:t}),o=r.canvasToContainer(i);n.style.left=`${o.x}px`,n.style.top=`${o.y}px`,n.style.display="block"}function GJ(r){let e=kN.get(r);e&&(e.style.display="none")}var rDe=52,IN=class{mapFingerToSample(e,t){return{x:e,y:t}}showPreciseHud(e,t,n,i){e.hideSimulatedCursor(),e.refreshSnapLoupe(t,n,i)}hidePreciseHud(e){e.hideSnapLoupe()}},LN=class{mapFingerToSample(e,t){return{x:e,y:Math.max(0,t-rDe)}}showPreciseHud(e,t,n,i){e.refreshSimulatedCursor(t,n),e.refreshSnapLoupe(t,n,i)}hidePreciseHud(e){e.hideSimulatedCursor(),e.hideSnapLoupe()}},iDe=new IN,oDe=new LN;function HJ(){return hr.instance.get("useSimulatedMouseOnTouch")?oDe:iDe}var Lb=null,AT=null,_te=1e3,ON=0;function Il(r){if("pointerType"in r&&r.pointerType==="touch")return!0;let e=r.sourceCapabilities;return e?.firesTouchEvents===!0}function bF(r){return r.clientX===0&&r.clientY===0}function DN(){if(ik(),Lb)return;let r=e=>{e.preventDefault(),e.stopImmediatePropagation(),WJ()};Lb=r,window.addEventListener("click",r,!0),AT=setTimeout(()=>{WJ()},_te)}function WJ(){AT!=null&&(clearTimeout(AT),AT=null),Lb&&(window.removeEventListener("click",Lb,!0),Lb=null)}function ik(r=performance.now()){ON=Math.max(ON,r+_te)}function xa(r=performance.now()){return Lb!=null||r<ON}function Ste(r){return Il(r)?!0:xa()}var ok=class{constructor(){this._phase="idle",this._pointerId=-1,this._startX=0,this._startY=0,this._x=0,this._y=0,this._timer=null,this._onLongPress=null}get phase(){return this._phase}get pointerId(){return this._pointerId}get x(){return this._x}get y(){return this._y}start(e,t,n,i,o=mte){this.reset(),this._phase="pending",this._pointerId=e,this._startX=t,this._startY=n,this._x=t,this._y=n,this._onLongPress=i,this._timer=setTimeout(()=>{var a;this._timer=null,this._phase==="pending"&&(this._phase="loupe",(a=this._onLongPress)==null||a.call(this))},o)}move(e,t,n,i=B3e){if(this._phase==="idle"||this._phase==="panning"||(this._x=e,this._y=t,this._phase!=="pending"||!n))return"continue";let o=e-this._startX,a=t-this._startY;return o*o+a*a<i*i?"continue":(this.clearTimer(),this._phase="panning",this._onLongPress=null,"panning")}end(){let e=this._phase;return this.reset(),e==="pending"||e==="loupe"?"commit":"ignore"}cancel(){this.reset()}get isPicking(){return this._phase==="pending"||this._phase==="loupe"}get isLoupe(){return this._phase==="loupe"}clearTimer(){this._timer!=null&&(clearTimeout(this._timer),this._timer=null)}reset(){this.clearTimer(),this._phase="idle",this._pointerId=-1,this._onLongPress=null}},Ate=class RN extends ST{constructor(e,t){super(e,t),this.lastPoint=null,this.touchSession=new ok,this.pendingTouchPreciseFinger=null,this.touchPreciseRafId=null,this.mouseClickArmed=!1,this.suppressDisplay=!1,this.allowPickCommit=!0,this.touchPickHudHost={refreshSnapLoupe:(n,i,o)=>{this.view.refreshMobileSnapLoupe(n,i,o)},hideSnapLoupe:()=>{this.view.hideMobileSnapLoupe()},refreshSimulatedCursor:(n,i)=>{nDe(this.view,n,i)},hideSimulatedCursor:()=>{GJ(this.view)}},this.allowPrompt=t.allowPrompt!==!1,this.allowPickCommit=t.allowPickCommit!==!1,this.suppressDisplay=!this.isDynamicInputEnabled(),this.orthoReferencePoint=t.orthoReferencePoint??t.basePoint??void 0,t.disableOSnap||(this.osnapMarkerManager=new Fb(e)),t.basePoint&&(this.rubberBand=new rk(e),this.rubberBand.start(t.basePoint,{color:"var(--ml-ui-canvas-line, #0f0)",showBaseLineOnly:t.showBaseLineOnly,baseAngle:t.baseAngle})),this.validateFn=t.validate,this.getDynamicValue=t.getDynamicValue,this.drawPreview=t.drawPreview,this.onCommit=t.onCommit,this.onChange=t.onChange,this.onCancel=t.onCancel,this.onNone=t.onNone,t.inputCount!==0&&(this.inputs=new CN({parent:this.container,twoInputs:t.inputCount===2,validate:this.validateFn,onCancel:this.onCancel,onNone:this.onNone,onCommit:this.onCommit,onChange:this.onChange,autoFocus:this.isDynamicInputEnabled(),allowNone:t.allowNone,useDefaultValue:t.useDefaultValue,defaultValue:t.defaultValue})),this.boundOnClick=n=>this.handleClick(n),this.parent.addEventListener("click",this.boundOnClick),this.boundOnPointerDown=n=>this.handlePointerDown(n),this.boundOnPointerMove=n=>this.handlePointerMove(n),this.boundOnPointerUp=n=>this.handlePointerUp(n),this.boundOnPointerCancel=n=>this.handlePointerCancel(n),this.boundOnTouchStart=n=>this.handleTouchStart(n),this.boundOnTouchMove=n=>this.handleTouchMove(n),this.boundOnTouchEnd=n=>this.handleTouchEnd(n),this.boundOnContextMenu=n=>this.handleContextMenu(n),this.parent.addEventListener("pointerdown",this.boundOnPointerDown,{passive:!1,capture:!0}),this.parent.addEventListener("pointermove",this.boundOnPointerMove),this.parent.addEventListener("touchstart",this.boundOnTouchStart,{passive:!1,capture:!0}),this.parent.addEventListener("contextmenu",this.boundOnContextMenu,!0),window.addEventListener("pointerup",this.boundOnPointerUp),window.addEventListener("pointercancel",this.boundOnPointerCancel),window.addEventListener("touchmove",this.boundOnTouchMove,{passive:!1}),window.addEventListener("touchend",this.boundOnTouchEnd),this.boundOnInputSysVarChanged=n=>{var i;let o=(i=n.name)==null?void 0:i.toLowerCase();o===oe.DYNMODE.toLowerCase()||o===oe.DYNPROMPT.toLowerCase()?this.updateDynamicInputDisplay():(o===oe.ORTHOMODE.toLowerCase()||o===oe.POLARMODE.toLowerCase()||o===oe.POLARANG.toLowerCase()||o===oe.POLARADDANG.toLowerCase())&&this.requestPreviewRefresh()},gt.instance().events.sysVarChanged.addEventListener(this.boundOnInputSysVarChanged),this.boundOnViewChanged=()=>this.requestPreviewRefresh(),this.view.events.viewChanged.addEventListener(this.boundOnViewChanged),this.view.events.viewResize.addEventListener(this.boundOnViewChanged),this.updateDynamicInputDisplay(),this.injectInputCSS()}showAt(e){if(this.disposed||(this.updateDynamicInputDisplay(),this.suppressDisplay?(this.visible=!0,this.container.style.display="none",this.setPosition(e),this.parent.addEventListener("mousemove",this.boundOnMouseMove)):super.showAt(e),!this.view.hasCursorPos)||xa())return;let t=this.view.screenToWorld(this.view.viewportToCanvas(e));this.updateDynamicPreview(t)}injectInputCSS(){if(RN.inputStylesInjected)return;RN.inputStylesInjected=!0;let e=document.createElement("style");e.textContent=`
  5328. .ml-floating-input input {
  5329. font-size: 12px;
  5330. padding: 2px 4px;
  5331. margin-left: 6px;
  5332. height: 22px;
  5333. width: 90px;
  5334. background: var(--ml-ui-bg, #888);
  5335. border: 1px solid var(--ml-ui-border, #666);
  5336. color: var(--ml-ui-text, #fff);
  5337. border-radius: 2px;
  5338. }
  5339. .ml-floating-input input.invalid {
  5340. border-color: var(--ml-ui-danger, red);
  5341. color: var(--ml-ui-danger, red);
  5342. }
  5343. `,document.head.appendChild(e)}dispose(){var e,t,n;this.disposed||(this.cancelTouchPreciseSchedule(),super.dispose(),this.parent.removeEventListener("click",this.boundOnClick),this.parent.removeEventListener("pointerdown",this.boundOnPointerDown,!0),this.parent.removeEventListener("pointermove",this.boundOnPointerMove),this.parent.removeEventListener("touchstart",this.boundOnTouchStart,!0),this.parent.removeEventListener("contextmenu",this.boundOnContextMenu,!0),window.removeEventListener("pointerup",this.boundOnPointerUp),window.removeEventListener("pointercancel",this.boundOnPointerCancel),window.removeEventListener("touchmove",this.boundOnTouchMove),window.removeEventListener("touchend",this.boundOnTouchEnd),this.releaseTouchCapture(),this.touchSession.cancel(),this.hideTouchPreciseHud(),this.view.setNavigationEnabled(!0),gt.instance().events.sysVarChanged.removeEventListener(this.boundOnInputSysVarChanged),this.view.events.viewChanged.removeEventListener(this.boundOnViewChanged),this.view.events.viewResize.removeEventListener(this.boundOnViewChanged),(e=this.inputs)==null||e.dispose(),(t=this.rubberBand)==null||t.dispose(),(n=this.osnapMarkerManager)==null||n.clear(),this.view.osnapResolver.clearAcquiredCenters())}handleMouseMove(e){if(!this.visible||this.touchSession.isPicking||xa()||bF(e)||Il(e))return;let t=this.getPosition({x:e.clientX,y:e.clientY});this.updateDynamicPreview(t)}requestPreviewRefresh(){var e;!this.visible||!this.lastDynamicPoint||(this.updateDynamicPreview(this.lastDynamicPoint),this.osnapMarkerManager&&this.lastOsnapPoint&&this.osnapMarkerManager.repositionTop(this.lastOsnapPoint),(e=this.osnapMarkerManager)==null||e.repositionHints(),!this.suppressDisplay&&this.view.curMousePos&&this.setPosition(this.view.canvasToViewport(this.view.curMousePos)))}handleClick(e){var t;if(!this.visible||!this.allowPickCommit||this.touchSession.isPicking||xa()||!this.mouseClickArmed||(this.mouseClickArmed=!1,bF(e)||Il(e)))return;let n=this.getPosition({x:e.clientX,y:e.clientY}),i=this.getDynamicValue(n);(((t=this.onCommit)==null?void 0:t.call(this,i.value,n))??!0)&&(this.lastPoint=n)}handlePointerDown(e){if(!(!this.visible||e.button!==0)&&this.allowPickCommit){if(e.pointerType!=="touch"){if(this.touchSession.isPicking||xa()||bF(e)||Il(e))return;this.mouseClickArmed=!0;return}e.preventDefault(),this.mouseClickArmed=!1,ik(),this.hideTouchPreciseHud(),this.touchSession.start(e.pointerId,e.clientX,e.clientY,()=>{ate(),this.view.setNavigationEnabled(!1),this.applyTouchPreciseSample(this.touchSession.x,this.touchSession.y),this.refreshTouchPreciseHud()}),this.parent.setPointerCapture(e.pointerId)}}handlePointerMove(e){if(!(e.pointerType!=="touch"||e.pointerId!==this.touchSession.pointerId)){if(this.touchSession.move(e.clientX,e.clientY,!0)==="panning"){this.cancelTouchPreciseSchedule();return}!this.visible||!this.touchSession.isLoupe||this.scheduleTouchPreciseSample(e.clientX,e.clientY)}}handlePointerUp(e){e.pointerType==="touch"&&this.touchSession.phase!=="idle"&&e.pointerId===this.touchSession.pointerId&&this.completeTouchPick(e.clientX,e.clientY)}handlePointerCancel(e){e.pointerType==="touch"&&this.touchSession.phase!=="idle"&&e.pointerId===this.touchSession.pointerId&&(this.mouseClickArmed=!1,DN(),this.releaseTouchCapture(),!this.touchSession.isPicking&&(this.cancelTouchPreciseSchedule(),this.touchSession.cancel(),this.view.setNavigationEnabled(!0),this.hideTouchPreciseHud(),this.view.clearCursorPos()))}handleTouchStart(e){this.visible&&e.touches.length===1&&e.preventDefault()}handleTouchMove(e){if(!this.touchSession.isPicking)return;let t=e.touches[0]??e.changedTouches[0];if(t){if(this.touchSession.move(t.clientX,t.clientY,!0)==="panning"){this.cancelTouchPreciseSchedule();return}this.touchSession.isLoupe&&(e.preventDefault(),this.visible&&this.scheduleTouchPreciseSample(t.clientX,t.clientY))}}handleTouchEnd(e){if(this.touchSession.phase==="idle"||e.touches.length>0)return;let t=e.changedTouches[0];t&&this.completeTouchPick(t.clientX,t.clientY)}handleContextMenu(e){this.visible&&(!Ste(e)&&!ba().point.swallowsPromptContextMenu||(e.preventDefault(),e.stopImmediatePropagation()))}completeTouchPick(e,t){var n;this.mouseClickArmed=!1,DN(),this.releaseTouchCapture();let i=this.touchSession.isLoupe,o=this.touchSession.end();if(this.view.setNavigationEnabled(!0),this.cancelTouchPreciseSchedule(),this.hideTouchPreciseHud(),this.view.clearCursorPos(),!this.visible||o!=="commit")return;i?this.applyTouchPreciseSample(e,t):this.applyClientSample(e,t);let a=this.lastDynamicPoint?new Z(this.lastDynamicPoint.x,this.lastDynamicPoint.y):this.getPosition({x:e,y:t}),s=this.getDynamicValue(a);(((n=this.onCommit)==null?void 0:n.call(this,s.value,a))??!0)&&(this.lastPoint=a)}releaseTouchCapture(){let e=this.touchSession.pointerId;e!==-1&&this.parent.hasPointerCapture(e)&&this.parent.releasePointerCapture(e)}applyClientSample(e,t){let n=this.getPosition({x:e,y:t});this.updateDynamicPreview(n)}applyTouchPreciseSample(e,t){let n=HJ().mapFingerToSample(e,t);this.applyClientSample(n.x,n.y)}scheduleTouchPreciseSample(e,t){this.pendingTouchPreciseFinger={x:e,y:t},this.touchPreciseRafId==null&&(this.touchPreciseRafId=requestAnimationFrame(()=>{this.touchPreciseRafId=null;let n=this.pendingTouchPreciseFinger;this.pendingTouchPreciseFinger=null,!(!n||this.disposed||!this.visible)&&this.touchSession.isLoupe&&(this.applyTouchPreciseSample(n.x,n.y),this.refreshTouchPreciseHud())}))}cancelTouchPreciseSchedule(){this.touchPreciseRafId!=null&&(cancelAnimationFrame(this.touchPreciseRafId),this.touchPreciseRafId=null),this.pendingTouchPreciseFinger=null}refreshTouchPreciseHud(){let e=HJ(),t=e.mapFingerToSample(this.touchSession.x,this.touchSession.y);e.showPreciseHud(this.touchPickHudHost,t.x,t.y,this.lastOsnapPoint??null)}hideTouchPreciseHud(){this.view.hideMobileSnapLoupe(),GJ(this.view)}get sessionBasePoint(){return this.rubberBand?this.orthoReferencePoint:void 0}setBasePoint(e,t){this.disposed||this.rubberBand||(this.rubberBand=new rk(this.view),this.rubberBand.start(e,{color:t?.color??"var(--ml-ui-canvas-line, #0f0)",showBaseLineOnly:t?.showBaseLineOnly,baseAngle:t?.baseAngle}),this.orthoReferencePoint=e,this.requestPreviewRefresh())}updateDynamicPreview(e){var t,n,i;this.lastDynamicPoint={x:e.x,y:e.y};let o=this.getDynamicValue(e);(t=this.inputs)==null||t.setValue(o.raw),this.inputs&&!this.inputs.focused&&!this.suppressDisplay&&this.inputs.focus(),(n=this.rubberBand)==null||n.update(e),(i=this.drawPreview)==null||i.call(this,e)}getPosition(e){let t=super.setPosition(e),n=this.view.screenToWorld(t);if(this.osnapMarkerManager&&(this.lastOsnapPoint=this.view.osnapResolver.resolve({cursorWcs:n,lastPoint:this.lastPoint?{x:this.lastPoint.x,y:this.lastPoint.y,z:0}:void 0}),this.osnapMarkerManager.setHintMarkers(Nc.displayCenterMarks(this.view.osnapResolver.acquiredCenterMarks,this.lastOsnapPoint)),this.lastOsnapPoint?(n.x=this.lastOsnapPoint.x,n.y=this.lastOsnapPoint.y,this.osnapMarkerManager.showOrRepositionMarker(this.lastOsnapPoint,Nc.osnapModeToMarkerType(this.lastOsnapPoint.type))):this.osnapMarkerManager.hideMarker()),this.orthoReferencePoint){let i=a3e(n,this.orthoReferencePoint);n.x=i.x,n.y=i.y}return n}updateDynamicInputDisplay(){let e=this.isDynamicInputEnabled(),t=this.isDynamicPromptEnabled();this.setSuppressDisplay(!e),this.setPromptVisible(this.allowPrompt&&e&&t)}setSuppressDisplay(e){var t;this.suppressDisplay!==e&&(this.suppressDisplay=e,this.visible&&(this.suppressDisplay?(this.container.style.display="none",(t=this.inputs)==null||t.blur()):(this.container.style.display="flex",this.inputs&&!this.inputs.focused&&this.inputs.focus())))}setPromptVisible(e){var t;if(!((t=this.label.textContent)!=null&&t.trim())){this.label.style.display="none";return}this.label.style.display=e?"inline":"none"}};Ate.inputStylesInjected=!1;var aDe=Ate;function BN(r){let e=new ok,t=r.clickThresholdPx??8,n=!1,i=0,o=0,a=null,s=()=>{var _;(_=r.setNavigationEnabled)==null||_.call(r,!0)},l=()=>{if(a!=null){try{r.element.hasPointerCapture(a)&&r.element.releasePointerCapture(a)}catch{}a=null}},c=()=>{ik(),DN()},u=()=>{var _;let A=n;n=!1,e.cancel(),l(),s(),A&&((_=r.onAbort)==null||_.call(r))},h=_=>{if(!(_.pointerType!=="touch"||_.button!==0)&&!(r.shouldStart&&!r.shouldStart())){_.preventDefault(),ik(),n=!1,e.start(_.pointerId,_.clientX,_.clientY,()=>{var A;n=!0,i=e.x,o=e.y,ate(),(A=r.setNavigationEnabled)==null||A.call(r,!1),r.onActivate(e.x,e.y)}),a=_.pointerId;try{r.element.setPointerCapture(_.pointerId)}catch{a=null}}},d=(_,A)=>e.move(_,A,!0)==="panning"?(l(),s(),"panning"):(!n||!e.isLoupe||r.onMove(_,A),"continue"),p=_=>{_.pointerType==="touch"&&_.pointerId===e.pointerId&&d(_.clientX,_.clientY)},f=(_,A,E,S)=>{var M,T;if(e.phase==="idle"||S!==e.pointerId)return;let L=n,O=i,D=o,z=E?e.end():(e.cancel(),"ignore");if(n=!1,l(),s(),c(),!E||z==="ignore"){L&&((M=r.onAbort)==null||M.call(r));return}if(L){let N=_-O,J=A-D,X=Math.hypot(N,J)>=t;r.onBoxEnd(_,A,X);return}(T=r.onTap)==null||T.call(r,_,A)},m=_=>{_.pointerType==="touch"&&f(_.clientX,_.clientY,!0,_.pointerId)},g=_=>{if(_.pointerType==="touch"&&e.phase!=="idle"&&_.pointerId===e.pointerId){if(!n&&e.isPicking){l(),c();return}f(_.clientX,_.clientY,!1,_.pointerId)}},y=_=>{e.phase!=="idle"&&_.touches.length===1&&_.preventDefault()},b=_=>{if(!e.isPicking)return;let A=_.touches[0]??_.changedTouches[0];!A||d(A.clientX,A.clientY)==="panning"||e.isLoupe&&_.preventDefault()},v=_=>{if(e.phase==="idle"||_.touches.length>0)return;let A=_.changedTouches[0];A&&f(A.clientX,A.clientY,!0,e.pointerId)},x=_=>{e.phase==="idle"&&!xa()||(_.preventDefault(),_.stopImmediatePropagation())},w={passive:!1};return r.element.addEventListener("pointerdown",h),r.element.addEventListener("pointermove",p),window.addEventListener("pointerup",m),window.addEventListener("pointercancel",g),r.element.addEventListener("touchstart",y,w),window.addEventListener("touchmove",b,w),window.addEventListener("touchend",v),r.element.addEventListener("contextmenu",x,!0),()=>{u(),r.element.removeEventListener("pointerdown",h),r.element.removeEventListener("pointermove",p),window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",g),r.element.removeEventListener("touchstart",y),window.removeEventListener("touchmove",b),window.removeEventListener("touchend",v),r.element.removeEventListener("contextmenu",x,!0)}}var sDe="ml-ui-fullscreen-panel-styles",lDe="mlcadFullscreenPanel",FN=class NN{constructor(e={}){this.onPopState=()=>this.onHistoryPop(),this.visible=!1,this.historyPushed=!1,this.labels={title:"",back:"Back"},NN.injectCss(),this.mountHost=e.host??document.body,this.root=document.createElement("div"),this.root.className=["ml-ui-fullscreen-panel",e.rootClassName].filter(Boolean).join(" "),this.root.hidden=!0,this.root.setAttribute("aria-hidden","true"),this.root.setAttribute("role","dialog"),this.root.setAttribute("aria-modal","true");let t=document.createElement("header");t.className="ml-ui-fullscreen-panel__header",this.backBtn=document.createElement("button"),this.backBtn.type="button",this.backBtn.className="ml-ui-fullscreen-panel__back",this.backBtn.innerHTML=uDe(),this.backBtn.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),this.requestClose()}),this.titleEl=document.createElement("span"),this.titleEl.className="ml-ui-fullscreen-panel__title",this.titleEl.id=`ml-ui-fullscreen-panel-title-${NN.nextTitleId++}`,this.root.setAttribute("aria-labelledby",this.titleEl.id);let n=document.createElement("span");n.className="ml-ui-fullscreen-panel__spacer",n.setAttribute("aria-hidden","true"),t.append(this.backBtn,this.titleEl,n),this.body=document.createElement("div"),this.body.className="ml-ui-fullscreen-panel__body",this.root.append(t,this.body),this.mountHost.appendChild(this.root),this.applyLabels(this.labels)}get bodyEl(){return this.body}get rootEl(){return this.root}get isOpen(){return this.visible}show(e){if(this.applyLabels(e),!this.visible){this.visible=!0,this.root.hidden=!1,this.root.setAttribute("aria-hidden","false"),document.body.classList.add("ml-ui-fullscreen-panel-open");try{history.pushState({[lDe]:!0},""),this.historyPushed=!0,window.addEventListener("popstate",this.onPopState)}catch{this.historyPushed=!1}this.backBtn.focus()}}setLabels(e){this.applyLabels(e)}requestClose(){if(!this.visible)return;let e=this.historyPushed;if(this.detachHistory(),this.hideUi(),!e)return;let t=()=>{window.removeEventListener("popstate",t)};window.addEventListener("popstate",t);try{history.back()}catch{window.removeEventListener("popstate",t)}}dispose(){if(this.visible&&this.historyPushed){this.detachHistory();let e=()=>{window.removeEventListener("popstate",e)};window.addEventListener("popstate",e);try{history.back()}catch{window.removeEventListener("popstate",e)}}else this.detachHistory();this.hideUi(),this.root.remove()}onHidden(){}applyLabels(e){this.labels=e,this.titleEl.textContent=e.title,this.backBtn.setAttribute("aria-label",e.back)}onHistoryPop(){this.historyPushed=!1,this.detachHistory(),this.hideUi()}detachHistory(){window.removeEventListener("popstate",this.onPopState),this.historyPushed=!1}hideUi(){if(!this.visible){this.onHidden();return}this.visible=!1,this.root.hidden=!0,this.root.setAttribute("aria-hidden","true"),document.body.classList.remove("ml-ui-fullscreen-panel-open"),this.onHidden()}static injectCss(){if(this.stylesInjected||typeof document>"u")return;this.stylesInjected=!0;let e=document.createElement("style");e.id=sDe,e.textContent=hDe,document.head.appendChild(e)}};FN.stylesInjected=!1,FN.nextTitleId=0;var cDe=FN;function uDe(){return'<svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true"><path fill="currentColor" d="M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>'}var hDe=`
  5344. body.ml-ui-fullscreen-panel-open {
  5345. overflow: hidden;
  5346. }
  5347. .ml-ui-fullscreen-panel {
  5348. position: fixed;
  5349. inset: 0;
  5350. z-index: 10060;
  5351. display: flex;
  5352. flex-direction: column;
  5353. background: var(--ml-ui-bg, var(--mlcad-ui-bg, #1c1e22));
  5354. color: var(--ml-ui-text, var(--mlcad-ui-text, #e8eaed));
  5355. font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  5356. }
  5357. .ml-ui-fullscreen-panel[hidden] {
  5358. display: none !important;
  5359. }
  5360. .ml-ui-fullscreen-panel__header {
  5361. flex: 0 0 auto;
  5362. display: grid;
  5363. grid-template-columns: 44px 1fr 44px;
  5364. align-items: center;
  5365. column-gap: 4px;
  5366. min-height: 48px;
  5367. padding-top: env(safe-area-inset-top, 0px);
  5368. padding-left: max(4px, env(safe-area-inset-left, 0px));
  5369. padding-right: max(4px, env(safe-area-inset-right, 0px));
  5370. border-bottom: 1px solid var(--ml-ui-border, var(--mlcad-ui-border, rgba(255, 255, 255, 0.12)));
  5371. background: var(--ml-ui-bg-elevated, var(--mlcad-ui-bg-elevated, rgba(28, 30, 34, 0.98)));
  5372. }
  5373. .ml-ui-fullscreen-panel__back {
  5374. box-sizing: border-box;
  5375. grid-column: 1;
  5376. justify-self: start;
  5377. width: 44px;
  5378. height: 44px;
  5379. margin: 0;
  5380. padding: 0;
  5381. border: 0;
  5382. border-radius: 50%;
  5383. display: inline-flex;
  5384. align-items: center;
  5385. justify-content: center;
  5386. background: transparent;
  5387. color: var(--ml-ui-accent, var(--mlcad-accent, #08e8de));
  5388. cursor: pointer;
  5389. line-height: 0;
  5390. -webkit-tap-highlight-color: transparent;
  5391. }
  5392. .ml-ui-fullscreen-panel__back:active {
  5393. background: rgba(255, 255, 255, 0.08);
  5394. }
  5395. .ml-ui-fullscreen-panel__back svg {
  5396. display: block;
  5397. }
  5398. .ml-ui-fullscreen-panel__title {
  5399. grid-column: 2;
  5400. min-width: 0;
  5401. font-size: 17px;
  5402. font-weight: 600;
  5403. line-height: 1.2;
  5404. text-align: center;
  5405. overflow: hidden;
  5406. text-overflow: ellipsis;
  5407. white-space: nowrap;
  5408. }
  5409. .ml-ui-fullscreen-panel__spacer {
  5410. grid-column: 3;
  5411. width: 44px;
  5412. height: 44px;
  5413. justify-self: end;
  5414. }
  5415. .ml-ui-fullscreen-panel__body {
  5416. flex: 1;
  5417. min-height: 0;
  5418. display: flex;
  5419. flex-direction: column;
  5420. }
  5421. `,Mte=class Pte extends cDe{constructor(e={}){super({...e,rootClassName:["ml-ui-help-panel",e.rootClassName].filter(Boolean).join(" ")}),this.onFrameLoad=()=>this.setLoading(!1),this.loading=!1,this.frameWrap=document.createElement("div"),this.frameWrap.className="ml-ui-help-panel__frame-wrap",this.iframe=document.createElement("iframe"),this.iframe.className="ml-ui-help-panel__frame",this.iframe.title="Help",this.iframe.setAttribute("referrerpolicy","no-referrer-when-downgrade"),this.iframe.addEventListener("load",this.onFrameLoad),this.loadingEl=document.createElement("div"),this.loadingEl.className="ml-ui-help-panel__loading",this.loadingEl.setAttribute("aria-hidden","true"),this.loadingEl.innerHTML='<div class="ml-ui-help-panel__spinner" aria-hidden="true"></div>',this.frameWrap.append(this.iframe,this.loadingEl),this.bodyEl.appendChild(this.frameWrap),Pte.injectHelpCss()}showDocs(e){this.iframe.title=e.labels.title;let t=e.url;this.iframe.getAttribute("src")!==t?(this.setLoading(!0),this.iframe.src=t):this.loading||this.setLoading(!1),this.show(e.labels)}setLabels(e){this.iframe.title=e.title,super.setLabels(e)}dispose(){this.iframe.removeEventListener("load",this.onFrameLoad),super.dispose()}onHidden(){this.setLoading(!1),this.iframe.removeAttribute("src")}setLoading(e){this.loading=e,this.loadingEl.classList.toggle("is-active",e),this.loadingEl.setAttribute("aria-hidden",e?"false":"true"),this.loadingEl.setAttribute("aria-busy",e?"true":"false"),this.rootEl.classList.toggle("is-loading",e)}static injectHelpCss(){if(this.helpStylesInjected||typeof document>"u")return;this.helpStylesInjected=!0;let e=document.createElement("style");e.id="ml-ui-help-panel-styles",e.textContent=`
  5422. .ml-ui-help-panel__frame-wrap {
  5423. position: relative;
  5424. flex: 1;
  5425. min-height: 0;
  5426. display: flex;
  5427. flex-direction: column;
  5428. background: #fff;
  5429. }
  5430. .ml-ui-help-panel__frame {
  5431. flex: 1;
  5432. width: 100%;
  5433. min-height: 0;
  5434. border: 0;
  5435. background: #fff;
  5436. opacity: 1;
  5437. transition: opacity 0.18s ease;
  5438. }
  5439. .ml-ui-help-panel.is-loading .ml-ui-help-panel__frame {
  5440. opacity: 0;
  5441. }
  5442. .ml-ui-help-panel__loading {
  5443. position: absolute;
  5444. inset: 0;
  5445. z-index: 1;
  5446. display: flex;
  5447. align-items: center;
  5448. justify-content: center;
  5449. pointer-events: none;
  5450. background: var(--ml-ui-bg, var(--mlcad-ui-bg, #1c1e22));
  5451. opacity: 0;
  5452. visibility: hidden;
  5453. transition: opacity 0.18s ease, visibility 0.18s ease;
  5454. }
  5455. .ml-ui-help-panel__loading.is-active {
  5456. opacity: 1;
  5457. visibility: visible;
  5458. }
  5459. .ml-ui-help-panel__spinner {
  5460. box-sizing: border-box;
  5461. width: 36px;
  5462. height: 36px;
  5463. border-radius: 50%;
  5464. border: 3px solid rgba(255, 255, 255, 0.18);
  5465. border-top-color: var(--ml-ui-accent, var(--mlcad-accent, #08e8de));
  5466. animation: ml-ui-help-panel-spin 0.75s linear infinite;
  5467. }
  5468. @keyframes ml-ui-help-panel-spin {
  5469. to { transform: rotate(360deg); }
  5470. }
  5471. `,document.head.appendChild(e)}};Mte.helpStylesInjected=!1;var dDe=Mte,XJ="ml-mobile-cmd-styles",pDe={length:"0",angle:"0",dx:"0",dy:"0",x:"0",y:"0"},zN=class r{constructor(e){this.helpPanel=null,this.callbacks=null,this.open=!1,this.collapsed=!1,this.showMetrics=!1,this.showStringInput=!1,this.hasBasePoint=!1,this.frozenTexts=null,this.frozenHasBasePoint=!1,this.compactPromptRaf=0,this.host=e.host,this.activeClass=e.activeClass??"ml-mobile-cmd-active",this.isPhoneLayout=e.isPhoneLayout,this.subscribeLayout=e.subscribeLayout,this.helpDocsUrl=e.helpDocsUrl,this.helpHostOpt=e.helpHost,this.labelsFn=e.labels,r.injectCss(),this.root=document.createElement("div"),this.root.className="ml-mobile-cmd",this.root.hidden=!0,this.root.setAttribute("aria-hidden","true"),this.panel=document.createElement("div"),this.panel.className="ml-mobile-cmd-panel",this.metricButtons={length:this.makeMetricButton("length"),angle:this.makeMetricButton("angle"),dx:this.makeMetricButton("dx"),dy:this.makeMetricButton("dy"),x:this.makeMetricButton("x"),y:this.makeMetricButton("y")},this.absStack=document.createElement("div"),this.absStack.className="ml-mobile-cmd-metric-stack",this.absStack.append(this.metricButtons.x,this.metricButtons.y),this.polarStack=document.createElement("div"),this.polarStack.className="ml-mobile-cmd-metric-stack",this.polarStack.append(this.metricButtons.length,this.metricButtons.angle),this.deltaStack=document.createElement("div"),this.deltaStack.className="ml-mobile-cmd-metric-stack",this.deltaStack.append(this.metricButtons.dx,this.metricButtons.dy),this.accessoryEl=document.createElement("div"),this.accessoryEl.className="ml-mobile-cmd-accessory",this.accessoryEl.hidden=!0,this.sinkPointer(this.accessoryEl),this.accessoryEl.addEventListener("click",t=>{if(!this.collapsed)return;let n=t.target;n!=null&&n.closest("button")||this.setCollapsed(!1)}),this.accessoryContentEl=document.createElement("div"),this.accessoryContentEl.className="ml-mobile-cmd-accessory-content",this.helpBtn=document.createElement("button"),this.helpBtn.type="button",this.helpBtn.className="ml-mobile-cmd-help",this.helpBtn.innerHTML=fDe(),this.helpBtn.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.openHelpPanel()}),this.sinkPointer(this.helpBtn),this.collapseBtn=document.createElement("button"),this.collapseBtn.type="button",this.collapseBtn.className="ml-mobile-cmd-collapse",this.collapseBtn.innerHTML=$J(),this.collapseBtn.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.setCollapsed(!this.collapsed)}),this.sinkPointer(this.collapseBtn),this.titleActions=document.createElement("div"),this.titleActions.className="ml-mobile-cmd-title-actions",this.titleActions.append(this.helpBtn,this.collapseBtn),this.accessoryEl.append(this.accessoryContentEl,this.titleActions),this.promptEl=document.createElement("div"),this.promptEl.className="ml-mobile-cmd-prompt",this.promptEl.setAttribute("role","status"),this.compactActions=document.createElement("div"),this.compactActions.className="ml-mobile-cmd-actions-compact",this.promptRow=document.createElement("div"),this.promptRow.className="ml-mobile-cmd-prompt-row",this.chipsEl=document.createElement("div"),this.chipsEl.className="ml-mobile-cmd-chips",this.promptRow.append(this.promptEl,this.chipsEl),this.accessoryObserver=new MutationObserver(()=>{this.open&&this.applyMetricVisibility()}),this.accessoryObserver.observe(this.accessoryContentEl,{childList:!0}),typeof ResizeObserver<"u"&&(this.compactPromptObserver=new ResizeObserver(()=>{this.scheduleCompactPromptVisibility()}),this.compactPromptObserver.observe(this.accessoryEl)),this.cancelBtn=document.createElement("button"),this.cancelBtn.type="button",this.cancelBtn.className="ml-mobile-cmd-cancel",this.cancelBtn.innerHTML=gDe(),this.cancelBtn.addEventListener("click",t=>{var n;t.preventDefault(),t.stopPropagation(),(n=this.callbacks)==null||n.onCancel()}),this.sinkPointer(this.cancelBtn),this.confirmBtn=document.createElement("button"),this.confirmBtn.type="button",this.confirmBtn.className="ml-mobile-cmd-confirm",this.confirmBtn.innerHTML=yDe(),this.confirmBtn.addEventListener("click",t=>{var n;t.preventDefault(),t.stopPropagation(),!this.confirmBtn.disabled&&((n=this.callbacks)==null||n.onConfirm())}),this.sinkPointer(this.confirmBtn),this.absActions=document.createElement("div"),this.absActions.className="ml-mobile-cmd-actions",this.polarActions=document.createElement("div"),this.polarActions.className="ml-mobile-cmd-actions",this.deltaActions=document.createElement("div"),this.deltaActions.className="ml-mobile-cmd-actions",this.sharedActions=document.createElement("div"),this.sharedActions.className="ml-mobile-cmd-actions ml-mobile-cmd-actions-shared",this.absGroup=document.createElement("div"),this.absGroup.className="ml-mobile-cmd-group ml-mobile-cmd-group-abs",this.absGroup.append(this.absStack,this.absActions),this.polarGroup=document.createElement("div"),this.polarGroup.className="ml-mobile-cmd-group ml-mobile-cmd-group-polar",this.polarGroup.append(this.polarStack,this.polarActions),this.deltaGroup=document.createElement("div"),this.deltaGroup.className="ml-mobile-cmd-group ml-mobile-cmd-group-delta",this.deltaGroup.append(this.deltaStack,this.deltaActions),this.stringInput=document.createElement("textarea"),this.stringInput.className="ml-mobile-cmd-string-input",this.stringInput.rows=1,this.stringInput.autocomplete="off",this.stringInput.spellcheck=!1,this.stringInput.addEventListener("input",()=>{this.syncStringInputHeight()}),this.stringInput.addEventListener("keydown",t=>{var n,i;if(t.key==="Enter"&&(t.ctrlKey||t.metaKey)){if(t.preventDefault(),t.stopPropagation(),this.confirmBtn.disabled)return;(n=this.callbacks)==null||n.onConfirm()}else t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),(i=this.callbacks)==null||i.onCancel())}),this.sinkPointer(this.stringInput),this.stringActions=document.createElement("div"),this.stringActions.className="ml-mobile-cmd-actions",this.stringGroup=document.createElement("div"),this.stringGroup.className="ml-mobile-cmd-group ml-mobile-cmd-group-string",this.stringGroup.hidden=!0,this.stringGroup.append(this.stringInput,this.stringActions),this.panel.append(this.accessoryEl,this.promptRow,this.absGroup,this.polarGroup,this.deltaGroup,this.stringGroup,this.sharedActions),this.root.appendChild(this.panel),this.sinkPointer(this.panel),this.host.appendChild(this.root),this.refreshLabels()}get isOpen(){return this.open}get isCollapsed(){return this.collapsed}get accessoryHost(){return this.accessoryContentEl}show(e,t){var n,i;this.callbacks=t,this.open=!0,this.showStringInput=e.showStringInput===!0,this.showMetrics=this.showStringInput?!1:e.showMetrics,this.root.hidden=!1,this.root.setAttribute("aria-hidden","false"),this.host.classList.add(this.activeClass),this.promptEl.textContent=YJ(e.prompt),this.confirmBtn.disabled=this.showStringInput?!1:!e.allowNone,this.stringInput.value=e.stringValue??"",this.stringInput.placeholder=e.stringPlaceholder??"",this.prepareAccessory(),this.renderChips(e.keywords),this.frozenTexts?this.setMetricTexts(this.frozenTexts,this.frozenHasBasePoint):this.setMetricTexts(pDe,!1),(n=this.layoutUnsub)==null||n.call(this),this.layoutUnsub=(i=this.subscribeLayout)==null?void 0:i.call(this,()=>{this.open&&(this.applyMetricVisibility(),this.showStringInput&&this.syncStringInputHeight())}),this.applyMetricVisibility(),this.refreshLabels(),this.showStringInput&&(this.syncStringInputHeight(),requestAnimationFrame(()=>{this.open&&this.showStringInput&&(this.syncStringInputHeight(),this.stringInput.focus())}))}update(e){this.open&&(e.prompt!=null&&(this.promptEl.textContent=YJ(e.prompt),this.collapsed&&this.scheduleCompactPromptVisibility()),e.showStringInput!=null&&(this.showStringInput=e.showStringInput,this.showStringInput&&(this.showMetrics=!1),this.confirmBtn.disabled=this.showStringInput?!1:e.allowNone!=null?!e.allowNone:this.confirmBtn.disabled,this.applyMetricVisibility()),e.allowNone!=null&&!this.showStringInput&&(this.confirmBtn.disabled=!e.allowNone),e.stringValue!=null&&(this.stringInput.value=e.stringValue,this.syncStringInputHeight()),e.stringPlaceholder!=null&&(this.stringInput.placeholder=e.stringPlaceholder),e.keywords&&(this.renderChips(e.keywords),this.applyMetricVisibility()),e.showMetrics!=null&&!this.showStringInput&&(this.showMetrics=e.showMetrics,this.applyMetricVisibility()))}getStringValue(){return this.stringInput.value}focusStringInput(){!this.open||!this.showStringInput||this.stringInput.focus()}syncStringInputHeight(){if(!this.open||!this.showStringInput)return;let e=this.stringInput,t=getComputedStyle(e),n=parseFloat(t.fontSize)||14,i=parseFloat(t.lineHeight)||n*1.35,o=(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0),a=(parseFloat(t.borderTopWidth)||0)+(parseFloat(t.borderBottomWidth)||0),s=i+o+a,l=i*3+o+a;e.style.height=`${s}px`,e.style.overflowY="hidden";let c=e.scrollHeight,u=Math.min(Math.max(c,s),l);e.style.height=`${u}px`,e.style.overflowY=c>l+.5?"auto":"hidden"}setMetrics(e,t){this.open&&(this.hasBasePoint=e,this.frozenTexts={...t},this.frozenHasBasePoint=e,this.setMetricTexts(t,e),this.applyMetricVisibility())}setCollapsed(e){this.collapsed!==e&&(this.collapsed=e,this.panel.classList.toggle("is-collapsed",e),this.collapseBtn.innerHTML=e?mDe():$J(),this.refreshCollapseLabel(),this.open&&this.applyMetricVisibility())}prepareAccessory(){this.accessoryEl.hidden=!1,this.open&&this.applyMetricVisibility()}clearAccessory(){this.accessoryContentEl.replaceChildren(),this.open&&this.applyMetricVisibility()}hide(){var e;this.open=!1,this.callbacks=null,this.showStringInput=!1,this.stringInput.value="",this.stringInput.placeholder="",this.stringInput.style.height="",this.stringInput.style.overflowY="",this.accessoryEl.hidden=!0,this.compactPromptRaf&&(cancelAnimationFrame(this.compactPromptRaf),this.compactPromptRaf=0),this.setCollapsed(!1),(e=this.layoutUnsub)==null||e.call(this),this.layoutUnsub=void 0,this.root.hidden=!0,this.root.setAttribute("aria-hidden","true"),this.host.classList.remove(this.activeClass)}refreshLabels(){var e;let t=this.labelsFn();this.metricButtons.length.querySelector(".ml-mobile-cmd-metric-label").textContent=t.length,this.metricButtons.angle.querySelector(".ml-mobile-cmd-metric-label").textContent=t.angle,this.metricButtons.dx.querySelector(".ml-mobile-cmd-metric-label").textContent=t.dx,this.metricButtons.dy.querySelector(".ml-mobile-cmd-metric-label").textContent=t.dy,this.metricButtons.x.querySelector(".ml-mobile-cmd-metric-label").textContent=t.x,this.metricButtons.y.querySelector(".ml-mobile-cmd-metric-label").textContent=t.y,this.confirmBtn.setAttribute("aria-label",t.confirm),this.cancelBtn.setAttribute("aria-label",t.cancel),this.helpBtn.setAttribute("aria-label",t.help),this.refreshCollapseLabel(),(e=this.helpPanel)==null||e.setLabels({title:t.help,back:t.back})}dispose(){var e,t,n;this.hide(),this.compactPromptRaf&&(cancelAnimationFrame(this.compactPromptRaf),this.compactPromptRaf=0),(e=this.compactPromptObserver)==null||e.disconnect(),this.compactPromptObserver=void 0,(t=this.accessoryObserver)==null||t.disconnect(),this.accessoryObserver=void 0,(n=this.helpPanel)==null||n.dispose(),this.helpPanel=null,this.root.remove()}hasAccessoryWidgets(){return this.accessoryContentEl.childElementCount>0}syncPromptPlacement(e){let t=!this.hasAccessoryWidgets(),n=this.chipsEl.childElementCount>0;if(this.panel.classList.toggle("is-prompt-in-title",t),this.helpBtn.hidden=e,this.accessoryEl.hidden=!1,this.accessoryEl.appendChild(this.titleActions),this.chipsEl.hidden=e||!n,this.promptRow.classList.remove("is-in-title"),e){this.promptEl.hidden=!1,this.accessoryEl.insertBefore(this.promptEl,this.titleActions),this.promptRow.appendChild(this.chipsEl),this.promptRow.parentElement===this.accessoryEl&&this.panel.insertBefore(this.promptRow,this.absGroup),this.promptRow.hidden=!0,this.accessoryEl.appendChild(this.compactActions),this.compactActions.append(this.cancelBtn,this.confirmBtn),this.scheduleCompactPromptVisibility();return}this.promptEl.hidden=!1,this.compactActions.replaceChildren(),this.compactActions.parentElement===this.accessoryEl&&this.compactActions.remove(),this.panel.classList.remove("is-compact-prompt-hidden"),this.promptRow.parentElement===this.accessoryEl&&this.panel.insertBefore(this.promptRow,this.absGroup),t?(this.accessoryEl.insertBefore(this.promptEl,this.titleActions),this.promptRow.appendChild(this.chipsEl),this.promptRow.hidden=!n):(this.promptRow.append(this.promptEl,this.chipsEl),this.promptRow.hidden=!1)}scheduleCompactPromptVisibility(){!this.collapsed||!this.open||(this.compactPromptRaf&&cancelAnimationFrame(this.compactPromptRaf),this.compactPromptRaf=requestAnimationFrame(()=>{this.compactPromptRaf=0,this.syncCompactPromptVisibility()}))}syncCompactPromptVisibility(){var e;if(!this.collapsed||!this.open){this.panel.classList.remove("is-compact-prompt-hidden");return}if(!(((e=this.promptEl.textContent)==null?void 0:e.trim())??"")){this.applyCompactPromptHidden(!0);return}let t=this.measurePromptTextWidth();if(t<=0){this.applyCompactPromptHidden(!1);return}let n=this.measureCompactPromptAvailableWidth();this.applyCompactPromptHidden(n<t/3)}applyCompactPromptHidden(e){this.promptEl.hidden===e&&this.panel.classList.contains("is-compact-prompt-hidden")===e||(this.promptEl.hidden=e,this.panel.classList.toggle("is-compact-prompt-hidden",e))}measureCompactPromptAvailableWidth(){if(!this.promptEl.hidden)return this.promptEl.clientWidth;let e=this.accessoryEl.clientWidth,t=getComputedStyle(this.accessoryEl),n=parseFloat(t.columnGap||t.gap||"0")||0,i=Array.from(this.accessoryEl.children).filter(a=>a!==this.promptEl&&!a.hidden),o=0;for(let a of i)o+=a.getBoundingClientRect().width;return Math.max(0,e-o-n*i.length)}measurePromptTextWidth(){let e=document.createElement("span"),t=getComputedStyle(this.promptEl);e.textContent=this.promptEl.textContent;let n=t.font||`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`.trim();e.style.cssText=["position:absolute","visibility:hidden","pointer-events:none","white-space:nowrap",`font:${n}`,`letter-spacing:${t.letterSpacing}`,`text-transform:${t.textTransform}`].join(";"),document.body.appendChild(e);let i=e.getBoundingClientRect().width;return e.remove(),i}refreshCollapseLabel(){let e=this.labelsFn();this.collapseBtn.setAttribute("aria-label",this.collapsed?e.expand:e.collapse),this.collapseBtn.setAttribute("aria-expanded",String(!this.collapsed))}makeMetricButton(e){let t=document.createElement("button");t.type="button",t.className="ml-mobile-cmd-metric",t.dataset.metric=e,t.disabled=!0;let n=document.createElement("span");n.className="ml-mobile-cmd-metric-label";let i=document.createElement("span");return i.className="ml-mobile-cmd-metric-value",i.textContent="0",t.append(n,i),t}setMetricTexts(e,t){this.metricButtons.length.querySelector(".ml-mobile-cmd-metric-value").textContent=e.length,this.metricButtons.angle.querySelector(".ml-mobile-cmd-metric-value").textContent=e.angle,this.metricButtons.dx.querySelector(".ml-mobile-cmd-metric-value").textContent=e.dx,this.metricButtons.dy.querySelector(".ml-mobile-cmd-metric-value").textContent=e.dy,this.metricButtons.x.querySelector(".ml-mobile-cmd-metric-value").textContent=e.x,this.metricButtons.y.querySelector(".ml-mobile-cmd-metric-value").textContent=e.y,this.hasBasePoint=t}applyMetricVisibility(){let e=this.showStringInput,t=!e&&this.showMetrics&&this.hasBasePoint,n=!e&&this.showMetrics&&!this.hasBasePoint,i=this.isPhoneLayout(),o=this.collapsed;this.metricButtons.length.hidden=!t,this.metricButtons.angle.hidden=!t,this.metricButtons.dx.hidden=!t,this.metricButtons.dy.hidden=!t,this.metricButtons.x.hidden=!n,this.metricButtons.y.hidden=!n,this.panel.classList.toggle("is-relative",t&&!o),this.panel.classList.toggle("is-absolute",n&&!o),this.panel.classList.toggle("is-string-input",e&&!o),this.panel.classList.toggle("is-actions-only",!o&&!t&&!n&&!e),this.panel.classList.toggle("is-collapsed",o),this.polarGroup.hidden=o||!t,this.deltaGroup.hidden=o||!t,this.absStack.hidden=!n,this.absGroup.hidden=o||e?!0:i?t:!n,this.stringGroup.hidden=o||!e,this.chipsEl.hidden=o||this.chipsEl.childElementCount===0,this.syncPromptPlacement(o),o||(e?i?this.stringActions.append(this.cancelBtn,this.confirmBtn):this.sharedActions.append(this.cancelBtn,this.confirmBtn):i&&t?(this.polarActions.appendChild(this.cancelBtn),this.deltaActions.appendChild(this.confirmBtn)):i?this.absActions.append(this.cancelBtn,this.confirmBtn):this.sharedActions.append(this.cancelBtn,this.confirmBtn))}renderChips(e){this.chipsEl.replaceChildren(),this.chipsEl.hidden=this.collapsed||e.length===0;for(let t of e){let n=document.createElement("button");n.type="button",n.className="ml-mobile-cmd-chip",n.textContent=t.displayName,n.disabled=!t.enabled,n.addEventListener("click",i=>{var o;i.preventDefault(),i.stopPropagation(),t.enabled&&((o=this.callbacks)==null||o.onKeyword(t.id))}),this.sinkPointer(n),this.chipsEl.appendChild(n)}}openHelpPanel(){if(!this.helpPanel){let t=typeof this.helpHostOpt=="function"?this.helpHostOpt():this.helpHostOpt;this.helpPanel=new dDe(t?{host:t}:void 0)}let e=this.labelsFn();this.helpPanel.showDocs({url:this.helpDocsUrl(),labels:{title:e.help,back:e.back}})}sinkPointer(e){e.addEventListener("pointerdown",t=>{t.stopPropagation()})}static injectCss(){if(typeof document>"u")return;let e=document.getElementById(XJ);e||(e=document.createElement("style"),e.id=XJ,document.head.appendChild(e)),e.textContent=bDe}};function YJ(r){return r.trim().replace(/[::]\s*$/,"")}function fDe(){return'<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path fill="currentColor" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 15.2a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4zm1.6-5.35c-.62.36-1 .9-1 1.55h-1.5c0-1.18.6-2.05 1.45-2.55.62-.36.95-.7.95-1.25 0-.7-.55-1.2-1.4-1.2-.9 0-1.45.5-1.55 1.3H8.9C9.1 7.95 10.35 7 12.1 7c1.85 0 3.15 1.05 3.15 2.55 0 .95-.5 1.7-1.65 2.3z"/></svg>'}function $J(){return'<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path fill="currentColor" d="M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>'}function mDe(){return'<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path fill="currentColor" d="M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"/></svg>'}function gDe(){return'<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path fill="currentColor" d="M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7a1 1 0 0 0-1.41 1.42L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4z"/></svg>'}function yDe(){return'<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path fill="currentColor" d="M9.55 18.2 3.8 12.45l1.4-1.4 4.35 4.36 9.25-9.26 1.4 1.41z"/></svg>'}var bDe=`
  5472. .ml-mobile-cmd {
  5473. pointer-events: none;
  5474. }
  5475. .ml-mobile-cmd-panel {
  5476. pointer-events: auto;
  5477. position: fixed;
  5478. left: 0;
  5479. right: 0;
  5480. bottom: 0;
  5481. z-index: 40;
  5482. display: flex;
  5483. flex-direction: column;
  5484. gap: 8px;
  5485. padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  5486. background: var(--ml-ui-bg, rgba(28, 30, 34, 0.96));
  5487. color: var(--ml-ui-text, #e8eaed);
  5488. border-top: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.12));
  5489. box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  5490. box-sizing: border-box;
  5491. }
  5492. .ml-mobile-cmd-panel.is-collapsed {
  5493. height: calc(
  5494. var(--ml-mobile-cmd-collapsed-height, 56px) + env(safe-area-inset-bottom, 0px)
  5495. );
  5496. min-height: calc(
  5497. var(--ml-mobile-cmd-collapsed-height, 56px) + env(safe-area-inset-bottom, 0px)
  5498. );
  5499. padding: 0 12px env(safe-area-inset-bottom, 0px);
  5500. gap: 0;
  5501. justify-content: center;
  5502. }
  5503. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-accessory {
  5504. padding-bottom: 0;
  5505. border-bottom: 0;
  5506. flex: 1;
  5507. min-width: 0;
  5508. flex-wrap: nowrap;
  5509. }
  5510. /* Accessory keeps intrinsic width; prompt may not steal space from it. */
  5511. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-accessory-content {
  5512. flex: 0 0 auto;
  5513. min-width: 0;
  5514. }
  5515. .ml-mobile-cmd-prompt-row {
  5516. display: flex;
  5517. flex-wrap: wrap;
  5518. align-items: center;
  5519. gap: 8px;
  5520. min-width: 0;
  5521. }
  5522. .ml-mobile-cmd-prompt-row[hidden] {
  5523. display: none;
  5524. }
  5525. .ml-mobile-cmd-prompt-row:not([hidden]) {
  5526. box-sizing: border-box;
  5527. min-height: 32px;
  5528. padding-top: 4px;
  5529. padding-bottom: 4px;
  5530. border-bottom: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.12));
  5531. }
  5532. .ml-mobile-cmd-prompt {
  5533. flex: 1 1 10em;
  5534. min-width: min(100%, 8em);
  5535. box-sizing: border-box;
  5536. padding: 0;
  5537. border: 0;
  5538. border-radius: 0;
  5539. background: transparent;
  5540. color: var(--ml-ui-text, #e8eaed);
  5541. font-size: 12px;
  5542. font-weight: 500;
  5543. line-height: 1.4;
  5544. white-space: normal;
  5545. overflow-wrap: anywhere;
  5546. word-break: break-word;
  5547. }
  5548. .ml-mobile-cmd-accessory > .ml-mobile-cmd-prompt {
  5549. flex: 1 1 auto;
  5550. min-width: 0;
  5551. }
  5552. /* Compact: fill leftover space only; ellipsis when truncated. */
  5553. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-prompt {
  5554. flex: 1 1 0;
  5555. min-width: 0;
  5556. white-space: nowrap;
  5557. overflow: hidden;
  5558. text-overflow: ellipsis;
  5559. overflow-wrap: normal;
  5560. word-break: normal;
  5561. }
  5562. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-prompt[hidden] {
  5563. display: none;
  5564. }
  5565. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-chips {
  5566. display: none !important;
  5567. }
  5568. .ml-mobile-cmd-actions-compact {
  5569. display: none;
  5570. flex-direction: row;
  5571. align-items: center;
  5572. justify-content: center;
  5573. gap: 8px;
  5574. flex: 0 0 auto;
  5575. margin-left: 8px;
  5576. padding-left: 0;
  5577. border-left: 0;
  5578. }
  5579. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-actions-compact {
  5580. display: flex;
  5581. }
  5582. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-help[hidden] {
  5583. display: none;
  5584. }
  5585. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-title-actions {
  5586. margin-left: 0;
  5587. flex: 0 0 auto;
  5588. }
  5589. /* No prompt: accessory left, expand + \u2713/\xD7 right. */
  5590. .ml-mobile-cmd-panel.is-collapsed.is-compact-prompt-hidden .ml-mobile-cmd-title-actions {
  5591. margin-left: auto;
  5592. }
  5593. .ml-mobile-cmd-group {
  5594. display: flex;
  5595. align-items: stretch;
  5596. gap: 8px;
  5597. min-width: 0;
  5598. }
  5599. .ml-mobile-cmd-group[hidden] {
  5600. display: none;
  5601. }
  5602. .ml-mobile-cmd-string-input {
  5603. flex: 1;
  5604. min-width: 0;
  5605. box-sizing: border-box;
  5606. margin: 0;
  5607. padding: 8px 10px;
  5608. border: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.16));
  5609. border-radius: 8px;
  5610. background: var(--ml-ui-bg-elevated, rgba(255, 255, 255, 0.06));
  5611. color: var(--ml-ui-text, #e8eaed);
  5612. font: inherit;
  5613. font-size: 14px;
  5614. line-height: 1.35;
  5615. outline: none;
  5616. resize: none;
  5617. overflow-y: hidden;
  5618. white-space: pre-wrap;
  5619. word-break: break-word;
  5620. /* 1-line floor; JS grows up to 3 lines via syncStringInputHeight. */
  5621. height: calc(1.35em + 16px + 2px);
  5622. }
  5623. .ml-mobile-cmd-string-input:focus {
  5624. border-color: var(--ml-ui-accent, #08e8de);
  5625. }
  5626. .ml-mobile-cmd-string-input::placeholder {
  5627. color: var(--ml-ui-muted, #9aa0a6);
  5628. }
  5629. .ml-mobile-cmd-panel.is-relative .ml-mobile-cmd-group-polar {
  5630. border-bottom: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.12));
  5631. padding-bottom: 0;
  5632. }
  5633. .ml-mobile-cmd-group:not(.ml-mobile-cmd-group-string):not(
  5634. :has(.ml-mobile-cmd-metric-stack:not([hidden]))
  5635. ) {
  5636. justify-content: flex-end;
  5637. }
  5638. .ml-mobile-cmd-group-string {
  5639. align-items: stretch;
  5640. }
  5641. .ml-mobile-cmd-group-string .ml-mobile-cmd-actions {
  5642. align-self: stretch;
  5643. align-items: center;
  5644. border-left: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.12));
  5645. padding-left: 12px;
  5646. }
  5647. .ml-mobile-cmd-metric-stack {
  5648. flex: 1;
  5649. min-width: 0;
  5650. display: flex;
  5651. flex-direction: column;
  5652. justify-content: center;
  5653. gap: 2px;
  5654. }
  5655. .ml-mobile-cmd-metric-stack[hidden] {
  5656. display: none;
  5657. }
  5658. .ml-mobile-cmd-actions {
  5659. display: flex;
  5660. flex-direction: row;
  5661. align-items: center;
  5662. justify-content: center;
  5663. gap: 10px;
  5664. flex: 0 0 auto;
  5665. align-self: stretch;
  5666. padding-left: 12px;
  5667. border-left: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.12));
  5668. }
  5669. .ml-mobile-cmd-group:not(.ml-mobile-cmd-group-string):not(
  5670. :has(.ml-mobile-cmd-metric-stack:not([hidden]))
  5671. )
  5672. .ml-mobile-cmd-actions {
  5673. border-left: 0;
  5674. padding-left: 0;
  5675. }
  5676. .ml-mobile-cmd-metric {
  5677. display: flex;
  5678. justify-content: space-between;
  5679. align-items: center;
  5680. gap: 8px;
  5681. margin: 0;
  5682. padding: 2px 0;
  5683. border: 0;
  5684. background: transparent;
  5685. color: inherit;
  5686. font: inherit;
  5687. text-align: left;
  5688. min-height: 28px;
  5689. min-width: 0;
  5690. width: 100%;
  5691. }
  5692. .ml-mobile-cmd-metric[hidden] {
  5693. display: none;
  5694. }
  5695. .ml-mobile-cmd-metric-label {
  5696. flex: 0 0 auto;
  5697. color: var(--ml-ui-muted, #9aa0a6);
  5698. font-size: 12px;
  5699. }
  5700. .ml-mobile-cmd-metric-value {
  5701. min-width: 0;
  5702. overflow: hidden;
  5703. text-overflow: ellipsis;
  5704. white-space: nowrap;
  5705. text-align: right;
  5706. font-variant-numeric: tabular-nums;
  5707. font-size: 13px;
  5708. }
  5709. .ml-mobile-cmd-accessory {
  5710. display: flex;
  5711. flex-wrap: wrap;
  5712. align-items: center;
  5713. gap: 8px;
  5714. min-height: 32px;
  5715. }
  5716. .ml-mobile-cmd-accessory:not([hidden]) {
  5717. padding-bottom: 8px;
  5718. border-bottom: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.12));
  5719. }
  5720. .ml-mobile-cmd-accessory[hidden] {
  5721. display: none;
  5722. }
  5723. .ml-mobile-cmd-accessory-content {
  5724. flex: 1;
  5725. min-width: 0;
  5726. display: flex;
  5727. align-items: center;
  5728. gap: 8px;
  5729. }
  5730. .ml-mobile-cmd-accessory-content:empty {
  5731. display: none;
  5732. }
  5733. .ml-mobile-cmd-title-actions {
  5734. display: flex;
  5735. flex: 0 0 auto;
  5736. align-items: center;
  5737. gap: 0;
  5738. margin-left: auto;
  5739. }
  5740. .ml-mobile-cmd-help,
  5741. .ml-mobile-cmd-collapse {
  5742. box-sizing: border-box;
  5743. flex: 0 0 auto;
  5744. margin: 0;
  5745. width: 32px;
  5746. height: 32px;
  5747. padding: 0;
  5748. border: 0;
  5749. border-radius: 50%;
  5750. display: inline-flex;
  5751. align-items: center;
  5752. justify-content: center;
  5753. background: transparent;
  5754. color: var(--ml-ui-muted, #9aa0a6);
  5755. cursor: pointer;
  5756. line-height: 0;
  5757. }
  5758. .ml-mobile-cmd-help:hover,
  5759. .ml-mobile-cmd-help:focus-visible,
  5760. .ml-mobile-cmd-collapse:hover,
  5761. .ml-mobile-cmd-collapse:focus-visible {
  5762. color: var(--ml-ui-accent, #08e8de);
  5763. }
  5764. .ml-mobile-cmd-help svg,
  5765. .ml-mobile-cmd-collapse svg {
  5766. display: block;
  5767. width: 18px;
  5768. height: 18px;
  5769. }
  5770. .ml-mobile-cmd-chips {
  5771. display: flex;
  5772. flex-wrap: wrap;
  5773. align-items: center;
  5774. gap: 6px;
  5775. flex: 0 1 auto;
  5776. min-width: 0;
  5777. }
  5778. .ml-mobile-cmd-chips:not([hidden]) {
  5779. padding: 0;
  5780. border: 0;
  5781. }
  5782. .ml-mobile-cmd-chips[hidden] {
  5783. display: none;
  5784. }
  5785. .ml-mobile-cmd-chip {
  5786. min-height: 32px;
  5787. padding: 4px 10px;
  5788. border-radius: 16px;
  5789. border: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.16));
  5790. background: var(--ml-ui-bg-elevated, rgba(255, 255, 255, 0.06));
  5791. color: var(--ml-ui-accent, #08e8de);
  5792. font-size: 13px;
  5793. }
  5794. .ml-mobile-cmd-chip:disabled {
  5795. opacity: 0.45;
  5796. }
  5797. .ml-mobile-cmd-cancel,
  5798. .ml-mobile-cmd-confirm {
  5799. box-sizing: border-box;
  5800. flex: 0 0 36px;
  5801. align-self: center;
  5802. margin: 0;
  5803. width: 36px;
  5804. height: 36px;
  5805. padding: 0;
  5806. border-radius: 50%;
  5807. border: 0;
  5808. display: inline-flex;
  5809. align-items: center;
  5810. justify-content: center;
  5811. line-height: 0;
  5812. cursor: pointer;
  5813. color: #fff;
  5814. }
  5815. .ml-mobile-cmd-cancel svg,
  5816. .ml-mobile-cmd-confirm svg {
  5817. display: block;
  5818. width: 18px;
  5819. height: 18px;
  5820. }
  5821. .ml-mobile-cmd-cancel {
  5822. background: #5c6370;
  5823. }
  5824. .ml-mobile-cmd-confirm {
  5825. background: var(--ml-ui-accent, #1a8cff);
  5826. }
  5827. .ml-mobile-cmd-confirm:disabled {
  5828. opacity: 0.35;
  5829. cursor: default;
  5830. }
  5831. .ml-mobile-cmd-actions-shared {
  5832. display: none;
  5833. }
  5834. .ml-mobile-cmd-panel.is-collapsed .ml-mobile-cmd-actions-shared {
  5835. display: none !important;
  5836. }
  5837. @media (min-width: ${g1}px) {
  5838. .ml-mobile-cmd-metric-stack {
  5839. flex-direction: row;
  5840. align-items: center;
  5841. gap: 16px;
  5842. }
  5843. .ml-mobile-cmd-metric {
  5844. flex: 1;
  5845. }
  5846. }
  5847. @media (min-width: ${eU+1}px) {
  5848. .ml-mobile-cmd-panel {
  5849. left: 50%;
  5850. right: auto;
  5851. width: ${g1}px;
  5852. max-width: ${aN};
  5853. transform: translateX(-50%);
  5854. border-radius: 12px 12px 0 0;
  5855. border: 1px solid var(--ml-ui-border, rgba(255, 255, 255, 0.12));
  5856. border-bottom: 0;
  5857. }
  5858. .ml-mobile-cmd-panel.is-collapsed {
  5859. width: ${g1}px;
  5860. max-width: ${aN};
  5861. }
  5862. .ml-mobile-cmd-group .ml-mobile-cmd-actions {
  5863. display: none;
  5864. }
  5865. .ml-mobile-cmd-actions-shared {
  5866. display: flex;
  5867. flex-direction: row;
  5868. align-items: center;
  5869. justify-content: center;
  5870. }
  5871. .ml-mobile-cmd-panel.is-absolute .ml-mobile-cmd-group-abs {
  5872. align-items: center;
  5873. }
  5874. .ml-mobile-cmd-panel.is-absolute .ml-mobile-cmd-actions-shared {
  5875. align-self: center;
  5876. }
  5877. .ml-mobile-cmd-panel.is-relative:not([hidden]),
  5878. .ml-mobile-cmd-panel.is-absolute:not([hidden]) {
  5879. display: grid;
  5880. grid-template-columns: 1fr auto;
  5881. align-items: stretch;
  5882. row-gap: 0;
  5883. column-gap: 8px;
  5884. }
  5885. .ml-mobile-cmd-panel.is-relative {
  5886. grid-template-areas:
  5887. 'accessory accessory'
  5888. 'prompt prompt'
  5889. 'polar shared'
  5890. 'delta shared';
  5891. }
  5892. .ml-mobile-cmd-panel.is-absolute {
  5893. grid-template-areas:
  5894. 'accessory accessory'
  5895. 'prompt prompt'
  5896. 'abs shared';
  5897. }
  5898. .ml-mobile-cmd-panel.is-string-input {
  5899. display: grid;
  5900. grid-template-columns: 1fr auto;
  5901. align-items: stretch;
  5902. row-gap: 0;
  5903. column-gap: 8px;
  5904. grid-template-areas:
  5905. 'accessory accessory'
  5906. 'prompt prompt'
  5907. 'string shared';
  5908. }
  5909. .ml-mobile-cmd-group-polar { grid-area: polar; }
  5910. .ml-mobile-cmd-group-delta { grid-area: delta; }
  5911. .ml-mobile-cmd-group-abs { grid-area: abs; }
  5912. .ml-mobile-cmd-group-string { grid-area: string; }
  5913. .ml-mobile-cmd-actions-shared { grid-area: shared; }
  5914. .ml-mobile-cmd-accessory { grid-area: accessory; }
  5915. .ml-mobile-cmd-prompt-row { grid-area: prompt; }
  5916. .ml-mobile-cmd-panel.is-string-input .ml-mobile-cmd-group-string {
  5917. align-items: stretch;
  5918. }
  5919. .ml-mobile-cmd-panel.is-string-input .ml-mobile-cmd-actions-shared {
  5920. align-self: stretch;
  5921. align-items: center;
  5922. }
  5923. .ml-mobile-cmd-panel.is-relative .ml-mobile-cmd-group-polar {
  5924. padding-bottom: 6px;
  5925. }
  5926. .ml-mobile-cmd-panel.is-relative .ml-mobile-cmd-group-delta {
  5927. padding-top: 6px;
  5928. }
  5929. .ml-mobile-cmd-panel.is-actions-only {
  5930. display: flex;
  5931. flex-direction: column;
  5932. }
  5933. .ml-mobile-cmd-panel.is-actions-only .ml-mobile-cmd-actions-shared {
  5934. border-left: 0;
  5935. padding-left: 0;
  5936. justify-content: flex-end;
  5937. align-self: flex-end;
  5938. }
  5939. .ml-mobile-cmd-panel.is-collapsed {
  5940. display: flex !important;
  5941. flex-direction: row;
  5942. align-items: center;
  5943. transform: translateX(-50%);
  5944. }
  5945. }
  5946. `,UN=class{constructor(e){this.boundRelabel=()=>this.panel.refreshLabels(),this.panel=new zN({host:e,isPhoneLayout:kk,subscribeLayout:Ik,helpDocsUrl:()=>$ke(Wke,P.currentLocale),labels:()=>vDe()}),P.events.localeChanged.addEventListener(this.boundRelabel),this.localeUnsub=()=>{P.events.localeChanged.removeEventListener(this.boundRelabel)}}get isOpen(){return this.panel.isOpen}show(e,t){if(!ba().point.usesSessionChrome){this.hide();return}this.panel.show({prompt:e.prompt,allowNone:e.allowNone,showMetrics:e.showMetrics,showStringInput:e.showStringInput,stringValue:e.stringValue,stringPlaceholder:e.stringPlaceholder,keywords:e.keywords.map(n=>({displayName:n.displayName,id:n.globalName,enabled:n.enabled}))},{onConfirm:t.onConfirm,onCancel:t.onCancel,onKeyword:t.onKeyword})}update(e){var t;this.panel.update({prompt:e.prompt,allowNone:e.allowNone,showMetrics:e.showMetrics,showStringInput:e.showStringInput,stringValue:e.stringValue,stringPlaceholder:e.stringPlaceholder,keywords:(t=e.keywords)==null?void 0:t.map(n=>({displayName:n.displayName,id:n.globalName,enabled:n.enabled}))})}setMetrics(e,t){this.panel.setMetrics(e.hasBasePoint,t)}getStringValue(){return this.panel.getStringValue()}focusStringInput(){this.panel.focusStringInput()}hide(){this.panel.hide()}dispose(){var e;(e=this.localeUnsub)==null||e.call(this),this.panel.dispose()}get accessoryHost(){return this.panel.accessoryHost}prepareAccessory(){this.panel.prepareAccessory()}clearAccessory(){this.panel.clearAccessory()}};function vDe(){let r=e=>P.t(e);return{length:r("main.mobileCommand.length"),angle:r("main.mobileCommand.angle"),dx:r("main.mobileCommand.dx"),dy:r("main.mobileCommand.dy"),x:r("main.mobileCommand.x"),y:r("main.mobileCommand.y"),confirm:r("main.mobileCommand.confirm"),cancel:r("main.mobileCommand.cancel"),help:r("main.mobileCommand.help"),back:r("main.mobileCommand.back"),collapse:r("main.mobileCommand.collapse"),expand:r("main.mobileCommand.expand")}}function xDe(r,e){let t=r.x,n=r.y;if(e==null)return{hasBasePoint:!1,length:0,angleDeg:0,dx:0,dy:0,x:t,y:n};let i=t-e.x,o=n-e.y,a=Math.hypot(i,o),s=Math.atan2(o,i)*180/Math.PI;return s<0&&(s+=360),{hasBasePoint:!0,length:a,angleDeg:s,dx:i,dy:o,x:t,y:n}}var jN=class{constructor(e){this.selectionAccessory=null,this.mounted=null,this.remounting=!1,this.bound=!1,this.onBeforeMount=t=>{var n;if(t.source==="command"&&((n=this.mounted)==null?void 0:n.source)==="selection"){this.remounting=!0;try{this.unmountMounted()}finally{this.remounting=!1}}},this.onAfterMount=t=>{t.options&&(this.prepareChrome(t.options.type),this.mounted={accessory:t.accessory,source:t.source,options:t.options,command:t.command})},this.onAfterUnmount=t=>{var n;this.remounting||(((n=this.mounted)==null?void 0:n.accessory)===t.accessory&&(this.clearChrome(this.mounted.options.type),this.mounted=null),t.source==="command"&&this.selectionAccessory&&this.mountSelectionAccessory())},this.view=e.view,this.desktopChrome=new A3e(e.view.container),this.getMobileChrome=e.getMobileChrome,this.isMobilePromptOpen=e.isMobilePromptOpen,this.getEditorEvents=e.getEditorEvents}bindEditorEvents(){if(this.bound)return;this.bound=!0;let e=this.getEditorEvents();e.beforeMountSessionAccessory.addEventListener(this.onBeforeMount),e.afterMountSessionAccessory.addEventListener(this.onAfterMount),e.afterUnmountSessionAccessory.addEventListener(this.onAfterUnmount)}get sessionAccessoryHost(){return this.isMobilePromptOpen()||ba().point.usesSessionChrome?{host:this.getMobileChrome().accessoryHost,type:"mobile"}:{host:this.desktopChrome.host,type:"desktop"}}get selectionSessionAccessory(){return this.selectionAccessory}set selectionSessionAccessory(e){var t,n;if(this.selectionAccessory===e){e&&!this.mounted&&this.mountSelectionAccessory();return}((t=this.mounted)==null?void 0:t.source)==="selection"&&this.mounted.accessory===this.selectionAccessory&&this.unmountMounted(),this.selectionAccessory=e,((n=this.mounted)==null?void 0:n.source)!=="command"&&e&&this.mountSelectionAccessory()}remountActiveSessionAccessory(){if(!this.mounted||this.remounting)return;let{accessory:e,source:t,command:n,options:i}=this.mounted,o=this.sessionAccessoryHost;if(!(i.host===o.host&&i.type===o.type&&o.host.childElementCount>0)){this.remounting=!0;try{let a=this.getEditorEvents(),s={command:n,accessory:e,options:i,source:t};a.beforeUnmountSessionAccessory.dispatch(s),e.unmount(),this.clearChrome(i.type),a.afterUnmountSessionAccessory.dispatch(s);let l={host:o.host,type:o.type,view:this.view},c={command:n,accessory:e,options:l,source:t};a.beforeMountSessionAccessory.dispatch(c),e.mount(l),a.afterMountSessionAccessory.dispatch(c)}finally{this.remounting=!1}}}dispose(){if(this.bound){let e=this.getEditorEvents();e.beforeMountSessionAccessory.removeEventListener(this.onBeforeMount),e.afterMountSessionAccessory.removeEventListener(this.onAfterMount),e.afterUnmountSessionAccessory.removeEventListener(this.onAfterUnmount),this.bound=!1}if(this.mounted){try{this.mounted.accessory.unmount()}catch{}this.clearChrome(this.mounted.options.type),this.mounted=null}this.selectionAccessory=null,this.desktopChrome.dispose()}mountSelectionAccessory(){var e,t;let n=this.selectionAccessory;if(!n||((e=this.mounted)==null?void 0:e.source)==="command"||((t=this.mounted)==null?void 0:t.accessory)===n)return;this.mounted&&this.unmountMounted();let i=this.sessionAccessoryHost;if(i.type==="mobile")return;let o={host:i.host,type:i.type,view:this.view},a=this.getEditorEvents(),s={command:null,accessory:n,options:o,source:"selection"};a.beforeMountSessionAccessory.dispatch(s),n.mount(o),a.afterMountSessionAccessory.dispatch(s)}unmountMounted(){if(!this.mounted)return;let{accessory:e,source:t,command:n,options:i}=this.mounted,o=this.getEditorEvents(),a={command:n,accessory:e,options:i,source:t};o.beforeUnmountSessionAccessory.dispatch(a),e.unmount(),this.clearChrome(i.type),this.mounted=null,o.afterUnmountSessionAccessory.dispatch(a)}prepareChrome(e){if(e==="mobile"){this.desktopChrome.clear(),this.getMobileChrome().prepareAccessory();return}this.getMobileChrome().clearAccessory(),this.desktopChrome.prepare()}clearChrome(e){e==="mobile"?this.getMobileChrome().clearAccessory():this.desktopChrome.clear()}},Tl=class extends Error{constructor(e){super("keyword"),this.keyword=e}},Td=class extends Error{constructor(){super("none")}},Ete=class VN{constructor(e,t){this.lastPoint=null,this._confirmedPointMarks=null,this._confirmedPointPositions=[],this._entityPickCancel=null,this._onSettingsModified=()=>{this.syncDesktopCommandLineVisibility()},this._onCommandEnded=()=>{this.clearConfirmedPointMarks(),this._mobileChrome.isOpen&&this.endMobilePrompt()},this._disposed=!1,this._scriptInputs=[],this._modifierState={ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1},this._ctrlArcFlip=!1,this.active=!1,this.entitySelectionActive=!1,this._activeRejector=null,this._entityPickCancelOnCancel=null,this.view=e,this._editorEvents=t,this._boundRepositionConfirmedPointMarks=()=>this.repositionConfirmedPointMarks(),this.injectCSS(),getComputedStyle(this.view.container).position==="static"&&(this.view.container.style.position="relative");let n=new xN(this.view.container);this._commandLine=n,this._mobileChrome=new UN(this.view.container),this._sessionAccessoryController=new jN({view:this.view,getMobileChrome:()=>this._mobileChrome,isMobilePromptOpen:()=>this._mobileChrome.isOpen,getEditorEvents:()=>t}),this._sessionAccessoryController.bindEditorEvents(),this.syncDesktopCommandLineVisibility(),hr.instance.events.modified.addEventListener(this._onSettingsModified),this._unsubscribeUiLayout=Ik(()=>{this.syncDesktopCommandLineVisibility(),!ba().point.usesSessionChrome&&this._mobileChrome.isOpen&&this._mobileChrome.hide(),this._sessionAccessoryController.remountActiveSessionAccessory()}),this.view.events.viewChanged.addEventListener(this._boundRepositionConfirmedPointMarks),this.view.events.viewResize.addEventListener(this._boundRepositionConfirmedPointMarks),t.commandEnded.addEventListener(this._onCommandEnded)}dispose(){var e,t;this._disposed||(this._disposed=!0,this.cancelActiveInput(),this.clearConfirmedPointMarks(),this.hideEntityPickCancel(),(e=this._entityPickCancel)==null||e.dispose(),this._entityPickCancel=null,hr.instance.events.modified.removeEventListener(this._onSettingsModified),(t=this._unsubscribeUiLayout)==null||t.call(this),this._unsubscribeUiLayout=void 0,this.view.events.viewChanged.removeEventListener(this._boundRepositionConfirmedPointMarks),this.view.events.viewResize.removeEventListener(this._boundRepositionConfirmedPointMarks),this._editorEvents.commandEnded.removeEventListener(this._onCommandEnded),this._sessionAccessoryController.dispose(),this._mobileChrome.dispose(),this._commandLine.dispose())}get isMobilePromptOpen(){return this._mobileChrome.isOpen}get mobileChrome(){return this._mobileChrome}get sessionAccessoryHost(){return this._sessionAccessoryController.sessionAccessoryHost}get selectionSessionAccessory(){return this._sessionAccessoryController.selectionSessionAccessory}set selectionSessionAccessory(e){this._sessionAccessoryController.selectionSessionAccessory=e}get isActive(){return this.active}get isEntitySelectionActive(){return this.entitySelectionActive}get modifiers(){return this._modifierState}get toggles(){return{ctrlArcFlip:this._ctrlArcFlip}}resetToggles(){this._ctrlArcFlip=!1}cancelActiveInput(){let e=this._activeRejector;e&&(this._activeRejector=null,e())}syncDesktopCommandLineVisibility(){let e=pOe(this.active);this._commandLine.visible=!e&&hr.instance.isShowCommandLine}mobileKeywordChips(e){var t;return(((t=e.keywords)==null?void 0:t.toArray())??[]).filter(n=>n.visible).map(n=>({displayName:n.displayName,globalName:n.globalName,enabled:n.enabled}))}beginMobilePrompt(e){this.syncDesktopCommandLineVisibility(),ba().point.usesSessionChrome&&(this._mobileChrome.show({prompt:e.prompt,keywords:e.keywords??[],allowNone:e.allowNone,showMetrics:e.showMetrics,showStringInput:e.showStringInput,stringValue:e.stringValue,stringPlaceholder:e.stringPlaceholder},{onConfirm:e.onConfirm,onCancel:e.onCancel,onKeyword:e.onKeyword}),this._sessionAccessoryController.remountActiveSessionAccessory(),e.touchPointTutorial&&AN.maybeShow(this.view.container))}endMobilePrompt(){this._mobileChrome.hide(),this.syncDesktopCommandLineVisibility(),this._sessionAccessoryController.remountActiveSessionAccessory()}showEntityPickCancel(e){if(!kk()){this.hideEntityPickCancel();return}this._entityPickCancel?this._entityPickCancel.setLabel(P.t("main.entityPick.cancel")):this._entityPickCancel=new wN({container:this.view.container,onCancel:()=>{var t;return(t=this._entityPickCancelOnCancel)==null?void 0:t.call(this)},label:P.t("main.entityPick.cancel"),topOffsetPx:48}),this._entityPickCancelOnCancel=e,this._entityPickCancel.show()}hideEntityPickCancel(){var e;this._entityPickCancelOnCancel=null,(e=this._entityPickCancel)==null||e.hide()}pushMobileMetrics(e,t){if(!this._mobileChrome.isOpen)return;let n=xDe(e,t);n.hasBasePoint&&n.length===0||this._mobileChrome.setMetrics(n,{length:this.formatNumber(n.length,"distance"),angle:this.formatNumber(n.angleDeg,"angle"),dx:this.formatNumber(n.dx,"point"),dy:this.formatNumber(n.dy,"point"),x:this.formatNumber(n.x,"point"),y:this.formatNumber(n.y,"point")})}enqueueScriptInputs(e){e.length&&this._scriptInputs.push(...e)}clearScriptInputs(){this._scriptInputs.length=0}hasScriptInputs(){return this._scriptInputs.length>0}drainScriptInputs(){return this._scriptInputs.length?this._scriptInputs.splice(0,this._scriptInputs.length):[]}showMessage(e,t="info",n){this._commandLine.showMessage(e,t,n)}peekScriptInput(){return this._scriptInputs[0]}consumeScriptInput(){return this.dequeueScriptInput()}injectCSS(){if(VN.stylesInjected)return;VN.stylesInjected=!0;let e=document.createElement("style");e.textContent=`
  5947. .ml-jig-preview-rect {
  5948. position: absolute;
  5949. border: 1px dashed var(--line-color, var(--ml-ui-canvas-line, #0f0));
  5950. background: var(--ml-ui-canvas-fill-mix, var(--ml-ui-canvas-fill, rgba(64, 158, 255, 0.12)));
  5951. pointer-events: none;
  5952. z-index: 1;
  5953. }
  5954. .ml-jig-preview-line {
  5955. position: absolute;
  5956. height: 1px;
  5957. background: var(--line-color, var(--ml-ui-canvas-line, #0f0));
  5958. transform-origin: 0 0;
  5959. pointer-events: none;
  5960. z-index: 1;
  5961. }
  5962. `,document.head.appendChild(e)}formatNumber(e,t){var n;let i=(n=Y.instance.curDocument)==null?void 0:n.database;return i?t==="angle"?i.formatter.formatAngle(e*Math.PI/180,{applyAngbaseAngdir:!1}):i.formatter.formatLength(e):t==="angle"?e.toFixed(2):e.toFixed(3)}hasKeywords(e){var t;return(((t=e.keywords)==null?void 0:t.toArray())??[]).length>0}buildKeywordOptions(e){var t;let n=new Hr(e.message);return n.appendKeywordsToMessage=e.appendKeywordsToMessage,n.valueDefaultDisplayText=e.getDefaultValueDisplayText(),(((t=e.keywords)==null?void 0:t.toArray())??[]).forEach(i=>{let o=n.keywords.add(i.displayName,i.globalName,i.localName,i.enabled,i.visible);e.keywords.default===i&&(n.keywords.default=o)}),n}copyKeywords(e,t){var n;t.appendKeywordsToMessage=e.appendKeywordsToMessage,(((n=e.keywords)==null?void 0:n.toArray())??[]).forEach(i=>{let o=t.keywords.add(i.displayName,i.globalName,i.localName,i.enabled,i.visible);e.keywords.default===i&&(t.keywords.default=o)})}getEntityById(e){return Y.instance.curDocument.database.tables.blockTable.getEntityById(e)}isEntityOnLockedLayer(e){var t;let n=e.layer;return n?!!((t=Y.instance.curDocument.database.tables.layerTable.getAt(n))!=null&&t.isLocked):!1}isEntityClassAllowed(e,t){var n;let i=new Set;e.type&&i.add(e.type);let o=(n=e.constructor)==null?void 0:n.name;o&&i.add(o);for(let a of i)if(t.isClassAllowed(a))return!0;return!1}startKeywordSession(e,t){if(!this.hasKeywords(e))return;let n=this.buildKeywordOptions(e);return{promise:this._commandLine.getKeywords(n,t),cancel:()=>this._commandLine.cancelActiveSession()}}startPromptInputSession(e,t,n,i){let o=this.buildKeywordOptions(e),a="allowNone"in e?e.allowNone:!1;return{promise:this._commandLine.getPromptInput(o,s=>this.parseCommandLineInput(s,t,n,e),{mode:this.resolvePromptInputMode(t),allowNone:a,allowTyping:i}),cancel:()=>this._commandLine.cancelActiveSession()}}resolvePromptInputMode(e){return e instanceof Ab?"string":"geometric"}resolvePointInputContext(e){let t=this.resolvePromptDefaults(e);return{referencePoint:t.useBasePoint&&t.basePoint?t.basePoint:this.lastPoint??void 0,cursorPoint:this.view.screenToWorld(this.view.viewportToCanvas(this.view.curMousePos))}}parseCommandLineInput(e,t,n,i){let o=e.trim();if(!o)return null;let a=t instanceof em||n===2?this.resolvePointInputContext(i):void 0;return t.parseCommandLine(o,a)}isPromptKeyword(e){return e instanceof Tl}mapPromptError(e,t){if(t.none&&this.isPromptNone(e))return t.none();if(t.cancel&&this.isPromptCancelled(e))return t.cancel();if(t.keyword&&this.isPromptKeyword(e))return t.keyword(e.keyword)}withKeywordResult(e,t){return e.stringResult=t,e}mapPromptErrorToResult(e,t,n){let i=n?.none??!0,o=n?.cancel??!0,a=n?.keyword??!0;return this.mapPromptError(e,{none:i?()=>t(V.None):void 0,cancel:o?()=>t(V.Cancel):void 0,keyword:a?s=>this.withKeywordResult(t(V.Keyword),s):void 0})}async executePrompt(e,t,n,i){try{let o=await e();return t(o)}catch(o){let a=this.mapPromptErrorToResult(o,n,i);if(a)return a;throw o}}resolvePromptDefaultValue(e){return"useDefaultValue"in e&&"defaultValue"in e&&e.useDefaultValue?{useDefaultValue:!0,defaultValue:e.defaultValue}:{useDefaultValue:!1}}async getPoint(e){return this.executePrompt(()=>this.getPointInternal(e),t=>new N1(V.OK,t),t=>new N1(t))}getNumberTyped(e,t){let n=()=>({value:0,raw:{x:""}});return this.makeFloatingInputPromise({inputCount:1,promptOptions:e,handler:t,getDynamicValue:n,showMetrics:!1})}resolveDistanceBasePoint(e){if(e.useBasePoint&&e.basePoint)return{x:e.basePoint.x,y:e.basePoint.y}}createDistanceDynamicValue(e){return t=>{let n=t.x-e.x,i=t.y-e.y,o=Math.sqrt(n*n+i*i);return{value:o,raw:{x:this.formatNumber(o,"distance")}}}}async getDistanceTwoPoint(e,t){let n,i,o=a=>n?this.createDistanceDynamicValue(n)(a):{value:0,raw:{x:""}};return await this.makeFloatingInputPromise({inputCount:1,promptOptions:e,handler:t,getDynamicValue:o,onFloatingInputCreated:a=>{i=a},onCommit:(a,s)=>n?!0:s?(n={x:s.x,y:s.y},i?.setBasePoint(n,{showBaseLineOnly:!e.useDashedLine}),this._mobileChrome.update({showMetrics:!0}),!1):!0})}async getDistance(e){let t=new PN(e),n=this.tryGetScriptedNumber(t,e);if(n!=null)return new ya(V.OK,n);let i=this.resolveDistanceBasePoint(e);return this.executePrompt(async()=>i?await this.makeFloatingInputPromise({inputCount:1,promptOptions:e,handler:t,getDynamicValue:this.createDistanceDynamicValue(i)}):await this.getDistanceTwoPoint(e,t),o=>new ya(V.OK,o),o=>new ya(o))}async getAngle(e){let t=new MN(e),n=this.tryGetScriptedNumber(t,e);if(n!=null)return new ya(V.OK,n);let i=e.useBasePoint&&e.basePoint?e.basePoint:this.lastPoint;if(!i)return this.executePrompt(()=>this.getNumberTyped(e,t),a=>new ya(V.OK,a),a=>new ya(a));let o=a=>{let s=a.x-i.x,l=a.y-i.y,c=Math.atan2(l,s),u=e.baseAngle*Math.PI/180,h=c-u;for(;h<=-Math.PI;)h+=Math.PI*2;for(;h>Math.PI;)h-=Math.PI*2;let d=h*180/Math.PI;return{value:d,raw:{x:this.formatNumber(d,"angle")}}};return this.executePrompt(()=>this.makeFloatingInputPromise({inputCount:1,promptOptions:e,handler:t,getDynamicValue:o}),a=>new ya(V.OK,a),a=>new ya(a))}async getDouble(e){let t=new EN(e),n=this.tryGetScriptedNumber(t,e);return n!=null?new ya(V.OK,n):this.executePrompt(()=>this.getNumberTyped(e,t),i=>new ya(V.OK,i),i=>new ya(i))}async getInteger(e){let t=this.tryGetScriptedNumber(new tk(e),e);return t!=null?new y1(V.OK,t):this.executePrompt(()=>this.getNumberTyped(e,new tk(e)),n=>new y1(V.OK,n),n=>new y1(n))}async getString(e){let t=this.tryGetScriptedValue(new Ab(e),e);return t!=null?new Ns(V.OK,t):this.executePrompt(async()=>{let n=()=>({value:"",raw:{x:""}}),i=new Ab(e);return await this.makeFloatingInputPromise({inputCount:1,promptOptions:e,handler:i,getDynamicValue:n,showMetrics:!1,showStringInput:!0,allowPickCommit:!1})},n=>new Ns(V.OK,n),n=>new Ns(n))}async getKeywords(e){return this.executePrompt(async()=>this.tryGetScriptedValue(new z1(e),e)??new Promise((n,i)=>{let o=!1,a=l=>{o||(o=!0,this.active=!1,this._activeRejector===s&&(this._activeRejector=null),this._commandLine.cancelActiveSession(),this.endMobilePrompt(),l())},s=l=>{a(()=>i(l??new Error("cancelled")))};this._activeRejector=s,this.active=!0,this.beginMobilePrompt({prompt:e.getDisplayMessage(),keywords:this.mobileKeywordChips(e),allowNone:e.allowNone,showMetrics:!1,onConfirm:()=>{e.allowNone&&s(new Td)},onCancel:()=>s(),onKeyword:l=>{a(()=>n(l))}}),this._commandLine.getKeywords(e,!0).then(l=>{if(!l){s(e.allowNone?new Td:new Error("cancelled"));return}a(()=>n(l))},l=>s(l instanceof Error?l:void 0))}),t=>new Ns(V.OK,t),t=>new Ns(t),{keyword:!1})}async getSelection(e){return this.executePrompt(()=>new Promise((t,n)=>{this.active=!0,this.entitySelectionActive=!0;let i=this.startKeywordSession(e,!0);i||this._commandLine.setPrompt(e.message);let o=new ST(this.view,{parent:this.view.canvas,message:e.message}),a=new Set,s=null,l=null,c=null,u=null,h=null,d=(M,T,L="add")=>{if(!s||!c||!l)return;let O=this.view.viewportToCanvas({x:M,y:T}),D=this.view.screenToWorld(O),z=this.view.worldToScreen(s),N=this.view.worldToScreen(D),J=Math.min(z.x,N.x),X=Math.min(z.y,N.y),Q=Math.abs(z.x-N.x),ce=Math.abs(z.y-N.y),H=this.view.getSelectionMode(l,O),de=this.view.getSelectionPreviewStyle(H,L);Object.assign(c.style,{left:`${J}px`,top:`${X}px`,width:`${Q}px`,height:`${ce}px`,borderStyle:de.borderStyle,background:de.background}),c.style.setProperty("--line-color",de.lineColor)},p=()=>{u&&d(u.clientX,u.clientY,this.view.getSelectionActionFromEvent(u,"add"))},f=!1,m=M=>{g(),n(M??new Error("cancelled"))},g=()=>{f||(f=!0,this.active=!1,this.entitySelectionActive=!1,this._activeRejector===m&&(this._activeRejector=null),o?.dispose(),c?.remove(),i?.cancel(),this._commandLine.clear(),this.endMobilePrompt(),h?.(),h=null,this.view.setNavigationEnabled(!0),document.removeEventListener("keydown",y),this.view.canvas.removeEventListener("mousedown",A),this.view.canvas.removeEventListener("mousemove",E),this.view.canvas.removeEventListener("mouseup",S),this.view.canvas.removeEventListener("contextmenu",b),this.view.events.viewChanged.removeEventListener(p),this.view.events.viewResize.removeEventListener(p))};this._activeRejector=m,this.beginMobilePrompt({prompt:e.getDisplayMessage(),keywords:this.mobileKeywordChips(e),allowNone:!0,showMetrics:!1,onConfirm:()=>{g(),t([...a])},onCancel:()=>m(),onKeyword:M=>{m(new Tl(M))}}),i?.promise.then(M=>{if(!f){if(!M){m();return}m(new Tl(M))}});let y=M=>{if(M.key==="Escape"){m();return}M.key==="Enter"&&(g(),t([...a]))},b=M=>{this.shouldUseRightClickEnter()&&M.preventDefault()},v=(M,T)=>this.view.viewportToCanvas({x:M,y:T}),x=(M,T,L,O)=>{if(O){let D=this.view.pick(T);D.length>0?this.view.applySelection([D[0].id],L):L==="replace"&&this.view.selectionSet.clear()}else if(s&&l){let D=new ct().expandByPoint(s).expandByPoint(T),z=this.view.getSelectionMode(l,M);this.view.selectByBoxWithMode(D,z,L)}a.clear();for(let D of this.view.selectionSet.ids)a.add(D);e.singleOnly&&L!=="remove"&&a.size>0&&(g(),t([...a]))},w=(M,T)=>{l=v(M,T),s=this.view.screenToWorld(l),c?.remove(),c=document.createElement("div"),c.className="ml-jig-preview-rect",this.view.container.appendChild(c)},_=()=>{c?.remove(),c=null,u=null,s=null,l=null},A=M=>{if(M.button===2){this.shouldUseRightClickEnter()&&(M.preventDefault(),g(),t([...a]));return}M.button===0&&(Il(M)||xa()||w(M.clientX,M.clientY))},E=M=>{M.buttons===1&&(!s||!c||!l||Il(M)||xa()||(u=M,d(M.clientX,M.clientY,this.view.getSelectionActionFromEvent(M,"add"))))},S=M=>{if(M.button!==0||!s||!l||Il(M)||xa())return;let T=v(M.clientX,M.clientY),L=this.view.screenToWorld(T),O=this.view.isSelectionClick(l,T),D=this.view.getSelectionActionFromEvent(M,"add");c?.remove(),c=null,u=null,x(T,L,D,O),s=null,l=null};h=BN({element:this.view.canvas,setNavigationEnabled:M=>{this.view.setNavigationEnabled(M)},onActivate:(M,T)=>{w(M,T),u=null,d(M,T,"add")},onMove:(M,T)=>{d(M,T,"add")},onBoxEnd:(M,T,L)=>{if(!s||!l){_();return}let O=v(M,T),D=this.view.screenToWorld(O);c?.remove(),c=null,u=null,x(O,D,"add",!L),s=null,l=null},onTap:(M,T)=>{let L=v(M,T),O=this.view.screenToWorld(L);x(L,O,"add",!0)},onAbort:()=>{_()}}),document.addEventListener("keydown",y),this.view.canvas.addEventListener("mousedown",A),this.view.canvas.addEventListener("mousemove",E),this.view.canvas.addEventListener("mouseup",S),this.view.canvas.addEventListener("contextmenu",b),this.view.events.viewChanged.addEventListener(p),this.view.events.viewResize.addEventListener(p)}),t=>new Nb(V.OK,new D1(t)),t=>new Nb(t),{none:!1})}async getEntity(e){let t;return this.executePrompt(()=>new Promise((n,i)=>{this.active=!0,this.entitySelectionActive=!0;let o=this.startKeywordSession(e,!0),a=new ST(this.view,{parent:this.view.canvas,message:e.message});o||this._commandLine.setPrompt(e.message);let s=!1,l=f=>{c(),i(f??new Error("cancelled"))},c=()=>{var f;s||(s=!0,this.active=!1,this.entitySelectionActive=!1,this._activeRejector===l&&(this._activeRejector=null),(f=e.jig)==null||f.end(),document.removeEventListener("keydown",d),this.view.canvas.removeEventListener("mousedown",u),this.view.canvas.removeEventListener("click",h),this.view.canvas.removeEventListener("contextmenu",p),a?.dispose(),o?.cancel(),this._commandLine.clear(),this.hideEntityPickCancel(),this.endMobilePrompt())};this._activeRejector=l,this.beginMobilePrompt({prompt:e.getDisplayMessage(),keywords:this.mobileKeywordChips(e),allowNone:e.allowNone,showMetrics:!1,onConfirm:()=>{e.allowNone&&(c(),n(null))},onCancel:()=>l(),onKeyword:f=>{l(new Tl(f))}}),this.showEntityPickCancel(()=>l()),o?.promise.then(f=>{if(!s){if(!f){l();return}l(new Tl(f))}});let u=f=>{if(f.button===2){this.shouldUseRightClickEnter()&&e.allowNone&&(f.preventDefault(),c(),n(null));return}},h=f=>{if(f.button!==0)return;let m=this.view.screenToWorld(this.view.viewportToCanvas({x:f.clientX,y:f.clientY})),g=this.view.pick(m,void 0,!0);if(g.length==0){this._commandLine.showMessage(e.rejectMessage,"warning");return}let y=this.getEntityById(g[0].id);if(!y){this._commandLine.showMessage(e.rejectMessage,"warning");return}if(!e.allowObjectOnLockedLayer&&this.isEntityOnLockedLayer(y)){this._commandLine.showMessage(e.rejectMessage,"warning");return}if(!this.isEntityClassAllowed(y,e)){this._commandLine.showMessage(e.rejectMessage,"warning");return}t={x:m.x,y:m.y,z:0},c(),n(g[0].id)},d=f=>{if(f.key==="Escape"){l();return}f.key==="Enter"&&e.allowNone&&(c(),n(null))},p=f=>{this.shouldUseRightClickEnter()&&f.preventDefault()};document.addEventListener("keydown",d),this.view.canvas.addEventListener("mousedown",u),this.view.canvas.addEventListener("click",h),this.view.canvas.addEventListener("contextmenu",p)}),n=>new F1(V.OK,n||void 0,t),n=>new F1(n),{none:!1})}async getBox(e){return this.executePrompt(()=>ba().acquireBox({acquireTwoPointBox:t=>this.getBoxViaTwoPoints(t),acquireHoldDragBox:t=>this.getBoxViaHoldDrag(t)},e),t=>t,t=>new ah(t))}async getBoxViaTwoPoints(e){let t=e.firstCornerMessage||P.t("main.inputManager.firstCorner"),n=new Ae(t);this.copyKeywords(e,n),n.useDashedLine=e.useDashedLine,n.useBasePoint=e.useBasePoint,n.disableOSnap=e.disableOSnap,n.allowNone=e.allowNone;let i=await this.getPoint(n);if(i.status!==V.OK)return new ah(i.status,void 0,i.stringResult);let o=i.value,a=this.view.worldToScreen(o),s=document.createElement("div");s.className="ml-jig-preview-rect",this.view.container.appendChild(s);let l=()=>{s.remove()},c=f=>{let m=this.view.worldToScreen(f),g=Math.min(m.x,a.x),y=Math.min(m.y,a.y),b=Math.abs(m.x-a.x),v=Math.abs(m.y-a.y);Object.assign(s.style,{left:`${g}px`,top:`${y}px`,width:`${b}px`,height:`${v}px`})},u=e.secondCornerMessage||P.t("main.inputManager.secondCorner"),h=new Ae(u);this.copyKeywords(e,h),h.useDashedLine=e.useDashedLine,h.useBasePoint=e.useBasePoint,h.disableOSnap=e.disableOSnap;let d=await this.getPointInternal(h,l,c),p=new ct().expandByPoint(o).expandByPoint(d);return new ah(V.OK,p)}getBoxViaHoldDrag(e){return new Promise((t,n)=>{this.active=!0;let i=e.firstCornerMessage||P.t("main.inputManager.firstCorner"),o=this.startKeywordSession(e,!0);o||this._commandLine.setPrompt(i);let a=new ST(this.view,{parent:this.view.canvas,message:i}),s=null,l=null,c=null,u=!1,h=null,d=!1,p=null,f=()=>{c?.remove(),c=null},m=()=>{f(),s=null,l=null,d=!1,p=null},g=(O,D)=>this.view.viewportToCanvas({x:O,y:D}),y=(O,D)=>{if(!s||!c||!l)return;let z=g(O,D),N=this.view.screenToWorld(z),J=this.view.worldToScreen(s),X=this.view.worldToScreen(N),Q=this.view.getSelectionMode(l,z),ce=this.view.getSelectionPreviewStyle(Q,"add");Object.assign(c.style,{left:`${Math.min(J.x,X.x)}px`,top:`${Math.min(J.y,X.y)}px`,width:`${Math.abs(J.x-X.x)}px`,height:`${Math.abs(J.y-X.y)}px`,borderStyle:ce.borderStyle,background:ce.background}),c.style.setProperty("--line-color",ce.lineColor)},b=(O,D)=>{let z=g(O,D);l=z,s=this.view.screenToWorld(z),d=!1,p={clientX:O,clientY:D},f(),c=document.createElement("div"),c.className="ml-jig-preview-rect",this.view.container.appendChild(c),y(O,D)},v=(O,D)=>{if(!s||!l)return!1;let z=g(O,D);if(this.view.isSelectionClick(l,z))return!1;let N=this.view.screenToWorld(z),J=new ct().expandByPoint(s).expandByPoint(N);return w(),t(new ah(V.OK,J)),!0},x=O=>{w(),n(O??new Error("cancelled"))},w=()=>{u||(u=!0,this.active=!1,this._activeRejector===x&&(this._activeRejector=null),h?.(),h=null,m(),a.dispose(),o?.cancel(),this._commandLine.clear(),this.endMobilePrompt(),this.view.setNavigationEnabled(!0),document.removeEventListener("keydown",_),this.view.canvas.removeEventListener("mousedown",S),this.view.canvas.removeEventListener("mousemove",M),this.view.canvas.removeEventListener("mouseup",T),this.view.canvas.removeEventListener("contextmenu",A),this.view.events.viewChanged.removeEventListener(L),this.view.events.viewResize.removeEventListener(L))};this._activeRejector=x,this.beginMobilePrompt({prompt:e.getDisplayMessage(),keywords:this.mobileKeywordChips(e),allowNone:e.allowNone,showMetrics:!1,onConfirm:()=>{e.allowNone&&(w(),t(new ah(V.None)))},onCancel:()=>x(),onKeyword:O=>{x(new Tl(O))}}),o?.promise.then(O=>{if(!u){if(!O){x();return}x(new Tl(O))}});let _=O=>{if(O.key==="Escape"){x();return}O.key==="Enter"&&e.allowNone&&(w(),t(new ah(V.None)))};document.addEventListener("keydown",_);let A=O=>{this.shouldUseRightClickEnter()&&O.preventDefault()},E=O=>Il(O)||xa(),S=O=>{if(O.button===2){this.shouldUseRightClickEnter()&&e.allowNone&&(O.preventDefault(),w(),t(new ah(V.None)));return}O.button===0&&(E(O)||d||(this.view.setNavigationEnabled(!1),b(O.clientX,O.clientY)))},M=O=>{!s||!c||!l||E(O)||O.buttons!==1&&!d||(p={clientX:O.clientX,clientY:O.clientY},y(O.clientX,O.clientY))},T=O=>{O.button===0&&(!s||!l||E(O)||v(O.clientX,O.clientY)||(d=!0))},L=()=>{p&&s&&c&&y(p.clientX,p.clientY)};h=BN({element:this.view.canvas,setNavigationEnabled:O=>{this.view.setNavigationEnabled(O)},onActivate:(O,D)=>{b(O,D),p=null,y(O,D)},onMove:(O,D)=>{y(O,D)},onBoxEnd:(O,D,z)=>{if(!(!s||!l)){if(!z){m();return}v(O,D)}},onAbort:()=>{m()}}),this.view.canvas.addEventListener("mousedown",S),this.view.canvas.addEventListener("mousemove",M),this.view.canvas.addEventListener("mouseup",T),this.view.canvas.addEventListener("contextmenu",A),this.view.events.viewChanged.addEventListener(L),this.view.events.viewResize.addEventListener(L)})}async getPointInternal(e,t,n){let i=this.tryGetScriptedPoint(e);if(i!=null)return t?.(),this.recordConfirmedPointMarkIfNeeded(e,i),i;this.showConfirmedPointMarksIfAny();let o=l=>({value:{x:l.x,y:l.y,z:0},raw:{x:this.formatNumber(l.x,"point"),y:this.formatNumber(l.y,"point")}}),a=new em(e),s=await this.makeFloatingInputPromise({inputCount:2,promptOptions:e,disableOSnap:e.disableOSnap,cleanup:t,handler:a,getDynamicValue:o,drawPreview:n});return this.recordConfirmedPointMarkIfNeeded(e,s),s}shouldShowConfirmedPointMark(e){let t=e.showConfirmedPointMark;return t!==void 0?t:ba().point.showsConfirmedPointMarks}recordConfirmedPointMarkIfNeeded(e,t){this.shouldShowConfirmedPointMark(e)&&this._confirmedPointPositions.push({x:t.x,y:t.y})}showConfirmedPointMarksIfAny(){this._confirmedPointPositions.length!==0&&(this._confirmedPointMarks??(this._confirmedPointMarks=new Fb(this.view)),this._confirmedPointMarks.setHintMarkers(this._confirmedPointPositions,"plus"))}repositionConfirmedPointMarks(){var e;(e=this._confirmedPointMarks)==null||e.repositionHints()}clearConfirmedPointMarks(){var e;(e=this._confirmedPointMarks)==null||e.clear(),this._confirmedPointMarks=null,this._confirmedPointPositions=[]}tryGetScriptedPoint(e){let t=this.dequeueScriptInput();if(t===void 0)return;let n=t.trim();if(!n&&e.allowNone)throw new Td;let i=new em(e).parseCommandLine(t,this.resolvePointInputContext(e));if(i!=null)return this.lastPoint={x:i.x,y:i.y},i;throw this.tryResolveScriptedKeyword(n,e),new Error(`Invalid point input '${t}'`)}tryResolveScriptedKeyword(e,t){if(!e||!(t!=null&&t.keywords))return;let n=t.keywords.findByName(e);if(n)throw new Tl(n.globalName)}tryGetScriptedValue(e,t){let n=this.dequeueScriptInput();if(n===void 0)return;let i=n.trim();if(!i&&t&&"allowNone"in t&&t.allowNone)throw new Td;if(e instanceof Ab){this.tryResolveScriptedKeyword(i,t);let a=e.parse(n);if(a!=null)return a;throw new Error(`Invalid scripted input '${n}'`)}let o=this.parseCommandLineInput(n,e,e instanceof em?2:1,t??new Dl(""));if(o!=null)return o;throw this.tryResolveScriptedKeyword(i,t),new Error(`Invalid scripted input '${n}'`)}tryGetScriptedNumber(e,t){return this.tryGetScriptedValue(e,t)}dequeueScriptInput(){if(this._scriptInputs.length)return this._scriptInputs.shift()}isPromptCancelled(e){return e instanceof Error&&e.message==="cancelled"}isPromptNone(e){return e instanceof Td}getShortcutMenuMode(){let e=Fr().workingDatabase,t=gt.instance().getVar(oe.SHORTCUTMENU,e),n=Math.trunc(Number(t));return Number.isNaN(n)?0:n&3}shouldUseRightClickEnter(){let e=this.getShortcutMenuMode();return e===0?!0:e===1?this.active:!1}updateModifierStateFromEvent(e){let t={ctrlKey:!!e.ctrlKey,shiftKey:!!e.shiftKey,altKey:!!e.altKey,metaKey:!!e.metaKey},n=this._modifierState,i=n.ctrlKey!==t.ctrlKey||n.shiftKey!==t.shiftKey||n.altKey!==t.altKey||n.metaKey!==t.metaKey;return i&&(this._modifierState=t),i}handleCtrlToggleKey(e){return e.key!=="Control"||e.repeat||e.type!=="keydown"?!1:(this._ctrlArcFlip=!this._ctrlArcFlip,!0)}resolvePromptDefaults(e){let t="basePoint"in e,n="useBasePoint"in e,i="useDashedLine"in e,o="baseAngle"in e,a=t&&e.basePoint?e.basePoint:void 0,s=n?e.useBasePoint:!1,l=i?!e.useDashedLine:!1,c=o?e.baseAngle:void 0;return{message:e.getDisplayMessage(),jig:e.jig,basePoint:a,useBasePoint:s,showBaseLineOnly:l,baseAngle:c}}async makeFloatingInputPromise(e){return new Promise((t,n)=>{var i;this.active=!0,this.entitySelectionActive=!1;let o=!1,a=T=>{let L=e.handler.parse(T.x,T.y);return{isValid:L!=null,value:L??void 0}},s=this.resolvePromptDefaults(e.promptOptions),l=this.startPromptInputSession(e.promptOptions,e.handler,e.inputCount??1,!0),c;s.useBasePoint&&s.basePoint&&(c=s.basePoint);let u=s.useBasePoint&&s.basePoint?s.basePoint:this.lastPoint??void 0,h="allowNone"in e.promptOptions?e.promptOptions.allowNone:!1,d=this.resolvePromptDefaultValue(e.promptOptions),p=e.showStringInput===!0&&ba().point.usesSessionChrome,f=p?!1:e.showMetrics??(e.inputCount===2||c!=null),m=e.allowPickCommit!==!1,g=T=>(p||this.pushMobileMetrics(T,c??y.sessionBasePoint),e.getDynamicValue(T)),y=new aDe(this.view,{parent:this.view.canvas,inputCount:e.inputCount,message:s.message,disableOSnap:e.disableOSnap,showBaseLineOnly:s.showBaseLineOnly,basePoint:c,orthoReferencePoint:u,baseAngle:s.baseAngle,allowPrompt:e.allowPrompt!==!1,allowNone:h,useDefaultValue:d.useDefaultValue,defaultValue:d.defaultValue,allowPickCommit:m,validate:a,getDynamicValue:g,drawPreview:T=>{var L;if(s.jig){let O=e.getDynamicValue(T);s.jig.update(O.value),s.jig.render()}(L=e.drawPreview)==null||L.call(e,T)},onCommit:(T,L)=>{let O=!1;return(!e.onCommit||e.onCommit(T,L))&&(v(T),O=!0),O&&y.lastPoint&&(this.lastPoint={x:y.lastPoint.x,y:y.lastPoint.y}),O},onCancel:()=>x(),onNone:()=>w()});(i=e.onFloatingInputCreated)==null||i.call(e,y);let b=()=>{var T,L;o||(o=!0,this.active=!1,this.entitySelectionActive=!1,this._activeRejector===x&&(this._activeRejector=null),(T=e.cleanup)==null||T.call(e),(L=s.jig)==null||L.end(),document.removeEventListener("keydown",E),document.removeEventListener("keydown",S),document.removeEventListener("keyup",S),this.view.canvas.removeEventListener("contextmenu",M),y.dispose(),l.cancel(),this._commandLine.clear(),this.endMobilePrompt())},v=T=>{b(),t(T)},x=T=>{b(),n(T??new Error("cancelled"))};this._activeRejector=x;let w=()=>{x(new Td)},_=T=>{x(new Tl(T))},A=()=>{let T=this._mobileChrome.getStringValue();if(!T.trim()&&d.useDefaultValue){v(d.defaultValue);return}let L=e.handler.parse(T);if(L!=null){v(L);return}this._mobileChrome.focusStringInput()};this.beginMobilePrompt({prompt:e.promptOptions.getDisplayMessage(),keywords:this.mobileKeywordChips(e.promptOptions),allowNone:h,showMetrics:f,showStringInput:p,stringValue:p&&d.useDefaultValue?String(d.defaultValue??""):void 0,touchPointTutorial:!p,onConfirm:()=>{p?A():w()},onCancel:()=>x(),onKeyword:_});let E=T=>{T.key==="Escape"&&x()},S=T=>{let L=this.handleCtrlToggleKey(T),O=this.updateModifierStateFromEvent(T);(L||O)&&y.requestPreviewRefresh()},M=T=>{if(Ste(T)||ba().point.swallowsPromptContextMenu){T.preventDefault();return}this.shouldUseRightClickEnter()&&(T.preventDefault(),w())};document.addEventListener("keydown",E),document.addEventListener("keydown",S),document.addEventListener("keyup",S),this.view.canvas.addEventListener("contextmenu",M),this.view.hasCursorPos&&!xa()?y.showAt(this.view.canvasToViewport(this.view.curMousePos)):y.showAt({x:0,y:0}),l.promise.then(T=>{if(!o)switch(T.kind){case"value":if(e.handler instanceof em){let L=T.value;L&&Number.isFinite(L.x)&&Number.isFinite(L.y)&&(this.lastPoint={x:L.x,y:L.y})}v(T.value);break;case"keyword":_(T.keyword);break;case"none":h?w():x();break}})})}};Ete.stylesInjected=!1;var wDe=Ete,j1=128,Cte=3,KJ=8;function _De(r,e){return{x:KJ,y:KJ,size:j1}}function SDe(r,e,t=j1,n=Cte){return{x:t/2+r*n,y:t/2+e*n}}var Tte=class MT{constructor(e){this.view=e,MT.injectCss(),this.root=document.createElement("div"),this.root.className="ml-snap-loupe",this.root.setAttribute("aria-hidden","true"),getComputedStyle(e.container).position==="static"&&(e.container.style.position="relative"),e.container.appendChild(this.root),this.marker=new qT("rect",12,"var(--ml-ui-canvas-line, green)",this.root),this.hide()}show(e,t,n,i){let o=_De(this.view.container,{usesSessionChrome:ba().point.usesSessionChrome}),{x:a,y:s,size:l}=o,c=MDe(this.view,e,t);this.view.setSnapLoupe({x:a,y:s,size:l,viewBox:c});let u=this.view.canvasToContainer({x:a,y:s});this.root.style.left=`${u.x}px`,this.root.style.top=`${u.y}px`,this.root.style.display="block",n&&i?(this.marker.type=i,this.marker.setPosition(SDe(n.x-e,n.y-t))):this.marker.setPosition({x:-1e3,y:-1e3})}hide(){this.root.style.display="none",this.view.setSnapLoupe(null),this.marker.setPosition({x:-1e3,y:-1e3})}dispose(){this.hide(),this.marker.destroy(),this.root.remove()}static injectCss(){if(MT.stylesInjected)return;MT.stylesInjected=!0;let e=document.createElement("style");e.id="ml-snap-loupe-style",e.textContent=`
  5963. .ml-snap-loupe {
  5964. position: absolute;
  5965. width: ${j1}px;
  5966. height: ${j1}px;
  5967. box-sizing: border-box;
  5968. border: 2px solid var(--ml-ui-canvas-line, #0f0);
  5969. border-radius: 2px;
  5970. pointer-events: none;
  5971. z-index: 20;
  5972. overflow: hidden;
  5973. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  5974. }
  5975. `,document.head.appendChild(e)}};Tte.stylesInjected=!1;var ADe=Tte;function MDe(r,e,t){let n=j1/Cte/2,i=r.screenToWorld({x:e-n,y:t-n}),o=r.screenToWorld({x:e+n,y:t+n}),a=new ct;return a.expandByPoint(new Z(i.x,i.y)),a.expandByPoint(new Z(o.x,o.y)),a}var V1=new WeakMap;function PDe(r,e,t,n){if(!ba().point.showsSnapLoupeOnTouchPick)return;let i=V1.get(r);i||(i=new ADe(r),V1.set(r,i));let o=r.viewportToCanvas({x:e,y:t});if(n){let a=r.worldToScreen(n),s=typeof n.type=="string"?n.type:Nc.osnapModeToMarkerType(n.type);i.show(o.x,o.y,{x:a.x,y:a.y},s)}else i.show(o.x,o.y)}function EDe(r){var e;(e=V1.get(r))==null||e.hide()}function CDe(r){let e=V1.get(r);e&&(e.dispose(),V1.delete(r))}var GN=class{constructor(e){this.events={sysVarChanged:new wt,commandWillStart:new wt,commandEnded:new wt,beforeMountSessionAccessory:new wt,afterMountSessionAccessory:new wt,beforeUnmountSessionAccessory:new wt,afterUnmountSessionAccessory:new wt},this._view=e,this._cursorManager=new fN(e),this._inputManager=new wDe(e,this.events)}get inputManager(){return this._inputManager}get isActive(){return this._inputManager.isActive}get isEntitySelectionActive(){return this._inputManager.isEntitySelectionActive}getInputModifiers(){return this._inputManager.modifiers}getInputToggles(){return this._inputManager.toggles}resetInputToggles(){this._inputManager.resetToggles()}cancelActiveInput(){this._inputManager.cancelActiveInput()}dispose(){this.cancelActiveInput(),this._inputManager.dispose()}enqueueScriptInputs(e){this._inputManager.enqueueScriptInputs(e)}clearScriptInputs(){this._inputManager.clearScriptInputs()}hasScriptInputs(){return this._inputManager.hasScriptInputs()}drainScriptInputs(){return this._inputManager.drainScriptInputs()}showMessage(e,t="info",n){this._inputManager.showMessage(e,t,n)}peekScriptInput(){return this._inputManager.peekScriptInput()}consumeScriptInput(){return this._inputManager.consumeScriptInput()}get currentCursor(){return this._currentCursor}restoreCursor(){this._previousCursor!=null&&this.setCursor(this._previousCursor)}setCursor(e){this._cursorManager.setCursor(e),this._previousCursor=this._currentCursor,this._currentCursor=e}async withCursor(e,t){let n=this._currentCursor;this.setCursor(e);try{return await Promise.resolve(t())}finally{n!==void 0?this.setCursor(n):this.restoreCursor()}}setCursorColor(e){this._cursorManager.setCursorColor(e)}syncCursorBackground(e){this._cursorManager.syncBackgroundColor(e)}async getPoint(e){return await this._inputManager.getPoint(e)}async getAngle(e){return await this._inputManager.getAngle(e)}async getDistance(e){return await this._inputManager.getDistance(e)}async getDouble(e){return await this._inputManager.getDouble(e)}async getInteger(e){return await this._inputManager.getInteger(e)}async getString(e){return await this._inputManager.getString(e)}async getKeywords(e){return await this._inputManager.getKeywords(e)}async getEntity(e){return await this._inputManager.getEntity(e)}async getSelection(e){return await this._inputManager.getSelection(e)}async getBox(e){return await this._inputManager.getBox(e)}selectAll(e){try{let t=Y.instance.curDocument.database.tables.blockTable.modelSpace,n=[];for(let i of t.newIterator())(!e||e.matches(i))&&n.push(i.objectId);return new Nb(V.OK,new D1(n))}catch{return new Nb(V.Error)}}},ak=class{constructor(e,t,n=1){if(this._handleIds=[],this.copyCount=Math.max(0,n),this.copyCount===0||t.length===0){this.useBatchPreview=!1;return}for(let i=0;i<this.copyCount;i++){let o=e.createEntityPreview(t);if(!o){this._handleIds.forEach(a=>e.removeEntityPreview(a)),this._handleIds.length=0,this.useBatchPreview=!1;return}this._handleIds.push(o),e.updateEntityPreview(o,new Ie)}this.useBatchPreview=this._handleIds.length===this.copyCount}updateMatrix(e,t){!this.useBatchPreview||this._handleIds.length!==1||e.updateEntityPreview(this._handleIds[0],t)}updatePlacements(e,t,n){this.useBatchPreview&&this._handleIds.forEach((i,o)=>{let a=o+1,s=nU(t,a,this.copyCount,n);e.updateEntityPreview(i,new Ie().makeTranslation(s.x,s.y,s.z))})}dispose(e){this._handleIds.forEach(t=>e.removeEntityPreview(t)),this._handleIds.length=0}};function nU(r,e,t,n){let i=n&&t>0?e/t:e;return new k(r.x*i,r.y*i,r.z*i)}var HN=class extends It{constructor(e,t){super(e),this._transientsPublished=!1,this._view=e,this.batchPreview=new ak(e,t.map(n=>n.objectId)),this.previewEntities=this.batchPreview.useBatchPreview?[]:t.map(n=>n.clone()).filter(n=>!!n)}update(e){}render(){this.batchPreview.useBatchPreview||this.previewEntities.length!==0&&(this._transientsPublished||(this._view.addTransientEntity(this.previewEntities),this._transientsPublished=!0))}end(){this.batchPreview.dispose(this._view),this.previewEntities.forEach(e=>this._view.removeTransientEntity(e.objectId))}},G1=class r extends It{constructor(e,t,n=1){super(e),this._transientsPublished=!1,this._lastTransforms=[],this._view=e,this.copyCount=n,this.batchPreview=new ak(e,t.map(i=>i.objectId),n),this.previewEntries=this.batchPreview.useBatchPreview?[]:r.createPreviewEntries(t,n)}get previewEntities(){return this.previewEntries.map(e=>e.entity)}update(e){let t=this.buildTransforms(e);if(this.batchPreview.useBatchPreview){this.copyCount===1&&t.length>0&&this.batchPreview.updateMatrix(this._view,t[0].matrix);return}this._lastTransforms=t}render(){this.batchPreview.useBatchPreview||this.previewEntries.length!==0&&(this._transientsPublished||(this._view.addTransientEntity(this.previewEntities),this._transientsPublished=!0),this._lastTransforms.length>0&&this._view.updateTransientPreviewTransforms(this._lastTransforms))}end(){this.batchPreview.dispose(this._view),this.previewEntities.forEach(e=>this._view.removeTransientEntity(e.objectId))}static createPreviewEntries(e,t){let n=[];for(let i=1;i<=t;i++)e.map(o=>o.clone()).filter(o=>!!o).forEach(o=>{n.push({entity:o,copyFactor:i})});return n}},Bl=class{constructor(e){this.state=e}setState(e){this.state=e}async run(e){for(;this.state;)try{let t=this.state.buildPrompt(),n=await e(t);if(await this.state.handleResult(n)==="finish")break}catch{break}}};var WN=class{constructor(e,t,n,i=500,o=500){this.host=e,this.hoverEvent=t,this.unhoverEvent=n,this.hoverDelay=i,this.pauseDelay=o,this.hoverTimer=null,this.pauseTimer=null,this.hoveredId=null}handleMouseMove(e,t){if(this.clearHoverTimer(),this.hoveredId){this.hoverAt(e,t);return}this.hoverTimer=setTimeout(()=>{this.hoverAt(e,t)},this.hoverDelay)}clear(){this.setHoveredId(null),this.clearHoverTimer(),this.clearPauseTimer()}dispose(){this.clearHoverTimer(),this.clearPauseTimer()}hoverAt(e,t){let n=this.host.pick({x:e,y:t});n.length>0?this.setHoveredId(n[0].id):this.clear()}setHoveredId(e){this.hoveredId!==e&&(this.hoveredId&&(this.unhoverEvent.dispatch({id:this.hoveredId,x:this.host.curMousePos.x,y:this.host.curMousePos.y}),this.host.onUnhover(this.hoveredId)),this.hoveredId=e,e&&(this.startPauseTimer(e),this.host.onHover(e)))}startPauseTimer(e){this.clearPauseTimer(),this.pauseTimer=setTimeout(()=>{this.hoverEvent.dispatch({id:e,x:this.host.curMousePos.x,y:this.host.curMousePos.y})},this.pauseDelay)}clearHoverTimer(){this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)}clearPauseTimer(){this.pauseTimer&&(clearTimeout(this.pauseTimer),this.pauseTimer=null)}};function kte(r,e="replace"){return r.shiftKey?"remove":r.ctrlKey||r.metaKey?"add":e}function TDe(r){return kte(r,"add")}var XN=class{constructor(e,t){this._hasCursorPos=!1,this._entitySelectionEnabled=!0,this._overlayGripOsnapMarkers=null,this._lastOverlayGripOsnap=null,this._domAbortController=new AbortController,this._baseDisposed=!1,this.sessionProviders=new iN,this.events={mouseMove:new wt,viewResize:new wt,viewChanged:new wt,hover:new wt,unhover:new wt,renderFrame:new wt},this._container=t,this._canvas=e;let n=e.getBoundingClientRect();this._bbox=new De,this._width=n.width,this._height=n.height,this._curPos=new Z,this._curMousePos=new Z,this._hasCursorPos=!1,this._selectionSet=new D1,this._editor=new GN(this),this._osnapResolver=new Nc(this);let i=this._domAbortController.signal;this._canvas.addEventListener("mousemove",l=>this.onMouseMove(l),{signal:i}),this._canvas.addEventListener("pointerdown",l=>{l.pointerType==="touch"&&this.onMouseMove(l)},{signal:i}),this._canvas.addEventListener("pointermove",l=>{l.pointerType==="touch"&&this.onMouseMove(l)},{signal:i}),this._canvas.addEventListener("mousedown",l=>{l.button===1&&this._editor.setCursor(eS.Grab)},{signal:i}),this._canvas.addEventListener("mouseup",l=>{l.button===1&&this._editor.restoreCursor()},{signal:i});let o=rF(()=>this.onWindowResize(),0,{leading:!1,trailing:!0}),a=new ResizeObserver(o);a.observe(this._container);let s=this._container.parentElement;s&&a.observe(s),this._resizeObserver=a,this._selectionBoxSize=4,this._hoverController=new WN(this,this.events.hover,this.events.unhover)}dispose(){var e,t;this._baseDisposed||(this._baseDisposed=!0,this._domAbortController.abort(),(e=this._resizeObserver)==null||e.disconnect(),this._resizeObserver=void 0,this._hoverController.dispose(),CDe(this),(t=this._overlayGripOsnapMarkers)==null||t.clear(),this._overlayGripOsnapMarkers=null,this._editor.dispose())}get editor(){return this._editor}get sessionAccessoryHost(){return this._editor.inputManager.sessionAccessoryHost}get selectionSessionAccessory(){return this._editor.inputManager.selectionSessionAccessory}set selectionSessionAccessory(e){this._editor.inputManager.selectionSessionAccessory=e}get selectionBoxSize(){return this._selectionBoxSize}set selectionBoxSize(e){this._selectionBoxSize=e}hasEntity(e){return!1}updateEntityVisibility(e){return!1}setEntitySceneVisible(e,t){return!1}getEntityVisible(e){}async withMode(e,t){let n=this.mode;this.mode=e;try{return await Promise.resolve(t())}finally{this.mode=n}}setCursor(e){this._editor.setCursor(e)}getSelectionMode(e,t){return t.x>=e.x?"window":"crossing"}getSelectionActionFromEvent(e,t="replace"){return kte(e,t)}isSelectionClick(e,t,n=2){let i=t.x-e.x,o=t.y-e.y;return Math.hypot(i,o)<n}getSelectionPreviewStyle(e,t){return{borderStyle:e==="window"?"solid":"dashed",lineColor:t==="remove"?"var(--ml-ui-danger, #ff4d4f)":e==="window"?"var(--ml-ui-canvas-line, #00ff5a)":"var(--ml-ui-accent-alt, #00d1ff)",background:"var(--ml-ui-canvas-fill-mix, var(--ml-ui-canvas-fill, rgba(64, 158, 255, 0.12)))"}}applySelection(e,t){if(this.entitySelectionEnabled){if(t==="replace"){this.selectionSet.clear();let n=e.filter(i=>!this.selectionSet.has(i));n.length>0&&this.selectionSet.add(n);return}if(e.length!==0)if(t==="add"){let n=e.filter(i=>!this.selectionSet.has(i));n.length>0&&this.selectionSet.add(n)}else{let n=e.filter(i=>this.selectionSet.has(i));n.length>0&&this.selectionSet.delete(n)}}}selectByBoxWithMode(e,t,n="add"){let i=this.collectSelectionIdsByBox(e,t);this.applySelection(i,n)}collectSelectionIdsByBox(e,t){let n=this.search(e,{selectionMode:t}).filter(WT);return t==="crossing"?this.refineCrossingSelectionHits(e,n):n.map(i=>i.id)}refineCrossingSelectionHits(e,t){return t.map(n=>n.id)}setCalculateSizeCallback(e){this._calculateSizeCallback=e}get width(){return this._width}set width(e){this._width=e}get height(){return this._height}set height(e){this._height=e}get bbox(){return this._bbox}get canvas(){return this._canvas}get container(){return this._container}viewportToCanvas(e){let t=this._canvas.getBoundingClientRect();return new Z(e.x-t.left,e.y-t.top)}canvasToViewport(e){let t=this._canvas.getBoundingClientRect();return new Z(e.x+t.left,e.y+t.top)}canvasToContainer(e){let t=this._canvas.getBoundingClientRect(),n=this._container.getBoundingClientRect();return new Z(e.x+(t.left-n.left),e.y+(t.top-n.top))}viewportToContainer(e){let t=this._container.getBoundingClientRect();return new Z(e.x-t.left,e.y-t.top)}get aspect(){return this._width/this._height}get curPos(){return this._curPos}get curMousePos(){return this._curMousePos}get hasCursorPos(){return this._hasCursorPos}clearCursorPos(){this._hasCursorPos=!1}get selectionSet(){return this._selectionSet}get entitySelectionEnabled(){return this._entitySelectionEnabled}set entitySelectionEnabled(e){this._entitySelectionEnabled!==e&&(this._entitySelectionEnabled=e,e||(this.clearHover(),this.selectionSet.clear()))}get osnapResolver(){return this._osnapResolver}setNavigationEnabled(e){}setSnapLoupe(e){}resolveOverlayGripPoint(e,t){let n={x:e.x,y:e.y,z:0};this._overlayGripOsnapMarkers??(this._overlayGripOsnapMarkers=new Fb(this));let i=this._osnapResolver.resolve({cursorWcs:n,lastPoint:t?{x:t.x,y:t.y,z:0}:n});return this._lastOverlayGripOsnap=i??null,this._overlayGripOsnapMarkers.setHintMarkers(Nc.displayCenterMarks(this._osnapResolver.acquiredCenterMarks,i)),i?(this._overlayGripOsnapMarkers.showOrRepositionMarker(i,Nc.osnapModeToMarkerType(i.type)),{x:i.x,y:i.y}):(this._overlayGripOsnapMarkers.hideMarker(),{x:e.x,y:e.y})}get lastOverlayGripOsnap(){return this._lastOverlayGripOsnap}refreshMobileSnapLoupe(e,t,n){PDe(this,e,t,n)}hideMobileSnapLoupe(){EDe(this)}clearOverlayGripOsnap(){var e;this._lastOverlayGripOsnap=null,(e=this._overlayGripOsnapMarkers)==null||e.clear(),this._osnapResolver.clearAcquiredCenters()}refreshViewSize(){if(this._calculateSizeCallback){let{width:e,height:t}=this._calculateSizeCallback();this._width=Math.max(1,Math.floor(e)),this._height=Math.max(1,Math.floor(t))}else this._width=Math.max(1,Math.floor(this._canvas.clientWidth)),this._height=Math.max(1,Math.floor(this._canvas.clientHeight))}onWindowResize(){this.refreshViewSize(),this.events.viewResize.dispatch({width:this._width,height:this._height})}clearHover(){this._hoverController.clear()}onMouseMove(e){this._hasCursorPos=!0,this._curMousePos=this.viewportToCanvas({x:e.clientX,y:e.clientY});let t=this.screenToWorld(this._curMousePos);this._curPos.copy(t),this.events.mouseMove.dispatch({x:t.x,y:t.y}),this.entitySelectionEnabled&&this.mode==js.SELECTION&&(this._editor.isActive||this._hoverController.handleMouseMove(t.x,t.y))}};function kDe(r,e,t){if(t.containsPoint(r)||t.containsPoint(e))return!0;let n=r.x,i=r.y,o=e.x,a=e.y,s=t.min.x,l=t.min.y,c=t.max.x,u=t.max.y;return Math.max(n,o)<s||Math.min(n,o)>c||Math.max(i,a)<l||Math.min(i,a)>u?!1:cT(n,i,o,a,s,l,c,l)||cT(n,i,o,a,c,l,c,u)||cT(n,i,o,a,c,u,s,u)||cT(n,i,o,a,s,u,s,l)}function IDe(r,e){if(r.kind==="line"){let t=r;return kDe(t.line.startPoint,t.line.endPoint,e)}return!0}function LDe(r,e){let t=r.subGetIntersectCurves();if(t.length===0)return!0;for(let n of t)if(IDe(n,e))return!0;return!1}function ODe(r){return r.children===void 0}function cT(r,e,t,n,i,o,a,s){let l=t-r,c=n-e,u=i-r,h=o-e,d=a-r,p=s-e,f=a-i,m=s-o,g=r-i,y=e-o,b=t-i,v=n-o,x=l*h-c*u,w=l*p-c*d,_=f*y-m*g,A=f*v-m*b;return x*w<=0&&_*A<=0}var Ite=class El extends xt{static rememberOriginalView(e,t){!t||e.width<=0||e.height<=0||El.originalViewBoxByLayout.has(t)||El.originalViewBoxByLayout.set(t,El.captureViewBoxFromView(e))}static clearOriginalViews(){El.originalViewBoxByLayout.clear()}static captureViewBoxFromView(e){let t=e.screenToWorld({x:0,y:0}),n=e.screenToWorld({x:e.width,y:e.height});return new ct().expandByPoint(t).expandByPoint(n)}captureCurrentViewBox(e){return El.captureViewBoxFromView(e.view)}rememberViewBeforeZoom(e){El.previousViewBox=this.captureCurrentViewBox(e)}zoomToExtents(e){this.rememberViewBeforeZoom(e),e.view.zoomToFitDrawing()}async zoomToSmart(e){this.rememberViewBeforeZoom(e),await this.withBusyIndicator(()=>e.view.zoomToSmartExtents(),P.t("main.message.calculatingSmartExtents"))}zoomToWindow(e,t,n){let i=new ct().expandByPoint(t).expandByPoint(n);this.rememberViewBeforeZoom(e),e.view.zoomTo(i,1)}async promptAndZoomWindowFromFirstCorner(e,t){let n=new Ae(P.t("jig.zoom.secondCorner"));n.useBasePoint=!0,n.basePoint=new k(t),n.useDashedLine=!0;let i=await Y.instance.editor.getPoint(n);i.status!==V.OK||!i.value||this.zoomToWindow(e,t,i.value)}async promptAndZoomWindowByBox(e){let t=new R1(P.t("jig.zoom.firstCorner"),P.t("jig.zoom.secondCorner")),n=await Y.instance.editor.getBox(t);n.status!==V.OK||!n.value||(this.rememberViewBeforeZoom(e),e.view.zoomTo(n.value,1))}async runCenter(e){let t=new Ae(P.t("jig.zoom.centerPoint")),n=await Y.instance.editor.getPoint(t);if(n.status!==V.OK||!n.value)return;let i=new fi(P.t("jig.zoom.heightOrScale")),o=await Y.instance.editor.getString(i);if(o.status!==V.OK||!o.stringResult)return;let a=this.parseScaleFactor(o.stringResult);if(a!=null){this.applyRelativeScale(e,a,n.value);return}let s=Number(o.stringResult);if(!Number.isFinite(s)||s<=0)return;let l=e.view.width/Math.max(e.view.height,1),c=s/2,u=s*l/2,h=new ct().expandByPoint({x:n.value.x-u,y:n.value.y-c}).expandByPoint({x:n.value.x+u,y:n.value.y+c});this.rememberViewBeforeZoom(e),e.view.zoomTo(h,1)}parseScaleFactor(e){let t=e.trim().toLowerCase();if(!t)return;if(t.endsWith("xp")){let i=Number(t.slice(0,-2));return Number.isFinite(i)&&i>0?i:void 0}if(t.endsWith("x")){let i=Number(t.slice(0,-1));return Number.isFinite(i)&&i>0?i:void 0}let n=Number(t);return Number.isFinite(n)&&n>0?n:void 0}applyRelativeScale(e,t,n){let i=this.captureCurrentViewBox(e),o=Math.max(i.max.x-i.min.x,Pt),a=Math.max(i.max.y-i.min.y,Pt),s=o/(2*t),l=a/(2*t),c=n??{x:(i.min.x+i.max.x)/2,y:(i.min.y+i.max.y)/2},u=new ct().expandByPoint({x:c.x-s,y:c.y-l}).expandByPoint({x:c.x+s,y:c.y+l});this.rememberViewBeforeZoom(e),e.view.zoomTo(u,1)}runPrevious(e){if(!El.previousViewBox)return;let t=this.captureCurrentViewBox(e);e.view.zoomTo(El.previousViewBox,1),El.previousViewBox=t}runSaved(e){this.rememberViewBeforeZoom(e);let t=this.resolveSavedViewBox(e);if(t){e.view.zoomTo(t,1);return}this.runOriginal(e,!1)}resolveSavedViewBox(e){let t=e.doc.database,n=t.tables.blockTable.modelSpace.objectId;if(t.currentSpaceId===n){let a=e.view.width/Math.max(e.view.height,1);return t.tables.viewportTable.getActiveVportBox(a)??void 0}let i=Fr().layoutManager.getActiveLayout(t),o=i?.limits;if(o&&!o.isEmpty())return o}runOriginal(e,t=!0){let n=e.doc.database.currentSpaceId,i=n?El.originalViewBoxByLayout.get(n):void 0;if(t&&this.rememberViewBeforeZoom(e),i){e.view.zoomTo(i,1);return}e.view.zoomToFitDrawing()}async execute(e){let t=new Ae(P.t("jig.zoom.mainPrompt"));t.allowNone=!0,t.keywords.add(P.t("jig.zoom.keywords.all.display"),P.t("jig.zoom.keywords.all.global"),P.t("jig.zoom.keywords.all.local")),t.keywords.add(P.t("jig.zoom.keywords.center.display"),P.t("jig.zoom.keywords.center.global"),P.t("jig.zoom.keywords.center.local")),t.keywords.add(P.t("jig.zoom.keywords.extents.display"),P.t("jig.zoom.keywords.extents.global"),P.t("jig.zoom.keywords.extents.local")),t.keywords.add(P.t("jig.zoom.keywords.previous.display"),P.t("jig.zoom.keywords.previous.global"),P.t("jig.zoom.keywords.previous.local")),t.keywords.add(P.t("jig.zoom.keywords.original.display"),P.t("jig.zoom.keywords.original.global"),P.t("jig.zoom.keywords.original.local")),t.keywords.add(P.t("jig.zoom.keywords.saved.display"),P.t("jig.zoom.keywords.saved.global"),P.t("jig.zoom.keywords.saved.local")),t.keywords.add(P.t("jig.zoom.keywords.smart.display"),P.t("jig.zoom.keywords.smart.global"),P.t("jig.zoom.keywords.smart.local")),t.keywords.add(P.t("jig.zoom.keywords.scale.display"),P.t("jig.zoom.keywords.scale.global"),P.t("jig.zoom.keywords.scale.local")),t.keywords.add(P.t("jig.zoom.keywords.window.display"),P.t("jig.zoom.keywords.window.global"),P.t("jig.zoom.keywords.window.local"));let n=await Y.instance.editor.getPoint(t);if(n.status===V.None){this.zoomToExtents(e);return}if(n.status===V.OK&&n.value){await this.promptAndZoomWindowFromFirstCorner(e,n.value);return}if(n.status!==V.Keyword)return;let i=n.stringResult??"";if(i==="All"||i==="Extents"){this.zoomToExtents(e);return}if(i==="Window"){await this.promptAndZoomWindowByBox(e);return}if(i==="Center"){await this.runCenter(e);return}if(i==="Scale"){let o=new fi(P.t("jig.zoom.scaleFactor")),a=await Y.instance.editor.getString(o);if(a.status!==V.OK||!a.stringResult)return;let s=this.parseScaleFactor(a.stringResult);if(s==null)return;this.applyRelativeScale(e,s);return}if(i==="Previous"){this.runPrevious(e);return}if(i==="Original"){this.runOriginal(e);return}if(i==="Saved"){this.runSaved(e);return}if(i==="Smart"){await this.zoomToSmart(e);return}}};Ite.originalViewBoxByLayout=new Map;var b1=Ite,uT="ml-html-text-editing",qJ="ml-markup-inline-text-edit-styles",DDe=400,ZJ=6,v1=new WeakSet,PT=0;function RDe(){return PT>0}function BDe(){if(typeof document>"u"||document.getElementById(qJ))return;let r=document.createElement("style");r.id=qJ,r.textContent=`
  5976. .ml-html-text-editing,
  5977. .ml-html-text-editing:focus,
  5978. .ml-html-selected.ml-html-text-editing {
  5979. outline: none !important;
  5980. outline-offset: 0;
  5981. box-shadow: var(--ml-ui-shadow, 0 1px 4px rgba(0, 0, 0, 0.2));
  5982. cursor: text !important;
  5983. user-select: text;
  5984. pointer-events: auto;
  5985. min-height: 1.2em;
  5986. }
  5987. `,document.head.appendChild(r)}function FDe(r){let e=window.getSelection();if(!e)return;let t=document.createRange();t.selectNodeContents(r),e.removeAllRanges(),e.addRange(t)}function NDe(r){r.setAttribute("contenteditable","plaintext-only"),r.contentEditable!=="plaintext-only"&&(r.contentEditable="true")}function zDe(r,e){if(!r)return!1;let t=e.t-r.t;if(t<0||t>DDe)return!1;let n=e.x-r.x,i=e.y-r.y;return n*n+i*i<=ZJ*ZJ}function Lte(r){var e;BDe();let{el:t,multiline:n=!1}=r,i=r.listenOn??t;if(v1.has(t)||(e=r.signal)!=null&&e.aborted)return Promise.resolve(void 0);let o=r.initialText!==void 0?r.initialText:(t.textContent??"").trim();return new Promise(a=>{var s;v1.add(t),PT+=1,i.style.pointerEvents="auto",t.style.pointerEvents="auto",t.textContent=o,t.classList.add(uT),i.classList.add(uT),t.tabIndex=0,NDe(t);let l=!1,c=performance.now()+300,u=()=>{var g;(g=r.signal)==null||g.removeEventListener("abort",m),t.classList.remove(uT),i.classList.remove(uT),t.removeAttribute("contenteditable"),t.removeAttribute("tabindex"),i.removeEventListener("pointerdown",d,!0),t.removeEventListener("keydown",p),t.removeEventListener("blur",f),v1.delete(t),PT=Math.max(0,PT-1)},h=g=>{if(l)return;l=!0;let y=(t.textContent??"").trim();if(!g){t.textContent=o,u(),a(void 0);return}t.textContent=y,u(),a(y)},d=g=>{g.stopPropagation()},p=g=>{if(!(g.isComposing||g.keyCode===229)){if(g.stopPropagation(),g.key==="Escape"){g.preventDefault(),h(!1);return}g.key==="Enter"&&(!n||!g.shiftKey)&&(g.preventDefault(),h(!0))}},f=()=>{if(performance.now()<c){t.focus();return}h(!0)},m=()=>h(!1);i.addEventListener("pointerdown",d,!0),t.addEventListener("keydown",p),t.addEventListener("blur",f),(s=r.signal)==null||s.addEventListener("abort",m),requestAnimationFrame(()=>{l||(c=performance.now()+300,t.focus(),FDe(t))})})}function rU(r){let{view:e,el:t,recordId:n,multiline:i=!1}=r,o=r.listenOn??t;o.style.pointerEvents="auto",t.style.pointerEvents="auto";let a,s=!1,l,c=()=>{if(s||v1.has(t))return;let d=nn().get(n),p=(d?.text??t.textContent??"").trim();nn().setSelectedId(n),e.htmlTransientManager.selectGroup(n),l=new AbortController,Lte({el:t,listenOn:o,multiline:i,initialText:p,signal:l.signal}).then(f=>{l=void 0,!(s||f===void 0||f===p)&&wa(e,"Edit Markup Text",()=>{nn().updateMeta(n,{text:f})})})},u=d=>{if(d.button!==0||v1.has(t))return;let p={t:performance.now(),x:d.clientX,y:d.clientY},f=d.detail>=2||zDe(a,p);a=p,f&&(d.stopPropagation(),c())},h=d=>{d.preventDefault(),d.stopPropagation(),c()};return o.addEventListener("pointerdown",u,!0),o.addEventListener("dblclick",h),()=>{s=!0,l?.abort(),o.removeEventListener("pointerdown",u,!0),o.removeEventListener("dblclick",h)}}var UDe=[8,6,4,2,0,1,3,5,7,9];function jDe(){let r=[];for(let e of UDe)for(let t=1;t<=24;t++)r.push(t*10+e);return r}var Ote=Array.from({length:9},(r,e)=>e+1),Dte=jDe(),Rte=Array.from({length:6},(r,e)=>e+250),VDe=new Set(["measuredistance","measurecontinuous","measurearea","measureangle","measurearc","measurepoint"]),GDe=new Set(["markuptext","markupline","markuparrow","markupcloud","markuprect","markupcircle","markuphighlight","markupcallout","markupstamp"]);function iU(r){let e=r?.trim().toLowerCase();if(e){if(VDe.has(e))return"measure";if(GDe.has(e))return"markup"}}function HDe(r){return new ct(new Z(r.min.x,r.min.y),new Z(r.max.x,r.max.y))}function WDe(r,e){let t=r.getDrawingExtents();if(t&&!t.isEmpty())return t;let n=e?.extents;if(n&&!n.isEmpty())return HDe(n)}function H1(r,e){return new Ie().makeTranslation(r.x,r.y,r.z).multiply(new Ie().makeRotationZ(e)).multiply(new Ie().makeTranslation(-r.x,-r.y,-r.z))}var JJ=new Set;function XDe(r,e="drawing"){let t=r?.trim();return t&&(t.split(/[\\/]/).pop()??t).replace(/\.[^.]+$/,"").trim()||e}function Bte(r,e,t="drawing"){let n=XDe(r,t),i=e.startsWith(".")?e:`.${e}`,o=0,a=`${n}${i}`;for(;JJ.has(a);)o+=1,a=`${n}-${o+1}${i}`;return JJ.add(a),a}var QJ="ml-ui-simple-toolbar-styles",YDe=`
  5988. .ml-ui-simple-toolbar {
  5989. display: inline-flex;
  5990. gap: 4px;
  5991. padding: 4px;
  5992. box-sizing: border-box;
  5993. border: 1px solid var(--ml-ui-border, #dcdfe6);
  5994. border-radius: 6px;
  5995. background: var(--ml-ui-bg, rgba(255, 255, 255, 0.96));
  5996. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
  5997. color: var(--ml-ui-text, #303133);
  5998. --ml-ui-simple-toolbar-btn-size: 32px;
  5999. max-width: 100%;
  6000. max-height: 100%;
  6001. pointer-events: auto;
  6002. }
  6003. .ml-ui-simple-toolbar[hidden] {
  6004. display: none !important;
  6005. }
  6006. .ml-ui-simple-toolbar.is-horizontal {
  6007. flex-direction: row;
  6008. align-items: center;
  6009. }
  6010. .ml-ui-simple-toolbar.is-vertical {
  6011. flex-direction: column;
  6012. align-items: stretch;
  6013. }
  6014. .ml-ui-simple-toolbar__track {
  6015. display: flex;
  6016. gap: 4px;
  6017. min-width: 0;
  6018. min-height: 0;
  6019. overflow: hidden;
  6020. }
  6021. .ml-ui-simple-toolbar.is-horizontal .ml-ui-simple-toolbar__track {
  6022. flex-direction: row;
  6023. align-items: center;
  6024. flex: 1 1 auto;
  6025. }
  6026. .ml-ui-simple-toolbar.is-vertical .ml-ui-simple-toolbar__track {
  6027. flex-direction: column;
  6028. align-items: stretch;
  6029. flex: 1 1 auto;
  6030. }
  6031. .ml-ui-simple-toolbar__btn {
  6032. position: relative;
  6033. flex: 0 0 auto;
  6034. width: var(--ml-ui-simple-toolbar-btn-size);
  6035. height: var(--ml-ui-simple-toolbar-btn-size);
  6036. padding: 0;
  6037. display: inline-flex;
  6038. align-items: center;
  6039. justify-content: center;
  6040. border: 1px solid transparent;
  6041. border-radius: 4px;
  6042. background: transparent;
  6043. color: inherit;
  6044. cursor: pointer;
  6045. box-sizing: border-box;
  6046. }
  6047. .ml-ui-simple-toolbar__btn:hover:not(:disabled) {
  6048. background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
  6049. border-color: var(--ml-ui-border, #dcdfe6);
  6050. }
  6051. .ml-ui-simple-toolbar__btn:disabled {
  6052. opacity: 0.45;
  6053. cursor: default;
  6054. }
  6055. .ml-ui-simple-toolbar__btn .ml-ex-ui-icon,
  6056. .ml-ui-simple-toolbar__btn .ml-ui-simple-toolbar__icon {
  6057. display: inline-flex;
  6058. width: 18px;
  6059. height: 18px;
  6060. align-items: center;
  6061. justify-content: center;
  6062. }
  6063. .ml-ui-simple-toolbar__btn .ml-ex-ui-icon svg,
  6064. .ml-ui-simple-toolbar__btn .ml-ui-simple-toolbar__icon svg {
  6065. width: 18px;
  6066. height: 18px;
  6067. }
  6068. .ml-ui-simple-toolbar__overflow-btn[hidden] {
  6069. display: none !important;
  6070. }
  6071. .ml-ui-simple-toolbar__menu {
  6072. position: absolute;
  6073. z-index: 60;
  6074. min-width: 160px;
  6075. max-width: min(280px, 90vw);
  6076. padding: 4px;
  6077. margin: 0;
  6078. list-style: none;
  6079. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6080. border-radius: 6px;
  6081. background: var(--ml-ui-bg, #fff);
  6082. box-shadow: var(--ml-ui-shadow, 0 4px 12px rgba(0, 0, 0, 0.16));
  6083. color: var(--ml-ui-text, #303133);
  6084. }
  6085. .ml-ui-simple-toolbar__menu[hidden] {
  6086. display: none !important;
  6087. }
  6088. .ml-ui-simple-toolbar__menu-item {
  6089. display: flex;
  6090. align-items: center;
  6091. gap: 8px;
  6092. width: 100%;
  6093. padding: 8px 10px;
  6094. border: none;
  6095. border-radius: 4px;
  6096. background: transparent;
  6097. color: inherit;
  6098. font: inherit;
  6099. font-size: 13px;
  6100. text-align: start;
  6101. cursor: pointer;
  6102. box-sizing: border-box;
  6103. }
  6104. .ml-ui-simple-toolbar__menu-item:hover:not(:disabled) {
  6105. background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
  6106. }
  6107. .ml-ui-simple-toolbar__menu-item:disabled {
  6108. opacity: 0.45;
  6109. cursor: default;
  6110. }
  6111. .ml-ui-simple-toolbar__menu-item .ml-ex-ui-icon,
  6112. .ml-ui-simple-toolbar__menu-item .ml-ui-simple-toolbar__icon {
  6113. flex: 0 0 auto;
  6114. width: 18px;
  6115. height: 18px;
  6116. display: inline-flex;
  6117. align-items: center;
  6118. justify-content: center;
  6119. }
  6120. .ml-ui-simple-toolbar__menu-label {
  6121. flex: 1 1 auto;
  6122. min-width: 0;
  6123. overflow: hidden;
  6124. text-overflow: ellipsis;
  6125. white-space: nowrap;
  6126. }
  6127. `;function $De(){if(typeof document>"u"||document.getElementById(QJ))return;let r=document.createElement("style");r.id=QJ,r.textContent=YDe,document.head.appendChild(r)}var YN=class{constructor(e){this.coreItems=[],this.extensionItems=[],this.resizeObserver=null,this.menuOpen=!1,this.disposed=!1,$De(),this.host=e.host,this.orientation=e.orientation??"horizontal",this.moreLabel=e.moreLabel??"More",this.coreItems=[...e.items??[]],this.root=document.createElement("div"),this.root.className=["ml-ui-simple-toolbar",this.orientation==="vertical"?"is-vertical":"is-horizontal",e.className].filter(Boolean).join(" "),this.root.setAttribute("role","toolbar"),zs(Jo(this.host),this.root),this.track=document.createElement("div"),this.track.className="ml-ui-simple-toolbar__track",this.overflowButton=document.createElement("button"),this.overflowButton.type="button",this.overflowButton.className="ml-ui-simple-toolbar__btn ml-ui-simple-toolbar__overflow-btn",this.overflowButton.hidden=!0,this.overflowButton.title=this.moreLabel,this.overflowButton.setAttribute("aria-label",this.moreLabel),this.overflowButton.setAttribute("aria-haspopup","menu"),this.overflowButton.setAttribute("aria-expanded","false"),this.overflowButton.appendChild(Ll(fte)),this.overflowButton.addEventListener("click",t=>{t.stopPropagation(),!this.overflowButton.hidden&&this.toggleMenu()}),this.menu=document.createElement("div"),this.menu.className="ml-ui-simple-toolbar__menu",this.menu.setAttribute("role","menu"),this.menu.hidden=!0,this.root.append(this.track,this.overflowButton),this.host.appendChild(this.root),document.body.appendChild(this.menu),this.onDocumentPointerDown=t=>{if(!this.menuOpen)return;let n=t.target;n&&(this.menu.contains(n)||this.overflowButton.contains(n))||this.closeMenu()},document.addEventListener("pointerdown",this.onDocumentPointerDown,!0),this.render(),this.setupResizeObserver()}get visibleItems(){return[...this.extensionItems,...this.coreItems].filter(e=>e.visible!==!1)}setItems(e){this.coreItems=[...e],this.render()}setExtensionItems(e){this.extensionItems=[...e],this.render()}updateItem(e,t){let n=i=>{let o=i.findIndex(a=>a.id===e);return o<0?!1:(i[o]={...i[o],...t},!0)};!n(this.coreItems)&&!n(this.extensionItems)||this.render()}setOrientation(e){this.orientation!==e&&(this.orientation=e,this.root.classList.toggle("is-horizontal",e==="horizontal"),this.root.classList.toggle("is-vertical",e==="vertical"),this.layoutOverflow())}setMoreLabel(e){this.moreLabel=e,this.overflowButton.title=e,this.overflowButton.setAttribute("aria-label",e)}setVisible(e){this.root.hidden=!e,e||this.closeMenu()}refreshTheme(){zs(Jo(this.host),this.root),zs(Jo(this.host),this.menu)}dispose(){var e;this.disposed||(this.disposed=!0,this.closeMenu(),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=null,this.menu.remove(),this.root.remove())}setupResizeObserver(){if(typeof ResizeObserver>"u"){this.layoutOverflow();return}this.resizeObserver=new ResizeObserver(()=>this.layoutOverflow()),this.resizeObserver.observe(this.root),this.host!==this.root&&this.resizeObserver.observe(this.host)}render(){this.closeMenu(),this.track.replaceChildren();for(let e of this.visibleItems)this.track.appendChild(this.createButton(e));requestAnimationFrame(()=>this.layoutOverflow())}createButton(e){let t=document.createElement("button");t.type="button",t.className="ml-ui-simple-toolbar__btn",t.dataset.toolbarItemId=e.id;let n=e.title??e.label;return t.title=n,t.setAttribute("aria-label",n),t.disabled=!!e.disabled,t.appendChild(Ll(e.icon)),t.addEventListener("click",i=>{i.stopPropagation(),!t.disabled&&(this.closeMenu(),e.onClick(i))}),t}layoutOverflow(){if(this.disposed||this.root.hidden)return;let e=Array.from(this.track.querySelectorAll(".ml-ui-simple-toolbar__btn"));for(let p of e)p.hidden=!1;if(this.overflowButton.hidden=!0,this.closeMenu(),e.length===0)return;let t=this.orientation==="horizontal",n=4,i=e.map(p=>t?p.offsetWidth:p.offsetHeight),o=i.reduce((p,f,m)=>p+f+(m>0?n:0),0),a=getComputedStyle(this.root),s=t?(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0):(parseFloat(a.paddingTop)||0)+(parseFloat(a.paddingBottom)||0),l=(t?this.root.clientWidth:this.root.clientHeight)-s;if(!(l>0)||o<=l+1)return;let c=t?this.overflowButton.offsetWidth||32:this.overflowButton.offsetHeight||32,u=l-c-n,h=0,d=e.length;for(let p=0;p<e.length;p++){let f=h+(p>0?n:0)+i[p];if(f>u&&p>0){d=p;break}h=f}if(!(d>=e.length)){this.overflowButton.hidden=!1;for(let p=d;p<e.length;p++)e[p].hidden=!0}}toggleMenu(){this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){let e=Array.from(this.track.querySelectorAll(".ml-ui-simple-toolbar__btn[hidden]"));if(e.length===0)return;let t=new Map(this.visibleItems.map(n=>[n.id,n]));this.menu.replaceChildren();for(let n of e){let i=n.dataset.toolbarItemId;if(!i)continue;let o=t.get(i);if(!o)continue;let a=document.createElement("button");a.type="button",a.className="ml-ui-simple-toolbar__menu-item",a.setAttribute("role","menuitem"),a.disabled=!!o.disabled,a.appendChild(Ll(o.icon));let s=document.createElement("span");s.className="ml-ui-simple-toolbar__menu-label",s.textContent=o.label,a.appendChild(s),a.addEventListener("click",l=>{l.stopPropagation(),!a.disabled&&(this.closeMenu(),o.onClick(l))}),this.menu.appendChild(a)}zs(Jo(this.host),this.menu),this.menu.hidden=!1,this.menuOpen=!0,this.overflowButton.setAttribute("aria-expanded","true"),this.positionMenu()}positionMenu(){let e=this.overflowButton.getBoundingClientRect(),t=this.menu.getBoundingClientRect(),n=e.left,i=e.bottom+4;this.orientation==="vertical"&&(n=e.right+4,i=e.top),n+t.width>window.innerWidth-8&&(n=Math.max(8,window.innerWidth-t.width-8)),i+t.height>window.innerHeight-8&&(i=Math.max(8,e.top-t.height-4)),this.menu.style.left=`${n}px`,this.menu.style.top=`${i}px`}closeMenu(){!this.menuOpen&&this.menu.hidden||(this.menuOpen=!1,this.menu.hidden=!0,this.overflowButton.setAttribute("aria-expanded","false"))}},eQ="ml-ui-shortcut-toolbar-styles",KDe=12,qDe=`
  6128. .ml-ui-shortcut-toolbar-shell {
  6129. position: absolute;
  6130. top: ${KDe}px;
  6131. right: 12px;
  6132. z-index: ${oOe};
  6133. max-width: calc(100% - 24px);
  6134. display: inline-flex;
  6135. align-items: center;
  6136. gap: 4px;
  6137. padding: 4px;
  6138. box-sizing: border-box;
  6139. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6140. border-radius: 6px;
  6141. background: var(--ml-ui-bg, rgba(255, 255, 255, 0.96));
  6142. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
  6143. color: var(--ml-ui-text, #303133);
  6144. pointer-events: auto;
  6145. }
  6146. .ml-ui-shortcut-toolbar-shell[hidden] {
  6147. display: none !important;
  6148. }
  6149. .ml-ui-shortcut-toolbar-shell .ml-ui-simple-toolbar {
  6150. border: none;
  6151. box-shadow: none;
  6152. background: transparent;
  6153. padding: 0;
  6154. color: inherit;
  6155. flex: 0 0 auto;
  6156. max-width: none;
  6157. }
  6158. .ml-ui-shortcut-accessory {
  6159. display: flex;
  6160. align-items: center;
  6161. gap: 4px;
  6162. flex: 0 0 auto;
  6163. }
  6164. .ml-ui-shortcut-accessory:empty {
  6165. display: none;
  6166. }
  6167. .ml-ui-shortcut-divider {
  6168. display: none;
  6169. width: 1px;
  6170. align-self: stretch;
  6171. margin: 2px 0;
  6172. background: var(--ml-ui-border, #dcdfe6);
  6173. flex: 0 0 auto;
  6174. }
  6175. .ml-ui-shortcut-toolbar-shell.has-accessory .ml-ui-shortcut-divider {
  6176. display: block;
  6177. }
  6178. .ml-ui-shortcut-toolbar-shell.is-collapsed .ml-ui-shortcut-accessory,
  6179. .ml-ui-shortcut-toolbar-shell.is-collapsed .ml-ui-shortcut-divider,
  6180. .ml-ui-shortcut-toolbar-shell.is-collapsed .ml-ui-simple-toolbar {
  6181. display: none !important;
  6182. }
  6183. .ml-ui-shortcut-collapse-btn {
  6184. position: relative;
  6185. flex: 0 0 auto;
  6186. width: calc(var(--ml-ui-simple-toolbar-btn-size, 32px) / 2);
  6187. height: var(--ml-ui-simple-toolbar-btn-size, 32px);
  6188. margin-left: -4px;
  6189. margin-right: -4px;
  6190. padding: 0;
  6191. display: inline-flex;
  6192. align-items: center;
  6193. justify-content: center;
  6194. border: 1px solid transparent;
  6195. border-radius: 4px;
  6196. background: transparent;
  6197. color: inherit;
  6198. cursor: pointer;
  6199. box-sizing: border-box;
  6200. }
  6201. .ml-ui-shortcut-collapse-btn:hover {
  6202. background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
  6203. border-color: var(--ml-ui-border, #dcdfe6);
  6204. }
  6205. .ml-ui-shortcut-collapse-btn .ml-ex-ui-icon,
  6206. .ml-ui-shortcut-collapse-btn .ml-ui-simple-toolbar__icon {
  6207. display: inline-flex;
  6208. width: calc(var(--ml-ui-simple-toolbar-btn-size, 32px) / 2);
  6209. height: calc(var(--ml-ui-simple-toolbar-btn-size, 32px) / 2);
  6210. align-items: center;
  6211. justify-content: center;
  6212. }
  6213. .ml-ui-shortcut-collapse-btn .ml-ex-ui-icon svg,
  6214. .ml-ui-shortcut-collapse-btn .ml-ui-simple-toolbar__icon svg {
  6215. width: calc(var(--ml-ui-simple-toolbar-btn-size, 32px) / 2);
  6216. height: calc(var(--ml-ui-simple-toolbar-btn-size, 32px) / 2);
  6217. }
  6218. .ml-ui-shortcut-collapse-sep {
  6219. flex: 0 0 auto;
  6220. width: 1px;
  6221. align-self: stretch;
  6222. margin: 2px 0;
  6223. background: var(--ml-ui-border, #dcdfe6);
  6224. }
  6225. .ml-ui-shortcut-toolbar-shell.is-collapsed .ml-ui-shortcut-collapse-sep {
  6226. display: none;
  6227. }
  6228. /* Match simple-toolbar icon buttons: no permanent outer frame. */
  6229. .ml-ui-shortcut-accessory .ml-draw-style-toolbar__controls {
  6230. gap: 4px;
  6231. }
  6232. .ml-ui-shortcut-accessory .ml-draw-style-toolbar__swatch,
  6233. .ml-ui-shortcut-accessory .ml-draw-style-toolbar__text-height {
  6234. width: var(--ml-ui-simple-toolbar-btn-size, 32px);
  6235. height: var(--ml-ui-simple-toolbar-btn-size, 32px);
  6236. border: 1px solid transparent;
  6237. border-radius: 4px;
  6238. background: transparent;
  6239. }
  6240. .ml-ui-shortcut-accessory .ml-draw-style-toolbar__swatch:hover,
  6241. .ml-ui-shortcut-accessory .ml-draw-style-toolbar__text-height:hover {
  6242. background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
  6243. border-color: var(--ml-ui-border, #dcdfe6);
  6244. }
  6245. .ml-ui-shortcut-accessory .ml-draw-style-toolbar__swatch-fill {
  6246. margin: 0 auto;
  6247. }
  6248. `;function ZDe(){if(typeof document>"u")return;let r=document.getElementById(eQ);r&&r.remove();let e=document.createElement("style");e.id=eQ,e.textContent=qDe,document.head.appendChild(e)}var $N="shortcut-toolbar",KN=class{constructor(e){var t;this.options=e,this.onLocaleChanged=()=>this.relabel(),this.offTheme=null,this.disposed=!1,ZDe(),getComputedStyle(e.container).position==="static"&&(e.container.style.position="relative"),this.forceVisible=e.forceVisible===!0,this.collapsible=e.collapsible!==!1,this.collapsed=this.collapsible&&e.defaultCollapsed===!0,this.actions={...e.actions??{}},this.getActionState=e.getActionState,this.shell=document.createElement("div"),this.shell.className="ml-ui-shortcut-toolbar-shell",e.topOffsetPx!=null&&(this.shell.style.top=`${e.topOffsetPx}px`),e.container.appendChild(this.shell),this.accessoryHost=document.createElement("div"),this.accessoryHost.className="ml-ui-shortcut-accessory",this.divider=document.createElement("div"),this.divider.className="ml-ui-shortcut-divider",this.divider.setAttribute("aria-hidden","true"),this.shell.append(this.accessoryHost,this.divider),this.toolbar=new YN({host:this.shell,orientation:"horizontal",className:"ml-ui-shortcut-toolbar",moreLabel:((t=e.labels)==null?void 0:t.more)??P.t("main.shortCutToolbar.more"),items:this.buildCoreItems()}),this.collapsible?(this.collapseSep=document.createElement("div"),this.collapseSep.className="ml-ui-shortcut-collapse-sep",this.collapseSep.setAttribute("role","separator"),this.collapseButton=document.createElement("button"),this.collapseButton.type="button",this.collapseButton.className="ml-ui-shortcut-collapse-btn",this.collapseButton.dataset.toolbarItemId="shortcut-collapse",this.collapseButton.addEventListener("click",n=>{n.stopPropagation(),this.toggleCollapsed()}),this.shell.append(this.collapseSep,this.collapseButton),this.syncCollapseToggleButton(),this.syncCollapsedClass()):(this.collapseSep=null,this.collapseButton=null),this.onSettingsModified=n=>{n.key==="isShowShortCutToolbar"&&this.syncVisibility()},this.forceVisible||hr.instance.events.modified.addEventListener(this.onSettingsModified),this.offTheme=Qz(()=>this.refreshTheme()),P.events.localeChanged.addEventListener(this.onLocaleChanged),this.syncVisibility(),this.refreshTheme(),this.syncActionState()}get simpleToolbar(){return this.toolbar}get isCollapsed(){return this.collapsed}setActions(e){this.actions={...this.actions,...e},this.toolbar.setItems(this.buildCoreItems()),this.syncActionState()}setActionStateProvider(e){this.getActionState=e,this.syncActionState()}setExtensionItems(e){this.toolbar.setExtensionItems(e),this.syncActionState()}get isVisible(){return!this.shell.hidden}setAccessoryActive(e){this.shell.classList.toggle("has-accessory",e)}setCollapsed(e){!this.collapsible||this.collapsed===e||(this.collapsed=e,this.syncCollapsedClass(),this.syncCollapseToggleButton())}toggleCollapsed(){this.setCollapsed(!this.collapsed)}setTopOffset(e){this.shell.style.top=`${e}px`}setActionState(e){this.toolbar.updateItem("shortcut-undo",{disabled:!e.undo}),this.toolbar.updateItem("shortcut-redo",{disabled:!e.redo}),this.toolbar.updateItem("shortcut-erase",{disabled:!e.erase})}syncActionState(){if(!this.disposed){if(this.getActionState){this.setActionState(this.getActionState());return}this.setActionState({undo:!0,redo:!0,erase:!0})}}relabel(){var e;this.disposed||(this.toolbar.setMoreLabel(((e=this.options.labels)==null?void 0:e.more)??P.t("main.shortCutToolbar.more")),this.toolbar.setItems(this.buildCoreItems()),this.syncCollapseToggleButton(),this.syncActionState())}refreshTheme(){this.disposed||(zs(Jo(this.options.container),this.shell),this.toolbar.refreshTheme())}dispose(){var e;this.disposed||(this.disposed=!0,this.forceVisible||hr.instance.events.modified.removeEventListener(this.onSettingsModified),P.events.localeChanged.removeEventListener(this.onLocaleChanged),(e=this.offTheme)==null||e.call(this),this.offTheme=null,this.toolbar.dispose(),this.shell.remove())}syncVisibility(){let e=this.forceVisible||hr.instance.isShowShortCutToolbar;this.shell.hidden=!e,this.toolbar.setVisible(e&&!this.collapsed)}syncCollapsedClass(){this.shell.classList.toggle("is-collapsed",this.collapsed);let e=this.forceVisible||hr.instance.isShowShortCutToolbar;this.toolbar.setVisible(e&&!this.collapsed)}syncCollapseToggleButton(){var e,t;if(!this.collapseButton)return;let n=this.collapsed?((e=this.options.labels)==null?void 0:e.expand)??P.t("main.shortCutToolbar.expand"):((t=this.options.labels)==null?void 0:t.collapse)??P.t("main.shortCutToolbar.collapse"),i=this.collapsed?pte:dte;this.collapseButton.replaceChildren(Ll(i)),this.collapseButton.title=n,this.collapseButton.setAttribute("aria-label",n),this.collapseButton.setAttribute("aria-expanded",String(!this.collapsed))}buildCoreItems(){var e,t,n;let i=o=>{var a,s;(s=(a=this.actions)[o])==null||s.call(a)};return[{id:"shortcut-undo",icon:T3e,label:((e=this.options.labels)==null?void 0:e.undo)??P.t("main.shortCutToolbar.undo"),onClick:()=>i("undo")},{id:"shortcut-redo",icon:k3e,label:((t=this.options.labels)==null?void 0:t.redo)??P.t("main.shortCutToolbar.redo"),onClick:()=>i("redo")},{id:"shortcut-erase",icon:I3e,label:((n=this.options.labels)==null?void 0:n.erase)??P.t("main.shortCutToolbar.erase"),onClick:()=>i("erase")}]}};function JDe(r){if(r.commandKind)return r.commandKind;if(!(r.markupSelected&&r.measurementSelected)){if(r.markupSelected)return"markup";if(r.measurementSelected)return"measure"}}function Fte(r,e=hr.instance.isShowRibbon){return r!=null&&!e}function QDe(r){let e=null;r.sessionAccessory={id:"draw-style",mount(t){let n=t.view.sessionProviders.get(Bb);if(!n)throw new kb;let i=iU(r.globalName);if(n.setActiveKind(i),t.type==="desktop"){let o=t.view.sessionProviders.get($N);if(o!=null&&o.isVisible)throw new kb;if(!Fte(i))throw new kb}e=n.createSessionAccessory(),e.mount(t)},unmount(){e?.unmount(),e=null}}}var sk=class extends xt{constructor(){super(),QDe(this)}},qN;function eRe(r){qN=r}function Ok(r,e){qN?.(r,e)}function tRe(){return new je(Be.ByACI,1)}var nRe=0,Eo=nRe,zb=12,Nte=tRe(),zte=zb,lk="adaptive",Ob,ZN=new Set;function Ute(){for(let r of ZN)r()}function oU(r){return ZN.add(r),()=>{ZN.delete(r)}}function Wr(){return Nte.clone()}function Ol(){return zte}function rRe(){return lk}function iRe(){return Ob}function oRe(r){Nte=r.clone(),Ute()}function aRe(r,e){!Number.isFinite(e)||e<=0||(lk=r,r==="adaptive"?(zte=e,Ob=void 0):Ob=e,Ute())}function ck(r){return typeof r=="number"&&Number.isFinite(r)&&r>=0?r:Eo}function Gs(r){let e=Number(r);return!Number.isFinite(e)||e<=0?0:Math.max(1,e/28)}function Ub(r){return See(r)}function jte(r){return _ee(r,[255,0,0])}function Qa(){return{color:Ub(Wr()),lineWeight:Eo,fontSize:Ol(),textHeightMode:lk,...lk==="custom"&&Ob!=null&&Ob>0?{textHeightWcs:Ob}:{}}}function sRe(r,e){let t=r.fontSize!=null&&r.fontSize>0?r.fontSize:zb,n=r.arrowSizeWcs!=null&&r.arrowSizeWcs>0?r.arrowSizeWcs:Ci(zc,e),i;return r.textHeightMode==="custom"&&r.textHeightWcs!=null&&r.textHeightWcs>0?i=r.textHeightWcs:r.textHeightMode==="adaptive"?i=Ci(t,e):r.textHeightWcs!=null&&r.textHeightWcs>0?i=r.textHeightWcs:i=Ci(t,e),{...r,lineWeight:Eo,textHeightWcs:i,arrowSizeWcs:n}}function lRe(r,e,t,n){let i=r.fontSize!=null&&r.fontSize>0?r.fontSize:zb,o=e.fontSize!=null&&e.fontSize>0?e.fontSize:zb,a=n.fontSize!=null&&n.fontSize!==r.fontSize,s=n.textHeightWcs!=null&&n.textHeightWcs!==r.textHeightWcs,l=e.textHeightMode??r.textHeightMode??"adaptive",c=r.textHeightWcs??e.textHeightWcs;l==="custom"&&e.textHeightWcs!=null&&e.textHeightWcs>0?c=e.textHeightWcs:a?c!=null&&c>0&&i>0?c=c*(o/i):c=Ci(o,t):s?c=e.textHeightWcs:(c==null||!(c>0))&&(c=Ci(o,t));let{strokeWidthWcs:u,...h}=e,d=r.arrowSizeWcs!=null&&r.arrowSizeWcs>0?r.arrowSizeWcs:e.arrowSizeWcs;return d=Cee(d,i,o),{...h,textHeightMode:l,lineWeight:Eo,textHeightWcs:c,arrowSizeWcs:d}}function cRe(r="markup"){return typeof crypto<"u"&&"randomUUID"in crypto?`${r}-${crypto.randomUUID()}`:`${r}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function uRe(){return new Date().toISOString()}function hRe(r){let e=gt.instance().getVar(oe.LOGINNAME,r);return typeof e=="string"?e.trim():""}var uk=class{worldDraw(e){return this.subWorldDraw(e)}subGetGripPoints(){return[]}subMoveGripPointsAt(e,t){return this}hitTest(e,t,n){return!1}primaryPoint(){}},Vte="ml-html-grip",dRe="ml-html-grip-dragging",pRe="ml-html-selected";function JN(r,e){let t=r.viewportToCanvas({x:e.clientX,y:e.clientY}),n=r.screenToWorld(t);return{x:n.x,y:n.y}}function fRe(r,e){var t;let n=r;(t=n.refreshMobileSnapLoupe)==null||t.call(n,e.clientX,e.clientY,n.lastOverlayGripOsnap??null)}function mRe(r,e,t){let n=JN(r,e),i=r;if(typeof i.resolveOverlayGripPoint=="function")return i.resolveOverlayGripPoint(n,t);let o=i.osnapResolver;if(typeof o?.resolve!="function")return n;let a={x:n.x,y:n.y,z:0},s=o.resolve({cursorWcs:a,lastPoint:{x:t.x,y:t.y,z:0}});return s?{x:s.x,y:s.y}:n}function ur(r,e,t){r.htmlTransientManager.updatePosition(e.id,t)}var tQ=4,yb={capture:!0,passive:!1};function gRe(r){return r.classList.contains(Vte)}function nQ(r,e){e.querySelectorAll(`.${Vte}`).forEach(t=>{t.classList.toggle(dRe,r)})}function es(r){var e;let{view:t,el:n,onDragStart:i,onMove:o,onCommit:a}=r,s=gRe(n),l=r.cursor??"grab",c=r.useOsnap!==!1;s||(n.style.pointerEvents="auto"),n.style.cursor=l,n.style.touchAction="none",n.style.userSelect="none";let u=t.htmlTransientManager;(e=u?.syncHitTest)==null||e.call(u);let h,d=!1,p=()=>!(r.isEnabled&&!r.isEnabled()||s&&!n.classList.contains(pRe)),f=m=>{if(m.button!==0||!p())return;let g=m.target;if(m.detail>=2||g!=null&&g.isContentEditable||g!=null&&g.closest('[contenteditable="true"]')||n.querySelector('[contenteditable="true"]'))return;let y=m.pointerId,b=m.clientX,v=m.clientY,x=!1,w=c&&m.pointerType==="touch",_=JN(t,m),A=t,E=D=>c?mRe(t,D,_):JN(t,D),S=()=>{var D;w&&((D=t.hideMobileSnapLoupe)==null||D.call(t))},M=()=>{window.removeEventListener("pointermove",L,yb),window.removeEventListener("pointerup",O,yb),window.removeEventListener("pointercancel",O,yb),h===M&&(h=void 0)},T=()=>{d&&(d=!1,nQ(!1,t.container??document))},L=D=>{if(D.pointerId===y){if(!x){let z=D.clientX-b,N=D.clientY-v;if(z*z+N*N<tQ*tQ)return;x=!0,D.preventDefault(),n.style.cursor="grabbing",s&&(d=!0,nQ(!0,t.container??document)),i?.()}o(E(D),D),w&&fRe(t,D),t.isHtmlDirty=!0}},O=D=>{var z,N;D.pointerId===y&&(M(),S(),c&&x&&(typeof A.clearOverlayGripOsnap=="function"?A.clearOverlayGripOsnap():(N=(z=A.osnapResolver)==null?void 0:z.clearAcquiredCenters)==null||N.call(z)),x&&(n.style.cursor=l,T(),a()))};h?.(),h=()=>{S(),T(),M()},window.addEventListener("pointermove",L,yb),window.addEventListener("pointerup",O,yb),window.addEventListener("pointercancel",O,yb)};return n.addEventListener("pointerdown",f),()=>{n.removeEventListener("pointerdown",f),h?.()}}function Gte(r){let{view:e,tipEl:t,bubbleEl:n,state:i,constrainTip:o,onDragStart:a,onLiveChange:s,onCommit:l}=r,c={tip:{...i.tip},anchor:{...i.anchor}},u=p=>Math.hypot(p.tip.x-c.tip.x,p.tip.y-c.tip.y)<1e-9&&Math.hypot(p.anchor.x-c.anchor.x,p.anchor.y-c.anchor.y)<1e-9,h=es({view:e,el:t.element,onDragStart:()=>{c={tip:{...i.tip},anchor:{...i.anchor}},a?.()},onMove:p=>{i.tip=o?o(p):p,ur(e,t,i.tip),s()},onCommit:()=>{let p={tip:{...i.tip},anchor:{...i.anchor}};u(p)||l(p)}}),d=es({view:e,el:n.element,useOsnap:!1,onDragStart:()=>{c={tip:{...i.tip},anchor:{...i.anchor}},a?.()},onMove:p=>{i.anchor=p,ur(e,n,i.anchor),s()},onCommit:()=>{let p={tip:{...i.tip},anchor:{...i.anchor}};u(p)||l(p)}});return()=>{h(),d()}}function yRe(r){let e=ck(r.style.lineWeight);return{color:jte(r.style.color),lineWeight:e,canvasLineWidth:Gs(e),layer:Gz,layoutId:r.layoutId}}var Fd=class extends uk{constructor(e){super(),this.record=e}get id(){return this.record.id}toRecord(){return this.record}get markupRecord(){return this.toRecord()}setRecord(e){this.record=e}style(){return yRe(this.record)}hitTest(e,t,n){return dee(this.record.geometry,e,t,n)}primaryPoint(){let e=BF(this.record.geometry);if(e)return{x:e.x,y:e.y,z:0}}subGetGripPoints(){let e=BF(this.record.geometry);return e?[new k(e.x,e.y,0)]:[]}subMoveGripPointsAt(e,t){return e.length===0?this:e.includes(0)?(this.record={...this.record,geometry:cee(this.record.geometry,t.x,t.y)},this):this}emptyResult(e){return{group:e,entityIds:[],dispose:()=>{}}}createGroup(){let{layer:e,layoutId:t}=this.style();return new Wf({id:this.record.id,layer:e,layoutId:t,selectable:!0})}seedOverlaySizes(e,t,n=[]){ch(e,{textHeightWcs:this.record.style.textHeightWcs,strokeWidthWcs:this.record.style.strokeWidthWcs,arrowSizeWcs:this.record.style.arrowSizeWcs,fontSizePx:this.record.style.fontSize??zb,strokeScreenPx:Gs(ck(this.record.style.lineWeight)),elements:t,canvases:n})}},Yi=class{constructor(e,t,n,i){this.drawFn=null,this.onViewChanged=()=>this.acapPaint(),this.view=e,this.alignToViewCanvas=i?.alignToViewCanvas===!0,this.overlay=new _o({id:t,container:e.container,layer:n,layoutId:e.activeLayoutBtrId}),e.htmlTransientManager.add(this.overlay),e.events.viewChanged.addEventListener(this.onViewChanged)}get id(){return this.overlay.id}acapSetDraw(e){this.drawFn=e,this.acapPaint(),this.view.isHtmlDirty=!0}acapClear(){this.acapSetDraw(null)}acapDispose(){this.view.events.viewChanged.removeEventListener(this.onViewChanged),this.view.htmlTransientManager.remove(this.overlay.id),this.view.isHtmlDirty=!0}acapPaint(){var e;let t=this.alignToViewCanvas?MIe(this.overlay.canvas,this.view):Wb(this.overlay.canvas,this.view.container);t&&((e=this.drawFn)==null||e.call(this,t,this.view))}};function Vc(r,e,t,n,i,o,a){let s=typeof i=="string"?i:Vs(i),l=e.worldToScreen(t),c=e.worldToScreen(n);r.strokeStyle=s;let u=ts(o,r.canvas,e);if(r.lineWidth=u,a!=null&&a.dashed&&r.setLineDash(Kz(u,o)),r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),a!=null&&a.dashed&&r.setLineDash([]),a!=null&&a.arrow){let h=a.arrowSizePx!=null&&a.arrowSizePx>0?a.arrowSizePx:Eee(u,o);a.arrow==="both"?Math.hypot(c.x-l.x,c.y-l.y)>=h&&(lh(r,c,l,s,h),lh(r,l,c,s,h)):lh(r,l,c,s,h)}}function am(r,e,t,n,i,o){var a;if(t.length<2)return;let s=typeof n=="string"?n:Vs(n),l=t.map(u=>e.worldToScreen(u));r.strokeStyle=s;let c=ts(i,r.canvas,e);r.lineWidth=c,o!=null&&o.dashed&&r.setLineDash(Kz(c,i)),r.beginPath(),r.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++)r.lineTo(l[u].x,l[u].y);if(o!=null&&o.closed&&r.closePath(),r.lineJoin="round",r.lineCap="round",r.stroke(),o!=null&&o.dashed&&r.setLineDash([]),o!=null&&o.segmentArrows){let u=o.arrowSizePx!=null&&o.arrowSizePx>0?o.arrowSizePx:Eee(c,i);for(let h=0;h<l.length-1;h++){let d=l[h],p=l[h+1],f=(a=o.segmentArrowSizesPx)==null?void 0:a[h],m=f!=null&&f>0?f:u;Math.hypot(p.x-d.x,p.y-d.y)>=m&&(lh(r,p,d,s,m),lh(r,d,p,s,m))}}}function aU(r,e,t,n,i,o){if(n<=0)return;let a=typeof i=="string"?i:Vs(i),s=e.worldToScreen(t),l=e.worldToScreen({x:t.x+n,y:t.y}),c=Math.hypot(l.x-s.x,l.y-s.y);r.strokeStyle=a,r.lineWidth=ts(o,r.canvas,e),r.beginPath(),r.arc(s.x,s.y,c,0,Math.PI*2),r.stroke()}function bRe(r,e,t,n,i,o){kee(r,e.worldToScreen(t),e.worldToScreen(n),i,o,e)}function sU(r,e){return[{x:r.x,y:r.y},{x:e.x,y:r.y},{x:e.x,y:e.y},{x:r.x,y:e.y}]}var vRe=at.Review;function xRe(r){r.mode=vRe,r.recordsUndoStack=!1}function Gc(r,e,t,n){let i=uRe();return{id:cRe(r),type:r,layoutId:e.activeLayoutBtrId,style:Qa(),text:n?.text,comment:n?.comment??"",status:"open",author:hRe(t.doc.database),createdAt:i,updatedAt:i}}async function rQ(r,e,t=""){let n=new fi(P.t(e));n.allowEmpty=!0,n.allowSpaces=!0,n.defaultValue=t,n.useDefaultValue=!0;let i=await r.view.editor.getString(n);if(i.status===V.OK)return(i.stringResult??t).trim()}async function lU(r,e){if(ba().point.usesSessionChrome){let t=new fi(P.t(e?.messageKey??"jig.markup.text.content"));t.allowEmpty=!0,t.allowSpaces=!0,t.defaultValue=e?.initialText??"",t.useDefaultValue=!0;let n=await Y.instance.editor.getString(t);return n.status!==V.OK?"":(n.stringResult??e?.initialText??"").trim()}return(await Lte({el:r.textElement,listenOn:r.element,multiline:e?.multiline??!0,initialText:e?.initialText??""})??"").trim()}function Hte(r,e,t){let n=r.worldToScreen(t),i={x:n.x+e,y:n.y},o=r.screenToWorld(i);return Math.abs(o.x-t.x)}function cU(r,e,t,n){let i=Math.min(r.x,e.x),o=Math.max(r.x,e.x),a=Math.min(r.y,e.y),s=Math.max(r.y,e.y),l=o-i,c=s-a,u={x:(i+o)/2,y:(a+s)/2},h=n!=null&&n>0?n:Hte(t,Xz,u),d=Math.max(h,1e-6),p=Math.max(4,Math.ceil(l/d)*2),f=Math.max(4,Math.ceil(c/d)*2),m=[],g=0,y=b=>b?.4:-.4;for(let b=0;b<=p;b++){let v=b/p;m.push({x:i+l*v,y:a,bulge:b<p?y(g++%2===0):0})}for(let b=1;b<=f;b++){let v=b/f;m.push({x:o,y:a+c*v,bulge:b<f?y(g++%2===0):0})}for(let b=1;b<=p;b++){let v=1-b/p;m.push({x:i+l*v,y:s,bulge:b<p?y(g++%2===0):0})}for(let b=1;b<f;b++){let v=1-b/f;m.push({x:i,y:a+c*v,bulge:b<f-1?y(g++%2===0):0})}return m}function wRe(r,e,t,n=6){if(Math.abs(t)<1e-8)return[{x:e.x,y:e.y}];let i=e.x-r.x,o=e.y-r.y;if(Math.hypot(i,o)<1e-12)return[{x:e.x,y:e.y}];let a=(r.x+e.x)/2-o*(1-t*t)/(4*t),s=(r.y+e.y)/2+i*(1-t*t)/(4*t),l=Math.hypot(r.x-a,r.y-s),c=Math.atan2(r.y-s,r.x-a),u=Math.atan2(e.y-s,e.x-a)-c;t>0?u<=0&&(u+=Math.PI*2):u>=0&&(u-=Math.PI*2);let h=[],d=Math.max(2,n);for(let p=1;p<=d;p++){let f=p/d,m=c+u*f;h.push({x:a+l*Math.cos(m),y:s+l*Math.sin(m)})}return h}function uU(r){if(r.length<2)return r.map(t=>({x:t.x,y:t.y}));let e=[{x:r[0].x,y:r[0].y}];for(let t=0;t<r.length;t++){let n=r[t],i=r[(t+1)%r.length],o=wRe({x:n.x,y:n.y},{x:i.x,y:i.y},n.bulge);for(let a of o)e.push(a)}return e}function _Re(r,e,t,n,i,o,a,s){let l=a?.dx??0,c=a?.dy??0,u={x:(t.x+n.x)/2,y:(t.y+n.y)/2},h=Number(r.canvas.dataset[UF]);(!(h>0)||!Number.isFinite(h))&&(h=Hte(e,Xz,u),h>0&&(r.canvas.dataset[UF]=String(h)));let d=cU(t,n,e,h),p=uU(d).map(m=>({x:m.x+l,y:m.y+c}));if(p.length<2)return;let f=p.map(m=>e.worldToScreen(m));r.strokeStyle=i,r.lineWidth=ts(o,r.canvas,e,s),r.beginPath(),r.moveTo(f[0].x,f[0].y);for(let m=1;m<f.length;m++)r.lineTo(f[m].x,f[m].y);r.closePath(),r.stroke()}var ET=!0;async function hU(r,e){for(;;){let t=ET?"jig.markup.shape.calloutOn":"jig.markup.shape.calloutOff",n=new Ae(`${P.t(e)} ${P.t(t)}`);n.keywords.add(P.t("jig.markup.shape.keywords.callout.display"),P.t("jig.markup.shape.keywords.callout.global"),P.t("jig.markup.shape.keywords.callout.local")),n.keywords.add(P.t("jig.markup.shape.keywords.noCallout.display"),P.t("jig.markup.shape.keywords.noCallout.global"),P.t("jig.markup.shape.keywords.noCallout.local"));let i=await r.view.editor.getPoint(n);if(i.status===V.Keyword){let o=i.stringResult??"";if(o==="Callout"){ET=!0;continue}if(o==="NoCallout"){ET=!1;continue}continue}return i.status!==V.OK?void 0:i.value}}function SRe(r){return r.kind==="circle"?{...r.center}:{x:(r.corner1.x+r.corner2.x)/2,y:(r.corner1.y+r.corner2.y)/2}}function hk(r,e){if(r.kind==="circle"){let{center:m,radius:g}=r,y=e.x-m.x,b=e.y-m.y,v=Math.hypot(y,b);if(v<1e-9||g<=0)return{x:m.x+g,y:m.y};let x=g/v;return{x:m.x+y*x,y:m.y+b*x}}let t=Math.min(r.corner1.x,r.corner2.x),n=Math.max(r.corner1.x,r.corner2.x),i=Math.min(r.corner1.y,r.corner2.y),o=Math.max(r.corner1.y,r.corner2.y),a=(t+n)/2,s=(i+o)/2,l=(n-t)/2,c=(o-i)/2,u=e.x-a,h=e.y-s;if(Math.abs(u)<1e-9&&Math.abs(h)<1e-9)return{x:n,y:s};let d=Math.abs(u)>1e-9?l/Math.abs(u):Number.POSITIVE_INFINITY,p=Math.abs(h)>1e-9?c/Math.abs(h):Number.POSITIVE_INFINITY,f=Math.min(d,p);return{x:a+u*f,y:s+h*f}}function ARe(r,e,t){return uU(cU(r,e,t))}var QN=class extends It{constructor(e,t,n,i){super(e),this._capsuleRevealed=!1,this._view=e,this._outline=t,this._previewShape=i?.previewShape!==!1,this._color=n,this._ht=this._view.htmlTransientManager;let o=SRe(t),a=i?.toward??{x:o.x+1,y:o.y};this._tip=hk(t,a),this._anchor={...this._tip};let s=Date.now();this._tipDotId=`live-shape-callout-tip-${s}`,this._bubbleId=`live-shape-callout-bubble-${s}`;let l=this._view.activeLayoutBtrId;this._tipDot=new db({id:this._tipDotId,color:n,worldPosition:this._tip,layer:Mo,layoutId:l}),this._ht.add(this._tipDot),this._bubble=new Xf({id:this._bubbleId,color:n,text:"",fontSize:Ol(),worldPosition:this._tip,layer:Mo,layoutId:l}),this._ht.add(this._bubble),this._bubble.object.visible=!1,Sr(this._view,[this._bubble],Qa()),this._preview=new Yi(this._view,`live-shape-callout-stroke-${s}`,Mo),this._unsubDrawStyle=oU(()=>this.applyCurrentStyle()),this.armDesktopCapsulePreview(),this.paintPreview(),this._view.isHtmlDirty=!0}get entity(){return null}update(e){let t={x:e.x,y:e.y};this._tip=hk(this._outline,t),this._anchor=t,this._tipDot.setPosition(this._tip),this._bubble.setPosition(t),this.syncCapsulePreviewVisibility();let n=Qa(),i=n.fontSize??Ol();this._bubble.setFontSize(i),this._tipDot.setFontSize(i),Sr(this._view,[this._bubble,this._tipDot],n),this.paintPreview(),this._view.isHtmlDirty=!0}get capsule(){return this._bubble}revealCapsule(){this.disarmDesktopCapsulePreview(),this._capsuleRevealed=!0,this._bubble.object.visible=!0,this._view.isHtmlDirty=!0}syncCapsulePreviewVisibility(){!this._capsuleRevealed&&Rd()&&(this._capsuleRevealed=!0),this._bubble.object.visible=this._capsuleRevealed}armDesktopCapsulePreview(){if(Rd())return;let e=this._view.canvas;this._desktopMoveArm=t=>{t.pointerType!=="touch"&&(this._capsuleRevealed=!0,this.disarmDesktopCapsulePreview())},e.addEventListener("pointermove",this._desktopMoveArm)}disarmDesktopCapsulePreview(){this._desktopMoveArm&&(this._view.canvas.removeEventListener("pointermove",this._desktopMoveArm),this._desktopMoveArm=void 0)}end(){}disposePreview(){var e;this.disarmDesktopCapsulePreview(),(e=this._unsubDrawStyle)==null||e.call(this),this._unsubDrawStyle=void 0,this._preview.acapDispose(),this._ht.remove(this._tipDotId),this._ht.remove(this._bubbleId),this._view.isHtmlDirty=!0}applyCurrentStyle(){this._color=Wr(),this._tipDot.setColor(this._color),this._bubble.setColor(this._color);let e=Qa(),t=e.fontSize??Ol();this._bubble.setFontSize(t),this._tipDot.setFontSize(t),Sr(this._view,[this._bubble,this._tipDot],e),this.paintPreview(),this._view.isHtmlDirty=!0}paintPreview(){let e=this._outline,t=this._color,n=Gs(Eo),i=this._tip,o=this._anchor,a=this._view,s=this._previewShape;this._preview.acapSetDraw((l,c)=>{if(s)if(e.kind==="circle")aU(l,c,e.center,e.radius,t,n);else if(e.kind==="cloud"){let u=ARe(e.corner1,e.corner2,a);am(l,c,u,t,n,{closed:!0})}else am(l,c,sU(e.corner1,e.corner2),t,n,{closed:!0});Vc(l,c,i,o,t,n)})}};async function Dk(r,e,t){if(!(t!=null&&t.force)&&!ET)return;let n=Wr(),i=new QN(r.view,e,n,{previewShape:t?.previewShape,toward:t?.toward});try{let o=new Ae(P.t("jig.markup.shape.calloutAnchor"));o.useBasePoint=!1,o.jig=i;let a=await r.view.editor.getPoint(o);if(a.status!==V.OK)return;let s=a.value,l=hk(e,{x:s.x,y:s.y});i.revealCapsule();let c=await lU(i.capsule,{messageKey:"jig.markup.callout.content"});return{tip:l,anchor:{x:s.x,y:s.y},text:c||void 0}}finally{i.disposePreview()}}function Rk(r,e){nn().setSelectedId(e),r.htmlTransientManager.selectGroup(e)}function MRe(r){let{view:e,group:t,record:n,callout:i,style:o,cleanups:a,outline:s}=r,{color:l,layer:c,layoutId:u}=o,h=e.container,d=new _o({id:`${n.id}-shape-leader`,container:h,layer:c,layoutId:u});t.addCanvas(d);let p={tip:{...i.tip},anchor:{...i.anchor}},f=()=>{let y=Wb(d.canvas,h);y&&Tee(y,e.worldToScreen(p.tip),e.worldToScreen(p.anchor),n.style.color,!1,Gs(ck(n.style.lineWeight)),e,n.style.strokeWidthWcs)};f(),e.events.viewChanged.addEventListener(f),a.push(()=>e.events.viewChanged.removeEventListener(f));let m=new Xf({id:`${n.id}-shape-bubble`,color:l,text:i.text||n.text||"",fontSize:n.style.fontSize,worldPosition:p.anchor,layer:c,layoutId:u}),g=new ei({id:`${n.id}-shape-tip`,color:l,worldPosition:p.tip,layer:c,layoutId:u});return t.add(m,g),ch(e,{textHeightWcs:n.style.textHeightWcs,strokeWidthWcs:n.style.strokeWidthWcs,fontSizePx:n.style.fontSize??zb,strokeScreenPx:Gs(ck(n.style.lineWeight)),elements:[m,g],canvases:[d.canvas]}),a.push(rU({view:e,el:m.textElement,listenOn:m.element,recordId:n.id,multiline:!0})),{live:p,redraw:f,tipDot:g,bubble:m,bindGrips:()=>{a.push(Gte({view:e,tipEl:g,bubbleEl:m,state:p,constrainTip:y=>hk(s,y),onDragStart:()=>Rk(e,n.id),onLiveChange:f,onCommit:y=>{let b=nn().get(n.id);if(!b||b.geometry.type!==s.kind)return;let v=b.geometry;v.type!=="cloud"&&v.type!=="rect"&&v.type!=="circle"||wa(e,"Move Callout",()=>{var x;let w=nn().updateGeometry(n.id,{...v,callout:{tip:y.tip,anchor:y.anchor,text:((x=v.callout)==null?void 0:x.text)??i.text}});w&&Ok(e,w)})}}))}}}function Bk(r){let{view:e,recordId:t,centerEl:n,onLiveOffset:i,attached:o}=r,a={x:n.object.position.x,y:n.object.position.y},s={...a},l;return es({view:e,el:n.element,cursor:"move",useOsnap:r.useOsnap===!0,onDragStart:()=>{Rk(e,t);let c=nn().get(t);a=(c?BF(c.geometry):void 0)??{x:n.object.position.x,y:n.object.position.y},s={...a},l=o?{tip:{...o.live.tip},anchor:{...o.live.anchor}}:void 0},onMove:c=>{s=c;let u=c.x-a.x,h=c.y-a.y;i?.(u,h),ur(e,n,c),o&&l&&(o.live.tip=So(l.tip,u,h),o.live.anchor=So(l.anchor,u,h),ur(e,o.tipDot,o.live.tip),ur(e,o.bubble,o.live.anchor),o.redraw())},onCommit:()=>{let c=s.x-a.x,u=s.y-a.y;if(Math.hypot(c,u)<1e-9){i?.(0,0);return}wa(e,"Move Markup",()=>{let h=nn().get(t);if(!h)return;let d=nn().updateGeometry(t,cee(h.geometry,c,u));d&&Ok(e,d)})}})}var e6=class extends Fd{constructor(e){super(e)}primaryPoint(){let e=this.record.geometry;if(e.type==="callout")return{x:e.anchor.x,y:e.anchor.y,z:0}}subGetGripPoints(){let e=this.record.geometry;return e.type!=="callout"?[]:[new k(e.tip.x,e.tip.y,0),new k(e.anchor.x,e.anchor.y,0),new k((e.tip.x+e.anchor.x)/2,(e.tip.y+e.anchor.y)/2,0)]}subMoveGripPointsAt(e,t){let n=this.record.geometry;if(n.type!=="callout")return this;let i={...n.tip},o={...n.anchor};for(let a of e)a===0?i={x:i.x+t.x,y:i.y+t.y}:a===1?o={x:o.x+t.x,y:o.y+t.y}:a===2&&(i={x:i.x+t.x,y:i.y+t.y},o={x:o.x+t.x,y:o.y+t.y});return this.record={...this.record,geometry:{type:"callout",tip:i,anchor:o}},this}subWorldDraw(e){let t=this.record.geometry;if(t.type!=="callout")return this.emptyResult(this.createGroup());let{color:n,canvasLineWidth:i,layer:o,layoutId:a}=this.style(),s=this.createGroup(),l=[],c=[],u=e.container,h=new _o({id:`${this.record.id}-leader`,container:u,layer:o,layoutId:a});s.addCanvas(h);let d={tip:{...t.tip},anchor:{...t.anchor}},p=new Xf({id:`${this.record.id}-bubble`,color:n,text:this.record.text||this.record.comment||"Callout",fontSize:this.record.style.fontSize,worldPosition:d.anchor,layer:o,layoutId:a}),f=new ei({id:`${this.record.id}-tip`,color:n,worldPosition:d.tip,layer:o,layoutId:a}),m=new ei({id:`${this.record.id}-center`,color:n,worldPosition:{x:(d.tip.x+d.anchor.x)/2,y:(d.tip.y+d.anchor.y)/2},layer:o,layoutId:a});s.add(p,f,m),this.seedOverlaySizes(e,[p,f,m],[h.canvas]);let g=()=>{let b=Wb(h.canvas,u);b&&Tee(b,e.worldToScreen(d.tip),e.worldToScreen(d.anchor),this.record.style.color,!0,i,e,this.record.style.strokeWidthWcs,this.record.style.arrowSizeWcs)};g(),e.events.viewChanged.addEventListener(g),l.push(()=>e.events.viewChanged.removeEventListener(g)),l.push(rU({view:e,el:p.textElement,listenOn:p.element,recordId:this.record.id,multiline:!0}));let y=()=>{ur(e,m,{x:(d.tip.x+d.anchor.x)/2,y:(d.tip.y+d.anchor.y)/2})};return c.push(()=>{l.push(Gte({view:e,tipEl:f,bubbleEl:p,state:d,onDragStart:()=>Rk(e,this.record.id),onLiveChange:()=>{g(),y()},onCommit:b=>{wa(e,"Move Callout",()=>{let v=nn().updateGeometry(this.record.id,{type:"callout",tip:b.tip,anchor:b.anchor});v&&Ok(e,v)})}}),Bk({view:e,recordId:this.record.id,centerEl:m,attached:{live:d,redraw:g,tipDot:f,bubble:p}}))}),{group:s,entityIds:[],dispose:()=>{for(let b of l)try{b()}catch{}},bindGrips:()=>{for(let b of c)b()}}}},t6=class extends Fd{constructor(e){super(e)}subGetGripPoints(){return[]}subWorldDraw(e){let t=this.record.geometry;if(t.type!=="highlight")return this.emptyResult(this.createGroup());let{color:n,canvasLineWidth:i,layer:o,layoutId:a}=this.style(),s=this.createGroup(),l=[],c=e.container,u=new _o({id:`${this.record.id}-hl`,container:c,layer:o,layoutId:a});s.addCanvas(u);let h=new ei({id:`${this.record.id}-dot`,color:n,worldPosition:{x:(t.corner1.x+t.corner2.x)/2,y:(t.corner1.y+t.corner2.y)/2},layer:o,layoutId:a});s.add(h),this.seedOverlaySizes(e,[h],[u.canvas]);let d=()=>{let p=Wb(u.canvas,c);p&&kee(p,e.worldToScreen(t.corner1),e.worldToScreen(t.corner2),this.record.style.color,i,e,this.record.style.strokeWidthWcs)};return d(),e.events.viewChanged.addEventListener(d),l.push(()=>e.events.viewChanged.removeEventListener(d)),{group:s,entityIds:[],dispose:()=>{for(let p of l)try{p()}catch{}}}}},n6=class extends Fd{constructor(e){super(e)}subGetGripPoints(){let e=this.record.geometry;return e.type!=="line"&&e.type!=="arrow"?[]:[new k(e.start.x,e.start.y,0),new k(e.end.x,e.end.y,0)]}subMoveGripPointsAt(e,t){let n=this.record.geometry;if(n.type!=="line"&&n.type!=="arrow")return this;let i={...n.start},o={...n.end};for(let a of e)a===0?i={x:i.x+t.x,y:i.y+t.y}:a===1&&(o={x:o.x+t.x,y:o.y+t.y});return this.record={...this.record,geometry:n.type==="arrow"?{type:"arrow",start:i,end:o}:{type:"line",start:i,end:o}},this}subWorldDraw(e){let t=this.record.geometry;if(t.type!=="line"&&t.type!=="arrow")return this.emptyResult(this.createGroup());let{color:n,canvasLineWidth:i,layer:o,layoutId:a}=this.style(),s=this.createGroup(),l=[],c=[],u={start:{...t.start},end:{...t.end}},h=new ei({id:`${this.record.id}-dot1`,color:n,worldPosition:u.start,layer:o,layoutId:a}),d=new ei({id:`${this.record.id}-dot2`,color:n,worldPosition:u.end,layer:o,layoutId:a});s.add(h,d);let p=e.container,f=new _o({id:`${this.record.id}-stroke`,container:p,layer:o,layoutId:a});s.addCanvas(f),this.seedOverlaySizes(e,[h,d],[f.canvas]);let m={start:{...u.start},end:{...u.end}},g=t.type==="arrow",y=()=>{let x=Wb(f.canvas,p);if(!x)return;let w=e.worldToScreen(u.start),_=e.worldToScreen(u.end);x.strokeStyle=this.record.style.color;let A=ts(i,f.canvas,e,this.record.style.strokeWidthWcs);x.lineWidth=A,x.beginPath(),x.moveTo(w.x,w.y),x.lineTo(_.x,_.y),x.stroke(),g&&lh(x,w,_,this.record.style.color,$z(f.canvas,e,this.record.style.arrowSizeWcs))};y(),e.events.viewChanged.addEventListener(y),l.push(()=>e.events.viewChanged.removeEventListener(y));let b=()=>{Rk(e,this.record.id),m={start:{...u.start},end:{...u.end}}},v=()=>{let x=Math.hypot(u.start.x-m.start.x,u.start.y-m.start.y),w=Math.hypot(u.end.x-m.end.x,u.end.y-m.end.y);if(x<1e-9&&w<1e-9){y();return}wa(e,g?"Move Arrow":"Move Line",()=>{let _=nn().updateGeometry(this.record.id,g?{type:"arrow",start:{...u.start},end:{...u.end}}:{type:"line",start:{...u.start},end:{...u.end}});_&&Ok(e,_)})};return c.push(()=>{l.push(es({view:e,el:h.element,onDragStart:b,onMove:x=>{u.start=x,ur(e,h,x),y()},onCommit:v}),es({view:e,el:d.element,onDragStart:b,onMove:x=>{u.end=x,ur(e,d,x),y()},onCommit:v}))}),{group:s,entityIds:[],dispose:()=>{for(let x of l)try{x()}catch{}},bindGrips:()=>{for(let x of c)x()}}}},r6=class extends Fd{constructor(e){super(e)}subGetGripPoints(){return super.subGetGripPoints()}subWorldDraw(e){let t=this.record.geometry;if(t.type!=="cloud"&&t.type!=="rect"&&t.type!=="circle")return this.emptyResult(this.createGroup());let{color:n,canvasLineWidth:i,layer:o,layoutId:a}=this.style(),s=this.createGroup(),l=[],c=[],u,h,d={dx:0,dy:0};t.type==="cloud"?(u={x:(t.corner1.x+t.corner2.x)/2,y:(t.corner1.y+t.corner2.y)/2},h={kind:"cloud",corner1:t.corner1,corner2:t.corner2}):t.type==="rect"?(u={x:(t.corner1.x+t.corner2.x)/2,y:(t.corner1.y+t.corner2.y)/2},h={kind:"rect",corner1:t.corner1,corner2:t.corner2}):(u={...t.center},h={kind:"circle",center:t.center,radius:t.radius});let p=e.container,f=new _o({id:`${this.record.id}-shape`,container:p,layer:o,layoutId:a});s.addCanvas(f);let m=new ei({id:`${this.record.id}-dot`,color:n,worldPosition:u,layer:o,layoutId:a});s.add(m);let g=t.callout?MRe({view:e,group:s,record:this.record,callout:t.callout,style:this.style(),cleanups:l,outline:h}):void 0;this.seedOverlaySizes(e,g?[m,g.tipDot,g.bubble]:[m],[f.canvas]);let y=()=>{let b=Wb(f.canvas,p);if(!b)return;let v=this.record.style.color;if(t.type==="cloud")_Re(b,e,t.corner1,t.corner2,v,i,d,this.record.style.strokeWidthWcs);else if(t.type==="rect"){let x=sU(t.corner1,t.corner2).map(w=>({x:w.x+d.dx,y:w.y+d.dy}));am(b,e,x,v,i,{closed:!0})}else aU(b,e,{x:t.center.x+d.dx,y:t.center.y+d.dy},t.radius,v,i)};return y(),e.events.viewChanged.addEventListener(y),l.push(()=>e.events.viewChanged.removeEventListener(y)),c.push(()=>{var b;(b=g?.bindGrips)==null||b.call(g),l.push(Bk({view:e,recordId:this.record.id,centerEl:m,attached:g,useOsnap:!0,onLiveOffset:(v,x)=>{d={dx:v,dy:x},y()}}))}),{group:s,entityIds:[],dispose:()=>{for(let b of l)try{b()}catch{}},bindGrips:()=>{for(let b of c)b()}}}},i6=class extends Fd{constructor(e){super(e)}subWorldDraw(e){let t=this.record.geometry;if(t.type!=="stamp"&&t.type!=="symbol")return this.emptyResult(this.createGroup());let{color:n,layer:i,layoutId:o}=this.style(),a=this.createGroup(),s=[],l=[],c=t.type==="stamp"?t.stampId:t.symbolId,u=new BC({id:`${this.record.id}-stamp`,color:n,stampId:c,text:this.record.text,imageUrl:t.imageUrl,worldPosition:t.position,layer:i,layoutId:o});return a.add(u),this.seedOverlaySizes(e,[u],[]),l.push(()=>{s.push(Bk({view:e,recordId:this.record.id,centerEl:u}))}),{group:a,entityIds:[],dispose:()=>{for(let h of s)try{h()}catch{}},bindGrips:()=>{for(let h of l)h()}}}},o6=class extends Fd{constructor(e){super(e)}subWorldDraw(e){let t=this.record.geometry;if(t.type!=="text")return this.emptyResult(this.createGroup());let{color:n,layer:i,layoutId:o}=this.style(),a=this.createGroup(),s=[],l=[],c=new Hi({id:`${this.record.id}-badge`,color:n,text:this.record.text||"Note",fontSize:this.record.style.fontSize,worldPosition:t.position,layer:i,layoutId:o});return a.add(c),this.seedOverlaySizes(e,[c],[]),s.push(rU({view:e,el:c.element,recordId:this.record.id})),l.push(()=>{s.push(Bk({view:e,recordId:this.record.id,centerEl:c}))}),{group:a,entityIds:[],dispose:()=>{for(let u of s)try{u()}catch{}},bindGrips:()=>{for(let u of l)u()}}}};function PRe(r){switch(r.geometry.type){case"text":return new o6(r);case"line":case"arrow":return new n6(r);case"cloud":case"rect":case"circle":return new r6(r);case"highlight":return new t6(r);case"callout":return new e6(r);case"stamp":case"symbol":return new i6(r)}}var a6=class{constructor(){this.published=new Set,this.suppressingStoreRemove=!1}republishAll(e){this.clearVisuals(e,{clearStore:!1});for(let t of nn().list())this.publish(e,t)}publish(e,t){var n;let i=e,o=nn().selectedId===t.id;this.published.has(t.id)&&this.unpublish(e,t.id,{keepInStore:!0});let a=PRe(t).worldDraw(i),{group:s,entityIds:l}=a,c={entityIds:l,dispose:a.dispose},u=nn(),h=s.onSelectedChanged;s.onSelectedChanged=(f,m)=>{h?.(f,m),f?(u.setSelectedId(m.id),c.entityIds.length>0&&i.highlight(c.entityIds)):(u.selectedId===m.id&&u.setSelectedId(void 0),c.entityIds.length>0&&i.unhighlight(c.entityIds))};let d=s.onVisibleChanged;s.onVisibleChanged=(f,m)=>{d?.(f,m);for(let g of c.entityIds)i.setTransientEntityVisible(g,f)};let p=s.onDispose;s.onDispose=()=>{p?.(),c.entityIds.length>0&&i.unhighlight(c.entityIds),c.dispose(),this.published.delete(t.id),this.suppressingStoreRemove||u.removeRecord(t.id)},i.htmlTransientManager.add(s),(n=a.bindGrips)==null||n.call(a),i.isHtmlDirty=!0,this.published.add(t.id),o&&(nn().setSelectedId(t.id),i.htmlTransientManager.selectGroup(t.id))}unpublish(e,t,n){let i=n?.keepInStore===!0,o=()=>this.unpublishInternal(e,t,i);if(!i&&!Ja().isBusy){wa(e,"Delete Markup",o);return}o()}unpublishInternal(e,t,n){let i=e;this.suppressingStoreRemove=n;try{i.htmlTransientManager.has(t)?i.htmlTransientManager.remove(t):(this.published.delete(t),n||nn().removeRecord(t))}finally{this.suppressingStoreRemove=!1}i.isHtmlDirty=!0}clearVisuals(e,t){let n=t?.clearStore!==!1,i=()=>this.clearVisualsInternal(e,n);if(n&&!Ja().isBusy){wa(e,"Clear Markups",i);return}i()}clearLayout(e,t,n){let i=n?.clearStore!==!1,o=()=>{let a=nn().list().filter(s=>s.layoutId===t).map(s=>s.id);for(let s of a)this.unpublish(e,s,{keepInStore:!i});e.isHtmlDirty=!0};if(i&&!Ja().isBusy){wa(e,"Clear Markups",o);return}o()}clearVisualsInternal(e,t){let n=e;this.suppressingStoreRemove=!0;try{n.htmlTransientManager.deselectAll(),n.htmlTransientManager.clear(Gz),n.htmlTransientManager.clear(Mo),this.published.clear()}finally{this.suppressingStoreRemove=!1}t&&nn().clear({markDirty:!0}),n.isHtmlDirty=!0}forgetPublished(){this.published.clear()}select(e,t){e.htmlTransientManager.selectGroup(t),nn().setSelectedId(t)}focus(e,t){let n=ERe(e,t);n&&(e.zoomTo(n,1.5),this.select(e,t.id))}};function ERe(r,e){let t=uee(e.geometry),n=t?new ct(t.min,t.max):new ct,i=r.htmlTransientManager.getGroup(e.id);if(i){let o=[];for(let a of i.children){let s=a.element;if(s.classList.contains("ml-html-dot")||s.classList.contains("ml-html-grip"))continue;let l=s.getBoundingClientRect();l.width<=0&&l.height<=0||o.push(l)}Qke(n,o,(a,s)=>{let l=r.viewportToCanvas({x:a,y:s});return r.screenToWorld(l)})}return n.isEmpty()?void 0:n}function uh(){return Ck().presenter}eRe((r,e)=>{uh().publish(r,e)});function iQ(){Ja().clear(),Dd().clear(),nn().reset(),uh().forgetPublished(),um()}function Hc(r,e){wa(r,"Create Markup",()=>{let t={...e,style:sRe(e.style,r)};nn().upsert(t),uh().publish(r,t)})}function CRe(r,e,t){let n=nn(),i=n.get(e);return!i||!RT(i.geometry)?!1:(wa(r,"Attach Callout",()=>{let o=n.get(e);if(!o||!RT(o.geometry))return;let a={...o,text:t.text,geometry:{...o.geometry,callout:t},updatedAt:new Date().toISOString()};n.upsert(a),uh().publish(r,a)}),!0)}function oQ(r,e){let t=nn(),n=t.selectedId;n&&wa(r,"Markup Style",()=>{let i=t.get(n);if(!i)return;let o=t.updateStyle(n,e);if(!o)return;let a={...o,style:lRe(i.style,o.style,r,e)};t.upsert(a),uh().publish(r,a)})}var aQ="ml-aci-palette-styles",TRe="ml-aci-stacks--fill";var kRe=350,sQ=10,vF=56,lQ=72,IRe=`
  6249. .ml-aci-picker,
  6250. .ml-aci-stacks {
  6251. font-size: 12px;
  6252. font-family: Arial, sans-serif;
  6253. touch-action: manipulation;
  6254. }
  6255. .ml-aci-picker {
  6256. width: 100%;
  6257. box-sizing: border-box;
  6258. }
  6259. .ml-aci-palette {
  6260. margin-bottom: 6px;
  6261. }
  6262. .ml-aci-palette-large {
  6263. display: grid;
  6264. grid-template-columns: repeat(24, var(--ml-aci-cell-size, 12px));
  6265. gap: 1px;
  6266. }
  6267. .ml-aci-palette-small {
  6268. display: grid;
  6269. grid-template-columns: repeat(9, var(--ml-aci-cell-size, 12px));
  6270. gap: 1px;
  6271. }
  6272. .ml-aci-palette-gray {
  6273. display: flex;
  6274. align-items: center;
  6275. justify-content: flex-start;
  6276. gap: 4px;
  6277. }
  6278. /* Full dialog picker: stretch the large (and small) palettes to the host width. */
  6279. .ml-aci-picker .ml-aci-palette-large {
  6280. width: 100%;
  6281. grid-template-columns: repeat(24, minmax(0, 1fr));
  6282. }
  6283. .ml-aci-picker .ml-aci-palette-large .ml-aci-cell {
  6284. width: auto;
  6285. height: auto;
  6286. aspect-ratio: 1 / 1;
  6287. min-width: 0;
  6288. }
  6289. .ml-aci-picker .ml-aci-small-row {
  6290. width: 100%;
  6291. }
  6292. .ml-aci-picker .ml-aci-palette-small {
  6293. flex: 1 1 auto;
  6294. min-width: 0;
  6295. grid-template-columns: repeat(9, minmax(0, 1fr));
  6296. }
  6297. .ml-aci-picker .ml-aci-palette-small .ml-aci-cell {
  6298. width: auto;
  6299. height: auto;
  6300. aspect-ratio: 1 / 1;
  6301. min-width: 0;
  6302. }
  6303. /* Index-only picker (no ByLayer / ByBlock): keep 1\u20139 and grays on the same
  6304. * 24-column track as the large palette so cell size matches. */
  6305. .ml-aci-picker--no-special .ml-aci-small-row {
  6306. justify-content: flex-start;
  6307. }
  6308. .ml-aci-picker--no-special .ml-aci-palette-small,
  6309. .ml-aci-picker--no-special .ml-aci-palette-gray {
  6310. width: 100%;
  6311. display: grid;
  6312. grid-template-columns: repeat(24, minmax(0, 1fr));
  6313. gap: 1px;
  6314. }
  6315. .ml-aci-picker--no-special .ml-aci-palette-small .ml-aci-cell,
  6316. .ml-aci-picker--no-special .ml-aci-palette-gray .ml-aci-cell {
  6317. width: auto;
  6318. height: auto;
  6319. aspect-ratio: 1 / 1;
  6320. min-width: 0;
  6321. }
  6322. /* Session / mobile popover: 10-row grid fills the host; 1\u20139 and grays stay
  6323. * left-aligned in the same 24-column track so cell size matches. */
  6324. .ml-aci-stacks--fill {
  6325. width: 100%;
  6326. box-sizing: border-box;
  6327. }
  6328. .ml-aci-stacks--fill .ml-aci-palette-large,
  6329. .ml-aci-stacks--fill .ml-aci-palette-small,
  6330. .ml-aci-stacks--fill .ml-aci-palette-gray {
  6331. width: 100%;
  6332. display: grid;
  6333. grid-template-columns: repeat(24, minmax(0, 1fr));
  6334. gap: 1px;
  6335. justify-content: start;
  6336. }
  6337. .ml-aci-stacks--fill .ml-aci-cell {
  6338. width: auto;
  6339. height: auto;
  6340. aspect-ratio: 1 / 1;
  6341. min-width: 0;
  6342. }
  6343. .ml-aci-small-row {
  6344. display: flex;
  6345. align-items: center;
  6346. justify-content: space-between;
  6347. gap: 8px;
  6348. margin-bottom: 6px;
  6349. }
  6350. .ml-aci-small-actions {
  6351. display: flex;
  6352. flex-direction: row;
  6353. flex: 0 0 auto;
  6354. gap: 4px;
  6355. margin-left: auto;
  6356. }
  6357. .ml-aci-small-actions button {
  6358. font-size: 11px;
  6359. padding: 2px 6px;
  6360. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6361. border-radius: 4px;
  6362. background: var(--ml-ui-bg, #ffffff);
  6363. color: var(--ml-ui-text, #303133);
  6364. cursor: pointer;
  6365. }
  6366. .ml-aci-cell {
  6367. width: var(--ml-aci-cell-size, 12px);
  6368. height: var(--ml-aci-cell-size, 12px);
  6369. padding: 0;
  6370. border: 1px solid #999;
  6371. box-sizing: border-box;
  6372. cursor: pointer;
  6373. touch-action: none;
  6374. -webkit-user-select: none;
  6375. user-select: none;
  6376. -webkit-touch-callout: none;
  6377. }
  6378. .ml-aci-cell:hover {
  6379. outline: 1px solid #00a8ff;
  6380. }
  6381. .ml-aci-cell.is-selected {
  6382. outline: 2px solid var(--ml-ui-accent, #409eff);
  6383. outline-offset: -1px;
  6384. }
  6385. .ml-aci-cell.is-preview {
  6386. outline: 2px solid #00a8ff;
  6387. outline-offset: -1px;
  6388. z-index: 1;
  6389. position: relative;
  6390. }
  6391. .ml-aci-info-row {
  6392. display: flex;
  6393. align-items: center;
  6394. justify-content: space-between;
  6395. margin: 4px 0;
  6396. color: var(--ml-ui-text-muted, #606266);
  6397. }
  6398. .ml-aci-info-left {
  6399. text-align: left;
  6400. }
  6401. .ml-aci-info-right {
  6402. text-align: right;
  6403. }
  6404. .ml-aci-bottom-row {
  6405. display: flex;
  6406. align-items: stretch;
  6407. justify-content: flex-start;
  6408. gap: 8px;
  6409. margin-top: 4px;
  6410. }
  6411. .ml-aci-bottom-left {
  6412. flex: 1;
  6413. display: flex;
  6414. flex-direction: column;
  6415. gap: 2px;
  6416. }
  6417. .ml-aci-input-row {
  6418. display: flex;
  6419. align-items: center;
  6420. gap: 6px;
  6421. margin-top: 4px;
  6422. }
  6423. .ml-aci-input-row input {
  6424. flex: 1;
  6425. padding: 2px 6px;
  6426. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6427. border-radius: 4px;
  6428. background: var(--ml-ui-bg, #ffffff);
  6429. color: var(--ml-ui-text, #303133);
  6430. font-size: 12px;
  6431. font-family: Arial, sans-serif;
  6432. }
  6433. .ml-aci-preview-box {
  6434. width: 32px;
  6435. min-width: 32px;
  6436. margin-left: auto;
  6437. align-self: stretch;
  6438. border: 1px solid #666;
  6439. }
  6440. .ml-aci-loupe {
  6441. position: fixed;
  6442. z-index: 2147483000;
  6443. display: none;
  6444. flex-direction: column;
  6445. width: ${vF}px;
  6446. height: ${vF+18}px;
  6447. pointer-events: none;
  6448. border-radius: 8px;
  6449. overflow: hidden;
  6450. box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.45);
  6451. background: #1a1a1a;
  6452. color: #fff;
  6453. font-family: Arial, sans-serif;
  6454. transform: translate(-50%, -100%);
  6455. }
  6456. .ml-aci-loupe.is-visible {
  6457. display: flex;
  6458. }
  6459. .ml-aci-loupe__swatch {
  6460. flex: 1;
  6461. min-height: ${vF-2}px;
  6462. border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  6463. }
  6464. .ml-aci-loupe__label {
  6465. flex: 0 0 18px;
  6466. line-height: 18px;
  6467. font-size: 11px;
  6468. text-align: center;
  6469. background: rgba(0, 0, 0, 0.85);
  6470. }
  6471. `;function dU(){if(typeof document>"u")return;let r=document.getElementById(aQ);r||(r=document.createElement("style"),r.id=aQ,document.head.appendChild(r)),r.textContent=IRe}function pU(r){let e=new je;return e.colorIndex=r,e.cssColor||"#ffffff"}function LRe(r){let e=r.trim().toUpperCase();if(e==="BYLAYER")return 256;if(e==="BYBLOCK")return 0;if(/^\d+$/.test(e)){let n=Number(e);return n>=0&&n<=256?n:null}let t=je.fromString(e);return t?t.isByLayer?256:t.isByBlock?0:t.isByACI&&t.colorIndex!=null?t.colorIndex:null:null}function Db(r,e,t){let n=document.createElement("div");n.className=`ml-aci-palette ${e}`;for(let i of r){let o=document.createElement("button");o.type="button",o.className="ml-aci-cell",o.dataset.aci=String(i),o.style.background=pU(i),o.title=String(i),t===i&&o.classList.add("is-selected"),n.appendChild(o)}return n}function dk(r,e){r.querySelectorAll(".ml-aci-cell").forEach(t=>{let n=t,i=Number(n.dataset.aci);n.classList.toggle("is-selected",e!=null&&Number.isFinite(i)&&i===e)})}function cQ(r,e,t){let n=document.elementFromPoint(e,t);if(!n)return null;let i=n.closest(".ml-aci-cell");return!i||!r.contains(i)?null:i}function xF(r){if(!r)return null;let e=Number(r.dataset.aci);return Number.isFinite(e)?e:null}function Wte(r,e){let t=document.createElement("div");t.className="ml-aci-loupe",t.setAttribute("aria-hidden","true");let n=document.createElement("div");n.className="ml-aci-loupe__swatch";let i=document.createElement("div");i.className="ml-aci-loupe__label",t.append(n,i),document.body.appendChild(t);let o=null,a=0,s=0,l=null,c=null,u,h=!1,d=!1,p=()=>{u!=null&&(window.clearTimeout(u),u=void 0)},f=()=>{r.querySelectorAll(".ml-aci-cell.is-preview").forEach(S=>{S.classList.remove("is-preview")})},m=()=>{t.classList.remove("is-visible"),f(),c=null,h=!1},g=(S,M,T)=>{let L=xF(S);L!=null&&(f(),S.classList.add("is-preview"),c=S,n.style.background=pU(L),i.textContent=String(L),t.style.left=`${M}px`,t.style.top=`${T-lQ}px`,t.classList.add("is-visible"),h=!0)},y=(S,M)=>{let T=cQ(r,S,M);if(T){g(T,S,M);return}c&&(t.style.left=`${S}px`,t.style.top=`${M-lQ}px`)},b=(S,M)=>{if(o==null||S.pointerId!==o)return;p();let T=h,L=T?c??cQ(r,S.clientX,S.clientY):l,O=xF(L);m();try{r.releasePointerCapture(S.pointerId)}catch{}o=null,l=null,M&&O!=null&&(T&&(d=!0),e(O,S))},v=S=>{var M,T;if(S.button!==0&&S.pointerType==="mouse")return;let L=(T=(M=S.target)==null?void 0:M.closest)==null?void 0:T.call(M,".ml-aci-cell");if(!(!L||!r.contains(L))){S.preventDefault(),S.stopPropagation(),o=S.pointerId,a=S.clientX,s=S.clientY,l=L,c=L,h=!1,p();try{r.setPointerCapture(S.pointerId)}catch{}u=window.setTimeout(()=>{u=void 0,!(o==null||!l)&&g(l,a,s)},kRe)}},x=S=>{if(!(o==null||S.pointerId!==o)){if(!h&&u!=null){let M=S.clientX-a,T=S.clientY-s;M*M+T*T>sQ*sQ&&p();return}h&&(S.preventDefault(),y(S.clientX,S.clientY))}},w=S=>{b(S,!0)},_=S=>{b(S,!1)},A=S=>{var M,T;if(d){d=!1,S.preventDefault(),S.stopPropagation();return}let L=(T=(M=S.target)==null?void 0:M.closest)==null?void 0:T.call(M,".ml-aci-cell");if(!L||!r.contains(L))return;let O=xF(L);O!=null&&(S.preventDefault(),S.stopPropagation(),e(O,S))},E=S=>{(o!=null||h)&&S.preventDefault()};return r.addEventListener("pointerdown",v),r.addEventListener("pointermove",x),r.addEventListener("pointerup",w),r.addEventListener("pointercancel",_),r.addEventListener("click",A,!0),r.addEventListener("contextmenu",E),()=>{if(p(),o!=null){try{r.releasePointerCapture(o)}catch{}o=null}m(),t.remove(),r.removeEventListener("pointerdown",v),r.removeEventListener("pointermove",x),r.removeEventListener("pointerup",w),r.removeEventListener("pointercancel",_),r.removeEventListener("click",A,!0),r.removeEventListener("contextmenu",E)}}function ORe(r){dU();let e=document.createElement("div");e.className="ml-aci-stacks";let t=o=>{e.classList.toggle(TRe,o)};t(r.fill===!0);let n=(o,a)=>{dk(e,o),r.onSelect(o,a)};e.appendChild(Db(Dte,"ml-aci-palette-large",r.selectedIndex)),e.appendChild(Db(Ote,"ml-aci-palette-small",r.selectedIndex)),e.appendChild(Db(Rte,"ml-aci-palette-gray",r.selectedIndex));let i=Wte(e,n);return{root:e,setSelected:o=>dk(e,o),setFill:t,dispose:()=>i()}}function DRe(r){dU();let e=r.showByLayerByBlock!==!1,t=r.initialIndex??null,n=document.createElement("div");n.className=e?"ml-aci-picker":"ml-aci-picker ml-aci-picker--no-special";let i=b=>{var v;!e&&(b===0||b===256)||(t=b,dk(n,b),p.value=String(b),g(),(v=r.onChange)==null||v.call(r,b))};n.appendChild(Db(Dte,"ml-aci-palette-large",t));let o=document.createElement("div");if(o.className="ml-aci-small-row",o.appendChild(Db(Ote,"ml-aci-palette-small",t)),e){let b=document.createElement("div");b.className="ml-aci-small-actions";let v=document.createElement("button");v.type="button",v.textContent=r.labels.byLayer??"ByLayer",v.addEventListener("click",()=>i(256));let x=document.createElement("button");x.type="button",x.textContent=r.labels.byBlock??"ByBlock",x.addEventListener("click",()=>i(0)),b.append(v,x),o.appendChild(b)}n.appendChild(o),n.appendChild(Db(Rte,"ml-aci-palette-gray",t));let a=document.createElement("div");a.className="ml-aci-bottom-row";let s=document.createElement("div");s.className="ml-aci-bottom-left";let l=document.createElement("div");l.className="ml-aci-info-row";let c=document.createElement("span");c.className="ml-aci-info-left";let u=document.createElement("span");u.className="ml-aci-info-right",l.append(c,u),s.appendChild(l);let h=document.createElement("div");h.className="ml-aci-input-row";let d=document.createElement("span");d.textContent=r.labels.input;let p=document.createElement("input");p.placeholder=r.labels.inputPlaceholder,t!=null&&(p.value=String(t));let f=()=>{let b=LRe(p.value);if(b==null||!e&&(b===0||b===256)){p.value=t!=null?String(t):"";return}i(b)};p.addEventListener("blur",f),p.addEventListener("keydown",b=>{b.key==="Enter"&&f()}),h.append(d,p),s.appendChild(h);let m=document.createElement("div");m.className="ml-aci-preview-box",a.append(s,m),n.appendChild(a);let g=()=>{if(t==null){c.textContent=r.labels.index,u.textContent=r.labels.rgb,m.style.background="#000";return}if(c.textContent=`${r.labels.index}${t}`,t===0||t===256){u.textContent=r.labels.rgb,m.style.background="#000";return}let b=new je;b.colorIndex=t,u.textContent=`${r.labels.rgb}${b.red}, ${b.green}, ${b.blue}`,m.style.background=pU(t)};g();let y=Wte(n,b=>i(b));return{root:n,getIndex:()=>t,setIndex:b=>{t=b,dk(n,b),p.value=b!=null?String(b):"",g()},dispose:()=>y()}}var s6=class r extends tS{constructor(e){super({host:e.host,title:e.labels.title,closeLabel:e.labels.close,dialogClassName:"ml-ui-aci-color-dialog",theme:e.theme}),this.result=null,this.picker=DRe({labels:{index:e.labels.index,rgb:e.labels.rgb,input:e.labels.input,inputPlaceholder:e.labels.inputPlaceholder},initialIndex:e.initialIndex??null,showByLayerByBlock:!1}),this.bodyEl.appendChild(this.picker.root);let t=document.createElement("button");t.type="button",t.className="ml-ui-dialog-btn ml-ui-dialog-btn-secondary",t.textContent=e.labels.cancel,t.addEventListener("click",()=>{this.result=null,this.close()});let n=document.createElement("button");n.type="button",n.className="ml-ui-dialog-btn",n.textContent=e.labels.ok,n.addEventListener("click",()=>{let i=this.picker.getIndex();this.result=i!=null&&i>=1&&i<=255?i:null,this.close()}),this.footerEl.append(t,n),this.focusAfterOpen(n)}static open(e){let t=new r(e);return t.show().then(()=>t.result)}close(){this.picker.dispose(),super.close()}},uQ="ml-ui-text-height-dialog-styles",RRe=`
  6472. .ml-ui-text-height-dialog .ml-ui-text-height-options {
  6473. display: flex;
  6474. flex-direction: column;
  6475. gap: 12px;
  6476. }
  6477. .ml-ui-text-height-dialog .ml-ui-text-height-option {
  6478. display: flex;
  6479. flex-direction: column;
  6480. gap: 8px;
  6481. }
  6482. .ml-ui-text-height-dialog .ml-ui-text-height-radio {
  6483. display: flex;
  6484. align-items: center;
  6485. gap: 8px;
  6486. font-size: 14px;
  6487. cursor: pointer;
  6488. }
  6489. .ml-ui-text-height-dialog .ml-ui-text-height-radio input {
  6490. margin: 0;
  6491. }
  6492. .ml-ui-text-height-dialog .ml-ui-text-height-custom-row {
  6493. display: flex;
  6494. align-items: center;
  6495. gap: 8px;
  6496. padding-left: 24px;
  6497. }
  6498. .ml-ui-text-height-dialog .ml-ui-text-height-input {
  6499. flex: 1 1 auto;
  6500. min-width: 0;
  6501. height: 32px;
  6502. padding: 0 8px;
  6503. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6504. border-radius: 4px;
  6505. background: var(--ml-ui-bg, #fff);
  6506. color: inherit;
  6507. font-size: 13px;
  6508. box-sizing: border-box;
  6509. }
  6510. .ml-ui-text-height-dialog .ml-ui-text-height-input:disabled {
  6511. opacity: 0.55;
  6512. }
  6513. .ml-ui-text-height-dialog .ml-ui-text-height-calc {
  6514. margin-left: 24px;
  6515. padding: 10px 12px;
  6516. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6517. border-radius: 6px;
  6518. background: var(--ml-ui-bg-muted, rgba(127, 127, 127, 0.08));
  6519. display: flex;
  6520. flex-direction: column;
  6521. gap: 8px;
  6522. }
  6523. .ml-ui-text-height-dialog .ml-ui-text-height-calc[data-disabled='true'] {
  6524. opacity: 0.55;
  6525. pointer-events: none;
  6526. }
  6527. .ml-ui-text-height-dialog .ml-ui-text-height-calc-title {
  6528. font-size: 13px;
  6529. font-weight: 600;
  6530. line-height: 1.3;
  6531. }
  6532. .ml-ui-text-height-dialog .ml-ui-text-height-calc-hint {
  6533. font-size: 12px;
  6534. line-height: 1.45;
  6535. opacity: 0.78;
  6536. }
  6537. .ml-ui-text-height-dialog .ml-ui-text-height-calc-row {
  6538. display: flex;
  6539. align-items: center;
  6540. gap: 8px;
  6541. }
  6542. .ml-ui-text-height-dialog .ml-ui-text-height-calc-row .ml-ui-text-height-input {
  6543. flex: 1 1 auto;
  6544. max-width: 120px;
  6545. }
  6546. .ml-ui-text-height-dialog .ml-ui-text-height-calc-unit {
  6547. flex: 0 0 auto;
  6548. font-size: 13px;
  6549. opacity: 0.8;
  6550. }
  6551. .ml-ui-text-height-dialog .ml-ui-text-height-convert {
  6552. flex: 0 0 auto;
  6553. height: 32px;
  6554. padding: 0 12px;
  6555. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6556. border-radius: 4px;
  6557. background: var(--ml-ui-bg, #fff);
  6558. color: inherit;
  6559. font-size: 13px;
  6560. cursor: pointer;
  6561. }
  6562. .ml-ui-text-height-dialog .ml-ui-text-height-convert:disabled {
  6563. opacity: 0.55;
  6564. cursor: default;
  6565. }
  6566. `;function BRe(){if(typeof document>"u"||document.getElementById(uQ))return;let r=document.createElement("style");r.id=uQ,r.textContent=RRe,document.head.appendChild(r)}function hQ(r){if(!(r>0)||!Number.isFinite(r))return"";let e=Number(r.toPrecision(6));return String(e)}var Xte=class l6 extends tS{constructor(e){super({host:e.host,title:e.labels.title,closeLabel:e.labels.close,dialogClassName:"ml-ui-text-height-dialog",theme:e.theme}),this.result=null,BRe(),this.screenPxToWcs=e.screenPxToWcs;let t=`ml-ui-text-height-${l6.nextGroupId++}`,n=document.createElement("div");n.className="ml-ui-text-height-options";let i=document.createElement("div");i.className="ml-ui-text-height-option";let o=document.createElement("label");o.className="ml-ui-text-height-radio",this.adaptiveRadio=document.createElement("input"),this.adaptiveRadio.type="radio",this.adaptiveRadio.name=t,this.adaptiveRadio.value="adaptive",o.append(this.adaptiveRadio,document.createTextNode(e.labels.adaptive)),i.appendChild(o);let a=document.createElement("div");a.className="ml-ui-text-height-option";let s=document.createElement("label");s.className="ml-ui-text-height-radio",this.customRadio=document.createElement("input"),this.customRadio.type="radio",this.customRadio.name=t,this.customRadio.value="custom",s.append(this.customRadio,document.createTextNode(e.labels.custom));let l=document.createElement("div");l.className="ml-ui-text-height-custom-row",this.customInput=document.createElement("input"),this.customInput.type="number",this.customInput.min="0",this.customInput.step="any",this.customInput.className="ml-ui-text-height-input",this.customInput.placeholder=e.labels.customPlaceholder,l.appendChild(this.customInput),this.calcPanel=document.createElement("div"),this.calcPanel.className="ml-ui-text-height-calc";let c=document.createElement("div");c.className="ml-ui-text-height-calc-title",c.textContent=e.labels.fromScreen;let u=document.createElement("div");u.className="ml-ui-text-height-calc-hint",u.textContent=e.labels.fromScreenHint;let h=document.createElement("div");h.className="ml-ui-text-height-calc-row",this.screenPxInput=document.createElement("input"),this.screenPxInput.type="number",this.screenPxInput.min="1",this.screenPxInput.step="1",this.screenPxInput.className="ml-ui-text-height-input",this.screenPxInput.placeholder=e.labels.screenPxPlaceholder;let d=document.createElement("span");d.className="ml-ui-text-height-calc-unit",d.textContent=e.labels.screenUnit,this.convertButton=document.createElement("button"),this.convertButton.type="button",this.convertButton.className="ml-ui-text-height-convert",this.convertButton.textContent=e.labels.convert,h.append(this.screenPxInput,d,this.convertButton),this.calcPanel.append(c,u,h),a.append(s,l,this.calcPanel),n.append(i,a),this.bodyEl.appendChild(n);let p=e.initialMode??"adaptive";this.adaptiveRadio.checked=p==="adaptive",this.customRadio.checked=p==="custom",e.initialTextHeightWcs!=null&&e.initialTextHeightWcs>0&&(this.customInput.value=hQ(e.initialTextHeightWcs)),e.initialFontSizePx!=null&&e.initialFontSizePx>0&&(this.screenPxInput.value=String(Math.round(e.initialFontSizePx)));let f=()=>{let y=this.customRadio.checked;this.customInput.disabled=!y,this.screenPxInput.disabled=!y,this.convertButton.disabled=!y,this.calcPanel.dataset.disabled=y?"false":"true"};this.adaptiveRadio.addEventListener("change",f),this.customRadio.addEventListener("change",f),f(),this.convertButton.addEventListener("click",()=>this.applyScreenPx()),this.screenPxInput.addEventListener("keydown",y=>{y.key==="Enter"&&(y.preventDefault(),this.applyScreenPx())});let m=document.createElement("button");m.type="button",m.className="ml-ui-dialog-btn ml-ui-dialog-btn-secondary",m.textContent=e.labels.cancel,m.addEventListener("click",()=>this.close());let g=document.createElement("button");g.type="button",g.className="ml-ui-dialog-btn ml-ui-dialog-btn-primary",g.textContent=e.labels.ok,g.addEventListener("click",()=>this.confirm()),this.footerEl.append(m,g)}static open(e){let t=new l6(e);return t.show().then(()=>t.result)}confirm(){if(this.adaptiveRadio.checked){this.result={mode:"adaptive"},this.close();return}let e=Number(this.customInput.value);if(!(e>0)||!Number.isFinite(e)){this.customInput.focus();return}this.result={mode:"custom",textHeightWcs:e},this.close()}applyScreenPx(){if(!this.customRadio.checked)return;let e=Number(this.screenPxInput.value);if(!(e>0)||!Number.isFinite(e)){this.screenPxInput.focus();return}let t=this.screenPxToWcs(e);if(!(t>0)||!Number.isFinite(t)){this.screenPxInput.focus();return}this.customInput.value=hQ(t),this.customInput.focus(),this.customInput.select()}};Xte.nextGroupId=0;var FRe=Xte;async function NRe(r){return FRe.open({host:r.view.container,theme:Jo(r.view.container),initialMode:r.initialMode,initialFontSizePx:r.initialFontSizePx,initialTextHeightWcs:r.initialTextHeightWcs,screenPxToWcs:e=>Ci(e,r.view),labels:{title:P.t("main.textHeight.title"),close:P.t("main.textHeight.close"),ok:P.t("main.textHeight.ok"),cancel:P.t("main.textHeight.cancel"),adaptive:P.t("main.textHeight.adaptive"),custom:P.t("main.textHeight.custom"),customPlaceholder:P.t("main.textHeight.customPlaceholder"),fromScreen:P.t("main.textHeight.fromScreen"),fromScreenHint:P.t("main.textHeight.fromScreenHint"),screenPxPlaceholder:P.t("main.textHeight.screenPxPlaceholder"),screenUnit:P.t("main.textHeight.screenUnit"),convert:P.t("main.textHeight.convert")}})}function zRe(r){let e=r.fontSizePx>0&&Number.isFinite(r.fontSizePx)?r.fontSizePx:13;if(r.hasSelection){let t=r.selectedTextHeightWcs!=null&&r.selectedTextHeightWcs>0?r.selectedTextHeightWcs:Ci(e,r.view);return{initialMode:"custom",initialFontSizePx:Math.max(1,Math.round(Yz(t,r.view))),initialTextHeightWcs:t}}return{initialMode:r.sessionMode,initialFontSizePx:e,initialTextHeightWcs:r.sessionMode==="custom"&&r.selectedTextHeightWcs!=null&&r.selectedTextHeightWcs>0?r.selectedTextHeightWcs:void 0}}function URe(r,e,t){return e.mode==="custom"&&e.textHeightWcs!=null?{textHeightMode:"custom",fontSize:Math.max(1,Math.round(Yz(e.textHeightWcs,r))),textHeightWcs:e.textHeightWcs}:{textHeightMode:"adaptive",fontSize:t}}var dQ="ml-draw-style-session-accessory-styles",jRe=`
  6567. .ml-draw-style-toolbar__controls {
  6568. display: flex;
  6569. align-items: center;
  6570. gap: 8px;
  6571. }
  6572. .ml-draw-style-toolbar__swatch {
  6573. position: relative;
  6574. width: 28px;
  6575. height: 28px;
  6576. padding: 0;
  6577. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6578. border-radius: 4px;
  6579. background: var(--ml-ui-bg, #fff);
  6580. cursor: pointer;
  6581. }
  6582. .ml-draw-style-toolbar__swatch-fill {
  6583. display: block;
  6584. width: 14px;
  6585. height: 14px;
  6586. margin: 0 auto;
  6587. border-radius: 50%;
  6588. border: 1px solid #666;
  6589. }
  6590. .ml-draw-style-toolbar__text-height {
  6591. width: 28px;
  6592. height: 28px;
  6593. padding: 0;
  6594. display: inline-flex;
  6595. align-items: center;
  6596. justify-content: center;
  6597. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6598. border-radius: 4px;
  6599. background: var(--ml-ui-bg, #fff);
  6600. color: inherit;
  6601. cursor: pointer;
  6602. box-sizing: border-box;
  6603. }
  6604. .ml-draw-style-toolbar__text-height .ml-ex-ui-icon {
  6605. display: inline-flex;
  6606. width: 18px;
  6607. height: 18px;
  6608. }
  6609. .ml-draw-style-toolbar__text-height .ml-ex-ui-icon svg {
  6610. width: 18px;
  6611. height: 18px;
  6612. }
  6613. .ml-draw-style-toolbar__color {
  6614. position: relative;
  6615. }
  6616. .ml-draw-style-toolbar__color-panel {
  6617. display: none;
  6618. position: absolute;
  6619. top: calc(100% + 6px);
  6620. left: 0;
  6621. z-index: 1;
  6622. padding: 8px;
  6623. border: 1px solid var(--ml-ui-border, #dcdfe6);
  6624. border-radius: 6px;
  6625. background: var(--ml-ui-bg, rgba(255, 255, 255, 0.98));
  6626. box-shadow: var(--ml-ui-shadow, 0 4px 12px rgba(0, 0, 0, 0.16));
  6627. --ml-aci-cell-size: 11px;
  6628. }
  6629. .ml-draw-style-toolbar__color-panel.is-open {
  6630. display: block;
  6631. }
  6632. .ml-draw-style-toolbar__color-panel--drop-up {
  6633. top: auto;
  6634. bottom: calc(100% + 6px);
  6635. }
  6636. `;function pQ(r){let e=new je;return e.colorIndex=r,e}function fQ(r){if(r.isByACI&&r.colorIndex!=null&&r.colorIndex>=1)return r.colorIndex}function VRe(){if(dU(),typeof document>"u")return;let r=document.getElementById(dQ);r||(r=document.createElement("style"),r.id=dQ,document.head.appendChild(r)),r.textContent=jRe}var c6=class{constructor(e){this.view=e,this.mobileMounted=!1,this.colorPanelOpen=!1,this.colorDialogOpen=!1,this.textHeightDialogOpen=!1,this.onLocaleChanged=()=>this.relabel(),this.selectionUnsubscribe=null,VRe(),this.colorWrap=document.createElement("div"),this.colorWrap.className="ml-draw-style-toolbar__color",this.swatch=document.createElement("button"),this.swatch.type="button",this.swatch.className="ml-draw-style-toolbar__swatch",this.swatchFill=document.createElement("span"),this.swatchFill.className="ml-draw-style-toolbar__swatch-fill",this.swatch.appendChild(this.swatchFill),this.colorPanel=document.createElement("div"),this.colorPanel.className="ml-draw-style-toolbar__color-panel",this.aciStacks=ORe({onSelect:t=>{this.applyColor(pQ(t)),this.hideColorPanel()}}),this.colorPanel.appendChild(this.aciStacks.root),this.colorWrap.appendChild(this.swatch),this.colorWrap.appendChild(this.colorPanel),this.textHeightButton=document.createElement("button"),this.textHeightButton.type="button",this.textHeightButton.className="ml-draw-style-toolbar__text-height",this.textHeightButton.appendChild(Ll(L3e)),this.controlsRow=document.createElement("div"),this.controlsRow.className="ml-draw-style-toolbar__controls",this.controlsRow.setAttribute("role","toolbar"),zs(Jo(e.container),this.controlsRow),this.controlsRow.append(this.colorWrap,this.textHeightButton),this.swatch.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.openSessionColorDialog()}),this.textHeightButton.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.openTextHeightDialog()}),this.controlsRow.addEventListener("pointerdown",t=>t.stopPropagation()),this.controlsRow.addEventListener("mousedown",t=>t.stopPropagation()),this.onDocumentPointerDown=t=>{let n=t.target,i=!!n&&this.colorWrap.contains(n);this.colorPanelOpen&&(i||(this.hideColorPanel(),t.preventDefault(),t.stopPropagation()))},document.addEventListener("pointerdown",this.onDocumentPointerDown,!0),P.events.localeChanged.addEventListener(this.onLocaleChanged),this.relabel()}setSelectionUnsubscribe(e){var t;(t=this.selectionUnsubscribe)==null||t.call(this),this.selectionUnsubscribe=e}setActiveKind(e){this.kind=e,this.controlsRow.isConnected&&this.syncFromSession()}dispose(){var e;this.hideColorPanel(),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),P.events.localeChanged.removeEventListener(this.onLocaleChanged),this.unmount(),(e=this.selectionUnsubscribe)==null||e.call(this),this.selectionUnsubscribe=null,this.view.sessionProviders.get(Bb)===this&&this.view.sessionProviders.delete(Bb),this.aciStacks.dispose()}createSessionAccessory(){return{id:"draw-style",mount:e=>this.mount(e.host),unmount:()=>this.unmount()}}mount(e){this.mobileMounted=e.classList.contains("ml-mobile-cmd-accessory-content")||e.classList.contains("ml-mobile-cmd-accessory")||!!e.closest(".ml-mobile-cmd"),this.hideColorPanel(),this.mobileMounted?this.colorPanel.classList.add("ml-draw-style-toolbar__color-panel--drop-up"):this.colorPanel.classList.remove("ml-draw-style-toolbar__color-panel--drop-up"),e.appendChild(this.controlsRow),this.relabel(),this.syncFromSession()}unmount(){this.controlsRow.isConnected&&(this.mobileMounted=!1,this.hideColorPanel(),this.colorPanel.classList.remove("ml-draw-style-toolbar__color-panel--drop-up"),this.controlsRow.remove())}relabel(){this.swatch.title=P.t("main.drawStyle.color"),this.textHeightButton.title=P.t("main.drawStyle.fontSize"),this.textHeightButton.setAttribute("aria-label",P.t("main.drawStyle.fontSize"))}syncFromSession(){if(this.kind==="measure"){let n=lJ(),i=Fr().workingDatabase,o=n?.color??(i?Hs(i):Pee("#7b8794"));this.paint(o);return}let e=nn().selectedId?nn().get(nn().selectedId):void 0,t=e?jte(e.style.color):Wr();this.paint(t)}paint(e){let t=Vs(e);this.swatchFill.style.background=t,this.aciStacks.setSelected(fQ(e))}applyColor(e){if(this.swatchFill.style.background=Vs(e),this.aciStacks.setSelected(fQ(e)),this.kind==="measure"){yIe(e),cJ(this.view,{color:e});return}oRe(e),oQ(this.view,{color:Ub(e)})}hideColorPanel(){this.clearColorLeaveTimer(),this.colorPanelOpen=!1,this.colorPanel.classList.remove("is-open")}async openSessionColorDialog(){if(!this.colorDialogOpen){this.colorDialogOpen=!0,this.hideColorPanel();try{let e=this.aciStacks.root.querySelector(".ml-aci-cell.is-selected"),t=e?Number(e.dataset.aci):null,n=await s6.open({host:this.view.container,theme:Jo(this.view.container),initialIndex:t!=null&&Number.isFinite(t)?t:null,labels:{title:P.t("main.colorPicker.title"),close:P.t("main.colorPicker.close"),ok:P.t("main.colorPicker.ok"),cancel:P.t("main.colorPicker.cancel"),index:P.t("main.colorPicker.index"),rgb:P.t("main.colorPicker.rgb"),input:P.t("main.colorPicker.input"),inputPlaceholder:P.t("main.colorPicker.inputPlaceholder")}});n!=null&&this.applyColor(pQ(n))}finally{this.colorDialogOpen=!1}}}clearColorLeaveTimer(){this.colorLeaveTimer!=null&&(window.clearTimeout(this.colorLeaveTimer),this.colorLeaveTimer=void 0)}async openTextHeightDialog(){var e;if(!(this.textHeightDialogOpen||this.kind==null)){this.textHeightDialogOpen=!0,this.hideColorPanel();try{let t=this.kind==="measure",n=t?lJ():void 0,i=nn().selectedId,o=!t&&i?nn().get(i):void 0,a=n!=null||o!=null,s=t?n?.textHeightMode??bIe():o?.style.textHeightMode??rRe(),l=t?n?.fontSize??Hb():o?.style.fontSize??Ol(),c=Tk(),u=t?a?n?.textHeightWcs??(c?(e=om(c))==null?void 0:e.style.textHeightWcs:void 0):vIe():a?o?.style.textHeightWcs:iRe(),h=zRe({hasSelection:a,sessionMode:s??"adaptive",fontSizePx:l,selectedTextHeightWcs:u,view:this.view}),d=await NRe({view:this.view,...h});if(!d)return;let p=URe(this.view,d,h.initialFontSizePx);t?(xIe(p.textHeightMode,p.textHeightMode==="custom"?p.textHeightWcs??p.fontSize:p.fontSize),cJ(this.view,p)):(aRe(p.textHeightMode,p.textHeightMode==="custom"?p.textHeightWcs??p.fontSize:p.fontSize),oQ(this.view,p))}finally{this.textHeightDialogOpen=!1}}}};function GRe(r){let e=null,t=()=>{let h=Y.tryGetInstance();if(!h)return{undo:!1,redo:!1,erase:!1};let d=h.curDocument,p=h.curView,f=d?.database,m=f!=null?Dd().canUndo(f):!1,g=f!=null?Dd().canRedo(f):!1,y=!!(p&&(p.selectionSet.count>0||p.htmlTransientManager.hasSelection()));return{undo:m,redo:g,erase:y}},n=()=>{let h=Y.tryGetInstance();if(!h)return;let d=h.curView;if(d&&!d.editor.isActive){let p=!1,f=d.htmlTransientManager;if(f.hasSelection()){let m=f.getSelectedGroups(),g=m.filter(y=>y.layer===Ln);g.length>0&&Ws(d,"Delete Measurement",()=>{for(let y of g)f.detach(y.id)&&(p=!0)}),(m.some(y=>y.layer!==Ln)||m.length===0&&f.hasSelection())&&wa(d,"Delete Markup",()=>{p=f.deleteSelected()||p})}if(p){d.isHtmlDirty=!0,r.syncActionState();return}}h.sendStringToExecute("erase")},i=h=>{if(e?.(),e=null,!h)return;let d=()=>r.syncActionState(),{selectionSet:p}=h;p.events.selectionAdded.addEventListener(d),p.events.selectionRemoved.addEventListener(d),e=()=>{p.events.selectionAdded.removeEventListener(d),p.events.selectionRemoved.removeEventListener(d)}},o=()=>r.syncActionState(),a=()=>{let h=Y.tryGetInstance();h&&(i(h.curView),r.syncActionState())},s=()=>r.syncActionState();r.setActions({undo:()=>Y.instance.sendStringToExecute("undo"),redo:()=>Y.instance.sendStringToExecute("redo"),erase:n}),r.setActionStateProvider(t);let l=(h=0)=>{let d=Y.tryGetInstance();if(!d){h<20&&queueMicrotask(()=>l(h+1));return}d.events.documentActivated.addEventListener(a),i(d.curView),r.syncActionState()};Gt.on("undo-stack-changed",o);let c=nn().subscribe(s),u=Dee(s);return l(),()=>{Gt.off("undo-stack-changed",o),c(),u(),e?.();let h=Y.tryGetInstance();h?.events.documentActivated.removeEventListener(a),r.setActionStateProvider(void 0)}}function Yte(r){let e=r.view.sessionProviders.get(Bb);if(e)return e;$te(r.view);let t=new c6(r.view);return t.setSelectionUnsubscribe(WRe(r.view,r.commandManager,t)),r.view.sessionProviders.set(Bb,t),t}function HRe(r){return r.sessionProviders.get(Bb)}function $te(r){let e=r.sessionProviders.get($N);if(e)return e;let t=new KN({container:r.container}),n=GRe(t),i=t.dispose.bind(t);return t.dispose=()=>{n(),i()},r.sessionProviders.set($N,t),t}function WRe(r,e,t){let n=$te(r),i=!1,o=null,a=()=>{i&&(o?.unmount(),o=null,i=!1,n.setAccessoryActive(!1))},s=()=>{i||(o=t.createSessionAccessory(),o.mount({host:n.accessoryHost,type:"desktop",view:r}),i=!0,n.setAccessoryActive(!0))},l=()=>{var m;let g=XRe(e);t.setActiveKind(g),r.selectionSessionAccessory=null,n.setExtensionItems([]);let y=iU((m=e.activeCommand)==null?void 0:m.globalName)!=null,b=Tk()!=null,v=nn().selectedId!=null,x=b||v;n.isVisible&&g!=null&&Fte(g)&&(y&&!Rd()||!y&&x)?s():a()},c=nn().subscribe(l),u=Dee(l),h=m=>{(m.key==="isShowRibbon"||m.key==="isShowShortCutToolbar")&&l()},d=()=>l(),p=()=>{queueMicrotask(()=>l())},f=Ik(()=>l());return hr.instance.events.modified.addEventListener(h),r.editor.events.commandWillStart.addEventListener(d),r.editor.events.commandEnded.addEventListener(p),l(),()=>{c(),u(),f(),hr.instance.events.modified.removeEventListener(h),r.editor.events.commandWillStart.removeEventListener(d),r.editor.events.commandEnded.removeEventListener(p),a(),n.setExtensionItems([]),r.selectionSessionAccessory&&(r.selectionSessionAccessory=null)}}function XRe(r){var e;return JDe({commandKind:iU((e=r.activeCommand)==null?void 0:e.globalName),markupSelected:nn().selectedId!=null,measurementSelected:Tk()!=null})}var YRe=64,mQ=class Ad{static clearCache(){this._cache.clear(),this._cacheDocId=void 0}static bindDocListener(){this._docListenerBound||(this._docListenerBound=!0,Y.instance.events.documentActivated.addEventListener(()=>{this.clearCache()}))}capture(e,t=YRe){Ad.bindDocListener();let n=e.trim();if(!n)return;let i=Y.instance.curDocument,o=i?.database,a=Y.instance.curView;if(!o||!a)return;let s=i.database.tables.blockTable.modelSpace.objectId;Ad._cacheDocId!==s&&(Ad._cache.clear(),Ad._cacheDocId=s);let l=o.tables.blockTable.getAt(n);if(!l||l.isXref)return;let c=`${s}\0${l.objectId}\0${t}`,u=Ad._cache.get(c);if(u)return u;let h=this.fromStoredIcon(l);if(h)return Ad._cache.set(c,h),h;let d=this.fromGeometry(l,a,t);return d&&Ad._cache.set(c,d),d}fromStoredIcon(e){var t;if((t=e.previewIcon)!=null&&t.length)return Kg(e.previewIcon)}fromGeometry(e,t,n){let i=t.renderer,o=null;try{let a=new pn(e.name);a.database=e.database;let s=a.worldDraw(i);if(s)o=s;else{let c=new je;c.setForeground(),o=Nr.instance.draw(i,e,c,[],!1)}if(!o)return;o.syncDraw();let l=i.renderEntityPreview(o,{width:n,height:n,margin:1.15,localLineResolutionOnly:!0,viewportSize:{width:t.width,height:t.height},onRestored:()=>{t.isDirty=!0}});return l?l.canvas.toDataURL("image/png"):void 0}catch(a){console.warn("[BlockPreview] Failed to capture",e.name,a);return}finally{o?.dispose()}}};mQ._cache=new Map,mQ._docListenerBound=!1;var $Re=.92,u6=class{constructor(e="png"){this._format=e}get format(){return this._format}async convert(e,t){let n=this.logTag,i=Y.instance.curView;await i.waitUntilIdle()||console.warn(`[${n}] Timed out waiting for scene idle; exporting current geometry`);let o=i.activeLayoutView,a=i.renderer,s=a.internalRenderer,l=i.internalScene,c=i.internalCamera;if(!l||!c||!o){console.error(`[${n}] Scene or camera not available`);return}let u=i.width/Math.max(i.height,1),h=e?this.getBoundsAspect(e):u,d=Math.max(1,Math.round(i.width)),p=Math.max(1,Math.round(i.height));if(t&&t>0){let L=this.resolveOutputSize(t,h);d=L.width,p=L.height}let f=e?{width:d,height:p}:this.resolveRenderSizeForCenterCrop(d,p,u),m=f.width,g=f.height,y=!e&&(m!==d||g!==p),b=c.zoom,v=c.position.clone(),x=c.left,w=c.right,_=c.top,A=c.bottom,E=s.getScissorTest(),S=s.getPixelRatio(),M=s.getRenderTarget(),T;try{e&&o.applyExportCamera(e,m,g),s.setPixelRatio(1),a.updateLineResolution(m,g),T=new Go(m,g,{minFilter:xi,magFilter:xi,format:oi,type:pa}),s.setRenderTarget(T),s.setViewport(0,0,m,g),s.setScissorTest(!1),o.renderObject(l);let L=new Uint8Array(m*g*4);s.readRenderTargetPixels(T,0,0,m,g,L);let O=this.flipPixelsVertically(L,m,g),D=y?this.cropPixelsCentered(O,m,g,d,p):O,z=this.createCanvasFromPixels(D,d,p);this.createFileAndDownloadIt(z,D,d,p)}finally{s.setRenderTarget(M),T?.dispose(),c.zoom=b,c.position.copy(v),c.left=x,c.right=w,c.top=_,c.bottom=A,c.updateProjectionMatrix(),s.setPixelRatio(S),a.setSize(i.width,i.height),s.setScissorTest(E),a.syncCameraZoom(b),o.render(i.cadScene),i.isDirty=!0}}get logTag(){switch(this._format){case"jpeg":return"JPGOUT";case"bmp":return"BMPOUT";default:return"PNGOUT"}}get fileExtension(){return this._format==="jpeg"?"jpg":this._format}resolveOutputSize(e,t){let n=Math.max(1,Math.round(e)),i=Number.isFinite(t)&&t>Number.EPSILON?t:1;return i>=1?{width:n,height:Math.max(1,Math.round(n/i))}:{width:Math.max(1,Math.round(n*i)),height:n}}resolveRenderSizeForCenterCrop(e,t,n){let i=Number.isFinite(n)&&n>Number.EPSILON?n:1,o=e/Math.max(t,1);return Math.abs(o-i)<1e-6?{width:e,height:t}:i>o?{width:Math.max(e,Math.ceil(t*i)),height:t}:{width:e,height:Math.max(t,Math.ceil(e/i))}}cropPixelsCentered(e,t,n,i,o){if(t===i&&n===o)return e;let a=Math.floor((t-i)/2),s=Math.floor((n-o)/2),l=new Uint8Array(i*o*4);for(let c=0;c<o;c++){let u=((c+s)*t+a)*4,h=u+i*4,d=c*i*4;l.set(e.subarray(u,h),d)}return l}getBoundsAspect(e){let t=new Ut;e.getSize(t);let n=Math.max(Math.abs(t.x),Number.EPSILON),i=Math.max(Math.abs(t.y),Number.EPSILON);return n/i}flipPixelsVertically(e,t,n){let i=new Uint8Array(t*n*4);for(let o=0;o<n;o++){let a=(n-1-o)*t*4,s=o*t*4;for(let l=0;l<t*4;l++)i[s+l]=e[a+l]}return i}createCanvasFromPixels(e,t,n){let i=document.createElement("canvas");i.width=t,i.height=n;let o=i.getContext("2d"),a=o.createImageData(t,n);return a.data.set(e),o.putImageData(a,0,0),i}createFileAndDownloadIt(e,t,n,i){let o=Y.instance.curDocument,a=Bte(o.fileName||o.docTitle,this.fileExtension),s=this.encodeDataUrl(e,t,n,i),l=document.createElement("a");l.href=s,l.download=a,document.body.appendChild(l),l.click(),document.body.removeChild(l)}encodeDataUrl(e,t,n,i){switch(this._format){case"jpeg":return this.canvasToJpegDataUrl(e);case"bmp":return this.encodeBmpDataUrl(t,n,i);default:return e.toDataURL("image/png")}}canvasToJpegDataUrl(e){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");return n.fillStyle="#ffffff",n.fillRect(0,0,t.width,t.height),n.drawImage(e,0,0),t.toDataURL("image/jpeg",$Re)}encodeBmpDataUrl(e,t,n){let i=Math.ceil(t*3/4)*4,o=i*n,a=54+o,s=new ArrayBuffer(a),l=new DataView(s),c=new Uint8Array(s);l.setUint16(0,19778,!0),l.setUint32(2,a,!0),l.setUint32(10,54,!0),l.setUint32(14,40,!0),l.setInt32(18,t,!0),l.setInt32(22,n,!0),l.setUint16(26,1,!0),l.setUint16(28,24,!0),l.setUint32(34,o,!0);let u=54;for(let h=n-1;h>=0;h--){let d=h*t*4;for(let p=0;p<t;p++){let f=d+p*4,m=(e[f+3]??255)/255,g=1-m;c[u++]=Math.round((e[f+2]??0)*m+255*g),c[u++]=Math.round((e[f+1]??0)*m+255*g),c[u++]=Math.round((e[f]??0)*m+255*g)}u+=i-t*3}return`data:image/bmp;base64,${this.bytesToBase64(c)}`}bytesToBase64(e){let t=[];for(let n=0;n<e.length;n+=32768){let i=e.subarray(n,n+32768);t.push(String.fromCharCode(...i))}return btoa(t.join(""))}},gQ=1024,W1=class extends xt{constructor(e,t){super(),this._format=e,this._jigKey=t}async execute(e){let t=new u6(this._format),n=Y.instance.curView;this.syncActiveLayoutViewSize(n);let i=new R1(P.t(`jig.${this._jigKey}.boundsFirstCorner`),P.t(`jig.${this._jigKey}.boundsSecondCorner`));i.disableOSnap=!0,i.allowNone=!0;let o=await Y.instance.editor.getBox(i),a;if(o.status===V.OK&&o.value)a=o.value;else if(o.status===V.None){let u=await this.resolveDefaultExportBounds(n);if(!u)return;a=u}else return;let s=new Gr(P.t(`jig.${this._jigKey}.longSidePrompt`));s.allowNone=!0,s.allowNegative=!1,s.allowZero=!1,s.defaultValue=gQ,s.useDefaultValue=!0;let l=await Y.instance.editor.getDouble(s);if(l.status===V.Cancel||l.status===V.Error)return;let c=l.status===V.OK&&l.value!==void 0?l.value:gQ;await t.convert(a,c)}async resolveDefaultExportBounds(e){return await e.waitUntilIdle(),WDe(e,Y.instance.curDocument.database)}syncActiveLayoutViewSize(e){let t=e.activeLayoutView;t&&t.resize(e.width,e.height)}},h6=class extends W1{constructor(){super("bmp","bmpout")}},d6=class{convert(){let e=Y.instance.curDocument,t=e.database.dxfOut(void 0,6),n=this.getBaseName(e.fileName||e.docTitle);this.createFileAndDownloadIt(t,`${n}.dxf`)}createFileAndDownloadIt(e,t){let n=typeof e=="string"?e:new Uint8Array(e),i=new Blob([n],{type:"application/dxf;charset=utf-8"}),o=URL.createObjectURL(i),a=document.createElement("a");a.href=o,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o)}getBaseName(e){return(e?.trim()||"drawing").replace(/\.[^.]+$/,"")||"drawing"}},p6=class extends xt{async execute(e){await this.withBusyIndicator(()=>{new d6().convert()},P.t("main.message.exportingDxf"))}},f6=class extends W1{constructor(){super("jpeg","jpgout")}},m6=class extends W1{constructor(){super("png","pngout")}},g6=class{export(e,t){let n=this.capture(e,t);return n.ok?this.downloadDataUrl(n.dataUrl)?{ok:!0,exportedCount:n.exportedCount,skippedCount:n.skippedCount}:{ok:!1,reason:"download-failed"}:n.reason==="no-entities"?{ok:!1,reason:"no-bounds"}:n.reason==="download-failed"?{ok:!1,reason:"capture-failed"}:{ok:!1,reason:n.reason}}capture(e,t){if(e.length===0)return{ok:!1,reason:"no-entities"};let n=Y.instance.curView,i=n.cadScene,o=i.findPreviewableEntityIds(e,"all").length,a=e.length-o,s=i.computeEntityPreviewBounds2d(e,1.1,"all")??null;if(!s)return console.warn("[ENTPREVIEW] Failed to compute preview bounds",e),{ok:!1,reason:"no-bounds"};let l=this.resolveOutputSize(t,this.getBoundsAspect(s)),c=l.width,u=l.height,h=i.createEntityPreviewRoot(e,{scope:"all"});if(!h)return console.warn("[ENTPREVIEW] Failed to build preview geometry",`${e.length} requested entity ids`),{ok:!1,reason:"no-preview-root"};let d=n.renderer;try{let p=d.renderEntityPreview(h,{width:c,height:u,bounds:s,margin:1,viewportSize:{width:n.width,height:n.height},localLineResolutionOnly:!0,onRestored:()=>{n.isDirty=!0}});return p?{ok:!0,dataUrl:p.canvas.toDataURL("image/png"),exportedCount:o,skippedCount:a}:{ok:!1,reason:"capture-failed"}}catch(p){return console.error("[ENTPREVIEW] Failed to render preview image",p),{ok:!1,reason:"capture-failed"}}finally{hb(h)}}resolveOutputSize(e,t){let n=Math.max(1,Math.round(e)),i=Number.isFinite(t)&&t>Number.EPSILON?t:1;return i>=1?{width:n,height:Math.max(1,Math.round(n/i))}:{width:Math.max(1,Math.round(n*i)),height:n}}getBoundsAspect(e){let t=new Ut;e.getSize(t);let n=Math.max(Math.abs(t.x),Number.EPSILON),i=Math.max(Math.abs(t.y),Number.EPSILON);return n/i}downloadDataUrl(e){try{let t=Y.instance.curDocument,n=Bte(t.fileName||t.docTitle,"png","entity-preview"),i=document.createElement("a");return i.href=e,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i),!0}catch(t){return console.error("[ENTPREVIEW] Failed to download preview PNG",t),!1}}},yQ=512,y6=class extends xt{constructor(){super(),this.mode=at.Read}async execute(e){let t=e.view.selectionSet,n=t.count>0?t.ids:[];if(n.length===0){let c=new Bd(P.sysCmdPrompt("entout")),u=await Y.instance.editor.getSelection(c);if(u.status!==V.OK||!u.value||u.value.count===0)return;n=u.value.ids}let i=new Gr(P.t("jig.entout.longSidePrompt"));i.allowNone=!0,i.allowNegative=!1,i.allowZero=!1,i.defaultValue=yQ,i.useDefaultValue=!0;let o=await Y.instance.editor.getDouble(i);if(o.status===V.Cancel||o.status===V.Error)return;let a=o.status===V.OK&&o.value!==void 0?o.value:yQ,s=Y.instance.curView;this.syncActiveLayoutViewSize(s);let l=await this.withBusyIndicator(()=>new g6().export(n,a),P.t("main.message.exportingEntityPreview"));if(l.ok){let c=`${l.exportedCount} ${P.t("jig.entout.exported")}`;l.skippedCount>0&&(c+=`, ${l.skippedCount} ${P.t("jig.entout.skipped")}`),this.showMessage(c,"success");return}this.showMessage(P.t(`jig.entout.failed.${l.reason}`),"error")}syncActiveLayoutViewSize(e){let t=e.activeLayoutView;t&&t.resize(e.width,e.height)}},b6=class{constructor(e){this.events={changed:new wt},this.layers=[],this.currentLayerName="",this.handleLayerAppended=t=>{this.upsertLayerInfo(t.layer)},this.handleLayerErased=t=>{this.removeLayerInfo(t.layer.name)},this.handleLayerModified=t=>{let n=this.findLayerInfo(t.layer.name);if(!n){this.upsertLayerInfo(t.layer);return}Object.assign(n,this.toLayerInfo(t.layer)),this.notify()},this.handleSysVarChanged=t=>{t.database===this.database&&t.name.toUpperCase()==="CLAYER"&&this.syncCurrentLayerName()},this.document=e,this.database=e.database,gt.instance().events.sysVarChanged.addEventListener(this.handleSysVarChanged),this.bindDatabase()}destroy(){gt.instance().events.sysVarChanged.removeEventListener(this.handleSysVarChanged),this.unbindDatabase(),this.layers=[],this.currentLayerName=""}getLayers(){return[...this.layers]}getCurrentLayerName(){return this.currentLayerName}setLayerOn(e,t){return this.getLayerService().setLayerOn(e,t,{switchCurrentLayer:!0})}setAllLayersOn(){return this.getLayerService().setAllLayersOn()>0}setAllLayersOffExceptCurrent(){return this.getLayerService().setAllLayersOffExceptCurrent()>0}setLayerColor(e,t){return this.getLayerService().setLayerColor(e,t)}setCurrentLayer(e){let t=this.getLayerService().setCurrentLayer(e);return t&&this.syncCurrentLayerName(),t}setLayerFrozen(e,t){return this.getLayerService().setLayerFrozen(e,t,{switchCurrentLayer:!0})}setLayerLocked(e,t){return this.getLayerService().setLayerLocked(e,t)}setLayerLineWeight(e,t){return this.getLayerService().setLayerLineWeight(e,t)}setLayerPlottable(e,t){return this.getLayerService().setLayerPlottable(e,t)}setLayerLinetype(e,t){return this.getLayerService().setLayerLinetype(e,t)}setLayerTransparency(e,t){return this.getLayerService().setLayerTransparency(e,t)}setLayerDescription(e,t){return this.getLayerService().setLayerDescription(e,t)}isolateSingleLayer(e){return this.getLayerService().isolateSingleLayer(e)}getLayerService(){return this.document.layerService}toLayerInfo(e){return{name:e.name,color:e.color.toString(),cssColor:e.color.cssColor||"#FFFFFF",isOn:!e.isOff,isFrozen:e.isFrozen,isLocked:Xi.isLayerLocked(e)}}rebuildLayerCache(){this.layers=[];for(let e of this.database.tables.layerTable.newIterator())this.layers.push(this.toLayerInfo(e))}findLayerInfo(e){return this.layers.find(t=>t.name===e)}removeLayerInfo(e){let t=this.layers.findIndex(n=>n.name===e);t!==-1&&(this.layers.splice(t,1),this.notify())}upsertLayerInfo(e){let t=this.findLayerInfo(e.name),n=this.toLayerInfo(e);t?Object.assign(t,n):this.layers.push(n),this.notify()}syncCurrentLayerName(e=!0){let t=this.database.clayer||"";this.currentLayerName!==t&&(this.currentLayerName=t,e&&this.notify())}notify(){this.events.changed.dispatch({layers:this.getLayers(),currentLayerName:this.currentLayerName})}bindDatabase(){this.rebuildLayerCache(),this.currentLayerName=this.database.clayer||"",this.notify(),this.database.events.layerAppended.addEventListener(this.handleLayerAppended),this.database.events.layerErased.addEventListener(this.handleLayerErased),this.database.events.layerModified.addEventListener(this.handleLayerModified)}unbindDatabase(){this.database.events.layerAppended.removeEventListener(this.handleLayerAppended),this.database.events.layerErased.removeEventListener(this.handleLayerErased),this.database.events.layerModified.removeEventListener(this.handleLayerModified)}},pk=class{constructor(e){this.db=e}getEntitiesByIds(e){return e.map(t=>this.db.tables.blockTable.getEntityById(t)).filter(t=>!!t)}transformEntities(e,t){let n=0;return e.forEach(i=>{let o=this.db.openEntityForWrite(i);o&&(o.transformBy(t),n++)}),n}translateEntities(e,t){let n=new Ie().makeTranslation(t.x,t.y,t.z);return this.transformEntities(e,n)}rotateEntities(e,t,n){let i=H1(t,n);return this.transformEntities(e,i)}cloneAndTransform(e,t,n={}){let i=n.append??!0,o=e.map(a=>a.clone()).filter(a=>!!a);return o.forEach(a=>a.transformBy(t)),i&&o.length>0&&this.db.tables.blockTable.modelSpace.appendEntity(o),o}eraseEntities(e){return this.runEntityEdit(()=>{let t=0;return e.forEach(n=>{let i=this.db.openEntityForWrite(n);i&&(i.erase(),t++)}),t})}moveEntitiesToCurrentLayer(e){var t;let n=(t=this.db.clayer)==null?void 0:t.trim(),i=n?this.db.tables.layerTable.getAt(n):void 0;if(!i)return{changedCount:0,alreadyCurrent:0,missing:0,currentLayerMissing:!0};let o=0,a=0,s=0;return new Set(e).forEach(l=>{let c=this.db.tables.blockTable.getEntityById(l);if(!c){s++;return}if(c.layer===i.name){a++;return}let u=this.db.openEntityForWrite(l);if(!u){s++;return}u.layer=i.name,o++}),{changedCount:o,alreadyCurrent:a,missing:s,currentLayerMissing:!1}}static copyDisplayTraits(e,t){t.layer=e.layer,t.color=e.color.clone(),t.lineType=e.lineType,t.lineWeight=e.lineWeight,t.linetypeScale=e.linetypeScale,t.transparency=e.transparency,t.visibility=e.visibility}runEdit(e,t){return Sn(this.db,e,t)}runEntityEdit(e){return Sn(this.db,VLe,e)}};async function Kte(r){let e=await Y.instance.editor.getSelection(new Bd(P.sysCmdPrompt(r)));if(!(e.status!==V.OK||!e.value||e.value.count===0))return e.value.ids}async function fU(r,e={}){let t=r.view.selectionSet,n=r.doc.database.tables.blockTable,i=e.clearOnEmpty??!0,o;if(t.count>0?o=t.ids:e.promptKey&&(o=await Kte(e.promptKey)),!o||o.length===0)return;let a=[],s=[];for(let l of o){let c=n.getEntityById(l);c&&(a.push(c),s.push(l))}if(a.length===0){i&&t.clear();return}return{entities:a,ids:s}}async function KRe(r,e){let t=r.view.selectionSet;if(t.count>0)return t.ids;let n=await Kte(e);return n&&n.length>0?n:void 0}var qRe="layerp",Sa=class extends xt{shouldRecordUndoStack(e){return this.recordsUndoStack}onCommandWillStart(e){this.globalName.toLowerCase()!==qRe&&e.doc.captureLayerPreviousState()}},v6=class extends Sa{constructor(){super(),this._history=[],this.mode=at.Write}async execute(e){for(this._history=[];;){let t=await this.promptMainAction();if(!t)return;if(t.type==="keyword"){t.keyword==="Name"?await this.runNameBranch(e):this.runUndo(e);continue}this.deleteLayerByEntity(e,t.objectId)}}addKeyword(e,t){e.keywords.add(P.t(`jig.laydel.keywords.${t}.display`),P.t(`jig.laydel.keywords.${t}.global`),P.t(`jig.laydel.keywords.${t}.local`))}async promptMainAction(){let e=new Rl(P.t("jig.laydel.selectPrompt"));e.allowNone=!0,e.allowObjectOnLockedLayer=!0,e.setRejectMessage(P.t("jig.laydel.invalidSelection")),this.addKeyword(e,"name"),this.addKeyword(e,"undo");let t=await Y.instance.editor.getEntity(e);if(t.status===V.OK&&t.objectId)return{type:"entity",objectId:t.objectId};if(t.status===V.Keyword&&(t.stringResult==="Name"||t.stringResult==="Undo"))return{type:"keyword",keyword:t.stringResult}}async runNameBranch(e){for(;;){let t=await this.promptLayerNameAction();if(!t)return;if(t.type==="keyword"){t.keyword==="?"?this.listLayers(e):this.runUndo(e);continue}this.deleteLayerByName(e,t.layerName)}}async promptLayerNameAction(){let e=new fi(P.t("jig.laydel.namePrompt"));e.allowSpaces=!0,e.allowEmpty=!0,this.addKeyword(e,"list"),this.addKeyword(e,"undo");let t=await Y.instance.editor.getString(e);if(t.status===V.Keyword&&(t.stringResult==="?"||t.stringResult==="Undo"))return{type:"keyword",keyword:t.stringResult};if(t.status!==V.OK)return;let n=(t.stringResult??"").trim();if(n)return{type:"name",layerName:n}}listLayers(e){let t=new Xi(e.doc.database).getLayerSummaries();console.table(t),this.showMessage(P.t("jig.laydel.layerListSummary"),"info")}deleteLayerByEntity(e,t){var n;let i=e.doc.database.tables.blockTable.getEntityById(t),o=(n=i?.layer)==null?void 0:n.trim();if(!o){this.showMessage(P.t("jig.laydel.invalidSelection"),"warning");return}this.deleteLayerByName(e,o)}deleteLayerByName(e,t){let n=new Xi(e.doc.database).deleteLayer(t);if(!n.ok)switch(n.reason){case"not_found":this.showMessage(`${P.t("jig.laydel.layerNotFound")}: ${t}`);return;case"layer_0":this.showMessage(P.t("jig.laydel.cannotDeleteZeroLayer"),"warning");return;case"current_layer":this.showMessage(P.t("jig.laydel.cannotDeleteCurrent"),"warning");return}this._history.push({layer:n.layer,entities:n.entities}),e.view.selectionSet.clear(),Y.instance.regen(),this.showMessage(`${P.t("jig.laydel.deleted")}: ${n.layerName}`,"success")}runUndo(e){let t=this._history.pop();if(!t){this.showMessage(P.t("jig.laydel.nothingToUndo"),"warning");return}new Xi(e.doc.database).restoreDeletedLayer(t.layer,t.entities),e.view.selectionSet.clear(),Y.instance.regen(),this.showMessage(`${P.t("jig.laydel.restored")}: ${t.layer.name}`,"success")}},x6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.view.selectionSet,n=t.count>0?t.ids:await this.promptSelection();if(!n||n.length===0)return;let i=e.doc.entityService.moveEntitiesToCurrentLayer(n);if(i.currentLayerMissing){this.showMessage(P.t("jig.laycur.currentLayerNotFound"),"warning");return}if(i.changedCount===0){this.showMessage(i.alreadyCurrent>0?P.t("jig.laycur.alreadyCurrent"):P.t("jig.laycur.noObjects"),i.alreadyCurrent>0&&i.missing===0?"info":"warning");return}e.view.selectionSet.clear(),Y.instance.regen(),this.showMessage(`${P.t("jig.laycur.changed")}: ${i.changedCount} (${e.doc.database.clayer})`,"success")}async promptSelection(){var e;let t=new Bd(P.t("jig.laycur.prompt")),n=await Y.instance.editor.getSelection(t);if(n.status===V.OK)return((e=n.value)==null?void 0:e.ids)??[]}},ZRe={viewportMode:"Freeze",blockSelectionMode:"None"},qte=class Md extends Sa{constructor(){super(),this._history=[],this._vpfreezeHintShown=!1,this.mode=at.Write}async execute(e){for(this._history=[],this._vpfreezeHintShown=Md._settings.viewportMode!=="Vpfreeze";;){let t=await this.promptSelection();if(!t)return;if(t.type==="keyword"){t.keyword==="Settings"?await this.runSettings():this.runUndo(e);continue}this.freezeEntityLayer(e,t.objectId)}}addKeyword(e,t){e.keywords.add(P.t(`jig.layfrz.keywords.${t}.display`),P.t(`jig.layfrz.keywords.${t}.global`),P.t(`jig.layfrz.keywords.${t}.local`))}async promptSelection(){let e=new Rl(P.t("jig.layfrz.prompt"));e.allowNone=!0,e.allowObjectOnLockedLayer=!0,e.setRejectMessage(P.t("jig.layfrz.invalidSelection")),this.addKeyword(e,"settings"),this.addKeyword(e,"undo");let t=await Y.instance.editor.getEntity(e);if(t.status===V.OK&&t.objectId)return{type:"entity",objectId:t.objectId};if(t.status===V.Keyword&&(t.stringResult==="Settings"||t.stringResult==="Undo"))return{type:"keyword",keyword:t.stringResult}}async runSettings(){for(;;){let e=new Hr(P.t("jig.layfrz.settingsPrompt"));e.allowNone=!0,this.addKeyword(e,"viewports"),this.addKeyword(e,"blockSelection");let t=await Y.instance.editor.getKeywords(e);if(t.status!==V.OK)return;let n=t.stringResult;if(!n)return;n==="Viewports"?await this.promptViewportMode():await this.promptBlockSelectionMode()}}async promptViewportMode(){let e=new Hr(P.t("jig.layfrz.viewportPrompt"));e.allowNone=!0;let t=e.keywords.add(P.t("jig.layfrz.keywords.freeze.display"),P.t("jig.layfrz.keywords.freeze.global"),P.t("jig.layfrz.keywords.freeze.local")),n=e.keywords.add(P.t("jig.layfrz.keywords.vpfreeze.display"),P.t("jig.layfrz.keywords.vpfreeze.global"),P.t("jig.layfrz.keywords.vpfreeze.local"));e.keywords.default=Md._settings.viewportMode==="Vpfreeze"?n:t;let i=await Y.instance.editor.getKeywords(e);if(i.status!==V.OK)return;let o=i.stringResult;o&&(Md._settings.viewportMode=o,o==="Vpfreeze"?(this._vpfreezeHintShown=!0,this.showMessage(P.t("jig.layfrz.vpfreezeFallback"))):this._vpfreezeHintShown=!1)}async promptBlockSelectionMode(){let e=new Hr(P.t("jig.layfrz.blockSelectionPrompt"));e.allowNone=!0;let t=e.keywords.add(P.t("jig.layfrz.keywords.block.display"),P.t("jig.layfrz.keywords.block.global"),P.t("jig.layfrz.keywords.block.local")),n=e.keywords.add(P.t("jig.layfrz.keywords.entity.display"),P.t("jig.layfrz.keywords.entity.global"),P.t("jig.layfrz.keywords.entity.local")),i=e.keywords.add(P.t("jig.layfrz.keywords.none.display"),P.t("jig.layfrz.keywords.none.global"),P.t("jig.layfrz.keywords.none.local"));e.keywords.default=Md._settings.blockSelectionMode==="Block"?t:Md._settings.blockSelectionMode==="Entity"?n:i;let o=await Y.instance.editor.getKeywords(e);if(o.status!==V.OK)return;let a=o.stringResult;a&&(Md._settings.blockSelectionMode=a,this.showMessage(P.t("jig.layfrz.nestedSelectionLimited")))}freezeEntityLayer(e,t){let n=new Xi(e.doc.database).freezeLayerByEntity(t);if(!n.ok){switch(n.reason){case"invalid_selection":this.showMessage(P.t("jig.layfrz.invalidSelection"),"warning");return;case"layer_not_found":this.showMessage(`${P.t("jig.layfrz.layerNotFound")}: ${n.layerName}`,"warning");return;case"cannot_change_current":this.showMessage(P.t("jig.layfrz.cannotFreezeCurrent"),"warning");return;case"already_frozen":this.showMessage(`${P.t("jig.layfrz.alreadyFrozen")}: ${n.layerName}`,"info");return}return}Md._settings.viewportMode==="Vpfreeze"&&!this._vpfreezeHintShown&&(this.showMessage(P.t("jig.layfrz.vpfreezeFallback")),this._vpfreezeHintShown=!0),this._history.push({layerName:n.layerName,wasFrozen:n.previousFrozen??!1}),e.view.selectionSet.clear(),this.showMessage(`${P.t("jig.layfrz.frozen")}: ${n.layerName}`,"success")}runUndo(e){let t=this._history.pop();if(!t){this.showMessage(P.t("jig.layfrz.nothingToUndo"),"warning");return}if(!new Xi(e.doc.database).setLayerFrozenByName(t.layerName,t.wasFrozen)){this.showMessage(`${P.t("jig.layfrz.layerNotFound")}: ${t.layerName}`,"warning");return}e.view.selectionSet.clear(),this.showMessage(`${P.t("jig.layfrz.restored")}: ${t.layerName}`,"success")}};qte._settings={...ZRe};var JRe=qte,QRe={isolationMode:"Off",offMode:"Off"},Zte=class Cl extends Sa{constructor(){super(),this._vpfreezeHintShown=!1,this._lockFadeHintShown=!1,this.mode=at.Write}async execute(e){this._vpfreezeHintShown=Cl._settings.offMode!=="Vpfreeze",this._lockFadeHintShown=Cl._settings.isolationMode!=="LockAndFade";let t=e.view.selectionSet.ids;if(t.length>0){this.isolateSelectedObjectLayers(e,t);return}for(;;){let n=await this.promptSelection();if(!n)return;if(n.type==="keyword"){await this.runSettings();continue}this.isolateSelectedObjectLayers(e,n.objectIds);return}}addKeyword(e,t){e.keywords.add(P.t(`jig.layiso.keywords.${t}.display`),P.t(`jig.layiso.keywords.${t}.global`),P.t(`jig.layiso.keywords.${t}.local`))}async promptSelection(){var e;let t=new Bd(P.t("jig.layiso.prompt"));this.addKeyword(t,"settings");let n=await Y.instance.editor.getSelection(t);if(n.status===V.OK)return{type:"selection",objectIds:((e=n.value)==null?void 0:e.ids)??[]};if(n.status===V.Keyword&&n.stringResult==="Settings")return{type:"keyword",keyword:n.stringResult}}async runSettings(){let e=new Hr(P.t("jig.layiso.settingsPrompt"));e.allowNone=!0;let t=e.keywords.add(P.t("jig.layiso.keywords.off.display"),P.t("jig.layiso.keywords.off.global"),P.t("jig.layiso.keywords.off.local")),n=e.keywords.add(P.t("jig.layiso.keywords.lockAndFade.display"),P.t("jig.layiso.keywords.lockAndFade.global"),P.t("jig.layiso.keywords.lockAndFade.local"));e.keywords.default=Cl._settings.isolationMode==="LockAndFade"?n:t;let i=await Y.instance.editor.getKeywords(e);if(i.status!==V.OK)return;let o=i.stringResult;if(o){if(Cl._settings.isolationMode=o,o==="Off"){await this.promptOffMode();return}this._lockFadeHintShown=!0,this.showMessage(P.t("jig.layiso.lockFadeFallback"))}}async promptOffMode(){let e=new Hr(P.t("jig.layiso.offModePrompt"));e.allowNone=!0;let t=e.keywords.add(P.t("jig.layiso.keywords.off.display"),P.t("jig.layiso.keywords.off.global"),P.t("jig.layiso.keywords.off.local")),n=e.keywords.add(P.t("jig.layiso.keywords.vpfreeze.display"),P.t("jig.layiso.keywords.vpfreeze.global"),P.t("jig.layiso.keywords.vpfreeze.local"));e.keywords.default=Cl._settings.offMode==="Vpfreeze"?n:t;let i=await Y.instance.editor.getKeywords(e);if(i.status!==V.OK)return;let o=i.stringResult;o&&(Cl._settings.offMode=o,o==="Vpfreeze"?(this._vpfreezeHintShown=!0,this.showMessage(P.t("jig.layiso.vpfreezeFallback"))):this._vpfreezeHintShown=!1)}isolateSelectedObjectLayers(e,t){let n=new Xi(e.doc.database),{layerNames:i,missingLayerNames:o}=n.collectLayerNamesFromEntities(t);if(o.length>0&&this.showMessage(`${P.t("jig.layiso.layerNotFound")}: ${o.join(", ")}`,"warning"),i.length===0){this.showMessage(P.t("jig.layiso.noLayers"),"warning");return}let a=e.doc.isolateLayers(i,Cl._settings.isolationMode);if(!a){this.showMessage(P.t("jig.layiso.noLayers"),"warning");return}Cl._settings.isolationMode==="Off"&&Cl._settings.offMode==="Vpfreeze"&&!this._vpfreezeHintShown&&(this.showMessage(P.t("jig.layiso.vpfreezeFallback")),this._vpfreezeHintShown=!0),Cl._settings.isolationMode==="LockAndFade"&&!this._lockFadeHintShown&&(this.showMessage(P.t("jig.layiso.lockFadeFallback")),this._lockFadeHintShown=!0),e.view.selectionSet.clear(),this.showMessage(`${P.t("jig.layiso.isolated")}: ${i.join(", ")} (${P.t("jig.layiso.affectedLayers")}: ${a.affectedLayerCount})`,"success")}};Zte._settings={...QRe};var e4e=Zte,w6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){for(;;){let t=await this.promptSelection();if(!t)return;this.lockEntityLayer(e,t)}}async promptSelection(){let e=new Rl(P.t("jig.laylck.prompt"));e.allowNone=!0,e.allowObjectOnLockedLayer=!0,e.setRejectMessage(P.t("jig.laylck.invalidSelection"));let t=await Y.instance.editor.getEntity(e);if(t.status===V.OK&&t.objectId)return t.objectId}lockEntityLayer(e,t){let n=new Xi(e.doc.database).lockLayerByEntity(t);if(!n.ok)switch(n.reason){case"invalid_selection":this.showMessage(P.t("jig.laylck.invalidSelection"),"warning");return;case"layer_not_found":this.showMessage(`${P.t("jig.laylck.layerNotFound")}: ${n.layerName}`,"warning");return;case"already_locked":this.showMessage(`${P.t("jig.laylck.alreadyLocked")}: ${n.layerName}`,"info");return}e.view.selectionSet.clear(),this.showMessage(`${P.t("jig.laylck.locked")}: ${n.layerName}`,"success")}},_6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){let t=new Xi(e.doc.database).setAllLayersOn();if(e.view.selectionSet.clear(),t===0){this.showMessage(P.t("jig.layon.alreadyOn"));return}this.showMessage(`${P.t("jig.layon.turnedOn")}: ${t}`,"success")}},t4e={viewportMode:"Off",blockSelectionMode:"None"},Jte=class Pd extends Sa{constructor(){super(),this._history=[],this._vpfreezeHintShown=!1,this.mode=at.Write}async execute(e){for(this._history=[],this._vpfreezeHintShown=Pd._settings.viewportMode!=="Vpfreeze";;){let t=await this.promptSelection();if(!t)return;if(t.type==="keyword"){t.keyword==="Settings"?await this.runSettings():this.runUndo(e);continue}this.turnOffEntityLayer(e,t.objectId)}}addKeyword(e,t){e.keywords.add(P.t(`jig.layoff.keywords.${t}.display`),P.t(`jig.layoff.keywords.${t}.global`),P.t(`jig.layoff.keywords.${t}.local`))}async promptSelection(){let e=new Rl(P.t("jig.layoff.prompt"));e.allowNone=!0,e.allowObjectOnLockedLayer=!0,e.setRejectMessage(P.t("jig.layoff.invalidSelection")),this.addKeyword(e,"settings"),this.addKeyword(e,"undo");let t=await Y.instance.editor.getEntity(e);if(t.status===V.OK&&t.objectId)return{type:"entity",objectId:t.objectId};if(t.status===V.Keyword&&(t.stringResult==="Settings"||t.stringResult==="Undo"))return{type:"keyword",keyword:t.stringResult}}async runSettings(){for(;;){let e=new Hr(P.t("jig.layoff.settingsPrompt"));e.allowNone=!0,this.addKeyword(e,"viewports"),this.addKeyword(e,"blockSelection");let t=await Y.instance.editor.getKeywords(e);if(t.status!==V.OK)return;let n=t.stringResult;if(!n)return;n==="Viewports"?await this.promptViewportMode():await this.promptBlockSelectionMode()}}async promptViewportMode(){let e=new Hr(P.t("jig.layoff.viewportPrompt"));e.allowNone=!0;let t=e.keywords.add(P.t("jig.layoff.keywords.off.display"),P.t("jig.layoff.keywords.off.global"),P.t("jig.layoff.keywords.off.local")),n=e.keywords.add(P.t("jig.layoff.keywords.vpfreeze.display"),P.t("jig.layoff.keywords.vpfreeze.global"),P.t("jig.layoff.keywords.vpfreeze.local"));e.keywords.default=Pd._settings.viewportMode==="Vpfreeze"?n:t;let i=await Y.instance.editor.getKeywords(e);if(i.status!==V.OK)return;let o=i.stringResult;o&&(Pd._settings.viewportMode=o,o==="Vpfreeze"?(this._vpfreezeHintShown=!0,this.showMessage(P.t("jig.layoff.vpfreezeFallback"))):this._vpfreezeHintShown=!1)}async promptBlockSelectionMode(){let e=new Hr(P.t("jig.layoff.blockSelectionPrompt"));e.allowNone=!0;let t=e.keywords.add(P.t("jig.layoff.keywords.block.display"),P.t("jig.layoff.keywords.block.global"),P.t("jig.layoff.keywords.block.local")),n=e.keywords.add(P.t("jig.layoff.keywords.entity.display"),P.t("jig.layoff.keywords.entity.global"),P.t("jig.layoff.keywords.entity.local")),i=e.keywords.add(P.t("jig.layoff.keywords.none.display"),P.t("jig.layoff.keywords.none.global"),P.t("jig.layoff.keywords.none.local"));e.keywords.default=Pd._settings.blockSelectionMode==="Block"?t:Pd._settings.blockSelectionMode==="Entity"?n:i;let o=await Y.instance.editor.getKeywords(e);if(o.status!==V.OK)return;let a=o.stringResult;a&&(Pd._settings.blockSelectionMode=a,this.showMessage(P.t("jig.layoff.nestedSelectionLimited")))}turnOffEntityLayer(e,t){let n=new Xi(e.doc.database).turnOffLayerByEntity(t);if(!n.ok){switch(n.reason){case"invalid_selection":this.showMessage(P.t("jig.layoff.invalidSelection"),"warning");return;case"layer_not_found":this.showMessage(`${P.t("jig.layoff.layerNotFound")}: ${n.layerName}`,"warning");return;case"cannot_change_current":this.showMessage(P.t("jig.layoff.cannotTurnOffCurrent"),"warning");return;case"already_off":this.showMessage(`${P.t("jig.layoff.alreadyOff")}: ${n.layerName}`,"info");return}return}Pd._settings.viewportMode==="Vpfreeze"&&!this._vpfreezeHintShown&&(this.showMessage(P.t("jig.layoff.vpfreezeFallback")),this._vpfreezeHintShown=!0),this._history.push({layerName:n.layerName,wasOff:n.previousOff??!1}),e.view.selectionSet.clear(),this.showMessage(`${P.t("jig.layoff.turnedOff")}: ${n.layerName}`,"success")}runUndo(e){let t=this._history.pop();if(!t){this.showMessage(P.t("jig.layoff.nothingToUndo"),"warning");return}if(!new Xi(e.doc.database).setLayerOffByName(t.layerName,t.wasOff)){this.showMessage(`${P.t("jig.layoff.layerNotFound")}: ${t.layerName}`,"warning");return}e.view.selectionSet.clear(),this.showMessage(`${P.t("jig.layoff.restored")}: ${t.layerName}`,"success")}};Jte._settings={...t4e};var n4e=Jte,S6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){e.doc.restoreLayerPreviousState()?this.showMessage(P.t("jig.layerp.restored"),"success"):this.showMessage(P.t("jig.layerp.noPreviousState")),e.view.selectionSet.clear()}},A6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){let t=new Xi(e.doc.database).thawAllLayers();if(e.view.selectionSet.clear(),t===0){this.showMessage(P.t("jig.laythw.alreadyThawed"));return}this.showMessage(`${P.t("jig.laythw.thawed")}: ${t}`,"success")}},M6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.doc.unisolateLayers();if(t===void 0){this.showMessage(P.t("jig.layuniso.noPrevious"),"warning");return}if(e.view.selectionSet.clear(),t===0){this.showMessage(P.t("jig.layuniso.nothingRestored"));return}this.showMessage(`${P.t("jig.layuniso.restored")}: ${t}`,"success")}},P6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){for(;;){let t=await this.promptSelection();if(!t)return;this.unlockEntityLayer(e,t)}}async promptSelection(){let e=new Rl(P.t("jig.layulk.prompt"));e.allowNone=!0,e.allowObjectOnLockedLayer=!0,e.setRejectMessage(P.t("jig.layulk.invalidSelection"));let t=await Y.instance.editor.getEntity(e);if(t.status===V.OK&&t.objectId)return t.objectId}unlockEntityLayer(e,t){let n=new Xi(e.doc.database).unlockLayerByEntity(t);if(!n.ok)switch(n.reason){case"invalid_selection":this.showMessage(P.t("jig.layulk.invalidSelection"),"warning");return;case"layer_not_found":this.showMessage(`${P.t("jig.layulk.layerNotFound")}: ${n.layerName}`,"warning");return;case"already_unlocked":this.showMessage(`${P.t("jig.layulk.alreadyUnlocked")}: ${n.layerName}`,"info");return}e.view.selectionSet.clear(),this.showMessage(`${P.t("jig.layulk.unlocked")}: ${n.layerName}`,"success")}},E6=class extends xt{async execute(e){Gt.emit("close-layer-manager",{})}},C6=class extends Sa{constructor(){super(),this.mode=at.Write}async execute(e){for(;;){let t=await this.promptMainKeyword();if(!t)return;switch(t){case"?":this.listLayers(e);break;case"Make":await this.runMake(e);break;case"Set":await this.runSet(e);break;case"New":await this.runNew(e);break;case"On":await this.runOnOff(e,!1);break;case"Off":await this.runOnOff(e,!0);break;case"Color":await this.runColor(e);break;case"Freeze":await this.runFreeze(e,!0);break;case"Thaw":await this.runFreeze(e,!1);break;case"Lock":await this.runLock(e,!0);break;case"Unlock":await this.runLock(e,!1);break;case"Description":await this.runDescription(e);break}}}layerService(e){return new Xi(e.doc.database)}async promptMainKeyword(){let e=new Hr(P.t("jig.layer.main"));e.allowNone=!0,this.addKeyword(e,"list"),this.addKeyword(e,"make"),this.addKeyword(e,"set"),this.addKeyword(e,"new"),this.addKeyword(e,"on"),this.addKeyword(e,"off"),this.addKeyword(e,"color"),this.addKeyword(e,"freeze"),this.addKeyword(e,"thaw"),this.addKeyword(e,"lock"),this.addKeyword(e,"unlock"),this.addKeyword(e,"description");let t=await Y.instance.editor.getKeywords(e);if(t.status===V.OK)return t.stringResult}addKeyword(e,t){e.keywords.add(P.t(`jig.layer.keywords.${t}.display`),P.t(`jig.layer.keywords.${t}.global`),P.t(`jig.layer.keywords.${t}.local`))}listLayers(e){let t=this.layerService(e).getLayerSummaries();console.table(t),this.showMessage(`${P.t("jig.layer.listSummary")} (${t.length})`,"info")}async promptLayerNames(e,t){let n=new fi(e);n.allowSpaces=!1;let i=await Y.instance.editor.getString(n);if(i.status!==V.OK)return;let o=this.layerService(t).parseLayerNameInput(i.stringResult??"");if(!o.length){this.showMessage(P.t("jig.layer.emptyInput"),"warning");return}return o}async promptSingleLayerName(e){let t=new fi(e);t.allowSpaces=!0;let n=await Y.instance.editor.getString(t);return n.status!==V.OK?void 0:(n.stringResult??"").trim()||void 0}async runNew(e){let t=await this.promptLayerNames(P.t("jig.layer.newPrompt"),e);if(!t)return;let{created:n,existed:i}=this.layerService(e).createLayers(t);n>0&&this.showMessage(`${P.t("jig.layer.created")}: ${n}`,"success"),i.length>0&&this.showMessage(`${P.t("jig.layer.alreadyExists")}: ${i.join(", ")}`,"warning")}async runSet(e){let t=await this.promptSingleLayerName(P.t("jig.layer.setPrompt"));t&&(this.layerService(e).setCurrentLayer(t)||this.showMessage(`${P.t("jig.layer.notFound")}: ${t}`,"warning"))}async runMake(e){let t=await this.promptSingleLayerName(P.t("jig.layer.makePrompt"));t&&this.layerService(e).makeLayer(t)}async runOnOff(e,t){let n=await this.promptLayerNames(t?P.t("jig.layer.offPrompt"):P.t("jig.layer.onPrompt"),e);if(!n)return;let i=this.layerService(e),{missing:o}=i.resolveLayers(n);o.length>0&&this.showMessage(`${P.t("jig.layer.notFound")}: ${o.join(", ")}`,"warning");let{skippedCurrent:a}=i.setLayersVisibility(n,t);a.length>0&&this.showMessage(P.t("jig.layer.cannotChangeCurrent"),"warning")}async runFreeze(e,t){let n=await this.promptLayerNames(t?P.t("jig.layer.freezePrompt"):P.t("jig.layer.thawPrompt"),e);if(!n)return;let i=this.layerService(e),{missing:o}=i.resolveLayers(n);o.length>0&&this.showMessage(`${P.t("jig.layer.notFound")}: ${o.join(", ")}`,"warning");let{skippedCurrent:a}=i.setLayersFrozen(n,t);a.length>0&&this.showMessage(P.t("jig.layer.cannotChangeCurrent"),"warning")}async runLock(e,t){let n=await this.promptLayerNames(t?P.t("jig.layer.lockPrompt"):P.t("jig.layer.unlockPrompt"),e);if(!n)return;let i=this.layerService(e),{missing:o}=i.resolveLayers(n);o.length>0&&this.showMessage(`${P.t("jig.layer.notFound")}: ${o.join(", ")}`,"warning"),i.setLayersLocked(n,t)}async runColor(e){let t=await this.promptLayerNames(P.t("jig.layer.colorLayerPrompt"),e);if(!t)return;let n=this.layerService(e),{layers:i,missing:o}=n.resolveLayers(t);if(o.length>0&&this.showMessage(`${P.t("jig.layer.notFound")}: ${o.join(", ")}`,"warning"),i.length===0)return;let a=new fi(P.t("jig.layer.colorValuePrompt"));a.allowSpaces=!1;let s=await Y.instance.editor.getString(a);if(s.status!==V.OK)return;let l=n.parseColorInput(s.stringResult??"");if(!l){this.showMessage(P.t("jig.layer.invalidColor"),"warning");return}n.setLayersColor(t,l)}async runDescription(e){let t=await this.promptSingleLayerName(P.t("jig.layer.descriptionLayerPrompt"));if(!t)return;let n=new fi(P.t("jig.layer.descriptionValuePrompt"));n.allowSpaces=!0,n.allowEmpty=!0;let i=await Y.instance.editor.getString(n);i.status===V.OK&&(this.layerService(e).setLayerDescription(t,i.stringResult??"")||this.showMessage(`${P.t("jig.layer.notFound")}: ${t}`,"warning"))}},r4e={x:0,y:0,z:1},i4e={x:0,y:0,z:-1};function wF(r,e){return Math.atan2(e.y-r.y,e.x-r.x)*180/Math.PI}function bQ(r,e,t){let n=e.x-r.x,i=e.y-r.y,o=t===1?Math.atan2(i,n):Math.atan2(i,-n);return xe.normalizeAngle(o)}function zd(r){if(!r)return;let e=r.clockwise?-1:1,t={x:r.center.x,y:r.center.y,z:0};return{center:t,radius:r.radius,startAngle:bQ(t,{x:r.startPoint.x,y:r.startPoint.y},e),endAngle:bQ(t,{x:r.endPoint.x,y:r.endPoint.y},e),normalSign:e}}function Qte(r){return r===1?r4e:i4e}function ene(r){return r.normal.z>=0?1:-1}function X1(r){return new ms(r.center,r.radius,r.startAngle,r.endAngle,Qte(r.normalSign))}function tne(r,e){r.center=e.center,r.radius=e.radius,r.startAngle=e.startAngle,r.endAngle=e.endAngle,r.normal=Qte(e.normalSign)}function Pl(r){return{center:{x:r.x,y:r.y,z:0},radius:1e-6,startAngle:0,endAngle:Math.PI/2,normalSign:1}}function vQ(r,e,t,n=!1){return zd(Ke.tryCreateByThreePoints(r,e,t,n))}function xQ(r,e,t,n){return zd(Ke.tryCreateByCenterStartEnd(r,e,t,n===-1))}function hT(r,e,t,n){return zd(Ke.tryCreateByCenterStartProjectedEnd(r,e,t,n===-1))}function t1(r,e,t){return zd(Ke.tryCreateByCenterStartSweep(r,e,t))}function n1(r,e,t){return zd(Ke.tryCreateByCenterStartChord(r,e,t))}function _F(r,e,t){return zd(Ke.tryCreateByStartEndAngle(r,e,t))}function SF(r,e,t){return zd(Ke.tryCreateByStartEndDirection(r,e,t))}function AF(r,e,t){return zd(Ke.tryCreateByStartEndRadius(r,e,t))}var tm=class extends It{constructor(e,t,n){super(e),this._builder=t,this._arc=X1(n)}get entity(){return this._arc}update(e){let t=this._builder(e);if(t){if(t.normalSign!==ene(this._arc)){this.end(),this._arc=X1(t);return}tne(this._arc,t)}}},kd=class extends It{constructor(e,t,n){super(e),this._builder=t,this._arc=X1(n)}get entity(){return this._arc}update(e){let t=this._builder(e);if(t){if(t.normalSign!==ene(this._arc)){this.end(),this._arc=X1(t);return}tne(this._arc,t)}}},o4e={"3p":"threePoint","3point":"threePoint",threepoint:"threePoint",startcenter:"startCenter",sc:"startCenter",startcenterend:"startCenterEnd",sce:"startCenterEnd",startcenterangle:"startCenterAngle",sca:"startCenterAngle",startcenterlength:"startCenterLength",startcenterchordlength:"startCenterLength",scl:"startCenterLength",startend:"startEnd",se:"startEnd",startendangle:"startEndAngle",sea:"startEndAngle",startenddirection:"startEndDirection",sed:"startEndDirection",startendradius:"startEndRadius",ser:"startEndRadius",center:"centerStart",c:"centerStart",centerstart:"centerStart",cs:"centerStart",centerstartend:"centerStartEnd",cse:"centerStartEnd",centerstartangle:"centerStartAngle",csa:"centerStartAngle",centerstartlength:"centerStartLength",centerstartchordlength:"centerStartLength",csl:"centerStartLength"},T6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){Y.instance.editor.resetInputToggles();let t=this.consumeEntryMode();if(t!=="default"){await this.executeEntryMode(e,t);return}let n=new Ae(P.t("jig.arc.startPointOrCenter"));this.addKeyword(n,"center");let i=await Y.instance.editor.getPoint(n);if(i.status===V.Keyword){i.stringResult==="Center"&&await this.runCenterStartFlow(e);return}i.status===V.OK&&await this.runStartFlow(e,i.value)}async executeEntryMode(e,t){switch(t){case"threePoint":await this.runExactThreePointFlow(e);return;case"startCenter":await this.runStartCenterFlowFromEntry(e);return;case"startCenterEnd":await this.runExactStartCenterFlow(e,"end");return;case"startCenterAngle":await this.runExactStartCenterFlow(e,"angle");return;case"startCenterLength":await this.runExactStartCenterFlow(e,"chordLength");return;case"startEnd":await this.runStartEndFlowFromEntry(e);return;case"startEndAngle":await this.runExactStartEndFlow(e,"angle");return;case"startEndDirection":await this.runExactStartEndFlow(e,"direction");return;case"startEndRadius":await this.runExactStartEndFlow(e,"radius");return;case"centerStart":await this.runCenterStartFlow(e);return;case"centerStartEnd":await this.runExactCenterStartFlow(e,"end");return;case"centerStartAngle":await this.runExactCenterStartFlow(e,"angle");return;case"centerStartLength":await this.runExactCenterStartFlow(e,"chordLength");return}}consumeEntryMode(){let e=Y.instance.editor.peekScriptInput();if(e==null)return"default";let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,""),n=o4e[t];return n?(Y.instance.editor.consumeScriptInput(),n):"default"}addKeyword(e,t){e.keywords.add(P.t(`jig.arc.keywords.${t}.display`),P.t(`jig.arc.keywords.${t}.global`),P.t(`jig.arc.keywords.${t}.local`))}appendArc(e,t){e.doc.database.tables.blockTable.modelSpace.appendEntity(X1(t))}warnInvalidGeometry(e){this.notify(P.t(`jig.arc.invalid.${e}`),"warning")}async promptStartPoint(){let e=new Ae(P.t("jig.arc.startPoint")),t=await Y.instance.editor.getPoint(e);return t.status===V.OK?t.value:void 0}async promptCenterPoint(e){let t=new Ae(P.t("jig.arc.centerPoint"));e&&(t.useBasePoint=!0,t.useDashedLine=!0,t.basePoint=new k(e));let n=await Y.instance.editor.getPoint(t);return n.status===V.OK?n.value:void 0}async promptEndPoint(e){let t=new Ae(P.t("jig.arc.endPoint"));e&&(t.useBasePoint=!0,t.useDashedLine=!0,t.basePoint=new k(e));let n=await Y.instance.editor.getPoint(t);return n.status===V.OK?n.value:void 0}async promptSecondPoint(e){let t=new Ae(P.t("jig.arc.secondPoint"));t.useBasePoint=!0,t.useDashedLine=!0,t.basePoint=new k(e);let n=await Y.instance.editor.getPoint(t);return n.status===V.OK?n.value:void 0}async runExactThreePointFlow(e){let t=await this.promptStartPoint();if(!t)return;let n=await this.promptSecondPoint(t);n&&await this.finishThreePointArc(e,t,n)}async runStartCenterFlowFromEntry(e){let t=await this.promptStartPoint();t&&await this.runStartCenterFlow(e,t)}async runExactStartCenterFlow(e,t){let n=await this.promptStartPoint();if(!n)return;let i=await this.promptCenterPoint(n);if(!i)return;if(t==="end"){await this.finishExactCenterStartEnd(e,i,n);return}if(t==="angle"){let c=new _a(P.t("jig.arc.includedAngle"));c.allowNegative=!0,c.allowZero=!1,c.useBasePoint=!0,c.useDashedLine=!0,c.basePoint=new k(i),c.baseAngle=wF(i,n),c.jig=new kd(e.view,p=>t1(i,n,this.applyCtrlDirectionValue(this.degToRad(p))),Pl(n));let u=await Y.instance.editor.getAngle(c),h=u.status===V.OK?u.value:void 0;if(h==null)return;let d=t1(i,n,this.applyCtrlDirectionValue(this.degToRad(h)));d?this.appendArc(e,d):this.warnInvalidGeometry("angle");return}let o=new Zo(P.t("jig.arc.chordLength"));o.allowNegative=!0,o.allowZero=!1,o.useBasePoint=!0,o.useDashedLine=!0,o.basePoint=new k(n),o.jig=new kd(e.view,c=>n1(i,n,this.applyCtrlDirectionValue(c)),Pl(n));let a=await Y.instance.editor.getDistance(o),s=a.status===V.OK?a.value:void 0;if(s==null)return;let l=n1(i,n,this.applyCtrlDirectionValue(s));l?this.appendArc(e,l):this.warnInvalidGeometry("chordLength")}async runExactCenterStartFlow(e,t){let n=await this.promptCenterPoint();if(!n)return;let i=await this.promptStartPointFromCenter(n);if(!i)return;if(t==="end"){await this.finishExactCenterStartEnd(e,n,i);return}if(t==="angle"){let c=new _a(P.t("jig.arc.includedAngle"));c.allowNegative=!0,c.allowZero=!1,c.useBasePoint=!0,c.useDashedLine=!0,c.basePoint=new k(n),c.baseAngle=wF(n,i),c.jig=new kd(e.view,p=>t1(n,i,this.applyCtrlDirectionValue(this.degToRad(p))),Pl(i));let u=await Y.instance.editor.getAngle(c),h=u.status===V.OK?u.value:void 0;if(h==null)return;let d=t1(n,i,this.applyCtrlDirectionValue(this.degToRad(h)));d?this.appendArc(e,d):this.warnInvalidGeometry("angle");return}let o=new Zo(P.t("jig.arc.chordLength"));o.allowNegative=!0,o.allowZero=!1,o.useBasePoint=!0,o.useDashedLine=!0,o.basePoint=new k(i),o.jig=new kd(e.view,c=>n1(n,i,this.applyCtrlDirectionValue(c)),Pl(i));let a=await Y.instance.editor.getDistance(o),s=a.status===V.OK?a.value:void 0;if(s==null)return;let l=n1(n,i,this.applyCtrlDirectionValue(s));l?this.appendArc(e,l):this.warnInvalidGeometry("chordLength")}async runExactStartEndFlow(e,t){let n=await this.promptStartPoint();if(!n)return;let i=await this.promptEndPoint(n);if(!i)return;if(t==="angle"){let c=new _a(P.t("jig.arc.includedAngle"));c.allowNegative=!0,c.allowZero=!1,c.useBasePoint=!0,c.useDashedLine=!0,c.basePoint=new k(n),c.baseAngle=wF(n,i),c.jig=new kd(e.view,p=>_F(n,i,this.applyCtrlDirectionValue(this.degToRad(p))),Pl(n));let u=await Y.instance.editor.getAngle(c),h=u.status===V.OK?u.value:void 0;if(h==null)return;let d=_F(n,i,this.applyCtrlDirectionValue(this.degToRad(h)));d?this.appendArc(e,d):this.warnInvalidGeometry("angle");return}if(t==="direction"){let c=new Ae(P.t("jig.arc.tangentDirection"));c.useBasePoint=!0,c.useDashedLine=!0,c.basePoint=new k(n),c.jig=new tm(e.view,f=>SF(n,i,Math.atan2(f.y-n.y,f.x-n.x)),Pl(n));let u=await Y.instance.editor.getPoint(c),h=u.status===V.OK?u.value:void 0;if(!h)return;let d=Math.atan2(h.y-n.y,h.x-n.x),p=SF(n,i,d);p?this.appendArc(e,p):this.warnInvalidGeometry("direction");return}let o=new Zo(P.t("jig.arc.radius"));o.allowNegative=!0,o.allowZero=!1,o.useBasePoint=!0,o.useDashedLine=!0,o.basePoint=new k(n),o.jig=new kd(e.view,c=>AF(n,i,this.applyCtrlDirectionValue(c)),Pl(n));let a=await Y.instance.editor.getDistance(o),s=a.status===V.OK?a.value:void 0;if(s==null)return;let l=AF(n,i,this.applyCtrlDirectionValue(s));l?this.appendArc(e,l):this.warnInvalidGeometry("radius")}async runStartEndFlowFromEntry(e){let t=await this.promptStartPoint();t&&await this.runStartEndFlow(e,t)}async promptStartPointFromCenter(e){let t=new Ae(P.t("jig.arc.startPoint"));t.useBasePoint=!0,t.useDashedLine=!0,t.basePoint=new k(e);let n=await Y.instance.editor.getPoint(t);return n.status===V.OK?n.value:void 0}async finishExactCenterStartEnd(e,t,n){let i=new Ae(P.t("jig.arc.endPoint"));i.useBasePoint=!0,i.useDashedLine=!0,i.basePoint=new k(n),i.jig=new tm(e.view,s=>hT(t,n,s,this.applyCtrlDirectionSign(1)),Pl(n));let o=await Y.instance.editor.getPoint(i);if(o.status!==V.OK)return;let a=hT(t,n,o.value,this.applyCtrlDirectionSign(1));a?this.appendArc(e,a):this.warnInvalidGeometry("center")}getArcDirectionFactor(){return Y.instance.editor.getInputToggles().ctrlArcFlip?-1:1}applyCtrlDirectionSign(e){return e*this.getArcDirectionFactor()}applyCtrlDirectionValue(e){return e*this.getArcDirectionFactor()}isCtrlDirectionFlipped(){return Y.instance.editor.getInputToggles().ctrlArcFlip}async runStartFlow(e,t){let n=new Ae(P.t("jig.arc.secondPointOrOptions"));this.addKeyword(n,"center"),this.addKeyword(n,"end"),n.useBasePoint=!0,n.useDashedLine=!0,n.basePoint=new k(t);let i=await Y.instance.editor.getPoint(n);if(i.status===V.OK){await this.finishThreePointArc(e,t,i.value);return}if(i.status===V.Keyword){if(i.stringResult==="Center"){await this.runStartCenterFlow(e,t);return}i.stringResult==="End"&&await this.runStartEndFlow(e,t)}}async finishThreePointArc(e,t,n){let i=new Ae(P.t("jig.arc.endPoint"));i.useBasePoint=!0,i.useDashedLine=!0,i.basePoint=new k(t),i.jig=new tm(e.view,s=>vQ(t,n,s,this.isCtrlDirectionFlipped()),Pl(t));let o=await Y.instance.editor.getPoint(i);if(o.status!==V.OK)return;let a=vQ(t,n,o.value,this.isCtrlDirectionFlipped());a?this.appendArc(e,a):this.warnInvalidGeometry("threePoint")}async runCenterStartFlow(e){let t=new Ae(P.t("jig.arc.centerPoint")),n=await Y.instance.editor.getPoint(t);if(n.status!==V.OK)return;let i=n.value,o=new Ae(P.t("jig.arc.startPoint"));o.useBasePoint=!0,o.useDashedLine=!0,o.basePoint=new k(i);let a=await Y.instance.editor.getPoint(o);a.status===V.OK&&await this.finishCenterStartFlow(e,i,a.value)}async runStartCenterFlow(e,t){let n=new Ae(P.t("jig.arc.centerPoint"));n.useBasePoint=!0,n.useDashedLine=!0,n.basePoint=new k(t);let i=await Y.instance.editor.getPoint(n);i.status===V.OK&&await this.finishCenterStartFlow(e,i.value,t)}async finishCenterStartFlow(e,t,n){let i=new Ae(P.t("jig.arc.endPointOrOptions"));this.addKeyword(i,"angle"),this.addKeyword(i,"chordLength"),i.useBasePoint=!0,i.useDashedLine=!0,i.basePoint=new k(n),i.jig=new tm(e.view,a=>hT(t,n,a,this.applyCtrlDirectionSign(1)),Pl(n));let o=await Y.instance.editor.getPoint(i);if(o.status===V.OK){let a=hT(t,n,o.value,this.applyCtrlDirectionSign(1));a?this.appendArc(e,a):this.warnInvalidGeometry("center");return}if(o.status===V.Keyword){if(o.stringResult==="Angle"){let a=new Gr(P.t("jig.arc.includedAngle"));a.allowZero=!1,a.allowNegative=!0;let s=await Y.instance.editor.getDouble(a);if(s.status!==V.OK)return;let l=t1(t,n,this.applyCtrlDirectionValue(this.degToRad(s.value)));l?this.appendArc(e,l):this.warnInvalidGeometry("angle");return}if(o.stringResult==="ChordLength"){let a=new Zo(P.t("jig.arc.chordLength"));a.allowZero=!1,a.allowNegative=!0,a.useBasePoint=!0,a.useDashedLine=!0,a.basePoint=new k(n);let s=await Y.instance.editor.getDistance(a);if(s.status!==V.OK)return;let l=n1(t,n,this.applyCtrlDirectionValue(s.value));l?this.appendArc(e,l):this.warnInvalidGeometry("chordLength")}}}async runStartEndFlow(e,t){let n=new Ae(P.t("jig.arc.endPoint"));n.useBasePoint=!0,n.useDashedLine=!0,n.basePoint=new k(t);let i=await Y.instance.editor.getPoint(n);if(i.status!==V.OK)return;let o=i.value,a=new Ae(P.t("jig.arc.centerPointOrOptions"));this.addKeyword(a,"angle"),this.addKeyword(a,"direction"),this.addKeyword(a,"radius"),a.useBasePoint=!0,a.useDashedLine=!0,a.basePoint=new k(t),a.jig=new tm(e.view,l=>xQ(l,t,o,this.applyCtrlDirectionSign(1)),Pl(t));let s=await Y.instance.editor.getPoint(a);if(s.status===V.OK){let l=xQ(s.value,t,o,this.applyCtrlDirectionSign(1));l?this.appendArc(e,l):this.warnInvalidGeometry("center");return}if(s.status===V.Keyword){if(s.stringResult==="Angle"){let l=new Gr(P.t("jig.arc.includedAngle"));l.allowZero=!1,l.allowNegative=!0;let c=await Y.instance.editor.getDouble(l);if(c.status!==V.OK)return;let u=_F(t,o,this.applyCtrlDirectionValue(this.degToRad(c.value)));u?this.appendArc(e,u):this.warnInvalidGeometry("angle");return}if(s.stringResult==="Direction"){let l=new Ae(P.t("jig.arc.tangentDirection"));l.useBasePoint=!0,l.useDashedLine=!0,l.basePoint=new k(t);let c=await Y.instance.editor.getPoint(l);if(c.status!==V.OK)return;let u=c.value,h=Math.atan2(u.y-t.y,u.x-t.x),d=SF(t,o,h);d?this.appendArc(e,d):this.warnInvalidGeometry("direction");return}if(s.stringResult==="Radius"){let l=new Zo(P.t("jig.arc.radius"));l.allowZero=!1,l.allowNegative=!0,l.useBasePoint=!0,l.useDashedLine=!0,l.basePoint=new k(t);let c=await Y.instance.editor.getDistance(l);if(c.status!==V.OK)return;let u=AF(t,o,this.applyCtrlDirectionValue(c.value));u?this.appendArc(e,u):this.warnInvalidGeometry("radius")}}}degToRad(e){return e*Math.PI/180}};function wQ(r){return{center:{x:r.x,y:r.y,z:0},radius:1e-6}}function MF(r,e){r.keywords.add(P.t(`jig.circle.keywords.${e}.display`),P.t(`jig.circle.keywords.${e}.global`),P.t(`jig.circle.keywords.${e}.local`))}function a4e(r,e){r.center=e.center,r.radius=e.radius}function mU(r){if(r)return{center:{x:r.center.x,y:r.center.y,z:0},radius:r.radius}}function _Q(r,e){return mU(Ke.tryCreateCircle(r,e))}function SQ(r,e){return mU(Ke.tryCreateCircleByDiameter(r,e))}function AQ(r,e,t){return mU(Ke.tryCreateCircleByThreePoints(r,e,t))}var fk=class extends It{constructor(e,t){super(e),this._circle=new Do(t,0)}get entity(){return this._circle}update(e){this._circle.radius=e}},mk=class extends It{constructor(e,t,n){super(e),this._circle=new Do(n.center,n.radius),this._builder=t}get entity(){return this._circle}update(e){let t=this._builder(e);t&&a4e(this._circle,t)}},k6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t;class n{constructor(h,d){this.cmd=h,this.machine=d}buildPrompt(){let h=new Ae(P.t("jig.circle.centerOrOptions"));return MF(h,"threeP"),MF(h,"twoP"),h}async handleResult(h){if(h.status===V.OK)return t=await this.cmd.runCenterFlow(e,h.value),"finish";if(h.status!==V.Keyword)return"finish";let d=h.stringResult??"";return d==="3P"?(this.machine.setState(new a(this.cmd,this.machine)),"continue"):d==="2P"?(this.machine.setState(new i(this.cmd,this.machine)),"continue"):"finish"}}class i{constructor(h,d){this.cmd=h,this.machine=d}buildPrompt(){return new Ae(P.t("jig.circle.twoPointFirst"))}async handleResult(h){return h.status!==V.OK?"finish":(this.machine.setState(new o(this.cmd,h.value)),"continue")}}class o{constructor(h,d){this.cmd=h,this.firstPoint=d}buildPrompt(){let h=new Ae(P.t("jig.circle.twoPointSecond"));return h.useBasePoint=!0,h.useDashedLine=!0,h.basePoint=new k(this.firstPoint),h.jig=new mk(e.view,d=>SQ(this.firstPoint,d),wQ(this.firstPoint)),h}async handleResult(h){return h.status===V.OK&&(t=this.cmd.createFromTwoPoints(this.firstPoint,h.value)),"finish"}}class a{constructor(h,d){this.cmd=h,this.machine=d}buildPrompt(){return new Ae(P.t("jig.circle.threePointFirst"))}async handleResult(h){return h.status!==V.OK?"finish":(this.machine.setState(new s(this.cmd,this.machine,h.value)),"continue")}}class s{constructor(h,d,p){this.cmd=h,this.machine=d,this.firstPoint=p}buildPrompt(){let h=new Ae(P.t("jig.circle.threePointSecond"));return h.useBasePoint=!0,h.useDashedLine=!0,h.basePoint=new k(this.firstPoint),h}async handleResult(h){return h.status!==V.OK?"finish":(this.machine.setState(new l(this.cmd,this.firstPoint,h.value)),"continue")}}class l{constructor(h,d,p){this.cmd=h,this.firstPoint=d,this.secondPoint=p}buildPrompt(){let h=new Ae(P.t("jig.circle.threePointThird"));return h.useBasePoint=!0,h.useDashedLine=!0,h.basePoint=new k(this.secondPoint),h.jig=new mk(e.view,d=>AQ(this.firstPoint,this.secondPoint,d),wQ(this.firstPoint)),h}async handleResult(h){return h.status===V.OK&&(t=this.cmd.createFromThreePoints(this.firstPoint,this.secondPoint,h.value)),"finish"}}let c=new Bl;c.setState(new n(this,c)),await c.run(u=>Y.instance.editor.getPoint(u)),t&&e.doc.database.tables.blockTable.modelSpace.appendEntity(new Do(t.center,t.radius))}async runCenterFlow(e,t){let n=new Zo(P.t("jig.circle.radiusOrDiameter"));MF(n,"diameter"),n.allowZero=!1,n.useBasePoint=!0,n.useDashedLine=!0,n.basePoint=new k(t),n.jig=new fk(e.view,t);let i=await Y.instance.editor.getDistance(n);if(i.status===V.OK)return _Q(t,i.value??0);if(i.status===V.Keyword&&i.stringResult==="Diameter")return await this.promptDiameterCircle(e,t)}async promptDiameterCircle(e,t){let n=new Zo(P.t("jig.circle.diameter"));n.allowZero=!1,n.useBasePoint=!0,n.useDashedLine=!0,n.basePoint=new k(t),n.jig=new fk(e.view,t);let i=await Y.instance.editor.getDistance(n);if(i.status!==V.OK)return;let o=(i.value??0)/2;return _Q(t,o)}createFromTwoPoints(e,t){return SQ(e,t)}createFromThreePoints(e,t,n){return AQ(e,t,n)}},I6=class extends It{constructor(e,t,n,i){super(e),this._dimBlockName="*UDIM",this._db=t,new Bp(t).createArrowBlock(),this._dim=new Ss(n,i,n),this._dim.rotation=0}get entity(){return this._dim}update(e){this._dim.dimLinePoint=e,this._dim.rotation=this.calculateAngle(this._dim.xLine1Point,this._dim.xLine2Point),this._dim.dimensionText=this._dim.xLine1Point.distanceTo(this._dim.xLine2Point).toFixed(3);let t=this._dimBlockName;this._db.tables.blockTable.remove(t),this._db.tables.blockTable.add(this._dim.createDimBlock(t)),this._dim.dimBlockId=t}end(){super.end(),this._db.tables.blockTable.remove(this._dimBlockName)}calculateAngle(e,t){let n=t.x-e.x,i=t.y-e.y;return Math.atan2(i,n)}},L6=class extends xt{constructor(){super(),this.mode=at.Review}async execute(e){let t=new Ae(P.t("jig.dimlinear.xLine1Point")),n=await Y.instance.editor.getPoint(t);if(n.status!==V.OK)return;let i=n.value,o=new Ae(P.t("jig.dimlinear.xLine2Point"));o.useBasePoint=!0;let a=await Y.instance.editor.getPoint(o);if(a.status!==V.OK)return;let s=a.value,l=new Ae(P.t("jig.dimlinear.dimLinePoint"));l.jig=new I6(e.view,e.doc.database,i,s);let c=await Y.instance.editor.getPoint(l);if(c.status!==V.OK)return;let u=c.value,h=e.doc.database,d=new Ss(i,s,u),p=this.getAvaiableDimBlockName(h);h.tables.blockTable.add(d.createDimBlock(p)),d.dimBlockId=p,h.tables.blockTable.modelSpace.appendEntity(d)}getAvaiableDimBlockName(e){let t=e.tables.blockTable.newIterator(),n=0;for(let i of t){let o=i.name;if(!o.startsWith("*D"))continue;let a=Number(o.slice(2));Number.isInteger(a)&&a>n&&(n=a)}return`*D${n+1}`}},Y1=class extends It{constructor(e,t){super(e),this._line=new Bo(t,t)}get entity(){return this._line}update(e){this._line.endPoint=e}},O6=class r extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.doc.database,n=[],i=[],o=()=>!!r._lastEndpoint,a=()=>r._lastEndpoint?new k(r._lastEndpoint):void 0,s=()=>{let y=c();y&&(r._lastEndpoint=new k(y))},l=y=>{n.push(new k(y))},c=()=>n[n.length-1],u=y=>{let b=c();if(!b)return;let v=new Bo(new k(b),y);t.tables.blockTable.modelSpace.appendEntity(v),i.push(v),e.view.addEntity(v),l(y)},h=()=>{if(i.length<=0||n.length<=1)return;let y=i.pop();y?.erase(),y&&e.view.removeEntity(y),n.pop()},d=()=>{if(n.length<=1)return;let y=n[0],b=c();b&&(y.x===b.x&&y.y===b.y&&y.z===b.z||u(y))},p=new Ae(o()?P.t("jig.line.firstPointOrContinue"):P.t("jig.line.firstPoint"));o()&&p.keywords.add(P.t("jig.line.keywords.continue.display"),P.t("jig.line.keywords.continue.global"),P.t("jig.line.keywords.continue.local"));let f=await Y.instance.editor.getPoint(p);if(f.status===V.OK)l(f.value);else if(f.status===V.Keyword&&f.stringResult==="Continue"&&o())l(a());else return;class m{buildPrompt(){let b=new Ae(P.t("jig.line.nextPointWithOptions"));b.keywords.add(P.t("jig.line.keywords.undo.display"),P.t("jig.line.keywords.undo.global"),P.t("jig.line.keywords.undo.local")),n.length>1&&b.keywords.add(P.t("jig.line.keywords.close.display"),P.t("jig.line.keywords.close.global"),P.t("jig.line.keywords.close.local"));let v=c();return v&&(b.useDashedLine=!0,b.useBasePoint=!0,b.basePoint=new k(v),b.jig=new Y1(e.view,v)),b.allowNone=!0,b}async handleResult(b){if(b.status===V.OK)return u(b.value),"continue";if(b.status===V.Keyword){let v=b.stringResult??"";return v==="Undo"?(h(),"continue"):v==="Close"&&n.length>1?(d(),"finish"):"continue"}return"finish"}}let g=new Bl;g.setState(new m),await g.run(y=>Y.instance.editor.getPoint(y)),s()}},gU={x:0,y:0,z:1};function dT(r,e){return Math.hypot(e.x-r.x,e.y-r.y)}function s4e(r,e){return{x:(r.x+e.x)/2,y:(r.y+e.y)/2,z:0}}function nne(r,e){let t=Math.hypot(r,e);if(!(!Number.isFinite(t)||Ce.isNonPositive(t)))return{x:r/t,y:e/t,z:0}}function l4e(r){return{x:-r.y,y:r.x,z:0}}function D6(r){return r*Math.PI/180}function c4e(r){return r*180/Math.PI}function u4e(r){return c4e(Math.atan2(r.y,r.x))}function pT(r,e,t){let n=D6(r);return Math.atan2(e*Math.sin(n),t*Math.cos(n))}function h4e(r,e){return nne(e.x-r.x,e.y-r.y)}function fT(r,e,t,n,i=0,o=Ge){if(!Number.isFinite(t)||!Number.isFinite(n)||Ce.isNonPositive(t)||Ce.isNonPositive(n))return;let a=d4e(i,o);return t>=n?{center:{x:r.x,y:r.y,z:0},majorAxis:e,majorRadius:t,minorRadius:n,startAngle:a.startAngle,endAngle:a.endAngle}:{center:{x:r.x,y:r.y,z:0},majorAxis:l4e(e),majorRadius:n,minorRadius:t,startAngle:a.startAngle,endAngle:a.endAngle}}function d4e(r,e){let t=Math.abs(e-r);return Math.abs(t-Ge)<1e-10||Math.abs(t-2*Ge)<1e-10?{startAngle:0,endAngle:0}:{startAngle:r,endAngle:e}}function rne(r){return new Jl(r,gU,{x:1,y:0,z:0},1e-6,1e-6,0,Ge)}function ine(r,e){r.center=e.center,r.normal=gU,r.majorAxisRadius=e.majorRadius,r.minorAxisRadius=e.minorRadius,r.startAngle=e.startAngle,r.endAngle=e.endAngle;let t=r;t._geo&&(t._geo.majorAxis=e.majorAxis)}var R6=class extends It{constructor(e,t,n){super(e),this._builder=t,this._ellipse=rne(n)}get entity(){return this._ellipse}update(e){let t=this._builder(e);t&&ine(this._ellipse,t)}},x1=class extends It{constructor(e,t,n){super(e),this._builder=t,this._ellipse=rne(n)}get entity(){return this._ellipse}update(e){let t=this._builder(e);t&&ine(this._ellipse,t)}},B6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=new Ae(P.t("jig.ellipse.axisEndpointOrOptions"));this.addKeyword(t,"arc"),this.addKeyword(t,"center");let n=await Y.instance.editor.getPoint(t);if(n.status===V.Keyword){let i=n.stringResult??"";i==="Center"?await this.runCenterFlow(e,!1):i==="Arc"&&await this.runArcEntryFlow(e);return}n.status===V.OK&&await this.runAxisEndFlow(e,n.value,!1)}addKeyword(e,t){e.keywords.add(P.t(`jig.ellipse.keywords.${t}.display`),P.t(`jig.ellipse.keywords.${t}.global`),P.t(`jig.ellipse.keywords.${t}.local`))}appendEllipse(e,t){let n=new Jl(t.center,gU,t.majorAxis,t.majorRadius,t.minorRadius,t.startAngle,t.endAngle);e.doc.database.tables.blockTable.modelSpace.appendEntity(n)}warnInvalidInput(e){this.notify(P.t(`jig.ellipse.invalid.${e}`),"warning")}async runArcEntryFlow(e){let t=new Ae(P.t("jig.ellipse.arcAxisEndpointOrCenter"));this.addKeyword(t,"center");let n=await Y.instance.editor.getPoint(t);if(n.status===V.Keyword){n.stringResult==="Center"&&await this.runCenterFlow(e,!0);return}n.status===V.OK&&await this.runAxisEndFlow(e,n.value,!0)}async runCenterFlow(e,t){let n=new Ae(P.t("jig.ellipse.center")),i=await Y.instance.editor.getPoint(n);if(i.status!==V.OK)return;let o=i.value,a=new Ae(P.t("jig.ellipse.firstAxisEndpoint"));a.useDashedLine=!0,a.useBasePoint=!0,a.basePoint=new k(o),a.jig=new Y1(e.view,o);let s=await Y.instance.editor.getPoint(a);if(s.status!==V.OK)return;let l=h4e(o,s.value);if(!l){this.warnInvalidInput("axis");return}let c=dT(o,s.value),u=await this.promptOtherAxis(e,o,l,c,t);u&&this.appendEllipse(e,u)}async runAxisEndFlow(e,t,n){let i=new Ae(P.t("jig.ellipse.secondAxisEndpoint"));i.useDashedLine=!0,i.useBasePoint=!0,i.basePoint=new k(t),i.jig=new Y1(e.view,t);let o=await Y.instance.editor.getPoint(i);if(o.status!==V.OK)return;let a=o.value,s=a.x-t.x,l=a.y-t.y,c=nne(s,l);if(!c){this.warnInvalidInput("axis");return}let u=s4e(t,a),h=dT(t,a)/2,d=await this.promptOtherAxis(e,u,c,h,n);d&&this.appendEllipse(e,d)}async promptOtherAxis(e,t,n,i,o){for(;;){let a=new Ae(P.t("jig.ellipse.otherAxisOrRotation"));this.addKeyword(a,"rotation"),a.useDashedLine=!0,a.useBasePoint=!0,a.basePoint=new k(t),a.jig=new R6(e.view,u=>{let h=dT(t,u);return fT(t,n,i,h)},t);let s=await Y.instance.editor.getPoint(a);if(s.status===V.Keyword){if(s.stringResult!=="Rotation")return;let u=new Gr(P.t("jig.ellipse.rotationAngle"));u.allowNegative=!1,u.allowZero=!0,u.jig=new x1(e.view,f=>{let m=i*Math.abs(Math.cos(D6(f)));return fT(t,n,i,m)},t);let h=await Y.instance.editor.getDouble(u);if(h.status!==V.OK)return;let d=i*Math.abs(Math.cos(D6(h.value??0))),p=fT(t,n,i,d);if(!p){this.warnInvalidInput("rotation");continue}return o?await this.promptArcAngles(e,p):p}if(s.status!==V.OK)return;let l=dT(t,s.value),c=fT(t,n,i,l);if(!c){this.warnInvalidInput("otherAxis");continue}return o?await this.promptArcAngles(e,c):c}}async promptArcAngles(e,t){let n=u4e(t.majorAxis),i=new _a(P.t("jig.ellipse.arcStartAngle"));i.allowNegative=!0,i.useBasePoint=!0,i.useDashedLine=!0,i.basePoint=new k(t.center),i.baseAngle=n,i.jig=new x1(e.view,c=>({...t,startAngle:pT(c,t.majorRadius,t.minorRadius),endAngle:Ge}),t.center);let o=await Y.instance.editor.getAngle(i);if(o.status!==V.OK)return;let a=pT(o.value??0,t.majorRadius,t.minorRadius),s=new _a(P.t("jig.ellipse.arcEndAngle"));s.allowNegative=!0,s.useBasePoint=!0,s.useDashedLine=!0,s.basePoint=new k(t.center),s.baseAngle=n,s.jig=new x1(e.view,c=>({...t,startAngle:a,endAngle:pT(c,t.majorRadius,t.minorRadius)}),t.center);let l=await Y.instance.editor.getAngle(s);if(l.status===V.OK)return{...t,startAngle:a,endAngle:pT(l.value??0,t.majorRadius,t.minorRadius)}}},one=class ane extends xt{constructor(){super(),this.mode=at.Write}get settings(){return ane._lastSettings}normalizeSysVarNumber(e,t){let n=Number(e);return Number.isFinite(n)?n:t}normalizePositiveSysVarNumber(e,t){let n=this.normalizeSysVarNumber(e,t);return n>0?n:t}sysVarRadiansToDegrees(e){return Math.round(e*180/Math.PI*1e6)/1e6}getSysVar(e,t,n){try{return e.getVar(t,n)}catch{return}}getDatabaseSysVarSettings(e){let t=this.settings;if(!(e instanceof ku))return t;try{let n=gt.instance(),i=this.getSysVar(n,oe.HPASSOC,e);return{...t,patternName:this.normalizePatternName(this.getSysVar(n,oe.HPNAME,e)??t.patternName),patternScale:this.normalizePositiveSysVarNumber(this.getSysVar(n,oe.HPSCALE,e),t.patternScale),patternAngleDeg:this.sysVarRadiansToDegrees(this.normalizeSysVarNumber(this.getSysVar(n,oe.HPANG,e),t.patternAngleDeg*Math.PI/180)),associative:i==null?t.associative:Number(i)!==0}}catch{return t}}getActiveSettings(){var e;return this.getDatabaseSysVarSettings((e=Y.instance.curDocument)==null?void 0:e.database)}setActiveSysVar(e,t){var n;let i=(n=Y.instance.curDocument)==null?void 0:n.database;i&&gt.instance().setVar(e,t,i)}normalizePatternName(e){let t=e.trim().toUpperCase();return t.length>0?t:us}styleToKeyword(e){switch(e){case zr.Outer:return"Outer";case zr.Ignore:return"Ignore";case zr.Normal:default:return"Normal"}}keywordToStyle(e){switch(e){case"Outer":return zr.Outer;case"Ignore":return zr.Ignore;default:return zr.Normal}}buildEdgesFromPolyline(e){var t;if(!e.closed||e.numberOfVertices<2)return[];let n=(t=e._geo)==null?void 0:t.vertices,i=n&&n.length>1?n.map(a=>({x:a.x,y:a.y,bulge:a.bulge})):Array.from({length:e.numberOfVertices},(a,s)=>{let l=e.getPoint2dAt(s);return{x:l.x,y:l.y,bulge:0}});if(i.length<2)return[];let o=[];for(let a=0;a<i.length;a++){let s=i[a],l=i[(a+1)%i.length],c=s.bulge??0;Math.abs(c)>1e-12?o.push(new Ke(s,l,c)):o.push(new fr(s,l))}return o}buildEdgesFromEntity(e){if(e instanceof Dt)return this.buildEdgesFromPolyline(e);if(e instanceof Do){let t=e.center;return[new Ke({x:t.x,y:t.y},e.radius,0,Math.PI*2,!1)]}if(e instanceof ms){if(!e.closed)return[];let t=e.center;return[new Ke({x:t.x,y:t.y},e.radius,e.startAngle,e.endAngle,!1)]}return e instanceof Bo?[new fr(e.startPoint,e.endPoint)]:[]}collectLoopsFromIds(e,t){let n=e.doc.database.tables.blockTable.modelSpace,i=[];return t.forEach(o=>{let a=n.getIdAt(o);a&&i.push(...this.buildEdgesFromEntity(a))}),this.buildLoopsFromEdges(i)}collectLoopsFromAllBoundaries(e){let t=e.doc.database.tables.blockTable.modelSpace,n=[];for(let i of t.newIterator())n.push(...this.buildEdgesFromEntity(i));return this.buildLoopsFromEdges(n)}buildLoopsFromEdges(e){if(e.length===0)return[];let t=[1e-6,1e-5,1e-4,.001],n=[];for(let i of t){let o=ta.buildFromEdges(e,i).filter(a=>a.closed&&a.numberOfEdges>0);o.length>n.length&&(n=o)}return n}signedArea(e){if(e.length<3)return 0;let t=0;for(let n=0,i=e.length-1;n<e.length;i=n++){let o=e[i],a=e[n];t+=o.x*a.y-a.x*o.y}return t*.5}isPointOnSegment(e,t,n,i,o,a,s=1e-8){let l=o-n,c=a-i,u=e-n,h=t-i;if(Math.abs(l*h-c*u)>s)return!1;let d=u*l+h*c;if(d<-s)return!1;let p=l*l+c*c;return!(d-p>s)}isPointInPolygon(e,t){if(t.length<3)return!1;for(let i=0,o=t.length-1;i<t.length;o=i++){let a=t[o],s=t[i];if(this.isPointOnSegment(e.x,e.y,a.x,a.y,s.x,s.y))return!0}let n=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){let a=t[i].x,s=t[i].y,l=t[o].x,c=t[o].y;s>e.y!=c>e.y&&e.x<(l-a)*(e.y-s)/(c-s+Number.EPSILON)+a&&(n=!n)}return n}buildLoopInfos(e){let t=[];e.forEach(n=>{let i=n.tessellate().map(o=>({x:o.x,y:o.y}));i.length<3||t.push({loop:n,points:i,area:Math.abs(this.signedArea(i)),parent:null,children:[]})});for(let n=0;n<t.length;n++){let i=t[n].points[0],o=null,a=Number.POSITIVE_INFINITY;for(let s=0;s<t.length;s++)n!==s&&(t[s].area<=t[n].area||this.isPointInPolygon(i,t[s].points)&&t[s].area<a&&(a=t[s].area,o=s));t[n].parent=o,o!=null&&t[o].children.push(n)}return t}resolveLoopsForPickPoint(e,t){let n=this.buildLoopInfos(t);if(!n.length)return[];let i=n.map((s,l)=>this.isPointInPolygon(e,s.points)?l:-1).filter(s=>s>=0);if(!i.length)return[];i.sort((s,l)=>n[s].area-n[l].area);let o=i[0],a=new Set([o]);return this.settings.style!==zr.Ignore&&n[o].children.forEach(s=>a.add(s)),[...a].map(s=>n[s].loop)}appendHatch(e,t){if(!t.length)return!1;let n=new Tu;e.doc.database instanceof ku&&(n.database=e.doc.database);let i=this.getDatabaseSysVarSettings(e.doc.database),o=this.normalizePatternName(i.patternName),a=o===us;return n.patternName=o,n.patternType=Oa.Predefined,n.patternScale=i.patternScale,n.patternAngle=i.patternAngleDeg*Math.PI/180,n.hatchStyle=i.style,n.isSolidFill=a,this.configureHatch(n),t.forEach(s=>n.add(s)),e.doc.database.tables.blockTable.modelSpace.appendEntity(n),!0}configureHatch(e){}async promptPatternName(){let e=new fi(P.t("jig.hatch.patternName"));e.allowEmpty=!1;let t=this.getActiveSettings();e.defaultValue=t.patternName,e.useDefaultValue=!0;let n=await Y.instance.editor.getString(e);if(n.status!==V.OK)return;let i=this.normalizePatternName(n.stringResult??e.defaultValue);this.settings.patternName=i,this.setActiveSysVar(oe.HPNAME,i)}async promptPatternScale(){let e=new Gr(P.t("jig.hatch.scale"));e.allowNone=!0,e.allowNegative=!1,e.allowZero=!1;let t=this.getActiveSettings();e.defaultValue=t.patternScale,e.useDefaultValue=!0;let n=await Y.instance.editor.getDouble(e);if(n.status!==V.OK)return;let i=n.value??e.defaultValue;i>0&&(this.settings.patternScale=i,this.setActiveSysVar(oe.HPSCALE,i))}async promptPatternAngle(){let e=new Gr(P.t("jig.hatch.angle"));e.allowNone=!0,e.allowNegative=!0,e.allowZero=!0;let t=this.getActiveSettings();e.defaultValue=t.patternAngleDeg,e.useDefaultValue=!0;let n=await Y.instance.editor.getDouble(e);if(n.status!==V.OK)return;let i=n.value??e.defaultValue;this.settings.patternAngleDeg=i,this.setActiveSysVar(oe.HPANG,i*Math.PI/180)}async promptStyle(){let e=this.getActiveSettings(),t=this.styleToKeyword(e.style),n=new Hr(P.t("jig.hatch.style"));n.allowNone=!0;let i=n.keywords.add(P.t("jig.hatch.keywords.normal.display"),P.t("jig.hatch.keywords.normal.global"),P.t("jig.hatch.keywords.normal.local")),o=n.keywords.add(P.t("jig.hatch.keywords.outer.display"),P.t("jig.hatch.keywords.outer.global"),P.t("jig.hatch.keywords.outer.local")),a=n.keywords.add(P.t("jig.hatch.keywords.ignore.display"),P.t("jig.hatch.keywords.ignore.global"),P.t("jig.hatch.keywords.ignore.local"));n.keywords.default=t==="Outer"?o:t==="Ignore"?a:i;let s=await Y.instance.editor.getKeywords(n);(s.status===V.OK||s.status===V.Keyword)&&s.stringResult&&(this.settings.style=this.keywordToStyle(s.stringResult))}async promptAssociative(){let e=this.getActiveSettings(),t=new Hr(P.t("jig.hatch.associative"));t.allowNone=!0;let n=t.keywords.add(P.t("jig.hatch.keywords.yes.display"),P.t("jig.hatch.keywords.yes.global"),P.t("jig.hatch.keywords.yes.local")),i=t.keywords.add(P.t("jig.hatch.keywords.no.display"),P.t("jig.hatch.keywords.no.global"),P.t("jig.hatch.keywords.no.local"));t.keywords.default=e.associative?n:i;let o=await Y.instance.editor.getKeywords(t);if(o.status===V.OK||o.status===V.Keyword){let a=o.stringResult==="Yes";this.settings.associative=a,this.setActiveSysVar(oe.HPASSOC,a?1:0)}}async doSelectObjects(e){let t=new Bd(P.t("jig.hatch.select")),n=await Y.instance.editor.getSelection(t);if(n.status!==V.OK||!n.value)return!1;let i=this.collectLoopsFromIds(e,n.value.ids);return i.length?this.appendHatch(e,i):!1}async doPickPoints(e){let t=this.collectLoopsFromAllBoundaries(e);if(!t.length)return!1;let n=!1;for(;;){let i=new Ae(P.t("jig.hatch.pickPoint"));i.allowNone=!0;let o=await Y.instance.editor.getPoint(i);if(o.status!==V.OK||!o.value)break;let a=this.resolveLoopsForPickPoint(o.value,t);a.length&&this.appendHatch(e,a)&&(n=!0)}return n}async execute(e){let t=!0;for(;t;){let n=new Rl(P.t("jig.hatch.prompt"));n.allowNone=!0,n.setRejectMessage(P.t("jig.hatch.invalidBoundary")),n.addAllowedClass("Polyline"),n.addAllowedClass("Circle"),n.addAllowedClass("Arc"),n.addAllowedClass("Line"),n.keywords.add(P.t("jig.hatch.keywords.pick.display"),P.t("jig.hatch.keywords.pick.global"),P.t("jig.hatch.keywords.pick.local")),n.keywords.add(P.t("jig.hatch.keywords.select.display"),P.t("jig.hatch.keywords.select.global"),P.t("jig.hatch.keywords.select.local")),n.keywords.add(P.t("jig.hatch.keywords.pattern.display"),P.t("jig.hatch.keywords.pattern.global"),P.t("jig.hatch.keywords.pattern.local")),n.keywords.add(P.t("jig.hatch.keywords.scale.display"),P.t("jig.hatch.keywords.scale.global"),P.t("jig.hatch.keywords.scale.local")),n.keywords.add(P.t("jig.hatch.keywords.angle.display"),P.t("jig.hatch.keywords.angle.global"),P.t("jig.hatch.keywords.angle.local")),n.keywords.add(P.t("jig.hatch.keywords.style.display"),P.t("jig.hatch.keywords.style.global"),P.t("jig.hatch.keywords.style.local")),n.keywords.add(P.t("jig.hatch.keywords.associative.display"),P.t("jig.hatch.keywords.associative.global"),P.t("jig.hatch.keywords.associative.local"));let i=await Y.instance.editor.getEntity(n);if(i.status===V.OK&&i.objectId){let o=this.collectLoopsFromIds(e,[i.objectId]);if(!o.length)continue;this.appendHatch(e,o);continue}if(i.status===V.Keyword){let o=i.stringResult??"";o==="PickPoints"?await this.doPickPoints(e):o==="SelectObjects"?await this.doSelectObjects(e):o==="Pattern"?await this.promptPatternName():o==="Scale"?await this.promptPatternScale():o==="Angle"?await this.promptPatternAngle():o==="HatchStyle"?await this.promptStyle():o==="AssociativeMode"&&await this.promptAssociative();continue}t=!1}}};one._lastSettings={patternName:us,patternScale:1,patternAngleDeg:0,style:zr.Normal,associative:!0};var p4e=one,f4e=".png,.jpg,.jpeg,.bmp,.gif,.tif,.tiff",m4e=100;function g4e(r,e){if(!r.objects.imageDefinition.has(e))return e;let t=e.lastIndexOf("."),n=t>0?e.slice(0,t):e,i=t>0?e.slice(t):"",o=1;for(;r.objects.imageDefinition.has(`${n}_${o}${i}`);)o++;return`${n}_${o}${i}`}function y4e(r,e){let t=Math.max(1,r),n=Math.max(1,e),i=Math.max(t,n),o=i>0?m4e/i:1;return{width:Math.max(1,t*o),height:Math.max(1,n*o)}}async function b4e(r){let e=URL.createObjectURL(r);try{return await new Promise((t,n)=>{let i=new Image;i.onload=()=>t({width:i.naturalWidth||100,height:i.naturalHeight||100}),i.onerror=()=>n(new Error("Failed to decode image")),i.src=e})}finally{URL.revokeObjectURL(e)}}function v4e(){return new Promise(r=>{let e=document.createElement("input");e.type="file",e.accept=f4e,e.style.display="none",document.body.appendChild(e);let t=!1,n=a=>{t||(t=!0,e.removeEventListener("change",i),e.removeEventListener("cancel",o),e.remove(),r(a))},i=()=>{var a;return n((a=e.files)==null?void 0:a[0])},o=()=>n(void 0);e.addEventListener("change",i),e.addEventListener("cancel",o),e.click()})}var F6=class extends It{constructor(e,t,n,i){super(e),this._mode="point",this._position=new k,this._scale=1,this._rotationRad=0,this._baseWidth=n,this._baseHeight=i,this._entity=new hl,this._entity.image=t,this._entity.width=n,this._entity.height=i,this.applyGeometry()}get entity(){return this._entity}setMode(e){this._mode=e}setPosition(e){this._position=new k(e),this.applyGeometry()}setScale(e){this._scale=e,this.applyGeometry()}setRotationRad(e){this._rotationRad=e,this.applyGeometry()}update(e){if(this._mode==="point"&&typeof e!="number"){this.setPosition(e);return}if(typeof e=="number"){if(this._mode==="scale"){this.setScale(e>0?e:this._scale);return}this._mode==="rotation"&&this.setRotationRad(e*Math.PI/180)}}applyGeometry(){this._entity.position=new k(this._position),this._entity.width=Math.max(1e-6,this._baseWidth*this._scale),this._entity.height=Math.max(1e-6,this._baseHeight*this._scale),this._entity.rotation=this._rotationRad}},N6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=await v4e();if(!t)return;let n;try{n=await b4e(t)}catch{this.showMessage(P.t("jig.imageattach.decodeFailed"),"error");return}let i=y4e(n.width,n.height),o=new F6(e.view,t,i.width,i.height);try{o.setMode("point");let a=new Ae(P.t("jig.imageattach.insertionPoint"));a.jig=o;let s=await Y.instance.editor.getPoint(a);if(s.status!==V.OK||!s.value)return;let l=new k(s.value);o.setPosition(l),o.setMode("scale");let c=new Gr(P.t("jig.imageattach.scale"));c.allowNone=!0,c.allowNegative=!1,c.allowZero=!1,c.useDefaultValue=!0,c.defaultValue=1,c.jig=o;let u=await Y.instance.editor.getDouble(c);if(u.status===V.Cancel||u.status===V.Error)return;let h=u.status===V.OK&&u.value!==void 0?u.value:1;if(!(h>0)){this.showMessage(P.t("jig.imageattach.invalidScale"),"warning");return}o.setScale(h),o.setMode("rotation");let d=new _a(P.t("jig.imageattach.rotation"));d.allowNone=!0,d.allowNegative=!0,d.allowZero=!0,d.useDefaultValue=!0,d.defaultValue=0,d.useBasePoint=!0,d.useDashedLine=!0,d.basePoint=l,d.jig=o;let p=await Y.instance.editor.getAngle(d);if(p.status===V.Cancel||p.status===V.Error)return;let f=(p.status===V.OK&&p.value!==void 0?p.value:0)*Math.PI/180,m=e.doc.database,g=g4e(m,t.name),y=Math.max(1e-6,i.width*h),b=Math.max(1e-6,i.height*h);im(m,"IMAGEATTACH",()=>{let v=new Tp;v.sourceFileName=t.name,m.objects.imageDefinition.setAt(g,v);let x=new hl;x.position=l,x.width=y,x.height=b,x.rotation=f,x.image=t,x.imageDefId=v.objectId,m.tables.blockTable.modelSpace.appendEntity(x)})}finally{o.end()}}},sne=class{static set(e){this._options={...e}}static consume(){let e=this._options;return this._options=null,e}static clear(){this._options=null}};sne._options=null;var x4e=sne;function w4e(r){let e=r.trim();return!e||/[\r\n]/.test(e)?!1:!e.startsWith("*")}var z6=class extends It{constructor(e,t){super(e),this._mode="point",this._position=new k,this._scaleX=1,this._scaleY=1,this._scaleZ=1,this._rotationRad=0,this._entity=new pn(t),this.applyGeometry()}get entity(){return this._entity}setMode(e){this._mode=e}setPosition(e){this._position=new k(e),this.applyGeometry()}setUniformScale(e){this._scaleX=e,this._scaleY=e,this._scaleZ=e,this.applyGeometry()}setScaleFactors(e,t,n){this._scaleX=e,this._scaleY=t,this._scaleZ=n,this.applyGeometry()}setRotationRad(e){this._rotationRad=e,this.applyGeometry()}update(e){if(this._mode==="point"&&typeof e!="number"){this.setPosition(e);return}if(typeof e=="number"){if(this._mode==="scale"){this.setUniformScale(e>0?e:this._scaleX);return}this._mode==="rotation"&&this.setRotationRad(e*Math.PI/180)}}applyGeometry(){this._entity.position=new k(this._position),this._entity.scaleFactors=new k(this._scaleX,this._scaleY,this._scaleZ),this._entity.rotation=this._rotationRad}},U6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.doc.database.tables.blockTable,n=x4e.consume(),i=new fi(P.t("jig.insert.blockName")),o=await Y.instance.editor.getString(i);if(o.status!==V.OK)return;let a=String(o.stringResult??"").trim();if(!w4e(a)){this.showMessage(P.t("jig.insert.invalidBlockName"),"warning");return}if(!t.has(a)){this.showMessage(`${P.t("jig.insert.blockNotFound")}: ${a}`,"warning");return}let s=t.getAt(a);if(s!=null&&s.isXref){this.showMessage(P.t("jig.insert.xrefNotAllowed"),"warning");return}let l=new z6(e.view,a);try{do if(!await this.placeOne(e,a,l,n))return;while(n!=null&&n.repeatPlacement)}finally{l.end()}}async placeOne(e,t,n,i){let o=e.doc.database;n.setMode("point");let a=new Ae(P.t("jig.insert.insertionPoint"));a.jig=n;let s=await Y.instance.editor.getPoint(a);if(s.status!==V.OK||!s.value)return!1;let l=new k(s.value);n.setPosition(l);let c=1,u=1,h=1;if(i?.specifyScale===!1&&i)c=PF(i.scaleX,1),u=PF(i.scaleY,c),h=PF(i.scaleZ,c),n.setScaleFactors(c,u,h);else{n.setMode("scale");let f=new Gr(P.t("jig.insert.scale"));f.allowNone=!0,f.allowNegative=!1,f.allowZero=!1,f.useDefaultValue=!0,f.defaultValue=1,f.jig=n;let m=await Y.instance.editor.getDouble(f);if(m.status===V.Cancel||m.status===V.Error)return!1;let g=m.status===V.OK&&m.value!==void 0?m.value:1;if(!(g>0))return this.showMessage(P.t("jig.insert.invalidScale"),"warning"),!1;c=u=h=g,n.setUniformScale(g)}let d=0;if(i?.specifyRotation===!1&&i)d=Number.isFinite(i.rotationDeg)?i.rotationDeg:0,n.setRotationRad(d*Math.PI/180);else{n.setMode("rotation");let f=new _a(P.t("jig.insert.rotation"));f.allowNone=!0,f.allowNegative=!0,f.allowZero=!0,f.useDefaultValue=!0,f.defaultValue=0,f.useBasePoint=!0,f.useDashedLine=!0,f.basePoint=l,f.jig=n;let m=await Y.instance.editor.getAngle(f);if(m.status===V.Cancel||m.status===V.Error)return!1;d=m.status===V.OK&&m.value!==void 0?m.value:0}let p=d*Math.PI/180;return im(o,"INSERT",()=>{let f=new pn(t);f.position=l,f.scaleFactors=new k(c,u,h),f.rotation=p,o.tables.blockTable.modelSpace.appendEntity(f)}),!0}};function PF(r,e){return r!==void 0&&r>0?r:e}var j6=class extends It{constructor(e,t,n){if(super(e),this._mline=new Oh,this._points=t,this._resolveState=n,t.length>0){let i=this._resolveState();G6(this._mline,t,i.styleName,i.justification,i.scale,!1,i.elementOffsets)}}get entity(){return this._mline}update(e){if(this._points.length<=0)return;let t=[...this._points,new k(e)],n=this._resolveState();G6(this._mline,t,n.styleName,n.justification,n.scale,!1,n.elementOffsets)}},V6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.doc.database,n=No.Zero,i=t.cmlscale??1,o=t.cmlstyle||"STANDARD",a=[],s=!1,l=()=>{let x=t.objects.mlineStyle.getAt(o);return M4e(x?.elements??[],n,i)},c=x=>a.push(new k(x)),u=()=>{a.length>1&&a.pop()},h=()=>{if(a.length<=1)return;let x=a[0],w=a[a.length-1];E4e(x,w)||c(x),s=!0},d=async()=>{let x=new Hr(P.t("jig.mline.justificationPrompt"));x.allowNone=!0,x.keywords.add(P.t("jig.mline.keywords.top.display"),P.t("jig.mline.keywords.top.global"),P.t("jig.mline.keywords.top.local")),x.keywords.add(P.t("jig.mline.keywords.zero.display"),P.t("jig.mline.keywords.zero.global"),P.t("jig.mline.keywords.zero.local")),x.keywords.add(P.t("jig.mline.keywords.bottom.display"),P.t("jig.mline.keywords.bottom.global"),P.t("jig.mline.keywords.bottom.local"));let w=await Y.instance.editor.getKeywords(x);if(w.status===V.None)return!0;if(w.status!==V.Keyword)return!1;let _=w.stringResult??"";return _==="Top"?n=No.Top:_==="Bottom"?n=No.Bottom:n=No.Zero,!0},p=async()=>{let x=new Gr(P.t("jig.mline.scalePrompt"));x.allowNone=!0,x.allowZero=!0,x.allowNegative=!0,x.useDefaultValue=!0,x.defaultValue=i;let w=await Y.instance.editor.getDouble(x);return w.status===V.None?!0:w.status!==V.OK?!1:(i=w.value??i,!0)},f=()=>{let x=[...t.objects.mlineStyle.entries()].map(([w])=>w);if(x.length<=0){this.showMessage(P.t("jig.mline.styleListEmpty"),"warning");return}this.showMessage(`${P.t("jig.mline.styleListHeader")} ${x.join(", ")}`,"info")},m=async()=>{for(;;){let x=new fi(P.t("jig.mline.stylePrompt"));x.allowEmpty=!1,x.allowSpaces=!1;let w=await Y.instance.editor.getString(x);if(w.status!==V.OK)return!1;let _=(w.stringResult??"").trim();if(_){if(_==="?"){f();continue}return o=_,!0}}},g=async x=>x==="Justification"?await d():x==="Scale"?await p():x==="Style"?await m():!0;for(;;){let x=new Ae(P.t("jig.mline.startPointWithOptions"));x.keywords.add(P.t("jig.mline.keywords.justification.display"),P.t("jig.mline.keywords.justification.global"),P.t("jig.mline.keywords.justification.local")),x.keywords.add(P.t("jig.mline.keywords.scale.display"),P.t("jig.mline.keywords.scale.global"),P.t("jig.mline.keywords.scale.local")),x.keywords.add(P.t("jig.mline.keywords.style.display"),P.t("jig.mline.keywords.style.global"),P.t("jig.mline.keywords.style.local"));let w=await Y.instance.editor.getPoint(x);if(w.status===V.OK){c(w.value);break}if(w.status!==V.Keyword||!await g(w.stringResult??""))return}class y{buildPrompt(){let w=new Ae(P.t("jig.mline.nextPointWithOptions"));return w.keywords.add(P.t("jig.mline.keywords.justification.display"),P.t("jig.mline.keywords.justification.global"),P.t("jig.mline.keywords.justification.local")),w.keywords.add(P.t("jig.mline.keywords.scale.display"),P.t("jig.mline.keywords.scale.global"),P.t("jig.mline.keywords.scale.local")),w.keywords.add(P.t("jig.mline.keywords.style.display"),P.t("jig.mline.keywords.style.global"),P.t("jig.mline.keywords.style.local")),w.keywords.add(P.t("jig.mline.keywords.undo.display"),P.t("jig.mline.keywords.undo.global"),P.t("jig.mline.keywords.undo.local")),a.length>1&&w.keywords.add(P.t("jig.mline.keywords.close.display"),P.t("jig.mline.keywords.close.global"),P.t("jig.mline.keywords.close.local")),w.useDashedLine=!0,w.useBasePoint=!0,w.basePoint=new k(a[a.length-1]),w.jig=new j6(e.view,a,()=>({justification:n,scale:i,styleName:o,elementOffsets:l()})),w.allowNone=!0,w}async handleResult(w){if(w.status===V.OK)return c(w.value),"continue";if(w.status!==V.Keyword)return"finish";let _=w.stringResult??"";return _==="Undo"?(u(),"continue"):_==="Close"&&a.length>1?(h(),"finish"):await g(_)?"continue":"finish"}}let b=new Bl;if(b.setState(new y),await b.run(x=>Y.instance.editor.getPoint(x)),a.length<2)return;let v=new Oh;G6(v,a,o,n,i,s,l()),t.tables.blockTable.modelSpace.appendEntity(v),t.cmlstyle=o,t.cmlscale=i}};function G6(r,e,t,n,i,o,a){if(e.length<=0){r.clearSegments();return}if(r.styleName=t,r.styleObjectHandle="",r.justification=n,r.scale=i,r.styleCount=a.length,r.closed=o,r.startPosition=e[0],e.length<2){r.clearSegments();return}r.segments=_4e(e,a)}function _4e(r,e){let t=S4e(r);return r.slice(1).map((n,i)=>{let o=i+1,a=A4e(t,o);return{position:n,direction:t[Math.min(o,t.length-1)],miterDirection:a.direction,elements:e.map(s=>({parameterCount:1,parameters:[s*a.offsetScale],fillCount:0,fillParameters:[]}))}})}function S4e(r){let e=[];for(let t=0;t<r.length-1;t++){let n=r[t],i=r[t+1],o=yU({x:i.x-n.x,y:i.y-n.y,z:i.z-n.z});e.push(o??{x:1,y:0,z:0})}return e}function A4e(r,e){if(r.length<=0)return{direction:{x:0,y:1,z:0},offsetScale:1};if(e<=0)return{direction:mT(r[0]),offsetScale:1};if(e>=r.length)return{direction:mT(r[r.length-1]),offsetScale:1};let t=mT(r[e-1]),n=mT(r[e]),i=yU({x:t.x+n.x,y:t.y+n.y,z:t.z+n.z});if(!i)return{direction:n,offsetScale:1};let o=Math.abs(P4e(i,n));return Ce.isNonPositive(o)?{direction:i,offsetScale:1}:{direction:i,offsetScale:1/o}}function M4e(r,e,t){if(r.length<=0)return[];let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(let a of r)a.offset<n&&(n=a.offset),a.offset>i&&(i=a.offset);let o=0;return e===No.Top?o=-i:e===No.Bottom&&(o=-n),r.map(a=>(a.offset+o)*t)}function mT(r){return yU({x:-r.y,y:r.x,z:0})??{x:0,y:1,z:0}}function yU(r){let e=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);if(Ce.isPositive(e))return{x:r.x/e,y:r.y/e,z:r.z/e}}function P4e(r,e){return r.x*e.x+r.y*e.y+r.z*e.z}function E4e(r,e){return Ji.equalPoint3d(r,e)}var H6=class extends xt{constructor(){super(),this.mtextEditor=new nm,this.mode=at.Write}async execute(e){let t=new R1(P.t("main.inputManager.firstCorner"),P.t("main.inputManager.secondCorner"));t.useBasePoint=!1,t.useDashedLine=!1;let n=await Y.instance.editor.getBox(t);if(n.status!==V.OK||!n.value)return;let i=n.value,o=Math.max(Math.abs(i.max.x-i.min.x),1e-4),a=e.view,s=this.pixelsToWorldY(a,24),l={x:i.min.x,y:i.max.y,z:0},c=await Y.instance.getAvaiableFonts()??[],u=Array.from(new Set(c.flatMap(p=>p.name).map(p=>p.trim()).filter(p=>p.length>0))),h=await this.mtextEditor.open({view:a,location:l,width:o,textHeight:s,toolbarFontFamilies:u});if(!h||!h.contents.trim())return;let d=new Ro;d.location=h.location,d.contents=h.contents,d.width=h.width,d.height=h.height,d.lineSpacingFactor=h.lineSpacingFactor,d.attachmentPoint=h.attachmentPoint,e.doc.database.tables.blockTable.modelSpace.appendEntity(d)}pixelsToWorldY(e,t){let n=e.screenToWorld({x:0,y:0}),i=e.screenToWorld({x:0,y:t});return Math.max(Math.abs(i.y-n.y),1e-4)}},W6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){for(;;){let t=new Ae(P.t("jig.point.point")),n=await Y.instance.editor.getPoint(t);if(n.status!==V.OK||!n.value)return;let i=new Up;i.position=new k(n.value),e.doc.database.tables.blockTable.modelSpace.appendEntity(i)}}},C4e=3,T4e=1024;function k4e(r,e){return Math.hypot(e.x-r.x,e.y-r.y)}function bU(r,e){r.reset(!1),e.forEach((t,n)=>r.addVertexAt(n,t)),r.closed=!0}function lne(r,e,t,n){let i=k4e(r,t);if(Ce.isNonPositive(i))return;let o=Math.PI*2/e,a=Math.atan2(t.y-r.y,t.x-r.x),s=n==="Inscribed"?i:i/Math.cos(Math.PI/e);if(!Number.isFinite(s)||Ce.isNonPositive(s))return;let l=n==="Inscribed"?a:a+o/2,c=[];for(let u=0;u<e;u++){let h=l+u*o;c.push(new Z(r.x+s*Math.cos(h),r.y+s*Math.sin(h)))}return c}function cne(r,e,t){let n=e.x-r.x,i=e.y-r.y,o=Math.hypot(n,i);if(Ce.isNonPositive(o))return;let a=Math.PI*2/t,s=[new Z(r),new Z(e)],l=e.x,c=e.y,u=n,h=i;for(let d=2;d<t;d++){let p=u*Math.cos(a)-h*Math.sin(a),f=u*Math.sin(a)+h*Math.cos(a);l+=p,c+=f,s.push(new Z(l,c)),u=p,h=f}return s}var X6=class extends It{constructor(e,t,n,i){super(e),this._polyline=new Dt,this._center=t,this._sides=n,this._modeProvider=i}get entity(){return this._polyline}update(e){let t=lne(this._center,this._sides,e,this._modeProvider());t&&bU(this._polyline,t)}},Y6=class extends It{constructor(e,t,n){super(e),this._polyline=new Dt,this._firstPoint=t,this._sides=n}get entity(){return this._polyline}update(e){let t=cne(this._firstPoint,e,this._sides);t&&bU(this._polyline,t)}},une=class $6 extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=await this.promptSides();if(t==null)return;let n=new Ae(P.t("jig.polygon.centerOrEdge"));this.addKeyword(n,"edge");let i=await Y.instance.editor.getPoint(n);if(i.status===V.Keyword){i.stringResult==="Edge"&&await this.runEdgeFlow(e,t);return}i.status===V.OK&&await this.runCenterFlow(e,t,i.value)}addKeyword(e,t){e.keywords.add(P.t(`jig.polygon.keywords.${t}.display`),P.t(`jig.polygon.keywords.${t}.global`),P.t(`jig.polygon.keywords.${t}.local`))}appendPolygon(e,t){let n=new Dt;bU(n,t),e.doc.database.tables.blockTable.modelSpace.appendEntity(n)}warnInvalidInput(e){this.notify(P.t(`jig.polygon.invalid.${e}`),"warning")}async promptSides(){for(;;){let e=$6._lastSides,t=new fi(P.t("jig.polygon.numberOfSides"));t.allowEmpty=!0,t.allowSpaces=!1,t.defaultValue=String(e),t.useDefaultValue=!0;let n=await Y.instance.editor.getString(t);if(n.status!==V.OK)return;let i=(n.stringResult??"").trim(),o=i===""?e:Number(i);if(Number.isInteger(o)&&o>=C4e&&o<=T4e)return $6._lastSides=o,o;this.warnInvalidInput("sides")}}async runCenterFlow(e,t,n){let i="Inscribed";for(;;){let o=new Ae(P.t("jig.polygon.radiusOrType"));this.addKeyword(o,"inscribed"),this.addKeyword(o,"circumscribed"),o.useDashedLine=!0,o.useBasePoint=!0,o.basePoint=new k(n),o.jig=new X6(e.view,n,t,()=>i);let a=await Y.instance.editor.getPoint(o);if(a.status===V.Keyword){let l=a.stringResult??"";if(l==="Inscribed"){i="Inscribed";continue}if(l==="Circumscribed"){i="Circumscribed";continue}return}if(a.status!==V.OK)return;let s=lne(n,t,a.value,i);if(!s){this.warnInvalidInput("radius");continue}this.appendPolygon(e,s);return}}async runEdgeFlow(e,t){let n=new Ae(P.t("jig.polygon.edgeStart")),i=await Y.instance.editor.getPoint(n);if(i.status!==V.OK)return;let o=i.value,a=new Ae(P.t("jig.polygon.edgeEnd"));a.useDashedLine=!0,a.useBasePoint=!0,a.basePoint=new k(o),a.jig=new Y6(e.view,o,t);let s=await Y.instance.editor.getPoint(a);if(s.status!==V.OK)return;let l=cne(o,s.value,t);if(!l){this.warnInvalidInput("edge");return}this.appendPolygon(e,l)}};une._lastSides=4;var I4e=une,K6=class extends It{constructor(e,t,n,i,o){super(e),this._hasTemp=!1,this._polyline=new Dt,this._points=t,this._bulges=n,this._currentBulge=i,this._bulgeProvider=o,this._baseCount=t.length,this._appliedBulge=this._bulges[this._baseCount-1],this.addBaseVertices()}get entity(){return this._polyline}update(e){var t;if(this._baseCount===0)return;this._hasTemp&&(this._polyline.removeVertexAt(this._baseCount),this._hasTemp=!1);let n=this._baseCount-1,i=((t=this._bulgeProvider)==null?void 0:t.call(this,e))??this._currentBulge??this._bulges[n];if(i!==this._appliedBulge){let o=this._points[n];this._polyline.removeVertexAt(n),this._polyline.addVertexAt(n,o,i),this._appliedBulge=i}this._polyline.addVertexAt(this._baseCount,new Z(e),void 0),this._hasTemp=!0}addBaseVertices(){this._points.forEach((e,t)=>this._polyline.addVertexAt(t,e,this._bulges[t]))}},q6=class extends It{constructor(e,t,n){super(e),this._polyline=new Dt,t.forEach((i,o)=>this._polyline.addVertexAt(o,i,n[o]))}get entity(){return this._polyline}update(e){}},Z6=class extends xt{constructor(){super(),this.mode=at.Write}complementBulge(e){if(Ce.equalToZero(e))return e;let t=4*Math.atan(e),n=(Math.sign(t)||1)*(Math.PI*2-Math.abs(t));return Ce.equalToZero(n)?e:Math.tan(n/4)}flipArcBulgeForCtrl(e){return-this.complementBulge(e)}computeArcCenterFromBulge(e,t,n){let i=t.x-e.x,o=t.y-e.y,a=Math.hypot(i,o);if(Ce.isNonPositive(a))return;let s=(e.x+t.x)/2,l=(e.y+t.y)/2,c=-o/a,u=i/a,h=a/2*n;return{x:s+c*h,y:l+u*h}}getGeometricTangentAtPoint(e,t,n){let i=e.x-t.x,o=e.y-t.y;return n?Math.atan2(-o,i):Math.atan2(o,-i)}getArcTangentAtEnd(e,t,n){let i=this.computeArcCenterFromBulge(e,t,n);if(i)return this.getGeometricTangentAtPoint(t,i,n>=0)}getIncomingTangentRadians(e,t){if(e.length<2)return 0;let n=e[e.length-1],i=e[e.length-2],o=t[e.length-2];return o==null||Ce.equalToZero(o)?Math.atan2(n.y-i.y,n.x-i.x):this.getArcTangentAtEnd(i,n,o)??Math.atan2(n.y-i.y,n.x-i.x)}computeBulgeFromTangentDirection(e,t,n){let i=Math.cos(n),o=Math.sin(n),a=t.x-e.x,s=t.y-e.y,l=-o,c=i,u=2*(a*l+s*c);if(Ce.equalToZero(u))return;let h=(a*a+s*s)/u;if(!Number.isFinite(h))return;let d={x:e.x+l*h,y:e.y+c*h};return this.computeBulgeFromCenterWithTangent(e,t,d,n)}computeBulgeFromCenterWithTangent(e,t,n,i){let o=e.x-n.x,a=e.y-n.y,s=t.x-n.x,l=t.y-n.y,c=Math.cos(i),u=Math.sin(i),h=t.x-e.x,d=t.y-e.y,p=o*u-a*c,f;Ce.isPositive(Math.abs(p))?f=p>0:f=h*u-d*c>=0;let m=Math.atan2(a,o),g=Math.atan2(l,s),y;if(f?(y=g-m,Ce.isNonPositive(y)&&(y+=Math.PI*2)):(y=m-g,Ce.isNonPositive(y)&&(y+=Math.PI*2)),!!Ce.great(Ge-y,0))return f?Math.tan(y/4):-Math.tan(y/4)}computeBulgeFromTangentAndIncludedAngle(e,t,n,i){let o=Math.cos(n),a=Math.sin(n),s=t.x-e.x,l=t.y-e.y,c=-a,u=o,h=2*(s*c+l*u);if(Ce.equalToZero(h))return;let d=(s*s+l*l)/h;if(!Number.isFinite(d))return;let p={x:e.x+c*d,y:e.y+u*d},f=this.computeBulgeFromCenterWithTangent(e,t,p,n);if(f==null)return;let m=Math.tan(i/4);if(Number.isFinite(m))return Math.sign(f)*Math.abs(m)}computeBulgeFromCenter(e,t,n){let i=e.x-n.x,o=e.y-n.y,a=t.x-n.x,s=t.y-n.y,l=i*s-o*a,c=i*a+o*s,u=Math.atan2(l,c);if(Number.isFinite(u))return Math.tan(u/4)}computeCircleCenter(e,t,n){let i=e.x,o=e.y,a=t.x,s=t.y,l=n.x,c=n.y,u=i-a,h=o-s,d=i-l,p=o-c,f=(i*i-a*a+o*o-s*s)/2,m=(i*i-l*l+o*o-c*c)/2,g=u*p-h*d;if(Ce.equalToZero(g))return;let y=(p*f-h*m)/g,b=(-d*f+u*m)/g;return new Z(y,b)}computeBulgeFromThreePoints(e,t,n){let i=this.computeCircleCenter(e,t,n);if(i)return this.computeBulgeFromCenter(e,n,i)}computeBulgeFromRadius(e,t,n){let i=Math.abs(n),o=t.x-e.x,a=t.y-e.y,s=Math.hypot(o,a);if(s===0||s>2*i)return;let l=(e.x+t.x)/2,c=(e.y+t.y)/2,u=Math.sqrt(Math.max(0,i*i-s*s/4)),h=-a/s,d=o/s,p=n>=0?1:-1,f=l+h*u*p,m=c+d*u*p,g=new Z(f,m);return this.computeBulgeFromCenter(e,t,g)}async execute(e){Y.instance.editor.resetInputToggles();let t=[],n=[],i=!1,o=E=>E==null?E:Y.instance.editor.getInputToggles().ctrlArcFlip?this.flipArcBulgeForCtrl(E):E,a=(E,S,M)=>this.computeBulgeFromCenter(E,S,M),s=(E,S,M)=>this.computeBulgeFromThreePoints(E,S,M),l=(E,S,M)=>this.computeBulgeFromRadius(E,S,M),c=()=>this.getIncomingTangentRadians(t,n),u=E=>{let S=f();if(S)return this.computeBulgeFromTangentDirection(S,E,c())},h=(E,S,M,T)=>this.computeBulgeFromTangentAndIncludedAngle(E,S,M,T),d=()=>new q6(e.view,t,n),p=(E,S)=>new K6(e.view,t,n,E,S),f=()=>t[t.length-1],m=E=>{t.length>0&&(n[t.length-1]=E)},g=E=>{t.push(new Z(E)),n.push(void 0)},y=()=>{t.length<=1||(t.pop(),n.pop(),n[n.length-1]=void 0)},b=E=>E!==V.OK&&E!==V.Keyword;class v{constructor(S){this.machine=S}buildPrompt(){let S=new Ae(P.t("jig.polyline.nextPointWithOptions"));S.keywords.add(P.t("jig.polyline.keywords.arc.display"),P.t("jig.polyline.keywords.arc.global"),P.t("jig.polyline.keywords.arc.local")),S.keywords.add(P.t("jig.polyline.keywords.undo.display"),P.t("jig.polyline.keywords.undo.global"),P.t("jig.polyline.keywords.undo.local")),S.keywords.add(P.t("jig.polyline.keywords.close.display"),P.t("jig.polyline.keywords.close.global"),P.t("jig.polyline.keywords.close.local")),S.useDashedLine=!0,S.useBasePoint=!0;let M=f();return M&&(S.basePoint=new k(M)),S.jig=p(void 0),S.allowNone=!0,S}async handleResult(S){if(S.status===V.Keyword){let M=S.stringResult??"";if(M==="Arc")this.machine.setState(new x(this.machine));else if(M==="Undo")y();else if(M==="Close"&&t.length>1)return i=!0,m(void 0),"finish";return"continue"}return S.status===V.OK?(m(void 0),g(S.value),"continue"):"finish"}}class x{constructor(S){this.machine=S}buildPrompt(){let S=new Ae(P.t("jig.polyline.nextPointWithArcOptions"));S.keywords.add(P.t("jig.polyline.keywords.angle.display"),P.t("jig.polyline.keywords.angle.global"),P.t("jig.polyline.keywords.angle.local")),S.keywords.add(P.t("jig.polyline.keywords.center.display"),P.t("jig.polyline.keywords.center.global"),P.t("jig.polyline.keywords.center.local")),S.keywords.add(P.t("jig.polyline.keywords.secondPoint.display"),P.t("jig.polyline.keywords.secondPoint.global"),P.t("jig.polyline.keywords.secondPoint.local")),S.keywords.add(P.t("jig.polyline.keywords.radius.display"),P.t("jig.polyline.keywords.radius.global"),P.t("jig.polyline.keywords.radius.local")),S.keywords.add(P.t("jig.polyline.keywords.line.display"),P.t("jig.polyline.keywords.line.global"),P.t("jig.polyline.keywords.line.local")),S.keywords.add(P.t("jig.polyline.keywords.undo.display"),P.t("jig.polyline.keywords.undo.global"),P.t("jig.polyline.keywords.undo.local")),S.keywords.add(P.t("jig.polyline.keywords.close.display"),P.t("jig.polyline.keywords.close.global"),P.t("jig.polyline.keywords.close.local")),S.useDashedLine=!0,S.useBasePoint=!0;let M=f();return M&&(S.basePoint=new k(M)),S.jig=p(void 0,T=>o(u(T))),S.allowNone=!0,S}async handleResult(S){if(S.status===V.OK){let L=u(S.value);return L===void 0||(m(o(L)),g(S.value)),"continue"}if(S.status!==V.Keyword)return"finish";let M=S.stringResult??"";if(M==="Line")return this.machine.setState(new v(this.machine)),"continue";if(M==="Undo")return y(),"continue";if(M==="Close"&&t.length>1)return i=!0,m(void 0),"finish";let T=f();if(!T)return"finish";if(M==="Angle"){let L=new Gr(P.t("jig.polyline.arcAngle"));L.jig=d();let O=await Y.instance.editor.getDouble(L);if(b(O.status))return"finish";let D=new Ae(P.t("jig.polyline.arcEndPoint"));D.useDashedLine=!0,D.useBasePoint=!0,D.basePoint=new k(T);let z=(O.value??0)*(Math.PI/180),N=c();D.jig=p(void 0,Q=>o(h(T,Q,N,z)));let J=await Y.instance.editor.getPoint(D);if(b(J.status))return"finish";let X=h(T,J.value,N,z);return X===void 0||(m(o(X)),g(J.value)),"continue"}if(M==="Center"){let L=new Ae(P.t("jig.polyline.arcCenter"));L.jig=d();let O=await Y.instance.editor.getPoint(L);if(b(O.status))return"finish";let D=new Ae(P.t("jig.polyline.arcEndPoint"));D.useDashedLine=!0,D.useBasePoint=!0,D.basePoint=new k(T),D.jig=p(void 0,J=>o(a(T,J,O.value)));let z=await Y.instance.editor.getPoint(D);if(b(z.status))return"finish";let N=a(T,z.value,O.value);return N===void 0||(m(o(N)),g(z.value)),"continue"}if(M==="SecondPoint"){let L=new Ae(P.t("jig.polyline.arcSecondPoint"));L.jig=d(),L.useDashedLine=!0,L.useBasePoint=!0,L.basePoint=new k(T);let O=await Y.instance.editor.getPoint(L);if(b(O.status))return"finish";let D=new Ae(P.t("jig.polyline.arcEndPoint"));D.useDashedLine=!0,D.useBasePoint=!0,D.basePoint=new k(T),D.jig=p(void 0,J=>o(s(T,O.value,J)));let z=await Y.instance.editor.getPoint(D);if(b(z.status))return"finish";let N=s(T,O.value,z.value);return N===void 0||(m(o(N)),g(z.value)),"continue"}if(M==="Radius"){let L=new Gr(P.t("jig.polyline.arcRadius"));L.jig=d();let O=await Y.instance.editor.getDouble(L);if(b(O.status))return"finish";let D=new Ae(P.t("jig.polyline.arcEndPoint"));D.useDashedLine=!0,D.useBasePoint=!0,D.basePoint=new k(T),D.jig=p(void 0,J=>o(l(T,J,O.value??0)));let z=await Y.instance.editor.getPoint(D);if(b(z.status))return"finish";let N=l(T,z.value,O.value??0);return N===void 0||(m(o(N)),g(z.value)),"continue"}return"continue"}}let w=new Ae(P.t("jig.polyline.firstPoint")),_=await Y.instance.editor.getPoint(w);if(_.status!==V.OK)return;g(_.value);let A=new Bl;if(A.setState(new v(A)),await A.run(E=>Y.instance.editor.getPoint(E)),t.length>=2){let E=e.doc.database,S=new Dt;t.forEach((M,T)=>S.addVertexAt(T,M,n[T])),i&&(S.closed=!0),E.tables.blockTable.modelSpace.appendEntity(S)}}};function hne(r,e){let t=new k(e).sub(r);if(Ce.isPositive(t.length()))return t.normalize()}var J6=class extends It{constructor(e,t){super(e),this._startPoint=new k(t),this._ray=new oc,this._ray.basePoint=new k(t),this._ray.unitDir=new k(1,0,0)}get entity(){return this._ray}update(e){let t=hne(this._startPoint,e);t&&(this._ray.basePoint=new k(this._startPoint),this._ray.unitDir=t)}},Q6=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.doc.database,n=new Ae(P.t("jig.ray.startPoint")),i=await Y.instance.editor.getPoint(n);if(i.status!==V.OK)return;let o=new k(i.value);for(;;){let a=new Ae(P.t("jig.ray.throughPoint"));a.useDashedLine=!0,a.useBasePoint=!0,a.basePoint=new k(o),a.jig=new J6(e.view,o);let s=await Y.instance.editor.getPoint(a);if(s.status!==V.OK)break;let l=hne(o,s.value);if(!l)continue;let c=new oc;c.basePoint=new k(o),c.unitDir=l,t.tables.blockTable.modelSpace.appendEntity(c)}}},L4e=Math.tan(Math.PI/8),O4e={chamferDist1:0,chamferDist2:0,filletRadius:0,width:0,elevation:0,thickness:0,rotation:0};function _d(r,e){r.keywords.add(P.t(`jig.rect.keywords.${e}.display`),P.t(`jig.rect.keywords.${e}.global`),P.t(`jig.rect.keywords.${e}.local`))}function D4e(r,e){r.keywords.add(P.t(`jig.rect.keywords.${e}.display`),P.t(`jig.rect.keywords.${e}.global`),P.t(`jig.rect.keywords.${e}.local`))}function R4e(r,e,t){let n=Math.cos(t),i=Math.sin(t);return new Z(r.x+e.x*n-e.y*i,r.y+e.x*i+e.y*n)}function B4e(r,e,t){let n=e.x-r.x,i=e.y-r.y,o=Math.cos(t),a=Math.sin(t);return new Z(n*o+i*a,-n*a+i*o)}function jb(r){return Number.isFinite(r??NaN)?Math.max(0,r??0):0}function vU(r,e){return[{point:new Z(0,0)},{point:new Z(r,0)},{point:new Z(r,e)},{point:new Z(0,e)}]}function dne(r,e,t,n){let i=r>=0?1:-1,o=e>=0?1:-1,a=Math.abs(r),s=Math.abs(e),l=Math.min(jb(t),a/2),c=Math.min(jb(n),s/2);if(Ce.isNonPositive(l)&&Ce.isNonPositive(c))return vU(r,e);let u=new Z(i*l,0),h=new Z(0,o*c),d=new Z(r-i*l,0),p=new Z(r,o*c),f=new Z(r,e-o*c),m=new Z(r-i*l,e),g=new Z(i*l,e),y=new Z(0,e-o*c);return[{point:u},{point:d},{point:p},{point:f},{point:m},{point:g},{point:y},{point:h}]}function F4e(r,e,t){let n=Math.abs(r),i=Math.abs(e),o=Math.min(jb(t),n/2,i/2);if(Ce.isNonPositive(o))return vU(r,e);let a=dne(r,e,o,o),s=(r*e>=0?1:-1)*L4e;return a.map((l,c)=>({point:l.point,bulge:c%2===1?s:void 0}))}function N4e(r,e,t){return Ce.isPositive(t.filletRadius)?F4e(r,e,t.filletRadius):Ce.isPositive(t.chamferDist1)||Ce.isPositive(t.chamferDist2)?dne(r,e,t.chamferDist1,t.chamferDist2):vU(r,e)}function xU(r,e,t,n){let i=0,o=0;if(t.mode==="corner"){let l=B4e(e,t.secondPoint,n.rotation);i=l.x,o=l.y}else i=t.length,o=t.width;if(Ce.equalToZero(i)||Ce.equalToZero(o))return!1;r.reset(!1);let a=N4e(i,o,n),s=jb(n.width);return a.forEach((l,c)=>{let u=R4e(e,l.point,n.rotation);Ce.isPositive(s)?r.addVertexAt(c,u,l.bulge,s,s):r.addVertexAt(c,u,l.bulge)}),r.elevation=n.elevation,r.closed=!0,!0}var e8=class extends It{constructor(e,t,n){super(e),this._rect=new Dt,this._firstPoint=new Z(t),this._settingsProvider=n}get entity(){return this._rect}update(e){xU(this._rect,this._firstPoint,{mode:"corner",secondPoint:e},this._settingsProvider())}},Id=class extends It{constructor(e,t,n,i){super(e),this._rect=new Dt,xU(this._rect,t,n,i)}get entity(){return this._rect}update(e){}};function t8(r){return{chamferDist1:r.chamferDist1,chamferDist2:r.chamferDist2,filletRadius:r.filletRadius,width:r.width,elevation:r.elevation,thickness:r.thickness,rotation:r.rotation}}function rh(r){return Number.isFinite(r??NaN)&&Ce.isPositive(r??0)}var pne=class n8 extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=t8(n8._settings),n=await this.promptFirstCorner(t);if(!n)return;let i=await this.promptSecondInput(e,n,t);if(!i)return;let o=new Dt;if(!xU(o,n,i,t)){this.warnRectMessage("invalidRect");return}Ce.isPositive(t.thickness)&&this.warnRectMessage("thicknessNotSupported"),e.doc.database.tables.blockTable.modelSpace.appendEntity(o),n8._settings=t8(t)}warnRectMessage(e){this.notify(P.t(`jig.rect.${e}`),"warning")}async promptFirstCorner(e){for(;;){let t=new Ae(P.t("jig.rect.firstPointWithOptions"));_d(t,"chamfer"),_d(t,"elevation"),_d(t,"fillet"),_d(t,"thickness"),_d(t,"width");let n=await Y.instance.editor.getPoint(t);if(n.status===V.OK)return n.value;if(n.status!==V.Keyword)return;let i=n.stringResult??"";if(i==="Chamfer"){if(!await this.promptChamfer(e))return}else if(i==="Elevation"){if(!await this.promptElevation(e))return}else if(i==="Fillet"){if(!await this.promptFillet(e))return}else if(i==="Thickness"){if(!await this.promptThickness(e))return}else if(i==="Width"&&!await this.promptWidth(e))return}}async promptSecondInput(e,t,n){let i;class o{constructor(l){this.cmd=l}buildPrompt(){let l=new Ae(P.t("jig.rect.otherCornerWithOptions"));return _d(l,"area"),_d(l,"dimensions"),_d(l,"rotation"),l.useDashedLine=!1,l.useBasePoint=!0,l.basePoint=new k(t),l.jig=new e8(e.view,t,()=>n),l}async handleResult(l){if(l.status===V.OK)return i={mode:"corner",secondPoint:l.value},"finish";if(l.status!==V.Keyword)return"finish";let c=l.stringResult??"";if(c==="Rotation")return await this.cmd.promptRotation(e,t,n)?"continue":"finish";if(c==="Dimensions"){let u=await this.cmd.promptDimensions(e,t,n);return u&&(i=u),"finish"}if(c==="Area"){let u=await this.cmd.promptArea(e,t,n);return u&&(i=u),"finish"}return"continue"}}let a=new Bl;return a.setState(new o(this)),await a.run(s=>Y.instance.editor.getPoint(s)),i}async promptPositiveDouble(e,t){for(;;){let n=new Gr(e);n.allowNegative=!1,n.allowZero=!1,t&&(n.jig=t);let i=await Y.instance.editor.getDouble(n);if(i.status!==V.OK)return;if(rh(i.value))return i.value;this.warnRectMessage("invalidPositive")}}async promptChamfer(e){let t=await this.promptPositiveDouble(P.t("jig.rect.chamferFirst"));if(!rh(t))return!1;let n=await this.promptPositiveDouble(P.t("jig.rect.chamferSecond"));return rh(n)?(e.chamferDist1=t,e.chamferDist2=n,e.filletRadius=0,!0):!1}async promptFillet(e){let t=await this.promptPositiveDouble(P.t("jig.rect.filletRadius"));return rh(t)?(e.filletRadius=t,e.chamferDist1=0,e.chamferDist2=0,!0):!1}async promptWidth(e){let t=new Gr(P.t("jig.rect.segmentWidth"));t.allowNegative=!1,t.allowZero=!0;let n=await Y.instance.editor.getDouble(t);return n.status!==V.OK?!1:(e.width=jb(n.value),!0)}async promptElevation(e){let t=new Gr(P.t("jig.rect.elevationValue"));t.allowNegative=!0,t.allowZero=!0;let n=await Y.instance.editor.getDouble(t);return n.status!==V.OK?!1:(e.elevation=n.value??0,!0)}async promptThickness(e){let t=new Gr(P.t("jig.rect.thicknessValue"));t.allowNegative=!1,t.allowZero=!0;let n=await Y.instance.editor.getDouble(t);return n.status!==V.OK?!1:(e.thickness=jb(n.value),!0)}async promptRotation(e,t,n){let i=new _a(P.t("jig.rect.rotationAngle"));i.useBasePoint=!0,i.useDashedLine=!0,i.basePoint=new k(t),i.allowNegative=!0,i.allowZero=!0,i.jig=new Id(e.view,t,{mode:"dimensions",length:1,width:1},n);let o=await Y.instance.editor.getAngle(i);return o.status!==V.OK?!1:(n.rotation=(o.value??0)*Math.PI/180,!0)}async promptDimensions(e,t,n){let i={mode:"dimensions",length:1,width:1},o=await this.promptPositiveDouble(P.t("jig.rect.dimensionLength"),new Id(e.view,t,i,n));if(!rh(o))return;let a=await this.promptPositiveDouble(P.t("jig.rect.dimensionWidth"),new Id(e.view,t,{mode:"dimensions",length:o,width:1},n));if(rh(a))return{mode:"dimensions",length:o,width:a}}async promptArea(e,t,n){let i=await this.promptPositiveDouble(P.t("jig.rect.areaValue"),new Id(e.view,t,{mode:"dimensions",length:1,width:1},n));if(!rh(i))return;let o=new Gr(P.t("jig.rect.areaLengthOrWidth"));D4e(o,"rectWidth"),o.allowNegative=!1,o.allowZero=!1,o.jig=new Id(e.view,t,{mode:"dimensions",length:1,width:1},n);let a=await Y.instance.editor.getDouble(o);if(a.status===V.Keyword){if(a.stringResult!=="Width")return;let l=await this.promptPositiveDouble(P.t("jig.rect.areaSpecifyWidth"),new Id(e.view,t,{mode:"dimensions",length:1,width:1},n));return rh(l)?{mode:"dimensions",length:(i??0)/(l??1),width:l}:void 0}if(a.status!==V.OK||!rh(a.value))return;let s=a.value;return{mode:"dimensions",length:s,width:(i??0)/s}}};pne._settings=t8(O4e);var z4e=pne,MQ=1,U4e=.005,j4e=.1;function V4e(r){let e=Math.max(1,r.width),t=Math.max(1,r.height),n=r.screenToWorld({x:0,y:0}),i=r.screenToWorld({x:e,y:t});return Math.hypot(i.x-n.x,i.y-n.y)}function G4e(r){let e=V4e(r)*U4e;return Number.isFinite(e)&&e>0?e:1}function Vb(r,e){return Math.hypot(e.x-r.x,e.y-r.y)}function fne(r,e){let t=Math.min(r.x,e.x),n=Math.max(r.x,e.x),i=Math.min(r.y,e.y),o=Math.max(r.y,e.y);return[new Z(t,i),new Z(n,i),new Z(n,o),new Z(t,o)]}function H4e(r){let e=0,t=r.length;for(let n=0;n<t;n++){let i=r[n],o=r[(n+1)%t];e+=i.x*o.y-o.x*i.y}return e/2}function W4e(r){let e=r.map(t=>new Z(t.x,t.y));return e.length>=3&&H4e(e)<0&&e.reverse(),e}function mne(r,e){if(r.length<2)return 0;let t=0,n=e?r.length:r.length-1;for(let i=0;i<n;i++){let o=r[i],a=r[(i+1)%r.length];t+=Vb(o,a)}return t}function X4e(r,e,t){let n=mne(r,e),i=n>0?(t%n+n)%n:0,o=e?r.length:r.length-1;for(let s=0;s<o;s++){let l=r[s],c=r[(s+1)%r.length],u=Vb(l,c);if(i<=u||s===o-1){let h=u>0?i/u:0;return new Z(l.x+(c.x-l.x)*h,l.y+(c.y-l.y)*h)}i-=u}let a=r[e?0:r.length-1];return new Z(a.x,a.y)}function Y4e(r,e){if(!e)return 1;let t=Math.sin(r*12.9898+78.233)*43758.5453;return .75+(t-Math.floor(t))*.5}function $4e(r,e,t){let n=Math.max(e*.35,r*1e-4),i=[],o=r,a=0;for(;o>n*.5;){let s=e*Y4e(a,t);if(s=Math.min(Math.max(s,n),o),o-s<n*.5&&(s=o),i.push(s),o-=s,a++,i.length>4096)break}return i.length===0&&i.push(r),i}function K4e(r,e,t,n){if(e.length<2)return!1;let i=t?W4e(e):e,o=mne(i,t);if(!Ce.isPositive(o))return!1;let a=Math.max(n.arcLength,o*1e-4),s=$4e(o,a,n.variance!==!1);if(t&&s.length<3){let d=o/3;s.length=0,s.push(d,d,d)}let l=n.reverse?-MQ:MQ,c=n.style==="calligraphy",u=c?a*j4e:void 0;r.reset(!1);let h=0;return s.forEach((d,p)=>{let f=X4e(i,t,h);c&&u!=null?r.addVertexAt(p,f,l,0,u):r.addVertexAt(p,f,l),h+=d}),r.closed=t,r.numberOfVertices>=2}function gne(r,e,t){let n=Vb(r,e),i=Math.max(1,Math.ceil(n/Math.max(t,1e-8))),o=[];for(let a=0;a<i;a++){let s=a/i;o.push(new Z(r.x+(e.x-r.x)*s,r.y+(e.y-r.y)*s))}return o}function q4e(r,e,t,n){if(Math.abs(t)<1e-12)return gne(r,e,n);let i=e.x-r.x,o=e.y-r.y,a=Math.hypot(i,o);if(!Ce.isPositive(a))return[new Z(r.x,r.y)];let s=t>=0?1:-1,l=4*Math.atan(Math.abs(t)),c=a/(2*Math.sin(l/2)),u=(r.x+e.x)/2,h=(r.y+e.y)/2,d=-o/a,p=i/a,f=c*Math.cos(l/2),m=u+d*f*s,g=h+p*f*s,y=Math.atan2(r.y-g,r.x-m),b=l*s,v=Math.abs(c*b),x=Math.max(2,Math.ceil(v/Math.max(n,1e-8))),w=[];for(let _=0;_<x;_++){let A=y+b*_/x;w.push(new Z(m+c*Math.cos(A),g+c*Math.sin(A)))}return w}function Z4e(r){var e;let t=(e=r._geo)==null?void 0:e.vertices;if(t&&t.length>1)return t.map(o=>({x:o.x,y:o.y,bulge:o.bulge??0}));let n=r.numberOfVertices,i=r.getBulgeAt;return Array.from({length:n},(o,a)=>{let s=r.getPoint2dAt(a);return{x:s.x,y:s.y,bulge:i?.(a)??0}})}function J4e(r,e){let t=Z4e(r);if(t.length<2)return[];let n=[],i=r.closed?t.length:t.length-1;for(let o=0;o<i;o++){let a=t[o],s=t[(o+1)%t.length];n.push(...q4e(a,s,a.bulge,e))}if(!r.closed){let o=t[t.length-1];n.push(new Z(o.x,o.y))}return n}function Q4e(r,e){let t=r.radius;if(!Ce.isPositive(t))return[];let n=2*Math.PI*t,i=Math.max(8,Math.ceil(n/Math.max(e,1e-8))),o=r.center,a=[];for(let s=0;s<i;s++){let l=s/i*Math.PI*2;a.push(new Z(o.x+t*Math.cos(l),o.y+t*Math.sin(l)))}return a}function eBe(r,e){let t=r.majorAxisRadius,n=r.minorAxisRadius;if(!Ce.isPositive(t)||!Ce.isPositive(n))return[];let i=r._geo,o=i?.majorAxis??{x:1,y:0},a=Math.hypot(o.x,o.y)||1,s=o.x/a,l=o.y/a,c=-l,u=s,h=Math.PI*(3*(t+n)-Math.sqrt((3*t+n)*(t+3*n))),d=Math.max(12,Math.ceil(h/Math.max(e,1e-8))),p=r.center,f=r.startAngle??0,m=(r.endAngle??Math.PI*2)-f;m<=0&&(m+=Math.PI*2);let g=Math.abs(m-Math.PI*2)<1e-6?d:d+1,y=[];for(let b=0;b<g;b++){let v=f+m*b/d,x=t*Math.cos(v),w=n*Math.sin(v);y.push(new Z(p.x+s*x+c*w,p.y+l*x+u*w))}return y}function tBe(r,e){var t;let n=r._geo,i=(t=n?.fitPoints)!=null&&t.length?n.fitPoints:n?.controlPoints;if(!i||i.length<2)return[];let o=[],a=r.closed?i.length:i.length-1;for(let s=0;s<a;s++){let l=i[s],c=i[(s+1)%i.length];o.push(...gne(l,c,e))}if(!r.closed){let s=i[i.length-1];o.push(new Z(s.x,s.y))}return o}function nBe(r,e){if(r instanceof Dt){let t=J4e(r,e);return t.length>=2?{points:t,closed:r.closed}:void 0}if(r instanceof Do){let t=Q4e(r,e);return t.length>=2?{points:t,closed:!0}:void 0}if(r instanceof Jl){let t=eBe(r,e),n=r.startAngle??0,i=(r.endAngle??Math.PI*2)-n;for(;i<0;)i+=Math.PI*2;let o=i<1e-6||Math.abs(i-Math.PI*2)<.001;return t.length>=2?{points:t,closed:o}:void 0}if(r instanceof Ra){let t=tBe(r,e);return t.length>=2?{points:t,closed:!!r.closed}:void 0}}function yne(r,e,t){return Vb(r,e)<=Math.max(t*.5,1e-6)}var rBe={mode:"rectangular",style:"normal",variance:!0};function r1(r,e){r.keywords.add(P.t(`jig.revcloud.keywords.${e}.display`),P.t(`jig.revcloud.keywords.${e}.global`),P.t(`jig.revcloud.keywords.${e}.local`))}function Fc(r){return new Z(r.x,r.y)}function sm(r,e,t,n,i=!1){return K4e(r,e,t,{arcLength:n.arcLength??1,style:n.style,variance:n.variance,reverse:i})}var r8=class extends It{constructor(e,t,n,i){super(e),this._cloud=new Dt,this._path=t.map(Fc),this._closed=n,this._settings=i,this.rebuild()}get entity(){return this._cloud}updatePath(e,t){this._path=e.map(Fc),this._closed=t,this.rebuild()}update(e){if(this._path.length===0)return;let t=[...this._path,Fc(e)],n=this._closed&&t.length>=3;sm(this._cloud,t,n,this._settings)}rebuild(){if(this._path.length<2){this._cloud.reset(!1);return}sm(this._cloud,this._path,this._closed,this._settings)}},i8=class extends It{constructor(e,t,n){super(e),this._cloud=new Dt,this._firstPoint=Fc(t),this._settings=n}get entity(){return this._cloud}update(e){sm(this._cloud,fne(this._firstPoint,e),!0,this._settings)}},o8=class extends It{constructor(e,t,n){super(e),this._closed=!1,this._cloud=new Dt,this._points=[Fc(t)],this._settings=n}get entity(){return this._cloud}get points(){return this._points}get closed(){return this._closed}addPoint(e){let t=Fc(e),n=this._points[this._points.length-1];n&&Vb(n,t)<1e-8||this._points.push(t)}update(e){let t=this._settings.arcLength??1,n=this._points[this._points.length-1];n&&Vb(n,e)>=t&&this._points.push(Fc(e)),this._closed=this._points.length>=3&&yne(this._points[0],e,t);let i=this._closed?this._points:[...this._points,Fc(e)];sm(this._cloud,i,this._closed,this._settings)}},a8=class extends It{constructor(e,t,n,i){super(e),this._reverse=!1,this._cloud=new Dt,this._path=t,this._closed=n,this._settings=i,this._valid=sm(this._cloud,t,n,i)}get entity(){return this._cloud}get valid(){return this._valid}get reverse(){return this._reverse}update(e){}toggleReverse(){this._reverse=!this._reverse,this._valid=sm(this._cloud,this._path,this._closed,this._settings,this._reverse),this.render()}},bne=class vne extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=vne._settings;for(t.arcLength==null&&(t.arcLength=G4e(e.view));;){let n=new Ae(P.t("jig.revcloud.firstCornerOrOptions"));r1(n,"arcLength"),r1(n,"object");let i=n.keywords.add(P.t("jig.revcloud.keywords.rectangular.display"),P.t("jig.revcloud.keywords.rectangular.global"),P.t("jig.revcloud.keywords.rectangular.local")),o=n.keywords.add(P.t("jig.revcloud.keywords.polygonal.display"),P.t("jig.revcloud.keywords.polygonal.global"),P.t("jig.revcloud.keywords.polygonal.local")),a=n.keywords.add(P.t("jig.revcloud.keywords.freehand.display"),P.t("jig.revcloud.keywords.freehand.global"),P.t("jig.revcloud.keywords.freehand.local"));r1(n,"style"),n.keywords.default=t.mode==="polygonal"?o:t.mode==="freehand"?a:i;let s=await Y.instance.editor.getPoint(n);if(s.status===V.Keyword){let l=s.stringResult??"";if(l==="ArcLength"){if(!await this.promptArcLength(t))return;continue}if(l==="Object"){await this.convertObject(e,t);return}if(l==="Rectangular"){t.mode="rectangular",await this.drawRectangular(e,t);return}if(l==="Polygonal"){t.mode="polygonal",await this.drawPolygonal(e,t);return}if(l==="Freehand"){t.mode="freehand",await this.drawFreehand(e,t);return}if(l==="Style"){if(!await this.promptStyle(t))return;continue}continue}if(s.status!==V.OK||!s.value)return;t.mode==="polygonal"?await this.drawPolygonal(e,t,s.value):t.mode==="freehand"?await this.drawFreehand(e,t,s.value):await this.drawRectangular(e,t,s.value);return}}async promptArcLength(e){let t=new Zo(P.t("jig.revcloud.arcLength"));t.allowNegative=!1,t.allowZero=!1,t.useDefaultValue=e.arcLength!=null,t.defaultValue=e.arcLength??1;let n=await Y.instance.editor.getDistance(t);if(n.status!==V.OK&&n.status!==V.None)return!1;let i=n.value??t.defaultValue;return Ce.isPositive(i)?(e.arcLength=i,!0):(this.showMessage(P.t("jig.revcloud.invalidArcLength"),"warning"),!0)}async promptStyle(e){let t=new Hr(P.t("jig.revcloud.style"));t.allowNone=!0;let n=t.keywords.add(P.t("jig.revcloud.keywords.normal.display"),P.t("jig.revcloud.keywords.normal.global"),P.t("jig.revcloud.keywords.normal.local")),i=t.keywords.add(P.t("jig.revcloud.keywords.calligraphy.display"),P.t("jig.revcloud.keywords.calligraphy.global"),P.t("jig.revcloud.keywords.calligraphy.local"));t.keywords.default=e.style==="calligraphy"?i:n;let o=await Y.instance.editor.getKeywords(t);return o.status===V.Cancel?!1:((o.status===V.OK||o.status===V.Keyword)&&(o.stringResult==="Calligraphy"?e.style="calligraphy":o.stringResult==="Normal"&&(e.style="normal")),!0)}async drawRectangular(e,t,n){let i=n??await this.promptPoint("firstCorner");if(!i)return;let o=new Ae(P.t("jig.revcloud.oppositeCorner"));o.useBasePoint=!0,o.basePoint=new k(i.x,i.y,0),o.useDashedLine=!1,o.jig=new i8(e.view,i,t);let a=await Y.instance.editor.getPoint(o);if(a.status!==V.OK||!a.value)return;let s=fne(i,a.value);Ce.equalToZero(s[0].x-s[1].x)||Ce.equalToZero(s[0].y-s[3].y)||await this.commitCloud(e,s,!0,t)}async drawPolygonal(e,t,n){let i=n??await this.promptPoint("startPoint");if(!i)return;let o=[Fc(i)];class a{buildPrompt(){let c=new Ae(P.t(o.length>=2?"jig.revcloud.nextPointOrUndo":"jig.revcloud.nextPoint"));o.length>=2&&r1(c,"undo"),c.useDashedLine=!1,c.useBasePoint=!0;let u=o[o.length-1];return c.basePoint=new k(u.x,u.y,0),c.allowNone=o.length>=3,c.jig=new r8(e.view,o,!0,t),c}async handleResult(c){return c.status===V.Keyword?(c.stringResult==="Undo"&&o.length>1&&o.pop(),"continue"):c.status===V.OK&&c.value?(o.push(Fc(c.value)),"continue"):"finish"}}let s=new Bl;s.setState(new a),await s.run(l=>Y.instance.editor.getPoint(l)),!(o.length<3)&&await this.commitCloud(e,o,!0,t)}async drawFreehand(e,t,n){let i=n??await this.promptPoint("firstPoint");if(!i)return;let o=new o8(e.view,i,t),a=t.arcLength??1;for(;;){let s=new Ae(P.t("jig.revcloud.guideCursor"));s.jig=o,s.useDashedLine=!1,s.useBasePoint=!0,s.basePoint=new k(i.x,i.y,0),s.allowNone=!0,s.disableOSnap=!0;let l=await Y.instance.editor.getPoint(s);if(l.status===V.Cancel)return;if(l.status===V.None){if(o.points.length<2)return;await this.commitCloud(e,o.points,o.closed,t);return}if(l.status!==V.OK||!l.value)return;if(o.points.length>=3&&yne(o.points[0],l.value,a)){await this.commitCloud(e,o.points,!0,t);return}o.addPoint(l.value)}}async convertObject(e,t){for(;;){let n=new Rl(P.t("jig.revcloud.selectObject"));n.setRejectMessage(P.t("jig.revcloud.invalidObject")),n.addAllowedClass("Polyline"),n.addAllowedClass("Circle"),n.addAllowedClass("Ellipse"),n.addAllowedClass("Spline");let i=await Y.instance.editor.getEntity(n);if(i.status!==V.OK||!i.objectId)return;let o=e.doc.database.openEntityForRead(i.objectId);if(!o)return;let a=nBe(o,(t.arcLength??1)*.5);if(!a){this.showMessage(P.t("jig.revcloud.invalidObject"),"warning");continue}await this.commitCloud(e,a.points,a.closed,t)&&this.eraseEntity(e,o);return}}async commitCloud(e,t,n,i){let o=new a8(e.view,t,n,i);if(!o.valid)return!1;try{for(;o.render(),!!await this.promptReverse(o);)o.toggleReverse();let a=new Dt;return sm(a,t,n,i,o.reverse)?(e.doc.database.tables.blockTable.modelSpace.appendEntity(a),!0):!1}finally{o.end()}}async promptReverse(e){let t=new Hr(P.t("jig.revcloud.reverseDirection"));t.jig=e,t.allowNone=!0,r1(t,"yes");let n=t.keywords.add(P.t("jig.revcloud.keywords.no.display"),P.t("jig.revcloud.keywords.no.global"),P.t("jig.revcloud.keywords.no.local"));t.keywords.default=n;let i=await Y.instance.editor.getKeywords(t);return(i.status===V.OK||i.status===V.Keyword)&&i.stringResult==="Yes"}async promptPoint(e){let t=new Ae(P.t(`jig.revcloud.${e}`)),n=await Y.instance.editor.getPoint(t);if(!(n.status!==V.OK||!n.value))return n.value}eraseEntity(e,t){t.erase(),e.view.removeEntity(t)}};bne._settings={...rBe};var iBe=bne,oBe={type:"line",increment:.1,tolerance:.5};function EF(r,e){r.keywords.add(P.t(`jig.sketch.keywords.${e}.display`),P.t(`jig.sketch.keywords.${e}.global`),P.t(`jig.sketch.keywords.${e}.local`))}function gk(r,e){return Math.hypot(e.x-r.x,e.y-r.y)}function Ld(r){return new Z(r.x,r.y)}function gT(r){return new k(r.x,r.y,0)}function aBe(r,e,t){let n=Ld(e);if(r.length===0)return r.push(n),!0;let i=r[r.length-1];return gk(i,n)<t?!1:(r.push(n),!0)}function sBe(r,e){if(r.length<=2)return r.map(Ld);let t=Math.max(e,1e-8),n=[Ld(r[0])];for(let a=1;a<r.length-1;a++){let s=n[n.length-1];gk(s,r[a])>=t&&n.push(Ld(r[a]))}let i=Ld(r[r.length-1]),o=n[n.length-1];return gk(o,i)>1e-8&&n.push(i),n}var s8=class extends It{constructor(e,t,n){super(e),this._polyline=new Dt,this._points=[Ld(t)],this._increment=Math.max(n,1e-8),this._polyline.addVertexAt(0,this._points[0])}get entity(){return this._polyline}get points(){return this._points}update(e){aBe(this._points,e,this._increment)&&this._polyline.addVertexAt(this._points.length-1,this._points[this._points.length-1])}},l8=class{constructor(e){this.view=e,this._entities=[]}addStroke(e){if(e.length<2)return;let t=new Dt;e.forEach((n,i)=>t.addVertexAt(i,Ld(n))),this._entities.push(t),this.view.addTransientEntity(t)}render(){this._entities.forEach(e=>this.view.addTransientEntity(e))}dispose(){this._entities.forEach(e=>this.view.removeTransientEntity(e.objectId)),this._entities.length=0}},Mb=class extends It{constructor(e,t){super(e),this.preview=t}update(e){}render(){this.preview.render()}},xne=class wne extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=wne._settings,n=[],i=new l8(e.view);try{for(;;){i.render();let o=new Ae(P.t("jig.sketch.specifySketch"));EF(o,"type"),EF(o,"increment"),EF(o,"tolerance"),o.allowNone=!0,o.disableOSnap=!0,o.jig=new Mb(e.view,i);let a=await Y.instance.editor.getPoint(o);if(a.status===V.Keyword){let l=a.stringResult??"";if(l==="Type"){if(!await this.promptType(t,i))return;continue}if(l==="Increment"){if(!await this.promptIncrement(t,i))return;continue}if(l==="Tolerance"){if(!await this.promptTolerance(t,i))return;continue}continue}if(a.status===V.None){this.commitStrokes(e,n);return}if(a.status!==V.OK||!a.value)return;let s=await this.captureStroke(e,t,a.value,i);if(s===!1)return;s.length>=2&&(n.push({points:s,type:t.type,tolerance:t.tolerance}),i.addStroke(s))}}finally{i.dispose()}}async promptType(e,t){t?.render();let n=new Hr(P.t("jig.sketch.type"));n.allowNone=!0,t&&(n.jig=new Mb(t.view,t));let i=n.keywords.add(P.t("jig.sketch.keywords.line.display"),P.t("jig.sketch.keywords.line.global"),P.t("jig.sketch.keywords.line.local")),o=n.keywords.add(P.t("jig.sketch.keywords.polyline.display"),P.t("jig.sketch.keywords.polyline.global"),P.t("jig.sketch.keywords.polyline.local")),a=n.keywords.add(P.t("jig.sketch.keywords.spline.display"),P.t("jig.sketch.keywords.spline.global"),P.t("jig.sketch.keywords.spline.local"));n.keywords.default=e.type==="polyline"?o:e.type==="spline"?a:i;let s=await Y.instance.editor.getKeywords(n);return s.status===V.Cancel?!1:((s.status===V.OK||s.status===V.Keyword)&&(s.stringResult==="Polyline"?e.type="polyline":s.stringResult==="Spline"?e.type="spline":(s.stringResult==="Line"||s.stringResult==="Lines")&&(e.type="line")),!0)}async promptIncrement(e,t){t?.render();let n=new Zo(P.t("jig.sketch.increment"));n.allowNegative=!1,n.allowZero=!1,n.useDefaultValue=!0,n.defaultValue=e.increment,t&&(n.jig=new Mb(t.view,t));let i=await Y.instance.editor.getDistance(n);if(i.status===V.Cancel)return!1;let o=i.value??e.increment;return Ce.isPositive(o)&&(e.increment=o),!0}async promptTolerance(e,t){t?.render();let n=new Zo(P.t("jig.sketch.tolerance"));n.allowNegative=!1,n.allowZero=!0,n.useDefaultValue=!0,n.defaultValue=e.tolerance,t&&(n.jig=new Mb(t.view,t));let i=await Y.instance.editor.getDistance(n);if(i.status===V.Cancel)return!1;let o=i.value??e.tolerance;return o>=0&&Number.isFinite(o)&&(e.tolerance=o),!0}async captureStroke(e,t,n,i){i.render();let o=new s8(e.view,n,t.increment),a=new Ae(P.t("jig.sketch.sketching"));a.jig=o,a.useDashedLine=!1,a.useBasePoint=!0,a.basePoint=gT(n),a.allowNone=!0,a.disableOSnap=!0;let s=await Y.instance.editor.getPoint(a);if(s.status===V.Cancel)return!1;let l=[...o.points];if(s.status===V.OK&&s.value){let c=l[l.length-1];(!c||gk(c,s.value)>1e-8)&&l.push(Ld(s.value))}return l}commitStrokes(e,t){for(let n of t)this.appendStroke(e,n)}appendStroke(e,t){let n=e.doc.database.tables.blockTable.modelSpace,i=t.points;if(t.type==="line"){for(let a=1;a<i.length;a++){let s=new Bo(gT(i[a-1]),gT(i[a]));n.appendEntity(s),e.view.addEntity(s)}return}if(t.type==="spline"){let a=sBe(i,t.tolerance);if(a.length<2)return;let s=a.map(gT),l=Math.min(3,Math.max(1,s.length-1)),c=new Ra(s,"Chord",l,!1);n.appendEntity(c),e.view.addEntity(c);return}let o=new Dt;i.forEach((a,s)=>o.addVertexAt(s,a)),n.appendEntity(o),e.view.addEntity(o)}};xne._settings={...oBe};var lBe=xne,c8=class extends It{constructor(e,t,n,i){super(e),this._points=t,this._settings=n,this._closed=i,this._spline=this.createSpline(t)}get entity(){return this._spline}update(e){let t=new Z(e),n=this._points[this._points.length-1],i=!n||!uBe(n,t)?[...this._points,t]:[...this._points];try{this.rebuildSpline(i)}catch{this.rebuildSpline(this._points)}}createSpline(e){return wU(e,this._settings,this._closed)}rebuildSpline(e){if(e.length<2){let a=[new k(0,0,0),new k(1,1,0)],s=1,l=w1(a.length,s);this._spline.rebuild(a,l,void 0,s);return}let t=e.map(a=>new k(a.x,a.y,0)),n=_ne(t.length,this._settings),i=this._closed&&t.length>=3;if(this._settings.method==="fit"){this._spline.rebuild(t,Sne(this._settings.knotsType),n,i);return}let o=w1(t.length,n);this._spline.rebuild(t,o,void 0,n,!1),i&&(this._spline.closed=!0)}},u8=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=[],n={method:"fit",knotsType:"chord",degree:3},i=!1,o=b=>{t.push(new Z(b))},a=()=>{t.length<=1||t.pop()},s=()=>t[t.length-1],l=()=>t.length>=3,c=()=>new c8(e.view,t,n,i),u=()=>new h8(e.view,t,n,i),h=async()=>{let b=new Hr(P.t("jig.spline.methodPrompt"));b.keywords.add(P.t("jig.spline.keywords.fit.display"),P.t("jig.spline.keywords.fit.global"),P.t("jig.spline.keywords.fit.local")),b.keywords.add(P.t("jig.spline.keywords.cv.display"),P.t("jig.spline.keywords.cv.global"),P.t("jig.spline.keywords.cv.local"));let v=await Y.instance.editor.getKeywords(b);return v.status!==V.OK?!1:(v.stringResult==="Fit"?n.method="fit":v.stringResult==="CV"&&(n.method="cv"),!0)},d=async()=>{let b=new Hr(P.t("jig.spline.knotsPrompt"));b.jig=u(),b.keywords.add(P.t("jig.spline.keywords.chord.display"),P.t("jig.spline.keywords.chord.global"),P.t("jig.spline.keywords.chord.local")),b.keywords.add(P.t("jig.spline.keywords.sqrtChord.display"),P.t("jig.spline.keywords.sqrtChord.global"),P.t("jig.spline.keywords.sqrtChord.local")),b.keywords.add(P.t("jig.spline.keywords.uniform.display"),P.t("jig.spline.keywords.uniform.global"),P.t("jig.spline.keywords.uniform.local"));let v=await Y.instance.editor.getKeywords(b);return v.status!==V.OK?!1:(v.stringResult==="Chord"?n.knotsType="chord":v.stringResult==="SqrtChord"?n.knotsType="sqrtChord":v.stringResult==="Uniform"&&(n.knotsType="uniform"),!0)},p=async()=>{let b=new QT(P.t("jig.spline.degreePrompt"),1,10);b.jig=u();let v=await Y.instance.editor.getInteger(b);if(v.status!==V.OK)return!1;let x=Math.floor(v.value??n.degree);return n.degree=Math.max(1,x),!0},f=b=>{b.useDashedLine=!0,b.useBasePoint=!0;let v=s();v&&(b.basePoint=new k(v)),b.jig=c(),b.allowNone=!0};class m{constructor(v){this.machine=v}buildPrompt(){let v=new Ae(P.t("jig.spline.nextPointWithFitOptions"));return v.keywords.add(P.t("jig.spline.keywords.method.display"),P.t("jig.spline.keywords.method.global"),P.t("jig.spline.keywords.method.local")),v.keywords.add(P.t("jig.spline.keywords.knots.display"),P.t("jig.spline.keywords.knots.global"),P.t("jig.spline.keywords.knots.local")),v.keywords.add(P.t("jig.spline.keywords.undo.display"),P.t("jig.spline.keywords.undo.global"),P.t("jig.spline.keywords.undo.local")),v.keywords.add(P.t("jig.spline.keywords.close.display"),P.t("jig.spline.keywords.close.global"),P.t("jig.spline.keywords.close.local")),f(v),v}async handleResult(v){if(v.status===V.OK)return o(v.value),"continue";if(v.status!==V.Keyword)return"finish";let x=v.stringResult??"";return x==="Method"?await h()?(n.method==="cv"&&this.machine.setState(new g(this.machine)),"continue"):"finish":x==="Knots"?await d()?"continue":"finish":x==="Undo"?(a(),"continue"):x==="Close"&&l()?(i=!0,"finish"):"continue"}}class g{constructor(v){this.machine=v}buildPrompt(){let v=new Ae(P.t("jig.spline.nextPointWithCvOptions"));return v.keywords.add(P.t("jig.spline.keywords.method.display"),P.t("jig.spline.keywords.method.global"),P.t("jig.spline.keywords.method.local")),v.keywords.add(P.t("jig.spline.keywords.degree.display"),P.t("jig.spline.keywords.degree.global"),P.t("jig.spline.keywords.degree.local")),v.keywords.add(P.t("jig.spline.keywords.undo.display"),P.t("jig.spline.keywords.undo.global"),P.t("jig.spline.keywords.undo.local")),v.keywords.add(P.t("jig.spline.keywords.close.display"),P.t("jig.spline.keywords.close.global"),P.t("jig.spline.keywords.close.local")),f(v),v}async handleResult(v){if(v.status===V.OK)return o(v.value),"continue";if(v.status!==V.Keyword)return"finish";let x=v.stringResult??"";return x==="Method"?await h()?(n.method==="fit"&&this.machine.setState(new m(this.machine)),"continue"):"finish":x==="Degree"?await p()?"continue":"finish":x==="Undo"?(a(),"continue"):x==="Close"&&l()?(i=!0,"finish"):"continue"}}for(;t.length===0;){let b=new Ae(P.t("jig.spline.firstPointWithOptions"));b.keywords.add(P.t("jig.spline.keywords.method.display"),P.t("jig.spline.keywords.method.global"),P.t("jig.spline.keywords.method.local"));let v=await Y.instance.editor.getPoint(b);if(v.status===V.OK){o(v.value);break}if(v.status===V.Keyword&&v.stringResult==="Method"){if(!await h())return;continue}return}let y=new Bl;if(y.setState(n.method==="fit"?new m(y):new g(y)),await y.run(b=>Y.instance.editor.getPoint(b)),t.length>=2){let b=e.doc.database,v=wU(t,n,i);b.tables.blockTable.modelSpace.appendEntity(v)}}},h8=class extends It{constructor(e,t,n,i){super(e),this._spline=wU(t,n,i)}get entity(){return this._spline}update(e){}};function wU(r,e,t){if(r.length<2){let c=[new k(0,0,0),new k(1,1,0)],u=1,h=w1(c.length,u);return new Ra(c,h,void 0,u)}let n=r.map(c=>new k(c.x,c.y,0)),i=e.method==="fit"?cBe(n):n;if(i.length<2){let c=[new k(0,0,0),new k(1,1,0)],u=1,h=w1(c.length,u);return new Ra(c,h,void 0,u)}let o=_ne(i.length,e),a=t&&i.length>=3;if(e.method==="fit")return new Ra(i,Sne(e.knotsType),o,a);let s=w1(i.length,o),l=new Ra(i,s,void 0,o,!1);return a&&(l.closed=!0),l}function _ne(r,e){let t=Math.max(1,r-1);return e.method==="fit"?Math.min(3,t):Math.min(Math.max(1,e.degree),t)}function cBe(r){if(r.length<=1)return r;let e=[new k(r[0])];for(let t=1;t<r.length;t++){let n=e[e.length-1],i=r[t];hBe(n,i)||e.push(new k(i))}return e}function uBe(r,e){return Ji.equalPoint2d(r,e)}function hBe(r,e){return Ji.equalPoint3d(r,e)}function Sne(r){switch(r){case"chord":return"Chord";case"sqrtChord":return"SqrtChord";default:return"Uniform"}}function w1(r,e){let t=[],n=r+e+1;for(let i=0;i<n;i++)i<e+1?t.push(0):i>=n-e-1?t.push(1):t.push((i-e)/(r-e));return t}async function Ane(r,e){let t=Fr(),n=t._workingDatabase;t.workingDatabase=r;try{return await e()}finally{t._workingDatabase=n}}var dBe=".dwg,.dxf",PQ=100;function pBe(r){var e,t,n,i,o,a,s;let l=(t=(e=window.mlightcadGetLocalFilePath)==null?void 0:e.call(window,r))==null?void 0:t.trim();if(l)return l;let c=(n=window.electron)==null?void 0:n.webUtils,u=(o=(i=c?.getPathForFile)==null?void 0:i.call(c,r))==null?void 0:o.trim();if(u)return u;let h=r,d=(a=h.path)==null?void 0:a.trim();return d||((s=h.mozFullPath)==null?void 0:s.trim())||r.name}function fBe(r){return r.replace(/\.(dwg|dxf)$/i,"")||r}function mBe(r,e){let t=fBe(e);if(!r.tables.blockTable.has(t))return t;let n=1;for(;r.tables.blockTable.has(`${t}_${n}`);)n++;return`${t}_${n}`}function gBe(){return new Promise(r=>{let e=document.createElement("input");e.type="file",e.accept=dBe,e.style.display="none",document.body.appendChild(e);let t=!1,n=a=>{t||(t=!0,e.removeEventListener("change",i),e.removeEventListener("cancel",o),e.remove(),r(a))},i=()=>{var a;return n((a=e.files)==null?void 0:a[0])},o=()=>n(void 0);e.addEventListener("change",i),e.addEventListener("cancel",o),e.click()})}function yBe(r){var e,t;let n=((t=(e=r.extents)==null?void 0:e.clone)==null?void 0:t.call(e))??new De;if(!n.isEmpty())return n;let i=new De;for(let o of r.tables.blockTable.modelSpace.newIterator())if(!(o instanceof Ba))try{let a=o.geometricExtents;a&&!a.isEmpty()&&(i.expandByPoint(a.min),i.expandByPoint(a.max))}catch{}return i.isEmpty()?new De(new k(0,0,0),new k(PQ,PQ,0)):i}var d8=class extends It{constructor(e,t){super(e),this._mode="point",this._position=new k,this._scale=1,this._rotationRad=0;let n=t.min,i=t.max;this._localCorners=[new Z(n.x,n.y),new Z(i.x,n.y),new Z(i.x,i.y),new Z(n.x,i.y)],this._entity=Dt.from2dPoints(this._localCorners.map(o=>o.clone()),!0),this.applyGeometry()}get entity(){return this._entity}setMode(e){this._mode=e}setPosition(e){this._position=new k(e),this.applyGeometry()}setScale(e){this._scale=e,this.applyGeometry()}setRotationRad(e){this._rotationRad=e,this.applyGeometry()}update(e){if(this._mode==="point"&&typeof e!="number"){this.setPosition(e);return}if(typeof e=="number"){if(this._mode==="scale"){this.setScale(e>0?e:this._scale);return}this._mode==="rotation"&&this.setRotationRad(e*Math.PI/180)}}applyGeometry(){let e=Math.cos(this._rotationRad),t=Math.sin(this._rotationRad),n=this._scale,i=this._localCorners.map(o=>{let a=o.x*n,s=o.y*n;return new Z(this._position.x+a*e-s*t,this._position.y+a*t+s*e)});this._entity.reset(!1),i.forEach((o,a)=>{this._entity.addVertexAt(a,o)}),this._entity.closed=!0}},p8=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){var t;let n=await gBe();if(!n)return;let i=(t=n.name.split(".").pop())==null?void 0:t.toLocaleLowerCase();if(i!=="dwg"&&i!=="dxf"){this.showMessage(P.t("jig.xattach.unsupportedFile"),"warning");return}let o;try{let l=await n.arrayBuffer();o=await Y.instance.withBusyIndicator(async()=>{let c=new ku;return await Ane(c,async()=>{await c.read(l,{readOnly:!0},i==="dwg"?Ri.DWG:Ri.DXF)}),c},P.t("jig.xattach.loading"))}catch{this.showMessage(P.t("jig.xattach.loadFailed"),"error");return}let a=yBe(o),s=new d8(e.view,a);try{s.setMode("point");let l=new Ae(P.t("jig.xattach.insertionPoint"));l.allowNone=!0,l.useDefaultValue=!0,l.defaultValue=new k(0,0,0),l.jig=s;let c=await Y.instance.editor.getPoint(l);if(c.status!==V.OK&&c.status!==V.None)return;let u=c.status===V.OK&&c.value?new k(c.value):new k(0,0,0);s.setPosition(u),s.setMode("scale");let h=new Gr(P.t("jig.xattach.scale"));h.allowNone=!0,h.allowNegative=!1,h.allowZero=!1,h.useDefaultValue=!0,h.defaultValue=1,h.jig=s;let d=await Y.instance.editor.getDouble(h);if(d.status===V.Cancel||d.status===V.Error)return;let p=d.status===V.OK&&d.value!==void 0?d.value:1;if(!(p>0)){this.showMessage(P.t("jig.xattach.invalidScale"),"warning");return}s.setScale(p),s.setMode("rotation");let f=new _a(P.t("jig.xattach.rotation"));f.allowNone=!0,f.allowNegative=!0,f.allowZero=!0,f.useDefaultValue=!0,f.defaultValue=0,f.useBasePoint=!0,f.useDashedLine=!0,f.basePoint=u,f.jig=s;let m=await Y.instance.editor.getAngle(f);if(m.status===V.Cancel||m.status===V.Error)return;let g=(m.status===V.OK&&m.value!==void 0?m.value:0)*Math.PI/180,y=e.doc.database,b=mBe(y,n.name),v=pBe(n),x={position:u,scale:p,rotationRad:g},w=await rm.instance.attachOverlay({blockName:b,fileName:n.name,sourceDb:o,sourcePath:v,transform:x});try{im(y,"XATTACH",()=>{let{insert:_}=rm.createHostXrefInsert(y,b,v,x,o.tables.blockTable.modelSpace.origin);w.insertId=_.objectId})}catch(_){throw rm.instance.unload(w.id),_}Gt.emit("missed-data-changed",{})}finally{s.end()}}},bb=1e6,f8=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t="point";for(;;){let n=new Ae(P.t("jig.xline.firstPointOrOptions"));n.keywords.add(P.t("jig.xline.keywords.hor.display"),P.t("jig.xline.keywords.hor.global"),P.t("jig.xline.keywords.hor.local")),n.keywords.add(P.t("jig.xline.keywords.ver.display"),P.t("jig.xline.keywords.ver.global"),P.t("jig.xline.keywords.ver.local")),n.keywords.add(P.t("jig.xline.keywords.ang.display"),P.t("jig.xline.keywords.ang.global"),P.t("jig.xline.keywords.ang.local"));let i=await Y.instance.editor.getPoint(n);if(i.status===V.Keyword)i.stringResult==="Hor"?t="hor":i.stringResult==="Ver"?t="ver":i.stringResult==="Ang"&&(t="ang");else if(i.status===V.OK&&i.value){t="point";let u=new Ae(P.t("jig.xline.secondPoint"));u.useBasePoint=!0,u.useDashedLine=!0,u.basePoint=new k(i.value);let h=await Y.instance.editor.getPoint(u);if(h.status!==V.OK||!h.value)return;let d={x:h.value.x-i.value.x,y:h.value.y-i.value.y,z:h.value.z-i.value.z};this.appendFiniteXLine(e,i.value,d)||this.showMessage(P.t("jig.xline.invalidDirection"),"warning");continue}else return;if(t==="hor"){let u=new Ae(P.t("jig.xline.throughPoint")),h=await Y.instance.editor.getPoint(u);if(h.status!==V.OK||!h.value)return;this.appendFiniteXLine(e,h.value,{x:1,y:0,z:0});continue}if(t==="ver"){let u=new Ae(P.t("jig.xline.throughPoint")),h=await Y.instance.editor.getPoint(u);if(h.status!==V.OK||!h.value)return;this.appendFiniteXLine(e,h.value,{x:0,y:1,z:0});continue}let o=new Gr(P.t("jig.xline.angle")),a=await Y.instance.editor.getDouble(o);if(a.status!==V.OK||a.value==null)return;let s=new Ae(P.t("jig.xline.throughPoint")),l=await Y.instance.editor.getPoint(s);if(l.status!==V.OK||!l.value)return;let c=a.value*Math.PI/180;this.appendFiniteXLine(e,l.value,{x:Math.cos(c),y:Math.sin(c),z:0})}}appendFiniteXLine(e,t,n){let i=this.normalizeDirection(n);if(!i)return!1;let o=new k(t.x-i.x*bb,t.y-i.y*bb,t.z-i.z*bb),a=new k(t.x+i.x*bb,t.y+i.y*bb,t.z+i.z*bb);return e.doc.database.tables.blockTable.modelSpace.appendEntity(new Bo(o,a)),!0}normalizeDirection(e){let t=Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z);if(Ce.isPositive(t))return{x:e.x/t,y:e.y/t,z:e.z/t}}};function bBe(r){let e=r.htmlTransientManager,t=r.activeLayoutBtrId;Ws(r,"Clear Measurements",()=>{e.deselectAll();for(let n of e.groupsOnLayer(Ln))(n.layoutId==null||n.layoutId===t)&&e.detach(n.id)}),e.clear(gi),r.isHtmlDirty=!0}var m8=class extends xt{constructor(){super(),this.mode=at.Read}async execute(e){bBe(e.view)}},g8=class extends xt{constructor(){super(),this.mode=at.Read,this.recordsUndoStack=!1}async execute(e){let t=e.view;jIe(t,!Lee())}},y8;function vBe(r){y8=r}function nS(r,e,t){y8?.(r,e,t)}function _U(r){return`${r}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var lm=class extends uk{constructor(e,t,n,i,o,a){super(),this.entityId=e,this.layoutIdOption=t,this.style=n,this.textHeightWcs=i,this.strokeWidthWcs=o,this.arrowSizeWcs=a}get id(){return this.entityId}hitTest(e,t,n){return mee(this.toRecord().geometry,e,t,n)}commit(e,t){var n;let i=this.subWorldDrawWithDb(e,t);$Ie(e,i.group,{...i.extras,dispose:i.dispose}),(n=i.bindGrips)==null||n.call(i)}subWorldDraw(e){throw new Error("Use AcApMeasureEntity.commit(view, db) instead of worldDraw")}createGroup(e){return new Wf({id:this.entityId,layer:Ln,layoutId:this.resolveLayoutId(e),selectable:!0})}resolveLayoutId(e){return this.layoutIdOption??e.activeLayoutBtrId}serializeStyle(e){return qz(this.style,e)}committedLiveStyle(e,t){let n=K1(this.style);return n.fontSize=e,t!=null&&t>0&&(n.textHeightWcs=t),n}seedOverlaySizes(e,t,n=[]){let i=this.serializeStyle(e);ch(e,{textHeightWcs:this.textHeightWcs??i.textHeightWcs,strokeWidthWcs:this.strokeWidthWcs,arrowSizeWcs:this.arrowSizeWcs??i.arrowSizeWcs,fontSizePx:this.style.fontSize,strokeScreenPx:Ti(this.style.lineWeight),elements:t,canvases:n})}};function Fk(r,e){let t=e.canvas.getBoundingClientRect(),n=window.devicePixelRatio||1,i=Math.round(t.width),o=Math.round(t.height),a=e.canvasToContainer({x:0,y:0});r.style.left=`${a.x}px`,r.style.top=`${a.y}px`,r.style.width=`${i}px`,r.style.height=`${o}px`,(r.width!==i*n||r.height!==o*n)&&(r.width=i*n,r.height=o*n);let s=r.getContext("2d");return s?(s.clearRect(0,0,r.width,r.height),s.save(),s.scale(n,n),{ctx:s,dpr:n}):null}function xBe(r,e,t,n,i,o=2,a,s){let l=Fk(r,e);if(!l)return;let{ctx:c}=l,u=e.worldToScreen(t),h=e.worldToScreen(n);c.beginPath(),c.moveTo(u.x,u.y),c.lineTo(h.x,h.y);let d=Vs(i);c.strokeStyle=d;let p=ts(o,r,e,a);c.lineWidth=p,c.stroke();let f=$z(r,e,s);Math.hypot(h.x-u.x,h.y-u.y)>=f&&(lh(c,h,u,d,f),lh(c,u,h,d,f)),c.restore()}function wBe(r,e,t,n,i,o,a=2,s){let l=Fk(r,e);if(!l)return;let{ctx:c}=l,u=e.worldToScreen(t),h=e.worldToScreen(n),d=e.worldToScreen(i);c.strokeStyle=Vs(o),c.lineWidth=ts(a,r,e,s),c.beginPath(),c.moveTo(u.x,u.y),c.lineTo(h.x,h.y),c.moveTo(u.x,u.y),c.lineTo(d.x,d.y),c.stroke();let p=Math.atan2(h.y-u.y,h.x-u.x),f=Math.atan2(d.y-u.y,d.x-u.x),m=xe.normalizeAngle(f-p)>Math.PI,g=Yz(fee(t,n,i),e);g>0&&(c.beginPath(),c.arc(u.x,u.y,g,p,f,m),c.stroke()),c.restore()}function _Be(r,e,t,n,i=2.5,o){let a=Fk(r,e);if(!a||t.length<3){a?.ctx.restore();return}let{ctx:s}=a,l=t.map(c=>e.worldToScreen(c));s.beginPath(),s.moveTo(l[0].x,l[0].y);for(let c=1;c<l.length;c++)s.lineTo(l[c].x,l[c].y);s.closePath(),s.fillStyle=Mee(n,.2),s.fill(),s.strokeStyle=Vs(n),s.lineWidth=ts(i,r,e,o),s.stroke(),s.restore()}function SU(r,e,t,n,i,o,a,s,l){let c=e.worldToScreen({x:t.cx,y:t.cy}),u=e.worldToScreen(n),h=e.worldToScreen(i),d=Math.hypot(u.x-c.x,u.y-c.y);if(!(d>0))return;let p=Math.atan2(u.y-c.y,u.x-c.x),f=Math.atan2(h.y-c.y,h.x-c.x),m=s?Ke.tryCreateByThreePoints(n,s,i):void 0;if(s&&!m)return;let g=m?!m.clockwise:xe.normalizeAngle(f-p)>Math.PI;r.beginPath(),r.arc(c.x,c.y,d,p,f,g),r.strokeStyle=Vs(o),r.lineWidth=ts(a,r.canvas,e,l),r.stroke()}function SBe(r,e,t,n,i,o,a=4,s,l){let c=Fk(r,e);c&&(SU(c.ctx,e,t,n,i,o,a,s,l),c.ctx.restore())}function EQ(r){let e=0,t=r.length;for(let n=0;n<t;n++){let i=(n+1)%t;e+=r[n].x*r[i].y,e-=r[i].x*r[n].y}return Math.abs(e)/2}function CF(r){let e=r.reduce((n,i)=>n+i.x,0)/r.length,t=r.reduce((n,i)=>n+i.y,0)/r.length;return{x:e,y:t}}function CQ(r,e,t){let n=e.x-r.x,i=e.y-r.y,o=t.x-r.x,a=t.y-r.y,s=n*o+i*a,l=n*a-i*o;return Math.atan2(Math.abs(l),s)*180/Math.PI}function rS(r,e){r.htmlTransientManager.selectGroup(e)}function TQ(r,e,t){let n=e.x-r.x,i=e.y-r.y,o=t.x-r.x,a=t.y-r.y,s=Math.hypot(n,i),l=Math.hypot(o,a),c=s>0?n/s:1,u=s>0?i/s:0,h=l>0?o/l:1,d=l>0?a/l:0,p=c+h,f=u+d,m=Math.hypot(p,f);m>0?(p/=m,f/=m):(p=-u,f=c);let g=Math.max(Math.min(s,l)*oIe,Math.max(s,l)*.15);return{x:r.x+p*g,y:r.y+f*g}}var yk=class r extends lm{constructor(e,t,n,i){super(i.id??`angle-${Date.now()}`,i.layoutId,i.style,i.textHeightWcs,i.strokeWidthWcs),this.vertex=e,this.arm1=t,this.arm2=n}static create(e,t,n,i,o){return new r(e,t,n,{style:i,id:o?.id,layoutId:o?.layoutId})}primaryPoint(){return{x:this.vertex.x,y:this.vertex.y,z:0}}toRecord(e,t){return{id:this.entityId,type:"angle",layoutId:e,style:this.serializeStyle(t),geometry:{type:"angle",vertex:{x:this.vertex.x,y:this.vertex.y},arm1:{x:this.arm1.x,y:this.arm1.y},arm2:{x:this.arm2.x,y:this.arm2.y}}}}subWorldDrawWithDb(e,t){let n={vertex:{x:this.vertex.x,y:this.vertex.y},arm1:{x:this.arm1.x,y:this.arm1.y},arm2:{x:this.arm2.x,y:this.arm2.y}},i=CQ(n.vertex,n.arm1,n.arm2),o=this.style.color,a=this.resolveLayoutId(e),s=new _o({id:`angle-canvas-${this.entityId}`,container:e.container,layer:Ln,layoutId:a}),l=new ei({id:`${this.entityId}-dotV`,color:o,worldPosition:n.vertex,layer:Ln}),c=new ei({id:`${this.entityId}-dot1`,color:o,worldPosition:n.arm1,layer:Ln}),u=new ei({id:`${this.entityId}-dot2`,color:o,worldPosition:n.arm2,layer:Ln}),h=zT(t,i*Math.PI/180),d=this.textHeightWcs!=null&&this.textHeightWcs>0?this.textHeightWcs:void 0,p=this.style.fontSize,f=d;d==null&&(this.style.textHeightMode==="custom"&&this.style.textHeightWcs!=null&&this.style.textHeightWcs>0?f=this.style.textHeightWcs:(p=Nl(h,this.style,Jne(T=>e.worldToScreen(T),n.vertex,n.arm1,n.arm2)),f=Ci(p,e)));let m=new Hi({id:`${this.entityId}-badge`,color:o,text:h,worldPosition:TQ(n.vertex,n.arm1,n.arm2),layer:Ln,fontSize:p}),g=this.serializeStyle(e);ch(e,{textHeightWcs:f??g.textHeightWcs,strokeWidthWcs:this.strokeWidthWcs,arrowSizeWcs:this.arrowSizeWcs??g.arrowSizeWcs,fontSizePx:p,strokeScreenPx:Ti(this.style.lineWeight),elements:[l,c,u,m],canvases:[s.canvas]});let y=(T=this.style)=>wBe(s.canvas,e,n.vertex,n.arm1,n.arm2,T.color,Ti(T.lineWeight));y();let b=()=>y(jc(this.entityId)??this.style);e.events.viewChanged.addEventListener(b);let v=this.createGroup(e).add(l,c,u,m).addCanvas(s),x=[()=>e.events.viewChanged.removeEventListener(b)],w=[],_={vertex:{...n.vertex},arm1:{...n.arm1},arm2:{...n.arm2}},A=()=>{i=CQ(n.vertex,n.arm1,n.arm2),m.setText(zT(t,i*Math.PI/180)),ur(e,m,TQ(n.vertex,n.arm1,n.arm2)),y(jc(this.entityId)??this.style),e.isHtmlDirty=!0},E=()=>{rS(e,this.entityId),_={vertex:{...n.vertex},arm1:{...n.arm1},arm2:{...n.arm2}}},S=()=>{if(Math.hypot(n.vertex.x-_.vertex.x,n.vertex.y-_.vertex.y)+Math.hypot(n.arm1.x-_.arm1.x,n.arm1.y-_.arm1.y)+Math.hypot(n.arm2.x-_.arm2.x,n.arm2.y-_.arm2.y)<1e-9){A();return}let T=om(this.entityId),L={type:"angle",vertex:{...n.vertex},arm1:{...n.arm1},arm2:{...n.arm2}},O=T?{...T,geometry:L}:{id:this.entityId,type:"angle",layoutId:a,style:this.serializeStyle(e),geometry:L};Ws(e,"Move Angle",()=>{nS(e,t,O)})},M=(T,L)=>es({view:e,el:T.element,onDragStart:E,onMove:O=>{n[L]=O,ur(e,T,O),A()},onCommit:S});return w.push(()=>{x.push(M(l,"vertex"),M(c,"arm1"),M(u,"arm2"))}),{group:v,entityIds:[],dispose:()=>{for(let T of x)try{T()}catch{}},bindGrips:()=>{for(let T of w)T()},extras:{style:this.committedLiveStyle(p,f),value:{kind:"angle",radians:i*Math.PI/180},snapshot:(()=>{let T=this.toRecord(a,e);return d==null&&f!=null&&f>0&&(T.style.fontSize=p,T.style.textHeightWcs=f),T})(),redraw:y}}}};function ABe(r,e){let t=e.x-r.cx,n=e.y-r.cy,i=Math.hypot(t,n);if(!(i>1e-12))return{x:r.cx+r.r,y:r.cy};let o=r.r/i;return{x:r.cx+t*o,y:r.cy+n*o}}var bk=class r extends lm{constructor(e,t,n,i,o){super(i.id??`arc-${Date.now()}`,i.layoutId,i.style,i.textHeightWcs,i.strokeWidthWcs),this.geom=e,this.start=t,this.end=n,this.through=o}resolveMeasuredArc(e,t,n,i){return i?Ke.tryCreateByThreePoints(t,i,n):Ke.tryCreateShorterArc(t,n,{x:e.cx,y:e.cy})}static create(e,t,n,i,o){return new r(e,t,n,{style:i,id:o?.id,layoutId:o?.layoutId},o?.through)}primaryPoint(){var e;let t=(e=this.resolveMeasuredArc(this.geom,this.start,this.end,this.through))==null?void 0:e.midPoint;return t?{x:t.x,y:t.y,z:0}:{x:this.start.x,y:this.start.y,z:0}}toRecord(e,t){return{id:this.entityId,type:"arc",layoutId:e,style:this.serializeStyle(t),geometry:{type:"arc",center:{x:this.geom.cx,y:this.geom.cy},radius:this.geom.r,start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y},...this.through?{through:{x:this.through.x,y:this.through.y}}:{}}}}subWorldDrawWithDb(e,t){var n;let i=this.through!=null,o={geom:{...this.geom},start:{...this.start},end:{...this.end},through:this.through?{...this.through}:void 0},a=()=>this.resolveMeasuredArc(o.geom,o.start,o.end,o.through),s=()=>{if(!o.through)return!0;let X=Ke.tryCreateByThreePoints(o.start,o.through,o.end);return X?(o.geom={cx:X.center.x,cy:X.center.y,r:X.radius},!0):!1},l=((n=a())==null?void 0:n.length)??0,c=()=>{var X;let Q=(X=a())==null?void 0:X.midPoint;return Q?{x:Q.x,y:Q.y}:{x:o.start.x,y:o.start.y}},u=this.style.color,h=this.resolveLayoutId(e),d=new _o({id:`arc-canvas-${this.entityId}`,container:e.container,layer:Ln,layoutId:h}),p=new ei({id:`${this.entityId}-dot1`,color:u,worldPosition:o.start,layer:Ln}),f=o.through?new ei({id:`${this.entityId}-dot-through`,color:u,worldPosition:o.through,layer:Ln}):void 0,m=new ei({id:`${this.entityId}-dot2`,color:u,worldPosition:o.end,layer:Ln}),g=Us(t,l),y=this.textHeightWcs!=null&&this.textHeightWcs>0?this.textHeightWcs:void 0,b=this.style.fontSize,v=y;y==null&&(this.style.textHeightMode==="custom"&&this.style.textHeightWcs!=null&&this.style.textHeightWcs>0?v=this.style.textHeightWcs:(b=Nl(g,this.style,EU(X=>e.worldToScreen(X),{x:o.geom.cx,y:o.geom.cy},o.geom.r,l)),v=Ci(b,e)));let x=new Hi({id:`${this.entityId}-badge`,color:u,text:g,worldPosition:c(),layer:Ln,fontSize:b}),w=f?[p,f,m,x]:[p,m,x],_=this.serializeStyle(e);ch(e,{textHeightWcs:v??_.textHeightWcs,strokeWidthWcs:this.strokeWidthWcs,arrowSizeWcs:this.arrowSizeWcs??_.arrowSizeWcs,fontSizePx:b,strokeScreenPx:Ti(this.style.lineWeight),elements:w,canvases:[d.canvas]});let A=(X=this.style)=>SBe(d.canvas,e,o.geom,o.start,o.end,X.color,Ti(X.lineWeight),o.through);A();let E=()=>A(jc(this.entityId)??this.style);e.events.viewChanged.addEventListener(E);let S=this.createGroup(e).add(p,...f?[f]:[],m,x).addCanvas(d),M=[()=>e.events.viewChanged.removeEventListener(E)],T=[],L={start:{...o.start},end:{...o.end},through:o.through?{...o.through}:void 0,geom:{...o.geom}},O=()=>{let X=s()?a():null;l=X?.length??0,x.setText(Us(t,l)),ur(e,x,c()),A(jc(this.entityId)??this.style),e.isHtmlDirty=!0},D=()=>{o.start={...L.start},o.end={...L.end},o.through=L.through?{...L.through}:void 0,o.geom={...L.geom},ur(e,p,o.start),ur(e,m,o.end),f&&o.through&&ur(e,f,o.through),O()},z=()=>{rS(e,this.entityId),L={start:{...o.start},end:{...o.end},through:o.through?{...o.through}:void 0,geom:{...o.geom}}},N=()=>{if(Math.hypot(o.start.x-L.start.x,o.start.y-L.start.y)+Math.hypot(o.end.x-L.end.x,o.end.y-L.end.y)+(o.through&&L.through?Math.hypot(o.through.x-L.through.x,o.through.y-L.through.y):0)<1e-9){O();return}if(!s()){D();return}let X=om(this.entityId),Q={type:"arc",center:{x:o.geom.cx,y:o.geom.cy},radius:o.geom.r,start:{...o.start},end:{...o.end},...o.through?{through:{...o.through}}:{}},ce=X?{...X,geometry:Q}:{id:this.entityId,type:"arc",layoutId:h,style:this.serializeStyle(e),geometry:Q};Ws(e,"Move Arc",()=>{nS(e,t,ce)})},J=X=>i?X:ABe(o.geom,X);return T.push(()=>{M.push(es({view:e,el:p.element,onDragStart:z,onMove:X=>{o.start=J(X),ur(e,p,o.start),O()},onCommit:N}),es({view:e,el:m.element,onDragStart:z,onMove:X=>{o.end=J(X),ur(e,m,o.end),O()},onCommit:N})),f&&o.through&&M.push(es({view:e,el:f.element,onDragStart:z,onMove:X=>{o.through=X,ur(e,f,X),O()},onCommit:N}))}),{group:S,entityIds:[],dispose:()=>{for(let X of M)try{X()}catch{}},bindGrips:()=>{for(let X of T)X()},extras:{style:this.committedLiveStyle(b,v),value:{kind:"length",value:l},snapshot:(()=>{let X=this.toRecord(h,e);return y==null&&v!=null&&v>0&&(X.style.fontSize=b,X.style.textHeightWcs=v),X})(),redraw:A}}}},vk=class r extends lm{constructor(e,t){super(t.id??`area-${Date.now()}`,t.layoutId,t.style,t.textHeightWcs,t.strokeWidthWcs),this.points=e}static create(e,t,n){return new r(e,{style:t,id:n?.id,layoutId:n?.layoutId})}primaryPoint(){if(this.points.length===0)return;let e=CF(this.points);return{x:e.x,y:e.y,z:0}}toRecord(e,t){return{id:this.entityId,type:"area",layoutId:e,style:this.serializeStyle(t),geometry:{type:"area",points:this.points.map(n=>({x:n.x,y:n.y}))}}}subWorldDrawWithDb(e,t){if(this.points.length<3)return{group:this.createGroup(e),entityIds:[],dispose:()=>{},extras:{}};let n=this.points.map(E=>({x:E.x,y:E.y})),i=EQ(n),o=this.style.color,a=this.resolveLayoutId(e),s=new _o({id:`area-canvas-${this.entityId}`,container:e.container,layer:Ln,layoutId:a}),l=NT(t,i),c=this.textHeightWcs!=null&&this.textHeightWcs>0?this.textHeightWcs:void 0,u=this.style.fontSize,h=c;c==null&&(this.style.textHeightMode==="custom"&&this.style.textHeightWcs!=null&&this.style.textHeightWcs>0?h=this.style.textHeightWcs:(u=Nl(l,this.style,Qne(E=>e.worldToScreen(E),n)),h=Ci(u,e)));let d=new Hi({id:`${this.entityId}-badge`,color:o,text:l,worldPosition:CF(n),layer:Ln,fontSize:u}),p=n.map((E,S)=>new ei({id:`${this.entityId}-dot${S}`,color:o,worldPosition:E,layer:Ln})),f=this.serializeStyle(e);ch(e,{textHeightWcs:h??f.textHeightWcs,strokeWidthWcs:this.strokeWidthWcs,arrowSizeWcs:this.arrowSizeWcs??f.arrowSizeWcs,fontSizePx:u,strokeScreenPx:Ti(this.style.lineWeight),elements:[d,...p],canvases:[s.canvas]});let m=(E=this.style)=>_Be(s.canvas,e,n,E.color,Ti(E.lineWeight));m();let g=()=>m(jc(this.entityId)??this.style);e.events.viewChanged.addEventListener(g);let y=this.createGroup(e).add(d,...p).addCanvas(s),b=[()=>e.events.viewChanged.removeEventListener(g)],v=[],x=n.map(E=>({...E})),w=()=>{i=EQ(n),d.setText(NT(t,i)),ur(e,d,CF(n)),m(jc(this.entityId)??this.style),e.isHtmlDirty=!0},_=()=>{rS(e,this.entityId),x=n.map(E=>({...E}))},A=()=>{let E=0;for(let L=0;L<n.length;L++)E+=Math.hypot(n[L].x-x[L].x,n[L].y-x[L].y);if(E<1e-9){w();return}let S=om(this.entityId),M={type:"area",points:n.map(L=>({x:L.x,y:L.y}))},T=S?{...S,geometry:M}:{id:this.entityId,type:"area",layoutId:a,style:this.serializeStyle(e),geometry:M};Ws(e,"Move Area",()=>{nS(e,t,T)})};return v.push(()=>{for(let E=0;E<p.length;E++){let S=E,M=p[S];b.push(es({view:e,el:M.element,onDragStart:_,onMove:T=>{n[S]=T,ur(e,M,T),w()},onCommit:A}))}}),{group:y,entityIds:[],dispose:()=>{for(let E of b)try{E()}catch{}},bindGrips:()=>{for(let E of v)E()},extras:{style:this.committedLiveStyle(u,h),value:{kind:"area",value:i},snapshot:(()=>{let E=this.toRecord(a,e);return c==null&&h!=null&&h>0&&(E.style.fontSize=u,E.style.textHeightWcs=h),E})(),redraw:m}}}};function kQ(r,e){let t=e.x-r.x,n=e.y-r.y;return Math.sqrt(t*t+n*n)}var xk=class r extends lm{constructor(e,t,n){super(n.id??_U("dist"),n.layoutId,n.style,n.textHeightWcs,n.strokeWidthWcs,n.arrowSizeWcs),this.p1=e,this.p2=t}static create(e,t,n,i){return new r(e,t,{style:n,id:i?.id,layoutId:i?.layoutId})}primaryPoint(){return{x:(this.p1.x+this.p2.x)/2,y:(this.p1.y+this.p2.y)/2,z:0}}toRecord(e,t){let n=this.serializeStyle(t),i=this.arrowSizeWcs??(t?Ci(zc,t):void 0);return i!=null&&i>0&&(n.arrowSizeWcs=i),{id:this.entityId,type:"distance",layoutId:e,style:n,geometry:{type:"distance",start:{x:this.p1.x,y:this.p1.y},end:{x:this.p2.x,y:this.p2.y}}}}subWorldDrawWithDb(e,t){let n={start:{x:this.p1.x,y:this.p1.y},end:{x:this.p2.x,y:this.p2.y}},i=kQ(n.start,n.end),o=this.style.color,a=this.resolveLayoutId(e),s=(L,O)=>({x:(L.x+O.x)/2,y:(L.y+O.y)/2}),l=new _o({id:`dist-canvas-${this.entityId}`,container:e.container,layer:Ln,layoutId:a}),c=new ei({id:`${this.entityId}-dot1`,color:o,worldPosition:n.start,layer:Ln}),u=new ei({id:`${this.entityId}-dot2`,color:o,worldPosition:n.end,layer:Ln}),h=Us(t,i),d=this.textHeightWcs!=null&&this.textHeightWcs>0?this.textHeightWcs:void 0,p=this.style.fontSize,f=d;d==null&&(this.style.textHeightMode==="custom"&&this.style.textHeightWcs!=null&&this.style.textHeightWcs>0?f=this.style.textHeightWcs:(p=Nl(h,this.style,cm(L=>e.worldToScreen(L),n.start,n.end)),f=Ci(p,e)));let m=this.arrowSizeWcs!=null&&this.arrowSizeWcs>0?this.arrowSizeWcs:void 0;if(m==null){let L=PU(zc,this.style.fontSize,p);m=Ci(L,e)}let g=new Hi({id:`${this.entityId}-badge`,color:o,text:h,worldPosition:s(n.start,n.end),layer:Ln,fontSize:p}),y=this.serializeStyle(e);ch(e,{textHeightWcs:f??y.textHeightWcs,strokeWidthWcs:this.strokeWidthWcs,arrowSizeWcs:m,fontSizePx:p,strokeScreenPx:Ti(this.style.lineWeight),elements:[c,u,g],canvases:[l.canvas]});let b=(L=this.style)=>{var O;let D=((O=om(this.entityId))==null?void 0:O.style.arrowSizeWcs)??m;xBe(l.canvas,e,n.start,n.end,L.color,Ti(L.lineWeight),this.strokeWidthWcs,D)};b();let v=()=>b(jc(this.entityId)??this.style);e.events.viewChanged.addEventListener(v);let x=this.createGroup(e).add(c,u,g).addCanvas(l),w=[()=>e.events.viewChanged.removeEventListener(v)],_=[],A={start:{...n.start},end:{...n.end}},E=()=>{i=kQ(n.start,n.end),g.setText(Us(t,i)),ur(e,g,s(n.start,n.end)),b(jc(this.entityId)??this.style),e.isHtmlDirty=!0},S=()=>{rS(e,this.entityId),A={start:{...n.start},end:{...n.end}}},M=()=>{let L=Math.hypot(n.start.x-A.start.x,n.start.y-A.start.y),O=Math.hypot(n.end.x-A.end.x,n.end.y-A.end.y);if(L<1e-9&&O<1e-9){E();return}let D=om(this.entityId),z=D?{...D,geometry:{type:"distance",start:{...n.start},end:{...n.end}}}:{id:this.entityId,type:"distance",layoutId:a,style:this.serializeStyle(e),geometry:{type:"distance",start:{...n.start},end:{...n.end}}};Ws(e,"Move Distance",()=>{nS(e,t,z)})};_.push(()=>{w.push(es({view:e,el:c.element,onDragStart:S,onMove:L=>{n.start=L,ur(e,c,L),E()},onCommit:M}),es({view:e,el:u.element,onDragStart:S,onMove:L=>{n.end=L,ur(e,u,L),E()},onCommit:M}))});let T=this.toRecord(a,e);return d==null&&f!=null&&f>0&&(T.style.fontSize=p,T.style.textHeightWcs=f),m!=null&&m>0&&(T.style.arrowSizeWcs=m),{group:x,entityIds:[],dispose:()=>{for(let L of w)try{L()}catch{}},bindGrips:()=>{for(let L of _)L()},extras:{style:this.committedLiveStyle(p,f),value:{kind:"length",value:i},snapshot:T,redraw:b}}}},wk=class r extends lm{constructor(e,t){super(t.id??`point-${Date.now()}`,t.layoutId,t.style,t.textHeightWcs,t.strokeWidthWcs),this.point=e}static create(e,t,n){return new r(e,{style:t,id:n?.id,layoutId:n?.layoutId})}primaryPoint(){return{x:this.point.x,y:this.point.y,z:0}}toRecord(e,t){return{id:this.entityId,type:"point",layoutId:e,style:this.serializeStyle(t),geometry:{type:"point",position:{x:this.point.x,y:this.point.y}}}}subWorldDrawWithDb(e,t){let n={x:this.point.x,y:this.point.y},i=this.resolveLayoutId(e),o={kind:"coordinate",x:n.x,y:n.y},a=this.style.color,s=new ei({id:`${this.entityId}-dot`,color:a,worldPosition:n,layer:Ln}),l=new Hi({id:`${this.entityId}-badge`,color:a,text:tJ(t,o),worldPosition:n,layer:Ln,fontSize:this.style.fontSize,transform:"translate(-50%, calc(-50% - 16px))"});this.seedOverlaySizes(e,[s,l]);let c=this.createGroup(e).add(s,l),u=[],h=[],d={...n},p=()=>{o={kind:"coordinate",x:n.x,y:n.y},l.setText(tJ(t,o)),ur(e,l,n),e.isHtmlDirty=!0};return h.push(()=>{u.push(es({view:e,el:s.element,onDragStart:()=>{rS(e,this.entityId),d={...n}},onMove:f=>{n.x=f.x,n.y=f.y,ur(e,s,n),p()},onCommit:()=>{if(Math.hypot(n.x-d.x,n.y-d.y)<1e-9){p();return}let f=om(this.entityId),m={type:"point",position:{x:n.x,y:n.y}},g=f?{...f,geometry:m}:{id:this.entityId,type:"point",layoutId:i,style:this.serializeStyle(e),geometry:m};Ws(e,"Move Point",()=>{nS(e,t,g)})}}))}),{group:c,entityIds:[],dispose:()=>{for(let f of u)try{f()}catch{}},bindGrips:()=>{for(let f of h)f()},extras:{style:this.style,value:o,snapshot:this.toRecord(i,e)}}}};function Mne(r){let e=RIe(r.style),t={id:r.id,layoutId:r.layoutId,style:e,textHeightWcs:r.style.textHeightWcs,strokeWidthWcs:r.style.strokeWidthWcs,arrowSizeWcs:r.style.arrowSizeWcs},n=r.geometry;switch(n.type){case"distance":return new xk({x:n.start.x,y:n.start.y,z:0},{x:n.end.x,y:n.end.y,z:0},t);case"angle":return new yk({x:n.vertex.x,y:n.vertex.y,z:0},{x:n.arm1.x,y:n.arm1.y,z:0},{x:n.arm2.x,y:n.arm2.y,z:0},t);case"area":return new vk(n.points.map(i=>({x:i.x,y:i.y,z:0})),t);case"arc":return new bk({cx:n.center.x,cy:n.center.y,r:n.radius},n.start,n.end,t,n.through);case"point":return new wk({x:n.position.x,y:n.position.y,z:0},t)}}function MBe(r){return _U(r)}function PBe(r,e,t){let n=t.geometry.type==="distance"?"dist":t.geometry.type,i={...t,id:MBe(n)};try{return Mne(i).commit(r,e),!0}catch{return!1}}function EBe(r,e,t){let n=r.htmlTransientManager,i=Tk()===t.id;n.has(t.id)&&n.detach(t.id),Mne(t).commit(r,e),i&&n.selectGroup(t.id)}vBe(EBe);function CBe(r,e){if(typeof document>"u")return;let t=new Blob([e],{type:"application/json;charset=utf-8"}),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=r,i.click(),URL.revokeObjectURL(n)}function TBe(){return new Promise(r=>{if(typeof document>"u"){r(void 0);return}let e=document.createElement("input");e.type="file",e.accept=".json,application/json";let t=!1,n=i=>{t||(t=!0,r(i))};e.addEventListener("cancel",()=>n()),e.onchange=async()=>{var i;let o=(i=e.files)==null?void 0:i[0];if(!o){n();return}n(await o.text())},e.click()})}var b8=class extends xt{constructor(){super(),this.mode=at.Read,this.recordsUndoStack=!1}async execute(e){let t=e.view,n=e.doc.fileName||e.doc.docTitle,i=NIe({version:1,drawingName:n,measurements:XIe(t)});CBe(zIe(n),i)}},v8=class extends xt{constructor(){super(),this.mode=at.Read,this.recordsUndoStack=!1}async execute(e){new fi(P.t("jig.measurement.import.chooseFile"));let t=await TBe();if(t==null)return;let n;try{n=BIe(t)}catch(a){console.error(a);return}let i=e.view,o=e.doc.database;Ws(i,"Import Measurements",()=>{for(let a of n.measurements)PBe(i,o,a)})}},kBe=0,IBe=0;async function Pne(r,e){await r.view.withMode(kBe,()=>r.view.editor.withCursor(IBe,e))}var Nd=class extends sk{constructor(){super(),this.mode=at.Read}withMeasureInput(e,t){return Pne(e,t)}};function LBe(r,e,t){let n=e.x-r.x,i=e.y-r.y,o=t.x-r.x,a=t.y-r.y,s=n*o+i*a,l=n*a-i*o;return Math.atan2(Math.abs(l),s)*180/Math.PI}function OBe(r,e,t,n,i,o,a){yk.create(t,n,i,o,a).commit(r,e)}var x8=class extends It{constructor(e,t,n){super(e),this._vertex=t,this._cursor=t,this._color=n,this._preview=new Yi(e,`live-angle-arm1-${Date.now()}`,gi)}get entity(){return null}update(e){this._cursor=e;let t=Ti(Po);this._preview.acapSetDraw((n,i)=>{Vc(n,i,this._vertex,this._cursor,this._color,t)})}end(){super.end(),this._preview.acapDispose()}},w8=class extends It{constructor(e,t,n,i,o){super(e),this._view=e,this._vertex=n,this._arm1=i,this._arm2=n,this._color=o,this._db=t,this._badgeId=`live-angle-badge-${Date.now()}`,this._htManager=this._view.htmlTransientManager,this._badge=new Hi({id:this._badgeId,color:o,worldPosition:n,layer:gi,layoutId:this._view.activeLayoutBtrId,fontSize:Hb(),transform:"translate(-50%, calc(-50% - 30px))"}),this._htManager.add(this._badge),Sr(this._view,[this._badge],mi(this._db)),this._badge.object.visible=!1,this._preview=new Yi(this._view,`live-angle-arm2-${Date.now()}`,gi)}get entity(){return null}update(e){this._arm2=e,this._color=Hs(this._db),this._badge.setColor(this._color);let t=mi(this._db),n=Ti(Po);this._preview.acapSetDraw((s,l)=>{Vc(s,l,this._vertex,this._arm1,this._color,n,{dashed:!0}),Vc(s,l,this._vertex,this._arm2,this._color,n)});let i=LBe(this._vertex,this._arm1,e),o=zT(this._db,i*Math.PI/180),a=Nl(o,t,Jne(s=>this._view.worldToScreen(s),this._vertex,this._arm1,e));this._badge.setFontSize(a),Sr(this._view,[this._badge],{...t,fontSize:a}),this._badge.setText(o),this._badge.setPosition(this._vertex),this._badge.object.visible=!0}end(){super.end(),this._preview.acapDispose(),this._htManager.remove(this._badgeId)}},_8=class extends Nd{async execute(e){let t=e.view.editor,n=e.doc.database,i=Hs(n);await this.withMeasureInput(e,async()=>{let o=new Ae(P.t("jig.measureAngle.vertex")),a=await t.getPoint(o);if(a.status!==V.OK)return;let s=a.value,l=new Ae(P.t("jig.measureAngle.arm1"));l.useBasePoint=!0,l.jig=new x8(e.view,s,i);let c=await t.getPoint(l);if(c.status!==V.OK)return;let u=c.value,h=new Ae(P.t("jig.measureAngle.arm2"));h.jig=new w8(e.view,n,s,u,i);let d=await t.getPoint(h);if(d.status!==V.OK)return;let p=d.value;OBe(e.view,n,s,u,p,mi(n))})}},S8=class extends It{constructor(e,t,n,i){super(e),this._onMove=i}get entity(){return null}update(e){this._onMove(e)}};function DBe(r,e,t,n){let i=e.x-r.x,o=e.y-r.y,a=n.x-t.x,s=n.y-t.y,l=i*s-o*a;if(Math.abs(l)<1e-10)return!1;let c=t.x-r.x,u=t.y-r.y,h=(c*s-u*a)/l,d=(c*o-u*i)/l;return h>0&&h<1&&d>0&&d<1}function RBe(r){let e=0,t=r.length;for(let n=0;n<t;n++){let i=(n+1)%t;e+=r[n].x*r[i].y,e-=r[i].x*r[n].y}return Math.abs(e)/2}function BBe(r){let e=r.reduce((n,i)=>n+i.x,0)/r.length,t=r.reduce((n,i)=>n+i.y,0)/r.length;return{x:e,y:t}}function FBe(r,e,t,n,i){t.length<3||vk.create(t,n,i).commit(r,e)}var A8=class extends Nd{async execute(e){let t=e.view.editor,n=e.doc.database,i=Hs(n),o=mi(n),a=Ti(o.lineWeight),s=[],l=new _o({id:`live-area-canvas-${Date.now()}`,container:e.view.container,layer:gi,layoutId:e.view.activeLayoutBtrId}),c=l.canvas,u=e.view.htmlTransientManager;u.add(l);let h=`live-area-badge-${Date.now()}`,d=new Hi({id:h,color:i,worldPosition:{x:0,y:0},layer:gi,layoutId:e.view.activeLayoutBtrId,fontSize:o.fontSize});u.add(d),Sr(e.view,[d],o),d.object.visible=!1;let p=g=>{let y=e.view.canvas.getBoundingClientRect(),b=window.devicePixelRatio||1,v=Math.round(y.width),x=Math.round(y.height),w=e.view.canvasToContainer({x:0,y:0});c.style.left=`${w.x}px`,c.style.top=`${w.y}px`,c.style.width=`${v}px`,c.style.height=`${x}px`,(c.width!==v*b||c.height!==x*b)&&(c.width=v*b,c.height=x*b);let _=c.getContext("2d");if(!_||s.length<1)return;_.clearRect(0,0,c.width,c.height),_.save(),_.scale(b,b);let A=s.map(S=>e.view.worldToScreen(S)),E=g?[...A,e.view.worldToScreen(g)]:A;if(E.length>=3){_.beginPath(),_.moveTo(E[0].x,E[0].y);for(let S=1;S<E.length;S++)_.lineTo(E[S].x,E[S].y);_.closePath(),_.fillStyle=Mee(i,.2),_.fill()}if(A.length>=2){_.beginPath(),_.moveTo(A[0].x,A[0].y);for(let M=1;M<A.length;M++)_.lineTo(A[M].x,A[M].y);_.strokeStyle=Vs(i);let S=ts(a,c,e.view);_.lineWidth=S,_.setLineDash(Kz(S,a)),_.stroke(),_.setLineDash([])}if(g&&A.length>=1){let S=A[A.length-1],M=e.view.worldToScreen(g);_.beginPath(),_.moveTo(S.x,S.y),_.lineTo(M.x,M.y),_.strokeStyle=Vs(i),_.lineWidth=ts(a,c,e.view),_.stroke()}_.restore()},f=()=>p();e.view.events.viewChanged.addEventListener(f);let m=()=>{u.remove(h),u.remove(l.id),e.view.events.viewChanged.removeEventListener(f)};try{await this.withMeasureInput(e,async()=>{let g=await t.getPoint(new Ae(P.t("jig.measureArea.firstPoint")));if(g.status!==V.OK)return;let y=g.value;s.push(y),p();try{for(;s.length<50;){let b=new Ae(P.t("jig.measureArea.nextPoint"));b.useBasePoint=!0,b.allowNone=!0;let v=_=>{if(s.length<2){p(_);return}let A=[...s,_],E=RBe(A),S=mi(n),M=NT(n,E),T=Nl(M,S,Qne(L=>e.view.worldToScreen(L),A));d.setFontSize(T),Sr(e.view,[d],{...S,fontSize:T}),d.setText(M),d.setPosition(BBe(A)),d.object.visible=!0,p(_)};b.jig=new S8(e.view,s[s.length-1],i,v);let x=await t.getPoint(b);if(x.status!==V.OK)break;let w=x.value;if(d.object.visible=!1,s.length>=3){let _=e.view.worldToScreen(w),A=E=>{let S=e.view.worldToScreen(E),M=_.x-S.x,T=_.y-S.y;return M*M+T*T<=196};if(A(s[0])||A(s[s.length-1]))break}if(s.length>=3){let _=s[s.length-1],A=!1;for(let E=0;E<s.length-2;E++)if(DBe(_,w,s[E],s[E+1])){A=!0;break}if(A)break}s.push(w),p()}}catch{}})}finally{m()}s.length<3||FBe(e.view,n,s,mi(n))}},NBe=1e-12;function IQ(r,e,t,n){let i=r-t,o=e-n;return i*i+o*o}function zBe(r,e,t){let n=t.x-e.x,i=t.y-e.y;if(n*n+i*i<1e-24)return 0;let o=r.radius>0?r.radius:1,a=Math.max(1e-16,1e-12*o*o),s=IQ(e.x,e.y,r.startPoint.x,r.startPoint.y)<=a,l=IQ(e.x,e.y,r.endPoint.x,r.endPoint.y)<=a;if(!s&&!l)return 0;let c=r.getPoints(8);if(c.length<3)return 0;let u=s&&!l?c[1]:c[c.length-2],h=u.x-e.x,d=u.y-e.y,p=Math.hypot(h,d);return p>1e-18?(n*h+i*d)/p:0}function UBe(r,e,t,n){let i=Math.max(1e-18,Math.abs(t)*1e-9);return r<t-i?!0:r>t+i?!1:e>n}function Ene(r,e,t){return Math.abs(Math.hypot(r.x-e.cx,r.y-e.cy)-e.r)<=Math.max(1e-6,e.r*1e-5)}function jBe(r,e){return Math.abs(r.cx-e.cx)<=1e-8&&Math.abs(r.cy-e.cy)<=1e-8&&Math.abs(r.r-e.r)<=1e-8}function LQ(r,e,t,n,i){return{x:r+(i===-1?-1:1)*t*Math.cos(n),y:e+t*Math.sin(n)}}function VBe(r,e){let t=e-r;for(;t<=0;)t+=Ge;for(;t>Ge;)t-=Ge;return t}function GBe(r){if(!(r.radius>0))return;let e=r.normal.z>=0?1:-1,t=r.center.x,n=r.center.y,i=r.radius,o=LQ(t,n,i,r.startAngle,e),a=LQ(t,n,i,r.endAngle,e),s=VBe(r.startAngle,r.endAngle);if(!(s>1e-12)||s>=Ge-1e-12)return;let l=new Ke(o,a,e*Math.tan(s/4));return l.radius>0?l:void 0}function HBe(r){var e;let t=(e=r._geo)==null?void 0:e.vertices;if(t&&t.length>1)return t.map(o=>({x:o.x,y:o.y,bulge:o.bulge??0}));let n=r.numberOfVertices,i=r.getBulgeAt;return Array.from({length:n},(o,a)=>{let s=r.getPoint2dAt(a);return{x:s.x,y:s.y,bulge:i?.(a)??0}})}function WBe(r){if(r instanceof Do)return r.radius>0?[new Ke({x:r.center.x,y:r.center.y},r.radius,0,Math.PI*2,!1)]:[];if(r instanceof ms){let i=GBe(r);return i?[i]:[]}if(!(r instanceof Dt))return[];let e=HBe(r);if(e.length<2)return[];let t=r.closed?e.length:e.length-1,n=[];for(let i=0;i<t;i++){let o=e[i],a=e[(i+1)%e.length];if(!(Math.abs(o.bulge)>NBe))continue;let s=new Ke(o,a,o.bulge);s.radius>0&&n.push(s)}return n}var yT=20,XBe=.02;function YBe(r){return xe.normalizeAngle(r+Math.PI)-Math.PI}function Cne(r,e,t,n){let i=Math.atan2(r.y-t.cy,r.x-t.cx),o=Math.atan2(e.y-t.cy,e.x-t.cx),a=xe.normalizeAngle(n?i-o:o-i);if(!(a>1e-10)||a>=Math.PI*2-1e-10)return;let s=n?i-a/2:i+a/2;return{through:{x:t.cx+t.r*Math.cos(s),y:t.cy+t.r*Math.sin(s)},length:a*t.r}}function Fs(r){return{x:r.x,y:r.y}}function AU(r){return{cx:r.center.x,cy:r.center.y,r:r.radius}}function Tne(r,e){let t=r.x-e.cx,n=r.y-e.cy,i=Math.hypot(t,n);if(!(i>0))return{x:e.cx+e.r,y:e.cy,z:0};let o=e.r/i;return{x:e.cx+t*o,y:e.cy+n*o,z:0}}function MU(r,e){let t=r.doc.database.tables.blockTable,n=r.view.curPos,i=new Set,o=[...r.view.pick(n,yT),...r.view.pick(e,yT)].filter(h=>i.has(h.id)?!1:(i.add(h.id),!0)),a=r.view.worldToScreen(n),s={x:n.x,y:n.y,z:0},l=null,c=yT,u=-1/0;for(let h of o){let d=t.getEntityById(h.id);if(d)for(let p of WBe(d)){if(!(p.radius>0))continue;let f=p.nearestPoint(s),m=r.view.worldToScreen(f),g=Math.hypot(a.x-m.x,a.y-m.y);if(g>yT)continue;let y=zBe(p,{x:f.x,y:f.y},{x:n.x,y:n.y});(!l||UBe(g*g,y,c*c,u))&&(c=g,u=y,l={geom:AU(p),snapped:{x:f.x,y:f.y,z:0}})}}return l}function OQ(r,e,t,n,i,o,a,s){bk.create(t,n,o,a,{...s,through:i}).commit(r,e)}var M8=class extends It{constructor(e,t){super(e.view),this._ctx=e,this._indicatorId=`live-arc-snap-${Date.now()}`,this._htManager=e.view.htmlTransientManager,this._indicator=new j_({id:this._indicatorId,color:t,worldPosition:{x:0,y:0,z:0},layer:gi,layoutId:e.view.activeLayoutBtrId}),this._indicator.object.visible=!1,this._htManager.add(this._indicator)}get entity(){return null}update(e){let t=MU(this._ctx,e);if(t){this._indicator.setPosition(t.snapped),this._indicator.object.visible=!0;return}this._indicator.object.visible=!1}end(){super.end(),this._htManager.remove(this._indicatorId)}},P8=class extends It{constructor(e,t,n,i,o){super(e.view),this._baseClockwise=null,this._ctx=e,this._view=e.view,this._geom=n,this._start=Fs(i),this._db=t,this._color=o,this._lastAngle=Math.atan2(i.y-n.cy,i.x-n.cx),this._htManager=this._view.htmlTransientManager,this._indicatorId=`live-arc-end-snap-${Date.now()}`,this._indicator=new j_({id:this._indicatorId,color:o,worldPosition:i,layer:gi,layoutId:this._view.activeLayoutBtrId}),this._htManager.add(this._indicator),this._badgeId=`live-arc-locked-badge-${Date.now()}`,this._badge=new Hi({id:this._badgeId,color:o,worldPosition:i,layer:gi,layoutId:this._view.activeLayoutBtrId,fontSize:Hb()}),this._htManager.add(this._badge),Sr(this._view,[this._badge],mi(this._db)),this._badge.object.visible=!1,this._preview=new Yi(this._view,`live-arc-locked-${Date.now()}`,gi)}get entity(){return null}get geom(){return this._geom}get clockwise(){return(this._baseClockwise??!1)!==this._isCtrlFlipped()}_isCtrlFlipped(){return Y.instance.editor.getInputToggles().ctrlArcFlip}_trackSweepDirection(e){let t=Math.atan2(e.y-this._geom.cy,e.x-this._geom.cx);if(this._baseClockwise==null){let n=YBe(t-this._lastAngle);Math.abs(n)>XBe&&(this._baseClockwise=n<0)}this._lastAngle=t}update(e){let t=this._view.curPos,n=MU(this._ctx,e);n&&Ene(this._start,n.geom)&&!jBe(this._geom,n.geom)&&(this._geom=n.geom,this._baseClockwise=null,this._lastAngle=Math.atan2(this._start.y-n.geom.cy,this._start.x-n.geom.cx));let i=Tne(t,this._geom),o=Fs(i);this._trackSweepDirection(o),this._color=Hs(this._db),this._indicator.setPosition(i),this._badge.setColor(this._color);let a=mi(this._db),s=Ti(Po),l=Cne(this._start,o,this._geom,this.clockwise);if(this._preview.acapSetDraw((h,d)=>{SU(h,d,this._geom,this._start,o,this._color,s,l?.through)}),!l){this._badge.object.visible=!1;return}let c=Us(this._db,l.length),u=Nl(c,a,EU(h=>this._view.worldToScreen(h),{x:this._geom.cx,y:this._geom.cy},this._geom.r,l.length));this._badge.setFontSize(u),Sr(this._view,[this._badge],{...a,fontSize:u}),this._badge.setText(c),this._badge.setPosition(l.through),this._badge.object.visible=!0}end(){super.end(),this._preview.acapDispose(),this._htManager.remove(this._indicatorId),this._htManager.remove(this._badgeId)}},E8=class extends It{constructor(e,t,n){super(e),this._start=t,this._cursor=t,this._color=n,this._preview=new Yi(e,`live-arc-through-${Date.now()}`,gi)}get entity(){return null}update(e){this._cursor=e;let t=Ti(Po);this._preview.acapSetDraw((n,i)=>{Vc(n,i,this._start,this._cursor,this._color,t)})}end(){super.end(),this._preview.acapDispose()}},C8=class extends It{constructor(e,t,n,i,o){super(e),this._view=e,this._start=Fs(n),this._through=Fs(i),this._end=Fs(i),this._color=o,this._db=t,this._badgeId=`live-arc-badge-${Date.now()}`,this._htManager=this._view.htmlTransientManager,this._badge=new Hi({id:this._badgeId,color:o,worldPosition:n,layer:gi,layoutId:this._view.activeLayoutBtrId,fontSize:Hb()}),this._htManager.add(this._badge),Sr(this._view,[this._badge],mi(this._db)),this._badge.object.visible=!1,this._preview=new Yi(this._view,`live-arc-end-${Date.now()}`,gi)}get entity(){return null}update(e){this._end=Fs(e),this._color=Hs(this._db),this._badge.setColor(this._color);let t=mi(this._db),n=Ti(Po),i=Ke.tryCreateByThreePoints(this._start,this._through,this._end),o=i?AU(i):null;if(this._preview.acapSetDraw((l,c)=>{if(!o){am(l,c,[this._start,this._through,this._end],this._color,n);return}SU(l,c,o,this._start,this._end,this._color,n,this._through)}),!i||!o){this._badge.object.visible=!1;return}let a=Us(this._db,i.length),s=Nl(a,t,EU(l=>this._view.worldToScreen(l),{x:o.cx,y:o.cy},o.r,i.length));this._badge.setFontSize(s),Sr(this._view,[this._badge],{...t,fontSize:s}),this._badge.setText(a),this._badge.setPosition(i.midPoint),this._badge.object.visible=!0}end(){super.end(),this._preview.acapDispose(),this._htManager.remove(this._badgeId)}},T8=class extends Nd{async execute(e){let t=e.view.editor,n=e.doc.database,i=Hs(n),o=e.view;await this.withMeasureInput(e,async()=>{t.resetInputToggles();let a=new Ae(P.t("jig.measureArc.startPoint"));a.jig=new M8(e,i);let s=await t.getPoint(a);if(s.status!==V.OK)return;let l=s.value,c=MU(e,l);if(c){let x=Ene(Fs(l),c.geom)?l:c.snapped;await this.commitLockedArc(e,o,n,i,c.geom,x);return}let u=new Ae(P.t("jig.measureArc.throughPoint"));u.useBasePoint=!0,u.jig=new E8(e.view,l,i);let h=await t.getPoint(u);if(h.status!==V.OK)return;let d=h.value,p=new Ae(P.t("jig.measureArc.endPoint"));p.jig=new C8(e.view,n,l,d,i);let f=await t.getPoint(p);if(f.status!==V.OK)return;let m=f.value,g=Fs(l),y=Fs(d),b=Fs(m),v=Ke.tryCreateByThreePoints(g,y,b);if(!v){this.showMessage(P.t("jig.measureArc.invalidPoints"),"warning");return}OQ(o,n,AU(v),g,y,b,mi(n))})}async commitLockedArc(e,t,n,i,o,a){e.view.editor.resetInputToggles();let s=t.htmlTransientManager,l=`live-arc-locked-dot-${Date.now()}`;s.add(new db({id:l,color:i,worldPosition:a,layer:gi,layoutId:t.activeLayoutBtrId}));let c=new Ae(P.t("jig.measureArc.lockedEndPoint")),u=new P8(e,n,o,a,i);c.jig=u;let h;try{let g=await e.view.editor.getPoint(c);if(g.status!==V.OK)return;h=g.value}finally{s.remove(l)}if(!h)return;let d=u.geom,p=Fs(a),f=Fs(Tne(h,d)),m=Cne(p,f,d,u.clockwise);if(!m){this.showMessage(P.t("jig.measureArc.invalidPoints"),"warning");return}OQ(t,n,d,p,m.through,f,mi(n))}};function $Be(r,e){let t=e.x-r.x,n=e.y-r.y;return Math.sqrt(t*t+n*n)}function kne(r,e,t,n,i,o){xk.create(t,n,i,o).commit(r,e)}var k8=class extends It{constructor(e,t,n,i){super(e),this._view=e,this._p1=n,this._p2=n,this._db=t,this._color=i,this._badgeId=`live-dist-badge-${Date.now()}`,this._htManager=this._view.htmlTransientManager,this._badge=new Hi({id:this._badgeId,color:i,worldPosition:n,layer:gi,layoutId:this._view.activeLayoutBtrId,fontSize:Hb()}),this._htManager.add(this._badge),Sr(this._view,[this._badge],mi(this._db)),this._badge.object.visible=!1,this._preview=new Yi(this._view,`live-dist-stroke-${Date.now()}`,gi)}get entity(){return null}update(e){this._p2=e,this._color=Hs(this._db),this._badge.setColor(this._color);let t=mi(this._db),n=$Be(this._p1,e),i=Ti(Po),o=cm(c=>this._view.worldToScreen(c),this._p1,e);if(n<1e-4){this._preview.acapSetDraw((c,u)=>{Vc(c,u,this._p1,this._p2,this._color,i,{arrow:"both"})}),this._badge.object.visible=!1;return}let a=Us(this._db,n),s=Nl(a,t,o),l=PU(zc,t.fontSize,s);this._preview.acapSetDraw((c,u)=>{Vc(c,u,this._p1,this._p2,this._color,i,{arrow:"both",arrowSizePx:l})}),this._badge.setFontSize(s),Sr(this._view,[this._badge],{...t,fontSize:s}),this._badge.setText(a),this._badge.setPosition({x:(this._p1.x+e.x)/2,y:(this._p1.y+e.y)/2}),this._badge.object.visible=!0}end(){super.end(),this._preview.acapDispose(),this._htManager.remove(this._badgeId)}},I8=class extends Nd{async execute(e){let t=e.view.editor,n=e.doc.database,i=Hs(n);await this.withMeasureInput(e,async()=>{let o=new Ae(P.t("jig.measureDistance.firstPoint")),a=await t.getPoint(o);if(a.status!==V.OK)return;let s=a.value,l=new Ae(P.t("jig.measureDistance.secondPoint"));l.useBasePoint=!0,l.basePoint=new k(s),l.jig=new k8(e.view,n,s,i);let c=await t.getPoint(l);if(c.status!==V.OK)return;let u=c.value;kne(e.view,n,s,u,mi(n))})}};function _k(r,e){let t=e.x-r.x,n=e.y-r.y;return Math.sqrt(t*t+n*n)}function KBe(r,e){return{x:(r.x+e.x)/2,y:(r.y+e.y)/2,z:0}}function L8(r){return{x:r.x,y:r.y,z:r.z??0}}var O8=class extends It{constructor(e,t,n,i){super(e),this._badges=[],this._view=e,this._points=n,this._db=t,this._color=i,this._htManager=this._view.htmlTransientManager,this._preview=new Yi(this._view,`live-cont-stroke-${Date.now()}`,gi,{alignToViewCanvas:!0})}get entity(){return null}update(e){this._color=Hs(this._db);let t=mi(this._db),n=Ti(Po),i=[...this._points,e].map(L8),o=[];for(let a=0;a<i.length-1;a++){let s=i[a],l=i[a+1],c=_k(s,l);if(c<1e-4){o.push(zc);continue}let u=Us(this._db,c),h=Nl(u,t,cm(d=>this._view.worldToScreen(d),s,l));o.push(PU(zc,t.fontSize,h))}this._preview.acapSetDraw((a,s)=>{am(a,s,i,this._color,n,{segmentArrows:!0,segmentArrowSizesPx:o})}),this.syncBadges(i,t.fontSize),this._badges.length>0&&Sr(this._view,this._badges,t)}end(){super.end()}disposePreview(){this._preview.acapDispose();for(let e of this._badges)this._htManager.remove(e.id);this._badges.length=0}syncBadges(e,t){let n=mi(this._db),i=Math.max(0,e.length-1);for(;this._badges.length<i;){let o=new Hi({id:`live-cont-badge-${Date.now()}-${this._badges.length}`,color:this._color,worldPosition:e[this._badges.length]??{x:0,y:0},layer:gi,layoutId:this._view.activeLayoutBtrId,fontSize:t});this._htManager.add(o),Sr(this._view,[o],n),this._badges.push(o)}for(;this._badges.length>i;){let o=this._badges.pop();o&&this._htManager.remove(o.id)}for(let o=0;o<i;o++){let a=e[o],s=e[o+1],l=_k(a,s),c=this._badges[o];if(c.setColor(this._color),l<1e-4){c.object.visible=!1;continue}let u=Us(this._db,l),h=Nl(u,{...n,fontSize:t},cm(d=>this._view.worldToScreen(d),a,s));c.setFontSize(h),Sr(this._view,[c],{...n,fontSize:h}),c.setText(u),c.setPosition(KBe(a,s)),c.object.visible=!0}}},D8=class extends Nd{async execute(e){let t=e.view.editor,n=e.doc.database,i=Hs(n),o=[];if(await this.withMeasureInput(e,async()=>{let l=new Ae(P.t("jig.measureContinuous.firstPoint")),c=await t.getPoint(l);if(c.status!==V.OK)return;o.push(L8(c.value));let u=new O8(e.view,n,o,i);try{for(;o.length<100;){let h=new Ae(P.t("jig.measureContinuous.nextPoint"));h.useBasePoint=!0,h.basePoint=new k(o[o.length-1]),h.allowNone=!0,h.jig=u;let d=await t.getPoint(h);if(d.status!==V.OK)break;let p=L8(d.value),f=o[o.length-1];_k(f,p)<1e-9||o.push(p)}}finally{u.disposePreview()}}),o.length<2)return;let a=e.view,s=mi(n);Ws(a,"Create Measurement",()=>{for(let l=0;l<o.length-1;l++){let c=o[l],u=o[l+1];_k(c,u)<1e-4||kne(a,n,c,u,s,{id:_U("dist")})}})}};function qBe(r,e,t,n,i){wk.create(t,n,i).commit(r,e)}var R8=class extends Nd{async execute(e){let t=e.view.editor,n=e.doc.database;await this.withMeasureInput(e,async()=>{let i=new Ae(P.t("jig.measurePoint.point")),o=await t.getPoint(i);if(o.status!==V.OK)return;let a=o.value;qBe(e.view,n,a,mi(n))})}};function ZBe(r,e){Yte(e),r("measuredistance","measuredistance",new I8),r("measurecontinuous","measurecontinuous",new D8),r("measurearea","measurearea",new A8),r("measureangle","measureangle",new _8),r("measurearc","measurearc",new T8),r("measurepoint","measurepoint",new R8),r("clearmeasurements","clearmeasurements",new m8),r("measurementvis","measurementvis",new g8),r("measurementexport","measurementexport",new b8),r("measurementimport","measurementimport",new v8)}tIe(()=>({store:new NF,presenter:new a6,history:new jF,sessionUndo:new VF}));var B8=class extends xt{constructor(){super(),xRe(this)}async execute(e){let t=e.view;uh().clearLayout(t,t.activeLayoutBtrId,{clearStore:!0})}},Fl=class extends sk{constructor(){super(),this.mode=at.Review,this.recordsUndoStack=!1}withMarkupInput(e,t){return Pne(e,t)}},F8=class extends It{constructor(e,t,n){super(e),this._view=e,this._p1=t,this._p2=t,this._color=n,this._preview=new Yi(this._view,`live-markup-arrow-${Date.now()}`,Mo)}get entity(){return null}update(e){this._p2=e,this._color=Wr();let t=Gs(Eo);this._preview.acapSetDraw((n,i)=>{Vc(n,i,this._p1,this._p2,this._color,t,{arrow:!0})})}end(){super.end(),this._preview.acapDispose()}},N8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=Wr(),n=new Ae(P.t("jig.markup.arrow.firstPoint")),i=await e.view.editor.getPoint(n);if(i.status!==V.OK)return;let o=i.value,a=new Ae(P.t("jig.markup.arrow.secondPoint"));a.useBasePoint=!0,a.jig=new F8(e.view,o,t);let s=await e.view.editor.getPoint(a);if(s.status!==V.OK)return;let l=s.value,c={...Gc("arrow",e.view,e),type:"arrow",geometry:{type:"arrow",start:{x:o.x,y:o.y},end:{x:l.x,y:l.y}}};Hc(e.view,c)})}},z8=class extends It{constructor(e,t,n,i){super(e),this._capsuleRevealed=!1,this._view=e,this._tip={x:t.x,y:t.y,z:t.z??0},this._anchor={...this._tip},this._color=i,this._ht=this._view.htmlTransientManager;let o=this._view.activeLayoutBtrId,a=Date.now();this._tipDotId=`live-markup-callout-tip-${a}`,this._bubbleId=`live-markup-callout-bubble-${a}`,this._tipDot=new db({id:this._tipDotId,color:i,worldPosition:this._tip,layer:Mo,layoutId:o}),this._ht.add(this._tipDot),this._bubble=new Xf({id:this._bubbleId,color:i,text:n,fontSize:Ol(),worldPosition:this._tip,layer:Mo,layoutId:o}),this._ht.add(this._bubble),this._bubble.object.visible=!1,Sr(this._view,[this._bubble],Qa()),this._preview=new Yi(this._view,`live-markup-callout-leader-${a}`,Mo),this._unsubDrawStyle=oU(()=>this.applyCurrentStyle()),this.armDesktopCapsulePreview(),this._view.isHtmlDirty=!0}get entity(){return null}update(e){this._anchor={x:e.x,y:e.y,z:e.z??0},this._color=Wr(),this._bubble.setPosition(this._anchor),this.syncCapsulePreviewVisibility();let t=Qa(),n=t.fontSize??Ol();this._bubble.setFontSize(n),this._tipDot.setFontSize(n),Sr(this._view,[this._bubble,this._tipDot],t),this.paintLeader(),this._view.isHtmlDirty=!0}get capsule(){return this._bubble}revealCapsule(){this.disarmDesktopCapsulePreview(),this._capsuleRevealed=!0,this._bubble.object.visible=!0,this._view.isHtmlDirty=!0}syncCapsulePreviewVisibility(){!this._capsuleRevealed&&Rd()&&(this._capsuleRevealed=!0),this._bubble.object.visible=this._capsuleRevealed}armDesktopCapsulePreview(){if(Rd())return;let e=this._view.canvas;this._desktopMoveArm=t=>{t.pointerType!=="touch"&&(this._capsuleRevealed=!0,this.disarmDesktopCapsulePreview())},e.addEventListener("pointermove",this._desktopMoveArm)}disarmDesktopCapsulePreview(){this._desktopMoveArm&&(this._view.canvas.removeEventListener("pointermove",this._desktopMoveArm),this._desktopMoveArm=void 0)}end(){}disposePreview(){var e;this.disarmDesktopCapsulePreview(),(e=this._unsubDrawStyle)==null||e.call(this),this._unsubDrawStyle=void 0,this._preview.acapDispose(),this._ht.remove(this._tipDotId),this._ht.remove(this._bubbleId),this._view.isHtmlDirty=!0}applyCurrentStyle(){this._color=Wr(),this._tipDot.setColor(this._color),this._bubble.setColor(this._color);let e=Qa(),t=e.fontSize??Ol();this._bubble.setFontSize(t),this._tipDot.setFontSize(t),Sr(this._view,[this._bubble,this._tipDot],e),this.paintLeader(),this._view.isHtmlDirty=!0}paintLeader(){let e=Gs(Eo),t=this._color,n=this._tip,i=this._anchor;this._preview.acapSetDraw((o,a)=>{Vc(o,a,i,n,t,e,{arrow:!0})})}},U8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=Wr(),n=new Ae(P.t("jig.markup.callout.tip")),i=await e.view.editor.getPoint(n);if(i.status!==V.OK)return;let o=i.value,a=e.view,s=eLe(a,{x:o.x,y:o.y});if(s&&RT(s.geometry)){let c=eIe(s.geometry),u=await Dk(e,c,{force:!0,previewShape:!1,toward:{x:o.x,y:o.y}});u&&CRe(e.view,s.id,u);return}let l=new z8(e.view,o,"",t);try{let c=new Ae(P.t("jig.markup.callout.anchor"));c.basePoint=new k(o.x,o.y,o.z??0),c.useBasePoint=!0,c.useDashedLine=!1,c.jig=l;let u=await e.view.editor.getPoint(c);if(u.status!==V.OK)return;let h=u.value;l.revealCapsule();let d=await lU(l.capsule,{messageKey:"jig.markup.callout.content"}),p={...Gc("callout",e.view,e,{text:d||void 0}),type:"callout",geometry:{type:"callout",tip:{x:o.x,y:o.y},anchor:{x:h.x,y:h.y}}};Hc(e.view,p)}finally{l.disposePreview()}})}};var j8=class extends It{constructor(e,t,n){super(e),this._radius=0,this._view=e,this._center=t,this._color=n,this._preview=new Yi(this._view,`live-markup-circle-${Date.now()}`,Mo)}get entity(){return null}update(e){this._radius=Math.max(e,0),this._color=Wr();let t=Gs(Eo);this._preview.acapSetDraw((n,i)=>{aU(n,i,this._center,this._radius,this._color,t)})}end(){super.end(),this._preview.acapDispose()}},V8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=Wr(),n=await hU(e,"jig.markup.circle.center");if(!n)return;let i=new Zo(P.t("jig.markup.circle.radius"));i.allowZero=!1,i.useBasePoint=!0,i.useDashedLine=!0,i.basePoint=new k(n.x,n.y,n.z??0),i.jig=new j8(e.view,n,t);let o=await e.view.editor.getDistance(i);if(o.status!==V.OK)return;let a=o.value,s=await Dk(e,{kind:"circle",center:{x:n.x,y:n.y},radius:a}),l={...Gc("circle",e.view,e,{text:s?.text}),type:"circle",geometry:{type:"circle",center:{x:n.x,y:n.y},radius:a,callout:s}};Hc(e.view,l)})}};function JBe(r,e,t){return uU(cU(r,e,t))}var G8=class extends It{constructor(e,t,n){super(e),this._view=e,this._first=t,this._second=t,this._color=n,this._preview=new Yi(this._view,`live-markup-cloud-${Date.now()}`,Mo)}get entity(){return null}update(e){this._second=e,this._color=Wr();let t=Gs(Eo),n=JBe(this._first,this._second,this._view);this._preview.acapSetDraw((i,o)=>{am(i,o,n,this._color,t,{closed:!0})})}end(){super.end(),this._preview.acapDispose()}},H8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=Wr(),n=await hU(e,"jig.markup.cloud.firstCorner");if(!n)return;let i=new Ae(P.t("jig.markup.cloud.secondCorner"));i.useBasePoint=!0,i.jig=new G8(e.view,n,t);let o=await e.view.editor.getPoint(i);if(o.status!==V.OK)return;let a=o.value,s=await Dk(e,{kind:"cloud",corner1:{x:n.x,y:n.y},corner2:{x:a.x,y:a.y}}),l={...Gc("cloud",e.view,e,{text:s?.text}),type:"cloud",geometry:{type:"cloud",corner1:{x:n.x,y:n.y},corner2:{x:a.x,y:a.y},callout:s}};Hc(e.view,l)})}},W8=class extends It{constructor(e,t,n){super(e),this._view=e,this._first=t,this._second=t,this._colorCss=Ub(n),this._preview=new Yi(this._view,`live-markup-highlight-${Date.now()}`,Mo)}get entity(){return null}update(e){this._second=e,this._colorCss=Ub(Wr());let t=Gs(Eo);this._preview.acapSetDraw((n,i)=>{bRe(n,i,this._first,this._second,this._colorCss,t)})}end(){super.end(),this._preview.acapDispose()}},X8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=Wr(),n=Ub(t),i=new Ae(P.t("jig.markup.highlight.firstCorner")),o=await e.view.editor.getPoint(i);if(o.status!==V.OK)return;let a=o.value,s=new Ae(P.t("jig.markup.highlight.secondCorner"));s.useBasePoint=!0,s.jig=new W8(e.view,a,t);let l=await e.view.editor.getPoint(s);if(l.status!==V.OK)return;let c=l.value,u={...Gc("highlight",e.view,e),type:"highlight",style:{color:n,lineWeight:Eo},geometry:{type:"highlight",corner1:{x:a.x,y:a.y},corner2:{x:c.x,y:c.y}}};Hc(e.view,u)})}},QBe=["text","line","arrow","cloud","rect","circle","highlight","callout","stamp","symbol"];function Rb(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Bs(r){return Rb(r)&&typeof r.x=="number"&&typeof r.y=="number"}function DQ(r){return!(!Rb(r)||!Bs(r.tip)||!Bs(r.anchor)||r.text!==void 0&&typeof r.text!="string")}function e5e(r){return typeof r=="string"&&rIe.includes(r)}function t5e(r){return typeof r=="string"&&QBe.includes(r)}function RQ(r){return typeof r=="number"&&r>0&&Number.isFinite(r)?r:void 0}function n5e(r){if(!Rb(r)||typeof r.id!="string"||!t5e(r.type)||!Rb(r.style)||typeof r.style.color!="string"||!Rb(r.geometry)||r.geometry.type!==r.type||!e5e(r.status))return;let e=r.geometry;switch(r.type){case"text":if(!Bs(e.position))return;break;case"line":case"arrow":if(!Bs(e.start)||!Bs(e.end))return;break;case"cloud":case"rect":case"highlight":if(!Bs(e.corner1)||!Bs(e.corner2)||(r.type==="cloud"||r.type==="rect")&&e.callout!==void 0&&!DQ(e.callout))return;break;case"circle":if(!Bs(e.center)||typeof e.radius!="number"||!(e.radius>0)||e.callout!==void 0&&!DQ(e.callout))return;break;case"callout":if(!Bs(e.tip)||!Bs(e.anchor))return;break;case"stamp":if(!Bs(e.position)||typeof e.stampId!="string")return;break;case"symbol":if(!Bs(e.position)||typeof e.symbolId!="string")return;break;default:return}return{id:r.id,type:r.type,layoutId:typeof r.layoutId=="string"?r.layoutId:void 0,style:{color:r.style.color,lineWeight:Eo,fontSize:typeof r.style.fontSize=="number"&&r.style.fontSize>0?r.style.fontSize:void 0,textHeightWcs:RQ(r.style.textHeightWcs),arrowSizeWcs:RQ(r.style.arrowSizeWcs)},text:typeof r.text=="string"?r.text:void 0,comment:typeof r.comment=="string"?r.comment:"",status:r.status,author:typeof r.author=="string"?r.author:"",createdAt:typeof r.createdAt=="string"?r.createdAt:new Date().toISOString(),updatedAt:typeof r.updatedAt=="string"?r.updatedAt:new Date().toISOString(),geometry:r.geometry}}function r5e(r){let e;try{e=JSON.parse(r)}catch{throw new Error("Invalid markup sidecar: not JSON")}if(!Rb(e)||e.version!==1)throw new Error("Invalid markup sidecar: expected version 1");if(!Array.isArray(e.markups))throw new Error("Invalid markup sidecar: markups must be an array");let t=[];for(let n of e.markups){let i=n5e(n);i&&t.push(i)}return{version:1,drawingName:typeof e.drawingName=="string"?e.drawingName:void 0,markups:t}}function i5e(r){let{strokeWidthWcs:e,...t}=r;return{...t,lineWeight:Eo}}function o5e(r){let e={...r,markups:r.markups.map(t=>({...t,style:i5e(t.style)}))};return`${JSON.stringify(e,null,2)}
  6637. `}function a5e(r){return r?`${r.replace(/\.(dwg|dxf)$/i,"")}.markup.json`:"drawing.markup.json"}function s5e(r,e){if(typeof document>"u")return;let t=new Blob([e],{type:"application/json;charset=utf-8"}),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=r,i.click(),URL.revokeObjectURL(n)}function l5e(){return new Promise(r=>{if(typeof document>"u"){r(void 0);return}let e=document.createElement("input");e.type="file",e.accept=".json,application/json";let t=!1,n=i=>{t||(t=!0,r(i))};e.addEventListener("cancel",()=>n()),e.onchange=async()=>{var i;let o=(i=e.files)==null?void 0:i[0];if(!o){n();return}n(await o.text())},e.click()})}var Y8=class extends xt{constructor(){super(),this.mode=at.Read,this.recordsUndoStack=!1}async execute(e){let t=nn();t.drawingName||(t.drawingName=e.doc.fileName||e.doc.docTitle);let n=o5e(t.toSidecar());s5e(a5e(t.drawingName),n),t.markClean()}},$8=class extends xt{constructor(){super(),this.mode=at.Review,this.recordsUndoStack=!1}async execute(e){new fi(P.t("jig.markup.import.chooseFile"));let t=await l5e();if(t==null)return;let n;try{n=r5e(t)}catch(o){console.error(o);return}let i=nn();wa(e.view,"Import Markups",()=>{i.replaceAll(n.markups,n.drawingName),uh().republishAll(e.view)})}},K8=class extends It{constructor(e,t,n,i){super(e),this._view=e,this._p1=t,this._p2=t,this._color=n,this._ht=this._view.htmlTransientManager,this._badgeId=`live-markup-line-${Date.now()}`;let o=Qa();this._badge=new Hi({id:this._badgeId,color:n,text:i,worldPosition:t,layer:Mo,layoutId:this._view.activeLayoutBtrId,fontSize:o.fontSize}),this._badge.object.visible=!1,this._ht.add(this._badge),Sr(this._view,[this._badge],o),this._preview=new Yi(this._view,`live-markup-line-stroke-${Date.now()}`,Mo)}get entity(){return null}update(e){this._p2=e,this._color=Wr(),this._badge.setColor(this._color);let t=Qa();this._badge.setFontSize(t.fontSize??Ol()),Sr(this._view,[this._badge],t);let n=Gs(Eo);this._preview.acapSetDraw((i,o)=>{Vc(i,o,this._p1,this._p2,this._color,n)}),this._badge.setPosition({x:(this._p1.x+e.x)/2,y:(this._p1.y+e.y)/2}),this._badge.object.visible=!0}end(){super.end(),this._preview.acapDispose(),this._ht.remove(this._badgeId)}},q8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=Wr(),n=new Ae(P.t("jig.markup.line.firstPoint")),i=await e.view.editor.getPoint(n);if(i.status!==V.OK)return;let o=i.value,a=new Ae(P.t("jig.markup.line.secondPoint"));a.useBasePoint=!0,a.jig=new K8(e.view,o,t,"Line");let s=await e.view.editor.getPoint(a);if(s.status!==V.OK)return;let l=s.value,c={...Gc("line",e.view,e),type:"line",style:{color:Ub(t),lineWeight:Eo},geometry:{type:"line",start:{x:o.x,y:o.y},end:{x:l.x,y:l.y}}};Hc(e.view,c)})}},Z8=class extends It{constructor(e,t,n){super(e),this._view=e,this._first=t,this._second=t,this._color=n,this._preview=new Yi(this._view,`live-markup-rect-${Date.now()}`,Mo)}get entity(){return null}update(e){this._second=e,this._color=Wr();let t=Gs(Eo),n=sU(this._first,this._second);this._preview.acapSetDraw((i,o)=>{am(i,o,n,this._color,t,{closed:!0})})}end(){super.end(),this._preview.acapDispose()}},J8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=Wr(),n=await hU(e,"jig.markup.rect.firstCorner");if(!n)return;let i=new Ae(P.t("jig.markup.rect.secondCorner"));i.useBasePoint=!0,i.jig=new Z8(e.view,n,t);let o=await e.view.editor.getPoint(i);if(o.status!==V.OK)return;let a=o.value,s=await Dk(e,{kind:"rect",corner1:{x:n.x,y:n.y},corner2:{x:a.x,y:a.y}}),l={...Gc("rect",e.view,e,{text:s?.text}),type:"rect",geometry:{type:"rect",corner1:{x:n.x,y:n.y},corner2:{x:a.x,y:a.y},callout:s}};Hc(e.view,l)})}},BQ=new Set(["approved","rejected","revised","for-review","custom"]),Q8=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=new fi(P.t("jig.markup.stamp.kind"));t.allowEmpty=!1,t.allowSpaces=!1,t.defaultValue="approved",t.useDefaultValue=!0;let n=await e.view.editor.getString(t);if(n.status!==V.OK)return;let i=(n.stringResult??"approved").trim().toLowerCase(),o;(i==="custom"||!BQ.has(i))&&(o=await rQ(e,"jig.markup.stamp.imageUrl",""));let a=await rQ(e,"jig.markup.stamp.caption",""),s=new Ae(P.t("jig.markup.stamp.point")),l=await e.view.editor.getPoint(s);if(l.status!==V.OK)return;let c=l.value;if(i!=="custom"&&!BQ.has(i)){let h={...Gc("symbol",e.view,e,{text:a||void 0}),type:"symbol",style:Qa(),geometry:{type:"symbol",position:{x:c.x,y:c.y},symbolId:i,imageUrl:o||void 0}};Hc(e.view,h);return}let u={...Gc("stamp",e.view,e,{text:a||void 0}),type:"stamp",style:Qa(),geometry:{type:"stamp",position:{x:c.x,y:c.y},stampId:i,imageUrl:o||void 0}};Hc(e.view,u)})}},ez=class extends Fl{async execute(e){await this.withMarkupInput(e,async()=>{let t=new Ae(P.t("jig.markup.text.point")),n=await e.view.editor.getPoint(t);if(n.status!==V.OK)return;let i=n.value,o=e.view,a=`live-markup-text-${Date.now()}`,s=new Hi({id:a,color:Wr(),text:"",fontSize:Ol(),worldPosition:i,layer:Mo,layoutId:o.activeLayoutBtrId});o.htmlTransientManager.add(s),Sr(o,[s],Qa()),o.isHtmlDirty=!0;let l=oU(()=>{s.setColor(Wr());let h=Qa();s.setFontSize(h.fontSize??Ol()),Sr(o,[s],h),o.isHtmlDirty=!0}),c="Note";try{c=await lU({textElement:s.element,element:s.element},{multiline:!1})||"Note"}finally{l(),o.htmlTransientManager.remove(a),o.isHtmlDirty=!0}let u={...Gc("text",o,e,{text:c}),type:"text",geometry:{type:"text",position:{x:i.x,y:i.y}}};Hc(e.view,u)})}},Ine=!0;function c5e(r,e){Ine=e,r.htmlTransientManager.setVisible(e,Gz),r.htmlTransientManager.setVisible(e,Mo),r.isHtmlDirty=!0}var tz=class extends xt{constructor(){super(),this.mode=at.Review,this.recordsUndoStack=!1}async execute(e){let t=e.view;c5e(t,!Ine)}};function u5e(r,e){Yte(e),r("markuptext","markuptext",new ez),r("markupline","markupline",new q8),r("markuparrow","markuparrow",new N8),r("markupcloud","markupcloud",new H8),r("markuprect","markuprect",new J8),r("markupcircle","markupcircle",new V8),r("markuphighlight","markuphighlight",new X8),r("markupcallout","markupcallout",new U8),r("markupstamp","markupstamp",new Q8),r("markupvis","markupvis",new tz),r("clearmarkups","clearmarkups",new B8),r("markupexport","markupexport",new Y8),r("markupimport","markupimport",new $8)}var _1=class extends G1{constructor(e,t,n,i=1,o=!1){super(e,t,Math.max(0,i)),this._basePoint=new k(n),this._fitMode=o}update(e){let t=new k(e.x-this._basePoint.x,e.y-this._basePoint.y,e.z-this._basePoint.z);if(this.batchPreview.useBatchPreview&&this.copyCount>1){this.batchPreview.updatePlacements(this._view,t,this._fitMode);return}super.update(e)}buildTransforms(e){let t=new k(e.x-this._basePoint.x,e.y-this._basePoint.y,e.z-this._basePoint.z);return(this.previewEntries.length>0?this.previewEntries:[{entity:{objectId:""},copyFactor:1}]).map(n=>{let i=nU(t,n.copyFactor,this.copyCount,this._fitMode);return{objectId:n.entity.objectId,matrix:new Ie().makeTranslation(i.x,i.y,i.z)}})}},Lne=class nz extends xt{constructor(){super(),this.mode=at.Write}addKeyword(e,t){e.keywords.add(P.t(`jig.copy.keywords.${t}.display`),P.t(`jig.copy.keywords.${t}.global`),P.t(`jig.copy.keywords.${t}.local`))}computeDisplacement(e,t){return new k(t).sub(e)}scaleDisplacement(e,t,n,i){return nU(e,t,n,i)}appendCopies(e,t){t.length!==0&&(e.doc.database.tables.blockTable.modelSpace.appendEntity(t),e.view.addEntity(t))}buildCopies(e,t,n=1,i=!1){let o=[];for(let a=1;a<=n;a++){let s=e.map(u=>u.clone()).filter(u=>!!u),l=this.scaleDisplacement(t,a,n,i),c=new Ie().makeTranslation(l.x,l.y,l.z);s.forEach(u=>u.transformBy(c)),o.push(...s)}return o}async promptCopyMode(e){let t=new Hr(P.t("jig.copy.modePrompt"));t.allowNone=!0,this.addKeyword(t,"single"),this.addKeyword(t,"multiple");let n=t.keywords.findByGlobalName(e);n&&(t.keywords.default=n);let i=await Y.instance.editor.getKeywords(t);if(i.status===V.None)return e;if(i.status!==V.OK)return;let o=i.stringResult??"";return o==="Single"||o==="Multiple"?o:e}async promptArrayPlacement(e,t,n){let i=new QT(P.t("jig.copy.arrayItemCount"),2);i.lowerLimit=2,i.allowNegative=!1,i.allowZero=!1;let o=await Y.instance.editor.getInteger(i);if(o.status!==V.OK)return;let a=o.value??2,s=Math.max(1,a-1);for(;;){let l=new Ae(P.t("jig.copy.arraySecondPointOrFit"));this.addKeyword(l,"fit"),l.useBasePoint=!0,l.useDashedLine=!0,l.basePoint=n,l.jig=new _1(e.view,t,n,s);let c=await Y.instance.editor.getPoint(l);if(c.status===V.OK)return{copyCount:s,endPoint:new k(c.value),fitMode:!1};if(c.status===V.Keyword&&c.stringResult==="Fit"){let u=new Ae(P.t("jig.copy.arrayFitSecondPoint"));u.useBasePoint=!0,u.useDashedLine=!0,u.basePoint=n,u.jig=new _1(e.view,t,n,s,!0);let h=await Y.instance.editor.getPoint(u);if(h.status===V.OK)return{copyCount:s,endPoint:new k(h.value),fitMode:!0}}return}}async executeCopyLoop(e,t,n,i,o=!1){for(;;){let a=new Ae(P.t(o?"jig.copy.displacementOrArray":"jig.copy.secondPointOrArray"));this.addKeyword(a,"array"),a.useBasePoint=!0,a.useDashedLine=!0,a.basePoint=n,a.allowNone=!0,a.jig=new _1(e.view,t,n);let s=await Y.instance.editor.getPoint(a);if(s.status===V.OK){let l=this.buildCopies(t,this.computeDisplacement(n,s.value));if(this.appendCopies(e,l),i==="Single")return;continue}if(s.status===V.Keyword&&s.stringResult==="Array"){let l=await this.promptArrayPlacement(e,t,n);if(!l)continue;let c=this.buildCopies(t,this.computeDisplacement(n,l.endPoint),l.copyCount,l.fitMode);if(this.appendCopies(e,c),i==="Single")return;continue}return}}async execute(e){let t=e.view.selectionSet,n=await fU(e,{promptKey:"copy"});if(!n)return;let i=n.entities.map(l=>e.doc.database.openEntityForRead(l.objectId)).filter(l=>!!l);if(i.length===0){t.clear();return}let o=nz._defaultMode,a,s=!1;for(;!a;){let l=new Ae(P.t("jig.copy.basePointOrOptions"));l.allowNone=!0,this.addKeyword(l,"displacement"),this.addKeyword(l,"mode"),o!=="Multiple"&&this.addKeyword(l,"multiple");let c=await Y.instance.editor.getPoint(l);if(c.status===V.OK){a=new k(c.value);break}if(c.status===V.None){a=new k(0,0,0),s=!0;break}if(c.status!==V.Keyword){t.clear();return}let u=c.stringResult??"";if(u==="Displacement"){a=new k(0,0,0),s=!0;break}if(u==="Multiple"){o="Multiple";continue}if(u!=="Mode"){t.clear();return}let h=await this.promptCopyMode(o);if(!h){t.clear();return}o=h,nz._defaultMode=h}await this.executeCopyLoop(e,i,a,o,s),t.clear()}};Lne._defaultMode="Multiple";var h5e=Lne,rz=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.view.selectionSet,n=await KRe(e,"erase");n&&(e.doc.entityService.eraseEntities(n),t.clear())}},iz=class extends xt{async execute(e){let t=e.view.selectionSet,n=t.count>0?t.ids:[];if(n.length===0){let o=new Bd(P.sysCmdPrompt("hideobjects")),a=await Y.instance.editor.getSelection(o);if(a.status!==V.OK||!a.value||a.value.count===0)return;n=a.value.ids}let i=$Fe(e,n);i>0&&this.showMessage(`${i} ${P.t("jig.hideobjects.hidden")}`,"success")}},Sk=class extends G1{constructor(e,t,n){super(e,t),this._basePoint=new k(n)}buildTransforms(e){let t=new k(e.x-this._basePoint.x,e.y-this._basePoint.y,e.z-this._basePoint.z),n=new Ie().makeTranslation(t.x,t.y,t.z);return(this.previewEntries.length>0?this.previewEntries:[{entity:{objectId:""},copyFactor:1}]).map(i=>({objectId:i.entity.objectId,matrix:n}))}},oz=class extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=e.view.selectionSet,n=await fU(e,{promptKey:"move"});if(!n)return;let{entities:i}=n,o,a,s=d=>{d.keywords.add(P.t("jig.move.keywords.displacement.display"),P.t("jig.move.keywords.displacement.global"),P.t("jig.move.keywords.displacement.local"))};class l{constructor(p){this.machine=p}buildPrompt(){let p=new Ae(P.t("jig.move.basePointOrDisplacement"));return s(p),p.allowNone=!0,p}async handleResult(p){return p.status===V.OK?(o=new k(p.value),this.machine.setState(new c(this.machine)),"continue"):p.status===V.None?(this.machine.setState(new u),"continue"):p.status===V.Keyword&&p.stringResult==="Displacement"?(this.machine.setState(new u),"continue"):"finish"}}class c{constructor(p){this.machine=p}buildPrompt(){let p=new Ae(P.t("jig.move.secondPointOrDisplacement"));return s(p),o&&(p.useBasePoint=!0,p.useDashedLine=!0,p.basePoint=o,p.jig=new Sk(e.view,i,o)),p.allowNone=!0,p}async handleResult(p){if(p.status===V.OK&&o){let f=new k(p.value);return a=new k(f).sub(o),"finish"}return p.status===V.Keyword&&p.stringResult==="Displacement"?(this.machine.setState(new u),"continue"):"finish"}}class u{buildPrompt(){let p=new Ae(P.t("jig.move.displacement"));return p.useBasePoint=!0,p.useDashedLine=!0,p.basePoint=new k(0,0,0),p.jig=new Sk(e.view,i,p.basePoint),p.allowNone=!0,p}async handleResult(p){return p.status===V.OK&&(a=new k(p.value)),"finish"}}let h=new Bl;if(h.setState(new l(h)),await h.run(d=>Y.instance.editor.getPoint(d)),!a){t.clear();return}e.doc.entityService.translateEntities(i,a),t.clear()}};function d5e(r){return r instanceof vn}function One(r,e,t){try{let n=r.getOffsetSideAtPoint(t),i=r.getOffsetCurves(e*n);return i.forEach(o=>pk.copyDisplayTraits(r,o)),i}catch{return[]}}var az=class extends It{constructor(e,t,n){super(e),this._previewCurves=[],this._renderedIds=[],this._view=e,this._curve=t,this._distance=n}update(e){this.clearRendered(),this._previewCurves=One(this._curve,this._distance,e)}render(){this._previewCurves.length!==0&&(this._view.addTransientEntity(this._previewCurves),this._renderedIds=this._previewCurves.map(e=>e.objectId))}end(){this.clearRendered()}clearRendered(){this._renderedIds.forEach(e=>this._view.removeTransientEntity(e)),this._renderedIds=[]}},sz=class r extends xt{constructor(){super(),this.mode=at.Write}async execute(e){let t=(u,h="info")=>{this.showMessage(u,h)},n=e.doc.database.tables.blockTable,i,o;class a{constructor(h){this.machine=h}buildPrompt(){let h=r._lastDistance,d=new Zo(P.t("jig.offset.distance"));return d.useBasePoint=!1,d.useDashedLine=!0,d.allowZero=!1,d.allowNegative=!1,h!=null&&(d.defaultValue=h,d.useDefaultValue=!0,d.allowNone=!0),d}handleResult(h){return!(h instanceof ya)||h.status!==V.OK||h.value==null?"finish":!Number.isFinite(h.value)||Ce.isNonPositive(h.value)?(t(P.t("jig.offset.invalidDistance"),"warning"),"finish"):(i=h.value,r._lastDistance=h.value,this.machine.setState(new s(this.machine)),"continue")}}class s{constructor(h){this.machine=h}buildPrompt(){let h=new Rl(P.t("jig.offset.selectObject"));return h.allowNone=!0,h.allowObjectOnLockedLayer=!0,h.setRejectMessage(P.t("jig.offset.invalidSelection")),h}handleResult(h){if(!(h instanceof F1)||h.status===V.None||h.status!==V.OK||!h.objectId)return"finish";let d=e.doc.database.openEntityForRead(h.objectId);return d5e(d)?(o=d,this.machine.setState(new l(this.machine)),"continue"):(t(P.t("jig.offset.invalidSelection"),"warning"),"continue")}}class l{constructor(h){this.machine=h}buildPrompt(){let h=new Ae(P.t("jig.offset.sidePoint"));if(h.allowNone=!0,h.disableOSnap=!0,o&&i!=null){let d=new az(e.view,o,i);d.update({...e.view.curPos,z:0}),d.render(),h.jig=d}return h}handleResult(h){if(!(h instanceof N1)||h.status!==V.OK||!h.value||!o||i==null)return"finish";let d=One(o,i,new k(h.value));return d.length===0?t(P.t("jig.offset.offsetFailed"),"warning"):n.modelSpace.appendEntity(d),o=void 0,this.machine.setState(new s(this.machine)),"continue"}}let c=new Bl;c.setState(new a(c)),await c.run(u=>u instanceof Zo?Y.instance.editor.getDistance(u):u instanceof Rl?Y.instance.editor.getEntity(u):Y.instance.editor.getPoint(u))}},Pb=class extends HN{},Ak=class extends G1{constructor(e,t,n,i=0){super(e,t),this._lastAngleRad=0,this._basePoint=new k(n),this._referenceAngleDeg=i}get entity(){return this.previewEntities[0]??null}update(e){let t=(e-this._referenceAngleDeg)*Math.PI/180;if(this.batchPreview.useBatchPreview){if(Ce.equalToZero(t-this._lastAngleRad))return;this.batchPreview.updateMatrix(this._view,H1(this._basePoint,t)),this._lastAngleRad=t;return}this._lastAngleRad=t,super.update(e)}buildTransforms(e){let t=(e-this._referenceAngleDeg)*Math.PI/180,n=H1(this._basePoint,t);return this.previewEntries.map(i=>({objectId:i.entity.objectId,matrix:n}))}},Dne=class extends xt{constructor(){super(),this.mode=at.Write}addKeyword(e,t){e.keywords.add(P.t(`jig.rotate.keywords.${t}.display`),P.t(`jig.rotate.keywords.${t}.global`),P.t(`jig.rotate.keywords.${t}.local`))}warnInvalidInput(e){this.notify(P.t(`jig.rotate.invalid.${e}`),"warning")}computeAngleDeg(e,t){let n=t.x-e.x,i=t.y-e.y;if(Ce.isPositive(Math.hypot(n,i)))return Math.atan2(i,n)*180/Math.PI}async promptReferenceAngle(e,t,n){for(;;){let i=new _a(P.t("jig.rotate.referenceAngleOrPoints"));this.addKeyword(i,"points"),i.useBasePoint=!0,i.useDashedLine=!0,i.basePoint=n,i.allowNegative=!0,i.allowZero=!0,i.useDefaultValue=!0,i.defaultValue=0,i.jig=new Pb(e.view,t);let o=await Y.instance.editor.getAngle(i);if(o.status===V.OK)return o.value??0;if(o.status===V.Keyword&&o.stringResult==="Points"){let a=new Ae(P.t("jig.rotate.firstReferencePoint"));a.jig=new Pb(e.view,t);let s=await Y.instance.editor.getPoint(a);if(s.status!==V.OK)return;let l=new Ae(P.t("jig.rotate.secondReferencePoint"));l.useBasePoint=!0,l.useDashedLine=!0,l.basePoint=new k(s.value),l.jig=new Pb(e.view,t);let c=await Y.instance.editor.getPoint(l);if(c.status!==V.OK)return;let u=this.computeAngleDeg(s.value,c.value);if(u==null){this.warnInvalidInput("referencePoints");continue}return u}return}}async promptRotationAngle(e,t,n){let i=!1;for(;;){let o=new _a(P.t("jig.rotate.rotationAngleOrOptions"));this.addKeyword(o,"copy"),this.addKeyword(o,"reference"),o.useBasePoint=!0,o.useDashedLine=!0,o.basePoint=n,o.allowNegative=!0,o.allowZero=!0,o.allowNone=!0,o.jig=new Ak(e.view,t,n);let a=await Y.instance.editor.getAngle(o);if(a.status===V.OK)return{copyMode:i,angleRad:(a.value??0)*Math.PI/180};if(a.status!==V.Keyword)return;let s=a.stringResult??"";if(s==="Copy"){i=!0;continue}if(s!=="Reference")return;let l=await this.promptReferenceAngle(e,t,n);if(l==null)return;let c=new _a(P.t("jig.rotate.newAngle"));c.useBasePoint=!0,c.useDashedLine=!0,c.basePoint=n,c.allowNegative=!0,c.allowZero=!0,c.allowNone=!0,c.jig=new Ak(e.view,t,n,l);let u=await Y.instance.editor.getAngle(c);return u.status!==V.OK?void 0:{copyMode:i,angleRad:((u.value??0)-l)*Math.PI/180}}}async execute(e){let t=e.view.selectionSet,n=await fU(e,{promptKey:"rotate"});if(!n)return;let{entities:i}=n,o=new Ae(P.t("jig.rotate.basePoint"));o.jig=new Pb(e.view,i),o.allowNone=!0;let a=await Y.instance.editor.getPoint(o);if(a.status!==V.OK){t.clear();return}let s=new k(a.value),l=await this.promptRotationAngle(e,i,s);if(!l){t.clear();return}let c=H1(s,l.angleRad),u=e.doc.entityService;l.copyMode?u.cloneAndTransform(i,c):u.transformEntities(i,c),t.clear()}};Dne.createRotationMatrix=H1;var p5e=Dne,lz=class extends xt{async execute(e){let t=KFe(e);if(t>0){this.showMessage(`${t} ${P.t("jig.hideobjects.restored")}`,"success");return}this.showMessage(P.t("jig.hideobjects.nothingToRestore"),"info")}},CT=class Rs extends tS{constructor(e){super({host:e,title:P.t("main.about.title"),closeLabel:P.t("main.about.close"),titleId:"ml-ui-about-title",dialogClassName:"ml-ui-about-dialog"}),Rs.ensureAboutStyles(),this.buildContent()}static open(e=document.body){var t;(t=Rs.openInstance)==null||t.close();let n=new Rs(e);return Rs.openInstance=n,n.show()}close(){Rs.openInstance===this&&(Rs.openInstance=null),super.close()}buildContent(){let e=Hke({className:"ml-ui-about-brand",iconSize:"56px"}),t=document.createElement("div");t.className="ml-ui-about-product",t.textContent=P.t("main.about.product");let n=document.createElement("div");n.className="ml-ui-about-tagline",n.textContent=P.t("main.about.tagline");let i=document.createElement("div");i.className="ml-ui-about-links",i.appendChild(this.createLink(P.t("main.about.website"),Vke)),i.appendChild(this.createLink(P.t("main.about.docs"),nee)),i.appendChild(this.createLink(P.t("main.about.repository"),Gke));let o=document.createElement("div");o.className="ml-ui-about-copyright",o.textContent=P.t("main.about.copyright").replace("{year}",String(new Date().getFullYear())),this.bodyEl.appendChild(e),this.bodyEl.appendChild(t),this.bodyEl.appendChild(n),this.bodyEl.appendChild(i),this.bodyEl.appendChild(o);let a=document.createElement("button");a.type="button",a.className="ml-ui-dialog-btn",a.textContent=P.t("main.about.ok"),a.addEventListener("click",()=>this.close()),this.footerEl.appendChild(a),this.focusAfterOpen(a)}createLink(e,t){let n=document.createElement("a");return n.className="ml-ui-about-link",n.href=t,n.target="_blank",n.rel="noopener noreferrer",n.textContent=e,n}static ensureAboutStyles(){if(Rs.aboutStylesInjected)return;if(document.getElementById(Rs.aboutStyleId)){Rs.aboutStylesInjected=!0;return}let e=document.createElement("style");e.id=Rs.aboutStyleId,e.textContent=`
  6638. .ml-ui-about-brand {
  6639. display: flex;
  6640. flex-direction: column;
  6641. align-items: center;
  6642. gap: 10px;
  6643. margin-bottom: 10px;
  6644. color: var(--ml-ui-accent, #0b84ff);
  6645. }
  6646. .ml-ui-about-brand .ml-brand-mark-icon {
  6647. display: inline-flex;
  6648. }
  6649. .ml-ui-about-brand .ml-brand-mark-icon svg {
  6650. width: 100%;
  6651. height: 100%;
  6652. display: block;
  6653. }
  6654. .ml-ui-about-brand .ml-brand-mark-label {
  6655. font-size: 22px;
  6656. font-weight: 700;
  6657. letter-spacing: 0.04em;
  6658. color: var(--ml-ui-text, #303133);
  6659. }
  6660. .ml-ui-about-product {
  6661. text-align: center;
  6662. font-size: 15px;
  6663. font-weight: 600;
  6664. }
  6665. .ml-ui-about-tagline {
  6666. margin-top: 4px;
  6667. text-align: center;
  6668. font-size: 12px;
  6669. color: var(--ml-ui-text-muted, #606266);
  6670. line-height: 1.45;
  6671. }
  6672. .ml-ui-about-links {
  6673. display: flex;
  6674. flex-wrap: wrap;
  6675. justify-content: center;
  6676. gap: 10px 14px;
  6677. margin-top: 14px;
  6678. }
  6679. .ml-ui-about-link {
  6680. color: var(--ml-ui-accent, #0b84ff);
  6681. font-size: 12px;
  6682. text-decoration: none;
  6683. }
  6684. .ml-ui-about-link:hover {
  6685. text-decoration: underline;
  6686. }
  6687. .ml-ui-about-copyright {
  6688. margin-top: 14px;
  6689. text-align: center;
  6690. font-size: 11px;
  6691. color: var(--ml-ui-text-muted, #909399);
  6692. }
  6693. `.trim(),document.head.appendChild(e),Rs.aboutStylesInjected=!0}};CT.aboutStyleId="ml-ui-about-dialog-styles",CT.aboutStylesInjected=!1,CT.openInstance=null;var f5e=CT,cz=class extends xt{constructor(){super(...arguments),this.recordsUndoStack=!1}async execute(e){var t;let n=((t=e.view)==null?void 0:t.container)??document.body;await f5e.open(n)}},TT=null;Gt.on("font-file-selected",({file:r})=>{TT?.(r),TT=null});function m5e(){return new Promise(r=>{TT=r,Gt.emit("cache-font",{})})}var uz=class r extends xt{static async cacheFontFile(e,t){let n=t?.notify??!0,i=new r;try{let o=await $1.cacheFont(e,void 0,t?.aliases);return n&&(o.status==="Success"?i.notify(`${P.t("main.message.fontCached")}: ${o.fontName}`,"success"):i.notify(`${P.t("main.message.fontCacheFailed")}: ${e.name}`,"error")),o}catch{return n&&i.notify(`${P.t("main.message.fontCacheFailed")}: ${e.name}`,"error"),{fontName:"",url:"",status:"FailedToLoad"}}}async execute(e){let t=await m5e();t&&await r.cacheFontFile(t)}},hz=class extends xt{async execute(e){this.printSelectionSet(e),this.printStats(e),this.printPerformanceData()}printSelectionSet(e){let t=e.doc.database.tables.blockTable.modelSpace;e.view.selectionSet.ids.forEach(n=>{let i=t.getIdAt(n);i&&kt.info(i)})}printStats(e){let t=e.view.stats,n=t.layouts;kt.info("Geometry information in current drawing:");for(let i=0;i<n.length;++i){console.group(`Layout: ${i}`);let o=n[i],a=[0,0,0,0,0,0,0],s=[0,0,0,0,0,0,0],l=0,c=o.layers.map(u=>(a[0]=u.line.indexed.geometrySize/1024,a[1]=u.line.nonIndexed.geometrySize/1024,a[2]=u.mesh.indexed.geometrySize/1024,a[3]=u.mesh.nonIndexed.geometrySize/1024,a[4]=u.point.indexed.geometrySize/1024,a[5]=u.point.nonIndexed.geometrySize/1024,a[6]=u.unbatched.geometrySize/1024,s[0]+=a[0],s[1]+=a[1],s[2]+=a[2],s[3]+=a[3],s[4]+=a[4],s[5]+=a[5],s[6]+=a[6],l+=u.unbatched.count,{name:u.name,"idx line (KB)":a[0].toFixed(1),"line (KB)":a[1].toFixed(1),"idx mesh (KB)":a[2].toFixed(1),"mesh (KB)":a[3].toFixed(1),"idx point (KB)":a[4].toFixed(1),"point (KB)":a[5].toFixed(1),"unbatched (KB)":a[6].toFixed(1),"unbatched count":u.unbatched.count,"unbatched line":u.unbatched.byType.line,"unbatched mesh":u.unbatched.byType.mesh,"unbatched point":u.unbatched.byType.point,"unbatched other":u.unbatched.byType.other,"total geo (KB)":(u.summary.totalGeometrySize/1024).toFixed(1),"total mapping (KB)":(u.summary.totalMappingSize/1024).toFixed(1)}));c.push({name:"total","idx line (KB)":s[0].toFixed(1),"line (KB)":s[1].toFixed(1),"idx mesh (KB)":s[2].toFixed(1),"mesh (KB)":s[3].toFixed(1),"idx point (KB)":s[4].toFixed(1),"point (KB)":s[5].toFixed(1),"unbatched (KB)":s[6].toFixed(1),"unbatched count":l,"unbatched line":o.summary.totalSize.unbatchedByType.line,"unbatched mesh":o.summary.totalSize.unbatchedByType.mesh,"unbatched point":o.summary.totalSize.unbatchedByType.point,"unbatched other":o.summary.totalSize.unbatchedByType.other,"total geo (KB)":(o.summary.totalSize.geometry/1024).toFixed(1),"total mapping (KB)":(o.summary.totalSize.mapping/1024).toFixed(1)}),console.table(c),console.table([{layoutCount:t.summary.layoutCount,entityCount:t.summary.entityCount,"scene line (KB)":(t.summary.totalSize.line/1024).toFixed(1),"scene mesh (KB)":(t.summary.totalSize.mesh/1024).toFixed(1),"scene point (KB)":(t.summary.totalSize.point/1024).toFixed(1),"scene unbatched (KB)":(t.summary.totalSize.unbatched/1024).toFixed(1),"scene unbatched count":t.summary.totalSize.unbatchedCount,"scene unbatched line":t.summary.totalSize.unbatchedByType.line,"scene unbatched mesh":t.summary.totalSize.unbatchedByType.mesh,"scene unbatched point":t.summary.totalSize.unbatchedByType.point,"scene unbatched other":t.summary.totalSize.unbatchedByType.other,"scene total geo (KB)":(t.summary.totalSize.geometry/1024).toFixed(1),"scene total mapping (KB)":(t.summary.totalSize.mapping/1024).toFixed(1)}]),console.groupEnd()}}printPerformanceData(){$c.getInstance().printAll()}};var dz=class extends xt{async execute(e){Gt.emit("open-file",{})}},pz=class extends xt{async execute(e){await Y.instance.closeDocument()}},fz=class extends xt{async execute(e){if(!await Y.instance.newDocument())throw new Error("Failed to create new drawing")}},mz=class extends xt{async execute(){Y.instance.regen()}},gz=class extends xt{async execute(e){e.view.mode=js.SELECTION,e.view.setCursor(eS.Crosshair)}},yz=class extends xt{constructor(){super(),this.mode=at.Review}async execute(e){let t=gt.instance(),n=t.getVar(this.globalName,e.doc.database),i=P.t("jig.sysvar.prompt").trim(),o=new fi(i);n!=null&&(o.defaultValue=String(n),o.useDefaultValue=!0);let a=await Y.instance.editor.getString(o);if(a.status!==V.OK||!a.stringResult)return;let s=a.stringResult;t.getDescriptor(this.globalName)&&t.setVar(this.globalName,s,e.doc.database)}},bz=class extends xt{async execute(e){let t=e.view;if(t.readingModeEnabled)return;let n=e.doc.database,i=t.activeLayoutBtrId===t.modelSpaceBtrId,o=jee(i),a=gt.instance();if(!a.getDescriptor(o))return;let s=a.getVar(o,n);a.setVar(o,ILe(s),n)}},vz=class extends xt{async execute(e){e.view.toggleReadingMode()}},xz=class extends xt{constructor(){super(),this.globalName="undo",this.localName="Undo",this.recordsUndoStack=!1}async execute(e){let t=Dd().undo(e.doc.database);if(!t){let n=P.sysCmdKey(this.globalName,"nothingToUndo");this.showMessage(P.sysCmd(this.globalName,"nothingToUndo"),"info",n);return}t==="markup"&&uh().republishAll(e.view),um()}},wz=class extends xt{constructor(){super(),this.globalName="redo",this.localName="Redo",this.recordsUndoStack=!1}async execute(e){let t=Dd().redo(e.doc.database);if(!t){let n=P.sysCmdKey(this.globalName,"nothingToRedo");this.showMessage(P.sysCmd(this.globalName,"nothingToRedo"),"info",n);return}t==="markup"&&uh().republishAll(e.view),um()}};var _z=class extends xt{async execute(e){e.view.mode=js.PAN,e.view.setCursor(eS.Grab)}},Sz=class{constructor(e,t){this._plugins=new Map,this._lazyRegistrations=new Map,this._triggerToPluginName=new Map,this._lazyLoadPromises=new Map,this._context=e,this._commandManager=t}get context(){return this._context}setContext(e){this._context=e}async loadPlugin(e){let t=e.name;if(!t)throw new Error("[AcApPluginManager] Plugin name is required");if(this._plugins.has(t))throw new Error(`[AcApPluginManager] Plugin '${t}' is already loaded`);try{await e.onLoad(this._context,this._commandManager)}catch(n){throw new Error(`[AcApPluginManager] Failed to load plugin '${t}': ${n}`)}this._plugins.set(t,e)}registerLazyPlugin(e){let t=e.name;if(!t)throw new Error("[AcApPluginManager] Lazy plugin name is required");if(this._lazyRegistrations.has(t))throw new Error(`[AcApPluginManager] Lazy plugin '${t}' is already registered`);if(!e.triggers.length)throw new Error(`[AcApPluginManager] Lazy plugin '${t}' requires at least one trigger`);this._lazyRegistrations.set(t,e);for(let n of e.triggers){let i=n.trim().toUpperCase();if(i){if(this._triggerToPluginName.has(i))throw new Error(`[AcApPluginManager] Trigger '${n}' is already registered to lazy plugin '${this._triggerToPluginName.get(i)}'`);this._triggerToPluginName.set(i,t)}}}isLazyPluginTrigger(e){return this._triggerToPluginName.has(e.trim().toUpperCase())}getLazyPluginTriggers(){return Array.from(this._triggerToPluginName.keys())}async loadByTrigger(e){let t=e.trim().toUpperCase(),n=this._triggerToPluginName.get(t);if(!n)return!1;if(this.isPluginLoaded(n))return!0;let i=this._lazyLoadPromises.get(n);if(i)return i;let o=this._lazyRegistrations.get(n);if(!o)return!1;let a=(async()=>{try{let s=await o.loader();if(s.name!==n)throw new Error(`[AcApPluginManager] Lazy plugin '${n}' loader returned plugin '${s.name}'`);return this.isPluginLoaded(n)||await this.loadPlugin(s),!0}catch(s){return kt.error(`[AcApPluginManager] Failed to load lazy plugin '${n}' for trigger '${e}':`,s),!1}finally{this._lazyLoadPromises.delete(n)}})();return this._lazyLoadPromises.set(n,a),a}async unloadPlugin(e){let t=this._plugins.get(e);if(!t)return!1;try{await t.onUnload(this._context,this._commandManager)}catch(n){kt.error(`[AcApPluginManager] Error unloading plugin '${e}':`,n)}return this._plugins.delete(e),!0}isPluginLoaded(e){return this._plugins.has(e)}getPlugin(e){return this._plugins.get(e)}getLoadedPlugins(){return Array.from(this._plugins.keys())}async unloadAllPlugins(){let e=Array.from(this._plugins.keys());for(let t of e)await this.unloadPlugin(t)}async loadPluginsFromConfig(e,t){let n=t?.continueOnError??!1,i=[],o=[];for(let a of e)try{let s=typeof a=="function"?a():a;await this.loadPlugin(s),i.push(s.name)}catch(s){let l=typeof a=="function"?"Unknown":a.name||"Unknown",c=s instanceof Error?s:new Error(String(s));if(o.push({name:l,error:c}),!n)throw c}return{loaded:i,failed:o}}async loadPluginsFromFolder(e,t){let n=t?.continueOnError??!1,i=t?.pluginList||[],o=[],a=[];if(i.length===0)return kt.warn("[AcApPluginManager] No plugin list provided. Cannot load plugins from folder without a list of files."),{loaded:o,failed:a};let s=e.replace(/\/$/,""),l=s.startsWith("./")?s:`./${s}`;for(let c of i)try{let u=await import(`${l}/${c.replace(/^\//,"")}`),h=u.default,d;if(!h){let f=c.replace(/\.(js|ts)$/,"");d=f.split(/[-_]/).map(m=>m.charAt(0).toUpperCase()+m.slice(1).toLowerCase()).join(""),h=u[d]||u.Plugin||u[f]}if(!h){let f=d||"Plugin";throw new Error(`No plugin export found in ${c}. Expected default export, or named export 'Plugin' or '${f}'.`)}let p;if(typeof h=="function"?h.prototype&&h.prototype.onLoad?p=new h:p=h():p=h,!p||typeof p.onLoad!="function")throw new Error(`Invalid plugin in ${c}. Plugin must implement AcApPlugin interface.`);await this.loadPlugin(p),o.push(p.name)}catch(u){let h=u instanceof Error?u:new Error(String(u));if(a.push({name:c,error:h}),!n)throw h}return{loaded:o,failed:a}}};function FQ(r){if(!r)return[];let e=(r.includes(`
  6694. `)||r.includes("\r")?r:r.replace(/\\n/g,`
  6695. `)).replace(/\r\n/g,`
  6696. `).replace(/\r/g,`
  6697. `).split(`
  6698. `),t=[];for(let n of e)n.trimStart().startsWith(";")||t.push(n);return t}function g5e(r){let e=r.trim().toUpperCase();return e==="QUIT"||e==="EXIT"}var Az=class _b{constructor(e={}){let t=e.showBrand??!0;this.options={size:e.size??(t?"72px":"48px"),borderWidth:e.borderWidth??(t?"4px":"5px"),color:e.color??"var(--ml-ui-accent, #0b84ff)",host:e.host??document.body,overlay:e.overlay??!0,overlayColor:e.overlayColor??"var(--ml-ui-overlay, rgba(0,0,0,0.5))",message:e.message??"",showBrand:t},_b.stylesInjected||this.injectStyles(),this.createDom()}show(){return this.root.style.display="flex",this}hide(){return this.root.style.display="none",this}setMessage(e=""){return this.messageEl.textContent=e,this.messageEl.style.display=e?"block":"none",this}setOverlayColor(e){return this.options.overlay&&this.root&&(this.root.style.background=e),this}setPointerEventsBlocked(e){return this.root&&(this.root.style.pointerEvents=e?"auto":"none"),this}setHost(e){return this.options.host===e?this:(this.options.host=e,getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.appendChild(this.root),this)}destroy(){var e;(e=this.root)!=null&&e.parentNode&&this.root.parentNode.removeChild(this.root)}createDom(){let e=this.options.host;getComputedStyle(e).position==="static"&&(e.style.position="relative");let t=document.createElement("div");t.className="ml-ccl-overlay",t.style.display="flex",t.style.background=this.options.overlay?this.options.overlayColor:"transparent";let n=document.createElement("div");n.className="ml-ccl-spinner-stage",n.style.width=this.options.size,n.style.height=this.options.size;let i=document.createElement("div");if(i.className="ml-ccl-spinner",i.style.borderWidth=this.options.borderWidth,i.style.borderTopColor=this.options.color,n.appendChild(i),this.options.showBrand){let s=ree({className:"ml-ccl-spinner-icon",size:"60%"});n.appendChild(s);let l=document.createElement("div");l.className="ml-ccl-message",l.textContent=this.options.message,l.style.display=this.options.message?"block":"none";let c=document.createElement("div");c.className="ml-ccl-wrapper",c.appendChild(n),c.appendChild(l),t.appendChild(c),e.appendChild(t),this.root=t,this.spinner=i,this.messageEl=l;return}let o=document.createElement("div");o.className="ml-ccl-message",o.textContent=this.options.message,o.style.display=this.options.message?"block":"none";let a=document.createElement("div");a.className="ml-ccl-wrapper",a.appendChild(n),a.appendChild(o),t.appendChild(a),e.appendChild(t),this.root=t,this.spinner=i,this.messageEl=o}injectStyles(){if(document.getElementById(_b.styleId)){_b.stylesInjected=!0;return}let e=`
  6699. .ml-ccl-overlay {
  6700. position: absolute;
  6701. inset: 0;
  6702. display: none;
  6703. justify-content: center;
  6704. align-items: center;
  6705. z-index: 9999;
  6706. pointer-events: auto;
  6707. font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  6708. }
  6709. .ml-ccl-wrapper {
  6710. display: flex;
  6711. flex-direction: column;
  6712. align-items: center;
  6713. }
  6714. .ml-ccl-spinner-stage {
  6715. position: relative;
  6716. flex-shrink: 0;
  6717. }
  6718. .ml-ccl-spinner {
  6719. position: absolute;
  6720. inset: 0;
  6721. border-radius: 50%;
  6722. border-style: solid;
  6723. border-color: var(--ml-ui-border, rgba(0,0,0,0.25));
  6724. border-top-color: var(--ml-ui-accent, #0b84ff);
  6725. animation: ml-ccl-rotate 0.85s linear infinite;
  6726. box-sizing: border-box;
  6727. }
  6728. .ml-ccl-spinner-icon {
  6729. position: absolute;
  6730. inset: 0;
  6731. margin: auto;
  6732. display: inline-flex;
  6733. color: var(--ml-ui-accent, #0b84ff);
  6734. pointer-events: none;
  6735. user-select: none;
  6736. }
  6737. .ml-ccl-spinner-icon svg {
  6738. width: 100%;
  6739. height: 100%;
  6740. display: block;
  6741. }
  6742. .ml-ccl-message {
  6743. margin-top: 10px;
  6744. font-size: 14px;
  6745. color: var(--ml-ui-text, #FFF);
  6746. text-align: center;
  6747. user-select: none;
  6748. }
  6749. @keyframes ml-ccl-rotate {
  6750. to { transform: rotate(360deg); }
  6751. }
  6752. `.trim(),t=document.createElement("style");t.id=_b.styleId,t.textContent=e,document.head.appendChild(t),_b.stylesInjected=!0}};Az.styleId="ml-ccl-loader-styles",Az.stylesInjected=!1;var Rne=Az,Mz=class{constructor(e){this._refCount=0,this._message="",this._progress=new Rne({host:e}),this._progress.hide()}setHost(e){this._progress.setHost(e)}show(e){e!==void 0?this._message=e:this._refCount===0&&(this._message=""),this._refCount++,this._refCount===1?(this._progress.setMessage(this._message),this._progress.show(),this.emitEvent(!0)):e!==void 0&&(this._progress.setMessage(e),this.emitEvent(!0))}hide(){this._refCount<=0||(this._refCount--,this._refCount===0&&(this._message="",this._progress.hide(),this.emitEvent(!1)))}setMessage(e){this._message=e,this._refCount>0&&(this._progress.setMessage(e),this.emitEvent(!0))}async withBusyIndicator(e,t){this.show(t);try{return await zl(),await e()}finally{this.hide()}}emitEvent(e){Gt.emit("busy-indicator",{visible:e,message:e&&this._message||void 0})}},S1=class{constructor(e,t){this.overlays=new Map,this.id=e,this.context=t}get doc(){return this.context.doc}},TF="Untitled",A1=class{constructor(){this._fileName="",this._docTitle="",this._openMode=at.Write,this._hiddenObjects=new Set,this._database=new ku,this.docTitle=TF,this._openMode=at.Write}async openUri(e,t){this._uri=e,this._openMode=t?.mode??at.Read,this._fileName=this.getFileNameFromUri(e);let n=this._database.lastOpenError,i=!0;try{let o={...t,readOnly:this._openMode===at.Read};await this._database.openUri(e,o),this.docTitle=this._fileName}catch(o){i=!1,this.emitOpenFileFailed(e,n,o)}return i}async openDocument(e,t,n){var i;let o=!0;this._fileName=e,this._openMode=n?.mode??at.Read;let a=this._database.lastOpenError;try{let s=(i=e.split(".").pop())==null?void 0:i.toLocaleLowerCase(),l={...n,readOnly:this._openMode===at.Read};await this._database.read(t,l,s=="dwg"?Ri.DWG:Ri.DXF),this.docTitle=this._fileName}catch(s){o=!1,this.emitOpenFileFailed(e,a,s)}return o}resetNewDocumentIdentity(){this._uri=void 0,this._fileName="",this.docTitle=TF}get uri(){return this._uri}get database(){return this._database}get fileName(){return this._fileName}get docTitle(){return this._docTitle}set docTitle(e){this._docTitle=e}get openMode(){return this._openMode}get isReusableUntitled(){if(this._uri||this._fileName||this._docTitle!==TF)return!1;let e=this._database.tables.blockTable.modelSpace;return!(e&&e.newIterator().count>0)}isObjectHidden(e){return this._hiddenObjects.has(e)}addHiddenObject(e){this._hiddenObjects.add(e)}takeHiddenObjects(){let e=[...this._hiddenObjects];return this._hiddenObjects.clear(),e}get layerService(){return this._layerService||(this._layerService=new Xi(this._database)),this._layerService}get entityService(){return this._entityService||(this._entityService=new pk(this._database)),this._entityService}get layerStore(){return this._layerStore||(this._layerStore=new b6(this)),this._layerStore}destroy(){var e;(e=this._layerStore)==null||e.destroy(),this._layerStore=void 0,this._layerService=void 0,this._entityService=void 0,this.clearLayerPreviousState(),this.clearLayerIsoSnapshot(),this._hiddenObjects.clear()}captureLayerPreviousState(){let e=this._database;this._layerPreviousSnapshot={clayer:e.clayer,states:[...e.tables.layerTable.newIterator()].map(t=>({name:t.name,isOn:!t.isOff,isFrozen:t.isFrozen,isLocked:((t.standardFlags??0)&f1)!==0}))}}getLayerPreviousSnapshot(){return this._layerPreviousSnapshot}clearLayerPreviousState(){this._layerPreviousSnapshot=void 0}setLayerIsoSnapshot(e){this._layerIsoSnapshot=e}consumeLayerIsoSnapshot(){let e=this._layerIsoSnapshot;return this._layerIsoSnapshot=void 0,e}clearLayerIsoSnapshot(){this._layerIsoSnapshot=void 0}restoreLayerPreviousState(){let e=this._layerPreviousSnapshot;return e?Sn(this._database,kn,()=>Xi.applyLayerPreviousSnapshot(this._database,e)):!1}isolateLayers(e,t){let n=this.layerService.isolateLayers(e,t);if(n)return this._layerIsoSnapshot=n.isoSnapshot,{layerNames:n.layerNames,affectedLayerCount:n.affectedLayerCount}}unisolateLayers(){let e=this.consumeLayerIsoSnapshot();if(e)return this.layerService.unisolateFromSnapshot(e)}emitOpenFileFailed(e,t=null,n){let i=this._database.lastOpenError,o=i!=null&&i!==t;!o&&n!=null&&(i=nc.from(n)),Gt.emit("failed-to-open-file",{fileName:e,...i!=null&&(o||n!=null)&&{errorCode:i.code,errorMessage:i.message}})}getFileNameFromUri(e){try{let t=new URL(e).pathname.split("/");return t[t.length-1]||""}catch(t){return kt.error("Invalid URI:",t),""}}},M1=null;function y5e(){return M1?{...M1}:null}function b5e(r){let e=String(r.type??"").toLowerCase();if(e==="mesh"||e==="ttf"||e==="otf"||e==="woff")return!0;let t=String(r.file??"").toLowerCase();return t.endsWith(".ttf")||t.endsWith(".otf")||t.endsWith(".woff")||t.endsWith(".woff2")}var Pz=class{constructor(){this.deferMeshFonts=!0,this._loadChain=Promise.resolve(),this._loader=new FC}get fontLoader(){return this._loader}get baseUrl(){return this._loader.baseUrl}set baseUrl(e){this._loader.baseUrl=e}get avaiableFonts(){return this._loader.avaiableFonts}async getAvaiableFonts(){return await this._loader.getAvailableFonts()}async load(e){let t=()=>this.loadInternal(e),n=this._loadChain.then(t,t);return this._loadChain=n.then(()=>{},()=>{}),n}async loadInternal(e){let t=performance.now(),n=[],i=[],o=[],a=0,s=0,l=0;try{let c=performance.now(),u=await this._loader.getAvailableFonts();a=performance.now()-c;let h=new Map;for(let m of u)for(let g of m.name)h.set(g.toLowerCase(),m);for(let m of e){let g=m.toLowerCase(),y=h.get(g);this.deferMeshFonts&&y&&b5e(y)?o.push(m):i.push(m)}let d=this.deferMeshFonts&&o.length>0&&i.length>0,p=performance.now();if(n=i.length>0?await this._loader.load(i):[],s=performance.now()-p,o.length>0&&!d){let m=performance.now(),g=await this._loader.load(o);l=performance.now()-m,n=[...n,...g]}else d&&(l=null);let f={fontCount:e.length,criticalFonts:[...i],deferredFonts:[...o],metaMs:a,criticalLoadMs:s,deferredLoadMs:l,deferred:d,totalMs:performance.now()-t};if(M1=f,d&&o.length>0){let m=performance.now();this._loader.load(o).then(g=>{M1===f&&(f.deferredLoadMs=performance.now()-m),this.emitPartialFailures(g)},g=>{M1===f&&(f.deferredLoadMs=performance.now()-m),v5e(g)})}}catch(c){throw new nc(c instanceof Error?c.message:String(c),"font_load_failed",{cause:c})}this.emitPartialFailures(n)}emitPartialFailures(e){let t=[],n=[];e.forEach(i=>{i.status==="NotFound"?t.push(i.fontName):i.status==="FailedToLoad"&&n.push({fontName:i.fontName,url:i.url})}),t.length>0&&Gt.emit("fonts-not-found",{fonts:t}),n.length>0&&Gt.emit("fonts-not-loaded",{fonts:n})}};function v5e(r){console.warn("[AcApFontLoader] Deferred mesh font load failed; text may use SHX fallbacks.",r)}var kT=(r=>(r.Extents="extents",r.Saved="saved",r))(kT||{}),Bne=[".dxf",".dwg"],Fne="local",qf,x5e=r=>{let e=r.toLowerCase();return Bne.some(t=>e.endsWith(t))},w5e=r=>new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(n.error??new Error("Failed to read file")),n.readAsArrayBuffer(r)}),_5e=()=>(qf||(qf=document.createElement("input"),qf.type="file",qf.accept=Bne.join(","),qf.style.display="none",document.body.appendChild(qf)),qf);async function Nne(){let r=_5e();return new Promise(e=>{let t=async()=>{var n;r.removeEventListener("change",t);let i=(n=r.files)==null?void 0:n[0];if(r.value="",!i){e(null);return}if(!x5e(i.name)){kt.warn(`Unsupported file type: ${i.name}`),e(null);return}try{let o=await w5e(i);e({name:i.name,content:o})}catch(o){kt.error("Failed to read selected file:",o),e(null)}};r.addEventListener("change",t),r.click()})}var Ez=class{constructor(){this.id=Fne,this.labelKey="main.dataSource.local",this.requiresAuth=!1,this.requiresUserGesture=!1}getAuthState(){return"none"}async signIn(){}async signOut(){}pick(){return Nne()}};async function S5e(r,e){let{AcApDocManager:t}=await Promise.resolve().then(()=>vFe),n=t.instance,i=e??await n.resolveOpenDocumentDefaults();if(Gt.emit("open-local-file-started",{mode:i.mode??at.Read}),r.url){await n.openUrl(r.url,i);return}if(!r.content){let{log:o}=await Promise.resolve().then(()=>(sM(),PH));o.error("Data source file has neither content nor url:",r.name);return}await n.openDocument(r.name,r.content,i)}var Mk=!1,Nk={},A5e=async r=>r?r():{minimumChunkSize:1e3},zne=async()=>{try{let r=await Nne();if(!(r!=null&&r.content))return;let e=await A5e(Nk.getOpenDocumentDefaults);await S5e(r,e)}catch(r){kt.error("Failed to open selected file:",r)}};function M5e(r={}){r.enabled!==!1&&(Nk=r,!Mk&&(Gt.on("open-file",zne),Mk=!0))}function P5e(r){Nk=r}function E5e(){Mk&&(Gt.off("open-file",zne),Mk=!1,Nk={})}var Une=class IT{constructor(){this._active=!1,this._printToConsole=!1,this._t0=0,this._readEndMs=0,this._stages=new Map,this._activeStageStartedAt=0,this._finishScheduled=!1}static getLastSnapshot(){return IT._lastSnapshot}static isEnabled(e){try{return gt.instance().getVar(oe.OPENPROF,e)===!0}catch{return!1}}begin(e){this.cancel(),this._active=!0,this._printToConsole=IT.isEnabled(e),this._finishScheduled=!1,this._t0=performance.now(),this._readEndMs=0,this._stages.clear(),this._activeStage=void 0,this._activeStageStartedAt=0,this._database=e,Nr.resetProfile(),Nr.profiling=!0,this._progressListener=t=>{this.onProgress(t)},e.events.openProgress.addEventListener(this._progressListener)}markReadCompleteAndScheduleReport(e){this._active&&(this._readEndMs=performance.now(),this.scheduleReport(e))}cancel(){this.detachProgressListener(),this._active&&(Nr.profiling=!1),this._active=!1,this._printToConsole=!1,this._finishScheduled=!1,this._database=void 0,this._activeStage=void 0,this._stages.clear()}onProgress(e){let t=String(e.subStage??e.stage??"UNKNOWN"),n=performance.now();if(this._activeStage==null){this._activeStage=t,this._activeStageStartedAt=n;return}t!==this._activeStage&&(this.closeActiveStage(n),this._activeStage=t,this._activeStageStartedAt=n)}closeActiveStage(e){if(this._activeStage==null)return;let t=this._stages.get(this._activeStage);t||(t={durationMs:0},this._stages.set(this._activeStage,t)),t.durationMs+=Math.max(0,e-this._activeStageStartedAt),this._activeStage=void 0}scheduleReport(e){!this._active||this._finishScheduled||(this._finishScheduled=!0,this.waitForIdle(e).then(()=>{this._active&&(this.publishReport(performance.now(),e),this.cancel())}).catch(t=>{kt.warn("OPENPROF: failed to finish open profile",t),this.cancel()}))}async waitForIdle(e){await Promise.resolve(),e.isProcessingEntities&&await new Promise(t=>{let n=()=>{if(!e.isProcessingEntities){t();return}setTimeout(n,16)};n()})}publishReport(e,t){var n,i,o;this.closeActiveStage(this._readEndMs>0?this._readEndMs:e);let a=Math.max(0,this._readEndMs-this._t0),s=Math.max(0,e-this._readEndMs),l=Math.max(0,e-this._t0),c=((n=this._stages.get("PARSE"))==null?void 0:n.durationMs)??0,u=((i=this._stages.get("ENTITY"))==null?void 0:i.durationMs)??0,h={...Nr.profileStats},d=h.topLevel,p=t.progressiveOpenStats,f=t.progressiveRendering,m=typeof t.takeConvertPhaseTimings=="function"?t.takeConvertPhaseTimings():null,g=m?{finishGeometryMs:m.finishGeometry,handleGroupMs:m.handleGroup,addEntityMs:m.addEntity,awaitFontsMs:m.awaitFonts,fontPreload:m.fontPreload}:void 0,y=[...h.blockMisses].sort((E,S)=>S.buildMs+S.compactMs-(E.buildMs+E.compactMs)).slice(0,10).map(E=>({blockName:E.blockName,buildMs:E.buildMs,compactMs:E.compactMs})),b=[...this._stages.entries()].filter(([,E])=>E.durationMs>0).sort((E,S)=>S[1].durationMs-E[1].durationMs).map(([E,S])=>({name:E,durationMs:S.durationMs})),v={collectedAt:Date.now(),fileName:(o=this._database)==null?void 0:o.dwgname,totalMs:l,readMs:a,convertMs:s,parseMs:c,entityMs:u,stages:b,cache:{hits:h.hits,misses:h.misses,hitMs:h.hitMs,cloneMs:h.cloneMs,missBuildMs:h.missBuildMs,missCompactMs:h.missCompactMs,setCloneMs:h.setCloneMs,applyMs:h.applyMs,topLevel:{...d}},slowBlocks:y,progressive:{enabled:f,paintCount:p.paintCount,yieldCount:p.yieldCount},convertPhase:g};if(IT._lastSnapshot=v,!this._printToConsole)return;let x=(E,S)=>S<=0?"0%":`${(E/S*100).toFixed(1)}%`,w=["","========== OPENPROF (open-file profile) ==========","Note: progress-bar % weights (PARSE~12%, ENTITY~98%) are not wall-time shares.","Stage ms = active-stage wall time (first event of stage \u2192 first event of next stage).",`progressive: ${f?"on":"off"} (mid-open paints=${p.paintCount}, yields=${p.yieldCount})`,`wall clock total: ${l.toFixed(0)} ms`,` db.read: ${a.toFixed(0)} ms (${x(a,l)})`,` PARSE: ${c.toFixed(0)} ms (${x(c,a)} of read)`,` ENTITY flush: ${u.toFixed(0)} ms (${x(u,a)} of read)`,` scene convert: ${s.toFixed(0)} ms (${x(s,l)})`];if(g){w.push(` finishGeometry: ${g.finishGeometryMs.toFixed(0)} ms (cumulative)`,` handleGroup: ${g.handleGroupMs.toFixed(0)} ms (cumulative)`,` addEntity: ${g.addEntityMs.toFixed(0)} ms`,` awaitFonts: ${g.awaitFontsMs.toFixed(0)} ms (preset+style preload wall)`);let E=g.fontPreload;E&&w.push(` fontPreload parseSite: ${E.parseSite??"main"}`,` fontPreload critical: [${E.critical.join(", ")}]`,` fontPreload preset: [${(E.preset??E.workerWarm??[]).join(", ")}]`,` fontPreload background: [${E.background.join(", ")}]`,` fontPreload workerSkipped: ${E.workerSkipped} (already in pool)`)}let _=y5e();if(_&&w.push(` explicit font load: critical=${_.criticalLoadMs.toFixed(0)}ms meta=${_.metaMs.toFixed(0)}ms deferredMesh=${_.deferred?"yes":"no"} (critical=[${_.criticalFonts.join(",")}] deferred=[${_.deferredFonts.join(",")}])`),w.push("","--- AcDbRenderingCache (top-level INSERT draws) ---",`hits: ${d.hits}, hit path ${d.hitMs.toFixed(0)} ms (clone ${d.cloneMs.toFixed(0)} ms)`,`misses: ${d.misses}, build ${d.missBuildMs.toFixed(0)} ms (incl. nested), compact ${d.missCompactMs.toFixed(0)} ms, set/clone ${d.setCloneMs.toFixed(0)} ms`,`applyMatrix+attribs: ${d.applyMs.toFixed(0)} ms`,"",`--- AcDbRenderingCache (all depths: hits=${h.hits}, misses=${h.misses}) ---`,`hit ${h.hitMs.toFixed(0)} ms (clone ${h.cloneMs.toFixed(0)}), build ${h.missBuildMs.toFixed(0)}, compact ${h.missCompactMs.toFixed(0)}, set ${h.setCloneMs.toFixed(0)}, apply ${h.applyMs.toFixed(0)}`),y.length>0){w.push("","--- Slowest block template misses (build+compact) ---");for(let E of y){let S=E.blockName.length>40?`${E.blockName.slice(0,37)}...`:E.blockName;w.push(`${S.padEnd(40)} build=${E.buildMs.toFixed(0).padStart(7)}ms compact=${E.compactMs.toFixed(0).padStart(7)}ms total=${(E.buildMs+E.compactMs).toFixed(0).padStart(7)}ms`)}}let A=b.filter(E=>!["PARSE","FONT","ENTITY","START","END"].includes(E.name));if(A.length>0){w.push("","--- Other openProgress sub-stages ---");for(let E of A)w.push(` ${E.name}: ${E.durationMs.toFixed(0)} ms`)}w.push("==================================================",""),console.log(w.join(`
  6753. `));try{let E=$c.getInstance();E.getAll().length>0&&(console.log("--- AcCmPerformanceCollector ---"),E.printAll())}catch{}}detachProgressListener(){this._progressListener&&this._database&&this._database.events.openProgress.removeEventListener(this._progressListener),this._progressListener=void 0}};Une._lastSnapshot=null;var C5e=Une;function T5e(r,e=!1){return r.percentage<100?!1:r.subStageStatus==="ERROR"?!0:r.subStageStatus!=="END"?!1:r.stage==="FETCH_FILE"?e:r.subStage==="END"}var u1=class Ed{constructor(e){this._peak=0,this._overlayVisible=!1,this._lastMessage="",this._seeThrough=!1,this._conversionEnded=!1,this._holdIdleStreak=0,this._progress=new Rne({host:e,overlayColor:Ed.OVERLAY_DEFAULT}),this._progress.hide()}setHost(e){this._progress.setHost(e)}setSeeThroughOverlay(e){this._seeThrough=e,this._progress.setOverlayColor(Ed.OVERLAY_DEFAULT),this._progress.setPointerEventsBlocked(!0)}setSceneBusyGate(e){this._sceneBusyGate=e}setOnHidden(e){this._onHidden=e}reset(){this.clearHoldPoll(),this._peak=0,this._stage=void 0,this._overlayVisible=!1,this._lastMessage="",this._conversionEnded=!1,this._holdIdleStreak=0}async beginOpen(e){this.handle({database:e,percentage:0,stage:"CONVERSION",subStage:"START",subStageStatus:"START"}),await zl()}handle(e){e.stage==="CONVERSION"&&e.subStage==="END"&&e.subStageStatus==="END"&&(this._conversionEnded=!0);let t=this.normalize(e);return Gt.emit("open-file-progress",t),this.updateOverlay(t),t}normalize(e){let t=e.stage;return t!==this._stage&&(this._stage==="FETCH_FILE"&&t==="CONVERSION"&&(this._peak=0),this._stage=t),this._peak=Math.max(this._peak,e.percentage),{...e,percentage:this._peak}}resolveMessage(e){if(e.stage==="CONVERSION"){if(e.subStage){let t="main.progress."+e.subStage.replace(/_/g,"").toLowerCase();return P.t(t)}return}if(e.stage==="FETCH_FILE")return P.t("main.message.fetchingDrawingFile")}updateOverlay(e){var t;if(T5e(e,this._conversionEnded)){if(this._seeThrough||!((t=this._sceneBusyGate)!=null&&t.call(this))){this.hideAndReset();return}this.holdUntilSceneIdle();return}this.clearHoldPoll(),this._progress.setPointerEventsBlocked(!0),this.showOverlayWithMessage(e)}showOverlayWithMessage(e){this._overlayVisible||(this._progress.show(),this._overlayVisible=!0);let t=this.resolveMessage(e);t!=null&&t!==this._lastMessage&&(this._progress.setMessage(t),this._lastMessage=t)}holdUntilSceneIdle(){this._overlayVisible||(this._progress.show(),this._overlayVisible=!0),this._progress.setOverlayColor(Ed.OVERLAY_SEE_THROUGH);let e=P.t("main.progress.rendering");if(e!==this._lastMessage&&(this._progress.setMessage(e),this._lastMessage=e),this._holdPollId!=null)return;this._holdIdleStreak=0;let t=()=>{var n;if((n=this._sceneBusyGate)!=null&&n.call(this)){this._holdIdleStreak=0,this._holdPollId=setTimeout(t,Ed.HOLD_POLL_MS);return}if(this._holdIdleStreak++,this._holdIdleStreak<Ed.HOLD_IDLE_STREAK){this._holdPollId=setTimeout(t,Ed.HOLD_POLL_MS);return}this._holdPollId=void 0,this._holdIdleStreak=0,this.hideAndReset()};this._holdPollId=setTimeout(t,Ed.HOLD_POLL_MS)}hideAndReset(){var e;this.clearHoldPoll(),this._progress.hide(),this._overlayVisible=!1,this._lastMessage="",this._holdIdleStreak=0,(e=this._onHidden)==null||e.call(this)}clearHoldPoll(){this._holdPollId!=null&&(clearTimeout(this._holdPollId),this._holdPollId=void 0),this._holdIdleStreak=0}};u1.OVERLAY_DEFAULT="rgba(0,0,0,0.45)",u1.OVERLAY_SEE_THROUGH="rgba(0,0,0,0.16)",u1.HOLD_IDLE_STREAK=2,u1.HOLD_POLL_MS=50;var k5e=u1;var I5e="mtext-renderer-worker.js";var jne={mtextRender:`./assets/${I5e}`};function L5e(r){let e=[r?.mtextRender??jne.mtextRender];return r!=null&&r.dwgParser&&e.push(r.dwgParser),e.map(t=>String(t))}var Cz,Tz;function O5e(){Cz=void 0,Tz=void 0}async function D5e(r){try{let e=await fetch(r,{method:"HEAD"});if(e.ok)return!0;if(e.status===405){let t=await fetch(r,{headers:{Range:"bytes=0-0"}});return t.ok||t.status===206}return!1}catch{return!1}}async function NQ(r){let e=L5e(r),t=e.join("|");if(Cz===t&&Tz===!0)return!0;try{let n=(await Promise.all(e.map(D5e))).every(Boolean);return n&&(Cz=t,Tz=!0),n}catch{return!1}}var rm=class r{constructor(){this._sessions=new Map,this._nextId=1}static get instance(){return this._instance||(this._instance=new r),this._instance}get sessions(){return Array.from(this._sessions.values())}getSession(e){return this._sessions.get(e)}getSessionByBlockName(e){for(let t of this._sessions.values())if(t.blockName===e)return t}async attachOverlay(e){let t=this.getSessionByBlockName(e.blockName);t&&this.unload(t.id);let n;if(e.sourceDb)n=await Y.instance.registerOverlayDatabase(e.sourceDb);else if(e.content)n=await Y.instance.loadOverlay(e.fileName,e.content);else throw new Error("AcApXrefManager.attachOverlay requires sourceDb or content");let i=Y.instance.getOverlayLayout(n);i&&e.transform&&R5e(i,e.transform);let o={id:`xref-${this._nextId++}`,blockName:e.blockName,insertId:e.insertId,overlayId:n,sourcePath:e.sourcePath,visible:!0};return this._sessions.set(o.id,o),o}setVisible(e,t){let n=this._sessions.get(e);if(!n)return!1;let i=Y.instance.setOverlayVisible(n.overlayId,t);return i&&(n.visible=t),i}setVisibleByBlockName(e,t){let n=this.getSessionByBlockName(e);return n?this.setVisible(n.id,t):!1}unload(e){let t=this._sessions.get(e);return t?(Y.instance.removeOverlay(t.overlayId),this._sessions.delete(e),!0):!1}unloadByBlockName(e){let t=this.getSessionByBlockName(e);return t?this.unload(t.id):!1}clearAll(){for(let e of[...this._sessions.keys()])this.unload(e)}static createHostXrefInsert(e,t,n,i,o){let a=new rn({name:t,pathName:n,flags:Kr.Xref|Kr.Resolved|Kr.Referenced,...o?{origin:new k(o)}:{}});e.tables.blockTable.add(a);let s=new pn(t);return s.position=new k(i.position),s.scaleFactors=new k(i.scale,i.scale,i.scale),s.rotation=i.rotationRad,e.tables.blockTable.modelSpace.appendEntity(s),{record:a,insert:s}}};function R5e(r,e){let t=r.internalObject;t.position.set(e.position.x,e.position.y,e.position.z??0),t.scale.set(e.scale,e.scale,e.scale),t.rotation.set(0,0,e.rotationRad)}var kz=class{constructor(){this._sources=new Map,this._emitter=Iee()}register(e){this._sources.set(e.id,e),this.emitChanged()}unregister(e){this._sources.delete(e)&&this.emitChanged()}list(){return Array.from(this._sources.values())}get(e){return this._sources.get(e)}notifyAuthChanged(e){this._emitter.emit("auth-changed",{sourceId:e,sources:this.list()})}on(e,t){this._emitter.on(e,t)}off(e,t){this._emitter.off(e,t)}emitChanged(){this._emitter.emit("changed",{sources:this.list()})}},Vne="url",Iz=class Bc extends tS{constructor(e){super({host:e,title:P.t("main.dataSource.urlDialogTitle"),closeLabel:P.t("main.dataSource.cancel"),titleId:"ml-ui-url-open-title",dialogClassName:"ml-ui-url-open-dialog",layoutWidth:!1}),this.resolveFn=null;let t=document.createElement("p");t.className="ml-ui-url-open-hint",t.textContent=P.t("main.dataSource.urlDialogHint"),this.bodyEl.appendChild(t),this.input=document.createElement("input"),this.input.type="url",this.input.className="ml-ui-url-open-input",this.input.placeholder=P.t("main.dataSource.urlPlaceholder"),this.input.autocomplete="off",this.input.spellcheck=!1,this.bodyEl.appendChild(this.input);let n=document.createElement("button");n.type="button",n.className="ml-ui-dialog-btn ml-ui-dialog-btn-secondary",n.textContent=P.t("main.dataSource.cancel"),n.addEventListener("click",()=>this.finish(null));let i=document.createElement("button");i.type="button",i.className="ml-ui-dialog-btn",i.textContent=P.t("main.dataSource.open"),i.addEventListener("click",()=>this.submit()),this.footerEl.appendChild(n),this.footerEl.appendChild(i),this.input.addEventListener("keydown",o=>{o.key==="Enter"&&(o.preventDefault(),this.submit())}),Bc.ensureUrlStyles()}static open(e=document.body){var t;(t=Bc.openInstance)==null||t.finish(null);let n=new Bc(e);return Bc.openInstance=n,new Promise(i=>{n.resolveFn=i,n.show().then(()=>{n.input.focus()})})}close(){this.finish(null)}submit(){let e=this.input.value.trim();if(!e){this.input.focus();return}this.finish(e)}finish(e){Bc.openInstance===this&&(Bc.openInstance=null);let t=this.resolveFn;this.resolveFn=null,super.close(),t?.(e)}static ensureUrlStyles(){if(Bc.stylesInjected||typeof document>"u")return;if(document.getElementById("ml-ui-url-open-dialog-styles")){Bc.stylesInjected=!0;return}let e=document.createElement("style");e.id="ml-ui-url-open-dialog-styles",e.textContent=`
  6754. .ml-ui-url-open-hint {
  6755. margin: 0 0 12px;
  6756. font-size: 13px;
  6757. opacity: 0.85;
  6758. line-height: 1.4;
  6759. }
  6760. .ml-ui-url-open-input {
  6761. width: 100%;
  6762. box-sizing: border-box;
  6763. padding: 8px 10px;
  6764. border: 1px solid var(--ml-ui-border, #c0c4cc);
  6765. border-radius: 4px;
  6766. background: var(--ml-ui-surface, #fff);
  6767. color: inherit;
  6768. font-size: 14px;
  6769. }
  6770. .ml-ui-url-open-input:focus {
  6771. outline: 2px solid var(--ml-ui-accent, #409eff);
  6772. outline-offset: 1px;
  6773. }
  6774. `,document.head.appendChild(e),Bc.stylesInjected=!0}};Iz.openInstance=null,Iz.stylesInjected=!1;var B5e=Iz,Lz=class{constructor(){this.id=Vne,this.labelKey="main.dataSource.url",this.requiresAuth=!1,this.requiresUserGesture=!1}getAuthState(){return"none"}async signIn(){}async signOut(){}async pick(){let e=await B5e.open();return e?{name:F5e(e),url:e}:null}};function F5e(r){try{let e=new URL(r,window.location.href).pathname.split("/").filter(Boolean).pop();if(e&&/\.(dwg|dxf)$/i.test(e))return decodeURIComponent(e)}catch{}return"drawing.dxf"}function N5e(r,e){if(!e)return r;let t=r;for(let[n,i]of Object.entries(e))t=t.split(`{${n}}`).join(i);return t}function z5e(r){var e;let t=[];for(let n of r){let i=P.t(n.labelKey),o=n.getAuthState();if(!n.requiresAuth||o==="none"){t.push(bT(n,"pick",n.labelKey,void 0,i));continue}if(o==="signed-out"){t.push(bT(n,"sign-in","main.dataSource.signInTo",{name:i}));continue}t.push(bT(n,"pick","main.dataSource.openFrom",{name:i}));let a=(e=n.getAccountLabel)==null?void 0:e.call(n);t.push(bT(n,"sign-out",a?"main.dataSource.signOutOfAccount":"main.dataSource.signOutOf",a?{name:i,account:a}:{name:i}))}return t}function bT(r,e,t,n,i){return{id:`${r.id}:${e}`,sourceId:r.id,action:e,labelKey:t,labelParams:n,label:i??N5e(P.t(t),n)}}var U5e=["font-missed","unsupported-entities"],zQ={error:3,warning:2,info:1,success:0};function j5e(r){let e=new Map,t=[];for(let n of r){let i=n.source,o=i!=null&&U5e.includes(i),a=o?i:`single:${n.id}`,s=e.get(a);if(s){s.items.push(n),zQ[n.type]>zQ[s.type]&&(s.type=n.type),n.timestamp>s.latestTimestamp&&(s.latestTimestamp=n.timestamp);continue}e.set(a,{key:a,source:o?i:void 0,items:[n],collapsible:!1,type:n.type,latestTimestamp:n.timestamp}),t.push(a)}return t.map(n=>{let i=e.get(n);return i.collapsible=i.source!=null&&i.items.length>1,i})}var P1=class{constructor(){this._buckets=new Map,this._activeSessionId=null,this._nextId=1,this._listeners=new Set}get notifications(){return this.activeList()}get unreadCount(){return this.activeList().length}get activeSessionId(){return this._activeSessionId}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}emitChange(){for(let e of this._listeners)e()}activeList(){return this._activeSessionId==null?[]:this._buckets.get(this._activeSessionId)??[]}setActiveList(e){this._activeSessionId!=null&&(e.length===0?this._buckets.delete(this._activeSessionId):this._buckets.set(this._activeSessionId,e))}resolveSessionId(e){return e??this._activeSessionId}setActiveSession(e){this._activeSessionId!==e&&(this._activeSessionId=e,this.emitChange())}clearSession(e){if(!this._buckets.has(e)){this._activeSessionId===e&&this.emitChange();return}this._buckets.delete(e),this.emitChange()}add(e){let t=this.resolveSessionId(e.sessionId);if(t==null)return"";let n={...e,sessionId:t,id:`notification-${this._nextId++}`,timestamp:new Date},i=this._buckets.get(t)??[];return this._buckets.set(t,[n,...i]),this.emitChange(),n.id}info(e,t,n){return this.add({type:"info",title:e,message:t,...n})}warning(e,t,n){return this.add({type:"warning",title:e,message:t,...n})}error(e,t,n){return this.add({type:"error",title:e,message:t,persistent:!0,...n})}success(e,t,n){return this.add({type:"success",title:e,message:t,...n})}remove(e){for(let[t,n]of this._buckets){let i=n.filter(o=>o.id!==e);if(i.length!==n.length){i.length===0?this._buckets.delete(t):this._buckets.set(t,i),this.emitChange();return}}}clear(){this._activeSessionId!=null&&this._buckets.has(this._activeSessionId)&&(this._buckets.delete(this._activeSessionId),this.emitChange())}removeWhere(e){let t=this.activeList();if(t.length===0)return;let n=t.filter(i=>!e(i));n.length!==t.length&&(this.setActiveList(n),this.emitChange())}removeBySource(e){this.removeWhere(t=>t.source===e)}removeResolvedFontMissedNotifications(e){let t=new Set(e);this.removeWhere(n=>{var i;return n.source!=="font-missed"?!1:t.size===0?!0:(i=n.fontNames)!=null&&i.length?!n.fontNames.some(o=>t.has(o)):!1})}dispose(){this._listeners.clear(),this._buckets.clear(),this._activeSessionId=null}},V5e=["TCH_","TH_"];function Pk(r){if(!r)return!1;let e=r.trim().toUpperCase();return e?V5e.some(t=>e.startsWith(t)):!1}function G5e(r){var e;if(Pk(r.name)||Pk(r.cppClassName))return!0;let t=((e=r.appName)==null?void 0:e.trim())??"";return t?/天正|tarch|tianzheng/i.test(t):!1}function H5e(r){return r.type==="ProxyEntity"}function W5e(r){var e;let t=0,n=!1;for(let i of r.tables.blockTable.newIterator())for(let o of i.newIterator())H5e(o)&&((e=o.proxyGraphic)!=null&&e.length||(t+=1),!n&&(Pk(o.originalDxfName)||Pk(o.originalClassName))&&(n=!0));return{emptyProxyEntityCount:t,tianzhengProxyHint:n}}function UQ(r,e=0,t={}){let{scanProxies:n=!0}=t,i=0,o=!1;for(let l of r.classes)G5e(l)&&(o=!0,l.isEntity&&l.instanceCount>0&&(i+=l.instanceCount));let a=0;if(n){let l=W5e(r);a=l.emptyProxyEntityCount,l.tianzhengProxyHint&&(o=!0)}o&&i===0&&(i=a);let s=e>0||i>0||a>0;return{unknownEntityCount:e,tianzhengEntityCount:i,emptyProxyEntityCount:a,isTianzhengDrawing:o,shouldWarn:s}}function X5e(r,e){if(!e)return r;let t=r;for(let[n,i]of Object.entries(e))t=t.split(`{${n}}`).join(String(i));return t}function Rr(r,e){return X5e(P.t(r),e)}function Y5e(r,e){let t=[];return e.isTianzhengDrawing&&e.tianzhengEntityCount>0&&t.push(r("main.message.tianzhengEntities",{count:e.tianzhengEntityCount})),e.unknownEntityCount>0?t.push(r("main.message.unknownEntities",{count:e.unknownEntityCount})):!e.isTianzhengDrawing&&e.emptyProxyEntityCount>0&&t.push(r("main.message.emptyProxyEntities",{count:e.emptyProxyEntityCount})),t.join(" ")}function $5e(r){return Y5e(Rr,r)}function K5e(r,e){return r("main.message.fontMissedReplacement",{font:e,replacement:$1.getReplacementFontName(e)})}function q5e(r,e){return e.map(t=>K5e(r,t)).join(", ")}function jQ(r){return q5e(Rr,r)}var Z5e="https://mlightcad.com/dwg-parser.html",J5e=/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g;function Q5e(r,e){return`[${r}](${e})`}function eFe(r,e){r.replaceChildren();let t=0;for(let n of e.matchAll(J5e)){let i=n.index??0;i>t&&r.appendChild(document.createTextNode(e.slice(t,i)));let o=document.createElement("a");o.href=n[2],o.target="_blank",o.rel="noopener noreferrer",o.textContent=n[1],r.appendChild(o),t=i+n[0].length}t<e.length&&r.appendChild(document.createTextNode(e.slice(t)))}function tFe(r,e){if(!e)return r;let t=r;for(let[n,i]of Object.entries(e))t=t.split(`{${n}}`).join(i);return t}function Gne(r,e){return tFe(P.t(r),e)}function nFe(r){return Q5e(r("main.message.failedToOpenFileWorkerOomLink"),Z5e)}function rFe(r,e){switch(e.errorCode){case"worker_oom":return r("main.message.failedToOpenFileWorkerOom",{fileName:e.fileName,dwgParserLink:nFe(r)});case"worker_timeout":return r("main.message.failedToOpenFileWorkerTimeout",{fileName:e.fileName});case"font_load_failed":return r("main.message.failedToOpenFileFontLoadFailed",{fileName:e.fileName});case"license_expired":return r("main.message.failedToOpenFileLicenseExpired",{fileName:e.fileName});case"license_invalid":return r("main.message.failedToOpenFileLicenseInvalid",{fileName:e.fileName});default:return r("main.message.failedToOpenFile",{fileName:e.fileName})}}function iFe(r,e){switch(e){case"worker_oom":return r("main.notification.title.failedToOpenFileWorkerOom");case"worker_timeout":return r("main.notification.title.failedToOpenFileWorkerTimeout");case"font_load_failed":return r("main.notification.title.failedToOpenFileFontLoadFailed");case"license_expired":return r("main.notification.title.failedToOpenFileLicenseExpired");case"license_invalid":return r("main.notification.title.failedToOpenFileLicenseInvalid");default:return r("main.notification.title.failedToOpenFile")}}function oFe(r){return rFe(Gne,r)}function aFe(r){return iFe(Gne,r)}var Oz=class{constructor(e,t){this._pendingUnknownBySession=new Map,this._unsupportedNotifiedSessions=new Set,this._installed=!1,this._onMessage=n=>{let i=this._getCenter(),o=n.type==="error"?Rr("main.notification.title.systemError"):n.type==="warning"?Rr("main.notification.title.systemWarning"):n.type==="success"?Rr("main.notification.title.systemMessage"):Rr("main.notification.title.systemInfo"),a=this.sessionOptions();switch(n.type){case"error":i.error(o,n.message,a);break;case"warning":i.warning(o,n.message,a);break;case"success":i.success(o,n.message,a);break;default:i.info(o,n.message,a);break}},this._onFontsNotLoaded=n=>{let i=n.fonts.map(o=>o.fontName);this._getCenter().error(Rr("main.notification.title.fontNotLoaded"),Rr("main.message.fontsNotLoaded",{fonts:jQ(i)}),{source:"font-missed",fontNames:i,persistent:!0,...this.sessionOptions()})},this._onFontsNotFound=n=>{this._getCenter().warning(Rr("main.notification.title.fontNotFound"),Rr("main.message.fontsNotFound",{fonts:jQ(n.fonts)}),{source:"font-missed",fontNames:n.fonts,...this.sessionOptions()})},this._onFontNotFound=n=>{let i=n.fontName.trim();if(!i)return;let o=this._getCenter();o.removeWhere(a=>{var s;return a.source==="font-missed"&&((s=a.fontNames)==null?void 0:s.includes(i))===!0}),o.warning(Rr("main.notification.title.fontNotFound"),Rr("main.message.fontMissedInDrawing",{font:i,count:n.count,replacementFont:$1.getReplacementFontName(i)}),{source:"font-missed",fontNames:[i],...this.sessionOptions()})},this._onMissedDataChanged=()=>{let n=Object.keys(this._docManager.curView.missedData.fonts);this._getCenter().removeResolvedFontMissedNotifications(n)},this._onFailedToGetFonts=n=>{this._getCenter().error(Rr("main.notification.title.systemError"),Rr("main.message.failedToGetAvaiableFonts",{url:n.url}),this.sessionOptions())},this._onFailedToOpenFile=n=>{this._getCenter().error(aFe(n.errorCode),oFe(n),this.sessionOptions())},this._onOpenFileProgress=n=>{if(n.stage==="CONVERSION"&&n.subStage==="PARSE"&&n.subStageStatus==="END"&&n.data){let i=n.data,o=this._docManager.activeSessionId;o&&this._pendingUnknownBySession.set(o,i.unknownEntityCount??0)}},this._onDocumentToBeOpened=()=>{this.syncActiveSession();let n=this._docManager.activeSessionId;n&&(this.forgetSession(n),this._pendingUnknownBySession.set(n,0)),this._getCenter().removeBySource("unsupported-entities")},this._onDocumentCreated=()=>{this.syncActiveSession()},this._onDocumentActivated=()=>{this.syncActiveSession();let n=this._docManager.activeSessionId;n&&this._unsupportedNotifiedSessions.has(n)||this.notifyUnsupportedEntities()},this._onDocumentToBeDestroyed=n=>{let i=this._docManager.sessionFor(n.doc);i&&(this.forgetSession(i.id),this._getCenter().clearSession(i.id))},this._docManager=e,this._getCenter=t}sessionOptions(){let e=this._docManager.activeSessionId;return e?{sessionId:e}:{}}syncActiveSession(){this._getCenter().setActiveSession(this._docManager.activeSessionId)}forgetSession(e){this._pendingUnknownBySession.delete(e),this._unsupportedNotifiedSessions.delete(e)}install(){this._installed||(this._installed=!0,this.syncActiveSession(),Gt.on("message",this._onMessage),Gt.on("fonts-not-loaded",this._onFontsNotLoaded),Gt.on("fonts-not-found",this._onFontsNotFound),Gt.on("font-not-found",this._onFontNotFound),Gt.on("missed-data-changed",this._onMissedDataChanged),Gt.on("failed-to-get-avaiable-fonts",this._onFailedToGetFonts),Gt.on("failed-to-open-file",this._onFailedToOpenFile),Gt.on("open-file-progress",this._onOpenFileProgress),this._docManager.events.documentToBeOpened.addEventListener(this._onDocumentToBeOpened),this._docManager.events.documentCreated.addEventListener(this._onDocumentCreated),this._docManager.events.documentActivated.addEventListener(this._onDocumentActivated),this._docManager.events.documentToBeDestroyed.addEventListener(this._onDocumentToBeDestroyed))}uninstall(){this._installed&&(this._installed=!1,Gt.off("message",this._onMessage),Gt.off("fonts-not-loaded",this._onFontsNotLoaded),Gt.off("fonts-not-found",this._onFontsNotFound),Gt.off("font-not-found",this._onFontNotFound),Gt.off("missed-data-changed",this._onMissedDataChanged),Gt.off("failed-to-get-avaiable-fonts",this._onFailedToGetFonts),Gt.off("failed-to-open-file",this._onFailedToOpenFile),Gt.off("open-file-progress",this._onOpenFileProgress),this._docManager.events.documentToBeOpened.removeEventListener(this._onDocumentToBeOpened),this._docManager.events.documentCreated.removeEventListener(this._onDocumentCreated),this._docManager.events.documentActivated.removeEventListener(this._onDocumentActivated),this._docManager.events.documentToBeDestroyed.removeEventListener(this._onDocumentToBeDestroyed),this._pendingUnknownBySession.clear(),this._unsupportedNotifiedSessions.clear())}notifyUnsupportedEntities(){let e=this._docManager.curDocument;if(!e)return;let t=this._docManager.activeSessionId,n=t?this._pendingUnknownBySession.get(t)??0:0,i=UQ(e.database,n,{scanProxies:!1}),o=i.isTianzhengDrawing||i.unknownEntityCount>0?i:UQ(e.database,n,{scanProxies:!0});t&&this._unsupportedNotifiedSessions.add(t);let a=this._getCenter();a.removeBySource("unsupported-entities"),o.shouldWarn&&a.warning(Rr("main.notification.title.parsingWarning"),$5e(o),{source:"unsupported-entities",persistent:!0,...this.sessionOptions()})}},VQ="ml-ui-notification-center-styles",He="ml-ui-notification-center",Hne=8,sFe=52+Hne,Dz=class{constructor(e,t,n={}){var i,o;this._expandedGroups=new Set,this._panelOpen=!1,this._layoutKind="desktop",this._unsubs=[],this._repositionRaf=0,this._center=e,this._host=t,this._placement=n.placement,uFe(),getComputedStyle(t).position==="static"&&(t.style.position="relative"),this._root=document.createElement("div"),this._root.className=He,this._root.hidden=!0,this._backdrop=document.createElement("button"),this._backdrop.type="button",this._backdrop.className=`${He}__backdrop`,this._backdrop.hidden=!0,this._backdrop.setAttribute("aria-label","Close notifications"),this._backdrop.addEventListener("click",()=>this.setPanelOpen(!1)),this._bell=document.createElement("button"),this._bell.type="button",this._bell.className=`${He}__bell`,this._bell.innerHTML='<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path fill="currentColor" d="M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm8-6V11a8 8 0 1 0-16 0v5L2 18v1h20v-1l-2-2Z"/></svg>',this._bell.addEventListener("click",l=>{l.stopPropagation(),this.setPanelOpen(!this._panelOpen)}),this._badge=document.createElement("span"),this._badge.className=`${He}__badge`,this._bell.appendChild(this._badge),this._panel=document.createElement("div"),this._panel.className=`${He}__panel`,this._panel.hidden=!0,this._panel.setAttribute("role","dialog"),this._panel.setAttribute("aria-modal","true");let a=document.createElement("div");a.className=`${He}__header`,this._titleEl=document.createElement("span");let s=document.createElement("button");if(s.type="button",s.className=`${He}__icon-btn`,s.textContent="\xD7",s.addEventListener("click",()=>this._center.clear()),a.append(this._titleEl,s),this._list=document.createElement("div"),this._list.className=`${He}__list`,this._panel.append(a,this._list),this._root.append(this._backdrop,this._bell,this._panel),this._host.appendChild(this._root),this.applyTheme(),this.applyLayout($T()),this.refreshChromeLabels(),this._unsubs.push(((o=(i=this._center).subscribe)==null?void 0:o.call(i,()=>this.render()))??(()=>{})),this._unsubs.push(Qz(()=>this.applyTheme())),this._unsubs.push(Ik(l=>{this.applyLayout(l)})),this._onDocPointer=l=>{if(!this._panelOpen)return;let c=l.target;c&&(this._root.contains(c)||this.setPanelOpen(!1))},document.addEventListener("pointerdown",this._onDocPointer,!0),this._onWindowResize=()=>this.scheduleReposition(),window.addEventListener("resize",this._onWindowResize),typeof ResizeObserver<"u"){this._shortcutObserver=new ResizeObserver(()=>this.scheduleReposition()),this._shortcutObserver.observe(this._host);let l=WQ(this._host);l&&this._shortcutObserver.observe(l)}this.render()}get placement(){return this._placement}setPlacement(e){this._placement!==e&&(this._placement=e,this.applyLayout(this._layoutKind))}applyTheme(){zs(Jo(this._host),this._root)}applyLayout(e){this._layoutKind=e;let t=this.resolvePlacement(),n=GQ(t),i=HQ(t);this._root.classList.toggle(`${He}--phone`,e==="phone"),this._root.classList.toggle(`${He}--pad`,e==="pad"),this._root.classList.toggle(`${He}--desktop`,e==="desktop"),this._root.classList.toggle(`${He}--sheet`,i1(e)),this._root.classList.toggle(`${He}--top-anchor`,n),this._root.classList.toggle(`${He}--bottom-anchor`,!n),this._root.classList.toggle(`${He}--right`,i),this._root.classList.toggle(`${He}--left`,!i),this.syncPanelVisibility(),this.scheduleReposition()}resolvePlacement(){return this._placement?this._placement:this._layoutKind==="phone"?"top-right":"bottom-right"}repositionChrome(){if(this._root.style.top="",this._root.style.right="",this._root.style.bottom="",this._root.style.left="",i1(this._layoutKind)&&(this._panel.style.top="",this._panel.style.right="",this._panel.style.left="",this._panel.style.bottom=""),!GQ(this.resolvePlacement())){this._bell.style.top="",this._bell.style.right="",this._bell.style.bottom="",this._bell.style.left="",i1(this._layoutKind)||(this._panel.style.top="",this._panel.style.right="",this._panel.style.left="");return}let e=Hne,t=sFe,n=WQ(this._host);if(n){if(this._shortcutObserver)try{this._shortcutObserver.observe(n)}catch{}let a=this._host.getBoundingClientRect(),s=n.getBoundingClientRect();t=Math.round(s.bottom-a.top+e)}t=Math.max(e,t);let i="12px",o=HQ(this.resolvePlacement());this._bell.style.top=`${t}px`,this._bell.style.bottom="auto",o?(this._bell.style.right=i,this._bell.style.left="auto"):(this._bell.style.left=i,this._bell.style.right="auto"),i1(this._layoutKind)||(this._panel.style.top=`${t+44}px`,this._panel.style.bottom="auto",o?(this._panel.style.right=i,this._panel.style.left="auto"):(this._panel.style.left=i,this._panel.style.right="auto"))}scheduleReposition(){this._repositionRaf&&cancelAnimationFrame(this._repositionRaf),this._repositionRaf=requestAnimationFrame(()=>{this._repositionRaf=0,this.repositionChrome()})}refreshChromeLabels(){let e=Rr("main.notification.center.title");this._bell.title=e,this._bell.setAttribute("aria-label",e),this._titleEl.textContent=e,this._panel.setAttribute("aria-label",e)}setPanelOpen(e){this._center.notifications.length===0&&(e=!1),this._panelOpen=e,this.syncPanelVisibility(),e&&this.renderList()}syncPanelVisibility(){let e=this._center.notifications.length>0;this._root.hidden=!e,this._panel.hidden=!e||!this._panelOpen;let t=e&&this._panelOpen&&i1(this._layoutKind);this._backdrop.hidden=!t,this._bell.setAttribute("aria-expanded",String(this._panelOpen)),e&&this.scheduleReposition()}render(){let e=this._center.notifications.length;if(e===0){this._panelOpen=!1,this._expandedGroups.clear(),this.syncPanelVisibility();return}this._badge.textContent=e>99?"99+":String(e),this.syncPanelVisibility(),this._panelOpen&&this.renderList()}renderList(){this.refreshChromeLabels(),this._list.replaceChildren();let e=this._center.notifications;if(e.length===0){let t=document.createElement("div");t.className=`${He}__empty`,t.textContent=Rr("main.notification.center.noNotifications"),this._list.appendChild(t);return}for(let t of j5e(e))t.collapsible?this._list.appendChild(this.renderGroup(t)):this._list.appendChild(this.renderItem(t.items[0]))}renderGroup(e){let t=document.createElement("div");t.className=`${He}__group`;let n=document.createElement("button");n.type="button",n.className=`${He}__group-header`;let i=this._expandedGroups.has(e.key);if(n.innerHTML=`<span class="${He}__group-title">${XQ(lFe(e))}</span><span class="${He}__group-summary">${XQ(cFe(e))}</span>`,n.addEventListener("click",()=>{this._expandedGroups.has(e.key)?this._expandedGroups.delete(e.key):this._expandedGroups.add(e.key),this.renderList()}),t.appendChild(n),i){let o=document.createElement("div");o.className=`${He}__group-body`;for(let a of e.items)o.appendChild(this.renderItem(a));t.appendChild(o)}return t}renderItem(e){let t=document.createElement("div");t.className=`${He}__item ${He}__item--${e.type}`;let n=document.createElement("div");n.className=`${He}__item-title`,n.textContent=e.title;let i=document.createElement("button");i.type="button",i.className=`${He}__icon-btn`,i.textContent="\xD7",i.addEventListener("click",()=>this._center.remove(e.id));let o=document.createElement("div");if(o.className=`${He}__item-head`,o.append(n,i),t.appendChild(o),e.message){let a=document.createElement("div");a.className=`${He}__item-message`,eFe(a,e.message),t.appendChild(a)}return t}dispose(){var e;for(let t of this._unsubs)t();this._unsubs.length=0,document.removeEventListener("pointerdown",this._onDocPointer,!0),window.removeEventListener("resize",this._onWindowResize),(e=this._shortcutObserver)==null||e.disconnect(),this._shortcutObserver=void 0,this._repositionRaf&&(cancelAnimationFrame(this._repositionRaf),this._repositionRaf=0),this._root.remove()}};function i1(r){return r==="phone"||r==="pad"}function GQ(r){return r==="top-right"||r==="top-left"}function HQ(r){return r==="top-right"||r==="bottom-right"}function WQ(r){let e=i=>!!i&&i instanceof HTMLElement&&!i.hasAttribute("hidden")&&i.getClientRects().length>0,t=r.querySelector(".ml-ui-shortcut-toolbar-shell");if(e(t))return t;let n=document.querySelector(".ml-ui-shortcut-toolbar-shell");return e(n)?n:null}function lFe(r){var e;let t=r.source;return t==="font-missed"?Rr("main.notification.group.fontMissed"):t==="unsupported-entities"?Rr("main.notification.group.unsupportedEntities"):((e=r.items[0])==null?void 0:e.title)??""}function cFe(r){let e=r.items.length;return r.source==="font-missed"?Rr("main.notification.group.fontMissedSummary",{count:e}):r.source==="unsupported-entities"?Rr("main.notification.group.unsupportedEntitiesSummary",{count:e}):Rr("main.notification.group.genericSummary",{count:e})}function XQ(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function uFe(){if(typeof document>"u")return;let r=document.getElementById(VQ);r&&r.remove();let e=document.createElement("style");e.id=VQ,e.textContent=`
  6775. .${He} {
  6776. /* Fill the canvas host so panel % widths resolve against the drawing area. */
  6777. position: absolute;
  6778. inset: 0;
  6779. z-index: ${sOe};
  6780. font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  6781. font-size: 13px;
  6782. color: var(--ml-ui-text);
  6783. pointer-events: none;
  6784. }
  6785. .${He}[hidden],
  6786. .${He}__backdrop[hidden],
  6787. .${He}__panel[hidden] {
  6788. display: none !important;
  6789. }
  6790. .${He} > * {
  6791. pointer-events: auto;
  6792. }
  6793. .${He}__backdrop {
  6794. /* Cover the canvas host only \u2014 not the full browser viewport. */
  6795. position: absolute;
  6796. inset: 0;
  6797. z-index: 0;
  6798. margin: 0;
  6799. padding: 0;
  6800. border: none;
  6801. cursor: pointer;
  6802. background: var(--ml-ui-overlay);
  6803. }
  6804. .${He}__bell {
  6805. position: absolute;
  6806. z-index: 2;
  6807. width: 36px;
  6808. height: 36px;
  6809. border-radius: 50%;
  6810. border: 1px solid var(--ml-ui-border);
  6811. background: var(--ml-ui-bg);
  6812. color: var(--ml-ui-text);
  6813. cursor: pointer;
  6814. box-shadow: var(--ml-ui-shadow);
  6815. display: inline-flex;
  6816. align-items: center;
  6817. justify-content: center;
  6818. }
  6819. .${He}--bottom-anchor.${He}--right .${He}__bell {
  6820. right: 12px;
  6821. bottom: max(12px, env(safe-area-inset-bottom, 0px));
  6822. }
  6823. .${He}--bottom-anchor.${He}--left .${He}__bell {
  6824. left: 12px;
  6825. bottom: max(12px, env(safe-area-inset-bottom, 0px));
  6826. }
  6827. .${He}__bell:hover {
  6828. color: var(--ml-ui-accent);
  6829. }
  6830. .${He}__badge {
  6831. position: absolute;
  6832. top: -4px;
  6833. right: -4px;
  6834. min-width: 16px;
  6835. height: 16px;
  6836. padding: 0 4px;
  6837. border-radius: 8px;
  6838. background: var(--ml-ui-danger);
  6839. color: #fff;
  6840. font-size: 10px;
  6841. line-height: 16px;
  6842. text-align: center;
  6843. }
  6844. .${He}__panel {
  6845. position: absolute;
  6846. z-index: 2;
  6847. display: flex;
  6848. flex-direction: column;
  6849. background: var(--ml-ui-bg);
  6850. border: 1px solid var(--ml-ui-border);
  6851. box-shadow: var(--ml-ui-shadow);
  6852. overflow: hidden;
  6853. }
  6854. .${He}--bottom-anchor.${He}--right:not(.${He}--sheet) .${He}__panel {
  6855. right: 12px;
  6856. bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 44px);
  6857. width: min(360px, calc(100% - 24px));
  6858. max-height: min(420px, 60%);
  6859. border-radius: 8px;
  6860. }
  6861. .${He}--bottom-anchor.${He}--left:not(.${He}--sheet) .${He}__panel {
  6862. left: 12px;
  6863. bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 44px);
  6864. width: min(360px, calc(100% - 24px));
  6865. max-height: min(420px, 60%);
  6866. border-radius: 8px;
  6867. }
  6868. .${He}--top-anchor:not(.${He}--sheet) .${He}__panel {
  6869. /* top/left/right set inline under the bell */
  6870. width: min(360px, calc(100% - 24px));
  6871. max-height: min(420px, 55%);
  6872. border-radius: 8px;
  6873. }
  6874. .${He}--phone.${He}--sheet .${He}__panel {
  6875. /* Sheet spans the canvas host, not the browser viewport. */
  6876. top: 0;
  6877. left: 0;
  6878. right: 0;
  6879. width: 100%;
  6880. max-height: min(55%, 420px);
  6881. border-radius: 0 0 12px 12px;
  6882. border-left: none;
  6883. border-right: none;
  6884. border-top: none;
  6885. padding-top: env(safe-area-inset-top, 0px);
  6886. }
  6887. .${He}--pad.${He}--sheet .${He}__panel {
  6888. /* Same top-sheet interaction as phone; width matches pad session panel.
  6889. * Cap against the canvas host (100%), not the browser viewport (100vw),
  6890. * so a narrow host inside a wide window does not overflow the drawing area. */
  6891. top: 0;
  6892. left: 50%;
  6893. right: auto;
  6894. transform: translateX(-50%);
  6895. width: ${g1}px;
  6896. max-width: calc(100% - ${Kee}px);
  6897. max-height: min(55%, 420px);
  6898. border-radius: 0 0 12px 12px;
  6899. border-top: none;
  6900. padding-top: env(safe-area-inset-top, 0px);
  6901. }
  6902. .${He}__header {
  6903. display: flex;
  6904. align-items: center;
  6905. justify-content: space-between;
  6906. padding: 10px 12px;
  6907. border-bottom: 1px solid var(--ml-ui-border);
  6908. font-weight: 600;
  6909. color: var(--ml-ui-text);
  6910. }
  6911. .${He}__list {
  6912. overflow: auto;
  6913. max-height: inherit;
  6914. flex: 1;
  6915. }
  6916. .${He}__empty {
  6917. padding: 28px 16px;
  6918. text-align: center;
  6919. color: var(--ml-ui-text-muted);
  6920. }
  6921. .${He}__item {
  6922. padding: 10px 12px;
  6923. border-bottom: 1px solid var(--ml-ui-border);
  6924. }
  6925. .${He}__item-head {
  6926. display: flex;
  6927. align-items: flex-start;
  6928. justify-content: space-between;
  6929. gap: 8px;
  6930. }
  6931. .${He}__item-title {
  6932. font-weight: 600;
  6933. line-height: 1.35;
  6934. color: var(--ml-ui-text);
  6935. }
  6936. .${He}__item-message {
  6937. margin-top: 4px;
  6938. color: var(--ml-ui-text-muted);
  6939. line-height: 1.4;
  6940. word-break: break-word;
  6941. }
  6942. .${He}__item-message a {
  6943. color: var(--ml-ui-accent);
  6944. text-decoration: underline;
  6945. }
  6946. .${He}__item--warning .${He}__item-title {
  6947. color: var(--el-color-warning, #e6a23c);
  6948. }
  6949. .${He}__item--error .${He}__item-title {
  6950. color: var(--ml-ui-danger);
  6951. }
  6952. .${He}__item--success .${He}__item-title {
  6953. color: var(--el-color-success, #67c23a);
  6954. }
  6955. .${He}__item--info .${He}__item-title {
  6956. color: var(--ml-ui-accent);
  6957. }
  6958. .${He}__icon-btn {
  6959. border: none;
  6960. background: transparent;
  6961. cursor: pointer;
  6962. font-size: 16px;
  6963. line-height: 1;
  6964. color: var(--ml-ui-text-muted);
  6965. padding: 0 2px;
  6966. }
  6967. .${He}__group-header {
  6968. width: 100%;
  6969. text-align: left;
  6970. border: none;
  6971. background: color-mix(in srgb, var(--ml-ui-text) 4%, var(--ml-ui-bg));
  6972. cursor: pointer;
  6973. padding: 10px 12px;
  6974. border-bottom: 1px solid var(--ml-ui-border);
  6975. color: var(--ml-ui-text);
  6976. }
  6977. .${He}__group-title {
  6978. display: block;
  6979. font-weight: 600;
  6980. }
  6981. .${He}__group-summary {
  6982. display: block;
  6983. margin-top: 2px;
  6984. color: var(--ml-ui-text-muted);
  6985. font-size: 12px;
  6986. }
  6987. .${He}__group-body .${He}__item {
  6988. padding-left: 20px;
  6989. }
  6990. `,document.head.appendChild(e)}var Rz=class{constructor(){this._center=new P1,this._defaultStore=this._center,this._showDefaultUi=!0,this._isCustom=!1}install(e,t={}){var n;this._docManager=e,this._host=t.host,this._showDefaultUi=t.showDefaultUi!==!1,this._placement=t.placement,t.enableBridge!==!1?((n=this._bridge)==null||n.uninstall(),this._bridge=new Oz(e,()=>this.center),this._bridge.install()):this._center.setActiveSession(e.activeSessionId),!this._isCustom&&this._showDefaultUi&&this.mountDefaultUi()}get placement(){return this._placement}setPlacement(e){var t;this._placement=e,(t=this._defaultUi)==null||t.setPlacement(e)}get center(){return this._center}get isCustom(){return this._isCustom}setCenter(e){var t,n;if(e==null){this.restoreDefault();return}this._center!==e&&(this.disposeDefaultUi(),this._isCustom?(n=(t=this._center).dispose)==null||n.call(t):this._defaultStore.dispose(),this._center=e,this._isCustom=!0,this._docManager&&this._center.setActiveSession(this._docManager.activeSessionId))}restoreDefault(){var e,t;if(!this._isCustom){this._showDefaultUi&&!this._defaultUi&&this.mountDefaultUi();return}(t=(e=this._center).dispose)==null||t.call(e),this._defaultStore=new P1,this._center=this._defaultStore,this._isCustom=!1,this._docManager&&this._center.setActiveSession(this._docManager.activeSessionId),this._showDefaultUi&&this.mountDefaultUi()}resolveHost(){var e,t;return this._host?this._host:((t=(e=this._docManager)==null?void 0:e.curView)==null?void 0:t.container)||document.body}mountDefaultUi(){this.disposeDefaultUi(),!(typeof document>"u")&&(this._defaultUi=new Dz(this._center,this.resolveHost(),{placement:this._placement}))}disposeDefaultUi(){var e;(e=this._defaultUi)==null||e.dispose(),this._defaultUi=void 0}dispose(){var e,t,n;(e=this._bridge)==null||e.uninstall(),this._bridge=void 0,this.disposeDefaultUi(),(n=(t=this._center).dispose)==null||n.call(t),this._defaultStore=new P1,this._center=this._defaultStore,this._isCustom=!1,this._docManager=void 0,this._host=void 0,this._showDefaultUi=!0,this._placement=void 0}},Wne=new Rz;function hFe(r,e){Wne.install(r,e)}function dFe(){Wne.dispose()}function pFe(r){var e;let t=r.tables.blockTable,n=t.getAt(rn.PAPER_SPACE_NAME_PREFIX);if(n)return n.objectId;let i=(e=r.objects)==null?void 0:e.layout;if(!(i!=null&&i.newIterator))return;let o=t.modelSpace.objectId,a;for(let s of i.newIterator()){let l=s.blockTableRecordId;if(!l||l===o)continue;let c=t.getIdAt(l);if(!(!c||!rn.isPaperSapceName(c.name))){if(s.tabSelected)return l;a||(a=l)}}return a}function fFe(r){let e=r.tables.blockTable.modelSpace.objectId;if(r.tilemode){r.currentSpaceId!==e&&(r.currentSpaceId=e);return}let t=pFe(r);t&&t!==r.currentSpaceId&&(r.currentSpaceId=t)}var mFe="https://cdn.jsdelivr.net/gh/mlightcad/cad-data",gFe="templates/acadiso.dxf",yFe={ARC:["A"],CIRCLE:["C"],ELLIPSE:["EL"],ERASE:["E"],DIMLINEAR:["DLI"],MEASUREDISTANCE:["DI","DIST"],MEASUREAREA:["AA","AREA"],MEASUREANGLE:["ANG"],"-HATCH":["-H"],IMAGEATTACH:["IAT"],"-INSERT":["I"],XATTACH:["XA"],LAYER:["LA"],"-LAYER":["-LA"],LINE:["L"],MLINE:["ML"],MTEXT:["T"],MOVE:["M"],OFFSET:["O"],COPY:["CO"],ROTATE:["RO"],OPEN:["OP"],PAN:["P"],POINT:["PO"],POLYGON:["POL"],PLINE:["PL"],RAY:["RA"],RECTANG:["REC"],REGEN:["RE"],SELECT:["SE"],SPLINE:["SPL"],XLINE:["XL"],ZOOM:["Z"],UNDO:["U"],REDO:["REDO"],READINGMODE:["RM"]},bFe="modern",Y=class r{constructor(e={}){var t;this._sessions=[],this._nextSessionId=1,this._openFileProfiler=new C5e,this._workersReady=null,this._nextOverlayId=1,this._presetFontsForOpenPromise=null,this._lastPresetFontsForOpen=[],this.events={documentToBeOpened:new wt,documentCreated:new wt,documentActivated:new wt,documentToBeActivated:new wt,documentToBeDestroyed:new wt,documentDestroyed:new wt,workersReady:new wt},this._baseUrl=e.baseUrl??mFe,Yke(e.docsBaseUrl??Vz),this._commandAliasOverrides=this.normalizeCommandAliasConfig(e.commandAliases),this._openDocumentDefaults=e.openDocumentDefaults,this._disableExport=e.disableExport===!0,e.useMainThreadDraw?Yo.getInstance().setRenderMode("main"):Yo.getInstance().setRenderMode("worker"),et.instance.setDefaultFonts(bFe),et.instance.lazyFontLoading=!0,et.instance.awaitFontsBeforeDraw=!0,Yo.getInstance().setLazyFontLoading(!0),Yo.getInstance().setAwaitFontsBeforeDraw(!0);let n=new A1,i=((t=e.container)==null?void 0:t.getBoundingClientRect())??{width:300,height:150},o=()=>{var u;if(e.autoResize){let h=e.container;if(h)return{width:Math.max(1,Math.floor(h.clientWidth)),height:Math.max(1,Math.floor(h.clientHeight))};let d=(u=e.container)==null?void 0:u.getBoundingClientRect();return{width:Math.max(1,Math.floor(d?.width??i.width)),height:Math.max(1,Math.floor(d?.height??i.height))}}else return{width:e.width??i.width,height:e.height??i.height}},a=new Uz({container:e.container,calculateSizeCallback:o});this._mainView=a;let s=new C1(a,n);this._activeSession=new S1(`doc-${this._nextSessionId++}`,s),this._sessions=[this._activeSession],JC(this._activeSession.id),this._fontLoader=new Pz,et.instance.setFontLoader(this._fontLoader.fontLoader);let l=this.resolveFontsBaseUrl();this._fontLoader.baseUrl=l,et.instance.baseUrl=l,Yo.getInstance().setFontUrl(l),this.installFontFileLoadTimeout(),Fr().workingDatabase=n.database,this._commandManager=new kl,this.registerCommands(),this._pluginManager=new Sz(this.context,this._commandManager),this._dataSourceManager=new kz,this._dataSourceManager.register(new Ez),this._dataSourceManager.register(new Lz);let c=e.busyIndicatorHost??a.container;if(this._busyIndicatorHost=c,this._openFileProgress=new k5e(c),this._openFileProgress.setSceneBusyGate(()=>this.openProgressView.isProcessingEntities),this._openFileProgress.setOnHidden(()=>this.onOpenProgressHidden()),this._busyIndicator=new Mz(c),eOe({showMessage:(u,h,d)=>this.editor.showMessage(u,h,d),showBusyIndicator:u=>this.showBusyIndicator(u),hideBusyIndicator:()=>this.hideBusyIndicator(),withBusyIndicator:(u,h)=>this.withBusyIndicator(u,h)}),this.events.documentToBeOpened.addEventListener(()=>{this._openFileProgress.reset()}),this.bindOpenProgress(n),this.events.documentCreated.dispatch({doc:n,mode:n.openMode}),e.preloadDefaultFonts&&this.loadDefaultFonts(),this._webworkerFileUrls=e.webworkerFileUrls,this.registerWorkers(e.webworkerFileUrls),e.checkWorkersOnInit&&this.areWorkersReady(),this.loadPlugins(e.plugins).catch(u=>{kt.error("[AcApDocManager] Error loading plugins:",u)}),M5e({enabled:e.builtinOpenFileDialog!==!1,getOpenDocumentDefaults:()=>this.resolveOpenDocumentDefaults()}),e.notificationCenter!==!1){let u=typeof e.notificationCenter=="object"?e.notificationCenter:{};hFe(this,{host:u.host,showDefaultUi:u.showDefaultUi!==!1,placement:u.placement,enableBridge:!0})}}static createInstance(e={}){return r._instance==null&&(r._instance=new r(e)),this._instance}static checkWebworkerReadiness(e){return NQ(e)}static get instance(){if(!r._instance)throw new Error("AcApDocManager instance is not created yet!");return r._instance}static tryGetInstance(){return r._instance}async destroy(){var e,t;this._mainView.abortConversion(),(e=this._splitView)==null||e.abortConversion(),await this._pluginManager.unloadAllPlugins();for(let n of[...this._sessions])n.context.dispose(),n.doc.destroy(),n.viewState&&this.curView.disposeSessionState(n.viewState);this._sessions=[],(t=this._splitView)==null||t.dispose(),this._splitView=void 0,this._mainView.dispose(),E5e(),dFe(),Yo.resetInstance(),O5e(),r._instance=void 0}get workersReady(){return this._workersReady}areWorkersReady(){return this._workersReady===!0?Promise.resolve(!0):(this._workersReadyCheckPromise||(this._workersReadyCheckPromise=NQ(this._webworkerFileUrls).then(e=>(this._workersReady=e,this._workersReadyCheckPromise=void 0,this.events.workersReady.dispatch({ready:e}),e)).catch(()=>(this._workersReady=!1,this._workersReadyCheckPromise=void 0,this.events.workersReady.dispatch({ready:!1}),!1))),this._workersReadyCheckPromise)}get context(){return this._activeSession.context}get documents(){return this._sessions.map(e=>e.doc)}get documentCount(){return this._sessions.length}get activeSessionId(){return this._activeSession.id}document(e){var t;return(t=this._sessions[e])==null?void 0:t.doc}sessionFor(e){return this._sessions.find(t=>t.doc===e)}get curDocument(){return this.context.doc}get mdiActiveDocument(){return this._activeSession.doc}async activateDocument(e){let t=this.sessionFor(e);if(!t)return!1;if(t===this._activeSession)return!0;let n=t.context.view,i=this._activeSession.context.view;return this._openingSession&&n===i?!1:(await this._commandManager.cancelActive(),this.events.documentToBeActivated.dispatch({doc:e,mode:e.openMode}),n===i?(this.parkActiveSession(),this._activeSession=t,t.context.resume(),t.viewState&&(this.curView.restoreSessionState(t.viewState),t.viewState=void 0)):(this._activeSession!==this._openingSession&&this._activeSession.context.suspend(),this._activeSession=t,t.context.resume()),JC(t.id),Fr().workingDatabase=e.database,this._pluginManager.setContext(t.context),this.curView.bindDrawDatabase(e.database),this.setActiveLayout(),this.curView.syncDisplaySysVars(e.database),this.events.documentActivated.dispatch({doc:e,mode:e.openMode}),this._openingSession||this.syncProgressOverlayHost(),!0)}get mainView(){return this._mainView}get splitView(){return this._splitView}ensureSplitView(e){return this._splitView?this._splitView.container!==e&&e.appendChild(this._splitView.container):this._splitView=new Uz({container:e,calculateSizeCallback:()=>({width:Math.max(1,e.clientWidth),height:Math.max(1,e.clientHeight)})}),this._splitView}attachSatelliteView(e,t){return this.ensureSplitView(e),!0}detachSatelliteView(){}get satelliteDocument(){var e;if(this._splitView)return(e=this._sessions.find(t=>t.context.view===this._splitView))==null?void 0:e.doc}async closeDocument(e){let t=e??this.curDocument,n=this.sessionFor(t);if(!n)return!1;await this._commandManager.cancelActive(),this.events.documentToBeDestroyed.dispatch({doc:t,mode:t.openMode});let i=n===this._activeSession,o=this._sessions.indexOf(n);if(this._sessions.length===1)return this.resetActiveSessionToUntitled(n),this.events.documentDestroyed.dispatch({doc:t,mode:t.openMode}),this.events.documentCreated.dispatch({doc:this.curDocument,mode:this.curDocument.openMode}),this.events.documentActivated.dispatch({doc:this.curDocument,mode:this.curDocument.openMode}),!0;i&&this.parkActiveSession(),n.context.dispose(),t.destroy(),this.clearSessionOverlays(n),JZ(n.id);let a=n.context.view;if(n.viewState?(a.disposeSessionState(n.viewState),n.viewState=void 0):a.clear(),this._sessions.splice(o,1),this.events.documentDestroyed.dispatch({doc:t,mode:t.openMode}),i){let s=this._sessions[Math.min(o,this._sessions.length-1)];await this.activateDocument(s.doc)}return!0}get curView(){return this.context.view}get editor(){return this.context.view.editor}get commandManager(){return this._commandManager}get pluginManager(){return this._pluginManager}get dataSourceManager(){return this._dataSourceManager}get drawStyleSessionAccessory(){return HRe(this._mainView)}get baseUrl(){return this._baseUrl}get disableExport(){return this._disableExport}resolveColors(){let e=this.curDocument.database,t=e.tables.layerTable.getAt(e.clayer),n=this.resolveColorToRgb(t?.color),i=e.cecolor;return i!=null&&i.isByLayer&&(i=t?.color),{entityColor:this.resolveColorToRgb(i),layerColor:n}}resolveColorToRgb(e){return!e||e.isByLayer||e.isByBlock||e.isByACI&&e.colorIndex===7?this.resolveAci7ForBackground():e.RGB??this.resolveAci7ForBackground()}resolveAci7ForBackground(){return this.curView.backgroundColor===16777215?0:16777215}get avaiableFonts(){return this._fontLoader.avaiableFonts}async getAvaiableFonts(){try{return await this._fontLoader.getAvaiableFonts()}catch{return Gt.emit("failed-to-get-avaiable-fonts",{url:this._fontLoader.baseUrl}),[]}}async loadFonts(e){await this._fontLoader.load(e)}async loadDefaultFonts(e){e==null?await this._fontLoader.load([...et.instance.getFontsToLoad()]):await this._fontLoader.load(e)}ensurePresetFontsForOpen(){if(this._presetFontsForOpenPromise)return this._presetFontsForOpenPromise;let e=[...et.instance.getFontsToLoad()];if(this._lastPresetFontsForOpen=e,e.length===0)return this._presetFontsForOpenPromise=Promise.resolve(),this._presetFontsForOpenPromise;let t=Yo.getInstance(),n=t.getRenderMode()==="worker"?"worker":"main",i=3e4,o=n==="worker"?t.loadFonts(e,{scope:"all"}).then(()=>{}):et.instance.requestFonts(e).then(()=>{});return this._presetFontsForOpenPromise=new Promise(a=>{let s=setTimeout(()=>{a()},i);o.then(()=>{clearTimeout(s),a()},()=>{clearTimeout(s),a()})}),this._presetFontsForOpenPromise}async awaitPresetFontsReady(){await this.ensurePresetFontsForOpen()}get lastPresetFontsForOpen(){return this._lastPresetFontsForOpen}async openUrl(e,t){t=this.setOptions(t);let n=await this.ensureOpenSession();this.beginOpenProgress(),this.onBeforeOpenDocument(t,!n);try{await this._openFileProgress.beginOpen(this.context.doc.database);let i=await this.context.doc.openUri(e,t);return this.onAfterOpenDocument(i,t),!i&&n&&await this.closeFailedOpenSession(),i}catch(i){throw this._openFileProfiler.cancel(),n&&await this.closeFailedOpenSession(),i}}async openDocument(e,t,n,i){n=this.setOptions(n);let o=await this.ensureOpenSession(i);this.beginOpenProgress(),this.onBeforeOpenDocument(n,!o);try{await this._openFileProgress.beginOpen(this.context.doc.database);let a=await this.context.doc.openDocument(e,t,n);return this.onAfterOpenDocument(a,n),!a&&o&&await this.closeFailedOpenSession(),a}catch(a){throw this._openFileProfiler.cancel(),o&&await this.closeFailedOpenSession(),a}}async loadOverlay(e,t,n={}){var i;let{targetView:o,...a}=n,s=new ku,l=(i=e.split(".").pop())==null?void 0:i.toLocaleLowerCase();return await Ane(s,async()=>{await s.read(t,{readOnly:!0,...a},l==="dwg"?Ri.DWG:Ri.DXF)}),this.registerOverlayDatabase(s,{targetView:o})}async registerOverlayDatabase(e,t){let n=t?.targetView??this.curView,i=await n.addOverlayEntities(e),o=`overlay-${this._nextOverlayId++}`;return(this._sessions.find(a=>a.context.view===n)??this._activeSession).overlays.set(o,{db:e,layout:i}),n.isDirty=!0,o}removeOverlay(e){for(let t of this._sessions){let n=t.overlays.get(e);if(n)return this.sessionCadScene(t).internalScene.remove(n.layout.internalObject),n.layout.clear(),t.overlays.delete(e),t.viewState||(t.context.view.isDirty=!0),!0}return!1}setOverlayVisible(e,t){for(let n of this._sessions){let i=n.overlays.get(e);if(i)return i.layout.visible=t,n.context.view.isDirty=!0,!0}return!1}clearOverlays(e){let t=e?this._sessions.filter(n=>n.context.view===e):this._sessions;for(let n of t)for(let i of[...n.overlays.keys()])this.removeOverlay(i)}getOverlayIds(e){if(!e)return Array.from(this._activeSession.overlays.keys());let t=this._sessions.find(n=>n.context.view===e);return t?Array.from(t.overlays.keys()):[]}get overlayIds(){return this.getOverlayIds()}setCompareDisplay(e,t){(t??this.curView).setCompareDisplay(e)}isReadingModeEnabled(e){return(e??this.curView).readingModeEnabled}setReadingMode(e,t){(t??this.curView).setReadingMode(e)}toggleReadingMode(e){(e??this.curView).toggleReadingMode()}setOverlayCompareDisplay(e,t,n){for(let i of this._sessions){let o=i.overlays.get(e);if(o)return(n??i.context.view??this.curView).setCompareDisplay(t,o.layout),!0}return!1}getOverlayLayout(e){for(let t of this._sessions){let n=t.overlays.get(e);if(n)return n.layout}}async newDocument(e){let t=`${this.baseUrl.endsWith("/")?this.baseUrl:`${this.baseUrl}/`}${gFe}`,n=this.setOptions({...e,mode:at.Write}),i=await this.ensureOpenSession();this.beginOpenProgress(),this.onBeforeOpenDocument(n,!i),await this._openFileProgress.beginOpen(this.context.doc.database);let o=await this.context.doc.openUri(t,n);return o&&this.context.doc.resetNewDocumentIdentity(),this.onAfterOpenDocument(o,n),!o&&i&&await this.closeFailedOpenSession(),o}setOpenDocumentDefaults(e){this._openDocumentDefaults=e,P5e({enabled:!0,getOpenDocumentDefaults:()=>this.resolveOpenDocumentDefaults()})}resolveOpenDocumentDefaults(){let e=this._openDocumentDefaults;return e==null?{minimumChunkSize:1e3}:typeof e=="function"?e():e}regen(){this.curView.clear(),this.context.doc.database.regen()}installFontFileLoadTimeout(){let e=et.instance.loader;if(!e||e.__cadFontLoadTimeout)return;let t=e.loadAsync.bind(e),n=3e4;e.loadAsync=i=>new Promise((o,a)=>{let s=setTimeout(()=>{a(new Error(`Font load timed out after ${n}ms`))},n);t(i).then(l=>{clearTimeout(s),o(l)},l=>{clearTimeout(s),a(l)})}),e.__cadFontLoadTimeout=!0}resolveFontsBaseUrl(){return`${this._baseUrl.endsWith("/")?this._baseUrl:`${this._baseUrl}/`}fonts/`}lookupLocalCmd(e){return this._commandManager.lookupLocalCmd(e,this.curDocument.openMode)}lookupGlobalCmd(e){return this._commandManager.lookupGlobalCmd(e,this.curDocument.openMode)}searchCommandsByPrefix(e){return this._commandManager.searchCommandsByPrefix(e,this.curDocument.openMode)}registerCommands(){let e=this._commandManager,t=(n,i,o)=>{let a=yFe[n.toUpperCase()]??[];e.addCommand(kl.SYSTEMT_COMMAND_GROUP_NAME,n,i,o,this.resolveCommandAliases(n,a))};t("about","about",new cz),t("arc","arc",new T6),t("cachefont","cachefont",new uz),t("circle","circle",new k6),t("close","close",new pz),this._disableExport||(t("bmpout","bmpout",new h6),t("cdxf","cdxf",new p6),t("jpgout","jpgout",new f6),t("pngout","pngout",new m6)),t("entout","entout",new y6),t("ellipse","ellipse",new B6),t("erase","erase",new rz),t("hideobjects","hideobjects",new iz),t("dimlinear","dimlinear",new L6),ZBe(t,{view:this._mainView,commandManager:this._commandManager}),t("-hatch","-hatch",new p4e),t("imageattach","imageattach",new N6),t("-insert","-insert",new U6),t("xattach","xattach",new p8),t("-layer","-layer",new C6),t("laycur","laycur",new x6),t("laydel","laydel",new v6),t("layfrz","layfrz",new JRe),t("layiso","layiso",new e4e),t("laylck","laylck",new w6),t("layon","layon",new _6),t("layoff","layoff",new n4e),t("laythw","laythw",new A6),t("layuniso","layuniso",new M6),t("layulk","layulk",new P6),t("layerp","layerp",new S6),t("layerclose","layerclose",new E6),t("line","line",new O6),t("mline","mline",new V6),t("mtext","mtext",new H6),t("copy","copy",new h5e),t("move","move",new oz),t("offset","offset",new sz),t("rotate","rotate",new p5e),t("log","log",new hz),t("open","open",new dz),t("pan","pan",new _z),t("point","point",new W6),t("polygon","polygon",new I4e),t("pline","pline",new Z6),t("qnew","qnew",new fz),t("ray","ray",new Q6),t("rectang","rectang",new z4e),t("regen","regen",new mz),t("revcloud","revcloud",new iBe),u5e(t,{view:this._mainView,commandManager:this._commandManager}),t("select","select",new gz),t("sketch","sketch",new lBe),t("spline","spline",new u8),t("switchbg","switchbg",new bz),t("readingmode","readingmode",new vz),t("unisolateobjects","unisolateobjects",new lz),t("xline","xline",new f8),t("undo","undo",new xz),t("redo","redo",new wz),t("zoom","zoom",new b1),gt.instance().getAllDescriptors().forEach(n=>{e.addCommand(kl.SYSTEMT_COMMAND_GROUP_NAME,n.name,n.name,new yz,this.resolveCommandAliases(n.name,[]))})}normalizeCommandAliasConfig(e){let t=new Map;return e&&Object.entries(e).forEach(([n,i])=>{let o=n.trim().toUpperCase();if(!o)return;let a=Array.isArray(i)?i:[i],s=new Set;a.forEach(l=>{let c=l.trim().toUpperCase();c&&c!==o&&s.add(c)}),t.set(o,[...s])}),t}resolveCommandAliases(e,t){let n=e.trim().toUpperCase(),i=this._commandAliasOverrides.get(n);if(i)return[...i];let o=new Set;return t.forEach(a=>{let s=a.trim().toUpperCase();s&&s!==n&&o.add(s)}),[...o]}sendStringToExecute(e){this.executeCommandString(e).catch(t=>{let n=t instanceof Error?t.message:String(t);this.editor.showMessage(n,"error"),kt.error(`[AcApDocManager] Command failed: ${e}`,t)})}async executeCommandString(e){let t=this.splitCommandScript(e);if(!t.length)throw new Error("Command string is empty");let[n,...i]=t;this.editor.clearScriptInputs(),this.editor.enqueueScriptInputs(i),await this.executeNamedCommand(n,{preserveScriptInputs:!1})}async runScript(e){let t=FQ(e);for(this.editor.clearScriptInputs(),this.editor.enqueueScriptInputs(t);this.editor.hasScriptInputs();){let n=this.consumeNextScriptCommandName();if(n==null)break;if(g5e(n)){this.editor.clearScriptInputs();break}await this.executeNamedCommand(n,{preserveScriptInputs:!0})}}async executeNamedCommand(e,t){let n=this.context.doc.openMode,i=this._commandManager.lookupGlobalCmd(e)??this._commandManager.lookupLocalCmd(e,n);if(i||await this._pluginManager.loadByTrigger(e)&&(i=this._commandManager.lookupGlobalCmd(e)??this._commandManager.lookupLocalCmd(e,n)),!i)throw new Error(`Command '${e}' not found`);if(n<i.mode)throw new Error(`Command '${e}' requires mode '${at[i.mode]}' but document is in mode '${at[n]}'!`);await this._commandManager.cancelActive(),await this._commandManager.runActive(i,this.curView,async()=>{try{await i.trigger(this.context)}finally{t.preserveScriptInputs||this.editor.clearScriptInputs()}})}consumeNextScriptCommandName(){for(;this.editor.hasScriptInputs();){let e=this.editor.consumeScriptInput();if(e==null)return;let t=e.trim();if(t)return t}}splitCommandScript(e){let t=FQ(e);if(!t.length)return[];let n=0;for(;n<t.length&&!t[n].trim();)n++;return n>=t.length?[]:[t[n].trim(),...t.slice(n+1)]}setActiveLayout(e,t){let n=e??this.curView,i=t??this.curDocument.database;n.activeLayoutBtrId=i.currentSpaceId,n.modelSpaceBtrId=i.tables.blockTable.modelSpace.objectId}onBeforeOpenDocument(e,t=!0){this.events.documentToBeOpened.dispatch({doc:this.context.doc,mode:this.getDocumentEventMode(e)}),t&&(rm.instance.clearAll(),this.clearOverlays(),aJ(),iQ(),b1.clearOriginalViews(),this.openProgressView.clear()),this.openProgressView.bindDrawDatabase(this.context.doc.database),this.openProgressView.progressiveRendering=e?.progressiveRendering??!1,this._openFileProgress.setSeeThroughOverlay(e?.progressiveRendering??!1),this.openProgressView.convertInvisibleLayers=e?.convertInvisibleLayers===!0,this.openProgressView.cooperativeYield=e?.cooperativeYield!==!1;let n=this.openProgressView.cadScene;n&&(n.skipSpatialIndex=e?.skipSpatialIndex===!0),this.ensurePresetFontsForOpen(),this._openFileProfiler.begin(this.context.doc.database)}onAfterOpenDocument(e,t){let n=!e&&this.hasRecoverablePartialContent();if(e||n){let i=this._openingSession??this._activeSession,o=i.context.view;i.doc.destroy();let a=i.doc,s=a.database;fFe(s),this.setActiveLayout(o,s),o.syncDisplaySysVars(s),this.events.documentActivated.dispatch({doc:a,mode:this.getDocumentEventMode(t)});let l=s.tables.blockTable.modelSpace.objectId,c=s.currentSpaceId!==l,u=Fr().layoutManager.getActiveLayout(s),h=u?.limits,d=this.resolveOpenViewMode(t),p=t?.progressiveRendering??!1,f=!1;if(c&&h&&!h.isEmpty())o.zoomTo(h),f=!0;else if(d===kT.Extents)p&&o.beginProgressiveOpenFit(),o.zoomToFitDrawing(),o.requestOpenLineworkFrame();else if(c)p&&o.beginProgressiveOpenFit(),o.zoomToFitDrawing(),o.requestOpenLineworkFrame();else{let m=o.width/Math.max(o.height,1),g=s.tables.viewportTable.getActiveVportBox(m);g?(o.zoomTo(g),f=!0):(p&&o.beginProgressiveOpenFit(),o.zoomToFitDrawing(),o.requestOpenLineworkFrame())}o.markLayoutAsInitialized(s.currentSpaceId),f&&b1.rememberOriginalView(o,s.currentSpaceId),t!=null&&t.convertAllLayouts&&o.ensureEntitiesConvertedForExport({includeInvisibleLayers:t.convertInvisibleLayers!==!1,includeLayouts:!0}).catch(m=>{kt.error("[AcApDocManager] convertAllLayouts export convert failed",m)}),this._openFileProfiler.markReadCompleteAndScheduleReport(o)}else this._openFileProfiler.cancel(),this.openProgressView.endProgressiveOpenFit(),this.regen()}hasRecoverablePartialContent(){let e=(this._openingSession??this._activeSession).doc.database,t=e.tables.blockTable.modelSpace;return t?t.newIterator().count>0:!e.extents.isEmpty()}setOptions(e){return e==null?e={drawNoPlotLayers:!1,progressiveRendering:!1}:(this.stripObsoleteFontOpenOptions(e),this.stripDeprecatedWaitForTextGeometry(e),e.drawNoPlotLayers==null&&(e.drawNoPlotLayers=!1),e.progressiveRendering==null&&(e.progressiveRendering=!1)),e}stripDeprecatedWaitForTextGeometry(e){e.waitForTextGeometry!=null&&(delete e.waitForTextGeometry,console.warn("[AcApDocManager] Ignoring deprecated open option waitForTextGeometry; both stages of progressive rendering are controlled by progressiveRendering."))}stripObsoleteFontOpenOptions(e){let t=e,n=t.fontLoader!=null,i=t.failOnFontLoadError!=null;!n&&!i||(delete t.fontLoader,delete t.failOnFontLoadError,console.warn("[AcApDocManager] Ignoring obsolete open options "+[n?"fontLoader":null,i?"failOnFontLoadError":null].filter(Boolean).join(", ")+"; fonts load on demand via FontManager.lazyFontLoading."))}getDocumentEventMode(e){return e?.mode??at.Read}resolveOpenViewMode(e){return e?.openViewMode!=null?e.openViewMode:this.getDocumentEventMode(e)===at.Write?kT.Saved:kT.Extents}showBusyIndicator(e){this._busyIndicator.show(e)}setBusyIndicatorHost(e){this._busyIndicatorHost=e,this.syncProgressOverlayHost()}get openProgressView(){var e;return((e=this._openingSession)==null?void 0:e.context.view)??this.curView}beginOpenProgress(){this._openingSession=this._activeSession,this.syncProgressOverlayHost()}onOpenProgressHidden(){let e=this._openingSession;this._openingSession=void 0,e&&this._sessions.includes(e)&&e!==this._activeSession&&e.context.suspend(),this.syncProgressOverlayHost()}syncProgressOverlayHost(e=this.openProgressView){let t=this._splitView?e.container:this._busyIndicatorHost;this._openFileProgress.setHost(t),this._busyIndicator.setHost(t)}hideBusyIndicator(){this._busyIndicator.hide()}setBusyIndicatorMessage(e){this._busyIndicator.setMessage(e)}async withBusyIndicator(e,t){return this._busyIndicator.withBusyIndicator(e,t)}registerWorkers(e){let t=Yo.getInstance();t.initialize(e?.mtextRender??jne.mtextRender),t.setDefaultFonts([...et.instance.defaultFonts])}async loadPlugins(e){if(e){if(e.fromConfig&&e.fromConfig.length>0)try{let t=await this._pluginManager.loadPluginsFromConfig(e.fromConfig,{continueOnError:!0});t.loaded.length>0&&kt.info(`[AcApDocManager] Loaded ${t.loaded.length} plugin(s) from config:`,t.loaded),t.failed.length>0&&kt.warn(`[AcApDocManager] Failed to load ${t.failed.length} plugin(s):`,t.failed.map(n=>`${n.name}: ${n.error.message}`))}catch(t){kt.error("[AcApDocManager] Error loading plugins from config:",t)}if(e.fromFolder)try{let t=await this._pluginManager.loadPluginsFromFolder(e.fromFolder.folderPath,{pluginList:e.fromFolder.pluginList,continueOnError:e.fromFolder.continueOnError??!0});t.loaded.length>0&&kt.info(`[AcApDocManager] Loaded ${t.loaded.length} plugin(s) from folder:`,t.loaded),t.failed.length>0&&kt.warn(`[AcApDocManager] Failed to load ${t.failed.length} plugin(s) from folder:`,t.failed.map(n=>`${n.name}: ${n.error.message}`))}catch(t){kt.error("[AcApDocManager] Error loading plugins from folder:",t)}}}bindOpenProgress(e){e.database.events.openProgress.addEventListener(t=>{if(this._openFileProgress.handle({database:e.database,percentage:t.percentage,stage:t.stage,subStage:t.subStage,subStageStatus:t.subStageStatus,data:t.data}),t.subStage==="STYLE"&&t.subStageStatus==="END"){let o=this._sessions.find(s=>s.doc===e),a=o?.context.view??this.curView;a&&a.startTextStyleFontPreload(e.database)}if(t.subStage!=="HEADER")return;let n=this._sessions.find(o=>o.doc===e),i=n?.context.view??this.curView;i.ltscale=e.database.ltscale,i.celtscale=e.database.celtscale,i.renderer.showLineWeight=e.database.lwdisplay})}parkActiveSession(){this._activeSession.context.suspend(),this._activeSession.viewState=this.curView.captureSessionState()}async ensureOpenSession(e){let t=e??this.curView;if(t===this.curView&&this.curDocument.isReusableUntitled)return!1;let n=this._sessions.find(s=>s.context.view===t);if(n!=null&&n.doc.isReusableUntitled)return n!==this._activeSession&&await this.activateDocument(n.doc),!1;await this._commandManager.cancelActive(),this._activeSession.context.suspend(),t===this.curView&&(this._activeSession.viewState=this.curView.beginNewSession());let i=new A1,o=new C1(t,i),a=new S1(`doc-${this._nextSessionId++}`,o);return this._sessions.push(a),this._activeSession=a,JC(a.id),Fr().workingDatabase=i.database,this._pluginManager.setContext(o),this.bindOpenProgress(i),this.events.documentCreated.dispatch({doc:i,mode:i.openMode}),!0}async closeFailedOpenSession(){this._sessions.length<=1||await this.closeDocument(this.curDocument)}resetActiveSessionToUntitled(e){let t=e.doc,n=e.id;rm.instance.clearAll(),this.clearOverlays(),aJ(),iQ(),this.curView.clear(),e.context.dispose(),t.destroy(),JZ(n);let i=new A1,o=new C1(this.curView,i),a=new S1(`doc-${this._nextSessionId++}`,o);this._sessions=[a],this._activeSession=a,JC(a.id),Fr().workingDatabase=i.database,this._pluginManager.setContext(o),this.bindOpenProgress(i),this.curView.bindDrawDatabase(i.database)}clearSessionOverlays(e){let t=this.sessionCadScene(e);for(let n of e.overlays.values())t.internalScene.remove(n.layout.internalObject),n.layout.clear();e.overlays.clear()}sessionCadScene(e){var t;return((t=e.viewState)==null?void 0:t.scene)??e.context.view.cadScene}},vFe=Object.freeze(Object.defineProperty({__proto__:null,AcApDocManager:Y},Symbol.toStringTag,{value:"Module"})),$1=class r{static isFontLoaded(e){return et.instance.isFontLoaded(e)}static getFontType(e){return et.instance.getFontType(e)}static getReplacementFontName(e){return et.instance.findAndReplaceFont(e)}static getShxCodePoints(e){var t;let n=et.instance.getFontByName(e,!1);if(!n||n.type!=="shx")return[];let i=n.data;return Object.keys(((t=i.content)==null?void 0:t.data)??{}).map(o=>Number(o)).filter(o=>Number.isFinite(o)).sort((o,a)=>o-a)}static getLoadedShxFontData(e){let t=et.instance.getFontByName(e,!1);if(!(!t||t.type!=="shx"))return t.data}static createShxParserFont(e){return new cd(e)}static findFontInfoByName(e){var t;let n=((t=Y.instance)==null?void 0:t.avaiableFonts)??[],i=e.trim().toLowerCase();if(i)return n.find(o=>o.name.some(a=>a.trim().toLowerCase()===i))}static getCatalogFontType(e){var t;return(t=r.findFontInfoByName(e))==null?void 0:t.type}static async ensureDrawingFontLoaded(e){let t=Y.instance;t&&(r.isFontLoaded(e)||await t.loadFonts([e]))}static async cacheFont(e,t,n,i){return et.instance.cacheFont(e,t,n,i)}static async getCachedMeshFontProgram(e){let t=[e],n=r.findFontInfoByName(e);n!=null&&n.file&&t.push(n.file);for(let a of n?.name??[])t.push(a);let i=r.getReplacementFontName(e);if(i&&i!==e){t.push(i);let a=r.findFontInfoByName(i);a!=null&&a.file&&t.push(a.file);for(let s of a?.name??[])t.push(s)}let o=new Set;for(let a of t){let s=a.trim().toLowerCase();if(!s||o.has(s))continue;o.add(s);let l=await et.instance.getCachedMeshFontProgram(a);if(l&&l.byteLength>0)return new Uint8Array(l)}}static async persistMeshFontProgram(e,t,n){await et.instance.persistMeshFontProgram(e,t,n)}};function xFe(r){let e=[];try{let t=r.tables.textStyleTable;if(e.push(...t.fonts??[]),t.newIterator)for(let n of t.newIterator()){let i=n.textStyle;i!=null&&i.font&&e.push(i.font),i!=null&&i.bigFont&&e.push(i.bigFont),i!=null&&i.extendedFont&&e.push(i.extendedFont)}}catch{return[]}return LT(e)}function wFe(r,e,t){let n=LT([...r]);n.length===0&&t!=null&&t.firstDefaultFont&&n.push(t.firstDefaultFont);let i=new Set(n.map(Sb)),o=new Set(e.map(Sb)),a=LT(e.filter(l=>!i.has(Sb(l)))),s=LT(n.filter(l=>o.has(Sb(l))));if(s.length===0&&t!=null&&t.firstDefaultFont){let l=Sb(t.firstDefaultFont);l&&i.has(l)&&(s=[t.firstDefaultFont])}return s.length>3&&(s=s.slice(0,3)),{critical:n,workerWarm:s,background:a}}function LT(r){let e=new Set,t=[];for(let n of r){if(!n)continue;let i=Sb(n);!i||e.has(i)||(e.add(i),t.push(n))}return t}function Sb(r){if(r==null)return"";let e=String(r).trim();if(!e)return"";let t=e.lastIndexOf(".");return t>0&&(t===e.length-4||t===e.length-5)&&(e=e.substring(0,t)),e.toLowerCase()}var Xne=13,Yne=14,$ne=1,Est=Yne*2+$ne*2,_Fe=.5,SFe=.5,vb;function AFe(){if(vb!==void 0)return vb;if(typeof document>"u")return vb=null,null;try{vb=document.createElement("canvas").getContext("2d")}catch{vb=null}return vb}function Kne(r){return r?.padXEm??Yne/Xne}function qne(r){let e=r?.borderEm??$ne/Xne;return e>0?e:0}function Zne(r,e){return r>0?2*(Kne(e)+qne(e))*r:0}function MFe(r,e,t){let n=Zne(e,t);if(!(e>0))return n;let i=AFe();if(!i)return r.length*e*.6+n;let o=t?.fontWeight??"500",a=t?.fontFamily??"sans-serif";return i.font=`${o} ${e}px ${a}`,i.measureText(r).width+n}function PFe(r,e,t,n){if(!(e>0)||!(t>0))return e;let i=n?.maxLineFraction??_Fe,o=t*i,a=MFe(r,e,n);if(a<=o)return e;if(!(o>0))return 1;let s=Math.max(0,a-Zne(e,n))/e,l=2*(Kne(n)+qne(n)),c=s+l;return c>0?Math.max(1,o/c):e}function Nl(r,e,t,n){return e.textHeightMode==="custom"?e.fontSize:PFe(r,e.fontSize,t,n)}function cm(r,e,t){let n=r(e),i=r(t);return Math.hypot(i.x-n.x,i.y-n.y)}function PU(r,e,t){return!(r>0)||!(e>0)||!(t>0)||t>=e?r:Math.max(1,r*(t/e))}function Jne(r,e,t,n){return Math.min(cm(r,e,t),cm(r,e,n))*SFe}function EU(r,e,t,n){if(!(t>0)||!(n>0))return 0;let i=r(e),o=r({x:e.x+t,y:e.y});return Math.hypot(o.x-i.x,o.y-i.y)/t*n}function EFe(r,e,t){let n=t.x-e.x,i=t.y-e.y,o=n*n+i*i;if(!(o>0))return Math.hypot(r.x-e.x,r.y-e.y);let a=((r.x-e.x)*n+(r.y-e.y)*i)/o;return a=Math.max(0,Math.min(1,a)),Math.hypot(r.x-(e.x+a*n),r.y-(e.y+a*i))}function Qne(r,e){let t=e.length;if(t<3)return 0;let n=1/0;for(let l=0;l<t;l++){let c=e[l],u=e[(l+1)%t];n=Math.min(n,cm(r,c,u))}let i=0,o=0;for(let l of e)i+=l.x,o+=l.y;i/=t,o/=t;let a=r({x:i,y:o}),s=1/0;for(let l=0;l<t;l++){let c=r(e[l]),u=r(e[(l+1)%t]);s=Math.min(s,EFe(a,c,u))}return Math.min(n,2*s)}var CFe=r=>new De(r.min,r.max),TFe=r=>new ct(r.min,r.max),kFe=r=>new Ne(r.min,r.max),IFe=r=>new ct(r.min,r.max),LFe=r=>new Dy(r.min,r.max),OFe=r=>new ct(r.min,r.max),DFe=r=>{let e=new Ne;return e.min.set(r.min.x,r.min.y,0),e.max.set(r.max.x,r.max.y,0),e},YQ={threeBo2dToGeBox2d:IFe,geBox2dToThreeBox2d:LFe,threeBox3dToGeBox3d:CFe,geBox3dToThreeBox3d:kFe,goBox3dToGeBox2d:TFe,threeBox3dToGeBox2d:OFe,geBox2dToThreeBox3d:DFe};function ere(r,e){if(!e||r.length<2)return r;let t=-1,n=-1;for(let a=0;a<r.length&&(r[a].ownerId===e?t<0&&(t=a):n<0&&(n=a),!(t>=0&&n>=0));a++);if(t<0||n<0||t<n)return r;let i=[],o=[];for(let a=0;a<r.length;a++){let s=r[a];s.ownerId===e?i.push(s):o.push(s)}return i.concat(o)}function RFe(r,e){return{pending:ere(r,e),cursor:0,activeOwnerId:e}}function BFe(r,e,t){if(e.length===0&&t===r.activeOwnerId)return r;let n=r.cursor===0?r.pending:r.pending.slice(r.cursor);if(t!==r.activeOwnerId)return{pending:ere(e.length>0?e.concat(n):n,t),cursor:0,activeOwnerId:t};let i=!1,o=[],a=[];for(let s=0;s<e.length;s++)t&&e[s].ownerId===t?(i=!0,o.push(e[s])):a.push(e[s]);if(i)return{pending:o.concat(n,a),cursor:0,activeOwnerId:t};for(let s=0;s<a.length;s++)r.pending.push(a[s]);return r}function FFe(r){let{pending:e,cursor:t,activeOwnerId:n}=r;if(!n)return!1;for(let i=t;i<e.length;i++)if(e[i].ownerId===n)return!0;return!1}function NFe(r){let{tookMs:e,budgetMs:t,maxSlice:n,activeLayoutPending:i}=r,o=Math.max(1,r.slice),a=i?2:4;return e<t/2?Math.min(o*a,n):e>t*2?Math.max(1,o>>1):o}var Bz=class{constructor(e){this.getLayerInfo=e}shouldConvert(e){if(!e.visibility)return!1;let t=this.getLayerInfo(e.layer);return t?this.isBlockReference(e)?!t.isFrozen:O1.isLayerVisible(t):!0}shouldConvertForExport(e,t=!0){return e.visibility?t?!0:this.shouldConvert(e):!1}layerVisibilityMayHaveChanged(e){return e.isOff!==void 0||e.standardFlags!==void 0}collectMissingEntitiesOnLayer(e,t,n){return this.collectMissingEntities(t,n,i=>i.layer===e&&this.shouldConvert(i))}collectMissingEntitiesForExport(e,t,n=!0){return this.collectMissingEntities(e,t,i=>this.shouldConvertForExport(i,n))}isBlockReference(e){return e instanceof pn}collectMissingEntities(e,t,n){let i=[],o=e.newIterator();for(let a of o)n(a)&&(t(a.objectId)||i.push(a));return i}},zk=(r=>(r[r.LEFT_BOTTOM=0]="LEFT_BOTTOM",r[r.LEFT_TOP=1]="LEFT_TOP",r[r.RIGHT_TOP=2]="RIGHT_TOP",r[r.RIGHT_BOTTOM=4]="RIGHT_BOTTOM",r))(zk||{}),Fz=class extends $n{constructor(e,t,n=150,i=2){super(),this.camera=e,this.renderer=t,this.gizmoCamera=new Ga(-2,2,2,-2,0,4),this.gizmoCamera.position.set(0,0,2),this.gizmoDim=n,this.gizmoPos=i,this.initialize()}initialize(){}update(){this.updateOrientation();let e=this.renderer.autoClear;this.renderer.autoClear=!1,this.renderer.clearDepth();let t=new yn;this.renderer.getViewport(t);let n=this.calculateViewportPos();this.renderer.setViewport(n.x,n.y,this.gizmoDim,this.gizmoDim),this.renderer.render(this,this.gizmoCamera),this.renderer.setViewport(t.x,t.y,t.z,t.w),this.renderer.autoClear=e}dispose(){}updateOrientation(){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()}calculatePosInViewport(e,t,n){let i=(e-n.min.x)/this.gizmoDim*2-1,o=-((t-n.min.y)/this.gizmoDim)*2+1;return{x:i,y:o}}calculateViewportPos(){let e=this.renderer.domElement,t=e.offsetWidth,n=e.offsetHeight,i=this.gizmoPos,o=this.gizmoDim,a=t-o,s=n-o;switch(i){case 0:a=0,s=0;break;case 1:a=0;break;case 4:s=0;break}return{x:a,y:s}}calculateViewportBbox(){let e=this.renderer.domElement,t=e.offsetWidth,n=e.offsetHeight,i=this.gizmoPos,o=this.gizmoDim,a=new Dy(new Le(t-o,0),new Le(t,o));switch(i){case 0:a.set(new Le(0,n-o),new Le(o,n));break;case 1:a.set(new Le(0,0),new Le(o,o));break;case 4:a.set(new Le(t-o,n-o),new Le(t,n));break}return a}};function zFe(r,e){let t=e.font||"Helvetica",n=e.fontSize||30,i=e.width||200,o=e.height||200,a=e.bgColor?e.bgColor.join(", "):"255, 255, 255, 1.0",s=e.color?e.color.join(", "):"0, 0, 0, 1.0",l=document.createElement("canvas");l.width=i,l.height=o;let c=l.getContext("2d");if(c){c.font=`bold ${n}px ${t}`,c.fillStyle=`rgba(${a})`,c.fillRect(0,0,i,o);let h=c.measureText(r).width;c.fillStyle=`rgba(${s})`,c.fillText(r,i/2-h/2,o/2+n/2-2)}let u=new wi(l);return u.minFilter=xi,u.needsUpdate=!0,u}function kF(r){let e=zFe(r,{fontSize:100,font:"Arial Narrow, sans-serif",color:[255,255,255,1],bgColor:[0,0,0,0]}),t=new Iy({map:e,transparent:!0});return new Ow(t)}zk.RIGHT_TOP;var UFe={pos:zk.LEFT_BOTTOM,size:100,hasZAxis:!0},Nz=class extends Fz{constructor(e,t,n){let i={...UFe,...n};super(e,t,i.size,n.pos),this.hasZAxis=i.hasZAxis;let o=[0,0,0,2,0,0,0,0,0,0,2,0],a=[1,0,0,1,.6,0,0,1,0,.6,1,0];this.hasZAxis&&(o.push(0,0,0,0,0,2),a.push(0,0,1,0,.6,1));let s=new ot;s.setAttribute("position",new Jt(o,3)),s.setAttribute("color",new Jt(a,3));let l=new Fi({vertexColors:!0,toneMapped:!1});this.axes=new qn(s,l),this.axes.position.set(-1,-1,-1),this.add(this.axes),this.xText=kF("X"),this.xText.position.set(1.5,-1,-1),this.add(this.xText),this.yText=kF("Y"),this.yText.position.set(-1,1.5,-1),this.add(this.yText),this.hasZAxis&&(this.zText=kF("Z"),this.zText.position.set(-1,-1,1.5),this.add(this.zText))}setLineColors(e,t){let n=new $e,i=this.axes.geometry.attributes.color.array;return n.set(e),n.toArray(i,0),n.toArray(i,3),n.set(t),n.toArray(i,6),n.toArray(i,9),this.axes.geometry.attributes.color.needsUpdate=!0,this}setTextColor(e){this.xText.material.color=e,this.yText.material.color=e}dispose(){var e,t;this.axes.geometry.dispose(),this.axes.material.dispose(),this.xText.geometry.dispose(),this.xText.material.dispose(),this.yText.geometry.dispose(),this.yText.material.dispose(),this.hasZAxis&&((e=this.zText)==null||e.geometry.dispose(),(t=this.zText)==null||t.material.dispose())}},zz=class extends X_{constructor(e,t,n,i){super(e,n,i),this._layoutBtrId=t,this._mode=js.SELECTION,this._axesGizmo=this.createAxesGizmo(),this._viewportViews=new Map,this._overlayViewport=new jC(e)}get layoutBtrId(){return this._layoutBtrId}get mode(){return this._mode}set mode(e){e==js.SELECTION?this._cameraControls.mouseButtons={MIDDLE:Ha.PAN}:e==js.PAN&&(this._cameraControls.mouseButtons={LEFT:Ha.PAN}),this._cameraControls.update(),this._mode=e}get viewportCount(){return this._viewportViews.size}get viewportViews(){return this._viewportViews.values()}get overlayViewport(){return this._overlayViewport}get internalCamera(){return this._camera.internalCamera}get viewportsBoundingBox(){if(this._viewportViews.size===0)return;let e=new ct;return this._viewportViews.forEach(t=>{let n=t.viewport.box;e.expandByPoint(n.min),e.expandByPoint(n.max)}),e.isEmpty()?void 0:e}addViewport(e){this._viewportViews.set(e.viewport.id,e)}removeViewport(e){this._viewportViews.delete(e)}resize(e,t){this._height=t,this._width=e,this._frustum=t/2,this.updateCameraFrustum(),this._viewportViews.forEach(n=>{n.update()})}render(e){var t;this._renderer.clear();let n=this._renderer.render(e.internalScene,this._camera),i=e.modelSpaceLayout;return i&&this.drawViewports(i.internalObject),this.drawOverlay(e),(t=this._axesGizmo)==null||t.update(),n}createAxesGizmo(){return new Nz(this._camera.internalCamera,this._renderer.internalRenderer,{hasZAxis:!1,pos:zk.LEFT_BOTTOM})}drawViewports(e){if(this._viewportViews.size>0){let t=this._renderer.autoClear;this._renderer.autoClear=!1;let n=new yn;this._renderer.getViewport(n),this._renderer.clearDepth();let i=e.visible;e.visible=!0,this._viewportViews.forEach(o=>{o.render(e)}),e.visible=i,this._renderer.setViewport(n.x,n.y,n.z,n.w),this._renderer.autoClear=t}}drawOverlay(e){let t=this._overlayViewport;if(!t.visible)return;t.render(e.internalScene,this._height);let n=e.modelSpaceLayout;!n||this._viewportViews.size===0||this.drawOverlayViewports(n.internalObject,t)}drawOverlayViewports(e,t){let n=t.screenRect,i=t.viewBox,o=e.visible;e.visible=!0,this._viewportViews.forEach(a=>{let s=BZ(a.viewport.box,i,n),l=eF(s,n);if(!l)return;let c=tF(l,i,n),u=new ct;u.expandByPoint(a.paperPointToModel({x:c.minX,y:c.minY})),u.expandByPoint(a.paperPointToModel({x:c.maxX,y:c.minY})),u.expandByPoint(a.paperPointToModel({x:c.maxX,y:c.maxY})),u.expandByPoint(a.paperPointToModel({x:c.minX,y:c.maxY})),!u.isEmpty()&&a.withFrozenLayersHidden(e,()=>{t.renderNested(e,u,l,l,this._height,a.viewport.viewTwistAngle)})}),e.visible=o}},E1=class{constructor(){this._activeLayoutBtrId="",this._layoutViews=new Map}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layoutViews.forEach(t=>{t.enabled=t.layoutBtrId==e})}get activeLayoutView(){return this._layoutViews.get(this._activeLayoutBtrId)}has(e){return this._layoutViews.has(e)}getAt(e){return this._layoutViews.get(e)}resize(e,t){this._layoutViews.forEach(n=>{n.resize(e,t)})}add(e){this._layoutViews.set(e.layoutBtrId,e)}render(e){var t;return((t=this.activeLayoutView)==null?void 0:t.render(e))??!1}};function jFe(r,e){return[...r].sort((t,n)=>VFe(t,n,e))}function VFe(r,e,t){let n=$Q(r)-$Q(e);if(Math.abs(n)>Number.EPSILON)return n;let i=KQ(t,r)-KQ(t,e);return Math.abs(i)>Number.EPSILON?i:0}function $Q(r){return Math.max(r.maxX-r.minX,0)*Math.max(r.maxY-r.minY,0)}function KQ(r,e){let t=r.x<e.minX?e.minX-r.x:r.x>e.maxX?r.x-e.maxX:0,n=r.y<e.minY?e.minY-r.y:r.y>e.maxY?r.y-e.maxY:0;return t*t+n*n}var OT=class h1{constructor(e){this.zoomTo=e,this.active=!1,this.userAdjusted=!1,this.programmaticDepth=0,this.incrementalEnabled=!1,this.initialPendingCount=0,this.convertedCount=0,this.lastZoomAt=0}get isActive(){return this.active}begin(e){if(this.active){this.initialPendingCount=Math.max(this.initialPendingCount,e),this.maybeEnableIncrementalFit();return}this.active=!0,this.userAdjusted=!1,this.lastZoomAt=0,this.initialPendingCount=e,this.convertedCount=0,this.lastFittedBox=void 0,this.incrementalEnabled=!1,this.maybeEnableIncrementalFit()}end(){this.active=!1,this.incrementalEnabled=!1,this.lastFittedBox=void 0,this.convertedCount=0}applyFinalFit(e){if(this.userAdjusted)return;let t=e();t&&this.applyZoom(t)}frameProgrammatically(e){this.userAdjusted||this.applyZoom(e)}onLayoutViewChanged(){!this.active||this.userAdjusted||this.programmaticDepth>0||(this.userAdjusted=!0,this.end())}afterGeometryBatch(e,t){this.active&&(this.convertedCount++,this.maybeEnableIncrementalFit(),this.maybeIncrementalFit(e))}maybeEnableIncrementalFit(){this.incrementalEnabled||(this.initialPendingCount>=h1.SMALL_ENTITY_THRESHOLD||this.convertedCount>=h1.SMALL_ENTITY_THRESHOLD)&&(this.incrementalEnabled=!0)}maybeIncrementalFit(e){if(!this.active||!this.incrementalEnabled||this.userAdjusted)return;let t=performance.now();if(t-this.lastZoomAt<h1.FIT_INTERVAL_MS)return;let n=e();!n||!this.shouldApplyIncrementalFit(n)||(this.lastZoomAt=t,this.applyZoom(n))}shouldApplyIncrementalFit(e){let t=this.lastFittedBox;if(!t)return!0;let n=this.estimateBoxArea(t);return n<=Number.EPSILON?!0:this.estimateBoxArea(e)>=n*h1.BBOX_GROWTH_RATIO}applyZoom(e,t=1.1){this.programmaticDepth++;try{this.zoomTo(e,t),this.lastFittedBox=this.snapshotFitBox(e)}finally{this.programmaticDepth--}}estimateBoxArea(e){let t=new Ut;return e.getSize(t),Math.abs(t.x)*Math.abs(t.y)}snapshotFitBox(e){return new ct({x:e.min.x,y:e.min.y},{x:e.max.x,y:e.max.y})}};OT.SMALL_ENTITY_THRESHOLD=500,OT.BBOX_GROWTH_RATIO=1.5,OT.FIT_INTERVAL_MS=2500;var GFe=OT,HFe=1e3;function WFe(r,e,t){return r||e>0?!1:t==null?!0:t>=HFe}var qQ={background:cs},oh=class Wi extends XN{constructor(e=qQ){let t={...qQ,...e},n=t.container??document.createElement("div");t.container=n,n.style.overflow="hidden",n.hasAttribute("tabindex")||(n.tabIndex=-1);let i=new hE({antialias:!0,alpha:!0});n.appendChild(i.domElement),i.domElement.style.display="block",i.domElement.style.maxWidth="100%",i.domElement.style.maxHeight="100%";let o=l3e(i.domElement,n);super(i.domElement,n),this._rafId=null,this._loadingLayouts=new Set,this._initializedLayouts=new Set,this._externallyFramedLayouts=new Set,this._convertingLayers=new Set,this._claimedConvertObjectIds=new Set,this._entityConvertGeneration=new Map,this._progressiveRendering=!1,this._convertInvisibleLayers=!1,this._cooperativeYield=!0,this._convertQueue=[],this._viewportRepairOwnerIds=new Set,this._convertDrainPromise=null,this._convertEpoch=0,this._lastProgressivePaintAt=0,this._progressivePaintUrgent=!1,this._progressiveInputPauseUntil=0,this._progressivePaintCount=0,this._progressiveYieldCount=0,this._openLineworkFramePending=!1,this._openLineworkFrameTimer=null,this._pendingGeometryJobs=0,this._deferredGeometryQueue=[],this._deferredGeometryActive=0,this._fontLoadedRedrawTimer=null,this._fontLoadedRedrawEpoch=0,this._entityProcessingIdleAt=0,this._textStyleFontPreloadEpoch=-1,this._textStyleFontPreloadPromise=null,this._viewDomAbort=new AbortController,this._viewDisposed=!1,this._readingMode=new DF({getCurrentBackgroundColor:()=>this._renderer.currentBackgroundColor,applyViewClearColor:S=>this.applyViewClearColor(S),setCompareDisplay:S=>this.setCompareDisplay(S),markDirty:()=>{this._isDirty=!0}}),this._deferredFontsReady=null,this._convertPhaseMs={finishGeometry:0,handleGroup:0,addEntity:0,awaitFonts:0},this._fontPreloadDiag=null,this.animate=()=>{var S;this._rafId=requestAnimationFrame(this.animate),this.events.renderFrame.dispatch({render:this._renderer,camera:this.internalCamera});let M=this._numOfEntitiesToProcess>0,T=M||this._pendingGeometryJobs>0,L=!this._progressiveRendering&&!this._cooperativeYield&&T;if(!this._isDirty&&!this._htmlDirty&&!T||L||!this._isDirty&&!this._htmlDirty)return;let O=this.shouldCountMidOpenPaint(M,T);if(this._isDirty&&!this._progressivePaintUrgent&&O){let z=this._progressiveRendering?Wi.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS:Wi.NON_PROGRESSIVE_OPEN_PAINT_INTERVAL_MS;if(performance.now()-this._lastProgressivePaintAt<z)return}let D=!1;this._isDirty&&(O&&(this._progressivePaintCount++,this._lastProgressivePaintAt=performance.now(),this._progressivePaintUrgent=!1),D=this._layoutViewManager.render(this._scene)),this.internalCamera&&(this._isDirty||this._htmlDirty)&&this._css2dRenderer.render(this._scene.internalScene,this.internalCamera),(S=this._stats)==null||S.update(),this._isDirty=D,this._htmlDirty=!1},this._disposeCanvasTouchCallout=o;let a=()=>this.noteProgressiveUserInput(),s=()=>{a(),this.focusViewerForShortcuts()},l=()=>{a(),this.focusViewerForShortcuts()};i.domElement.addEventListener("pointerdown",s,{capture:!0}),i.domElement.addEventListener("wheel",l,{capture:!0,passive:!0}),this._disposeProgressiveInputWatch=()=>{i.domElement.removeEventListener("pointerdown",s,{capture:!0}),i.domElement.removeEventListener("wheel",l,{capture:!0})},this._gripManager=new pN(this),this._keyHandler=new OLe(this),e.calculateSizeCallback&&this.setCalculateSizeCallback(e.calculateSizeCallback),i.setPixelRatio(Math.min(window.devicePixelRatio,2)),i.setSize(this.width,this.height),this._renderer=new RZ(i),uZ(()=>this._renderer.allocateDrawOrderZ());let c=hr.instance.fontMapping;this._renderer.setFontMapping(c),this._onFontNotFound=S=>{Gt.emit("font-not-found",{fontName:S.fontName,count:S.count??0})},this._onFontLoaded=S=>{Gt.emit("missed-data-changed",{}),this.scheduleGlyphRedrawAfterFontLoad(S?.fontName)},this._renderer.events.fontNotFound.addEventListener(this._onFontNotFound),this._renderer.events.fontLoaded.addEventListener(this._onFontLoaded),this._scene=this.createScene(),this._layerAppearance=new HT(this._scene,this._renderer),this._inheritedLayerMaterialMapper=new KF(S=>this._layerAppearance.getEffectiveLayerTraits(S),this._renderer),this.backgroundColor=t.background??cs,this._stats=this.createStats(hr.instance.isShowStats&&(Y.tryGetInstance()==null||this.isActiveManagedView()));let u=gt.instance(),h=oe.MODELBKCOLOR.toLowerCase(),d=oe.PAPERBKCOLOR.toLowerCase();this._onSysVarChanged=S=>{let M=S.name.toLowerCase();if(M===h||M===d){let T=S.database;if(!T)return;let L=this.isModelSpaceLayout(T);if(!(M===h&&L||M===d&&!L))return;this.applyCanvasBackground(uF(T,L))}},u.events.sysVarChanged.addEventListener(this._onSysVarChanged),this._onSettingsModified=S=>{S.key=="isShowStats"&&this.toggleStatsVisibility(this._stats,S.value)},hr.instance.events.modified.addEventListener(this._onSettingsModified);let p=null,f=null,m=null,g=()=>!this.editor.isActive&&!nm.getActiveInputBox()&&!RDe()&&!this._gripManager.isDragging,y=()=>this.mode===js.SELECTION&&g(),b=()=>g()&&ba().canIdleTouchBox(this.mode),v=()=>{m?.remove(),m=null},x=()=>{p=null,f=null,v()},w=(S,M)=>{f=this.viewportToCanvas({x:S,y:M}),p=this.screenToWorld(f),v(),m=document.createElement("div"),m.className="ml-jig-preview-rect",this.container.appendChild(m)},_=(S,M,T="replace")=>{if(!p||!m||!f)return;let L=this.viewportToCanvas({x:S,y:M}),O=this.screenToWorld(L),D=this.worldToScreen(p),z=this.worldToScreen(O),N=Math.min(D.x,z.x),J=Math.min(D.y,z.y),X=Math.abs(D.x-z.x),Q=Math.abs(D.y-z.y),ce=this.getSelectionMode(f,L),H=this.getSelectionPreviewStyle(ce,T);Object.assign(m.style,{left:`${N}px`,top:`${J}px`,width:`${X}px`,height:`${Q}px`,borderStyle:H.borderStyle,background:H.background}),m.style.setProperty("--line-color",H.lineColor)},A=(S,M,T,L)=>{if(!p||!f)return;let O=this.viewportToCanvas({x:S,y:M}),D=this.screenToWorld(O);if(v(),L)if(iLe(this,O.x,O.y,T))T==="replace"&&this.selectionSet.clear();else if(this.entitySelectionEnabled){let z=this.pick(D);z.length>0?(T==="replace"&&this.htmlTransientManager.deselectAll(),this.applySelection([z[0].id],T)):T==="replace"&&this.selectionSet.clear()}else T==="replace"&&this.selectionSet.clear();else{let z=new ct().expandByPoint(p).expandByPoint(D),N=this.getSelectionMode(f,O);this.entitySelectionEnabled&&this.selectByBoxWithMode(z,N,T),oLe(this,z,N,T)}p=null,f=null},E=this._viewDomAbort.signal;this.canvas.addEventListener("mousedown",S=>{S.button===0&&y()&&(Il(S)||xa()||w(S.clientX,S.clientY))},{signal:E}),this.canvas.addEventListener("mousemove",S=>{!p||!m||!f||Il(S)||xa()||_(S.clientX,S.clientY,this.getPointerSelectionAction(S))},{signal:E}),this.canvas.addEventListener("mouseup",S=>{if(this._gripManager.isDragging){x();return}if(!p||!f||Il(S)||xa())return;let M=this.viewportToCanvas({x:S.clientX,y:S.clientY}),T=this.getPointerSelectionAction(S);A(S.clientX,S.clientY,T,this.isSelectionClick(f,M))},{signal:E}),this._disposeMobileBoxGesture=BN({element:this.canvas,shouldStart:()=>b(),setNavigationEnabled:S=>{this.setNavigationEnabled(S)},onActivate:(S,M)=>{w(S,M),_(S,M)},onMove:(S,M)=>{_(S,M)},onBoxEnd:(S,M,T)=>{A(S,M,"replace",!T)},onTap:(S,M)=>{f=this.viewportToCanvas({x:S,y:M}),p=this.screenToWorld(f),A(S,M,"replace",!0)},onAbort:()=>{x()}}),this.canvas.addEventListener("dblclick",S=>{S.button===0&&y()&&this.entitySelectionEnabled&&Y.instance.curDocument.openMode===at.Write&&this.openPickedEntityEditor(S)},{signal:E}),document.addEventListener("keydown",S=>{this.isActiveManagedView()&&this.isShortcutEventInsideViewer(S)&&this._keyHandler.handleKeyDown(S)},{signal:E}),this._onLayoutSwitched=S=>{var M,T;if(!this.isActiveManagedView())return;let L=S.layout.database,O=(T=(M=Y._instance)==null?void 0:M.curDocument)==null?void 0:T.database;if(L&&O&&L!==O)return;let D=S.layout.blockTableRecordId,z=!this._initializedLayouts.has(D);this._initializedLayouts.add(D),this.activeLayoutBtrId=D,this.createLayoutViewIfNeeded(D),this.loadLayoutEntitiesIfNeeded(D),this.refreshCanvasBackgroundForActiveLayout(),this._isDirty=!0,z&&this.applyInitialZoom(D,S.layout)},Fr().layoutManager.events.layoutSwitched.addEventListener(this._onLayoutSwitched),this._css2dRenderer=new pC,this._css2dRenderer.setSize(this.width,this.height),this._css2dRenderer.domElement.style.position="absolute",this._css2dRenderer.domElement.style.top="0px",this._css2dRenderer.domElement.style.left="0px",this._css2dRenderer.domElement.style.pointerEvents="none",this._css2dRenderer.domElement.style.zIndex=String(rOe),this._css2dRenderer.domElement.style.maxWidth="100%",this._css2dRenderer.domElement.style.maxHeight="100%",n.appendChild(this._css2dRenderer.domElement),this._missedImages=new Map,this._layoutViewManager=new E1,this._progressiveOpenFit=new GFe((S,M)=>{this.activeLayoutView.zoomTo(S,M??1.1),this._isDirty=!0}),this._entityDisplay=new Bz(S=>this.resolveLayerInfo(S)),this.initialize(),this.onWindowResize(),this._isDirty=!0,this._htmlDirty=!1,this.startAnimationLoop(),this._numOfEntitiesToProcess=0,this.resetDeferredGeometryQueue()}ensureDeferredFontsReady(){if(!this._deferredFontsReady){let e=performance.now(),t=Promise.all([this.awaitPresetFontsReadySafe(),this.awaitTextStyleFontsReady()]).then(()=>{},()=>{});this._deferredFontsReady=t.then(()=>{this._convertPhaseMs.awaitFonts+=performance.now()-e})}return this._deferredFontsReady}async awaitPresetFontsReadySafe(){let e=Y;e._instance&&await e._instance.awaitPresetFontsReady()}takeConvertPhaseTimings(){let e={...this._convertPhaseMs,fontPreload:this._fontPreloadDiag?{...this._fontPreloadDiag}:void 0};return this._convertPhaseMs={finishGeometry:0,handleGroup:0,addEntity:0,awaitFonts:0},this._fontPreloadDiag=null,e}getPointerSelectionAction(e){return TDe(e)}initialize(){this.setCursor(eS.Crosshair),this._onCommandWillStartHitTest=()=>{this.htmlTransientManager.setHitTestEnabled(!1)},this._onCommandEndedHitTest=()=>{this.htmlTransientManager.setHitTestEnabled(!0)},this.editor.events.commandWillStart.addEventListener(this._onCommandWillStartHitTest),this.editor.events.commandEnded.addEventListener(this._onCommandEndedHitTest)}get mode(){let e=this.activeLayoutView;return e?e.mode:js.SELECTION}set mode(e){this.activeLayoutView.mode=e}setNavigationEnabled(e){let t=this.activeLayoutView;t&&(t.enabled=e)}setSnapLoupe(e){var t;let n=(t=this.activeLayoutView)==null?void 0:t.overlayViewport;if(n){if(!e){n.visible=!1,this._isDirty=!0;return}n.setScreenRect(e.x,e.y,e.size,e.size),n.setViewBox(e.viewBox),n.visible=!0,this._isDirty=!0}}get renderer(){return this._renderer}get gripManager(){return this._gripManager}get isDirty(){return this._isDirty}get isProcessingEntities(){return this._numOfEntitiesToProcess>0||this._pendingGeometryJobs>0}get isConvertingEntities(){return this._numOfEntitiesToProcess>0}async waitUntilIdle(e=6e4){let t=Date.now()+Math.max(0,e),n=0;for(;;){if(this.isProcessingEntities)n=0;else if(n++,n>=2)return!0;if(Date.now()>t)return!this.isProcessingEntities;await new Promise(i=>setTimeout(i,16))}}get progressiveRendering(){return this._progressiveRendering}set progressiveRendering(e){this._progressiveRendering=e,this.resetProgressiveOpenStats()}get convertInvisibleLayers(){return this._convertInvisibleLayers}set convertInvisibleLayers(e){this._convertInvisibleLayers=e}get cooperativeYield(){return this._cooperativeYield}set cooperativeYield(e){this._cooperativeYield=e}get progressiveOpenStats(){return{paintCount:this._progressivePaintCount,yieldCount:this._progressiveYieldCount}}resetProgressiveOpenStats(){this._progressivePaintCount=0,this._progressiveYieldCount=0,this._lastProgressivePaintAt=0,this._progressivePaintUrgent=!1,this._progressiveInputPauseUntil=0}isProgressiveGesturePauseActive(){return performance.now()<this._progressiveInputPauseUntil}isProgressiveDiscreteInputPending(){var e;let t=navigator.scheduling;return((e=t?.isInputPending)==null?void 0:e.call(t))===!0}noteProgressiveUserInput(){!this._progressiveRendering||this._numOfEntitiesToProcess<=0||(this._progressivePaintUrgent=!0,this._isDirty=!0,this._progressiveInputPauseUntil=performance.now()+Wi.PROGRESSIVE_INPUT_PAUSE_MS)}async progressiveYieldForInput(e,t){if(this.isProgressiveGesturePauseActive()){for(await t();performance.now()<this._progressiveInputPauseUntil;)await new Promise(n=>setTimeout(n,16));this._progressiveYieldCount++;return}if(this.isProgressiveDiscreteInputPending()){await t(),this._progressiveYieldCount++;return}e&&await e.maybeYield(t)&&this._progressiveYieldCount++}beginProgressiveOpenFit(){this._progressiveOpenFit.begin(this._numOfEntitiesToProcess)}endProgressiveOpenFit(){this._progressiveOpenFit.end()}set isDirty(e){this._isDirty=e}get isHtmlDirty(){return this._htmlDirty}set isHtmlDirty(e){this._htmlDirty=e}get missedData(){return{fonts:this._renderer.missedFonts,images:this._missedImages,xrefs:this.collectUnresolvedXrefs()}}collectUnresolvedXrefs(){var e,t;try{let n=(t=(e=Y.instance)==null?void 0:e.curDocument)==null?void 0:t.database;if(!n)return[];let i=n.tables.blockTable;return typeof i.getUnresolvedXrefs!="function"?[]:i.getUnresolvedXrefs().map(o=>({name:o.name,pathName:o.pathName,isOverlay:o.isOverlayReference}))}catch{return[]}}get center(){return this.activeLayoutView.center}set center(e){this.activeLayoutView.center=e}get backgroundColor(){return this._renderer.getClearColor()}set backgroundColor(e){this.applyCanvasBackground(e)}applyCanvasBackground(e){if(this._renderer.currentBackgroundColor=e,this._layerAppearance.refreshTextMaterialsInObjectTree(this._scene.internalScene),this._scene.repaintForegroundMaterials(Ta(e)),this._scene.repaintBackgroundMaterials(e),this.resyncForegroundLayersForBackground(),this._readingMode.isEnabled){this._readingMode.noteLayoutBackground(e),this.applyViewClearColor(aee);return}this.applyViewClearColor(e)}applyViewClearColor(e){this._renderer.setClearColor(e),this.editor.syncCursorBackground(e),this._isDirty=!0}resyncForegroundLayersForBackground(){var e;let t=this._renderer.context.database;if(t)for(let n of t.tables.layerTable.newIterator())(e=n.color)!=null&&e.isForeground&&this._layerAppearance.syncFromLiveRecord(n)}isModelSpaceLayout(e){return e?TLe(e):this.activeLayoutBtrId===this.modelSpaceBtrId}bindDrawDatabase(e){this._renderer.context.database=e}syncDisplaySysVars(e){this.bindDrawDatabase(e),this.applyCanvasBackground(uF(e,this.isModelSpaceLayout(e))),this._readingMode.reapplyIfEnabled()}get readingModeEnabled(){return this._readingMode.isEnabled}toggleReadingMode(){this._readingMode.toggle()}setReadingMode(e){this._readingMode.setEnabled(e)}async addOverlayEntities(e){let t=new YT;t.isReference=!0,t.internalObject.userData.isReference=!0,this._scene.internalScene.add(t.internalObject);for(let i of e.tables.layerTable.newIterator())t.addLayer({name:i.name,isOff:i.isOff,isFrozen:i.isFrozen,color:i.color});let n=this._renderer.context.database;this._renderer.context.database=e;try{let i=e.tables.blockTable.modelSpace;for(let o of i.newIterator())if(!(o instanceof Ba))try{let a=this.drawEntity(o,!1);if(!a)continue;a.objectId=o.objectId,a.ownerId=o.ownerId,a.layerName=o.layer,a.visible=o.visibility!==!1,a instanceof Ko&&a.isOnTheSameLayer&&(a.userData.insertLayerName=a.layerName),await this.finishEntityGeometry(a,!1),a instanceof Ko&&a.isOnTheSameLayer&&this._inheritedLayerMaterialMapper.remap(a.children,"0",a.layerName),t.addEntity(a),a.dispose()}catch(a){kt.error(`[AcTrView2d] Failed to convert overlay entity ${o.objectId} (${o.type}):`,a)}}finally{this._renderer.context.database=n}return t}refreshCanvasBackgroundForActiveLayout(){var e,t;let n=(t=(e=Y._instance)==null?void 0:e.curDocument)==null?void 0:t.database;if(!n)return;let i=this.activeLayoutBtrId===this.modelSpaceBtrId;this.applyCanvasBackground(uF(n,i))}get modelSpaceBtrId(){return this._scene.modelSpaceBtrId}set modelSpaceBtrId(e){this._scene.modelSpaceBtrId=e}get activeLayoutBtrId(){return this._scene.activeLayoutBtrId}set activeLayoutBtrId(e){let t=this._scene.activeLayoutBtrId;this._layoutViewManager.activeLayoutBtrId=e,this._scene.activeLayoutBtrId=e,this.htmlTransientManager.setActiveLayoutId(e),this._isDirty=!0,t!==e&&GIe()}get activeLayoutView(){return this._layoutViewManager.activeLayoutView}get stats(){return this._scene.stats}get cadScene(){return this._scene}async ensureEntitiesConvertedForExport(e){var t;let n=e?.includeInvisibleLayers!==!1,i=e?.includeLayouts!==!1,o=Y.instance.curDocument.database,a=[];await this.drainConvertQueue();let s=(t=o.objects)==null?void 0:t.layout;if(i&&s!=null&&s.newIterator)for(let l of s.newIterator()){let c=l.blockTableRecordId;c&&this._scene.addEmptyLayout(c)}for(let[l]of this._scene.layouts){if(!i&&l!==this._scene.modelSpaceBtrId)continue;let c=o.tables.blockTable.getIdAt(l);c&&a.push(...this._entityDisplay.collectMissingEntitiesForExport(c,u=>this.isEntityConvertScheduled(u),n))}a.length>0&&(this._numOfEntitiesToProcess+=a.length,await this.batchConvert(a,{forExport:!0})),await this.waitUntilIdle(12e4)||kt.warn("[AcTrView2d] Timed out waiting for deferred geometry before export")}get internalScene(){return this._scene.internalScene}get htmlTransientManager(){return this._scene.htmlTransientManager}get internalCamera(){var e;return(e=this.activeLayoutView)==null?void 0:e.internalCamera}set ltscale(e){this._renderer.ltscale=e}set celtscale(e){this._renderer.celtscale=e}screenToWorld(e){let t=this.activeLayoutView;return t?t.screenToWorld(e):new Z(e)}worldToScreen(e){let t=this.activeLayoutView;return t?t.worldToScreen(e):new Z(e)}zoomTo(e,t=1.1){this.activeLayoutView.zoomTo(e,t),this._isDirty=!0}rerenderPoints(e,t=0){let n=this._scene.activeLayout;n&&(n.rerenderPoints(e,t),this._isDirty=!0)}requestOpenLineworkFrame(){this._openLineworkFramePending=!0,this.scheduleOpenLineworkFrame()}cancelOpenLineworkFrame(){this._openLineworkFramePending=!1,this._openLineworkFrameTimer!=null&&(clearTimeout(this._openLineworkFrameTimer),this._openLineworkFrameTimer=null)}scheduleOpenLineworkFrame(){if(this._openLineworkFrameTimer!=null||!this._openLineworkFramePending)return;let e=this.isConvertingEntities?50:0;this._openLineworkFrameTimer=setTimeout(()=>{if(this._openLineworkFrameTimer=null,!!this._openLineworkFramePending){if(this.isConvertingEntities){this.scheduleOpenLineworkFrame();return}this.frameOpenLineworkIfReady()}},e)}zoomToFitDrawing(e=0,t){new m1(()=>!this.isProcessingEntities,()=>{if(t&&this._externallyFramedLayouts.delete(t)){this.endProgressiveOpenFit();return}this._progressiveOpenFit.applyFinalFit(()=>this.getDrawingExtents()),this.endProgressiveOpenFit();let n=t??this.activeLayoutBtrId;n&&b1.rememberOriginalView(this,n)},300,e).start()}zoomToFitLayer(e){let t=this._scene.activeLayout;if(t){let n=t.getLayer(e);if(n&&!n.box.isEmpty()){let i=YQ.threeBox3dToGeBox2d(n.box);return this.zoomTo(i),this._isDirty=!0,!0}}return!1}zoomToSmartExtents(e=0){return new Promise((t,n)=>{new m1(()=>!this.isProcessingEntities,()=>{(async()=>{try{let i=await this.resolveSmartFitBox();if(i){this.zoomTo(i),this._isDirty=!0,this.endProgressiveOpenFit(),t();return}this._progressiveOpenFit.applyFinalFit(()=>this.getDrawingExtents()),this.endProgressiveOpenFit(),t()}catch(i){this.endProgressiveOpenFit(),n(i)}})()},300,e).start()})}async resolveSmartFitBox(){let e=this._scene.activeLayout;if(!e)return;let t=e.cachedSmartExtents;if(t)return t;let n=e.smartExtentsGeneration,i=new GT,o=await e.collectSpatialExtentBoxesAsync(i),a=await NLe(o,i);return e.smartExtentsGeneration!==n?e.cachedSmartExtents:(a&&(e.cachedSmartExtents=a),a)}flyTo(e,t){this.activeLayoutView.flyTo(e,t),this._isDirty=!0}async openPickedEntityEditor(e){let t=this.viewportToCanvas({x:e.clientX,y:e.clientY}),n=this.screenToWorld(t),i=this.pick(n,void 0,!0);if(!i.length)return;let o=Y.instance.curDocument.database.tables.blockTable.getEntityById(i[0].id);if(!o)return;let a=this.resolveAttributedBlockReference(o);if(a){e.preventDefault(),this.selectionSet.clear(),this.selectionSet.add(a.objectId),Y.instance.sendStringToExecute("attedit");return}o instanceof Ro&&(e.preventDefault(),await this.editMTextEntity(o))}resolveAttributedBlockReference(e){if(e instanceof pn)return e.attributeIterator().count>0?e:void 0;if(e instanceof Zl||e.type==="Attrib"||e.type==="Attribute"){let t=Y.instance.curDocument.database.tables.blockTable.getEntityById(e.ownerId);if(t instanceof pn&&t.attributeIterator().count>0)return t}}async editMTextEntity(e){let t=e.database;e.lineSpacingFactor!==nm.defaultLineSpacingFactor&&im(t,"Edit MText",()=>{let o=t.openEntityForWrite(e);o instanceof Ro&&(o.lineSpacingFactor=nm.defaultLineSpacingFactor)}),this._isDirty=!0;let n=new nm,i=!1;try{let o=await n.open({view:this,location:e.location,width:this.resolveMTextEditorWidth(e),textHeight:this.resolveMTextEditorTextHeight(e),initialText:e.contents,initialAttachmentPoint:e.attachmentPoint,toolbarFontFamilies:await this.getMTextToolbarFontFamilies()});if(!o)return;im(t,"Edit MText",()=>{let a=t.openEntityForWrite(e);a instanceof Ro&&(a.location=o.location,a.contents=o.contents,a.width=o.width,a.height=o.height,a.lineSpacingFactor=o.lineSpacingFactor,a.attachmentPoint=o.attachmentPoint)}),i=!0}finally{i||(this.updateEntity(e),this._isDirty=!0)}}resolveMTextEditorWidth(e){let t=Number(e.width);return Number.isFinite(t)&&t>0?t:1e-4}resolveMTextEditorTextHeight(e){let t=Number(e.height);return Number.isFinite(t)&&t>0?t:this.pixelsToWorldY(24)}pixelsToWorldY(e){let t=this.screenToWorld({x:0,y:0}),n=this.screenToWorld({x:0,y:e});return Math.max(Math.abs(n.y-t.y),1e-4)}async getMTextToolbarFontFamilies(){let e=await Y.instance.getAvaiableFonts()??[];return Array.from(new Set(e.flatMap(t=>t.name).map(t=>t.trim()).filter(t=>t.length>0)))}pick(e,t,n){e==null&&(e=this.curPos);let i=[],o=this._scene.activeLayout;if(!o)return i;let a=this.activeLayoutView,s=t??this.selectionBoxSize,l=a.pointToBox(e,s),c=Math.max(l.size.width/2,l.size.height/2),u=a.layoutBtrId!==this._scene.modelSpaceBtrId,h=(l.size.width+l.size.height)/2,d=[],p=new Set;if(u)for(let y of a.viewportViews)y.containsPaperPoint(e)&&!y.isNearPaperBorder(e,h)&&(d.push(y),p.add(y.viewport.id));let f=this._scene.search(l),m=a.resetRaycaster(e,c);f.forEach(y=>{p.has(y.id)||WT(y)&&o.isIntersectWith(y.id,m)&&i.push(y)}),d.length>0&&this.pickThroughViewports(e,l,d,i);let g=jFe(i,e);return n?g.slice(0,1):g}getViewportCoordinateMapper(e){var t;let n;for(let i of((t=this.activeLayoutView)==null?void 0:t.viewportViews)??[])if(i.viewport.id===e){n=i;break}if(n)return{paperToModel:i=>n.paperPointToModel(i),modelToPaper:i=>n.modelPointToPaper(i),containsPaperPoint:i=>n.containsPaperPoint(i)}}pickThroughViewports(e,t,n,i){let o=this._scene.modelSpaceLayout;if(!o)return;let a=(t.size.width+t.size.height)/4;for(let s of n){let l=s.paperPointToModel(e),c=a*s.paperToModelScale;if(c<=0)continue;let u=new ct().setFromPoints([new Z(l.x-c,l.y-c),new Z(l.x+c,l.y+c)]),h=s.resetRaycaster(l,c);o.search(u).forEach(d=>{WT(d)&&o.isIntersectWith(d.id,h)&&i.push({...d,viewportId:s.viewport.id})})}}search(e,t){return this._scene.search(e,t)}select(e){let t=[];this.pick(e).forEach(n=>t.push(n.id)),t.length>0&&this.selectionSet.add(t)}selectByBox(e){this.selectByBoxWithMode(e,"crossing","add")}refineCrossingSelectionHits(e,t){var n;let i=(n=Y.instance.curDocument)==null?void 0:n.database;if(!i)return t.map(a=>a.id);let o=[];for(let a of t){if(!ODe(a)){o.push(a.id);continue}let s=new ct({x:a.minX,y:a.minY},{x:a.maxX,y:a.maxY});if(e.containsBox(s)){o.push(a.id);continue}let l=i.tables.blockTable.getEntityById(a.id);(!l||LDe(l,e))&&o.push(a.id)}return o}addLayer(e){this._scene.addLayer(this.toLayerInfo(e)),this._layerAppearance.syncFromLiveRecord(e),this._isDirty=!0}updateLayer(e,t){let{touchedObjectIds:n}=this._scene.updateLayer(this.toLayerInfo(e));if(this._layerAppearance.layerStyleMayHaveChanged(t)&&this._layerAppearance.syncFromLiveRecord(e),this._entityDisplay.layerVisibilityMayHaveChanged(t)){let i=this.toLayerInfo(e);(O1.isLayerVisible(i)||!i.isFrozen)&&this.convertMissingEntitiesOnLayer(e.name)}for(let i of n)this.applySessionHiddenObjectState(i);this._isDirty=!0}addTransientEntity(e){let t=Array.isArray(e)?e:[e],n=this._convertEpoch,i=this._renderer.forceShowLineWeight;this._renderer.forceShowLineWeight=!0;try{for(let o=0;o<t.length;++o){let a=t[o],s=this.drawEntity(a,!0);s&&(s.objectId=a.objectId,s.asyncDraw().then(()=>{if(n!==this._convertEpoch){s.dispose();return}this._scene.addTransientEntity(s),this._isDirty=!0}).catch(l=>{kt.error("[AcTrView2d] Transient entity geometry failed:",l),s.dispose()}))}}finally{this._renderer.forceShowLineWeight=i}}removeTransientEntity(e){this._scene.removeTransientEntity(e),this._isDirty=!0}setTransientEntityVisible(e,t){this._scene.setTransientEntityVisible(e,t)&&(this._isDirty=!0)}canCreateEntityPreview(e){return this._scene.canCreatePreview(e)}createEntityPreview(e){let t=this._scene.createPreview(e);return t&&(this._isDirty=!0),t}updateEntityPreview(e,t){this._scene.updatePreview(e,Vf.createMatrix4(t))&&(this._isDirty=!0)}removeEntityPreview(e){this._scene.removePreview(e)&&(this._isDirty=!0)}updateTransientPreviewTransforms(e){let t=this._scene.updateTransientPreviewTransforms(e.map(n=>({objectId:n.objectId,matrix:Vf.createMatrix4(n.matrix)})));t.webgl&&(this._isDirty=!0),t.html&&(this._htmlDirty=!0)}addEntity(e){var t;let n=Array.isArray(e)?e:[e];for(let i=0;i<n.length;i++){let o=(t=n[i])==null?void 0:t.ownerId;if(!o)continue;let a=this._scene.layouts.get(o);a||(this._scene.addEmptyLayout(o),a=this._scene.layouts.get(o)),a&&!a.isLoaded&&(a.isLoaded=!0)}this._numOfEntitiesToProcess+=n.length,this._convertQueue.push(...n),this.drainConvertQueue()}removeEntity(e){(Array.isArray(e)?e:[e]).forEach(t=>this._scene.removeEntity(t.objectId)),this._isDirty=!0}hasEntity(e){return this._scene.hasEntity(e)}isEntityConvertScheduled(e){let t=String(e??"");return t?this.hasEntity(e)||this._claimedConvertObjectIds.has(t):!1}getEntityVisible(e){return this._scene.getEntityVisible(e)}updateEntityVisibility(e){return this._scene.setEntityVisible(e.objectId,e.visibility)?(this._isDirty=!0,!0):!1}setEntitySceneVisible(e,t){return this._scene.setEntityVisible(e,t)?(this._isDirty=!0,!0):!1}applySessionHiddenObjectState(e){Y.instance.curDocument.isObjectHidden(e)&&this._scene.setEntityVisible(e,!1)}updateEntity(e){let t=this.resolveSceneUpdateEntities(Array.isArray(e)?e:[e]);if(t.length===0)return;let n=t.map(i=>i.objectId).filter(i=>this.selectionSet.has(i));for(let i=0;i<t.length;++i){let o=t[i],a=String(o.objectId??"");a&&(this._entityConvertGeneration.set(a,(this._entityConvertGeneration.get(a)??0)+1),this._claimedConvertObjectIds.delete(a)),this._scene.hasEntity(o.objectId)&&this._scene.removeEntity(o.objectId)}(async()=>(await this.batchConvert(t),await this.waitUntilDeferredGeometryIdle(),n.length>0&&this.highlight(n),this._gripManager.refresh(),this._isDirty=!0))(),this._isDirty=!0,setTimeout(()=>{this._isDirty=!0},100)}resolveSceneUpdateEntities(e){var t;let n=(t=Y.instance.curDocument)==null?void 0:t.database,i=[],o=new Set;for(let a of e){let s=a;if(a instanceof Zl){let l=n?.tables.blockTable.getEntityById(a.ownerId);if(!(l instanceof pn))continue;s=l}o.has(s.objectId)||(o.add(s.objectId),i.push(s))}return i}addLayout(e){this._scene.addEmptyLayout(e.blockTableRecordId),this.createLayoutViewIfNeeded(e.blockTableRecordId),this._isDirty=!0}markLayoutAsInitialized(e){this._initializedLayouts.add(e),this._externallyFramedLayouts.add(e)}isLayoutInitialized(e){return this._initializedLayouts.has(e)}getDrawingExtents(){let e=this._scene.box;if(e&&!e.isEmpty())return YQ.threeBox3dToGeBox2d(e)}applyInitialZoom(e,t){new m1(()=>!this.isProcessingEntities,()=>{if(this._externallyFramedLayouts.delete(e))return;let n=t.limits,i=this._layoutViewManager.getAt(e),o=i?.viewportsBoundingBox,a=!n||n.isEmpty()?!1:o?n.min.x<=o.min.x&&n.min.y<=o.min.y&&n.max.x>=o.max.x&&n.max.y>=o.max.y:!0;if(n&&!n.isEmpty()&&a)this.zoomTo(n);else if(o)this.zoomTo(o);else if(t.extents&&!t.extents.isEmpty()){let s=t.extents;this.zoomTo(new ct({x:s.min.x,y:s.min.y},{x:s.max.x,y:s.max.y}))}else{let s=this.getDrawingExtents();s&&this.zoomTo(s)}this._isDirty=!0,b1.rememberOriginalView(this,e)},300,0).start()}abortConversion(){this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.cancelOpenLineworkFrame(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0}clear(){this.abortConversion(),this._scene.clear(),this._renderer.resetDrawOrderZ(),this._isDirty=!0,this._missedImages.clear(),this._initializedLayouts.clear(),this._externallyFramedLayouts.clear(),this._loadingLayouts.clear(),this._renderer.dispose(),Nr.instance.clear(),Gt.emit("missed-data-changed",{})}captureSessionState(){return{scene:this._scene,layoutViewManager:this._layoutViewManager,initializedLayouts:this._initializedLayouts,externallyFramedLayouts:this._externallyFramedLayouts,loadingLayouts:this._loadingLayouts,missedImages:this._missedImages,missedFonts:this._renderer.snapshotMissedFonts(),selectionIds:this.selectionSet.ids}}restoreSessionState(e){this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.cancelOpenLineworkFrame(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0,this._scene=e.scene,this._layoutViewManager=e.layoutViewManager,this._initializedLayouts=e.initializedLayouts,this._externallyFramedLayouts=e.externallyFramedLayouts,this._loadingLayouts=e.loadingLayouts,this._missedImages=e.missedImages,this._renderer.replaceMissedFonts(e.missedFonts??{}),this.rebindLayerAppearance(),this._layoutViewManager.resize(this.width,this.height),this.selectionSet.clear(),e.selectionIds.length>0&&this.selectionSet.add(e.selectionIds),this._isDirty=!0,Gt.emit("missed-data-changed",{})}beginNewSession(){let e=this.captureSessionState();return this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.cancelOpenLineworkFrame(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0,this._scene=this.createScene(),this._layoutViewManager=new E1,this._initializedLayouts=new Set,this._externallyFramedLayouts=new Set,this._loadingLayouts=new Set,this._missedImages=new Map,this._renderer.clearMissedFonts(),this.rebindLayerAppearance(),this.selectionSet.clear(),this._isDirty=!0,Gt.emit("missed-data-changed",{}),e}disposeSessionState(e){e.scene.clear(),e.layoutViewManager=new E1,e.initializedLayouts.clear(),e.externallyFramedLayouts.clear(),e.loadingLayouts.clear(),e.missedImages.clear(),e.missedFonts={},e.selectionIds=[]}rebindLayerAppearance(){this._layerAppearance=new HT(this._scene,this._renderer)}isActiveManagedView(){var e;let t=(e=Y._instance)==null?void 0:e.curView;return t!=null&&t===this}focusViewerForShortcuts(){let e=document.activeElement;e instanceof Node&&this.container.contains(e)||e instanceof HTMLElement&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)||this.container.focus({preventScroll:!0})}isShortcutEventInsideViewer(e){let t=e.target;if(t instanceof Node&&this.container.contains(t))return!0;let n=document.activeElement;return n instanceof Node&&this.container.contains(n)}async drainConvertQueue(){if(this._convertDrainPromise){await this._convertDrainPromise,this._convertQueue.length>0&&await this.drainConvertQueue();return}this._convertDrainPromise=this.runConvertDrain().finally(()=>{this._convertDrainPromise=null}),await this._convertDrainPromise}async runConvertDrain(){let e=this._convertEpoch,t=this._cooperativeYield,n=t?this.activeLayoutBtrId===this.modelSpaceBtrId?Wi.CONVERT_SLICE_MAX:1:Number.POSITIVE_INFINITY,i=performance.now(),o=RFe(this._convertQueue.splice(0,this._convertQueue.length),this.activeLayoutBtrId);for(this.repairViewportViewsFor(o.activeOwnerId);o.cursor<o.pending.length||this._convertQueue.length>0;){if(this._convertEpoch!==e)return;let a=this._convertQueue.splice(0,this._convertQueue.length),s=this.activeLayoutBtrId,l=s!==o.activeOwnerId;if(o=BFe(o,a,s),l&&(this.repairViewportViewsFor(s),t&&(n=1)),this.flushViewportViewRepairs(),o.cursor>=o.pending.length)break;let c=Math.min(o.pending.length,o.cursor+n),u=performance.now();if(await this.batchConvert(o.pending.slice(o.cursor,c)),o.cursor=c,this._convertEpoch!==e)return;if(!t)continue;let h=performance.now()-u,d=o.activeOwnerId===this.modelSpaceBtrId,p=this._progressiveRendering?Wi.PROGRESSIVE_OPEN_YIELD_BUDGET_MS:Wi.OPEN_CONVERT_YIELD_BUDGET_MS,f=d?p:Wi.CONVERT_SLICE_BUDGET_MS;if(n=NFe({slice:n,tookMs:h,budgetMs:f,maxSlice:Wi.CONVERT_SLICE_MAX,activeLayoutPending:!d&&FFe(o)}),this._progressiveRendering&&this.isProgressiveGesturePauseActive()){for(await new Promise(m=>setTimeout(m,0));performance.now()<this._progressiveInputPauseUntil;)await new Promise(m=>setTimeout(m,16));if(i=performance.now(),this._convertEpoch!==e)return}else if(this._progressiveRendering&&this.isProgressiveDiscreteInputPending()){if(await new Promise(m=>setTimeout(m,0)),i=performance.now(),this._convertEpoch!==e)return}else if(performance.now()-i>=f&&(await new Promise(m=>setTimeout(m,0)),i=performance.now(),this._convertEpoch!==e))return}this.repairViewportViewsFor(this.activeLayoutBtrId),this.flushViewportViewRepairs()}repairViewportViewsFor(e){var t;if(!e||e===this.modelSpaceBtrId)return;let n=this._layoutViewManager.getAt(e);if(!n||n.viewportCount>0){n&&n.viewportCount>0&&this._viewportRepairOwnerIds.delete(e);return}try{let i=(t=Y.instance.curDocument)==null?void 0:t.database,o=i?.tables.blockTable.getIdAt(e);if(!o)return;let a=n.viewportCount;this.ensureViewportViews(o,n),n.viewportCount>a&&(this._isDirty=!0),this._viewportRepairOwnerIds.delete(e)}catch(i){kt.error("[AcTrView2d] Error repairing viewport views:",i)}}flushViewportViewRepairs(){if(this._viewportRepairOwnerIds.size===0)return;let e=Array.from(this._viewportRepairOwnerIds);for(let t=0;t<e.length;t++)this.repairViewportViewsFor(e[t])}markProgressiveDirty(e=!1){let t=performance.now();(e||t-this._lastProgressivePaintAt>=Wi.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS)&&(this._isDirty=!0)}markInteractiveOpenDirty(){this._progressiveRendering||!this._cooperativeYield||(this._isDirty=!0)}shouldCountMidOpenPaint(e,t){return this._progressiveRendering&&e||!this._progressiveRendering&&this._cooperativeYield&&t}highlight(e){this.entitySelectionEnabled&&(this._isDirty=this._scene.select(e))}unhighlight(e){this._isDirty=this._scene.unselect(e)}setCompareDisplay(e,t){var n,i,o,a;let s=e.baseColor??((n=e.colors)==null?void 0:n.unchanged)??10265519,l={enabled:e.enabled,baseColor:s,colors:{deleted:(i=e.colors)==null?void 0:i.deleted,added:(o=e.colors)==null?void 0:o.added,modified:(a=e.colors)==null?void 0:a.modified},overrides:e.overrides};t?t.setCompareDisplay(l):this._scene.setCompareDisplay(l),this._isDirty=!0}stopAnimationLoop(){this._rafId!=null&&(cancelAnimationFrame(this._rafId),this._rafId=null)}dispose(){var e,t,n;if(this._viewDisposed)return;this._viewDisposed=!0,this.abortConversion(),(e=this._disposeCanvasTouchCallout)==null||e.call(this),this._disposeCanvasTouchCallout=void 0,(t=this._disposeProgressiveInputWatch)==null||t.call(this),this._disposeProgressiveInputWatch=void 0,(n=this._disposeMobileBoxGesture)==null||n.call(this),this._disposeMobileBoxGesture=void 0,this._viewDomAbort.abort(),this._onFontNotFound&&this._renderer.events.fontNotFound.removeEventListener(this._onFontNotFound),this._onFontLoaded&&this._renderer.events.fontLoaded.removeEventListener(this._onFontLoaded),this._onSysVarChanged&&gt.instance().events.sysVarChanged.removeEventListener(this._onSysVarChanged),this._onSettingsModified&&hr.instance.events.modified.removeEventListener(this._onSettingsModified),this._onLayoutSwitched&&Fr().layoutManager.events.layoutSwitched.removeEventListener(this._onLayoutSwitched),this._onCommandWillStartHitTest&&this.editor.events.commandWillStart.removeEventListener(this._onCommandWillStartHitTest),this._onCommandEndedHitTest&&this.editor.events.commandEnded.removeEventListener(this._onCommandEndedHitTest),this._gripManager.dispose(),this.clearFontLoadedRedrawTimer(),this.cancelOpenLineworkFrame(),this.stopAnimationLoop(),this.selectionSet.clear(),this.htmlTransientManager.dispose(),this._scene.clear(),this._renderer.dispose(),Nr.instance.clear();let i=this._renderer.internalRenderer;i.dispose(),i.forceContextLoss(),this.canvas.remove(),this._css2dRenderer.domElement.remove(),this._stats.dom.remove(),super.dispose()}onHover(e){this.entitySelectionEnabled&&(this._isDirty=this._scene.hover([e]))}onUnhover(e){this._isDirty=this._scene.unhover([e])}createScene(){return new QF}createStats(e){let t=new FZ;document.body.appendChild(t.dom);let n=t.dom;return n.style.position="fixed",n.style.inset="unset",n.style.bottom="30px",n.style.right="0px",this.toggleStatsVisibility(t,e),t}onWindowResize(){this.refreshViewSize(),this._renderer.setSize(this.width,this.height),this._css2dRenderer.setSize(this.width,this.height),this._layoutViewManager.resize(this.width,this.height),this._isDirty=!0,this.events.viewResize.dispatch({width:this.width,height:this.height}),this.events.viewChanged.dispatch()}startAnimationLoop(){this._rafId==null&&(this._rafId=requestAnimationFrame(this.animate))}createLayoutViewIfNeeded(e){let t=this._layoutViewManager.getAt(e);return t==null&&(t=new zz(this._renderer,e,this.width,this.height),t.events.viewChanged.addEventListener(()=>{this._progressiveOpenFit.onLayoutViewChanged(),this._isDirty=!0,this._progressiveRendering&&this._numOfEntitiesToProcess>0&&(this._progressivePaintUrgent=!0),this.events.viewChanged.dispatch(),this.clearHover()}),this._layoutViewManager.add(t)),this.flushViewportViewRepairs(),t}loadLayoutEntitiesIfNeeded(e){try{let t=Y.instance.curDocument.database.tables.blockTable.getIdAt(e);if(!t)return;let n=this._scene.layouts.get(e);if(n&&n.isLoaded){this.repairViewportViewsFor(e);return}if(this._loadingLayouts.has(e))return;if(this.repairViewportViewsFor(e),n&&n.entityCount>0){n.isLoaded=!0;return}n||this._scene.addEmptyLayout(e);let i=[],o=t.newIterator();for(let a of o)i.push(a);if(i.length===0){let a=this._scene.layouts.get(e);a&&(a.isLoaded=!0);return}this._loadingLayouts.add(e),this._numOfEntitiesToProcess+=i.length,(async()=>{try{this._progressiveRendering?(this._convertQueue.push(...i),await this.drainConvertQueue()):await this.batchConvert(i);let a=this._scene.layouts.get(e);a&&(a.isLoaded=!0)}finally{this._loadingLayouts.delete(e)}})()}catch(t){kt.error("[AcTrView2d] Error loading layout entities:",t)}}toggleStatsVisibility(e,t){t?e.dom.style.display="block":e.dom.style.display="none"}toLayerInfo(e){return{name:e.name,isFrozen:e.isFrozen,isOff:e.isOff,color:e.color}}resolveLayerInfo(e){let t=Y.instance.curDocument.database.tables.layerTable.getAt(e);return t?this.toLayerInfo(t):void 0}async convertMissingEntitiesOnLayer(e){if(!this._convertingLayers.has(e)){this._convertingLayers.add(e);try{let t=Y.instance.curDocument.database.tables.blockTable.getIdAt(this.activeLayoutBtrId);if(!t)return;let n=this._entityDisplay.collectMissingEntitiesOnLayer(e,t,i=>this.hasEntity(i));if(n.length===0)return;this._numOfEntitiesToProcess+=n.length,await this.batchConvert(n)}finally{this._convertingLayers.delete(e)}}}drawEntity(e,t){return e.worldDraw(this._renderer,t)}startTextStyleFontPreload(e){var t,n;let i=this._convertEpoch;if(this._textStyleFontPreloadEpoch===i&&this._textStyleFontPreloadPromise)return;this._textStyleFontPreloadEpoch=i;let o=xFe(e),a=et.instance.getFontsToLoad(),s=[...et.instance.defaultFonts][0],l=wFe(o,a,{firstDefaultFont:s}),c=Yo.getInstance().getRenderMode()==="worker"?"worker":"main",u=Y,h=(n=(t=u._instance)==null?void 0:t.lastPresetFontsForOpen)!=null&&n.length?[...u._instance.lastPresetFontsForOpen]:[...a];if(this._fontPreloadDiag={critical:[...l.critical],workerWarm:[],background:[],preset:h,workerSkipped:0,parseSite:c},c==="worker"){this._textStyleFontPreloadPromise=Promise.resolve();return}let d=3e4;if(l.critical.length===0){this._textStyleFontPreloadPromise=Promise.resolve();return}let p=et.instance.requestFonts(l.critical);this._textStyleFontPreloadPromise=new Promise(f=>{let m=setTimeout(()=>{f()},d);p.then(()=>{clearTimeout(m),f()},()=>{clearTimeout(m),f()})})}async awaitTextStyleFontsReady(){if(!this._textStyleFontPreloadPromise){let e=this._renderer.context.database;if(e)this.startTextStyleFontPreload(e);else return}await this._textStyleFontPreloadPromise}async finishEntityGeometry(e,t){let n=performance.now();try{let i=e instanceof Ko,o=i&&this.groupHasPendingGlyphGeometry(e);if((o||Ic(e)||e instanceof $o&&!e.hasDrawableGeometry())&&await this.ensureDeferredFontsReady(),i){if(!o)return;await e.asyncDraw();return}if(Ic(e)){await e.asyncDraw();return}if(e.hasDrawableGeometry())return;await e.asyncDraw()}finally{this._convertPhaseMs.finishGeometry+=performance.now()-n}}needsDeferredFontGeometry(e){return e instanceof $o?!e.hasDrawableGeometry():e instanceof Ko?this.groupHasPendingGlyphGeometry(e):Ic(e)}clearFontLoadedRedrawTimer(){this._fontLoadedRedrawTimer!=null&&(clearTimeout(this._fontLoadedRedrawTimer),this._fontLoadedRedrawTimer=null)}scheduleGlyphRedrawAfterFontLoad(e){this.clearFontLoadedRedrawTimer();let t=this._convertEpoch;this._fontLoadedRedrawTimer=setTimeout(()=>{this._fontLoadedRedrawTimer=null,t===this._convertEpoch&&this.redrawGlyphEntitiesAfterFontLoad(t,e)},50)}async redrawGlyphEntitiesAfterFontLoad(e,t){var n,i;if(e!==this._convertEpoch)return;let o=++this._fontLoadedRedrawEpoch,a=[];for(let c of this._scene.layouts.values())c.layers.forEach(u=>{u.internalObject.traverse(h=>{h instanceof $o&&a.push(h)})});for(let c of a){if(e!==this._convertEpoch||o!==this._fontLoadedRedrawEpoch)return;await c.asyncDraw()}if(a.length>0){e===this._convertEpoch&&(this._isDirty=!0);return}if(t){let c=et.instance.defaultFonts,u=t.toLowerCase();if(c.has(t)||c.has(u)||[...c].some(h=>h.toLowerCase()===u))return}if(e!==this._convertEpoch||o!==this._fontLoadedRedrawEpoch||this._entityProcessingIdleAt<=0)return;let s=performance.now()-this._entityProcessingIdleAt;if(!WFe(this.isProcessingEntities,0,s))return;let l=(i=(n=Y.instance)==null?void 0:n.curDocument)==null?void 0:i.database;l&&l.regen()}groupHasPendingGlyphGeometry(e){for(let t of e.getSourceEntities())if(t instanceof $o&&!t.hasDrawableGeometry())return!0;return Wi.directChildrenHavePendingGlyphs(e)}static directChildrenHavePendingGlyphs(e){let t=e.children;for(let n=0;n<t.length;n++){let i=t[n];if(i instanceof $o){if(!i.hasDrawableGeometry())return!0;continue}if(i instanceof Ko){for(let o of i.getSourceEntities())if(o instanceof $o&&!o.hasDrawableGeometry())return!0;if(Wi.directChildrenHavePendingGlyphs(i))return!0;continue}if(i instanceof Wn&&Wi.directChildrenHavePendingGlyphs(i))return!0}return!1}enqueueDeferredGeometry(e,t){t===this._convertEpoch&&(this._pendingGeometryJobs++,this._deferredGeometryQueue.push({run:e,epoch:t}),this.pumpDeferredGeometryQueue())}pumpDeferredGeometryQueue(){for(;this._deferredGeometryActive<Wi.DEFERRED_GEOMETRY_CONCURRENCY&&this._deferredGeometryQueue.length>0;){let e=this._deferredGeometryQueue.shift();if(e.epoch!==this._convertEpoch){this._pendingGeometryJobs=Math.max(0,this._pendingGeometryJobs-1);continue}this._deferredGeometryActive++,e.run().then(()=>{e.epoch===this._convertEpoch&&(this._progressiveRendering||this._cooperativeYield)&&(this._isDirty=!0)}).catch(t=>{kt.error("[AcTrView2d] Deferred entity geometry failed:",t)}).finally(()=>{this._deferredGeometryActive=Math.max(0,this._deferredGeometryActive-1),e.epoch===this._convertEpoch&&(this._pendingGeometryJobs=Math.max(0,this._pendingGeometryJobs-1),this._pendingGeometryJobs===0&&(this._isDirty=!0),this.stampEntityProcessingIdle()),this.pumpDeferredGeometryQueue()})}}resetDeferredGeometryQueue(){this._deferredGeometryQueue.length=0,this._pendingGeometryJobs=0,this._textStyleFontPreloadPromise=null,this._textStyleFontPreloadEpoch=-1,this._deferredFontsReady=null,this._fontPreloadDiag=null}async waitUntilDeferredGeometryIdle(){let e=this._convertEpoch;for(;e===this._convertEpoch&&this._pendingGeometryJobs>0;)await new Promise(t=>setTimeout(t,0))}attachViewportView(e){if(xd.isDefaultPaperSpaceViewport(e))return;let t=e.ownerId,n=t?this._layoutViewManager.getAt(t):void 0;if(!n){t&&this._viewportRepairOwnerIds.add(t);return}n.addViewport(new xd(n,this.toGiViewportWithFrozenLayers(e),this._renderer)),this._isDirty=!0}ensureViewportViews(e,t){let n=e.newIterator();for(let i of n){if(!(i instanceof Ba)||xd.isDefaultPaperSpaceViewport(i))continue;let o=new xd(t,this.toGiViewportWithFrozenLayers(i),this._renderer);t.addViewport(o)}}toGiViewportWithFrozenLayers(e){var t;let n=e.toGiViewport();if(n.frozenLayers&&n.frozenLayers.length>0)return n;let i=e.frozenLayerIds;if(!(i!=null&&i.length))return n;let o=[],a=(t=e.database)==null?void 0:t.tables.layerTable;if(a)for(let s of i){let l=a.getIdAt(s);l&&o.push(l.name)}return n.frozenLayerIds=[...i],n.frozenLayers=o,n}async batchConvert(e,t={}){let n=this._convertEpoch;if(!t.forExport&&!this._textStyleFontPreloadPromise){let l=this._renderer.context.database;l&&this.startTextStyleFontPreload(l)}let i=this._progressiveRendering&&!t.forExport,o=i?Wi.PROGRESSIVE_OPEN_YIELD_BUDGET_MS:Wi.OPEN_CONVERT_YIELD_BUDGET_MS,a=t.forExport||!this._cooperativeYield?void 0:new $s(o),s=()=>new Promise(l=>setTimeout(l,0));for(let l=0;l<e.length;++l){let c=e[l];try{if(n!==this._convertEpoch||c instanceof Ba&&xd.isDefaultPaperSpaceViewport(c)||!(t.forExport||this._convertInvisibleLayers?this._entityDisplay.shouldConvertForExport(c):this._entityDisplay.shouldConvert(c)))continue;let u=String(c.objectId??""),h=0;if(u&&(this.hasEntity(u)||this._claimedConvertObjectIds.has(u))){c instanceof Ba&&this.attachViewportView(c);continue}u&&(this._claimedConvertObjectIds.add(u),h=this._entityConvertGeneration.get(u)??0);let d=DLe(c,this._renderer);if(d){let f=!1,m=!1;try{u&&(this._entityConvertGeneration.get(u)??0)!==h?m=!0:(f=this._scene.addDirectEntity(d,RLe(c)),f&&(this.applySessionHiddenObjectState(c.objectId),i?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents(),l)):this.markInteractiveOpenDirty()))}finally{d.geometry.dispose()}if(m||f)continue}let p=this.drawEntity(c,!1);if(!p&&!(c instanceof Ba)){u&&this._claimedConvertObjectIds.delete(u);continue}if(p){p.objectId=c.objectId,p.ownerId=c.ownerId,p.layerName=c.layer,p.visible=c.visibility!==!1,p instanceof Ko&&p.isOnTheSameLayer&&(p.userData.insertLayerName=p.layerName);let f=p instanceof Ko&&!p.isOnTheSameLayer,m=!t.forExport&&this.needsDeferredFontGeometry(p);if(f)m?this.enqueueDeferredGeometry(()=>this.handleGroup(p,i,n,h),n):await this.handleGroup(p,i,n,h);else{let g=!(c instanceof oc||c instanceof Rh),y=async()=>{if(await this.finishEntityGeometry(p,i),n!==this._convertEpoch){p.dispose();return}if(u&&(this._entityConvertGeneration.get(u)??0)!==h){p.dispose();return}p instanceof Ko&&(this.syncGroupSpatialBoundsForIndexing(p),p.isOnTheSameLayer&&this._inheritedLayerMaterialMapper.remap(p.children,"0",p.layerName));let b=performance.now();this._scene.addEntity(p,g),this._convertPhaseMs.addEntity+=performance.now()-b,this.applySessionHiddenObjectState(c.objectId),p.dispose(),i?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents(),l)):this.markInteractiveOpenDirty()};m?this.enqueueDeferredGeometry(y,n):await y()}}if(n!==this._convertEpoch)continue;if(c instanceof Ba)this.attachViewportView(c);else if(c instanceof hl){let f=c.imageFileName;f&&!c.image?this._missedImages.set(c.objectId,f):c.image&&this._missedImages.delete(c.objectId)}}catch(u){let h=String(c.objectId??"");h&&this._claimedConvertObjectIds.delete(h),kt.error(`[AcTrView2d] Failed to convert entity ${c.objectId} (${c.type}):`,u)}finally{n===this._convertEpoch&&this.decreaseNumOfEntitiesToProcess()}n===this._convertEpoch&&(i?await this.progressiveYieldForInput(a,s):a&&await a.maybeYield(s)&&this._progressiveYieldCount++)}}syncGroupSpatialBoundsForIndexing(e){let t=e.peekLazyChildBoxes();if(t&&t.boxes.length>0){let o=e.userData;o.lazySpatialChildren=t;return}if(e.refreshWcsChildBoxesFromChildren(),e.wcsChildBoxes.length===0)return;let n=e.wcsChildBoxes.map(o=>({minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:o.id}));e.wcsBbox=PJ(e);let i=e.userData;i.spatialIndexChildBoxes=n}async handleGroup(e,t,n=this._convertEpoch,i=0){let o=performance.now();try{if(await this.finishEntityGeometry(e,t),n!==this._convertEpoch){e.dispose();return}let a=String(e.objectId??"");if(a&&(this._entityConvertGeneration.get(a)??0)!==i){e.dispose();return}this.syncGroupSpatialBoundsForIndexing(e);let s=e.children,l=new Map;s.forEach(b=>{var v;if(b.visible===!1)return;let x=b.userData.layerName;l.has(x)||l.set(x,[]),(v=l.get(x))==null||v.push(b)}),e.children=[];for(let b of s)b.parent=null;let c=e.renderContext,u=e.objectId,h=e.layerName,d=e.userData.lazySpatialChildren,p=d?[]:e.wcsChildBoxes.map(b=>({minX:b.minX,minY:b.minY,maxX:b.maxX,maxY:b.maxY,id:b.id})),f=d?e.wcsBbox.clone():p.length>0?PJ(e):e.wcsBbox.clone();p.length>0&&(e.wcsBbox=f.clone());let m=!1,g=()=>new Promise(b=>setTimeout(b,0)),y=t?performance.now():0;for(let[b,v]of l){let x=b==="0"?h:b,w=v.some(S=>(S.userData.authoredLayerName??b)==="0")?"0":b;this._inheritedLayerMaterialMapper.remap(v,w,x);let _=new Wn(c);_.matrix.copy(e.matrix),_.matrixAutoUpdate=!1,_.matrixWorldNeedsUpdate=!0,_.objectId=u,_.ownerId=e.ownerId,_.layerName=x,_.userData.insertLayerName=h,_.wcsBbox=f.clone();let A=_.userData;!m&&d?(_.userData.lazySpatialChildren=d,m=!0):!m&&p.length>0&&(A.spatialIndexChildBoxes=p,m=!0);for(let S=0;S<v.length;S++)_.add(v[S]);_.updateMatrixWorld(!0),this._layerAppearance.refreshTextMaterialsInObjectTree(_);let E=performance.now();this._scene.addEntity(_,!0),this._convertPhaseMs.addEntity+=performance.now()-E,this.applySessionHiddenObjectState(u),_.dispose(),t&&n===this._convertEpoch&&performance.now()-y>=Wi.PROGRESSIVE_OPEN_YIELD_BUDGET_MS&&(await g(),y=performance.now())}e.dispose(),t?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents())):this.markInteractiveOpenDirty()}finally{this._convertPhaseMs.handleGroup+=performance.now()-o}}decreaseNumOfEntitiesToProcess(){this._numOfEntitiesToProcess--,this._numOfEntitiesToProcess<0?(this._numOfEntitiesToProcess=0,kt.warn("Something wrong! The number of entities to process should not be less than 0.")):this._numOfEntitiesToProcess===0&&(this._isDirty=!0,Gt.emit("missed-data-changed",{})),this.stampEntityProcessingIdle()}frameOpenLineworkIfReady(){if(!this._openLineworkFramePending||this.isConvertingEntities)return;let e=this.getDrawingExtents();if(!e||e.isEmpty()){this._openLineworkFramePending=!1;return}this._openLineworkFramePending=!1,this._progressiveOpenFit.frameProgrammatically(e)}stampEntityProcessingIdle(){this._numOfEntitiesToProcess===0&&this._pendingGeometryJobs===0&&(this._entityProcessingIdleAt=performance.now(),Nr.instance.clear())}};oh.OPEN_CONVERT_YIELD_BUDGET_MS=300,oh.PROGRESSIVE_OPEN_YIELD_BUDGET_MS=32,oh.PROGRESSIVE_INPUT_PAUSE_MS=120,oh.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS=2500,oh.NON_PROGRESSIVE_OPEN_PAINT_INTERVAL_MS=4e3,oh.DEFERRED_GEOMETRY_CONCURRENCY=8,oh.CONVERT_SLICE_BUDGET_MS=64,oh.CONVERT_SLICE_MAX=512;var Uz=oh;function XFe(r){if(!r)return!1;let e=Object.keys(r);return e.length>0&&e.every(t=>t==="visibility")}function YFe(r,e,t){let{entity:n,changes:i}=r,o=n.objectId;if(!e(o))return!1;if(XFe(i))return!(i.visibility===!0&&t(o)===void 0);if(i&&Object.keys(i).length>0)return!1;let a=t(o);return a===void 0?!1:a&&!n.visibility}function ZQ(r){return Array.isArray(r)?r:[r]}var C1=class{constructor(e,t){this._active=!0,this._disposers=[],this._view=e,this._doc=t;let n=(i,o)=>{i.addEventListener(o),this._disposers.push(()=>i.removeEventListener(o))};n(t.database.events.entityAppended,i=>{if(!this._active)return;let o=ZQ(i.entity).filter(a=>!this.view.hasEntity(a.objectId));o.length!==0&&this.view.addEntity(o.length===1?o[0]:o)}),n(t.database.events.entityModified,i=>{if(!this._active)return;let o=i,a=this.view;a instanceof Uz&&YFe(o,s=>a.hasEntity(s),s=>a.getEntityVisible(s))&&a.updateEntityVisibility(o.entity)||this.view.updateEntity(o.entity)}),n(t.database.events.entityErased,i=>{if(!this._active)return;let o=ZQ(i.entity).filter(a=>this.view.hasEntity(a.objectId));o.length!==0&&this.view.removeEntity(o.length===1?o[0]:o)}),n(t.database.events.layerAppended,i=>{this._active&&this._view.addLayer(i.layer)}),n(t.database.events.layerModified,i=>{this._active&&this._view.updateLayer(i.layer,i.changes)}),n(gt.instance().events.sysVarChanged,i=>{if(!(!this._active||i.database!==this._doc.database)){if(i.name==oe.PDMODE.toLowerCase()||i.name==oe.PDSIZE.toLowerCase())this._view.rerenderPoints(i.database.pdmode,i.database.pdsize);else if(i.name==oe.LWDISPLAY.toLowerCase()){let o=this._view,a=!!i.database.lwdisplay;o.renderer.showLineWeight!==a&&(o.renderer.showLineWeight=a,o.clear(),i.database.regen())}}}),n(t.database.events.dictObjetSet,i=>{this._active&&i.object instanceof ia&&this._view.addLayout(i.object)}),n(e.selectionSet.events.selectionAdded,i=>{this._active&&e.highlight(i.ids)}),n(e.selectionSet.events.selectionRemoved,i=>{this._active&&e.unhighlight(i.ids)})}get view(){return this._view}get doc(){return this._doc}get isActive(){return this._active}suspend(){this._active=!1}resume(){this._active=!0}dispose(){this._active=!1;for(let e of this._disposers)e();this._disposers.length=0}};function tre(r){return typeof r.hasEntity=="function"&&typeof r.setEntitySceneVisible=="function"}function $Fe(r,e){let t=r.view;if(!tre(t))return 0;let n=r.doc,i=n.database,o=0;for(let a of e){if(n.isObjectHidden(a))continue;let s=i.tables.blockTable.getEntityById(a);!(s!=null&&s.visibility)||!t.hasEntity(a)||t.setEntitySceneVisible(a,!1)&&(n.addHiddenObject(a),o++)}return o>0&&t.selectionSet.clear(),o}function KFe(r){let e=r.view;if(!tre(e))return 0;let t=r.doc,n=t.database,i=t.takeHiddenObjects(),o=0;for(let a of i){let s=n.tables.blockTable.getEntityById(a);!s||!e.hasEntity(a)||e.setEntitySceneVisible(a,s.visibility)&&o++}return e.selectionSet.clear(),o}var JQ=[".dxf",".dwg"],o1="local",IF="url",qFe="100%",ZFe="150px";function QQ(r,e){return r==null?e:typeof r=="number"?`${r}px`:r}var JFe=class DT{constructor(e){if(this.activeView=o1,this.menuOpen=!1,this.disposed=!1,this.unsubManager=null,this.unsubTheme=null,this.onDocPointerDown=null,this.options={...e,cardSize:{...e.cardSize??{}}},DT.ensureStyles(),this.root=document.createElement("div"),this.root.className="ml-ui-file-open",this.root.setAttribute("data-ml-ui-file-open","1"),this.applyTheme(),e.title||e.subtitle){let s=document.createElement("div");if(s.className="ml-ui-file-open-header",e.title){let l=document.createElement("h2");l.className="ml-ui-file-open-title",l.textContent=e.title,s.appendChild(l)}if(e.subtitle){let l=document.createElement("p");l.className="ml-ui-file-open-subtitle",l.textContent=e.subtitle,s.appendChild(l)}this.root.appendChild(s)}if(e.showNewDrawing){let s=document.createElement("button");s.type="button",s.className="ml-ui-file-open-primary",s.textContent=P.t("main.dataSource.newDrawing"),s.addEventListener("click",()=>this.emit({kind:"new-drawing"})),this.root.appendChild(s),this.root.appendChild(this.createDivider())}this.card=document.createElement("div"),this.card.className="ml-ui-file-open-card",this.applyCardSize(),this.root.appendChild(this.card),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept=e.accept??JQ.join(","),this.fileInput.className="ml-ui-file-open-input-hidden",this.fileInput.addEventListener("change",()=>{var s;let l=(s=this.fileInput.files)==null?void 0:s[0];this.fileInput.value="",l&&this.isSupportedFileName(l.name)&&this.emitLocal(l)}),this.card.appendChild(this.fileInput),this.contentEl=document.createElement("div"),this.contentEl.className="ml-ui-file-open-body",this.card.appendChild(this.contentEl),this.dropzone=document.createElement("div"),this.dropzone.className="ml-ui-file-open-dropzone",this.dropzone.tabIndex=0,this.dropzone.setAttribute("role","button"),this.dropzone.setAttribute("aria-label",P.t("main.dataSource.dropOrBrowse"));let t=document.createElement("p");t.className="ml-ui-file-open-drop-title",t.append(document.createTextNode(`${P.t("main.dataSource.dropFile")} `));let n=document.createElement("span");n.className="ml-ui-file-open-drop-link",n.textContent=P.t("main.dataSource.browse"),t.appendChild(n);let i=document.createElement("div");i.className="ml-ui-file-open-tags";for(let s of["DWG","DXF"]){let l=document.createElement("span");l.className="ml-ui-file-open-tag",l.textContent=s,i.appendChild(l)}this.dropzone.appendChild(t),this.dropzone.appendChild(i),this.dropzone.addEventListener("click",()=>this.fileInput.click()),this.dropzone.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),this.fileInput.click())}),this.dropzone.addEventListener("dragenter",s=>this.onDrag(s,!0)),this.dropzone.addEventListener("dragover",s=>this.onDrag(s,!0)),this.dropzone.addEventListener("dragleave",s=>this.onDrag(s,!1)),this.dropzone.addEventListener("drop",s=>this.onDrop(s)),this.urlRow=document.createElement("div"),this.urlRow.className="ml-ui-file-open-url-row",this.urlInput=document.createElement("input"),this.urlInput.type="url",this.urlInput.className="ml-ui-file-open-url-input",this.urlInput.placeholder=P.t("main.dataSource.urlPlaceholder"),this.urlInput.autocomplete="off",this.urlInput.spellcheck=!1,this.urlInput.addEventListener("keydown",s=>{s.key==="Enter"&&(s.preventDefault(),this.submitUrl())});let o=document.createElement("button");o.type="button",o.className="ml-ui-file-open-secondary",o.textContent=P.t("main.dataSource.open"),o.addEventListener("click",()=>this.submitUrl()),this.urlRow.appendChild(this.urlInput),this.urlRow.appendChild(o),this.sourceActionsEl=document.createElement("div"),this.sourceActionsEl.className="ml-ui-file-open-sources";let a=document.createElement("div");a.className="ml-ui-file-open-footer",this.footerBtn=document.createElement("button"),this.footerBtn.type="button",this.footerBtn.className="ml-ui-file-open-footer-btn",this.footerBtn.setAttribute("aria-label",P.t("main.dataSource.source")),this.footerBtn.setAttribute("aria-haspopup","listbox"),this.footerBtn.setAttribute("aria-expanded","false"),this.footerLabel=document.createElement("span"),this.footerLabel.className="ml-ui-file-open-footer-label",this.footerChevron=document.createElement("span"),this.footerChevron.className="ml-ui-file-open-footer-chevron",this.footerChevron.setAttribute("aria-hidden","true"),this.footerChevron.textContent="\u25BE",this.footerBtn.appendChild(this.footerLabel),this.footerBtn.appendChild(this.footerChevron),this.footerBtn.addEventListener("click",s=>{s.stopPropagation(),this.toggleMenu()}),a.appendChild(this.footerBtn),this.card.appendChild(a),this.menuEl=document.createElement("div"),this.menuEl.className="ml-ui-file-open-menu",this.menuEl.hidden=!0,this.menuEl.setAttribute("role","listbox"),this.card.appendChild(this.menuEl),this.onDocPointerDown=s=>{if(!this.menuOpen)return;let l=s.target;l instanceof Node&&(this.card.contains(l)||this.closeMenu())},document.addEventListener("pointerdown",this.onDocPointerDown),this.unsubTheme=Qz(()=>{this.options.theme||this.applyTheme()}),e.host.appendChild(this.root),this.bindManagerEvents(),this.refreshSourceButtons()}get element(){return this.root}refreshSourceButtons(){this.disposed||(this.bindManagerEvents(),this.applyTheme(),this.applyCardSize(),this.syncSourceChrome(),this.renderActiveView())}setTheme(e){this.disposed||(this.options.theme=e,this.applyTheme())}setCardSize(e){this.disposed||(this.options.cardSize={...this.options.cardSize,...e},this.applyCardSize())}dispose(){var e,t;this.disposed||(this.disposed=!0,(e=this.unsubManager)==null||e.call(this),this.unsubManager=null,(t=this.unsubTheme)==null||t.call(this),this.unsubTheme=null,this.onDocPointerDown&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.onDocPointerDown=null),this.root.remove())}applyTheme(){let e=this.options.theme!=null,t=this.options.theme??Jo(this.options.host);zs(t,this.root,{isolated:e})}applyCardSize(){let e=this.options.cardSize;this.card.style.width=QQ(e?.width,qFe),this.card.style.height=QQ(e?.height,ZFe)}syncSourceChrome(){let e=this.resolveSourceOptions();new Set(e.map(i=>i.value)).has(this.activeView)||(this.activeView=o1,this.closeMenu());let t=e.find(i=>i.value===this.activeView)??e[0];this.footerLabel.textContent=t?.label??"";let n=e.length>1;this.footerBtn.disabled=!n,this.footerBtn.classList.toggle("is-single",!n),this.footerChevron.hidden=!n,n||this.closeMenu(),this.menuEl.replaceChildren();for(let i of e){let o=document.createElement("button");o.type="button",o.className="ml-ui-file-open-menu-item",o.setAttribute("role","option"),o.setAttribute("aria-selected",i.value===this.activeView?"true":"false"),i.value===this.activeView&&o.classList.add("is-active"),o.textContent=i.label,o.addEventListener("click",a=>{a.stopPropagation(),this.selectSource(i.value)}),this.menuEl.appendChild(o)}}selectSource(e){this.activeView=e,this.closeMenu(),this.syncSourceChrome(),this.renderActiveView(),this.maybeAutoSignIn(e)}maybeAutoSignIn(e){if(e===o1||e===IF)return;let t=this.resolveSources().find(i=>i.id===e);if(t){t.requiresAuth&&t.getAuthState()==="signed-out"&&t.signIn().catch(()=>{}).finally(()=>this.refreshSourceButtons());return}let n=this.resolveExtraMenuItems().find(i=>i.sourceId===e&&i.action==="sign-in");n&&this.emit({kind:"data-source",item:n})}toggleMenu(){this.footerBtn.disabled||(this.menuOpen?this.closeMenu():this.openMenu())}openMenu(){this.menuOpen=!0,this.menuEl.hidden=!1,this.footerBtn.setAttribute("aria-expanded","true"),this.footerBtn.classList.add("is-open"),this.footerChevron.textContent="\u25B4"}closeMenu(){this.menuOpen=!1,this.menuEl.hidden=!0,this.footerBtn.setAttribute("aria-expanded","false"),this.footerBtn.classList.remove("is-open"),this.footerChevron.textContent="\u25BE"}resolveSourceOptions(){let e=[{value:o1,label:P.t("main.dataSource.local")}];this.options.showUrl!==!1&&e.push({value:IF,label:P.t("main.dataSource.url")});let t=new Set;for(let n of this.resolveMenuItems())t.has(n.sourceId)||(t.add(n.sourceId),e.push({value:n.sourceId,label:this.resolveSourceLabel(n.sourceId)}));return e}resolveSourceLabel(e){var t;let n=this.resolveSources().find(o=>o.id===e);if(n)return P.t(n.labelKey);let i=this.resolveExtraMenuItems().find(o=>o.sourceId===e);return(t=i?.labelParams)!=null&&t.name?i.labelParams.name:e}renderActiveView(){if(this.contentEl.replaceChildren(),this.activeView===o1){this.contentEl.appendChild(this.dropzone);return}if(this.activeView===IF){this.contentEl.appendChild(this.urlRow),requestAnimationFrame(()=>this.urlInput.focus());return}this.renderSourceActions(this.activeView),this.contentEl.appendChild(this.sourceActionsEl)}canPickSource(e){let t=this.resolveSources().find(n=>n.id===e);return t?t.requiresAuth?t.getAuthState()==="signed-in":!0:this.resolveExtraMenuItems().some(n=>n.sourceId===e&&n.action==="pick")}buildPickMenuItem(e){let t=this.resolveSourceLabel(e),n=P.t("main.dataSource.openFrom");return{id:`${e}:pick`,sourceId:e,action:"pick",labelKey:"main.dataSource.openFrom",labelParams:{name:t},label:n.includes("{name}")?n.split("{name}").join(t):P.t("main.dataSource.selectFile")}}resolveAccountProfile(e){var t,n,i,o;let a=(n=(t=this.options).getAccountProfile)==null?void 0:n.call(t,e);if(a!=null&&a.displayName)return a;let s=this.resolveSources().find(u=>u.id===e);if(!s||s.getAuthState()!=="signed-in")return;let l=(i=s.getAccountProfile)==null?void 0:i.call(s);if(l!=null&&l.displayName)return l;let c=(o=s.getAccountLabel)==null?void 0:o.call(s);if(c)return{displayName:c}}initialsFromName(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]??""}${t[1][0]??""}`.toUpperCase()}renderSourceActions(e){this.sourceActionsEl.replaceChildren();let t=this.resolveAccountProfile(e);if(t){let o=document.createElement("div");o.className="ml-ui-file-open-account";let a=document.createElement("div");if(a.className="ml-ui-file-open-avatar",t.avatarUrl){let c=document.createElement("img");c.className="ml-ui-file-open-avatar-img",c.src=t.avatarUrl,c.alt="",c.referrerPolicy="no-referrer",a.appendChild(c)}else{let c=document.createElement("span");c.className="ml-ui-file-open-avatar-initials",c.textContent=this.initialsFromName(t.displayName),a.appendChild(c)}let s=document.createElement("div");s.className="ml-ui-file-open-account-text";let l=document.createElement("div");if(l.className="ml-ui-file-open-account-name",l.textContent=t.displayName,s.appendChild(l),t.email&&t.email!==t.displayName){let c=document.createElement("div");c.className="ml-ui-file-open-account-email",c.textContent=t.email,s.appendChild(c)}o.appendChild(a),o.appendChild(s),this.sourceActionsEl.appendChild(o)}let n=document.createElement("button");n.type="button",n.className="ml-ui-file-open-source-btn ml-ui-file-open-source-btn--primary",n.textContent=P.t("main.dataSource.selectFile");let i=this.canPickSource(e);n.disabled=!i,i||(n.title=P.t("main.dataSource.signInRequired")),n.addEventListener("click",()=>{this.canPickSource(e)&&this.emit({kind:"data-source",item:this.buildPickMenuItem(e)})}),this.sourceActionsEl.appendChild(n)}resolveMenuItems(){let e=this.resolveSources().filter(a=>a.id!==Fne&&a.id!==Vne),t=z5e(e),n=this.resolveExtraMenuItems(),i=new Set(t.map(a=>a.sourceId)),o=n.filter(a=>!i.has(a.sourceId));return[...t,...o]}resolveSources(){var e;return this.options.getSources?this.options.getSources():((e=Y.tryGetInstance())==null?void 0:e.dataSourceManager.list())??[]}resolveExtraMenuItems(){let e=this.options.extraMenuItems;return e?typeof e=="function"?e():e:[]}bindManagerEvents(){var e;if(this.unsubManager)return;let t=(e=Y.tryGetInstance())==null?void 0:e.dataSourceManager;if(!t)return;let n=()=>this.refreshSourceButtons();t.on("changed",n),t.on("auth-changed",n),this.unsubManager=()=>{t.off("changed",n),t.off("auth-changed",n)}}submitUrl(){let e=this.urlInput.value.trim();if(!e){this.urlInput.focus();return}this.emit({kind:"url",url:e})}onDrag(e,t){e.preventDefault(),e.stopPropagation(),this.dropzone.classList.toggle("is-dragover",t)}onDrop(e){var t,n;this.onDrag(e,!1);let i=(n=(t=e.dataTransfer)==null?void 0:t.files)==null?void 0:n[0];i&&this.isSupportedFileName(i.name)&&this.emitLocal(i)}isSupportedFileName(e){let t=e.toLowerCase();return JQ.some(n=>t.endsWith(n))}emitLocal(e){this.emit({kind:"local",file:e})}emit(e){var t,n,i,o,a,s,l,c,u,h;switch((n=(t=this.options).onResult)==null||n.call(t,e),e.kind){case"local":(o=(i=this.options).onLocalFile)==null||o.call(i,e.file);break;case"url":(s=(a=this.options).onUrl)==null||s.call(a,e.url);break;case"data-source":(c=(l=this.options).onDataSourceAction)==null||c.call(l,e.item);break;case"new-drawing":(h=(u=this.options).onNewDrawing)==null||h.call(u);break}}createDivider(){let e=document.createElement("p");e.className="ml-ui-file-open-divider",e.setAttribute("aria-hidden","true");let t=document.createElement("span");return t.textContent=P.t("main.dataSource.or"),e.appendChild(t),e}static ensureStyles(){if(typeof document>"u"||document.getElementById(DT.styleId))return;let e=document.createElement("style");e.id=DT.styleId,e.textContent=`
  6991. .ml-ui-file-open {
  6992. display: flex;
  6993. flex-direction: column;
  6994. gap: 0;
  6995. width: 100%;
  6996. box-sizing: border-box;
  6997. font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  6998. color: var(--ml-ui-text, #303133);
  6999. }
  7000. .ml-ui-file-open-header { margin-bottom: 12px; }
  7001. .ml-ui-file-open-title {
  7002. margin: 0 0 4px;
  7003. font-size: 18px;
  7004. font-weight: 700;
  7005. line-height: 1.3;
  7006. }
  7007. .ml-ui-file-open-subtitle {
  7008. margin: 0;
  7009. font-size: 13px;
  7010. line-height: 1.4;
  7011. color: var(--ml-ui-text-muted, #606266);
  7012. }
  7013. .ml-ui-file-open-primary {
  7014. display: block;
  7015. width: 100%;
  7016. padding: 10px 14px;
  7017. border: none;
  7018. border-radius: 10px;
  7019. background: var(--ml-ui-accent, #409eff);
  7020. color: #fff;
  7021. font-size: 13px;
  7022. font-weight: 700;
  7023. cursor: pointer;
  7024. }
  7025. .ml-ui-file-open-primary:hover { filter: brightness(1.05); }
  7026. .ml-ui-file-open-secondary {
  7027. flex: 0 0 auto;
  7028. padding: 8px 14px;
  7029. border: none;
  7030. border-radius: 8px;
  7031. background: var(--ml-ui-accent, #409eff);
  7032. color: #fff;
  7033. font-size: 13px;
  7034. font-weight: 600;
  7035. cursor: pointer;
  7036. white-space: nowrap;
  7037. }
  7038. .ml-ui-file-open-divider {
  7039. display: flex;
  7040. align-items: center;
  7041. gap: 10px;
  7042. margin: 12px 0;
  7043. font-size: 11px;
  7044. font-weight: 600;
  7045. color: var(--ml-ui-text-muted, #94a3b8);
  7046. text-transform: uppercase;
  7047. letter-spacing: 0.06em;
  7048. }
  7049. .ml-ui-file-open-divider::before,
  7050. .ml-ui-file-open-divider::after {
  7051. content: '';
  7052. flex: 1;
  7053. height: 1px;
  7054. background: var(--ml-ui-border, #e2e8f0);
  7055. }
  7056. .ml-ui-file-open-card {
  7057. position: relative;
  7058. display: flex;
  7059. flex-direction: column;
  7060. width: 100%;
  7061. height: 150px;
  7062. max-width: 100%;
  7063. box-sizing: border-box;
  7064. border: 1px solid var(--ml-ui-border, #dcdfe6);
  7065. border-radius: 12px;
  7066. background: var(--ml-ui-bg, #fff);
  7067. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
  7068. overflow: hidden;
  7069. }
  7070. .ml-ui-file-open-body {
  7071. flex: 1 1 auto;
  7072. min-height: 0;
  7073. display: flex;
  7074. flex-direction: column;
  7075. }
  7076. .ml-ui-file-open-input-hidden { display: none; }
  7077. .ml-ui-file-open-dropzone {
  7078. flex: 1;
  7079. display: flex;
  7080. flex-direction: column;
  7081. align-items: center;
  7082. justify-content: center;
  7083. gap: 10px;
  7084. padding: 16px;
  7085. box-sizing: border-box;
  7086. border: 1.5px dashed transparent;
  7087. border-radius: 0;
  7088. background: transparent;
  7089. cursor: pointer;
  7090. outline: none;
  7091. transition: border-color 0.15s ease, background 0.15s ease;
  7092. }
  7093. .ml-ui-file-open-dropzone:hover,
  7094. .ml-ui-file-open-dropzone:focus-visible,
  7095. .ml-ui-file-open-dropzone.is-dragover {
  7096. border-color: var(--ml-ui-accent, #409eff);
  7097. background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 8%, transparent);
  7098. }
  7099. .ml-ui-file-open-drop-title {
  7100. margin: 0;
  7101. font-size: 14px;
  7102. text-align: center;
  7103. color: var(--ml-ui-text-muted, #606266);
  7104. }
  7105. .ml-ui-file-open-drop-link {
  7106. color: var(--ml-ui-accent, #409eff);
  7107. font-weight: 600;
  7108. }
  7109. .ml-ui-file-open-tags { display: flex; gap: 6px; }
  7110. .ml-ui-file-open-tag {
  7111. padding: 2px 8px;
  7112. border-radius: 999px;
  7113. border: 1px solid var(--ml-ui-border, #dcdfe6);
  7114. font-size: 11px;
  7115. font-weight: 600;
  7116. color: var(--ml-ui-text-muted, #606266);
  7117. }
  7118. .ml-ui-file-open-url-row {
  7119. flex: 1;
  7120. display: flex;
  7121. gap: 8px;
  7122. align-items: center;
  7123. padding: 16px;
  7124. box-sizing: border-box;
  7125. }
  7126. .ml-ui-file-open-url-input {
  7127. flex: 1;
  7128. min-width: 0;
  7129. padding: 8px 10px;
  7130. border: 1px solid var(--ml-ui-border, #c0c4cc);
  7131. border-radius: 8px;
  7132. background: var(--ml-ui-bg, #fff);
  7133. color: inherit;
  7134. font-size: 13px;
  7135. box-sizing: border-box;
  7136. }
  7137. .ml-ui-file-open-url-input:focus {
  7138. outline: 2px solid var(--ml-ui-accent, #409eff);
  7139. outline-offset: 1px;
  7140. }
  7141. .ml-ui-file-open-sources {
  7142. flex: 1;
  7143. display: flex;
  7144. flex-direction: column;
  7145. gap: 8px;
  7146. justify-content: center;
  7147. padding: 16px;
  7148. box-sizing: border-box;
  7149. }
  7150. .ml-ui-file-open-empty {
  7151. margin: 0;
  7152. text-align: center;
  7153. font-size: 13px;
  7154. color: var(--ml-ui-text-muted, #606266);
  7155. }
  7156. .ml-ui-file-open-account {
  7157. display: flex;
  7158. align-items: center;
  7159. gap: 10px;
  7160. width: 100%;
  7161. margin: 0 0 4px;
  7162. min-width: 0;
  7163. }
  7164. .ml-ui-file-open-avatar {
  7165. flex: 0 0 auto;
  7166. width: 36px;
  7167. height: 36px;
  7168. border-radius: 999px;
  7169. overflow: hidden;
  7170. display: flex;
  7171. align-items: center;
  7172. justify-content: center;
  7173. background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 22%, transparent);
  7174. border: 1px solid var(--ml-ui-border, #dcdfe6);
  7175. }
  7176. .ml-ui-file-open-avatar-img {
  7177. width: 100%;
  7178. height: 100%;
  7179. object-fit: cover;
  7180. display: block;
  7181. }
  7182. .ml-ui-file-open-avatar-initials {
  7183. font-size: 12px;
  7184. font-weight: 700;
  7185. color: var(--ml-ui-accent, #409eff);
  7186. line-height: 1;
  7187. }
  7188. .ml-ui-file-open-account-text {
  7189. flex: 1;
  7190. min-width: 0;
  7191. }
  7192. .ml-ui-file-open-account-name {
  7193. font-size: 13px;
  7194. font-weight: 600;
  7195. color: var(--ml-ui-text, #303133);
  7196. overflow: hidden;
  7197. text-overflow: ellipsis;
  7198. white-space: nowrap;
  7199. }
  7200. .ml-ui-file-open-account-email {
  7201. margin-top: 2px;
  7202. font-size: 11px;
  7203. color: var(--ml-ui-text-muted, #606266);
  7204. overflow: hidden;
  7205. text-overflow: ellipsis;
  7206. white-space: nowrap;
  7207. }
  7208. .ml-ui-file-open-source-btn {
  7209. width: 100%;
  7210. padding: 10px 14px;
  7211. border: 1px solid var(--ml-ui-border, #e2e8f0);
  7212. border-radius: 8px;
  7213. background: var(--ml-ui-bg, #fff);
  7214. color: var(--ml-ui-text, #334155);
  7215. font-size: 13px;
  7216. cursor: pointer;
  7217. text-align: center;
  7218. }
  7219. .ml-ui-file-open-source-btn:disabled {
  7220. opacity: 0.55;
  7221. cursor: not-allowed;
  7222. }
  7223. .ml-ui-file-open-source-btn--primary {
  7224. border: none;
  7225. background: var(--ml-ui-accent, #409eff);
  7226. color: #fff;
  7227. font-weight: 600;
  7228. }
  7229. .ml-ui-file-open-source-btn--primary:hover:not(:disabled) { filter: brightness(1.05); }
  7230. .ml-ui-file-open-source-btn--muted:hover {
  7231. border-color: var(--ml-ui-accent, #409eff);
  7232. color: var(--ml-ui-accent, #409eff);
  7233. }
  7234. .ml-ui-file-open-footer {
  7235. flex: 0 0 auto;
  7236. border-top: 1px solid var(--ml-ui-border, #dcdfe6);
  7237. background: color-mix(in srgb, var(--ml-ui-bg, #fff) 92%, var(--ml-ui-text, #303133) 8%);
  7238. }
  7239. .ml-ui-file-open-footer-btn {
  7240. display: flex;
  7241. align-items: center;
  7242. justify-content: space-between;
  7243. gap: 8px;
  7244. width: 100%;
  7245. padding: 10px 14px;
  7246. border: none;
  7247. background: transparent;
  7248. color: var(--ml-ui-text, #303133);
  7249. font-size: 13px;
  7250. font-weight: 600;
  7251. cursor: pointer;
  7252. text-align: left;
  7253. box-sizing: border-box;
  7254. }
  7255. .ml-ui-file-open-footer-btn:hover:not(:disabled),
  7256. .ml-ui-file-open-footer-btn.is-open {
  7257. background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 10%, transparent);
  7258. }
  7259. .ml-ui-file-open-footer-btn:disabled,
  7260. .ml-ui-file-open-footer-btn.is-single {
  7261. cursor: default;
  7262. }
  7263. .ml-ui-file-open-footer-label {
  7264. flex: 1;
  7265. min-width: 0;
  7266. overflow: hidden;
  7267. text-overflow: ellipsis;
  7268. white-space: nowrap;
  7269. }
  7270. .ml-ui-file-open-footer-chevron {
  7271. flex: 0 0 auto;
  7272. color: var(--ml-ui-text-muted, #606266);
  7273. font-size: 12px;
  7274. line-height: 1;
  7275. }
  7276. .ml-ui-file-open-menu {
  7277. position: absolute;
  7278. left: 8px;
  7279. right: 8px;
  7280. bottom: 44px;
  7281. z-index: 5;
  7282. display: flex;
  7283. flex-direction: column;
  7284. padding: 4px;
  7285. border: 1px solid var(--ml-ui-border, #dcdfe6);
  7286. border-radius: 10px;
  7287. background: var(--ml-ui-bg, #fff);
  7288. box-shadow: var(--ml-ui-shadow, 0 6px 18px rgba(0, 0, 0, 0.18));
  7289. max-height: 148px;
  7290. overflow: auto;
  7291. }
  7292. .ml-ui-file-open-menu[hidden] { display: none; }
  7293. .ml-ui-file-open-menu-item {
  7294. display: block;
  7295. width: 100%;
  7296. padding: 9px 12px;
  7297. border: none;
  7298. border-radius: 7px;
  7299. background: transparent;
  7300. color: var(--ml-ui-text, #303133);
  7301. font-size: 13px;
  7302. text-align: left;
  7303. cursor: pointer;
  7304. }
  7305. .ml-ui-file-open-menu-item:hover {
  7306. background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 12%, transparent);
  7307. }
  7308. .ml-ui-file-open-menu-item.is-active {
  7309. color: var(--ml-ui-accent, #409eff);
  7310. font-weight: 600;
  7311. }
  7312. `,document.head.appendChild(e)}};JFe.styleId="ml-ui-file-open-panel-styles-v3";function QFe(r={},e){let t={...r,...e};return{edgeOffset:t.edgeOffset??8,sideOffset:t.sideOffset??0,showLabels:t.showLabels??!1,size:t.size??"auto",overflow:t.overflow??"menu",showBorder:t.showBorder??!0,showButtonBorder:t.showButtonBorder??!1,showSeparators:t.showSeparators??!0,showChildrenIndicator:t.showChildrenIndicator??!0,replaceOnNested:t.replaceOnNested??!1}}function LF(r){return r.childrenUi??"menu"}function eee(r){return r==="toolbar"||r==="sticky-toolbar"}function Ao(r){return"type"in r&&r.type==="separator"}function Od(r){var e;return typeof((e=Object.getOwnPropertyDescriptor(r,"children"))==null?void 0:e.get)=="function"}function eNe(r,e){return r.minOpenMode==null?!0:e>=r.minOpenMode}function Gb(r){if(Ao(r)||!r.toggle)return r;let e=r.toggle.getValue()?r.toggle.on:r.toggle.off;return{...r,...e,id:r.id,toggle:r.toggle}}function tNe(r,e){var t;if(!((t=r.children)!=null&&t.length))return;let n=[e,r.selectedChildId].filter(i=>!!i);for(let i of n){let o=r.children.find(a=>a.id===i);if(o)return o}return r.children[0]}function a1(r,e){var t;let n=Gb(r);if(n.childIcon!=="selected"||!((t=n.children)!=null&&t.length))return n;let i=tNe(n,e);if(!i)return n;let o=Gb(i);return{...n,icon:o.icon??n.icon}}function nre(r){return Ao(r)?!1:r.requiresDocument!=null?r.requiresDocument:!!(r.command||r.anchorAction)}function rre(r){return r.disabled==null?!1:typeof r.disabled=="function"?r.disabled():r.disabled}function jz(r,e){return r.filter(t=>Ao(t)||eNe(t,e)).map(t=>{var n;if(Ao(t)||Od(t)||!((n=t.children)!=null&&n.length))return t;let i=jz(t.children,e);return{...t,children:i}}).filter(t=>Ao(t)?!0:Od(t)||!t.children||t.children.length>0||t.command||t.action||t.anchorAction||t.toggle)}var T1=class{constructor(e,t,n,i){this.i18n=e,this.themeHost=i,this.handleDocumentClick=o=>{o.target instanceof Node&&(this.root.contains(o.target)||this.anchor.contains(o.target)||this.close())},this.anchor=n,this.root=document.createElement("div"),this.root.className="ml-ex-ui-dropdown",this.root.setAttribute("role","menu"),t.forEach(o=>{if(Ao(o)){let l=document.createElement("div");l.className="ml-ex-ui-dropdown-separator",l.setAttribute("role","separator"),o.id&&(l.dataset.toolbarItemId=o.id),this.root.appendChild(l);return}let a=document.createElement("button");if(a.type="button",a.className="ml-ex-ui-dropdown-item",a.setAttribute("role","menuitem"),o.toggle){let l=o.toggle.getValue();a.setAttribute("aria-pressed",String(l)),a.classList.toggle("is-toggled",l)}o.icon&&a.appendChild(Ll(o.icon));let s=document.createElement("span");s.textContent=o.label?this.i18n.t(o.label):o.id,a.appendChild(s),a.addEventListener("click",l=>{var c;l.stopPropagation(),(c=this.onSelect)==null||c.call(this,o),this.close()}),this.root.appendChild(a)}),this.themeHost.appendChild(this.root),this.positionNear(n),document.addEventListener("mousedown",this.handleDocumentClick,!0)}setOnSelect(e){this.onSelect=e}setOnClose(e){this.onClose=e}close(){var e;document.removeEventListener("mousedown",this.handleDocumentClick,!0),this.root.remove(),(e=this.onClose)==null||e.call(this)}positionNear(e){let t=e.getBoundingClientRect(),n=this.root.getBoundingClientRect(),i=t.bottom+4,o=t.left;i+n.height>window.innerHeight-8&&(i=t.top-n.height-4),o+n.width>window.innerWidth-8&&(o=window.innerWidth-n.width-8),this.root.style.top=`${Math.max(8,i)}px`,this.root.style.left=`${Math.max(8,o)}px`}},tee="ml-ui-toolbar-styles";function ire(){if(document.getElementById(tee))return;let r=document.createElement("style");r.id=tee,r.textContent=`.ml-ex-ui-toolbar {
  7313. position: absolute;
  7314. z-index: 30;
  7315. display: flex;
  7316. gap: 4px;
  7317. padding: 6px;
  7318. background: var(--ml-ui-bg, #ffffff);
  7319. border: 1px solid var(--ml-ui-border, #dcdfe6);
  7320. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
  7321. border-radius: 6px;
  7322. box-sizing: border-box;
  7323. --ml-ex-ui-toolbar-btn-size: 32px;
  7324. }
  7325. .ml-ex-ui-toolbar.no-border,
  7326. .ml-ex-ui-subtoolbar.no-border {
  7327. border: none;
  7328. }
  7329. /* Positioning context for static hosts is applied in AcUiToolbar.ensureMountHostLayout.
  7330. Do not force position:relative here \u2014 absolute/fixed overlay hosts (e.g. cad-viewer)
  7331. must keep their filled box or the bar collapses to the top edge. */
  7332. .ml-ex-ui-toolbar.is-in-parent {
  7333. position: relative;
  7334. inset: auto;
  7335. z-index: 30;
  7336. flex: 0 0 auto;
  7337. }
  7338. .ml-ex-ui-toolbar.is-in-parent.is-stretch {
  7339. align-self: stretch;
  7340. }
  7341. .ml-ex-ui-toolbar.is-in-parent:not(.is-stretch) {
  7342. align-self: center;
  7343. }
  7344. .ml-ex-ui-toolbar-in-parent {
  7345. display: flex;
  7346. min-width: 0;
  7347. min-height: 0;
  7348. }
  7349. .ml-ex-ui-toolbar-in-parent-top,
  7350. .ml-ex-ui-toolbar-in-parent-bottom {
  7351. flex-direction: column;
  7352. }
  7353. .ml-ex-ui-toolbar-in-parent-left,
  7354. .ml-ex-ui-toolbar-in-parent-right {
  7355. flex-direction: row;
  7356. }
  7357. .ml-ex-ui-toolbar-main {
  7358. flex: 1 1 auto;
  7359. min-height: 0;
  7360. min-width: 0;
  7361. position: relative;
  7362. overflow: hidden;
  7363. }
  7364. .ml-ex-ui-toolbar.is-horizontal {
  7365. flex-direction: row;
  7366. align-items: center;
  7367. }
  7368. .ml-ex-ui-toolbar.is-vertical {
  7369. flex-direction: column;
  7370. align-items: stretch;
  7371. }
  7372. .ml-ex-ui-toolbar.is-disabled {
  7373. opacity: 0.55;
  7374. pointer-events: none;
  7375. }
  7376. .ml-ex-ui-toolbar[hidden] {
  7377. display: none !important;
  7378. }
  7379. .ml-ex-ui-toolbar.is-collapsed .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-collapse-btn),
  7380. .ml-ex-ui-toolbar.is-collapsed .ml-ex-ui-toolbar-separator {
  7381. display: none;
  7382. }
  7383. .ml-ex-ui-toolbar-collapse-btn {
  7384. box-sizing: border-box;
  7385. padding: 0;
  7386. flex-shrink: 0;
  7387. }
  7388. .ml-ex-ui-toolbar.is-vertical .ml-ex-ui-toolbar-collapse-btn {
  7389. min-width: var(--ml-ex-ui-toolbar-btn-size);
  7390. width: auto;
  7391. min-height: calc(var(--ml-ex-ui-toolbar-btn-size) / 2);
  7392. height: calc(var(--ml-ex-ui-toolbar-btn-size) / 2);
  7393. margin-top: -4px;
  7394. margin-bottom: -4px;
  7395. }
  7396. .ml-ex-ui-toolbar.is-horizontal .ml-ex-ui-toolbar-collapse-btn {
  7397. min-height: var(--ml-ex-ui-toolbar-btn-size);
  7398. height: auto;
  7399. min-width: calc(var(--ml-ex-ui-toolbar-btn-size) / 2);
  7400. width: calc(var(--ml-ex-ui-toolbar-btn-size) / 2);
  7401. margin-left: -4px;
  7402. margin-right: -4px;
  7403. }
  7404. .ml-ex-ui-toolbar-collapse-btn .ml-ex-ui-icon svg {
  7405. width: calc(var(--ml-ex-ui-toolbar-btn-size) / 2);
  7406. height: calc(var(--ml-ex-ui-toolbar-btn-size) / 2);
  7407. }
  7408. .ml-ex-ui-toolbar-separator {
  7409. flex: 0 0 auto;
  7410. background: var(--ml-ui-border, #dcdfe6);
  7411. }
  7412. .ml-ex-ui-toolbar.is-horizontal .ml-ex-ui-toolbar-separator {
  7413. width: 1px;
  7414. align-self: stretch;
  7415. margin: 2px 4px;
  7416. min-height: 24px;
  7417. }
  7418. .ml-ex-ui-toolbar.is-vertical .ml-ex-ui-toolbar-separator {
  7419. height: 1px;
  7420. width: auto;
  7421. margin: 4px 2px;
  7422. min-width: 24px;
  7423. }
  7424. .ml-ex-ui-toolbar-btn {
  7425. position: relative;
  7426. display: inline-flex;
  7427. align-items: center;
  7428. justify-content: center;
  7429. box-sizing: border-box;
  7430. min-width: var(--ml-ex-ui-toolbar-btn-size);
  7431. min-height: var(--ml-ex-ui-toolbar-btn-size);
  7432. padding: 4px;
  7433. border: 1px solid transparent;
  7434. border-radius: 4px;
  7435. background: transparent;
  7436. color: var(--ml-ui-text, #303133);
  7437. cursor: pointer;
  7438. font-size: 12px;
  7439. }
  7440. .ml-ex-ui-toolbar.show-button-border .ml-ex-ui-toolbar-btn,
  7441. .ml-ex-ui-subtoolbar.show-button-border .ml-ex-ui-toolbar-btn {
  7442. border-color: var(--ml-ui-border, #dcdfe6);
  7443. background: var(--ml-ui-bg, #ffffff);
  7444. }
  7445. @media (hover: hover) {
  7446. .ml-ex-ui-toolbar-btn:hover:not(:disabled) {
  7447. background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
  7448. border-color: var(--ml-ui-border, #dcdfe6);
  7449. color: var(--ml-ui-accent, #409eff);
  7450. }
  7451. }
  7452. .ml-ex-ui-toolbar-btn:disabled {
  7453. opacity: 0.45;
  7454. cursor: not-allowed;
  7455. }
  7456. .ml-ex-ui-toolbar-btn.is-open,
  7457. .ml-ex-ui-toolbar-btn.is-toggled {
  7458. border-color: var(--ml-ui-accent, #409eff);
  7459. color: var(--ml-ui-accent, #409eff);
  7460. background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
  7461. }
  7462. /* Flyout mark: a small opaque right triangle in the corner toward the
  7463. submenu. It sits in the icon padding so the glyph stays clear.
  7464. Only shown when the toolbar/subtoolbar root has .show-children-indicator
  7465. and an edge class (is-right/is-left/\u2026). Without the edge class the
  7466. mark must stay hidden \u2014 otherwise an unpositioned 6\xD76 square appears
  7467. in the middle of nested parents (locale / toolbar placement). */
  7468. .ml-ex-ui-toolbar.show-children-indicator.is-right
  7469. .ml-ex-ui-toolbar-btn.has-children::after,
  7470. .ml-ex-ui-toolbar.show-children-indicator.is-left
  7471. .ml-ex-ui-toolbar-btn.has-children::after,
  7472. .ml-ex-ui-toolbar.show-children-indicator.is-top
  7473. .ml-ex-ui-toolbar-btn.has-children::after,
  7474. .ml-ex-ui-toolbar.show-children-indicator.is-bottom
  7475. .ml-ex-ui-toolbar-btn.has-children::after,
  7476. .ml-ex-ui-subtoolbar.show-children-indicator.is-right
  7477. .ml-ex-ui-toolbar-btn.has-children::after,
  7478. .ml-ex-ui-subtoolbar.show-children-indicator.is-left
  7479. .ml-ex-ui-toolbar-btn.has-children::after,
  7480. .ml-ex-ui-subtoolbar.show-children-indicator.is-top
  7481. .ml-ex-ui-toolbar-btn.has-children::after,
  7482. .ml-ex-ui-subtoolbar.show-children-indicator.is-bottom
  7483. .ml-ex-ui-toolbar-btn.has-children::after {
  7484. content: '';
  7485. position: absolute;
  7486. width: 6px;
  7487. height: 6px;
  7488. background: currentColor;
  7489. pointer-events: none;
  7490. }
  7491. .ml-ex-ui-toolbar.show-children-indicator.is-right
  7492. .ml-ex-ui-toolbar-btn.has-children::after,
  7493. .ml-ex-ui-subtoolbar.show-children-indicator.is-right
  7494. .ml-ex-ui-toolbar-btn.has-children::after {
  7495. left: 1px;
  7496. bottom: 1px;
  7497. clip-path: polygon(0 100%, 0 0, 100% 100%);
  7498. }
  7499. .ml-ex-ui-toolbar.show-children-indicator.is-left
  7500. .ml-ex-ui-toolbar-btn.has-children::after,
  7501. .ml-ex-ui-subtoolbar.show-children-indicator.is-left
  7502. .ml-ex-ui-toolbar-btn.has-children::after {
  7503. right: 1px;
  7504. bottom: 1px;
  7505. clip-path: polygon(100% 100%, 0 100%, 100% 0);
  7506. }
  7507. .ml-ex-ui-toolbar.show-children-indicator.is-top
  7508. .ml-ex-ui-toolbar-btn.has-children::after,
  7509. .ml-ex-ui-subtoolbar.show-children-indicator.is-top
  7510. .ml-ex-ui-toolbar-btn.has-children::after {
  7511. right: 1px;
  7512. bottom: 1px;
  7513. clip-path: polygon(100% 100%, 0 100%, 100% 0);
  7514. }
  7515. .ml-ex-ui-toolbar.show-children-indicator.is-bottom
  7516. .ml-ex-ui-toolbar-btn.has-children::after,
  7517. .ml-ex-ui-subtoolbar.show-children-indicator.is-bottom
  7518. .ml-ex-ui-toolbar-btn.has-children::after {
  7519. right: 1px;
  7520. top: 1px;
  7521. clip-path: polygon(100% 0, 0 0, 100% 100%);
  7522. }
  7523. .ml-ex-ui-toolbar.has-labels .ml-ex-ui-toolbar-btn {
  7524. flex-direction: column;
  7525. gap: 2px;
  7526. min-height: auto;
  7527. padding: 6px 4px 4px;
  7528. }
  7529. .ml-ex-ui-toolbar.is-stretch.is-horizontal
  7530. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7531. .ml-ex-ui-toolbar-collapse-btn
  7532. ),
  7533. .ml-ex-ui-toolbar.is-stretch.is-vertical
  7534. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7535. .ml-ex-ui-toolbar-collapse-btn
  7536. ) {
  7537. flex: 1 1 0;
  7538. }
  7539. .ml-ex-ui-toolbar.is-stretch.is-horizontal
  7540. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7541. .ml-ex-ui-toolbar-collapse-btn
  7542. ) {
  7543. min-width: 0;
  7544. }
  7545. .ml-ex-ui-toolbar.is-stretch.is-vertical
  7546. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7547. .ml-ex-ui-toolbar-collapse-btn
  7548. ) {
  7549. min-height: 0;
  7550. }
  7551. .ml-ex-ui-toolbar.is-stretch .ml-ex-ui-toolbar-separator {
  7552. flex: 0 0 auto;
  7553. }
  7554. .ml-ex-ui-toolbar.is-stretch.is-horizontal .ml-ex-ui-toolbar-overflow-btn,
  7555. .ml-ex-ui-toolbar.is-stretch.is-horizontal .ml-ex-ui-toolbar-collapse-btn,
  7556. .ml-ex-ui-toolbar.is-stretch.is-vertical .ml-ex-ui-toolbar-overflow-btn,
  7557. .ml-ex-ui-toolbar.is-stretch.is-vertical .ml-ex-ui-toolbar-collapse-btn {
  7558. flex: 0 0 auto;
  7559. }
  7560. .ml-ex-ui-toolbar-btn-label {
  7561. display: block;
  7562. max-width: 100%;
  7563. overflow: hidden;
  7564. text-overflow: ellipsis;
  7565. white-space: nowrap;
  7566. font-size: 10px;
  7567. line-height: 1.2;
  7568. text-align: center;
  7569. }
  7570. .ml-ex-ui-toolbar.is-stretch.is-horizontal {
  7571. border-radius: 0;
  7572. border-left: none;
  7573. border-right: none;
  7574. gap: 0;
  7575. padding: 4px 0;
  7576. }
  7577. .ml-ex-ui-toolbar.is-stretch.is-horizontal.is-bottom {
  7578. border-bottom: none;
  7579. }
  7580. .ml-ex-ui-toolbar.is-stretch.is-horizontal .ml-ex-ui-toolbar-btn {
  7581. border-radius: 0;
  7582. border-top: none;
  7583. border-bottom: none;
  7584. }
  7585. .ml-ex-ui-toolbar.is-stretch.is-horizontal .ml-ex-ui-toolbar-btn:first-child {
  7586. border-left: none;
  7587. }
  7588. .ml-ex-ui-toolbar.is-stretch.is-horizontal .ml-ex-ui-toolbar-btn:last-child {
  7589. border-right: none;
  7590. }
  7591. .ml-ex-ui-toolbar.is-stretch.is-vertical {
  7592. gap: 0;
  7593. padding: 4px 6px;
  7594. }
  7595. .ml-ex-ui-toolbar.is-overflow-wrap {
  7596. flex-wrap: wrap;
  7597. align-content: flex-start;
  7598. }
  7599. .ml-ex-ui-toolbar.is-overflow-wrap.is-horizontal {
  7600. max-width: var(--ml-ex-ui-toolbar-max-width, none);
  7601. }
  7602. .ml-ex-ui-toolbar.is-overflow-wrap.is-vertical {
  7603. max-height: var(--ml-ex-ui-toolbar-max-height, none);
  7604. }
  7605. .ml-ex-ui-toolbar.is-overflow-menu.has-labels.is-horizontal
  7606. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7607. .ml-ex-ui-toolbar-collapse-btn
  7608. ) {
  7609. flex: 0 0 auto;
  7610. min-width: var(--ml-ex-ui-toolbar-btn-size);
  7611. }
  7612. .ml-ex-ui-toolbar.is-overflow-menu.is-stretch.has-labels.is-horizontal
  7613. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7614. .ml-ex-ui-toolbar-collapse-btn
  7615. ) {
  7616. flex: 1 1 0;
  7617. min-width: 0;
  7618. }
  7619. .ml-ex-ui-toolbar.is-overflow-menu.is-vertical {
  7620. flex-shrink: 0;
  7621. }
  7622. /* Author display:inline-flex on buttons otherwise beats the UA
  7623. [hidden] rule and overflow menu hide loops never shrink the axis. */
  7624. .ml-ex-ui-toolbar-btn[hidden],
  7625. .ml-ex-ui-toolbar-separator[hidden],
  7626. .ml-ex-ui-toolbar-overflow-btn[hidden] {
  7627. display: none !important;
  7628. }
  7629. .ml-ex-ui-icon {
  7630. display: inline-flex;
  7631. width: 18px;
  7632. height: 18px;
  7633. align-items: center;
  7634. justify-content: center;
  7635. }
  7636. .ml-ex-ui-icon svg {
  7637. width: 18px;
  7638. height: 18px;
  7639. }
  7640. /* Locale short-code badges (EN / \u4E2D / \u2026): fill the icon box like SVG glyphs. */
  7641. .ml-ex-ui-locale-badge {
  7642. display: inline-flex;
  7643. align-items: center;
  7644. justify-content: center;
  7645. width: 18px;
  7646. height: 18px;
  7647. font-size: 12px;
  7648. font-weight: 700;
  7649. line-height: 1;
  7650. letter-spacing: -0.04em;
  7651. user-select: none;
  7652. }
  7653. .ml-ex-ui-subtoolbar.is-overflow-wrap {
  7654. flex-wrap: wrap;
  7655. align-content: flex-start;
  7656. }
  7657. .ml-ex-ui-subtoolbar.is-overflow-wrap.is-horizontal {
  7658. max-width: var(--ml-ex-ui-toolbar-max-width, none);
  7659. }
  7660. .ml-ex-ui-subtoolbar.is-overflow-wrap.is-vertical {
  7661. max-height: var(--ml-ex-ui-toolbar-max-height, none);
  7662. }
  7663. .ml-ex-ui-subtoolbar.has-labels .ml-ex-ui-toolbar-btn {
  7664. flex-direction: column;
  7665. gap: 2px;
  7666. min-height: auto;
  7667. padding: 6px 4px 4px;
  7668. }
  7669. .ml-ex-ui-subtoolbar.is-stretch.is-horizontal
  7670. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7671. .ml-ex-ui-toolbar-collapse-btn
  7672. ),
  7673. .ml-ex-ui-subtoolbar.is-stretch.is-vertical
  7674. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7675. .ml-ex-ui-toolbar-collapse-btn
  7676. ) {
  7677. flex: 1 1 0;
  7678. }
  7679. .ml-ex-ui-subtoolbar.is-wrap-pack.is-horizontal {
  7680. justify-content: flex-start;
  7681. align-content: flex-start;
  7682. }
  7683. .ml-ex-ui-subtoolbar.is-wrap-pack.is-horizontal
  7684. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7685. .ml-ex-ui-toolbar-collapse-btn
  7686. ) {
  7687. flex-grow: 0;
  7688. flex-shrink: 0;
  7689. box-sizing: border-box;
  7690. }
  7691. .ml-ex-ui-subtoolbar.is-stretch.is-horizontal
  7692. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7693. .ml-ex-ui-toolbar-collapse-btn
  7694. ) {
  7695. min-width: 0;
  7696. }
  7697. .ml-ex-ui-subtoolbar.is-stretch.is-vertical
  7698. .ml-ex-ui-toolbar-btn:not(.ml-ex-ui-toolbar-overflow-btn):not(
  7699. .ml-ex-ui-toolbar-collapse-btn
  7700. ) {
  7701. min-height: 0;
  7702. }
  7703. .ml-ex-ui-subtoolbar.is-stretch .ml-ex-ui-toolbar-separator {
  7704. flex: 0 0 auto;
  7705. }
  7706. .ml-ex-ui-subtoolbar.is-stretch.is-horizontal {
  7707. gap: 0;
  7708. padding: 4px 0;
  7709. }
  7710. .ml-ex-ui-subtoolbar.is-stretch.is-vertical {
  7711. gap: 0;
  7712. padding: 4px 6px;
  7713. }
  7714. .ml-ex-ui-subtoolbar {
  7715. position: absolute;
  7716. z-index: 31;
  7717. display: flex;
  7718. gap: 4px;
  7719. padding: 6px;
  7720. background: var(--ml-ui-bg, #ffffff);
  7721. border: 1px solid var(--ml-ui-border, #dcdfe6);
  7722. box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
  7723. border-radius: 6px;
  7724. box-sizing: border-box;
  7725. --ml-ex-ui-toolbar-btn-size: 32px;
  7726. }
  7727. .ml-ex-ui-subtoolbar.is-horizontal {
  7728. flex-direction: row;
  7729. align-items: center;
  7730. }
  7731. .ml-ex-ui-subtoolbar.is-vertical {
  7732. flex-direction: column;
  7733. align-items: stretch;
  7734. }
  7735. .ml-ex-ui-subtoolbar.is-horizontal .ml-ex-ui-toolbar-separator {
  7736. width: 1px;
  7737. align-self: stretch;
  7738. margin: 2px 4px;
  7739. min-height: 24px;
  7740. }
  7741. .ml-ex-ui-subtoolbar.is-vertical .ml-ex-ui-toolbar-separator {
  7742. height: 1px;
  7743. width: auto;
  7744. margin: 4px 2px;
  7745. min-width: 24px;
  7746. }
  7747. .ml-ex-ui-dropdown {
  7748. position: fixed;
  7749. z-index: 100;
  7750. min-width: 160px;
  7751. max-height: min(360px, calc(100vh - 16px));
  7752. overflow-y: auto;
  7753. padding: 4px;
  7754. background: var(--ml-ui-bg, #ffffff);
  7755. border: 1px solid var(--ml-ui-border, #dcdfe6);
  7756. box-shadow: var(--ml-ui-shadow, 0 6px 18px rgba(0, 0, 0, 0.35));
  7757. border-radius: 6px;
  7758. }
  7759. .ml-ex-ui-dropdown-item {
  7760. display: flex;
  7761. align-items: center;
  7762. gap: 8px;
  7763. width: 100%;
  7764. padding: 6px 8px;
  7765. border: none;
  7766. border-radius: 4px;
  7767. background: transparent;
  7768. color: var(--ml-ui-text, #303133);
  7769. cursor: pointer;
  7770. font-size: 12px;
  7771. text-align: left;
  7772. }
  7773. .ml-ex-ui-dropdown-item:hover {
  7774. background: var(--ml-ui-border, rgba(0, 0, 0, 0.06));
  7775. }
  7776. .ml-ex-ui-dropdown-separator {
  7777. height: 1px;
  7778. margin: 4px 6px;
  7779. background: var(--ml-ui-border, #dcdfe6);
  7780. }
  7781. .ml-ex-ui-dropdown-item.is-toggled {
  7782. color: var(--ml-ui-accent, #409eff);
  7783. background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
  7784. } `,document.head.appendChild(r)}function nNe(r,e,t=0){let n=Math.max(24,e-4);if(r<=0)return{perRow:1,slotWidth:n,preferredMaxWidth:n};let i=Math.max(1,Math.floor(r/n)),o=Math.max(0,t);return o>0&&o<=i?{perRow:i,slotWidth:r/o,preferredMaxWidth:n}:{perRow:i,slotWidth:r/i,preferredMaxWidth:n}}var Ek=class{constructor(e){this.options=e,this.closed=!1,this.handleDocumentClick=n=>{var i,o;this.options.sticky||n.target instanceof Node&&(this.root.contains(n.target)||this.options.anchor.contains(n.target)||(o=(i=this.options).shouldKeepOpenForTarget)!=null&&o.call(i,n.target)||this.close())},ire(),this.items=e.items,this.commandsDisabled=e.commandsDisabled,this.root=document.createElement("div"),this.syncRootClasses(),this.root.setAttribute("role","toolbar");let t=e.anchor.getAttribute("aria-label");t&&this.root.setAttribute("aria-label",t),this.renderButtons(),this.applyChromeLayout(),e.host.appendChild(this.root),this.syncPosition(),e.sticky||document.addEventListener("mousedown",this.handleDocumentClick,!0)}get sticky(){return this.options.sticky}get anchor(){return this.options.anchor}get rootElement(){return this.root}setHidden(e){this.root.hidden=e,this.root.style.visibility=e?"hidden":"",this.root.style.pointerEvents=e?"none":""}refresh(e,t){this.items=e,t!==void 0&&(this.commandsDisabled=t),this.renderButtons(),this.applyChromeLayout(),this.syncPosition()}containsTarget(e){return this.root.contains(e)}refreshLocale(){for(let e of Array.from(this.root.querySelectorAll(".ml-ex-ui-toolbar-btn"))){let t=e.dataset.toolbarItemId;if(!t)continue;let n=this.items.find(s=>s.id===t);if(!n||Ao(n))continue;let i=Gb(n),o=i.label?this.options.i18n.t(i.label):i.id;e.title=o,e.setAttribute("aria-label",o);let a=e.querySelector(".ml-ex-ui-toolbar-btn-label, .ml-ex-ui-toolbar-btn-text");a&&(a.textContent=o)}}syncPosition(){if(!this.root.isConnected)return;this.root.hidden||this.applyChromeLayout();let{host:e,toolbarRoot:t,anchor:n,placement:i,chrome:o}=this.options,a=this.options.position??"front",s=o.edgeOffset,l=e.getBoundingClientRect(),c=t.getBoundingClientRect(),u=n.getBoundingClientRect(),h=this.root.offsetWidth,d=this.root.offsetHeight,p=e.clientWidth,f=e.clientHeight,m=this.options.getCrossAxisInset(),g=i==="left"||i==="right",y=o.size==="stretch",b,v;if(i==="right"?(b=c.left-l.left-h-s,v=y?m.near:this.resolveMainAxisOffset({position:a,axis:"vertical",toolbarRect:c,hostRect:l,anchorRect:u,subSize:d})):i==="left"?(b=c.right-l.left+s,v=y?m.near:this.resolveMainAxisOffset({position:a,axis:"vertical",toolbarRect:c,hostRect:l,anchorRect:u,subSize:d})):i==="top"?(b=y?m.near:this.resolveMainAxisOffset({position:a,axis:"horizontal",toolbarRect:c,hostRect:l,anchorRect:u,subSize:h}),v=c.bottom-l.top+s):(b=y?m.near:this.resolveMainAxisOffset({position:a,axis:"horizontal",toolbarRect:c,hostRect:l,anchorRect:u,subSize:h}),v=c.top-l.top-d-s),g){let x=m.near,w=Math.max(x,f-d-m.far);v=Math.min(Math.max(x,v),w),y&&(b=m.near)}else{let x=m.near,w=Math.max(x,p-h-m.far);if(b=y?m.near:Math.min(Math.max(x,b),w),i==="bottom"){let _=c.top-l.top-d-s,A=m.near;v=Math.min(_,Math.max(A,v))}else{let _=m.near,A=Math.max(_,f-d-m.far);v=Math.min(Math.max(_,v),A)}}this.root.style.left=`${b}px`,this.root.style.top=`${v}px`}resolveMainAxisOffset(e){let{position:t,axis:n,toolbarRect:i,hostRect:o,anchorRect:a,subSize:s}=e;if(t==="auto")return n==="horizontal"?a.left-o.left:a.top-o.top;if(t==="center")return n==="horizontal"?i.left-o.left+(i.width-s)/2:i.top-o.top+(i.height-s)/2;let l=this.queryVisibleButtons(this.options.toolbarRoot),c=this.queryVisibleButtons(this.root),u=t==="front"?l[0]:l[l.length-1],h=t==="front"?c[0]:c[c.length-1];if(!u||!h)return t==="front"?n==="horizontal"?i.left-o.left:i.top-o.top:n==="horizontal"?i.right-o.left-s:i.bottom-o.top-s;let d=u.getBoundingClientRect(),p=this.root.getBoundingClientRect(),f=h.getBoundingClientRect();if(n==="horizontal"){if(t==="front"){let y=f.left-p.left;return d.left-o.left-y}let g=f.left-p.left;return d.right-o.left-g-f.width}if(t==="front"){let g=f.top-p.top;return d.top-o.top-g}let m=f.top-p.top;return d.bottom-o.top-m-f.height}queryVisibleButtons(e){return Array.from(e.querySelectorAll(".ml-ex-ui-toolbar-btn:not([hidden])"))}close(){var e,t;this.closed||(this.closed=!0,document.removeEventListener("mousedown",this.handleDocumentClick,!0),this.root.remove(),(t=(e=this.options).onClose)==null||t.call(e))}syncRootClasses(){let{chrome:e,placement:t}=this.options,n=t==="left"||t==="right",i=["ml-ex-ui-subtoolbar",`is-${t}`,n?"is-vertical":"is-horizontal"];e.showLabels&&i.push("has-labels"),e.size==="stretch"&&i.push("is-stretch"),e.overflow==="wrap"&&i.push("is-overflow-wrap"),e.showBorder||i.push("no-border"),e.showButtonBorder&&i.push("show-button-border"),e.showChildrenIndicator&&i.push("show-children-indicator"),this.root.className=i.join(" ")}applyChromeLayout(){this.applyStretchSize(),this.applyOverflowLayout(),this.applyWrapPackLayout(),this.applyLabeledButtonMaxWidth()}applyLabeledButtonMaxWidth(){let{chrome:e}=this.options;if(!e.showLabels||this.root.classList.contains("is-wrap-pack")){if(!e.showLabels)for(let t of this.queryVisibleButtons(this.root))t.style.removeProperty("max-width");return}for(let t of this.queryVisibleButtons(this.root)){let n=t.offsetHeight;n<=0||(t.style.maxWidth=`${Math.max(24,n-4)}px`)}}applyWrapPackLayout(){let{chrome:e,placement:t,host:n}=this.options,i=t==="top"||t==="bottom",o=this.queryVisibleButtons(this.root),a=()=>{for(let m of o)m.style.removeProperty("flex"),m.style.removeProperty("width"),m.style.removeProperty("max-width"),delete m.dataset.wrapPackRow};if(!i||e.size!=="stretch"||e.overflow!=="wrap"){this.root.classList.remove("is-wrap-pack"),a();return}if(o.length===0)return;let s=this.options.getCrossAxisInset(),l=Math.max(0,n.clientWidth-s.near-s.far);l>0&&this.root.style.width!==`${l}px`&&(this.root.style.width=`${l}px`);let c=this.root.clientWidth>0?this.root.clientWidth:l;if(c<=0){this.root.classList.remove("is-wrap-pack"),a();return}for(let m of o)m.style.flex="0 0 auto",m.style.width="auto",m.style.removeProperty("max-width");let u=Math.max(...o.map(m=>m.offsetHeight),1),{perRow:h,slotWidth:d}=nNe(c,u,o.length);this.root.classList.add("is-wrap-pack");let p=o.length<=h,f=p?o.length:Math.floor(o.length/h)*h;o.forEach((m,g)=>{m.style.flex=`0 0 ${d}px`,m.style.width=`${d}px`,m.style.maxWidth=`${d}px`,m.dataset.wrapPackRow=p||g<f?"full":"last"})}applyStretchSize(){let{host:e,placement:t,chrome:n}=this.options;if(n.size!=="stretch"){this.root.style.removeProperty("width"),this.root.style.removeProperty("height");return}let i=this.options.getCrossAxisInset();if(t==="left"||t==="right"){let o=Math.max(0,e.clientHeight-i.near-i.far);this.root.style.height=`${o}px`,this.root.style.removeProperty("width")}else{let o=Math.max(0,e.clientWidth-i.near-i.far);this.root.style.width=`${o}px`,this.root.style.removeProperty("height")}}applyOverflowLayout(){let{host:e,placement:t,chrome:n}=this.options;if(n.overflow!=="wrap"){n.size!=="stretch"&&(this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height"));return}let i=this.options.getCrossAxisInset();if(t==="left"||t==="right"){let o=Math.max(0,e.clientHeight-i.near-i.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${o}px`),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width")}else{let o=Math.max(0,e.clientWidth-i.near-i.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${o}px`),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height")}}renderButtons(){this.root.replaceChildren();let{chrome:e}=this.options;this.items.forEach(t=>{var n;if(Ao(t)){if(!e.showSeparators)return;let a=document.createElement("div");a.className="ml-ex-ui-toolbar-separator",a.setAttribute("role","separator"),t.id&&(a.dataset.toolbarItemId=t.id),this.root.appendChild(a);return}let i=Gb(t),o=document.createElement("button");if(o.type="button",o.className="ml-ex-ui-toolbar-btn",o.title=i.label?this.options.i18n.t(i.label):i.id,o.setAttribute("aria-label",o.title),o.dataset.toolbarItemId=i.id,i.toggle){let a=i.toggle.getValue();o.setAttribute("aria-pressed",String(a)),o.classList.toggle("is-toggled",a)}if(((n=i.children)!=null&&n.length||Od(t))&&(o.classList.add("has-children"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false")),i.icon)o.appendChild(Ll(i.icon));else if(i.label&&!e.showLabels){let a=document.createElement("span");a.className="ml-ex-ui-toolbar-btn-text",a.textContent=this.options.i18n.t(i.label),a.style.fontSize="11px",a.style.padding="0 4px",o.appendChild(a)}if(e.showLabels&&i.label){let a=document.createElement("span");a.className="ml-ex-ui-toolbar-btn-label",a.textContent=this.options.i18n.t(i.label),o.appendChild(a)}o.disabled=nre(i)&&this.commandsDisabled||rre(i),o.addEventListener("click",a=>{var s;if(a.stopPropagation(),o.disabled)return;this.options.onSelect(i,o);let l=!!((s=i.children)!=null&&s.length)||Od(t);!this.options.sticky&&!l&&this.close()}),this.root.appendChild(o)})}},rNe=class ore{constructor(e){this.options=e,this.isDisabled=!1,this.openMode=at.Read,this.hasDocument=!1,this.selectedChildByParent=new Map,this.visible=!0,this.overflowItems=[],this.overflowMenuActive=!1,this.renderedEntries=[],ire(),this.mountHost=e.host,this.themeHost=e.themeHost??e.host,this.edgeOffset=e.edgeOffset??8,this.sideOffset=e.sideOffset??0,this.showBorder=e.showBorder??!0,this.showButtonBorder=e.showButtonBorder??!1,this.showSeparators=e.showSeparators??!0,this.showChildrenIndicator=e.showChildrenIndicator??!0,this.inCanvasParent=e.inCanvasParent===!0,this.items=e.items,this.collapsed=!!e.collapsible&&!!e.defaultCollapsed,e.overflow===void 0&&(e.overflow="menu"),this.seedSelectedChildren(e.items),this.ensureMountHostLayout(),this.root=document.createElement("div"),this.syncRootClasses(),this.root.setAttribute("role","toolbar"),this.overflowButton=document.createElement("button"),this.overflowButton.type="button",this.overflowButton.className="ml-ex-ui-toolbar-btn ml-ex-ui-toolbar-overflow-btn",this.overflowButton.dataset.toolbarItemId="toolbar-overflow",this.overflowButton.hidden=!0,this.overflowButton.appendChild(Ll(fte)),this.overflowButton.addEventListener("click",t=>{t.stopPropagation(),!this.overflowButton.hidden&&this.toggleOverflowMenu()}),this.mountHost.appendChild(this.root),this.ensureInParentLayout(),this.setupResizeObserver(),e.docState?this.setDocState(e.docState):this.renderButtons()}setDocState(e){e.hasDocument!==void 0&&(this.hasDocument=e.hasDocument),e.isOpening!==void 0&&(this.isDisabled=e.isOpening,e.isOpening&&this.closeChildrenUi()),e.openMode!==void 0&&(this.openMode=e.openMode),this.syncRootClasses(),this.renderButtons()}updateItems(e){this.items=e,this.seedSelectedChildren(e),this.renderButtons()}applyViewOptions(e){e.placement!==void 0&&(this.options.placement=e.placement),e.edgeOffset!==void 0&&(this.edgeOffset=Math.max(0,e.edgeOffset)),e.sideOffset!==void 0&&(this.sideOffset=Math.max(0,e.sideOffset)),e.collapsible!==void 0&&(this.options.collapsible=e.collapsible,e.collapsible||(this.collapsed=!1)),e.defaultCollapsed!==void 0&&(this.collapsed=!!this.options.collapsible&&!!e.defaultCollapsed),e.showLabels!==void 0&&(this.options.showLabels=e.showLabels),e.size!==void 0&&(this.options.size=e.size),e.overflow!==void 0&&(this.options.overflow=e.overflow),e.showBorder!==void 0&&(this.showBorder=e.showBorder),e.showButtonBorder!==void 0&&(this.showButtonBorder=e.showButtonBorder),e.showSeparators!==void 0&&(this.showSeparators=e.showSeparators),e.showChildrenIndicator!==void 0&&(this.showChildrenIndicator=e.showChildrenIndicator,this.options.showChildrenIndicator=e.showChildrenIndicator),e.subToolbar!==void 0&&(this.options.subToolbar=e.subToolbar),e.inCanvasParent!==void 0&&(this.inCanvasParent=e.inCanvasParent,this.options.inCanvasParent=e.inCanvasParent),e.items!==void 0&&(this.items=e.items,this.seedSelectedChildren(e.items)),this.syncRootClasses(),this.ensureInParentLayout(),this.renderButtons(),this.scheduleSyncPosition()}refresh(){this.renderButtons()}refreshLocale(){var e,t;this.syncOverflowButtonLabels(),this.syncCollapseToggleButton();for(let{item:n,element:i,isSeparator:o}of this.renderedEntries){if(o)continue;let a=i,s=a1(n,this.selectedChildByParent.get(n.id)),l=s.label?this.options.i18n.t(s.label):s.id;a.title=l,a.setAttribute("aria-label",l);let c=a.querySelector(".ml-ex-ui-toolbar-btn-label, .ml-ex-ui-toolbar-btn-text");c&&(c.textContent=l)}(e=this.openSubToolbar)==null||e.refreshLocale(),(t=this.openNestedSubToolbar)==null||t.refreshLocale()}get replaceOnNested(){return this.resolveSubToolbarChrome().replaceOnNested===!0}dismissOpenChildren(){this.closeChildrenUi()}notifyExclusiveOpen(){var e,t;this.replaceOnNested&&((t=(e=this.options).onExclusiveOpen)==null||t.call(e))}setPlacement(e){this.options.placement!==e&&(this.options.placement=e,this.selectedChildByParent.set("toolbar-placement",`placement-${e}`),this.syncRootClasses(),this.ensureInParentLayout(),this.renderButtons())}getEdgeOffset(){return this.edgeOffset}setEdgeOffset(e){this.edgeOffset=Math.max(0,e),this.scheduleSyncPosition()}getSideOffset(){return this.sideOffset}setSideOffset(e){this.sideOffset=Math.max(0,e),this.scheduleSyncPosition()}resolveSubToolbarChrome(){return QFe({edgeOffset:this.edgeOffset,sideOffset:this.sideOffset,showLabels:this.options.showLabels,size:this.options.size,overflow:this.options.overflow,showBorder:this.showBorder,showButtonBorder:this.showButtonBorder,showSeparators:this.showSeparators,showChildrenIndicator:this.showChildrenIndicator},this.options.subToolbar)}getCrossAxisInset(){return this.getOrientationClass()==="horizontal"?this.options.placement==="top"?{near:this.edgeOffset,far:this.sideOffset}:{near:this.sideOffset,far:this.edgeOffset}:this.options.placement==="left"?{near:this.sideOffset,far:this.edgeOffset}:{near:this.edgeOffset,far:this.sideOffset}}reparentTo(e){var t;if(this.mountHost===e){!this.root.isConnected&&e.isConnected&&e.appendChild(this.root),this.syncInParentLayout();return}(t=this.resizeObserver)==null||t.disconnect(),this.releaseInParentLayout({keepRoot:!0}),this.root.remove(),this.mountHost=e,this.ensureMountHostLayout(),this.mountHost.appendChild(this.root),this.ensureInParentLayout(),this.setupResizeObserver(),this.scheduleSyncPosition()}syncInParentLayout(){this.ensureInParentLayout(),this.setupResizeObserver(),this.scheduleSyncPosition()}setSelectedChild(e,t){this.selectedChildByParent.set(e,t)}get placement(){return this.options.placement}get isCollapsed(){return this.collapsed}get isVisible(){return this.visible}isRootConnected(){return this.root.isConnected}setVisible(e){var t,n;this.visible!==e&&(this.visible=e,this.root.hidden=!e,e||(this.closeChildrenUi(),(n=(t=this.options).onCollapse)==null||n.call(t)))}getLayerButtonAnchor(){return this.options.collapsible&&this.collapsed&&this.setCollapsed(!1),this.root.querySelector('[data-toolbar-item-id="layer"]')??void 0}setCollapsed(e){var t,n;!this.options.collapsible||this.collapsed===e||(this.collapsed=e,e&&(this.closeChildrenUi(),(n=(t=this.options).onCollapse)==null||n.call(t)),this.syncRootClasses(),this.syncCollapseToggleButton(),this.scheduleSyncPosition())}destroy(){var e;this.layoutFrame!==void 0&&(cancelAnimationFrame(this.layoutFrame),this.layoutFrame=void 0),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0,this.closeChildrenUi(),this.releaseInParentLayout({keepRoot:!1}),this.root.remove()}isStretchSize(){return this.options.size==="stretch"}getOrientationClass(){return this.options.placement==="left"||this.options.placement==="right"?"vertical":"horizontal"}syncRootClasses(){let e=["ml-ex-ui-toolbar",`is-${this.getOrientationClass()}`,`is-${this.options.placement}`];this.collapsed&&e.push("is-collapsed"),this.isDisabled&&e.push("is-disabled"),this.options.showLabels&&e.push("has-labels"),this.options.size==="stretch"&&e.push("is-stretch"),this.inCanvasParent&&e.push("is-in-parent"),this.options.overflow==="wrap"&&e.push("is-overflow-wrap"),this.options.overflow==="menu"&&e.push("is-overflow-menu"),this.showBorder||e.push("no-border"),this.showButtonBorder&&e.push("show-button-border"),this.showChildrenIndicator&&e.push("show-children-indicator"),this.root.className=e.join(" ")}populateButtonContent(e,t){if(t.icon)e.appendChild(Ll(t.icon));else if(t.label&&!this.options.showLabels){let n=document.createElement("span");n.className="ml-ex-ui-toolbar-btn-text",n.textContent=this.options.i18n.t(t.label),n.style.fontSize="11px",n.style.padding="0 4px",e.appendChild(n)}if(this.options.showLabels&&t.label){let n=document.createElement("span");n.className="ml-ex-ui-toolbar-btn-label",n.textContent=this.options.i18n.t(t.label),e.appendChild(n)}}toggleCollapsed(){this.setCollapsed(!this.collapsed)}getCollapseToggleIcon(){return this.options.placement==="top"||this.options.placement==="bottom"?this.collapsed?dte:pte:this.collapsed?C3e:E3e}syncCollapseToggleButton(e){let t=e??this.root.querySelector('[data-toolbar-item-id="toolbar-collapse"]');if(!t)return;let n=this.collapsed?"toolbar.expand":"toolbar.collapse";t.replaceChildren(Ll(this.getCollapseToggleIcon())),t.title=this.options.i18n.t(n),t.setAttribute("aria-label",t.title),t.setAttribute("aria-expanded",String(!this.collapsed))}appendCollapseToggle(){if(!this.options.collapsible)return;if(this.showSeparators){let t=document.createElement("div");t.className="ml-ex-ui-toolbar-separator",t.setAttribute("role","separator"),this.root.appendChild(t)}let e=document.createElement("button");e.type="button",e.className="ml-ex-ui-toolbar-btn ml-ex-ui-toolbar-collapse-btn",e.dataset.toolbarItemId="toolbar-collapse",this.syncCollapseToggleButton(e),e.addEventListener("click",t=>{t.stopPropagation(),this.toggleCollapsed()}),this.root.appendChild(e)}renderButtons(){let e=this.stickyParentId;this.closeChildrenUi(),this.root.replaceChildren(),this.renderedEntries=[],this.overflowItems=[],jz(this.items,this.openMode).forEach(t=>{var n;if(Ao(t)){if(!this.showSeparators)return;let s=document.createElement("div");s.className="ml-ex-ui-toolbar-separator",s.setAttribute("role","separator"),t.id&&(s.dataset.toolbarItemId=t.id),this.root.appendChild(s),this.renderedEntries.push({item:t,element:s,isSeparator:!0});return}let i=a1(t,this.selectedChildByParent.get(t.id)),o=document.createElement("button");o.type="button",o.className="ml-ex-ui-toolbar-btn",o.title=i.label?this.options.i18n.t(i.label):i.id,o.setAttribute("aria-label",o.title),o.dataset.toolbarItemId=i.id,((n=i.children)!=null&&n.length||Od(t))&&(o.classList.add("has-children"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false")),this.populateButtonContent(o,i);let a=nre(i)&&(this.isDisabled||!this.hasDocument)||rre(i);o.disabled=a,o.addEventListener("click",s=>{s.stopPropagation(),!o.disabled&&this.activateToolbarItem(t,o)}),this.root.appendChild(o),this.renderedEntries.push({item:t,element:o,isSeparator:!1})}),this.options.overflow==="menu"&&(this.syncOverflowButtonLabels(),this.root.appendChild(this.overflowButton)),this.appendCollapseToggle(),this.applyOverflowLayout(),this.scheduleSyncPosition(),e&&!this.collapsed&&this.visible&&this.openStickyChildrenByParentId(e)}activateToolbarItem(e,t){var n;let i=a1(e,this.selectedChildByParent.get(e.id));if((n=i.children)!=null&&n.length||Od(e)){let o=this.resolveStripChildItems(i.children??[]);if(o.length===0)return;if(this.openParentId===e.id){this.closeChildrenUi();return}this.openChildrenUi(e,t,o);return}i.anchorAction?i.anchorAction(t):i.action?i.action():i.command&&this.options.onCommand(i.command),e.toggle&&window.setTimeout(()=>this.renderButtons(),0)}syncOverflowButtonLabels(){let e=this.options.i18n.t("toolbar.moreOverflow");this.overflowButton.title=e,this.overflowButton.setAttribute("aria-label",e)}applyOverflowLayout(){if(this.collapsed||!this.root.isConnected){this.overflowButton.hidden=!0,this.overflowMenuActive=!1;return}if(this.options.overflow==="wrap"){this.applyOverflowWrapLayout();return}this.options.overflow==="menu"&&this.applyOverflowMenuLayout()}applyOverflowWrapLayout(){this.overflowButton.hidden=!0,this.renderedEntries.forEach(o=>{o.element.hidden=!1});let e=this.inCanvasParent?this.sideOffset:this.edgeOffset,t=this.getCrossAxisInset(),n=this.getOrientationClass()==="horizontal",i=this.getLayoutHost();if(n){let o=Math.max(0,i.clientWidth-e*2);if(this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${o}px`),this.inCanvasParent)this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");else{let a=Math.max(0,i.clientHeight-t.near-t.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${a}px`)}}else{if(this.inCanvasParent)this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width");else{let a=Math.max(0,i.clientWidth-t.near-t.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${a}px`)}let o=Math.max(0,i.clientHeight-e*2);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${o}px`)}}getEntryAxisSize(e,t){let n=t?e.offsetWidth:e.offsetHeight;return n>0?n:e.classList.contains("ml-ex-ui-toolbar-separator")?9:36}applyOverflowMenuLayout(){this.closeOverflowMenu(),this.overflowItems=[],this.overflowMenuActive=!1,this.overflowButton.hidden=!0,this.renderedEntries.forEach(o=>{o.element.hidden=!1});let e=this.getOrientationClass()==="horizontal",t=this.getOverflowHostLimit(e),n=this.getToolbarOverflowMeasureSize(e);if(t<=0||this.renderedEntries.length===0){this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");return}if(n<=t){this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");return}this.overflowButton.hidden=!1;let i=this.renderedEntries.length;for(;;){for(let o=0;o<this.renderedEntries.length;o++)this.renderedEntries[o].element.hidden=o>=i;if(this.getToolbarOverflowMeasureSize(e)<=t||i===0)break;i-=1}if(i===0&&this.renderedEntries.length>0){i=1;for(let o=0;o<this.renderedEntries.length;o++)this.renderedEntries[o].element.hidden=o>=i}for(let o=i;o<this.renderedEntries.length;o++){let a=this.renderedEntries[o];a.isSeparator||this.overflowItems.push(a.item)}this.overflowButton.hidden=this.overflowItems.length===0,this.overflowMenuActive=!this.overflowButton.hidden,this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height")}flushToolbarAxisMeasure(){this.root.offsetHeight,this.root.offsetWidth}getToolbarOverflowMeasureSize(e){let t=this.isStretchSize(),n=this.root.style.width,i=this.root.style.height;t&&(this.root.classList.remove("is-stretch"),this.root.style.width=e?"max-content":n,this.root.style.height=e?i:"max-content"),this.flushToolbarAxisMeasure();let o=getComputedStyle(this.root),a=Number.parseFloat(e?o.columnGap||o.gap:o.rowGap||o.gap)||4,s=e?Number.parseFloat(o.paddingLeft)+Number.parseFloat(o.paddingRight):Number.parseFloat(o.paddingTop)+Number.parseFloat(o.paddingBottom),l=e?Number.parseFloat(o.borderLeftWidth)+Number.parseFloat(o.borderRightWidth):Number.parseFloat(o.borderTopWidth)+Number.parseFloat(o.borderBottomWidth),c=(Number.isFinite(s)?s:0)+(Number.isFinite(l)?l:0),u=0;for(let h of Array.from(this.root.children))h instanceof HTMLElement&&!h.hidden&&(u>0&&(c+=a),c+=this.getEntryAxisSize(h,e),u+=1);return t&&(this.root.classList.add("is-stretch"),this.root.style.width=n,this.root.style.height=i,this.flushToolbarAxisMeasure()),c}getToolbarAxisSize(e){this.flushToolbarAxisMeasure();let t=e?this.root.offsetWidth:this.root.offsetHeight;return t>0?t:this.getToolbarOverflowMeasureSize(e)}getOverflowHostLimit(e){let t=this.inCanvasParent?this.sideOffset:this.edgeOffset,n=this.getLayoutHost(),i=e?n.clientWidth:n.clientHeight;return Math.max(0,i-t*2)}toggleOverflowMenu(){if(this.overflowDropdown){this.closeOverflowMenu();return}if(this.overflowItems.length===0)return;this.notifyExclusiveOpen(),this.closeChildrenUi();let e=this.overflowItems.map(t=>a1(t,this.selectedChildByParent.get(t.id))).filter(t=>!Ao(t));this.overflowDropdown=new T1(this.options.i18n,e,this.overflowButton,this.themeHost),this.overflowDropdown.setOnSelect(t=>{this.activateToolbarItem(t,this.overflowButton),this.closeOverflowMenu()}),this.overflowDropdown.setOnClose(()=>{this.overflowDropdown=void 0})}closeOverflowMenu(){var e;(e=this.overflowDropdown)==null||e.close(),this.overflowDropdown=void 0}ensureMountHostLayout(){getComputedStyle(this.mountHost).position==="static"&&(this.mountHost.style.position="relative"),this.mountHost.classList.add("ml-ex-ui-toolbar-host")}getLayoutHost(){return this.inCanvasParent?this.inParentHost??this.mountHost:this.mountHost}getOverlayHost(){return this.options.overlayHost?this.options.overlayHost:this.inCanvasParent&&this.toolbarMain?this.toolbarMain:this.mountHost}ensureInParentLayout(){if(!this.inCanvasParent){this.releaseInParentLayout({keepRoot:!0});return}let e=this.resolveInParentWrapRoot();this.applyInParentHostClasses(e),this.ensureToolbarMainWrapper(e),this.placeToolbarInWrapRoot(e)}resolveInParentWrapRoot(){let e=this.mountHost.querySelector(":scope > .ml-ex-ui-dock-main");return e instanceof HTMLElement?e:this.mountHost}applyInParentHostClasses(e){this.inParentHost&&this.inParentHost!==e&&this.clearInParentHostClasses(this.inParentHost),this.inParentHost=e,e.classList.add("ml-ex-ui-toolbar-in-parent"),e.classList.remove("ml-ex-ui-toolbar-in-parent-top","ml-ex-ui-toolbar-in-parent-bottom","ml-ex-ui-toolbar-in-parent-left","ml-ex-ui-toolbar-in-parent-right"),e.classList.add(`ml-ex-ui-toolbar-in-parent-${this.options.placement}`)}clearInParentHostClasses(e){e&&e.classList.remove(...ore.IN_PARENT_HOST_CLASSES)}shouldSkipInParentMove(e){return e instanceof HTMLElement?e===this.root||e.classList.contains("ml-ex-ui-toolbar")||e.classList.contains("ml-ex-ui-toolbar-main")||e.classList.contains("ml-ex-ui-dock-panel")||e.classList.contains("ml-ex-ui-subtoolbar")||e.classList.contains("ml-ex-ui-dropdown"):!1}ensureToolbarMainWrapper(e){var t;if(((t=this.toolbarMain)==null?void 0:t.parentElement)===e)return;let n=e.querySelector(":scope > .ml-ex-ui-toolbar-main");if(n instanceof HTMLElement){this.toolbarMain=n;return}let i=[];Array.from(e.childNodes).forEach(a=>{this.shouldSkipInParentMove(a)||i.push(a)});let o=document.createElement("div");o.className="ml-ex-ui-toolbar-main",i.forEach(a=>o.appendChild(a)),e.appendChild(o),this.toolbarMain=o}placeToolbarInWrapRoot(e){let t=this.options.placement;if(t==="top"||t==="left"){e.insertBefore(this.root,e.firstChild);return}e.appendChild(this.root)}releaseInParentLayout(e){let t=!!(this.inParentHost||this.toolbarMain);this.clearInParentHostClasses(this.inParentHost),this.inParentHost=void 0,this.releaseToolbarMainWrapper(),this.clearInParentOffsetStyles(),t&&e.keepRoot&&this.root.isConnected&&this.root.parentElement!==this.mountHost&&this.mountHost.isConnected&&this.mountHost.appendChild(this.root)}releaseToolbarMainWrapper(){var e;if(!((e=this.toolbarMain)!=null&&e.isConnected)){this.toolbarMain=void 0;return}let t=this.toolbarMain.parentElement;if(t)for(;this.toolbarMain.firstChild;)t.insertBefore(this.toolbarMain.firstChild,this.toolbarMain);this.toolbarMain.remove(),this.toolbarMain=void 0}clearInParentOffsetStyles(){this.root.style.marginTop="",this.root.style.marginRight="",this.root.style.marginBottom="",this.root.style.marginLeft=""}setupResizeObserver(){var e;(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=new ResizeObserver(()=>{this.scheduleSyncPosition()}),this.resizeObserver.observe(this.mountHost);let t=this.getLayoutHost();t!==this.mountHost&&this.resizeObserver.observe(t),this.toolbarMain&&this.toolbarMain!==t&&this.resizeObserver.observe(this.toolbarMain)}scheduleSyncPosition(){this.layoutFrame===void 0&&(this.layoutFrame=requestAnimationFrame(()=>{var e,t;if(this.layoutFrame=void 0,this.applyOverflowLayout(),this.syncPosition(),this.overflowMenuActive){let n=this.getOrientationClass()==="horizontal",i=this.getOverflowHostLimit(n);this.getToolbarOverflowMeasureSize(n)>i&&(this.applyOverflowMenuLayout(),this.syncPosition())}(e=this.openSubToolbar)==null||e.syncPosition(),(t=this.openNestedSubToolbar)==null||t.syncPosition()}))}syncPosition(){if(!this.root.isConnected||this.root.hidden)return;if(this.inCanvasParent){this.applyInParentPosition();return}this.clearInParentOffsetStyles();let e=this.edgeOffset,t=this.mountHost.clientWidth,n=this.mountHost.clientHeight;if(t<=0||n<=0)return;this.root.style.top="",this.root.style.bottom="",this.root.style.left="",this.root.style.right="",this.root.style.transform="",this.root.style.width="",this.root.style.height="",this.root.style.maxWidth="",this.root.style.maxHeight="";let i=this.getToolbarAxisSize(!0),o=this.getToolbarAxisSize(!1),a=this.options.placement,s=this.isStretchSize();if(a==="top"||a==="bottom"){if(s)this.root.style.left="0",this.root.style.right="0",this.root.style.width=`${t}px`,this.root.style.maxWidth=`${t}px`;else{let l=Math.max(e,t-i-e),c=(t-i)/2,u=Math.min(l,Math.max(e,c));this.root.style.left=`${u}px`,this.root.style.maxWidth=`${Math.max(0,t-e*2)}px`}a==="top"?this.root.style.top=`${e}px`:this.root.style.bottom=`${e}px`;return}if(s){let l=Math.max(0,n-e*2);this.root.style.height=`${l}px`,this.root.style.top=`${e}px`}else{let l=e,c=n-o-e,u=(n-o)/2,h=c>=l?Math.min(c,Math.max(l,u)):c;this.root.style.top=`${h}px`}a==="left"?this.root.style.left=`${e}px`:this.root.style.right=`${e}px`}applyInParentPosition(){this.root.style.top="",this.root.style.bottom="",this.root.style.left="",this.root.style.right="",this.root.style.transform="",this.root.style.width="",this.root.style.height="",this.root.style.maxWidth="",this.root.style.maxHeight="";let e=this.edgeOffset,t=this.sideOffset,n=this.options.placement;n==="top"||n==="bottom"?(this.root.style.marginTop=n==="bottom"?`${e}px`:"0",this.root.style.marginBottom=n==="top"?`${e}px`:"0",this.root.style.marginLeft=`${t}px`,this.root.style.marginRight=`${t}px`):(this.root.style.marginLeft=n==="right"?`${e}px`:"0",this.root.style.marginRight=n==="left"?`${e}px`:"0",this.root.style.marginTop=`${t}px`,this.root.style.marginBottom=`${t}px`)}seedSelectedChildren(e){var t;for(let n of e)Ao(n)||(n.childIcon==="selected"&&n.selectedChildId&&this.selectedChildByParent.set(n.id,n.selectedChildId),!Od(n)&&(t=n.children)!=null&&t.length&&this.seedSelectedChildren(n.children))}resolveStripChildItems(e){return jz(e,this.openMode).map(t=>a1(t,this.selectedChildByParent.get(t.id)))}closeChildrenUi(){var e,t;this.closeOverflowMenu(),this.closeNestedSubToolbar(),(e=this.openDropdown)==null||e.close(),this.openDropdown=void 0,(t=this.openSubToolbar)==null||t.close(),this.openSubToolbar=void 0,this.clearParentOpenState(),this.openParentId=void 0,this.stickyParentId=void 0}clearParentOpenState(){this.openParentButton&&(this.openParentButton.classList.remove("is-open"),this.openParentButton.setAttribute("aria-expanded","false"),this.openParentButton instanceof HTMLElement&&this.openParentButton.blur(),this.openParentButton=void 0)}markParentOpen(e){this.clearParentOpenState(),e.classList.add("is-open"),e.setAttribute("aria-expanded","true"),this.openParentButton=e}openChildrenUi(e,t,n){var i;this.notifyExclusiveOpen(),this.closeChildrenUi();let o=LF(e);if(this.openParentId=e.id,this.markParentOpen(t),eee(o)){let s=o==="sticky-toolbar";this.stickyParentId=s?e.id:void 0;let l=new Ek({i18n:this.options.i18n,items:n,anchor:t,toolbarRoot:this.root,host:this.getOverlayHost(),placement:this.options.placement,sticky:s,chrome:this.resolveSubToolbarChrome(),position:(i=this.options.subToolbar)==null?void 0:i.position,getCrossAxisInset:()=>this.getCrossAxisInset(),commandsDisabled:this.isDisabled||!this.hasDocument,onSelect:(c,u)=>this.handleSubToolbarSelect(e,c,u,s),onClose:()=>{this.openSubToolbar===l&&(this.closeNestedSubToolbar(),this.openSubToolbar=void 0,this.clearParentOpenState(),this.openParentId=void 0,this.stickyParentId=void 0)},shouldKeepOpenForTarget:c=>{var u;return((u=this.openNestedSubToolbar)==null?void 0:u.containsTarget(c))??!1}});this.openSubToolbar=l;return}let a=new T1(this.options.i18n,n,t,this.themeHost);a.setOnSelect(s=>{this.activateChild(e,s,!1)}),a.setOnClose(()=>{this.openDropdown===a&&(this.openDropdown=void 0,this.clearParentOpenState(),this.openParentId=void 0)}),this.openDropdown=a}openStickyChildrenByParentId(e){var t;let n=this.items.find(a=>Ao(a)?!1:a.id===e);if(!((t=n?.children)!=null&&t.length)||LF(n)!=="sticky-toolbar")return;let i=this.root.querySelector(`[data-toolbar-item-id="${e}"]`);if(!i)return;let o=this.resolveStripChildItems(n.children);o.length!==0&&this.openChildrenUi(n,i,o)}handleSubToolbarSelect(e,t,n,i){var o;if(Ao(t))return;let a=Gb(t);if((o=a.children)!=null&&o.length||Od(a)){let s=this.resolveStripChildItems(a.children??[]);if(s.length===0)return;this.openNestedSubToolbarUi(a,n,s,e,i);return}this.activateChild(e,t,i),i||this.closeChildrenUi()}openNestedSubToolbarUi(e,t,n,i,o){var a,s;if(this.openNestedSubToolbar&&this.openNestedSubToolbar.anchor===t){this.closeNestedSubToolbar();return}this.closeNestedSubToolbar();let l=LF(e),c=this.resolveSubToolbarChrome(),u=c.replaceOnNested;if(!eee(l)){let p=new T1(this.options.i18n,n,t,this.themeHost);p.setOnSelect(f=>{var m;this.activateChild(e,f,!1),p.close(),o?(m=this.openSubToolbar)==null||m.refresh(this.resolveStripChildItems(i.children??[]),this.isDisabled||!this.hasDocument):this.closeChildrenUi()}),p.setOnClose(()=>{});return}u&&((a=this.openSubToolbar)==null||a.setHidden(!0));let h=l==="sticky-toolbar",d=new Ek({i18n:this.options.i18n,items:n,anchor:t,toolbarRoot:u||!this.openSubToolbar?this.root:this.openSubToolbar.rootElement,host:this.getOverlayHost(),placement:this.options.placement,sticky:h,chrome:c,position:(s=this.options.subToolbar)==null?void 0:s.position,getCrossAxisInset:()=>this.getCrossAxisInset(),commandsDisabled:this.isDisabled||!this.hasDocument,onSelect:(p,f)=>this.handleSubToolbarSelect(e,p,f,h),onClose:()=>{var p,f;this.openNestedSubToolbar===d&&(this.openNestedSubToolbar=void 0,u&&((p=this.openSubToolbar)==null||p.setHidden(!1),(f=this.openSubToolbar)==null||f.syncPosition()))}});this.openNestedSubToolbar=d}closeNestedSubToolbar(){var e,t;let n=this.resolveSubToolbarChrome().replaceOnNested===!0;(e=this.openNestedSubToolbar)==null||e.close(),this.openNestedSubToolbar=void 0,n&&((t=this.openSubToolbar)==null||t.setHidden(!1))}activateChild(e,t,n){var i;if(Ao(t))return;let o=Gb(t);if(e.childIcon==="selected"&&this.selectedChildByParent.set(e.id,o.id),o.action?o.action():o.command&&this.options.onCommand(o.command),!Ao(t)&&o.id.startsWith("locale-")&&this.refreshLocale(),t.toggle&&n&&this.openSubToolbar){window.setTimeout(()=>{this.openSubToolbar&&this.openSubToolbar.refresh(this.resolveStripChildItems(e.children??[]),this.isDisabled||!this.hasDocument)},0);return}if(e.childIcon==="selected"&&this.openSubToolbar&&this.openParentId&&e.id!==this.openParentId){let a=this.items.find(s=>Ao(s)?!1:s.id===this.openParentId);(i=a?.children)!=null&&i.length&&window.setTimeout(()=>{!this.openSubToolbar||!a.children||this.openSubToolbar.refresh(this.resolveStripChildItems(a.children),this.isDisabled||!this.hasDocument)},0)}t.toggle?window.setTimeout(()=>this.renderButtons(),0):(e.childIcon==="selected"||e.toggle)&&this.renderButtons()}};rNe.IN_PARENT_HOST_CLASSES=["ml-ex-ui-toolbar-in-parent","ml-ex-ui-toolbar-in-parent-top","ml-ex-ui-toolbar-in-parent-bottom","ml-ex-ui-toolbar-in-parent-left","ml-ex-ui-toolbar-in-parent-right"];export{Y as AcApDocManager};
  7785. /*! Bundled license information:
  7786. three/build/three.core.js:
  7787. three/build/three.module.js:
  7788. (**
  7789. * @license
  7790. * Copyright 2010-2024 Three.js Authors
  7791. * SPDX-License-Identifier: MIT
  7792. *)
  7793. @mlightcad/mtext-renderer/dist/index.js:
  7794. (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
  7795. (*!
  7796. * The buffer module from node.js, for the browser.
  7797. *
  7798. * @author Feross Aboukhadijeh <https://feross.org>
  7799. * @license MIT
  7800. *)
  7801. (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
  7802. lodash-es/lodash.js:
  7803. (**
  7804. * @license
  7805. * Lodash (Custom Build) <https://lodash.com/>
  7806. * Build: `lodash modularize exports="es" -o ./`
  7807. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  7808. * Released under MIT license <https://lodash.com/license>
  7809. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  7810. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7811. *)
  7812. */