index-2a36a227-1694138600520.js 767 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911
  1. import {
  2. b8 as openBlock,
  3. ah as createElementBlock,
  4. ai as createBaseVNode,
  5. aY as normalizeClass,
  6. d as defineComponent,
  7. r as ref,
  8. a as useRoute,
  9. n as onMounted,
  10. E as nextTick,
  11. O as onUnmounted,
  12. y as watch,
  13. f as createVNode,
  14. k as createTextVNode,
  15. dl as NInputNumber,
  16. w as NSpace,
  17. j as NButton,
  18. t as NImage,
  19. dm as getSecond,
  20. V as dayjs,
  21. x as mergeProps,
  22. F as Fragment,
  23. c as useUserStore,
  24. dn as NSkeleton,
  25. c3 as commonjsGlobal,
  26. c4 as getDefaultExportFromCjs,
  27. L as computed,
  28. a_ as normalizeStyle,
  29. bB as toRefs,
  30. e as reactive,
  31. v as NModal,
  32. b as useMessage,
  33. u as useRouter,
  34. T as Transition,
  35. dp as NDrawer,
  36. dq as NDrawerContent,
  37. R as px2vw,
  38. aU as isVNode
  39. } from './index-6f73a5a0-1694138600520.js';
  40. import {
  41. T as TCPlayer,
  42. b as iconplay,
  43. c as iconpause,
  44. d as iconReplay$2,
  45. f as tickMp3,
  46. V as Vudio,
  47. N as NScrollbar
  48. } from './contants-b5c5ecbc-1694138600520.js';
  49. import { N as NSlider } from './Slider-51f6cd78-1694138600520.js';
  50. import {
  51. c as lessonCoursewareDetail,
  52. h as lessonPreTrainingPage,
  53. C as CardType,
  54. q as queryCourseware,
  55. u as courseScheduleUpdate
  56. } from './isCollaose-94c46d24-1694138600520.js';
  57. import { a as TrainSettings } from './index-972d5f96-1694138600520.js';
  58. import { v as vaildUrl } from './urlUtils-b7caaee8-1694138600520.js';
  59. import { d as dingPng$1, m as moveTop } from './ding-8e9054d5-1694138600520.js';
  60. import { s as state } from './state-72990c21-1694138600520.js';
  61. const timerWrap = '_timerWrap_1ilvi_1',
  62. timerTop = '_timerTop_1ilvi_8',
  63. timerTopPane = '_timerTopPane_1ilvi_19',
  64. timerTopPaneActive = '_timerTopPaneActive_1ilvi_25',
  65. timerItemInfo = '_timerItemInfo_1ilvi_30',
  66. timerItemInset = '_timerItemInset_1ilvi_38',
  67. timerItemInfoTop = '_timerItemInfoTop_1ilvi_43',
  68. dot = '_dot_1ilvi_50',
  69. dotTop = '_dotTop_1ilvi_58',
  70. timerItemTopCore = '_timerItemTopCore_1ilvi_62',
  71. nowTimerWrap = '_nowTimerWrap_1ilvi_74',
  72. btnGroupModal$2 = '_btnGroupModal_1ilvi_86',
  73. palyIcon = '_palyIcon_1ilvi_93',
  74. playText = '_playText_1ilvi_97',
  75. countInput = '_countInput_1ilvi_100',
  76. dotBtm = '_dotBtm_1ilvi_120',
  77. chioseWrap = '_chioseWrap_1ilvi_124',
  78. add$1 = '_add_1ilvi_144',
  79. minus$1 = '_minus_1ilvi_149',
  80. chioseHidden = '_chioseHidden_1ilvi_154',
  81. numberWrap = '_numberWrap_1ilvi_157',
  82. styles$7 = {
  83. timerWrap,
  84. timerTop,
  85. timerTopPane,
  86. timerTopPaneActive,
  87. timerItemInfo,
  88. timerItemInset,
  89. timerItemInfoTop,
  90. dot,
  91. dotTop,
  92. timerItemTopCore,
  93. nowTimerWrap,
  94. btnGroupModal: btnGroupModal$2,
  95. palyIcon,
  96. playText,
  97. countInput,
  98. dotBtm,
  99. chioseWrap,
  100. add: add$1,
  101. minus: minus$1,
  102. chioseHidden,
  103. numberWrap
  104. },
  105. flipper_vue_vue_type_style_index_0_lang = '',
  106. _export_sfc$1 = (e, t) => {
  107. const r = e.__vccOpts || e;
  108. for (const [i, s] of t) r[i] = s;
  109. return r;
  110. },
  111. _sfc_main$1 = {
  112. name: 'FlipClock',
  113. data() {
  114. return {
  115. isFlipping: !1,
  116. flipType: 'down',
  117. frontTextFromData: 0,
  118. backTextFromData: 1
  119. };
  120. },
  121. props: {
  122. frontText: { type: [Number, String], default: 0 },
  123. backText: { type: [Number, String], default: 1 },
  124. duration: { type: Number, default: 600 }
  125. },
  126. methods: {
  127. _textClass(e) {
  128. return 'number' + e;
  129. },
  130. _flip(e, t, r) {
  131. console.log(e, t, r, '=====>'),
  132. (this.frontTextFromData = t),
  133. (this.backTextFromData = r),
  134. (this.flipType = e),
  135. (this.isFlipping = !0),
  136. setTimeout(() => {
  137. (this.isFlipping = !1), (this.frontTextFromData = r);
  138. }, this.duration);
  139. },
  140. flipDown(e, t) {
  141. this._flip('down', e, t);
  142. },
  143. flipUp(e, t) {
  144. this._flip('up', e, t);
  145. },
  146. setFront(e) {
  147. this.frontTextFromData = e;
  148. },
  149. setBack(e) {
  150. this.backTextFromData = e;
  151. }
  152. },
  153. created() {
  154. (this.frontTextFromData = this.frontText),
  155. (this.backTextFromData = this.backText);
  156. }
  157. };
  158. function _sfc_render$1(e, t, r, i, s, a) {
  159. return (
  160. openBlock(),
  161. createElementBlock(
  162. 'div',
  163. {
  164. class: normalizeClass(['M-Flipper', [s.flipType, { go: s.isFlipping }]])
  165. },
  166. [
  167. createBaseVNode(
  168. 'div',
  169. {
  170. class: normalizeClass([
  171. 'digital front',
  172. a._textClass(s.frontTextFromData)
  173. ])
  174. },
  175. null,
  176. 2
  177. ),
  178. createBaseVNode(
  179. 'div',
  180. {
  181. class: normalizeClass([
  182. 'digital back',
  183. a._textClass(s.backTextFromData)
  184. ])
  185. },
  186. null,
  187. 2
  188. )
  189. ],
  190. 2
  191. )
  192. );
  193. }
  194. const Flipper = _export_sfc$1(_sfc_main$1, [['render', _sfc_render$1]]),
  195. playIcon =
  196. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAcCAYAAABlL09dAAAAAXNSR0IArs4c6QAAAR1JREFUSEvV1rFOwlAYxfH/eQx2VgcfBJ+AOMqCE5uB6OITyAPwCPogKBMOOhITQuLkaq45iU1KKL2X9nbgWzq0/X03/dpzKzoqhRAE3AAD4BNYSFq17Wf4HngoQb/AEzCT9NO0geEvoFcBbICxpJcmuOEQufEZuJXkRsmVAhvzI5kCc0l+VNFKhQtoCYwk+Vhbp8LGkobbBC5WWjvcNnDRoHK4OeDK4eaCy8O9lrTODbvBN3DRBWx8clbwDrjMveJXYCjpPRfsLJk5bossyQE7Vh2ve+nXBjbkOPWXd1BNYIfQ3DFat8OcCmePzYPh5MjjyuGkwB9A/8hmenQ4KfAd8Fi6MGmHiMK+IIQwAq6A7f9L/ha7MXbef0Gd1B+5cJ8q7osJlgAAAABJRU5ErkJggg==',
  197. suspend =
  198. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAcCAYAAAB75n/uAAAAAXNSR0IArs4c6QAAAMlJREFUSEvtlj0OwUEQxX+voXARtZBwAgWVA2hVOgfQ6FQ0DkLCBSioxRncgObJikr+X4msaqfaZF/ey8zO7BsRORT4bQ+AOdAEbuEsaVdV23YDWAAjoA4cgJmkuz7k2wyyYVUR23ug/8VxBVpB4Ay0MwQukjplWdjuAccc3DgIPIBaBuApKaRbGLYnwCYHtAwCzmOQ9H6jorA9BVY5mHUSCC2eSpS6KA1amoP0m/7FD6Jb5q+m3wVORaYfdqJ4a0v0xausz3+9fwE+w+v3NO9E8gAAAABJRU5ErkJggg==',
  199. add =
  200. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAJhJREFUWEftlzEOQEAURPffgwOhRkPrUFoa1NaBuMeXLyTqsQmS2X7mT95uMvvFgaeffOLUtYdcXFPl6YJYCSIyTT/6VVWjY77IVhVpjHjBAbph1vvAuswgL0hkgxmABEiABEggGIGr1a5iQQoF0ViBWYvKvdUQoycaC/GBAOfH4rUrQBEGe4QMQAIkQAIk8FsCry+nodbzHQqVmosCTFkgAAAAAElFTkSuQmCC',
  201. minus =
  202. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAECAYAAADvRz3UAAAAAXNSR0IArs4c6QAAADNJREFUKFNjXLJ6myfDf4ZZ////l2GgI2BkZHzCwMiQxrhk1bbH9LYc5k+QIwaBAwY4CgCYmB5vQGvODAAAAABJRU5ErkJggg==',
  203. soundWav = '' + new URL('timer-ee5a21d4.wav', import.meta.url).href,
  204. Countdown = defineComponent({
  205. name: 'timer-countdown',
  206. setup() {
  207. ref('positive'), useRoute();
  208. const e = ref(),
  209. t = ref(),
  210. r = ref(),
  211. i = ref(),
  212. s = ref(null),
  213. a = ref(null),
  214. o = ref(new Date());
  215. a.value = setInterval(() => {
  216. o.value = new Date();
  217. }, 1e3);
  218. const n = ref(0),
  219. l = ref(0),
  220. f = ref(0),
  221. g = ref(!1),
  222. S = ref([e, t, r, i]),
  223. c = () => {
  224. const T = '0000';
  225. (l.value = 0), (f.value = 0);
  226. for (let E = 0; E < S.value.length; E++)
  227. S.value[E].value.setFront(T[E]);
  228. },
  229. P = new Audio(soundWav),
  230. d = () => {
  231. (g.value = !0),
  232. (s.value = setInterval(() => {
  233. const T = getSecond(n.value);
  234. if ((n.value == 4 && P.play(), n.value <= 0)) {
  235. x();
  236. return;
  237. }
  238. n.value--;
  239. const E = getSecond(n.value);
  240. for (let _ = 0; _ < S.value.length; _++)
  241. T[_] !== E[_] && S.value[_].value.flipDown(T[_], E[_]);
  242. }, 1e3));
  243. },
  244. p = () => {
  245. setTimeout(() => {
  246. (g.value = !1),
  247. (P.currentTime = 0),
  248. P.pause(),
  249. s.value && (clearInterval(s.value), (s.value = null));
  250. }, 600);
  251. },
  252. x = () => {
  253. g.value
  254. ? (p(),
  255. (n.value = 0),
  256. (P.currentTime = 0),
  257. P.pause(),
  258. setTimeout(() => {
  259. c();
  260. }, 600))
  261. : ((n.value = 0), c());
  262. };
  263. onMounted(() => {
  264. nextTick(() => {
  265. c();
  266. });
  267. }),
  268. onUnmounted(() => {
  269. P.pause();
  270. });
  271. const u = T => {
  272. const E = getSecond(n.value);
  273. (n.value += T), n.value > 3599 ? (n.value = 3599) : n.value;
  274. const _ = getSecond(n.value);
  275. for (let I = 0; I < S.value.length; I++)
  276. E[I] !== _[I] && S.value[I].value.flipDown(E[I], _[I]);
  277. (l.value = Math.floor(n.value / 60)),
  278. (f.value = Math.floor(n.value % 60));
  279. },
  280. y = T => {
  281. const E = getSecond(n.value);
  282. (n.value -= T), n.value < 0 ? (n.value = 0) : n.value;
  283. const _ = getSecond(n.value);
  284. for (let I = 0; I < S.value.length; I++)
  285. E[I] !== _[I] && S.value[I].value.flipUp(E[I], _[I]);
  286. (l.value = Math.floor(n.value / 60)),
  287. (f.value = Math.floor(n.value % 60));
  288. },
  289. m = T => {
  290. let E = parseInt(T.target.value);
  291. Number.isNaN(E) && (E = 0), E > 59 && (E = 59), (l.value = E);
  292. const _ = getSecond(n.value);
  293. console.log(l.value), (n.value = l.value * 60 + f.value);
  294. const I = getSecond(n.value);
  295. console.log(I, _);
  296. for (let B = 0; B < S.value.length; B++) _[B], I[B];
  297. },
  298. A = T => {
  299. let E = parseInt(T.target.value);
  300. Number.isNaN(E) && (E = 0), E > 59 && (E = 59), (f.value = E);
  301. const _ = getSecond(n.value);
  302. n.value = l.value * 60 + f.value;
  303. const I = getSecond(n.value);
  304. for (let B = 0; B < S.value.length; B++)
  305. _[B] !== I[B] && S.value[B].value.flipUp(_[B], I[B]);
  306. };
  307. return (
  308. watch(
  309. () => n.value,
  310. T => {
  311. (l.value = Math.floor(T / 60)), (f.value = Math.floor(T % 60));
  312. }
  313. ),
  314. () =>
  315. createVNode('div', { class: styles$7.timerItemWrap }, [
  316. createVNode('div', { class: styles$7.timerItemInfo }, [
  317. createVNode('div', { class: styles$7.timerItemInset }, [
  318. createVNode('div', { class: styles$7.timerItemInfoTop }, [
  319. createVNode('div', { class: styles$7.timerItemTopCore }, [
  320. createVNode('h4', null, [createTextVNode(' 分')]),
  321. createVNode('div', { class: styles$7.FlipClock }, [
  322. createVNode('div', { class: styles$7.numberWrap }, [
  323. createVNode(Flipper, { ref: e }, null),
  324. createVNode(Flipper, { ref: t }, null)
  325. ]),
  326. createVNode(
  327. 'div',
  328. {
  329. class: [
  330. styles$7.chioseWrap,
  331. g.value ? styles$7.chioseHidden : ''
  332. ]
  333. },
  334. [
  335. createVNode(
  336. 'img',
  337. {
  338. src: add,
  339. class: styles$7.add,
  340. alt: '',
  341. onClick: () => u(60)
  342. },
  343. null
  344. ),
  345. createVNode(
  346. NInputNumber,
  347. {
  348. class: styles$7.countInput,
  349. min: 0,
  350. max: 59,
  351. 'show-button': !1,
  352. onInput: m,
  353. value: l.value,
  354. 'onUpdate:value': T => (l.value = T)
  355. },
  356. null
  357. ),
  358. createVNode(
  359. 'img',
  360. {
  361. src: minus,
  362. class: styles$7.minus,
  363. alt: '',
  364. onClick: () => y(60)
  365. },
  366. null
  367. )
  368. ]
  369. )
  370. ])
  371. ]),
  372. createVNode('div', { class: styles$7.timerItemTopCore }, [
  373. createVNode('div', { class: styles$7.dot }, null),
  374. createVNode('div', { class: styles$7.dot }, null),
  375. createVNode('h4', { class: styles$7.dotBtm }, null)
  376. ]),
  377. createVNode('div', { class: styles$7.timerItemTopCore }, [
  378. createVNode('h4', null, [createTextVNode(' 秒 ')]),
  379. createVNode('div', { class: styles$7.FlipClock }, [
  380. createVNode('div', { class: styles$7.numberWrap }, [
  381. createVNode(Flipper, { ref: r }, null),
  382. createVNode(Flipper, { ref: i }, null)
  383. ]),
  384. createVNode(
  385. 'div',
  386. {
  387. class: [
  388. styles$7.chioseWrap,
  389. g.value ? styles$7.chioseHidden : ''
  390. ]
  391. },
  392. [
  393. createVNode(
  394. 'img',
  395. {
  396. src: add,
  397. class: styles$7.add,
  398. alt: '',
  399. onClick: () => u(1)
  400. },
  401. null
  402. ),
  403. createVNode(
  404. NInputNumber,
  405. {
  406. class: styles$7.countInput,
  407. min: 0,
  408. max: 59,
  409. 'show-button': !1,
  410. value: f.value,
  411. 'onUpdate:value': T => (f.value = T),
  412. onInput: A
  413. },
  414. null
  415. ),
  416. createVNode(
  417. 'img',
  418. {
  419. src: minus,
  420. class: styles$7.minus,
  421. alt: '',
  422. onClick: () => y(1)
  423. },
  424. null
  425. )
  426. ]
  427. )
  428. ])
  429. ])
  430. ])
  431. ])
  432. ]),
  433. createVNode(
  434. NSpace,
  435. { class: styles$7.btnGroupModal, justify: 'center' },
  436. {
  437. default: () => [
  438. createVNode(
  439. NButton,
  440. { round: !0, onClick: () => x() },
  441. { default: () => [createTextVNode('重置')] }
  442. ),
  443. g.value
  444. ? createVNode(
  445. NButton,
  446. {
  447. round: !0,
  448. type: 'primary',
  449. 'icon-placement': 'right',
  450. onClick: () => p()
  451. },
  452. {
  453. default: () =>
  454. createVNode('p', { class: styles$7.playText }, [
  455. createTextVNode('暂停')
  456. ]),
  457. icon: () =>
  458. createVNode(
  459. NImage,
  460. {
  461. previewDisabled: !0,
  462. class: styles$7.palyIcon,
  463. src: suspend
  464. },
  465. null
  466. )
  467. }
  468. )
  469. : createVNode(
  470. NButton,
  471. {
  472. round: !0,
  473. type: 'primary',
  474. disabled: n.value == 0,
  475. 'icon-placement': 'right',
  476. onClick: () => d()
  477. },
  478. {
  479. default: () =>
  480. createVNode('p', { class: styles$7.playText }, [
  481. createTextVNode('开始')
  482. ]),
  483. icon: () =>
  484. createVNode(
  485. NImage,
  486. {
  487. previewDisabled: !0,
  488. class: styles$7.palyIcon,
  489. src: playIcon
  490. },
  491. null
  492. )
  493. }
  494. )
  495. ]
  496. }
  497. )
  498. ])
  499. );
  500. }
  501. }),
  502. Positive = defineComponent({
  503. name: 'timer-positive',
  504. setup() {
  505. ref('positive'), useRoute();
  506. const e = ref(),
  507. t = ref(),
  508. r = ref(),
  509. i = ref(),
  510. s = ref(null),
  511. a = ref(null),
  512. o = ref(new Date());
  513. a.value = setInterval(() => {
  514. o.value = new Date();
  515. }, 1e3);
  516. const n = ref(0),
  517. l = ref(!1),
  518. f = ref([e, t, r, i]),
  519. g = () => {
  520. const d = '0000';
  521. for (let p = 0; p < f.value.length; p++)
  522. f.value[p].value.setFront(d[p]);
  523. },
  524. S = () => {
  525. (l.value = !0),
  526. (s.value = setInterval(() => {
  527. const d = getSecond(n.value);
  528. n.value++;
  529. const p = getSecond(n.value);
  530. for (let x = 0; x < f.value.length; x++)
  531. d[x] !== p[x] && f.value[x].value.flipDown(d[x], p[x]);
  532. }, 1e3));
  533. },
  534. c = () => {
  535. (l.value = !1), s.value && (clearInterval(s.value), (s.value = null));
  536. },
  537. P = () => {
  538. c(),
  539. (n.value = 0),
  540. setTimeout(() => {
  541. g();
  542. }, 600);
  543. };
  544. return (
  545. onMounted(() => {
  546. nextTick(() => {
  547. g();
  548. });
  549. }),
  550. () =>
  551. createVNode('div', { class: styles$7.timerItemWrap }, [
  552. createVNode('div', { class: styles$7.timerItemInfo }, [
  553. createVNode('div', { class: styles$7.timerItemInset }, [
  554. createVNode('div', { class: styles$7.timerItemInfoTop }, [
  555. createVNode('div', { class: styles$7.timerItemTopCore }, [
  556. createVNode('h4', null, [createTextVNode(' 分')]),
  557. createVNode('div', { class: styles$7.FlipClock }, [
  558. createVNode('div', { class: styles$7.numberWrap }, [
  559. createVNode(Flipper, { ref: e }, null),
  560. createVNode(Flipper, { ref: t }, null)
  561. ])
  562. ])
  563. ]),
  564. createVNode('div', { class: styles$7.timerItemTopCore }, [
  565. createVNode('h4', { class: styles$7.dotTop }, null),
  566. createVNode('div', { class: styles$7.dot }, null),
  567. createVNode('div', { class: styles$7.dot }, null)
  568. ]),
  569. createVNode('div', { class: styles$7.timerItemTopCore }, [
  570. createVNode('h4', null, [createTextVNode(' 秒')]),
  571. createVNode('div', { class: styles$7.FlipClock }, [
  572. createVNode('div', { class: styles$7.numberWrap }, [
  573. createVNode(Flipper, { ref: r }, null),
  574. createVNode(Flipper, { ref: i }, null)
  575. ])
  576. ])
  577. ])
  578. ]),
  579. createVNode('div', { class: styles$7.nowTimerWrap }, [
  580. dayjs(o.value).format('YYYY年MM月DD日 HH:mm:ss')
  581. ])
  582. ])
  583. ]),
  584. createVNode(
  585. NSpace,
  586. { class: styles$7.btnGroupModal, justify: 'center' },
  587. {
  588. default: () => [
  589. createVNode(
  590. NButton,
  591. { round: !0, onClick: () => P() },
  592. { default: () => [createTextVNode('重置')] }
  593. ),
  594. l.value
  595. ? createVNode(
  596. NButton,
  597. {
  598. round: !0,
  599. type: 'primary',
  600. 'icon-placement': 'right',
  601. onClick: () => c()
  602. },
  603. {
  604. default: () =>
  605. createVNode('p', { class: styles$7.playText }, [
  606. createTextVNode('暂停')
  607. ]),
  608. icon: () =>
  609. createVNode(
  610. NImage,
  611. {
  612. previewDisabled: !0,
  613. class: styles$7.palyIcon,
  614. src: suspend
  615. },
  616. null
  617. )
  618. }
  619. )
  620. : createVNode(
  621. NButton,
  622. {
  623. round: !0,
  624. type: 'primary',
  625. 'icon-placement': 'right',
  626. onClick: () => S()
  627. },
  628. {
  629. default: () =>
  630. createVNode('p', { class: styles$7.playText }, [
  631. createTextVNode('开始')
  632. ]),
  633. icon: () =>
  634. createVNode(
  635. NImage,
  636. {
  637. previewDisabled: !0,
  638. class: styles$7.palyIcon,
  639. src: playIcon
  640. },
  641. null
  642. )
  643. }
  644. )
  645. ]
  646. }
  647. )
  648. ])
  649. );
  650. }
  651. }),
  652. TimerMeter = defineComponent({
  653. name: 'data-module',
  654. setup() {
  655. const e = ref('positive');
  656. useRoute();
  657. const t = r => {
  658. e.value = r;
  659. };
  660. return () =>
  661. createVNode('div', null, [
  662. createVNode('div', { class: styles$7.timerWrap }, [
  663. createVNode('div', { class: styles$7.timerTop }, [
  664. createVNode(
  665. 'div',
  666. {
  667. class: [
  668. styles$7.timerTopPane,
  669. e.value == 'positive' ? styles$7.timerTopPaneActive : ''
  670. ],
  671. onClick: () => {
  672. t('positive');
  673. }
  674. },
  675. [createTextVNode('正计时')]
  676. ),
  677. createVNode(
  678. 'div',
  679. {
  680. class: [
  681. styles$7.timerTopPane,
  682. e.value == 'countdown' ? styles$7.timerTopPaneActive : ''
  683. ],
  684. onClick: () => {
  685. t('countdown');
  686. }
  687. },
  688. [createTextVNode('倒计时')]
  689. )
  690. ]),
  691. e.value == 'positive'
  692. ? createVNode(Positive, null, null)
  693. : createVNode(Countdown, null, null)
  694. ])
  695. ]);
  696. }
  697. }),
  698. downMove = '_downMove_137wx_1',
  699. downMoveBg = '_downMoveBg_137wx_9',
  700. dingPng = '_dingPng_137wx_16',
  701. closeAble = '_closeAble_137wx_25',
  702. submitAppBtn = '_submitAppBtn_137wx_53',
  703. styles$6 = { downMove, downMoveBg, dingPng, closeAble, submitAppBtn },
  704. PlaceholderTone = defineComponent({
  705. props: ['item'],
  706. emits: ['close'],
  707. name: 'placeholderTone',
  708. setup(e, { emit: t }) {
  709. return () =>
  710. createVNode(Fragment, null, [
  711. createVNode('div', { class: styles$6.downMove }, [
  712. createVNode(
  713. 'img',
  714. { src: dingPng$1, class: styles$6.dingPng, alt: '' },
  715. null
  716. ),
  717. createVNode(
  718. 'img',
  719. { src: moveTop, class: styles$6.downMoveBg, alt: '' },
  720. null
  721. ),
  722. createVNode('h2', null, [createTextVNode('温馨提示')]),
  723. createVNode('p', null, [
  724. createTextVNode('调音器功能暂未开放,敬请期待!')
  725. ]),
  726. createVNode(
  727. NSpace,
  728. { style: { padding: '25px 0 0 0' }, justify: 'center' },
  729. {
  730. default: () => [
  731. createVNode(
  732. NButton,
  733. mergeProps(
  734. { id: 'submitBtn' },
  735. {
  736. class: styles$6.submitAppBtn,
  737. round: !0,
  738. type: 'primary',
  739. onClick: () => {
  740. t('close');
  741. }
  742. }
  743. ),
  744. { default: () => [createTextVNode('我知道了')] }
  745. )
  746. ]
  747. }
  748. )
  749. ])
  750. ]);
  751. }
  752. }),
  753. playContent = '_playContent_z3eb0_1',
  754. assignHomeworkClose = '_assignHomeworkClose_z3eb0_10',
  755. coursewarePlay = '_coursewarePlay_z3eb0_23',
  756. playModel = '_playModel_z3eb0_29',
  757. headerContainer = '_headerContainer_z3eb0_38',
  758. backBtn = '_backBtn_z3eb0_58',
  759. headRight = '_headRight_z3eb0_70',
  760. rightBtn = '_rightBtn_z3eb0_79',
  761. menu = '_menu_z3eb0_91',
  762. tabsContent = '_tabsContent_z3eb0_102',
  763. wraps = '_wraps_z3eb0_113',
  764. itemDiv = '_itemDiv_z3eb0_120',
  765. itemActive = '_itemActive_z3eb0_133',
  766. acitveAnimation = '_acitveAnimation_z3eb0_136',
  767. show = '_show_z3eb0_139',
  768. hide$1 = '_hide_z3eb0_142',
  769. rightFixedBtns = '_rightFixedBtns_z3eb0_155',
  770. fullBtn = '_fullBtn_z3eb0_162',
  771. point = '_point_z3eb0_167',
  772. iconUp$1 = '_iconUp_z3eb0_177',
  773. iconDown$1 = '_iconDown_z3eb0_178',
  774. btnsDisabled = '_btnsDisabled_z3eb0_181',
  775. loadWrap = '_loadWrap_z3eb0_211',
  776. drawerContainer = '_drawerContainer_z3eb0_222',
  777. cardContainer = '_cardContainer_z3eb0_225',
  778. sectionAnimate$2 = '_sectionAnimate_z3eb0_261',
  779. sectionAnimateUp = '_sectionAnimateUp_z3eb0_267',
  780. switchDisplaySection = '_switchDisplaySection_z3eb0_273',
  781. switchSpace = '_switchSpace_z3eb0_288',
  782. btnItem = '_btnItem_z3eb0_291',
  783. attendClassModal = '_attendClassModal_z3eb0_313',
  784. modelAttendContent = '_modelAttendContent_z3eb0_337',
  785. modelAttendBtnGroup = '_modelAttendBtnGroup_z3eb0_343',
  786. trainClassModal = '_trainClassModal_z3eb0_351',
  787. workContainer = '_workContainer_z3eb0_357',
  788. toolboxImg = '_toolboxImg_z3eb0_364',
  789. isDragIng = '_isDragIng_z3eb0_373',
  790. toolClassImg = '_toolClassImg_z3eb0_377',
  791. booxToolWrap = '_booxToolWrap_z3eb0_392',
  792. booxToolItem = '_booxToolItem_z3eb0_403',
  793. setTimeImage = '_setTimeImage_z3eb0_420',
  794. beatImage = '_beatImage_z3eb0_426',
  795. changePwdModal = '_changePwdModal_z3eb0_432',
  796. imChatModal = '_imChatModal_z3eb0_435',
  797. modeWrap = '_modeWrap_z3eb0_438',
  798. showModalTone = '_showModalTone_z3eb0_443',
  799. studentRemove$1 = '_studentRemove_z3eb0_446',
  800. removeVisiable$1 = '_removeVisiable_z3eb0_458',
  801. btnGroupModal$1 = '_btnGroupModal_z3eb0_476',
  802. styles$5 = {
  803. playContent,
  804. assignHomeworkClose,
  805. coursewarePlay,
  806. playModel,
  807. headerContainer,
  808. backBtn,
  809. headRight,
  810. rightBtn,
  811. menu,
  812. tabsContent,
  813. wraps,
  814. itemDiv,
  815. itemActive,
  816. acitveAnimation,
  817. show,
  818. hide: hide$1,
  819. rightFixedBtns,
  820. fullBtn,
  821. point,
  822. iconUp: iconUp$1,
  823. iconDown: iconDown$1,
  824. btnsDisabled,
  825. loadWrap,
  826. drawerContainer,
  827. cardContainer,
  828. sectionAnimate: sectionAnimate$2,
  829. sectionAnimateUp,
  830. switchDisplaySection,
  831. switchSpace,
  832. btnItem,
  833. attendClassModal,
  834. modelAttendContent,
  835. modelAttendBtnGroup,
  836. trainClassModal,
  837. workContainer,
  838. toolboxImg,
  839. isDragIng,
  840. toolClassImg,
  841. booxToolWrap,
  842. booxToolItem,
  843. setTimeImage,
  844. beatImage,
  845. changePwdModal,
  846. imChatModal,
  847. modeWrap,
  848. showModalTone,
  849. studentRemove: studentRemove$1,
  850. removeVisiable: removeVisiable$1,
  851. btnGroupModal: btnGroupModal$1
  852. },
  853. plyr = '',
  854. musicScore = '_musicScore_6u588_1',
  855. container = '_container_6u588_7',
  856. musicModel = '_musicModel_6u588_15',
  857. errorModel = '_errorModel_6u588_22',
  858. startBtn = '_startBtn_6u588_34',
  859. loading = '_loading_6u588_44',
  860. skeletonWrap = '_skeletonWrap_6u588_50',
  861. skeleton = '_skeleton_6u588_50',
  862. styles$4 = {
  863. musicScore,
  864. container,
  865. musicModel,
  866. errorModel,
  867. startBtn,
  868. loading,
  869. skeletonWrap,
  870. skeleton
  871. };
  872. var inBrowser = typeof window < 'u',
  873. visibility;
  874. function usePageVisibility() {
  875. if (!visibility && ((visibility = ref('visible')), inBrowser)) {
  876. const e = () => {
  877. visibility.value = document.hidden ? 'hidden' : 'visible';
  878. };
  879. e(), window.addEventListener('visibilitychange', e);
  880. }
  881. return visibility;
  882. }
  883. const MusicScore = defineComponent({
  884. name: 'musicScore',
  885. props: {
  886. music: { type: Object, default: () => ({}) },
  887. activeModel: { type: Boolean },
  888. activeStatus: { type: Boolean }
  889. },
  890. emits: ['setIframe'],
  891. setup(e, { emit: t }) {
  892. const r = useUserStore(),
  893. i = ref(!1),
  894. s = usePageVisibility();
  895. watch(s, c => {
  896. console.log('🚀 ~ value:', c), c == 'hidden' && (i.value = !1);
  897. });
  898. const a = ref(),
  899. o = ref(!1),
  900. n = ref(!1),
  901. l = ref(!1),
  902. f = /(localhost|192)/.test(location.host)
  903. ? 'https://test.lexiaoya.cn/instrument'
  904. : location.origin + '/instrument',
  905. g = ''
  906. .concat(
  907. f,
  908. '?showGuide=true&platform=pc&zoom=1.2&modelType=practise&id='
  909. )
  910. .concat(e.music.content, '&Authorization=')
  911. .concat(r.getToken),
  912. S = () => {
  913. fetch(g)
  914. .then(() => {
  915. (l.value = !0), (n.value = !1);
  916. })
  917. .catch(() => {
  918. n.value = !0;
  919. });
  920. };
  921. return (
  922. watch(
  923. () => e.music,
  924. () => {
  925. l.value || ((n.value = !1), e.music.display && S());
  926. }
  927. ),
  928. watch(
  929. () => e.activeModel,
  930. () => {
  931. a.value.contentWindow &&
  932. e.activeStatus &&
  933. a.value.contentWindow.postMessage(
  934. { api: 'attendClassBarStatus', hideMenu: !e.activeModel },
  935. '*'
  936. );
  937. }
  938. ),
  939. () =>
  940. createVNode('div', { class: styles$4.musicScore }, [
  941. createVNode(
  942. 'iframe',
  943. {
  944. ref: a,
  945. onLoad: () => {
  946. t('setIframe', a.value), (o.value = !0);
  947. },
  948. class: [styles$4.container, 'musicIframe'],
  949. frameborder: '0',
  950. src: g
  951. },
  952. null
  953. ),
  954. o.value &&
  955. createVNode('div', { class: styles$4.skeletonWrap }, [
  956. createVNode('div', null, [
  957. createVNode(NSkeleton, { text: !0, repeat: 8 }, null)
  958. ])
  959. ])
  960. ])
  961. );
  962. }
  963. });
  964. var lottie = { exports: {} };
  965. (function (module, exports) {
  966. typeof navigator < 'u' &&
  967. (function (e, t) {
  968. module.exports = t();
  969. })(commonjsGlobal, function () {
  970. var svgNS = 'http://www.w3.org/2000/svg',
  971. locationHref = '',
  972. _useWebWorker = !1,
  973. initialDefaultFrame = -999999,
  974. setWebWorker = function (t) {
  975. _useWebWorker = !!t;
  976. },
  977. getWebWorker = function () {
  978. return _useWebWorker;
  979. },
  980. setLocationHref = function (t) {
  981. locationHref = t;
  982. },
  983. getLocationHref = function () {
  984. return locationHref;
  985. };
  986. function createTag(e) {
  987. return document.createElement(e);
  988. }
  989. function extendPrototype(e, t) {
  990. var r,
  991. i = e.length,
  992. s;
  993. for (r = 0; r < i; r += 1) {
  994. s = e[r].prototype;
  995. for (var a in s)
  996. Object.prototype.hasOwnProperty.call(s, a) &&
  997. (t.prototype[a] = s[a]);
  998. }
  999. }
  1000. function getDescriptor(e, t) {
  1001. return Object.getOwnPropertyDescriptor(e, t);
  1002. }
  1003. function createProxyFunction(e) {
  1004. function t() {}
  1005. return (t.prototype = e), t;
  1006. }
  1007. var audioControllerFactory = (function () {
  1008. function e(t) {
  1009. (this.audios = []),
  1010. (this.audioFactory = t),
  1011. (this._volume = 1),
  1012. (this._isMuted = !1);
  1013. }
  1014. return (
  1015. (e.prototype = {
  1016. addAudio: function (r) {
  1017. this.audios.push(r);
  1018. },
  1019. pause: function () {
  1020. var r,
  1021. i = this.audios.length;
  1022. for (r = 0; r < i; r += 1) this.audios[r].pause();
  1023. },
  1024. resume: function () {
  1025. var r,
  1026. i = this.audios.length;
  1027. for (r = 0; r < i; r += 1) this.audios[r].resume();
  1028. },
  1029. setRate: function (r) {
  1030. var i,
  1031. s = this.audios.length;
  1032. for (i = 0; i < s; i += 1) this.audios[i].setRate(r);
  1033. },
  1034. createAudio: function (r) {
  1035. return this.audioFactory
  1036. ? this.audioFactory(r)
  1037. : window.Howl
  1038. ? new window.Howl({ src: [r] })
  1039. : {
  1040. isPlaying: !1,
  1041. play: function () {
  1042. this.isPlaying = !0;
  1043. },
  1044. seek: function () {
  1045. this.isPlaying = !1;
  1046. },
  1047. playing: function () {},
  1048. rate: function () {},
  1049. setVolume: function () {}
  1050. };
  1051. },
  1052. setAudioFactory: function (r) {
  1053. this.audioFactory = r;
  1054. },
  1055. setVolume: function (r) {
  1056. (this._volume = r), this._updateVolume();
  1057. },
  1058. mute: function () {
  1059. (this._isMuted = !0), this._updateVolume();
  1060. },
  1061. unmute: function () {
  1062. (this._isMuted = !1), this._updateVolume();
  1063. },
  1064. getVolume: function () {
  1065. return this._volume;
  1066. },
  1067. _updateVolume: function () {
  1068. var r,
  1069. i = this.audios.length;
  1070. for (r = 0; r < i; r += 1)
  1071. this.audios[r].volume(this._volume * (this._isMuted ? 0 : 1));
  1072. }
  1073. }),
  1074. function () {
  1075. return new e();
  1076. }
  1077. );
  1078. })(),
  1079. createTypedArray = (function () {
  1080. function e(r, i) {
  1081. var s = 0,
  1082. a = [],
  1083. o;
  1084. switch (r) {
  1085. case 'int16':
  1086. case 'uint8c':
  1087. o = 1;
  1088. break;
  1089. default:
  1090. o = 1.1;
  1091. break;
  1092. }
  1093. for (s = 0; s < i; s += 1) a.push(o);
  1094. return a;
  1095. }
  1096. function t(r, i) {
  1097. return r === 'float32'
  1098. ? new Float32Array(i)
  1099. : r === 'int16'
  1100. ? new Int16Array(i)
  1101. : r === 'uint8c'
  1102. ? new Uint8ClampedArray(i)
  1103. : e(r, i);
  1104. }
  1105. return typeof Uint8ClampedArray == 'function' &&
  1106. typeof Float32Array == 'function'
  1107. ? t
  1108. : e;
  1109. })();
  1110. function createSizedArray(e) {
  1111. return Array.apply(null, { length: e });
  1112. }
  1113. function _typeof$6(e) {
  1114. '@babel/helpers - typeof';
  1115. return (
  1116. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  1117. ? (_typeof$6 = function (r) {
  1118. return typeof r;
  1119. })
  1120. : (_typeof$6 = function (r) {
  1121. return r &&
  1122. typeof Symbol == 'function' &&
  1123. r.constructor === Symbol &&
  1124. r !== Symbol.prototype
  1125. ? 'symbol'
  1126. : typeof r;
  1127. }),
  1128. _typeof$6(e)
  1129. );
  1130. }
  1131. var subframeEnabled = !0,
  1132. expressionsPlugin = null,
  1133. expressionsInterfaces = null,
  1134. idPrefix$1 = '',
  1135. isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent),
  1136. bmPow = Math.pow,
  1137. bmSqrt = Math.sqrt,
  1138. bmFloor = Math.floor,
  1139. bmMax = Math.max,
  1140. bmMin = Math.min,
  1141. BMMath = {};
  1142. (function () {
  1143. var e = [
  1144. 'abs',
  1145. 'acos',
  1146. 'acosh',
  1147. 'asin',
  1148. 'asinh',
  1149. 'atan',
  1150. 'atanh',
  1151. 'atan2',
  1152. 'ceil',
  1153. 'cbrt',
  1154. 'expm1',
  1155. 'clz32',
  1156. 'cos',
  1157. 'cosh',
  1158. 'exp',
  1159. 'floor',
  1160. 'fround',
  1161. 'hypot',
  1162. 'imul',
  1163. 'log',
  1164. 'log1p',
  1165. 'log2',
  1166. 'log10',
  1167. 'max',
  1168. 'min',
  1169. 'pow',
  1170. 'random',
  1171. 'round',
  1172. 'sign',
  1173. 'sin',
  1174. 'sinh',
  1175. 'sqrt',
  1176. 'tan',
  1177. 'tanh',
  1178. 'trunc',
  1179. 'E',
  1180. 'LN10',
  1181. 'LN2',
  1182. 'LOG10E',
  1183. 'LOG2E',
  1184. 'PI',
  1185. 'SQRT1_2',
  1186. 'SQRT2'
  1187. ],
  1188. t,
  1189. r = e.length;
  1190. for (t = 0; t < r; t += 1) BMMath[e[t]] = Math[e[t]];
  1191. })(),
  1192. (BMMath.random = Math.random),
  1193. (BMMath.abs = function (e) {
  1194. var t = _typeof$6(e);
  1195. if (t === 'object' && e.length) {
  1196. var r = createSizedArray(e.length),
  1197. i,
  1198. s = e.length;
  1199. for (i = 0; i < s; i += 1) r[i] = Math.abs(e[i]);
  1200. return r;
  1201. }
  1202. return Math.abs(e);
  1203. });
  1204. var defaultCurveSegments = 150,
  1205. degToRads = Math.PI / 180,
  1206. roundCorner = 0.5519;
  1207. function styleDiv(e) {
  1208. (e.style.position = 'absolute'),
  1209. (e.style.top = 0),
  1210. (e.style.left = 0),
  1211. (e.style.display = 'block'),
  1212. (e.style.transformOrigin = '0 0'),
  1213. (e.style.webkitTransformOrigin = '0 0'),
  1214. (e.style.backfaceVisibility = 'visible'),
  1215. (e.style.webkitBackfaceVisibility = 'visible'),
  1216. (e.style.transformStyle = 'preserve-3d'),
  1217. (e.style.webkitTransformStyle = 'preserve-3d'),
  1218. (e.style.mozTransformStyle = 'preserve-3d');
  1219. }
  1220. function BMEnterFrameEvent(e, t, r, i) {
  1221. (this.type = e),
  1222. (this.currentTime = t),
  1223. (this.totalTime = r),
  1224. (this.direction = i < 0 ? -1 : 1);
  1225. }
  1226. function BMCompleteEvent(e, t) {
  1227. (this.type = e), (this.direction = t < 0 ? -1 : 1);
  1228. }
  1229. function BMCompleteLoopEvent(e, t, r, i) {
  1230. (this.type = e),
  1231. (this.currentLoop = r),
  1232. (this.totalLoops = t),
  1233. (this.direction = i < 0 ? -1 : 1);
  1234. }
  1235. function BMSegmentStartEvent(e, t, r) {
  1236. (this.type = e), (this.firstFrame = t), (this.totalFrames = r);
  1237. }
  1238. function BMDestroyEvent(e, t) {
  1239. (this.type = e), (this.target = t);
  1240. }
  1241. function BMRenderFrameErrorEvent(e, t) {
  1242. (this.type = 'renderFrameError'),
  1243. (this.nativeError = e),
  1244. (this.currentTime = t);
  1245. }
  1246. function BMConfigErrorEvent(e) {
  1247. (this.type = 'configError'), (this.nativeError = e);
  1248. }
  1249. var createElementID = (function () {
  1250. var e = 0;
  1251. return function () {
  1252. return (e += 1), idPrefix$1 + '__lottie_element_' + e;
  1253. };
  1254. })();
  1255. function HSVtoRGB(e, t, r) {
  1256. var i, s, a, o, n, l, f, g;
  1257. switch (
  1258. ((o = Math.floor(e * 6)),
  1259. (n = e * 6 - o),
  1260. (l = r * (1 - t)),
  1261. (f = r * (1 - n * t)),
  1262. (g = r * (1 - (1 - n) * t)),
  1263. o % 6)
  1264. ) {
  1265. case 0:
  1266. (i = r), (s = g), (a = l);
  1267. break;
  1268. case 1:
  1269. (i = f), (s = r), (a = l);
  1270. break;
  1271. case 2:
  1272. (i = l), (s = r), (a = g);
  1273. break;
  1274. case 3:
  1275. (i = l), (s = f), (a = r);
  1276. break;
  1277. case 4:
  1278. (i = g), (s = l), (a = r);
  1279. break;
  1280. case 5:
  1281. (i = r), (s = l), (a = f);
  1282. break;
  1283. }
  1284. return [i, s, a];
  1285. }
  1286. function RGBtoHSV(e, t, r) {
  1287. var i = Math.max(e, t, r),
  1288. s = Math.min(e, t, r),
  1289. a = i - s,
  1290. o,
  1291. n = i === 0 ? 0 : a / i,
  1292. l = i / 255;
  1293. switch (i) {
  1294. case s:
  1295. o = 0;
  1296. break;
  1297. case e:
  1298. (o = t - r + a * (t < r ? 6 : 0)), (o /= 6 * a);
  1299. break;
  1300. case t:
  1301. (o = r - e + a * 2), (o /= 6 * a);
  1302. break;
  1303. case r:
  1304. (o = e - t + a * 4), (o /= 6 * a);
  1305. break;
  1306. }
  1307. return [o, n, l];
  1308. }
  1309. function addSaturationToRGB(e, t) {
  1310. var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
  1311. return (
  1312. (r[1] += t),
  1313. r[1] > 1 ? (r[1] = 1) : r[1] <= 0 && (r[1] = 0),
  1314. HSVtoRGB(r[0], r[1], r[2])
  1315. );
  1316. }
  1317. function addBrightnessToRGB(e, t) {
  1318. var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
  1319. return (
  1320. (r[2] += t),
  1321. r[2] > 1 ? (r[2] = 1) : r[2] < 0 && (r[2] = 0),
  1322. HSVtoRGB(r[0], r[1], r[2])
  1323. );
  1324. }
  1325. function addHueToRGB(e, t) {
  1326. var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
  1327. return (
  1328. (r[0] += t / 360),
  1329. r[0] > 1 ? (r[0] -= 1) : r[0] < 0 && (r[0] += 1),
  1330. HSVtoRGB(r[0], r[1], r[2])
  1331. );
  1332. }
  1333. var rgbToHex = (function () {
  1334. var e = [],
  1335. t,
  1336. r;
  1337. for (t = 0; t < 256; t += 1)
  1338. (r = t.toString(16)), (e[t] = r.length === 1 ? '0' + r : r);
  1339. return function (i, s, a) {
  1340. return (
  1341. i < 0 && (i = 0),
  1342. s < 0 && (s = 0),
  1343. a < 0 && (a = 0),
  1344. '#' + e[i] + e[s] + e[a]
  1345. );
  1346. };
  1347. })(),
  1348. setSubframeEnabled = function (t) {
  1349. subframeEnabled = !!t;
  1350. },
  1351. getSubframeEnabled = function () {
  1352. return subframeEnabled;
  1353. },
  1354. setExpressionsPlugin = function (t) {
  1355. expressionsPlugin = t;
  1356. },
  1357. getExpressionsPlugin = function () {
  1358. return expressionsPlugin;
  1359. },
  1360. setExpressionInterfaces = function (t) {
  1361. expressionsInterfaces = t;
  1362. },
  1363. getExpressionInterfaces = function () {
  1364. return expressionsInterfaces;
  1365. },
  1366. setDefaultCurveSegments = function (t) {
  1367. defaultCurveSegments = t;
  1368. },
  1369. getDefaultCurveSegments = function () {
  1370. return defaultCurveSegments;
  1371. },
  1372. setIdPrefix = function (t) {
  1373. idPrefix$1 = t;
  1374. };
  1375. function createNS(e) {
  1376. return document.createElementNS(svgNS, e);
  1377. }
  1378. function _typeof$5(e) {
  1379. '@babel/helpers - typeof';
  1380. return (
  1381. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  1382. ? (_typeof$5 = function (r) {
  1383. return typeof r;
  1384. })
  1385. : (_typeof$5 = function (r) {
  1386. return r &&
  1387. typeof Symbol == 'function' &&
  1388. r.constructor === Symbol &&
  1389. r !== Symbol.prototype
  1390. ? 'symbol'
  1391. : typeof r;
  1392. }),
  1393. _typeof$5(e)
  1394. );
  1395. }
  1396. var dataManager = (function () {
  1397. var e = 1,
  1398. t = [],
  1399. r,
  1400. i,
  1401. s = {
  1402. onmessage: function () {},
  1403. postMessage: function (P) {
  1404. r({ data: P });
  1405. }
  1406. },
  1407. a = {
  1408. postMessage: function (P) {
  1409. s.onmessage({ data: P });
  1410. }
  1411. };
  1412. function o(c) {
  1413. if (window.Worker && window.Blob && getWebWorker()) {
  1414. var P = new Blob(
  1415. ['var _workerSelf = self; self.onmessage = ', c.toString()],
  1416. { type: 'text/javascript' }
  1417. ),
  1418. d = URL.createObjectURL(P);
  1419. return new Worker(d);
  1420. }
  1421. return (r = c), s;
  1422. }
  1423. function n() {
  1424. i ||
  1425. ((i = o(function (P) {
  1426. function d() {
  1427. function x(N, M) {
  1428. var k,
  1429. b,
  1430. C = N.length,
  1431. L,
  1432. F,
  1433. U,
  1434. D;
  1435. for (b = 0; b < C; b += 1)
  1436. if (((k = N[b]), 'ks' in k && !k.completed)) {
  1437. if (((k.completed = !0), k.hasMask)) {
  1438. var V = k.masksProperties;
  1439. for (F = V.length, L = 0; L < F; L += 1)
  1440. if (V[L].pt.k.i) T(V[L].pt.k);
  1441. else
  1442. for (D = V[L].pt.k.length, U = 0; U < D; U += 1)
  1443. V[L].pt.k[U].s && T(V[L].pt.k[U].s[0]),
  1444. V[L].pt.k[U].e && T(V[L].pt.k[U].e[0]);
  1445. }
  1446. k.ty === 0
  1447. ? ((k.layers = m(k.refId, M)), x(k.layers, M))
  1448. : k.ty === 4
  1449. ? A(k.shapes)
  1450. : k.ty === 5 && W(k);
  1451. }
  1452. }
  1453. function u(N, M) {
  1454. if (N) {
  1455. var k = 0,
  1456. b = N.length;
  1457. for (k = 0; k < b; k += 1)
  1458. N[k].t === 1 &&
  1459. ((N[k].data.layers = m(N[k].data.refId, M)),
  1460. x(N[k].data.layers, M));
  1461. }
  1462. }
  1463. function y(N, M) {
  1464. for (var k = 0, b = M.length; k < b; ) {
  1465. if (M[k].id === N) return M[k];
  1466. k += 1;
  1467. }
  1468. return null;
  1469. }
  1470. function m(N, M) {
  1471. var k = y(N, M);
  1472. return k
  1473. ? k.layers.__used
  1474. ? JSON.parse(JSON.stringify(k.layers))
  1475. : ((k.layers.__used = !0), k.layers)
  1476. : null;
  1477. }
  1478. function A(N) {
  1479. var M,
  1480. k = N.length,
  1481. b,
  1482. C;
  1483. for (M = k - 1; M >= 0; M -= 1)
  1484. if (N[M].ty === 'sh')
  1485. if (N[M].ks.k.i) T(N[M].ks.k);
  1486. else
  1487. for (C = N[M].ks.k.length, b = 0; b < C; b += 1)
  1488. N[M].ks.k[b].s && T(N[M].ks.k[b].s[0]),
  1489. N[M].ks.k[b].e && T(N[M].ks.k[b].e[0]);
  1490. else N[M].ty === 'gr' && A(N[M].it);
  1491. }
  1492. function T(N) {
  1493. var M,
  1494. k = N.i.length;
  1495. for (M = 0; M < k; M += 1)
  1496. (N.i[M][0] += N.v[M][0]),
  1497. (N.i[M][1] += N.v[M][1]),
  1498. (N.o[M][0] += N.v[M][0]),
  1499. (N.o[M][1] += N.v[M][1]);
  1500. }
  1501. function E(N, M) {
  1502. var k = M ? M.split('.') : [100, 100, 100];
  1503. return N[0] > k[0]
  1504. ? !0
  1505. : k[0] > N[0]
  1506. ? !1
  1507. : N[1] > k[1]
  1508. ? !0
  1509. : k[1] > N[1]
  1510. ? !1
  1511. : N[2] > k[2]
  1512. ? !0
  1513. : k[2] > N[2]
  1514. ? !1
  1515. : null;
  1516. }
  1517. var _ = (function () {
  1518. var N = [4, 4, 14];
  1519. function M(b) {
  1520. var C = b.t.d;
  1521. b.t.d = { k: [{ s: C, t: 0 }] };
  1522. }
  1523. function k(b) {
  1524. var C,
  1525. L = b.length;
  1526. for (C = 0; C < L; C += 1) b[C].ty === 5 && M(b[C]);
  1527. }
  1528. return function (b) {
  1529. if (E(N, b.v) && (k(b.layers), b.assets)) {
  1530. var C,
  1531. L = b.assets.length;
  1532. for (C = 0; C < L; C += 1)
  1533. b.assets[C].layers && k(b.assets[C].layers);
  1534. }
  1535. };
  1536. })(),
  1537. I = (function () {
  1538. var N = [4, 7, 99];
  1539. return function (M) {
  1540. if (M.chars && !E(N, M.v)) {
  1541. var k,
  1542. b = M.chars.length;
  1543. for (k = 0; k < b; k += 1) {
  1544. var C = M.chars[k];
  1545. C.data &&
  1546. C.data.shapes &&
  1547. (A(C.data.shapes),
  1548. (C.data.ip = 0),
  1549. (C.data.op = 99999),
  1550. (C.data.st = 0),
  1551. (C.data.sr = 1),
  1552. (C.data.ks = {
  1553. p: { k: [0, 0], a: 0 },
  1554. s: { k: [100, 100], a: 0 },
  1555. a: { k: [0, 0], a: 0 },
  1556. r: { k: 0, a: 0 },
  1557. o: { k: 100, a: 0 }
  1558. }),
  1559. M.chars[k].t ||
  1560. (C.data.shapes.push({ ty: 'no' }),
  1561. C.data.shapes[0].it.push({
  1562. p: { k: [0, 0], a: 0 },
  1563. s: { k: [100, 100], a: 0 },
  1564. a: { k: [0, 0], a: 0 },
  1565. r: { k: 0, a: 0 },
  1566. o: { k: 100, a: 0 },
  1567. sk: { k: 0, a: 0 },
  1568. sa: { k: 0, a: 0 },
  1569. ty: 'tr'
  1570. })));
  1571. }
  1572. }
  1573. };
  1574. })(),
  1575. B = (function () {
  1576. var N = [5, 7, 15];
  1577. function M(b) {
  1578. var C = b.t.p;
  1579. typeof C.a == 'number' && (C.a = { a: 0, k: C.a }),
  1580. typeof C.p == 'number' && (C.p = { a: 0, k: C.p }),
  1581. typeof C.r == 'number' && (C.r = { a: 0, k: C.r });
  1582. }
  1583. function k(b) {
  1584. var C,
  1585. L = b.length;
  1586. for (C = 0; C < L; C += 1) b[C].ty === 5 && M(b[C]);
  1587. }
  1588. return function (b) {
  1589. if (E(N, b.v) && (k(b.layers), b.assets)) {
  1590. var C,
  1591. L = b.assets.length;
  1592. for (C = 0; C < L; C += 1)
  1593. b.assets[C].layers && k(b.assets[C].layers);
  1594. }
  1595. };
  1596. })(),
  1597. z = (function () {
  1598. var N = [4, 1, 9];
  1599. function M(b) {
  1600. var C,
  1601. L = b.length,
  1602. F,
  1603. U;
  1604. for (C = 0; C < L; C += 1)
  1605. if (b[C].ty === 'gr') M(b[C].it);
  1606. else if (b[C].ty === 'fl' || b[C].ty === 'st')
  1607. if (b[C].c.k && b[C].c.k[0].i)
  1608. for (U = b[C].c.k.length, F = 0; F < U; F += 1)
  1609. b[C].c.k[F].s &&
  1610. ((b[C].c.k[F].s[0] /= 255),
  1611. (b[C].c.k[F].s[1] /= 255),
  1612. (b[C].c.k[F].s[2] /= 255),
  1613. (b[C].c.k[F].s[3] /= 255)),
  1614. b[C].c.k[F].e &&
  1615. ((b[C].c.k[F].e[0] /= 255),
  1616. (b[C].c.k[F].e[1] /= 255),
  1617. (b[C].c.k[F].e[2] /= 255),
  1618. (b[C].c.k[F].e[3] /= 255));
  1619. else
  1620. (b[C].c.k[0] /= 255),
  1621. (b[C].c.k[1] /= 255),
  1622. (b[C].c.k[2] /= 255),
  1623. (b[C].c.k[3] /= 255);
  1624. }
  1625. function k(b) {
  1626. var C,
  1627. L = b.length;
  1628. for (C = 0; C < L; C += 1)
  1629. b[C].ty === 4 && M(b[C].shapes);
  1630. }
  1631. return function (b) {
  1632. if (E(N, b.v) && (k(b.layers), b.assets)) {
  1633. var C,
  1634. L = b.assets.length;
  1635. for (C = 0; C < L; C += 1)
  1636. b.assets[C].layers && k(b.assets[C].layers);
  1637. }
  1638. };
  1639. })(),
  1640. G = (function () {
  1641. var N = [4, 4, 18];
  1642. function M(b) {
  1643. var C,
  1644. L = b.length,
  1645. F,
  1646. U;
  1647. for (C = L - 1; C >= 0; C -= 1)
  1648. if (b[C].ty === 'sh')
  1649. if (b[C].ks.k.i) b[C].ks.k.c = b[C].closed;
  1650. else
  1651. for (U = b[C].ks.k.length, F = 0; F < U; F += 1)
  1652. b[C].ks.k[F].s &&
  1653. (b[C].ks.k[F].s[0].c = b[C].closed),
  1654. b[C].ks.k[F].e &&
  1655. (b[C].ks.k[F].e[0].c = b[C].closed);
  1656. else b[C].ty === 'gr' && M(b[C].it);
  1657. }
  1658. function k(b) {
  1659. var C,
  1660. L,
  1661. F = b.length,
  1662. U,
  1663. D,
  1664. V,
  1665. O;
  1666. for (L = 0; L < F; L += 1) {
  1667. if (((C = b[L]), C.hasMask)) {
  1668. var j = C.masksProperties;
  1669. for (D = j.length, U = 0; U < D; U += 1)
  1670. if (j[U].pt.k.i) j[U].pt.k.c = j[U].cl;
  1671. else
  1672. for (O = j[U].pt.k.length, V = 0; V < O; V += 1)
  1673. j[U].pt.k[V].s &&
  1674. (j[U].pt.k[V].s[0].c = j[U].cl),
  1675. j[U].pt.k[V].e &&
  1676. (j[U].pt.k[V].e[0].c = j[U].cl);
  1677. }
  1678. C.ty === 4 && M(C.shapes);
  1679. }
  1680. }
  1681. return function (b) {
  1682. if (E(N, b.v) && (k(b.layers), b.assets)) {
  1683. var C,
  1684. L = b.assets.length;
  1685. for (C = 0; C < L; C += 1)
  1686. b.assets[C].layers && k(b.assets[C].layers);
  1687. }
  1688. };
  1689. })();
  1690. function R(N) {
  1691. N.__complete ||
  1692. (z(N),
  1693. _(N),
  1694. I(N),
  1695. B(N),
  1696. G(N),
  1697. x(N.layers, N.assets),
  1698. u(N.chars, N.assets),
  1699. (N.__complete = !0));
  1700. }
  1701. function W(N) {
  1702. N.t.a.length === 0 && 'm' in N.t.p;
  1703. }
  1704. var H = {};
  1705. return (
  1706. (H.completeData = R),
  1707. (H.checkColors = z),
  1708. (H.checkChars = I),
  1709. (H.checkPathProperties = B),
  1710. (H.checkShapes = G),
  1711. (H.completeLayers = x),
  1712. H
  1713. );
  1714. }
  1715. if (
  1716. (a.dataManager || (a.dataManager = d()),
  1717. a.assetLoader ||
  1718. (a.assetLoader = (function () {
  1719. function x(y) {
  1720. var m = y.getResponseHeader('content-type');
  1721. return (m &&
  1722. y.responseType === 'json' &&
  1723. m.indexOf('json') !== -1) ||
  1724. (y.response && _typeof$5(y.response) === 'object')
  1725. ? y.response
  1726. : y.response && typeof y.response == 'string'
  1727. ? JSON.parse(y.response)
  1728. : y.responseText
  1729. ? JSON.parse(y.responseText)
  1730. : null;
  1731. }
  1732. function u(y, m, A, T) {
  1733. var E,
  1734. _ = new XMLHttpRequest();
  1735. try {
  1736. _.responseType = 'json';
  1737. } catch (I) {}
  1738. _.onreadystatechange = function () {
  1739. if (_.readyState === 4)
  1740. if (_.status === 200) (E = x(_)), A(E);
  1741. else
  1742. try {
  1743. (E = x(_)), A(E);
  1744. } catch (I) {
  1745. T && T(I);
  1746. }
  1747. };
  1748. try {
  1749. _.open(['G', 'E', 'T'].join(''), y, !0);
  1750. } catch (I) {
  1751. _.open(['G', 'E', 'T'].join(''), m + '/' + y, !0);
  1752. }
  1753. _.send();
  1754. }
  1755. return { load: u };
  1756. })()),
  1757. P.data.type === 'loadAnimation')
  1758. )
  1759. a.assetLoader.load(
  1760. P.data.path,
  1761. P.data.fullPath,
  1762. function (x) {
  1763. a.dataManager.completeData(x),
  1764. a.postMessage({
  1765. id: P.data.id,
  1766. payload: x,
  1767. status: 'success'
  1768. });
  1769. },
  1770. function () {
  1771. a.postMessage({ id: P.data.id, status: 'error' });
  1772. }
  1773. );
  1774. else if (P.data.type === 'complete') {
  1775. var p = P.data.animation;
  1776. a.dataManager.completeData(p),
  1777. a.postMessage({
  1778. id: P.data.id,
  1779. payload: p,
  1780. status: 'success'
  1781. });
  1782. } else
  1783. P.data.type === 'loadData' &&
  1784. a.assetLoader.load(
  1785. P.data.path,
  1786. P.data.fullPath,
  1787. function (x) {
  1788. a.postMessage({
  1789. id: P.data.id,
  1790. payload: x,
  1791. status: 'success'
  1792. });
  1793. },
  1794. function () {
  1795. a.postMessage({ id: P.data.id, status: 'error' });
  1796. }
  1797. );
  1798. })),
  1799. (i.onmessage = function (c) {
  1800. var P = c.data,
  1801. d = P.id,
  1802. p = t[d];
  1803. (t[d] = null),
  1804. P.status === 'success'
  1805. ? p.onComplete(P.payload)
  1806. : p.onError && p.onError();
  1807. }));
  1808. }
  1809. function l(c, P) {
  1810. e += 1;
  1811. var d = 'processId_' + e;
  1812. return (t[d] = { onComplete: c, onError: P }), d;
  1813. }
  1814. function f(c, P, d) {
  1815. n();
  1816. var p = l(P, d);
  1817. i.postMessage({
  1818. type: 'loadAnimation',
  1819. path: c,
  1820. fullPath: window.location.origin + window.location.pathname,
  1821. id: p
  1822. });
  1823. }
  1824. function g(c, P, d) {
  1825. n();
  1826. var p = l(P, d);
  1827. i.postMessage({
  1828. type: 'loadData',
  1829. path: c,
  1830. fullPath: window.location.origin + window.location.pathname,
  1831. id: p
  1832. });
  1833. }
  1834. function S(c, P, d) {
  1835. n();
  1836. var p = l(P, d);
  1837. i.postMessage({ type: 'complete', animation: c, id: p });
  1838. }
  1839. return { loadAnimation: f, loadData: g, completeAnimation: S };
  1840. })(),
  1841. ImagePreloader = (function () {
  1842. var e = (function () {
  1843. var u = createTag('canvas');
  1844. (u.width = 1), (u.height = 1);
  1845. var y = u.getContext('2d');
  1846. return (y.fillStyle = 'rgba(0,0,0,0)'), y.fillRect(0, 0, 1, 1), u;
  1847. })();
  1848. function t() {
  1849. (this.loadedAssets += 1),
  1850. this.loadedAssets === this.totalImages &&
  1851. this.loadedFootagesCount === this.totalFootages &&
  1852. this.imagesLoadedCb &&
  1853. this.imagesLoadedCb(null);
  1854. }
  1855. function r() {
  1856. (this.loadedFootagesCount += 1),
  1857. this.loadedAssets === this.totalImages &&
  1858. this.loadedFootagesCount === this.totalFootages &&
  1859. this.imagesLoadedCb &&
  1860. this.imagesLoadedCb(null);
  1861. }
  1862. function i(u, y, m) {
  1863. var A = '';
  1864. if (u.e) A = u.p;
  1865. else if (y) {
  1866. var T = u.p;
  1867. T.indexOf('images/') !== -1 && (T = T.split('/')[1]), (A = y + T);
  1868. } else (A = m), (A += u.u ? u.u : ''), (A += u.p);
  1869. return A;
  1870. }
  1871. function s(u) {
  1872. var y = 0,
  1873. m = setInterval(
  1874. function () {
  1875. var A = u.getBBox();
  1876. (A.width || y > 500) &&
  1877. (this._imageLoaded(), clearInterval(m)),
  1878. (y += 1);
  1879. }.bind(this),
  1880. 50
  1881. );
  1882. }
  1883. function a(u) {
  1884. var y = i(u, this.assetsPath, this.path),
  1885. m = createNS('image');
  1886. isSafari
  1887. ? this.testImageLoaded(m)
  1888. : m.addEventListener('load', this._imageLoaded, !1),
  1889. m.addEventListener(
  1890. 'error',
  1891. function () {
  1892. (A.img = e), this._imageLoaded();
  1893. }.bind(this),
  1894. !1
  1895. ),
  1896. m.setAttributeNS('http://www.w3.org/1999/xlink', 'href', y),
  1897. this._elementHelper.append
  1898. ? this._elementHelper.append(m)
  1899. : this._elementHelper.appendChild(m);
  1900. var A = { img: m, assetData: u };
  1901. return A;
  1902. }
  1903. function o(u) {
  1904. var y = i(u, this.assetsPath, this.path),
  1905. m = createTag('img');
  1906. (m.crossOrigin = 'anonymous'),
  1907. m.addEventListener('load', this._imageLoaded, !1),
  1908. m.addEventListener(
  1909. 'error',
  1910. function () {
  1911. (A.img = e), this._imageLoaded();
  1912. }.bind(this),
  1913. !1
  1914. ),
  1915. (m.src = y);
  1916. var A = { img: m, assetData: u };
  1917. return A;
  1918. }
  1919. function n(u) {
  1920. var y = { assetData: u },
  1921. m = i(u, this.assetsPath, this.path);
  1922. return (
  1923. dataManager.loadData(
  1924. m,
  1925. function (A) {
  1926. (y.img = A), this._footageLoaded();
  1927. }.bind(this),
  1928. function () {
  1929. (y.img = {}), this._footageLoaded();
  1930. }.bind(this)
  1931. ),
  1932. y
  1933. );
  1934. }
  1935. function l(u, y) {
  1936. this.imagesLoadedCb = y;
  1937. var m,
  1938. A = u.length;
  1939. for (m = 0; m < A; m += 1)
  1940. u[m].layers ||
  1941. (!u[m].t || u[m].t === 'seq'
  1942. ? ((this.totalImages += 1),
  1943. this.images.push(this._createImageData(u[m])))
  1944. : u[m].t === 3 &&
  1945. ((this.totalFootages += 1),
  1946. this.images.push(this.createFootageData(u[m]))));
  1947. }
  1948. function f(u) {
  1949. this.path = u || '';
  1950. }
  1951. function g(u) {
  1952. this.assetsPath = u || '';
  1953. }
  1954. function S(u) {
  1955. for (var y = 0, m = this.images.length; y < m; ) {
  1956. if (this.images[y].assetData === u) return this.images[y].img;
  1957. y += 1;
  1958. }
  1959. return null;
  1960. }
  1961. function c() {
  1962. (this.imagesLoadedCb = null), (this.images.length = 0);
  1963. }
  1964. function P() {
  1965. return this.totalImages === this.loadedAssets;
  1966. }
  1967. function d() {
  1968. return this.totalFootages === this.loadedFootagesCount;
  1969. }
  1970. function p(u, y) {
  1971. u === 'svg'
  1972. ? ((this._elementHelper = y),
  1973. (this._createImageData = this.createImageData.bind(this)))
  1974. : (this._createImageData = this.createImgData.bind(this));
  1975. }
  1976. function x() {
  1977. (this._imageLoaded = t.bind(this)),
  1978. (this._footageLoaded = r.bind(this)),
  1979. (this.testImageLoaded = s.bind(this)),
  1980. (this.createFootageData = n.bind(this)),
  1981. (this.assetsPath = ''),
  1982. (this.path = ''),
  1983. (this.totalImages = 0),
  1984. (this.totalFootages = 0),
  1985. (this.loadedAssets = 0),
  1986. (this.loadedFootagesCount = 0),
  1987. (this.imagesLoadedCb = null),
  1988. (this.images = []);
  1989. }
  1990. return (
  1991. (x.prototype = {
  1992. loadAssets: l,
  1993. setAssetsPath: g,
  1994. setPath: f,
  1995. loadedImages: P,
  1996. loadedFootages: d,
  1997. destroy: c,
  1998. getAsset: S,
  1999. createImgData: o,
  2000. createImageData: a,
  2001. imageLoaded: t,
  2002. footageLoaded: r,
  2003. setCacheType: p
  2004. }),
  2005. x
  2006. );
  2007. })();
  2008. function BaseEvent() {}
  2009. BaseEvent.prototype = {
  2010. triggerEvent: function (t, r) {
  2011. if (this._cbs[t])
  2012. for (var i = this._cbs[t], s = 0; s < i.length; s += 1) i[s](r);
  2013. },
  2014. addEventListener: function (t, r) {
  2015. return (
  2016. this._cbs[t] || (this._cbs[t] = []),
  2017. this._cbs[t].push(r),
  2018. function () {
  2019. this.removeEventListener(t, r);
  2020. }.bind(this)
  2021. );
  2022. },
  2023. removeEventListener: function (t, r) {
  2024. if (!r) this._cbs[t] = null;
  2025. else if (this._cbs[t]) {
  2026. for (var i = 0, s = this._cbs[t].length; i < s; )
  2027. this._cbs[t][i] === r &&
  2028. (this._cbs[t].splice(i, 1), (i -= 1), (s -= 1)),
  2029. (i += 1);
  2030. this._cbs[t].length || (this._cbs[t] = null);
  2031. }
  2032. }
  2033. };
  2034. var markerParser = (function () {
  2035. function e(t) {
  2036. for (
  2037. var r = t.split('\r\n'), i = {}, s, a = 0, o = 0;
  2038. o < r.length;
  2039. o += 1
  2040. )
  2041. (s = r[o].split(':')),
  2042. s.length === 2 && ((i[s[0]] = s[1].trim()), (a += 1));
  2043. if (a === 0) throw new Error();
  2044. return i;
  2045. }
  2046. return function (t) {
  2047. for (var r = [], i = 0; i < t.length; i += 1) {
  2048. var s = t[i],
  2049. a = { time: s.tm, duration: s.dr };
  2050. try {
  2051. a.payload = JSON.parse(t[i].cm);
  2052. } catch (o) {
  2053. try {
  2054. a.payload = e(t[i].cm);
  2055. } catch (n) {
  2056. a.payload = { name: t[i].cm };
  2057. }
  2058. }
  2059. r.push(a);
  2060. }
  2061. return r;
  2062. };
  2063. })(),
  2064. ProjectInterface = (function () {
  2065. function e(t) {
  2066. this.compositions.push(t);
  2067. }
  2068. return function () {
  2069. function t(r) {
  2070. for (var i = 0, s = this.compositions.length; i < s; ) {
  2071. if (
  2072. this.compositions[i].data &&
  2073. this.compositions[i].data.nm === r
  2074. )
  2075. return (
  2076. this.compositions[i].prepareFrame &&
  2077. this.compositions[i].data.xt &&
  2078. this.compositions[i].prepareFrame(this.currentFrame),
  2079. this.compositions[i].compInterface
  2080. );
  2081. i += 1;
  2082. }
  2083. return null;
  2084. }
  2085. return (
  2086. (t.compositions = []),
  2087. (t.currentFrame = 0),
  2088. (t.registerComposition = e),
  2089. t
  2090. );
  2091. };
  2092. })(),
  2093. renderers = {},
  2094. registerRenderer = function (t, r) {
  2095. renderers[t] = r;
  2096. };
  2097. function getRenderer(e) {
  2098. return renderers[e];
  2099. }
  2100. function getRegisteredRenderer() {
  2101. if (renderers.canvas) return 'canvas';
  2102. for (var e in renderers) if (renderers[e]) return e;
  2103. return '';
  2104. }
  2105. function _typeof$4(e) {
  2106. '@babel/helpers - typeof';
  2107. return (
  2108. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  2109. ? (_typeof$4 = function (r) {
  2110. return typeof r;
  2111. })
  2112. : (_typeof$4 = function (r) {
  2113. return r &&
  2114. typeof Symbol == 'function' &&
  2115. r.constructor === Symbol &&
  2116. r !== Symbol.prototype
  2117. ? 'symbol'
  2118. : typeof r;
  2119. }),
  2120. _typeof$4(e)
  2121. );
  2122. }
  2123. var AnimationItem = function () {
  2124. (this._cbs = []),
  2125. (this.name = ''),
  2126. (this.path = ''),
  2127. (this.isLoaded = !1),
  2128. (this.currentFrame = 0),
  2129. (this.currentRawFrame = 0),
  2130. (this.firstFrame = 0),
  2131. (this.totalFrames = 0),
  2132. (this.frameRate = 0),
  2133. (this.frameMult = 0),
  2134. (this.playSpeed = 1),
  2135. (this.playDirection = 1),
  2136. (this.playCount = 0),
  2137. (this.animationData = {}),
  2138. (this.assets = []),
  2139. (this.isPaused = !0),
  2140. (this.autoplay = !1),
  2141. (this.loop = !0),
  2142. (this.renderer = null),
  2143. (this.animationID = createElementID()),
  2144. (this.assetsPath = ''),
  2145. (this.timeCompleted = 0),
  2146. (this.segmentPos = 0),
  2147. (this.isSubframeEnabled = getSubframeEnabled()),
  2148. (this.segments = []),
  2149. (this._idle = !0),
  2150. (this._completedLoop = !1),
  2151. (this.projectInterface = ProjectInterface()),
  2152. (this.imagePreloader = new ImagePreloader()),
  2153. (this.audioController = audioControllerFactory()),
  2154. (this.markers = []),
  2155. (this.configAnimation = this.configAnimation.bind(this)),
  2156. (this.onSetupError = this.onSetupError.bind(this)),
  2157. (this.onSegmentComplete = this.onSegmentComplete.bind(this)),
  2158. (this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0)),
  2159. (this.expressionsPlugin = getExpressionsPlugin());
  2160. };
  2161. extendPrototype([BaseEvent], AnimationItem),
  2162. (AnimationItem.prototype.setParams = function (e) {
  2163. (e.wrapper || e.container) &&
  2164. (this.wrapper = e.wrapper || e.container);
  2165. var t = 'svg';
  2166. e.animType ? (t = e.animType) : e.renderer && (t = e.renderer);
  2167. var r = getRenderer(t);
  2168. (this.renderer = new r(this, e.rendererSettings)),
  2169. this.imagePreloader.setCacheType(t, this.renderer.globalData.defs),
  2170. this.renderer.setProjectInterface(this.projectInterface),
  2171. (this.animType = t),
  2172. e.loop === '' ||
  2173. e.loop === null ||
  2174. e.loop === void 0 ||
  2175. e.loop === !0
  2176. ? (this.loop = !0)
  2177. : e.loop === !1
  2178. ? (this.loop = !1)
  2179. : (this.loop = parseInt(e.loop, 10)),
  2180. (this.autoplay = 'autoplay' in e ? e.autoplay : !0),
  2181. (this.name = e.name ? e.name : ''),
  2182. (this.autoloadSegments = Object.prototype.hasOwnProperty.call(
  2183. e,
  2184. 'autoloadSegments'
  2185. )
  2186. ? e.autoloadSegments
  2187. : !0),
  2188. (this.assetsPath = e.assetsPath),
  2189. (this.initialSegment = e.initialSegment),
  2190. e.audioFactory &&
  2191. this.audioController.setAudioFactory(e.audioFactory),
  2192. e.animationData
  2193. ? this.setupAnimation(e.animationData)
  2194. : e.path &&
  2195. (e.path.lastIndexOf('\\') !== -1
  2196. ? (this.path = e.path.substr(0, e.path.lastIndexOf('\\') + 1))
  2197. : (this.path = e.path.substr(0, e.path.lastIndexOf('/') + 1)),
  2198. (this.fileName = e.path.substr(e.path.lastIndexOf('/') + 1)),
  2199. (this.fileName = this.fileName.substr(
  2200. 0,
  2201. this.fileName.lastIndexOf('.json')
  2202. )),
  2203. dataManager.loadAnimation(
  2204. e.path,
  2205. this.configAnimation,
  2206. this.onSetupError
  2207. ));
  2208. }),
  2209. (AnimationItem.prototype.onSetupError = function () {
  2210. this.trigger('data_failed');
  2211. }),
  2212. (AnimationItem.prototype.setupAnimation = function (e) {
  2213. dataManager.completeAnimation(e, this.configAnimation);
  2214. }),
  2215. (AnimationItem.prototype.setData = function (e, t) {
  2216. t && _typeof$4(t) !== 'object' && (t = JSON.parse(t));
  2217. var r = { wrapper: e, animationData: t },
  2218. i = e.attributes;
  2219. (r.path = i.getNamedItem('data-animation-path')
  2220. ? i.getNamedItem('data-animation-path').value
  2221. : i.getNamedItem('data-bm-path')
  2222. ? i.getNamedItem('data-bm-path').value
  2223. : i.getNamedItem('bm-path')
  2224. ? i.getNamedItem('bm-path').value
  2225. : ''),
  2226. (r.animType = i.getNamedItem('data-anim-type')
  2227. ? i.getNamedItem('data-anim-type').value
  2228. : i.getNamedItem('data-bm-type')
  2229. ? i.getNamedItem('data-bm-type').value
  2230. : i.getNamedItem('bm-type')
  2231. ? i.getNamedItem('bm-type').value
  2232. : i.getNamedItem('data-bm-renderer')
  2233. ? i.getNamedItem('data-bm-renderer').value
  2234. : i.getNamedItem('bm-renderer')
  2235. ? i.getNamedItem('bm-renderer').value
  2236. : getRegisteredRenderer() || 'canvas');
  2237. var s = i.getNamedItem('data-anim-loop')
  2238. ? i.getNamedItem('data-anim-loop').value
  2239. : i.getNamedItem('data-bm-loop')
  2240. ? i.getNamedItem('data-bm-loop').value
  2241. : i.getNamedItem('bm-loop')
  2242. ? i.getNamedItem('bm-loop').value
  2243. : '';
  2244. s === 'false'
  2245. ? (r.loop = !1)
  2246. : s === 'true'
  2247. ? (r.loop = !0)
  2248. : s !== '' && (r.loop = parseInt(s, 10));
  2249. var a = i.getNamedItem('data-anim-autoplay')
  2250. ? i.getNamedItem('data-anim-autoplay').value
  2251. : i.getNamedItem('data-bm-autoplay')
  2252. ? i.getNamedItem('data-bm-autoplay').value
  2253. : i.getNamedItem('bm-autoplay')
  2254. ? i.getNamedItem('bm-autoplay').value
  2255. : !0;
  2256. (r.autoplay = a !== 'false'),
  2257. (r.name = i.getNamedItem('data-name')
  2258. ? i.getNamedItem('data-name').value
  2259. : i.getNamedItem('data-bm-name')
  2260. ? i.getNamedItem('data-bm-name').value
  2261. : i.getNamedItem('bm-name')
  2262. ? i.getNamedItem('bm-name').value
  2263. : '');
  2264. var o = i.getNamedItem('data-anim-prerender')
  2265. ? i.getNamedItem('data-anim-prerender').value
  2266. : i.getNamedItem('data-bm-prerender')
  2267. ? i.getNamedItem('data-bm-prerender').value
  2268. : i.getNamedItem('bm-prerender')
  2269. ? i.getNamedItem('bm-prerender').value
  2270. : '';
  2271. o === 'false' && (r.prerender = !1),
  2272. r.path ? this.setParams(r) : this.trigger('destroy');
  2273. }),
  2274. (AnimationItem.prototype.includeLayers = function (e) {
  2275. e.op > this.animationData.op &&
  2276. ((this.animationData.op = e.op),
  2277. (this.totalFrames = Math.floor(e.op - this.animationData.ip)));
  2278. var t = this.animationData.layers,
  2279. r,
  2280. i = t.length,
  2281. s = e.layers,
  2282. a,
  2283. o = s.length;
  2284. for (a = 0; a < o; a += 1)
  2285. for (r = 0; r < i; ) {
  2286. if (t[r].id === s[a].id) {
  2287. t[r] = s[a];
  2288. break;
  2289. }
  2290. r += 1;
  2291. }
  2292. if (
  2293. ((e.chars || e.fonts) &&
  2294. (this.renderer.globalData.fontManager.addChars(e.chars),
  2295. this.renderer.globalData.fontManager.addFonts(
  2296. e.fonts,
  2297. this.renderer.globalData.defs
  2298. )),
  2299. e.assets)
  2300. )
  2301. for (i = e.assets.length, r = 0; r < i; r += 1)
  2302. this.animationData.assets.push(e.assets[r]);
  2303. (this.animationData.__complete = !1),
  2304. dataManager.completeAnimation(
  2305. this.animationData,
  2306. this.onSegmentComplete
  2307. );
  2308. }),
  2309. (AnimationItem.prototype.onSegmentComplete = function (e) {
  2310. this.animationData = e;
  2311. var t = getExpressionsPlugin();
  2312. t && t.initExpressions(this), this.loadNextSegment();
  2313. }),
  2314. (AnimationItem.prototype.loadNextSegment = function () {
  2315. var e = this.animationData.segments;
  2316. if (!e || e.length === 0 || !this.autoloadSegments) {
  2317. this.trigger('data_ready'), (this.timeCompleted = this.totalFrames);
  2318. return;
  2319. }
  2320. var t = e.shift();
  2321. this.timeCompleted = t.time * this.frameRate;
  2322. var r = this.path + this.fileName + '_' + this.segmentPos + '.json';
  2323. (this.segmentPos += 1),
  2324. dataManager.loadData(
  2325. r,
  2326. this.includeLayers.bind(this),
  2327. function () {
  2328. this.trigger('data_failed');
  2329. }.bind(this)
  2330. );
  2331. }),
  2332. (AnimationItem.prototype.loadSegments = function () {
  2333. var e = this.animationData.segments;
  2334. e || (this.timeCompleted = this.totalFrames), this.loadNextSegment();
  2335. }),
  2336. (AnimationItem.prototype.imagesLoaded = function () {
  2337. this.trigger('loaded_images'), this.checkLoaded();
  2338. }),
  2339. (AnimationItem.prototype.preloadImages = function () {
  2340. this.imagePreloader.setAssetsPath(this.assetsPath),
  2341. this.imagePreloader.setPath(this.path),
  2342. this.imagePreloader.loadAssets(
  2343. this.animationData.assets,
  2344. this.imagesLoaded.bind(this)
  2345. );
  2346. }),
  2347. (AnimationItem.prototype.configAnimation = function (e) {
  2348. if (this.renderer)
  2349. try {
  2350. (this.animationData = e),
  2351. this.initialSegment
  2352. ? ((this.totalFrames = Math.floor(
  2353. this.initialSegment[1] - this.initialSegment[0]
  2354. )),
  2355. (this.firstFrame = Math.round(this.initialSegment[0])))
  2356. : ((this.totalFrames = Math.floor(
  2357. this.animationData.op - this.animationData.ip
  2358. )),
  2359. (this.firstFrame = Math.round(this.animationData.ip))),
  2360. this.renderer.configAnimation(e),
  2361. e.assets || (e.assets = []),
  2362. (this.assets = this.animationData.assets),
  2363. (this.frameRate = this.animationData.fr),
  2364. (this.frameMult = this.animationData.fr / 1e3),
  2365. this.renderer.searchExtraCompositions(e.assets),
  2366. (this.markers = markerParser(e.markers || [])),
  2367. this.trigger('config_ready'),
  2368. this.preloadImages(),
  2369. this.loadSegments(),
  2370. this.updaFrameModifier(),
  2371. this.waitForFontsLoaded(),
  2372. this.isPaused && this.audioController.pause();
  2373. } catch (t) {
  2374. this.triggerConfigError(t);
  2375. }
  2376. }),
  2377. (AnimationItem.prototype.waitForFontsLoaded = function () {
  2378. this.renderer &&
  2379. (this.renderer.globalData.fontManager.isLoaded
  2380. ? this.checkLoaded()
  2381. : setTimeout(this.waitForFontsLoaded.bind(this), 20));
  2382. }),
  2383. (AnimationItem.prototype.checkLoaded = function () {
  2384. if (
  2385. !this.isLoaded &&
  2386. this.renderer.globalData.fontManager.isLoaded &&
  2387. (this.imagePreloader.loadedImages() ||
  2388. this.renderer.rendererType !== 'canvas') &&
  2389. this.imagePreloader.loadedFootages()
  2390. ) {
  2391. this.isLoaded = !0;
  2392. var e = getExpressionsPlugin();
  2393. e && e.initExpressions(this),
  2394. this.renderer.initItems(),
  2395. setTimeout(
  2396. function () {
  2397. this.trigger('DOMLoaded');
  2398. }.bind(this),
  2399. 0
  2400. ),
  2401. this.gotoFrame(),
  2402. this.autoplay && this.play();
  2403. }
  2404. }),
  2405. (AnimationItem.prototype.resize = function (e, t) {
  2406. var r = typeof e == 'number' ? e : void 0,
  2407. i = typeof t == 'number' ? t : void 0;
  2408. this.renderer.updateContainerSize(r, i);
  2409. }),
  2410. (AnimationItem.prototype.setSubframe = function (e) {
  2411. this.isSubframeEnabled = !!e;
  2412. }),
  2413. (AnimationItem.prototype.gotoFrame = function () {
  2414. (this.currentFrame = this.isSubframeEnabled
  2415. ? this.currentRawFrame
  2416. : ~~this.currentRawFrame),
  2417. this.timeCompleted !== this.totalFrames &&
  2418. this.currentFrame > this.timeCompleted &&
  2419. (this.currentFrame = this.timeCompleted),
  2420. this.trigger('enterFrame'),
  2421. this.renderFrame(),
  2422. this.trigger('drawnFrame');
  2423. }),
  2424. (AnimationItem.prototype.renderFrame = function () {
  2425. if (!(this.isLoaded === !1 || !this.renderer))
  2426. try {
  2427. this.expressionsPlugin && this.expressionsPlugin.resetFrame(),
  2428. this.renderer.renderFrame(this.currentFrame + this.firstFrame);
  2429. } catch (e) {
  2430. this.triggerRenderFrameError(e);
  2431. }
  2432. }),
  2433. (AnimationItem.prototype.play = function (e) {
  2434. (e && this.name !== e) ||
  2435. (this.isPaused === !0 &&
  2436. ((this.isPaused = !1),
  2437. this.trigger('_play'),
  2438. this.audioController.resume(),
  2439. this._idle && ((this._idle = !1), this.trigger('_active'))));
  2440. }),
  2441. (AnimationItem.prototype.pause = function (e) {
  2442. (e && this.name !== e) ||
  2443. (this.isPaused === !1 &&
  2444. ((this.isPaused = !0),
  2445. this.trigger('_pause'),
  2446. (this._idle = !0),
  2447. this.trigger('_idle'),
  2448. this.audioController.pause()));
  2449. }),
  2450. (AnimationItem.prototype.togglePause = function (e) {
  2451. (e && this.name !== e) ||
  2452. (this.isPaused === !0 ? this.play() : this.pause());
  2453. }),
  2454. (AnimationItem.prototype.stop = function (e) {
  2455. (e && this.name !== e) ||
  2456. (this.pause(),
  2457. (this.playCount = 0),
  2458. (this._completedLoop = !1),
  2459. this.setCurrentRawFrameValue(0));
  2460. }),
  2461. (AnimationItem.prototype.getMarkerData = function (e) {
  2462. for (var t, r = 0; r < this.markers.length; r += 1)
  2463. if (((t = this.markers[r]), t.payload && t.payload.name === e))
  2464. return t;
  2465. return null;
  2466. }),
  2467. (AnimationItem.prototype.goToAndStop = function (e, t, r) {
  2468. if (!(r && this.name !== r)) {
  2469. var i = Number(e);
  2470. if (isNaN(i)) {
  2471. var s = this.getMarkerData(e);
  2472. s && this.goToAndStop(s.time, !0);
  2473. } else
  2474. t
  2475. ? this.setCurrentRawFrameValue(e)
  2476. : this.setCurrentRawFrameValue(e * this.frameModifier);
  2477. this.pause();
  2478. }
  2479. }),
  2480. (AnimationItem.prototype.goToAndPlay = function (e, t, r) {
  2481. if (!(r && this.name !== r)) {
  2482. var i = Number(e);
  2483. if (isNaN(i)) {
  2484. var s = this.getMarkerData(e);
  2485. s &&
  2486. (s.duration
  2487. ? this.playSegments([s.time, s.time + s.duration], !0)
  2488. : this.goToAndStop(s.time, !0));
  2489. } else this.goToAndStop(i, t, r);
  2490. this.play();
  2491. }
  2492. }),
  2493. (AnimationItem.prototype.advanceTime = function (e) {
  2494. if (!(this.isPaused === !0 || this.isLoaded === !1)) {
  2495. var t = this.currentRawFrame + e * this.frameModifier,
  2496. r = !1;
  2497. t >= this.totalFrames - 1 && this.frameModifier > 0
  2498. ? !this.loop || this.playCount === this.loop
  2499. ? this.checkSegments(
  2500. t > this.totalFrames ? t % this.totalFrames : 0
  2501. ) || ((r = !0), (t = this.totalFrames - 1))
  2502. : t >= this.totalFrames
  2503. ? ((this.playCount += 1),
  2504. this.checkSegments(t % this.totalFrames) ||
  2505. (this.setCurrentRawFrameValue(t % this.totalFrames),
  2506. (this._completedLoop = !0),
  2507. this.trigger('loopComplete')))
  2508. : this.setCurrentRawFrameValue(t)
  2509. : t < 0
  2510. ? this.checkSegments(t % this.totalFrames) ||
  2511. (this.loop && !(this.playCount-- <= 0 && this.loop !== !0)
  2512. ? (this.setCurrentRawFrameValue(
  2513. this.totalFrames + (t % this.totalFrames)
  2514. ),
  2515. this._completedLoop
  2516. ? this.trigger('loopComplete')
  2517. : (this._completedLoop = !0))
  2518. : ((r = !0), (t = 0)))
  2519. : this.setCurrentRawFrameValue(t),
  2520. r &&
  2521. (this.setCurrentRawFrameValue(t),
  2522. this.pause(),
  2523. this.trigger('complete'));
  2524. }
  2525. }),
  2526. (AnimationItem.prototype.adjustSegment = function (e, t) {
  2527. (this.playCount = 0),
  2528. e[1] < e[0]
  2529. ? (this.frameModifier > 0 &&
  2530. (this.playSpeed < 0
  2531. ? this.setSpeed(-this.playSpeed)
  2532. : this.setDirection(-1)),
  2533. (this.totalFrames = e[0] - e[1]),
  2534. (this.timeCompleted = this.totalFrames),
  2535. (this.firstFrame = e[1]),
  2536. this.setCurrentRawFrameValue(this.totalFrames - 0.001 - t))
  2537. : e[1] > e[0] &&
  2538. (this.frameModifier < 0 &&
  2539. (this.playSpeed < 0
  2540. ? this.setSpeed(-this.playSpeed)
  2541. : this.setDirection(1)),
  2542. (this.totalFrames = e[1] - e[0]),
  2543. (this.timeCompleted = this.totalFrames),
  2544. (this.firstFrame = e[0]),
  2545. this.setCurrentRawFrameValue(0.001 + t)),
  2546. this.trigger('segmentStart');
  2547. }),
  2548. (AnimationItem.prototype.setSegment = function (e, t) {
  2549. var r = -1;
  2550. this.isPaused &&
  2551. (this.currentRawFrame + this.firstFrame < e
  2552. ? (r = e)
  2553. : this.currentRawFrame + this.firstFrame > t && (r = t - e)),
  2554. (this.firstFrame = e),
  2555. (this.totalFrames = t - e),
  2556. (this.timeCompleted = this.totalFrames),
  2557. r !== -1 && this.goToAndStop(r, !0);
  2558. }),
  2559. (AnimationItem.prototype.playSegments = function (e, t) {
  2560. if ((t && (this.segments.length = 0), _typeof$4(e[0]) === 'object')) {
  2561. var r,
  2562. i = e.length;
  2563. for (r = 0; r < i; r += 1) this.segments.push(e[r]);
  2564. } else this.segments.push(e);
  2565. this.segments.length &&
  2566. t &&
  2567. this.adjustSegment(this.segments.shift(), 0),
  2568. this.isPaused && this.play();
  2569. }),
  2570. (AnimationItem.prototype.resetSegments = function (e) {
  2571. (this.segments.length = 0),
  2572. this.segments.push([this.animationData.ip, this.animationData.op]),
  2573. e && this.checkSegments(0);
  2574. }),
  2575. (AnimationItem.prototype.checkSegments = function (e) {
  2576. return this.segments.length
  2577. ? (this.adjustSegment(this.segments.shift(), e), !0)
  2578. : !1;
  2579. }),
  2580. (AnimationItem.prototype.destroy = function (e) {
  2581. (e && this.name !== e) ||
  2582. !this.renderer ||
  2583. (this.renderer.destroy(),
  2584. this.imagePreloader.destroy(),
  2585. this.trigger('destroy'),
  2586. (this._cbs = null),
  2587. (this.onEnterFrame = null),
  2588. (this.onLoopComplete = null),
  2589. (this.onComplete = null),
  2590. (this.onSegmentStart = null),
  2591. (this.onDestroy = null),
  2592. (this.renderer = null),
  2593. (this.expressionsPlugin = null),
  2594. (this.imagePreloader = null),
  2595. (this.projectInterface = null));
  2596. }),
  2597. (AnimationItem.prototype.setCurrentRawFrameValue = function (e) {
  2598. (this.currentRawFrame = e), this.gotoFrame();
  2599. }),
  2600. (AnimationItem.prototype.setSpeed = function (e) {
  2601. (this.playSpeed = e), this.updaFrameModifier();
  2602. }),
  2603. (AnimationItem.prototype.setDirection = function (e) {
  2604. (this.playDirection = e < 0 ? -1 : 1), this.updaFrameModifier();
  2605. }),
  2606. (AnimationItem.prototype.setLoop = function (e) {
  2607. this.loop = e;
  2608. }),
  2609. (AnimationItem.prototype.setVolume = function (e, t) {
  2610. (t && this.name !== t) || this.audioController.setVolume(e);
  2611. }),
  2612. (AnimationItem.prototype.getVolume = function () {
  2613. return this.audioController.getVolume();
  2614. }),
  2615. (AnimationItem.prototype.mute = function (e) {
  2616. (e && this.name !== e) || this.audioController.mute();
  2617. }),
  2618. (AnimationItem.prototype.unmute = function (e) {
  2619. (e && this.name !== e) || this.audioController.unmute();
  2620. }),
  2621. (AnimationItem.prototype.updaFrameModifier = function () {
  2622. (this.frameModifier =
  2623. this.frameMult * this.playSpeed * this.playDirection),
  2624. this.audioController.setRate(this.playSpeed * this.playDirection);
  2625. }),
  2626. (AnimationItem.prototype.getPath = function () {
  2627. return this.path;
  2628. }),
  2629. (AnimationItem.prototype.getAssetsPath = function (e) {
  2630. var t = '';
  2631. if (e.e) t = e.p;
  2632. else if (this.assetsPath) {
  2633. var r = e.p;
  2634. r.indexOf('images/') !== -1 && (r = r.split('/')[1]),
  2635. (t = this.assetsPath + r);
  2636. } else (t = this.path), (t += e.u ? e.u : ''), (t += e.p);
  2637. return t;
  2638. }),
  2639. (AnimationItem.prototype.getAssetData = function (e) {
  2640. for (var t = 0, r = this.assets.length; t < r; ) {
  2641. if (e === this.assets[t].id) return this.assets[t];
  2642. t += 1;
  2643. }
  2644. return null;
  2645. }),
  2646. (AnimationItem.prototype.hide = function () {
  2647. this.renderer.hide();
  2648. }),
  2649. (AnimationItem.prototype.show = function () {
  2650. this.renderer.show();
  2651. }),
  2652. (AnimationItem.prototype.getDuration = function (e) {
  2653. return e ? this.totalFrames : this.totalFrames / this.frameRate;
  2654. }),
  2655. (AnimationItem.prototype.updateDocumentData = function (e, t, r) {
  2656. try {
  2657. var i = this.renderer.getElementByPath(e);
  2658. i.updateDocumentData(t, r);
  2659. } catch (s) {}
  2660. }),
  2661. (AnimationItem.prototype.trigger = function (e) {
  2662. if (this._cbs && this._cbs[e])
  2663. switch (e) {
  2664. case 'enterFrame':
  2665. this.triggerEvent(
  2666. e,
  2667. new BMEnterFrameEvent(
  2668. e,
  2669. this.currentFrame,
  2670. this.totalFrames,
  2671. this.frameModifier
  2672. )
  2673. );
  2674. break;
  2675. case 'drawnFrame':
  2676. (this.drawnFrameEvent.currentTime = this.currentFrame),
  2677. (this.drawnFrameEvent.totalTime = this.totalFrames),
  2678. (this.drawnFrameEvent.direction = this.frameModifier),
  2679. this.triggerEvent(e, this.drawnFrameEvent);
  2680. break;
  2681. case 'loopComplete':
  2682. this.triggerEvent(
  2683. e,
  2684. new BMCompleteLoopEvent(
  2685. e,
  2686. this.loop,
  2687. this.playCount,
  2688. this.frameMult
  2689. )
  2690. );
  2691. break;
  2692. case 'complete':
  2693. this.triggerEvent(e, new BMCompleteEvent(e, this.frameMult));
  2694. break;
  2695. case 'segmentStart':
  2696. this.triggerEvent(
  2697. e,
  2698. new BMSegmentStartEvent(e, this.firstFrame, this.totalFrames)
  2699. );
  2700. break;
  2701. case 'destroy':
  2702. this.triggerEvent(e, new BMDestroyEvent(e, this));
  2703. break;
  2704. default:
  2705. this.triggerEvent(e);
  2706. }
  2707. e === 'enterFrame' &&
  2708. this.onEnterFrame &&
  2709. this.onEnterFrame.call(
  2710. this,
  2711. new BMEnterFrameEvent(
  2712. e,
  2713. this.currentFrame,
  2714. this.totalFrames,
  2715. this.frameMult
  2716. )
  2717. ),
  2718. e === 'loopComplete' &&
  2719. this.onLoopComplete &&
  2720. this.onLoopComplete.call(
  2721. this,
  2722. new BMCompleteLoopEvent(
  2723. e,
  2724. this.loop,
  2725. this.playCount,
  2726. this.frameMult
  2727. )
  2728. ),
  2729. e === 'complete' &&
  2730. this.onComplete &&
  2731. this.onComplete.call(
  2732. this,
  2733. new BMCompleteEvent(e, this.frameMult)
  2734. ),
  2735. e === 'segmentStart' &&
  2736. this.onSegmentStart &&
  2737. this.onSegmentStart.call(
  2738. this,
  2739. new BMSegmentStartEvent(e, this.firstFrame, this.totalFrames)
  2740. ),
  2741. e === 'destroy' &&
  2742. this.onDestroy &&
  2743. this.onDestroy.call(this, new BMDestroyEvent(e, this));
  2744. }),
  2745. (AnimationItem.prototype.triggerRenderFrameError = function (e) {
  2746. var t = new BMRenderFrameErrorEvent(e, this.currentFrame);
  2747. this.triggerEvent('error', t),
  2748. this.onError && this.onError.call(this, t);
  2749. }),
  2750. (AnimationItem.prototype.triggerConfigError = function (e) {
  2751. var t = new BMConfigErrorEvent(e, this.currentFrame);
  2752. this.triggerEvent('error', t),
  2753. this.onError && this.onError.call(this, t);
  2754. });
  2755. var animationManager = (function () {
  2756. var e = {},
  2757. t = [],
  2758. r = 0,
  2759. i = 0,
  2760. s = 0,
  2761. a = !0,
  2762. o = !1;
  2763. function n(M) {
  2764. for (var k = 0, b = M.target; k < i; )
  2765. t[k].animation === b &&
  2766. (t.splice(k, 1), (k -= 1), (i -= 1), b.isPaused || S()),
  2767. (k += 1);
  2768. }
  2769. function l(M, k) {
  2770. if (!M) return null;
  2771. for (var b = 0; b < i; ) {
  2772. if (t[b].elem === M && t[b].elem !== null) return t[b].animation;
  2773. b += 1;
  2774. }
  2775. var C = new AnimationItem();
  2776. return c(C, M), C.setData(M, k), C;
  2777. }
  2778. function f() {
  2779. var M,
  2780. k = t.length,
  2781. b = [];
  2782. for (M = 0; M < k; M += 1) b.push(t[M].animation);
  2783. return b;
  2784. }
  2785. function g() {
  2786. (s += 1), z();
  2787. }
  2788. function S() {
  2789. s -= 1;
  2790. }
  2791. function c(M, k) {
  2792. M.addEventListener('destroy', n),
  2793. M.addEventListener('_active', g),
  2794. M.addEventListener('_idle', S),
  2795. t.push({ elem: k, animation: M }),
  2796. (i += 1);
  2797. }
  2798. function P(M) {
  2799. var k = new AnimationItem();
  2800. return c(k, null), k.setParams(M), k;
  2801. }
  2802. function d(M, k) {
  2803. var b;
  2804. for (b = 0; b < i; b += 1) t[b].animation.setSpeed(M, k);
  2805. }
  2806. function p(M, k) {
  2807. var b;
  2808. for (b = 0; b < i; b += 1) t[b].animation.setDirection(M, k);
  2809. }
  2810. function x(M) {
  2811. var k;
  2812. for (k = 0; k < i; k += 1) t[k].animation.play(M);
  2813. }
  2814. function u(M) {
  2815. var k = M - r,
  2816. b;
  2817. for (b = 0; b < i; b += 1) t[b].animation.advanceTime(k);
  2818. (r = M), s && !o ? window.requestAnimationFrame(u) : (a = !0);
  2819. }
  2820. function y(M) {
  2821. (r = M), window.requestAnimationFrame(u);
  2822. }
  2823. function m(M) {
  2824. var k;
  2825. for (k = 0; k < i; k += 1) t[k].animation.pause(M);
  2826. }
  2827. function A(M, k, b) {
  2828. var C;
  2829. for (C = 0; C < i; C += 1) t[C].animation.goToAndStop(M, k, b);
  2830. }
  2831. function T(M) {
  2832. var k;
  2833. for (k = 0; k < i; k += 1) t[k].animation.stop(M);
  2834. }
  2835. function E(M) {
  2836. var k;
  2837. for (k = 0; k < i; k += 1) t[k].animation.togglePause(M);
  2838. }
  2839. function _(M) {
  2840. var k;
  2841. for (k = i - 1; k >= 0; k -= 1) t[k].animation.destroy(M);
  2842. }
  2843. function I(M, k, b) {
  2844. var C = [].concat(
  2845. [].slice.call(document.getElementsByClassName('lottie')),
  2846. [].slice.call(document.getElementsByClassName('bodymovin'))
  2847. ),
  2848. L,
  2849. F = C.length;
  2850. for (L = 0; L < F; L += 1)
  2851. b && C[L].setAttribute('data-bm-type', b), l(C[L], M);
  2852. if (k && F === 0) {
  2853. b || (b = 'svg');
  2854. var U = document.getElementsByTagName('body')[0];
  2855. U.innerText = '';
  2856. var D = createTag('div');
  2857. (D.style.width = '100%'),
  2858. (D.style.height = '100%'),
  2859. D.setAttribute('data-bm-type', b),
  2860. U.appendChild(D),
  2861. l(D, M);
  2862. }
  2863. }
  2864. function B() {
  2865. var M;
  2866. for (M = 0; M < i; M += 1) t[M].animation.resize();
  2867. }
  2868. function z() {
  2869. !o && s && a && (window.requestAnimationFrame(y), (a = !1));
  2870. }
  2871. function G() {
  2872. o = !0;
  2873. }
  2874. function R() {
  2875. (o = !1), z();
  2876. }
  2877. function W(M, k) {
  2878. var b;
  2879. for (b = 0; b < i; b += 1) t[b].animation.setVolume(M, k);
  2880. }
  2881. function H(M) {
  2882. var k;
  2883. for (k = 0; k < i; k += 1) t[k].animation.mute(M);
  2884. }
  2885. function N(M) {
  2886. var k;
  2887. for (k = 0; k < i; k += 1) t[k].animation.unmute(M);
  2888. }
  2889. return (
  2890. (e.registerAnimation = l),
  2891. (e.loadAnimation = P),
  2892. (e.setSpeed = d),
  2893. (e.setDirection = p),
  2894. (e.play = x),
  2895. (e.pause = m),
  2896. (e.stop = T),
  2897. (e.togglePause = E),
  2898. (e.searchAnimations = I),
  2899. (e.resize = B),
  2900. (e.goToAndStop = A),
  2901. (e.destroy = _),
  2902. (e.freeze = G),
  2903. (e.unfreeze = R),
  2904. (e.setVolume = W),
  2905. (e.mute = H),
  2906. (e.unmute = N),
  2907. (e.getRegisteredAnimations = f),
  2908. e
  2909. );
  2910. })(),
  2911. BezierFactory = (function () {
  2912. var e = {};
  2913. e.getBezierEasing = r;
  2914. var t = {};
  2915. function r(y, m, A, T, E) {
  2916. var _ =
  2917. E ||
  2918. ('bez_' + y + '_' + m + '_' + A + '_' + T).replace(/\./g, 'p');
  2919. if (t[_]) return t[_];
  2920. var I = new u([y, m, A, T]);
  2921. return (t[_] = I), I;
  2922. }
  2923. var i = 4,
  2924. s = 0.001,
  2925. a = 1e-7,
  2926. o = 10,
  2927. n = 11,
  2928. l = 1 / (n - 1),
  2929. f = typeof Float32Array == 'function';
  2930. function g(y, m) {
  2931. return 1 - 3 * m + 3 * y;
  2932. }
  2933. function S(y, m) {
  2934. return 3 * m - 6 * y;
  2935. }
  2936. function c(y) {
  2937. return 3 * y;
  2938. }
  2939. function P(y, m, A) {
  2940. return ((g(m, A) * y + S(m, A)) * y + c(m)) * y;
  2941. }
  2942. function d(y, m, A) {
  2943. return 3 * g(m, A) * y * y + 2 * S(m, A) * y + c(m);
  2944. }
  2945. function p(y, m, A, T, E) {
  2946. var _,
  2947. I,
  2948. B = 0;
  2949. do
  2950. (I = m + (A - m) / 2),
  2951. (_ = P(I, T, E) - y),
  2952. _ > 0 ? (A = I) : (m = I);
  2953. while (Math.abs(_) > a && ++B < o);
  2954. return I;
  2955. }
  2956. function x(y, m, A, T) {
  2957. for (var E = 0; E < i; ++E) {
  2958. var _ = d(m, A, T);
  2959. if (_ === 0) return m;
  2960. var I = P(m, A, T) - y;
  2961. m -= I / _;
  2962. }
  2963. return m;
  2964. }
  2965. function u(y) {
  2966. (this._p = y),
  2967. (this._mSampleValues = f ? new Float32Array(n) : new Array(n)),
  2968. (this._precomputed = !1),
  2969. (this.get = this.get.bind(this));
  2970. }
  2971. return (
  2972. (u.prototype = {
  2973. get: function (m) {
  2974. var A = this._p[0],
  2975. T = this._p[1],
  2976. E = this._p[2],
  2977. _ = this._p[3];
  2978. return (
  2979. this._precomputed || this._precompute(),
  2980. A === T && E === _
  2981. ? m
  2982. : m === 0
  2983. ? 0
  2984. : m === 1
  2985. ? 1
  2986. : P(this._getTForX(m), T, _)
  2987. );
  2988. },
  2989. _precompute: function () {
  2990. var m = this._p[0],
  2991. A = this._p[1],
  2992. T = this._p[2],
  2993. E = this._p[3];
  2994. (this._precomputed = !0),
  2995. (m !== A || T !== E) && this._calcSampleValues();
  2996. },
  2997. _calcSampleValues: function () {
  2998. for (var m = this._p[0], A = this._p[2], T = 0; T < n; ++T)
  2999. this._mSampleValues[T] = P(T * l, m, A);
  3000. },
  3001. _getTForX: function (m) {
  3002. for (
  3003. var A = this._p[0],
  3004. T = this._p[2],
  3005. E = this._mSampleValues,
  3006. _ = 0,
  3007. I = 1,
  3008. B = n - 1;
  3009. I !== B && E[I] <= m;
  3010. ++I
  3011. )
  3012. _ += l;
  3013. --I;
  3014. var z = (m - E[I]) / (E[I + 1] - E[I]),
  3015. G = _ + z * l,
  3016. R = d(G, A, T);
  3017. return R >= s
  3018. ? x(m, G, A, T)
  3019. : R === 0
  3020. ? G
  3021. : p(m, _, _ + l, A, T);
  3022. }
  3023. }),
  3024. e
  3025. );
  3026. })(),
  3027. pooling = (function () {
  3028. function e(t) {
  3029. return t.concat(createSizedArray(t.length));
  3030. }
  3031. return { double: e };
  3032. })(),
  3033. poolFactory = (function () {
  3034. return function (e, t, r) {
  3035. var i = 0,
  3036. s = e,
  3037. a = createSizedArray(s),
  3038. o = { newElement: n, release: l };
  3039. function n() {
  3040. var f;
  3041. return i ? ((i -= 1), (f = a[i])) : (f = t()), f;
  3042. }
  3043. function l(f) {
  3044. i === s && ((a = pooling.double(a)), (s *= 2)),
  3045. r && r(f),
  3046. (a[i] = f),
  3047. (i += 1);
  3048. }
  3049. return o;
  3050. };
  3051. })(),
  3052. bezierLengthPool = (function () {
  3053. function e() {
  3054. return {
  3055. addedLength: 0,
  3056. percents: createTypedArray('float32', getDefaultCurveSegments()),
  3057. lengths: createTypedArray('float32', getDefaultCurveSegments())
  3058. };
  3059. }
  3060. return poolFactory(8, e);
  3061. })(),
  3062. segmentsLengthPool = (function () {
  3063. function e() {
  3064. return { lengths: [], totalLength: 0 };
  3065. }
  3066. function t(r) {
  3067. var i,
  3068. s = r.lengths.length;
  3069. for (i = 0; i < s; i += 1) bezierLengthPool.release(r.lengths[i]);
  3070. r.lengths.length = 0;
  3071. }
  3072. return poolFactory(8, e, t);
  3073. })();
  3074. function bezFunction() {
  3075. var e = Math;
  3076. function t(c, P, d, p, x, u) {
  3077. var y = c * p + P * x + d * u - x * p - u * c - d * P;
  3078. return y > -0.001 && y < 0.001;
  3079. }
  3080. function r(c, P, d, p, x, u, y, m, A) {
  3081. if (d === 0 && u === 0 && A === 0) return t(c, P, p, x, y, m);
  3082. var T = e.sqrt(e.pow(p - c, 2) + e.pow(x - P, 2) + e.pow(u - d, 2)),
  3083. E = e.sqrt(e.pow(y - c, 2) + e.pow(m - P, 2) + e.pow(A - d, 2)),
  3084. _ = e.sqrt(e.pow(y - p, 2) + e.pow(m - x, 2) + e.pow(A - u, 2)),
  3085. I;
  3086. return (
  3087. T > E
  3088. ? T > _
  3089. ? (I = T - E - _)
  3090. : (I = _ - E - T)
  3091. : _ > E
  3092. ? (I = _ - E - T)
  3093. : (I = E - T - _),
  3094. I > -1e-4 && I < 1e-4
  3095. );
  3096. }
  3097. var i = (function () {
  3098. return function (c, P, d, p) {
  3099. var x = getDefaultCurveSegments(),
  3100. u,
  3101. y,
  3102. m,
  3103. A,
  3104. T,
  3105. E = 0,
  3106. _,
  3107. I = [],
  3108. B = [],
  3109. z = bezierLengthPool.newElement();
  3110. for (m = d.length, u = 0; u < x; u += 1) {
  3111. for (T = u / (x - 1), _ = 0, y = 0; y < m; y += 1)
  3112. (A =
  3113. bmPow(1 - T, 3) * c[y] +
  3114. 3 * bmPow(1 - T, 2) * T * d[y] +
  3115. 3 * (1 - T) * bmPow(T, 2) * p[y] +
  3116. bmPow(T, 3) * P[y]),
  3117. (I[y] = A),
  3118. B[y] !== null && (_ += bmPow(I[y] - B[y], 2)),
  3119. (B[y] = I[y]);
  3120. _ && ((_ = bmSqrt(_)), (E += _)),
  3121. (z.percents[u] = T),
  3122. (z.lengths[u] = E);
  3123. }
  3124. return (z.addedLength = E), z;
  3125. };
  3126. })();
  3127. function s(c) {
  3128. var P = segmentsLengthPool.newElement(),
  3129. d = c.c,
  3130. p = c.v,
  3131. x = c.o,
  3132. u = c.i,
  3133. y,
  3134. m = c._length,
  3135. A = P.lengths,
  3136. T = 0;
  3137. for (y = 0; y < m - 1; y += 1)
  3138. (A[y] = i(p[y], p[y + 1], x[y], u[y + 1])), (T += A[y].addedLength);
  3139. return (
  3140. d &&
  3141. m &&
  3142. ((A[y] = i(p[y], p[0], x[y], u[0])), (T += A[y].addedLength)),
  3143. (P.totalLength = T),
  3144. P
  3145. );
  3146. }
  3147. function a(c) {
  3148. (this.segmentLength = 0), (this.points = new Array(c));
  3149. }
  3150. function o(c, P) {
  3151. (this.partialLength = c), (this.point = P);
  3152. }
  3153. var n = (function () {
  3154. var c = {};
  3155. return function (P, d, p, x) {
  3156. var u = (
  3157. P[0] +
  3158. '_' +
  3159. P[1] +
  3160. '_' +
  3161. d[0] +
  3162. '_' +
  3163. d[1] +
  3164. '_' +
  3165. p[0] +
  3166. '_' +
  3167. p[1] +
  3168. '_' +
  3169. x[0] +
  3170. '_' +
  3171. x[1]
  3172. ).replace(/\./g, 'p');
  3173. if (!c[u]) {
  3174. var y = getDefaultCurveSegments(),
  3175. m,
  3176. A,
  3177. T,
  3178. E,
  3179. _,
  3180. I = 0,
  3181. B,
  3182. z,
  3183. G = null;
  3184. P.length === 2 &&
  3185. (P[0] !== d[0] || P[1] !== d[1]) &&
  3186. t(P[0], P[1], d[0], d[1], P[0] + p[0], P[1] + p[1]) &&
  3187. t(P[0], P[1], d[0], d[1], d[0] + x[0], d[1] + x[1]) &&
  3188. (y = 2);
  3189. var R = new a(y);
  3190. for (T = p.length, m = 0; m < y; m += 1) {
  3191. for (
  3192. z = createSizedArray(T), _ = m / (y - 1), B = 0, A = 0;
  3193. A < T;
  3194. A += 1
  3195. )
  3196. (E =
  3197. bmPow(1 - _, 3) * P[A] +
  3198. 3 * bmPow(1 - _, 2) * _ * (P[A] + p[A]) +
  3199. 3 * (1 - _) * bmPow(_, 2) * (d[A] + x[A]) +
  3200. bmPow(_, 3) * d[A]),
  3201. (z[A] = E),
  3202. G !== null && (B += bmPow(z[A] - G[A], 2));
  3203. (B = bmSqrt(B)), (I += B), (R.points[m] = new o(B, z)), (G = z);
  3204. }
  3205. (R.segmentLength = I), (c[u] = R);
  3206. }
  3207. return c[u];
  3208. };
  3209. })();
  3210. function l(c, P) {
  3211. var d = P.percents,
  3212. p = P.lengths,
  3213. x = d.length,
  3214. u = bmFloor((x - 1) * c),
  3215. y = c * P.addedLength,
  3216. m = 0;
  3217. if (u === x - 1 || u === 0 || y === p[u]) return d[u];
  3218. for (var A = p[u] > y ? -1 : 1, T = !0; T; )
  3219. if (
  3220. (p[u] <= y && p[u + 1] > y
  3221. ? ((m = (y - p[u]) / (p[u + 1] - p[u])), (T = !1))
  3222. : (u += A),
  3223. u < 0 || u >= x - 1)
  3224. ) {
  3225. if (u === x - 1) return d[u];
  3226. T = !1;
  3227. }
  3228. return d[u] + (d[u + 1] - d[u]) * m;
  3229. }
  3230. function f(c, P, d, p, x, u) {
  3231. var y = l(x, u),
  3232. m = 1 - y,
  3233. A =
  3234. e.round(
  3235. (m * m * m * c[0] +
  3236. (y * m * m + m * y * m + m * m * y) * d[0] +
  3237. (y * y * m + m * y * y + y * m * y) * p[0] +
  3238. y * y * y * P[0]) *
  3239. 1e3
  3240. ) / 1e3,
  3241. T =
  3242. e.round(
  3243. (m * m * m * c[1] +
  3244. (y * m * m + m * y * m + m * m * y) * d[1] +
  3245. (y * y * m + m * y * y + y * m * y) * p[1] +
  3246. y * y * y * P[1]) *
  3247. 1e3
  3248. ) / 1e3;
  3249. return [A, T];
  3250. }
  3251. var g = createTypedArray('float32', 8);
  3252. function S(c, P, d, p, x, u, y) {
  3253. x < 0 ? (x = 0) : x > 1 && (x = 1);
  3254. var m = l(x, y);
  3255. u = u > 1 ? 1 : u;
  3256. var A = l(u, y),
  3257. T,
  3258. E = c.length,
  3259. _ = 1 - m,
  3260. I = 1 - A,
  3261. B = _ * _ * _,
  3262. z = m * _ * _ * 3,
  3263. G = m * m * _ * 3,
  3264. R = m * m * m,
  3265. W = _ * _ * I,
  3266. H = m * _ * I + _ * m * I + _ * _ * A,
  3267. N = m * m * I + _ * m * A + m * _ * A,
  3268. M = m * m * A,
  3269. k = _ * I * I,
  3270. b = m * I * I + _ * A * I + _ * I * A,
  3271. C = m * A * I + _ * A * A + m * I * A,
  3272. L = m * A * A,
  3273. F = I * I * I,
  3274. U = A * I * I + I * A * I + I * I * A,
  3275. D = A * A * I + I * A * A + A * I * A,
  3276. V = A * A * A;
  3277. for (T = 0; T < E; T += 1)
  3278. (g[T * 4] =
  3279. e.round((B * c[T] + z * d[T] + G * p[T] + R * P[T]) * 1e3) / 1e3),
  3280. (g[T * 4 + 1] =
  3281. e.round((W * c[T] + H * d[T] + N * p[T] + M * P[T]) * 1e3) /
  3282. 1e3),
  3283. (g[T * 4 + 2] =
  3284. e.round((k * c[T] + b * d[T] + C * p[T] + L * P[T]) * 1e3) /
  3285. 1e3),
  3286. (g[T * 4 + 3] =
  3287. e.round((F * c[T] + U * d[T] + D * p[T] + V * P[T]) * 1e3) /
  3288. 1e3);
  3289. return g;
  3290. }
  3291. return {
  3292. getSegmentsLength: s,
  3293. getNewSegment: S,
  3294. getPointInSegment: f,
  3295. buildBezierData: n,
  3296. pointOnLine2D: t,
  3297. pointOnLine3D: r
  3298. };
  3299. }
  3300. var bez = bezFunction(),
  3301. initFrame = initialDefaultFrame,
  3302. mathAbs = Math.abs;
  3303. function interpolateValue(e, t) {
  3304. var r = this.offsetTime,
  3305. i;
  3306. this.propType === 'multidimensional' &&
  3307. (i = createTypedArray('float32', this.pv.length));
  3308. for (
  3309. var s = t.lastIndex,
  3310. a = s,
  3311. o = this.keyframes.length - 1,
  3312. n = !0,
  3313. l,
  3314. f,
  3315. g;
  3316. n;
  3317. ) {
  3318. if (
  3319. ((l = this.keyframes[a]),
  3320. (f = this.keyframes[a + 1]),
  3321. a === o - 1 && e >= f.t - r)
  3322. ) {
  3323. l.h && (l = f), (s = 0);
  3324. break;
  3325. }
  3326. if (f.t - r > e) {
  3327. s = a;
  3328. break;
  3329. }
  3330. a < o - 1 ? (a += 1) : ((s = 0), (n = !1));
  3331. }
  3332. g = this.keyframesMetadata[a] || {};
  3333. var S,
  3334. c,
  3335. P,
  3336. d,
  3337. p,
  3338. x,
  3339. u = f.t - r,
  3340. y = l.t - r,
  3341. m;
  3342. if (l.to) {
  3343. g.bezierData ||
  3344. (g.bezierData = bez.buildBezierData(l.s, f.s || l.e, l.to, l.ti));
  3345. var A = g.bezierData;
  3346. if (e >= u || e < y) {
  3347. var T = e >= u ? A.points.length - 1 : 0;
  3348. for (c = A.points[T].point.length, S = 0; S < c; S += 1)
  3349. i[S] = A.points[T].point[S];
  3350. } else {
  3351. g.__fnct
  3352. ? (x = g.__fnct)
  3353. : ((x = BezierFactory.getBezierEasing(
  3354. l.o.x,
  3355. l.o.y,
  3356. l.i.x,
  3357. l.i.y,
  3358. l.n
  3359. ).get),
  3360. (g.__fnct = x)),
  3361. (P = x((e - y) / (u - y)));
  3362. var E = A.segmentLength * P,
  3363. _,
  3364. I =
  3365. t.lastFrame < e && t._lastKeyframeIndex === a
  3366. ? t._lastAddedLength
  3367. : 0;
  3368. for (
  3369. p =
  3370. t.lastFrame < e && t._lastKeyframeIndex === a
  3371. ? t._lastPoint
  3372. : 0,
  3373. n = !0,
  3374. d = A.points.length;
  3375. n;
  3376. ) {
  3377. if (
  3378. ((I += A.points[p].partialLength),
  3379. E === 0 || P === 0 || p === A.points.length - 1)
  3380. ) {
  3381. for (c = A.points[p].point.length, S = 0; S < c; S += 1)
  3382. i[S] = A.points[p].point[S];
  3383. break;
  3384. } else if (E >= I && E < I + A.points[p + 1].partialLength) {
  3385. for (
  3386. _ = (E - I) / A.points[p + 1].partialLength,
  3387. c = A.points[p].point.length,
  3388. S = 0;
  3389. S < c;
  3390. S += 1
  3391. )
  3392. i[S] =
  3393. A.points[p].point[S] +
  3394. (A.points[p + 1].point[S] - A.points[p].point[S]) * _;
  3395. break;
  3396. }
  3397. p < d - 1 ? (p += 1) : (n = !1);
  3398. }
  3399. (t._lastPoint = p),
  3400. (t._lastAddedLength = I - A.points[p].partialLength),
  3401. (t._lastKeyframeIndex = a);
  3402. }
  3403. } else {
  3404. var B, z, G, R, W;
  3405. if (((o = l.s.length), (m = f.s || l.e), this.sh && l.h !== 1))
  3406. if (e >= u) (i[0] = m[0]), (i[1] = m[1]), (i[2] = m[2]);
  3407. else if (e <= y) (i[0] = l.s[0]), (i[1] = l.s[1]), (i[2] = l.s[2]);
  3408. else {
  3409. var H = createQuaternion(l.s),
  3410. N = createQuaternion(m),
  3411. M = (e - y) / (u - y);
  3412. quaternionToEuler(i, slerp(H, N, M));
  3413. }
  3414. else
  3415. for (a = 0; a < o; a += 1)
  3416. l.h !== 1 &&
  3417. (e >= u
  3418. ? (P = 1)
  3419. : e < y
  3420. ? (P = 0)
  3421. : (l.o.x.constructor === Array
  3422. ? (g.__fnct || (g.__fnct = []),
  3423. g.__fnct[a]
  3424. ? (x = g.__fnct[a])
  3425. : ((B = l.o.x[a] === void 0 ? l.o.x[0] : l.o.x[a]),
  3426. (z = l.o.y[a] === void 0 ? l.o.y[0] : l.o.y[a]),
  3427. (G = l.i.x[a] === void 0 ? l.i.x[0] : l.i.x[a]),
  3428. (R = l.i.y[a] === void 0 ? l.i.y[0] : l.i.y[a]),
  3429. (x = BezierFactory.getBezierEasing(B, z, G, R).get),
  3430. (g.__fnct[a] = x)))
  3431. : g.__fnct
  3432. ? (x = g.__fnct)
  3433. : ((B = l.o.x),
  3434. (z = l.o.y),
  3435. (G = l.i.x),
  3436. (R = l.i.y),
  3437. (x = BezierFactory.getBezierEasing(B, z, G, R).get),
  3438. (l.keyframeMetadata = x)),
  3439. (P = x((e - y) / (u - y))))),
  3440. (m = f.s || l.e),
  3441. (W = l.h === 1 ? l.s[a] : l.s[a] + (m[a] - l.s[a]) * P),
  3442. this.propType === 'multidimensional' ? (i[a] = W) : (i = W);
  3443. }
  3444. return (t.lastIndex = s), i;
  3445. }
  3446. function slerp(e, t, r) {
  3447. var i = [],
  3448. s = e[0],
  3449. a = e[1],
  3450. o = e[2],
  3451. n = e[3],
  3452. l = t[0],
  3453. f = t[1],
  3454. g = t[2],
  3455. S = t[3],
  3456. c,
  3457. P,
  3458. d,
  3459. p,
  3460. x;
  3461. return (
  3462. (P = s * l + a * f + o * g + n * S),
  3463. P < 0 && ((P = -P), (l = -l), (f = -f), (g = -g), (S = -S)),
  3464. 1 - P > 1e-6
  3465. ? ((c = Math.acos(P)),
  3466. (d = Math.sin(c)),
  3467. (p = Math.sin((1 - r) * c) / d),
  3468. (x = Math.sin(r * c) / d))
  3469. : ((p = 1 - r), (x = r)),
  3470. (i[0] = p * s + x * l),
  3471. (i[1] = p * a + x * f),
  3472. (i[2] = p * o + x * g),
  3473. (i[3] = p * n + x * S),
  3474. i
  3475. );
  3476. }
  3477. function quaternionToEuler(e, t) {
  3478. var r = t[0],
  3479. i = t[1],
  3480. s = t[2],
  3481. a = t[3],
  3482. o = Math.atan2(2 * i * a - 2 * r * s, 1 - 2 * i * i - 2 * s * s),
  3483. n = Math.asin(2 * r * i + 2 * s * a),
  3484. l = Math.atan2(2 * r * a - 2 * i * s, 1 - 2 * r * r - 2 * s * s);
  3485. (e[0] = o / degToRads), (e[1] = n / degToRads), (e[2] = l / degToRads);
  3486. }
  3487. function createQuaternion(e) {
  3488. var t = e[0] * degToRads,
  3489. r = e[1] * degToRads,
  3490. i = e[2] * degToRads,
  3491. s = Math.cos(t / 2),
  3492. a = Math.cos(r / 2),
  3493. o = Math.cos(i / 2),
  3494. n = Math.sin(t / 2),
  3495. l = Math.sin(r / 2),
  3496. f = Math.sin(i / 2),
  3497. g = s * a * o - n * l * f,
  3498. S = n * l * o + s * a * f,
  3499. c = n * a * o + s * l * f,
  3500. P = s * l * o - n * a * f;
  3501. return [S, c, P, g];
  3502. }
  3503. function getValueAtCurrentTime() {
  3504. var e = this.comp.renderedFrame - this.offsetTime,
  3505. t = this.keyframes[0].t - this.offsetTime,
  3506. r = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
  3507. if (
  3508. !(
  3509. e === this._caching.lastFrame ||
  3510. (this._caching.lastFrame !== initFrame &&
  3511. ((this._caching.lastFrame >= r && e >= r) ||
  3512. (this._caching.lastFrame < t && e < t)))
  3513. )
  3514. ) {
  3515. this._caching.lastFrame >= e &&
  3516. ((this._caching._lastKeyframeIndex = -1),
  3517. (this._caching.lastIndex = 0));
  3518. var i = this.interpolateValue(e, this._caching);
  3519. this.pv = i;
  3520. }
  3521. return (this._caching.lastFrame = e), this.pv;
  3522. }
  3523. function setVValue(e) {
  3524. var t;
  3525. if (this.propType === 'unidimensional')
  3526. (t = e * this.mult),
  3527. mathAbs(this.v - t) > 1e-5 && ((this.v = t), (this._mdf = !0));
  3528. else
  3529. for (var r = 0, i = this.v.length; r < i; )
  3530. (t = e[r] * this.mult),
  3531. mathAbs(this.v[r] - t) > 1e-5 &&
  3532. ((this.v[r] = t), (this._mdf = !0)),
  3533. (r += 1);
  3534. }
  3535. function processEffectsSequence() {
  3536. if (
  3537. !(
  3538. this.elem.globalData.frameId === this.frameId ||
  3539. !this.effectsSequence.length
  3540. )
  3541. ) {
  3542. if (this.lock) {
  3543. this.setVValue(this.pv);
  3544. return;
  3545. }
  3546. (this.lock = !0), (this._mdf = this._isFirstFrame);
  3547. var e,
  3548. t = this.effectsSequence.length,
  3549. r = this.kf ? this.pv : this.data.k;
  3550. for (e = 0; e < t; e += 1) r = this.effectsSequence[e](r);
  3551. this.setVValue(r),
  3552. (this._isFirstFrame = !1),
  3553. (this.lock = !1),
  3554. (this.frameId = this.elem.globalData.frameId);
  3555. }
  3556. }
  3557. function addEffect(e) {
  3558. this.effectsSequence.push(e), this.container.addDynamicProperty(this);
  3559. }
  3560. function ValueProperty(e, t, r, i) {
  3561. (this.propType = 'unidimensional'),
  3562. (this.mult = r || 1),
  3563. (this.data = t),
  3564. (this.v = r ? t.k * r : t.k),
  3565. (this.pv = t.k),
  3566. (this._mdf = !1),
  3567. (this.elem = e),
  3568. (this.container = i),
  3569. (this.comp = e.comp),
  3570. (this.k = !1),
  3571. (this.kf = !1),
  3572. (this.vel = 0),
  3573. (this.effectsSequence = []),
  3574. (this._isFirstFrame = !0),
  3575. (this.getValue = processEffectsSequence),
  3576. (this.setVValue = setVValue),
  3577. (this.addEffect = addEffect);
  3578. }
  3579. function MultiDimensionalProperty(e, t, r, i) {
  3580. (this.propType = 'multidimensional'),
  3581. (this.mult = r || 1),
  3582. (this.data = t),
  3583. (this._mdf = !1),
  3584. (this.elem = e),
  3585. (this.container = i),
  3586. (this.comp = e.comp),
  3587. (this.k = !1),
  3588. (this.kf = !1),
  3589. (this.frameId = -1);
  3590. var s,
  3591. a = t.k.length;
  3592. for (
  3593. this.v = createTypedArray('float32', a),
  3594. this.pv = createTypedArray('float32', a),
  3595. this.vel = createTypedArray('float32', a),
  3596. s = 0;
  3597. s < a;
  3598. s += 1
  3599. )
  3600. (this.v[s] = t.k[s] * this.mult), (this.pv[s] = t.k[s]);
  3601. (this._isFirstFrame = !0),
  3602. (this.effectsSequence = []),
  3603. (this.getValue = processEffectsSequence),
  3604. (this.setVValue = setVValue),
  3605. (this.addEffect = addEffect);
  3606. }
  3607. function KeyframedValueProperty(e, t, r, i) {
  3608. (this.propType = 'unidimensional'),
  3609. (this.keyframes = t.k),
  3610. (this.keyframesMetadata = []),
  3611. (this.offsetTime = e.data.st),
  3612. (this.frameId = -1),
  3613. (this._caching = {
  3614. lastFrame: initFrame,
  3615. lastIndex: 0,
  3616. value: 0,
  3617. _lastKeyframeIndex: -1
  3618. }),
  3619. (this.k = !0),
  3620. (this.kf = !0),
  3621. (this.data = t),
  3622. (this.mult = r || 1),
  3623. (this.elem = e),
  3624. (this.container = i),
  3625. (this.comp = e.comp),
  3626. (this.v = initFrame),
  3627. (this.pv = initFrame),
  3628. (this._isFirstFrame = !0),
  3629. (this.getValue = processEffectsSequence),
  3630. (this.setVValue = setVValue),
  3631. (this.interpolateValue = interpolateValue),
  3632. (this.effectsSequence = [getValueAtCurrentTime.bind(this)]),
  3633. (this.addEffect = addEffect);
  3634. }
  3635. function KeyframedMultidimensionalProperty(e, t, r, i) {
  3636. this.propType = 'multidimensional';
  3637. var s,
  3638. a = t.k.length,
  3639. o,
  3640. n,
  3641. l,
  3642. f;
  3643. for (s = 0; s < a - 1; s += 1)
  3644. t.k[s].to &&
  3645. t.k[s].s &&
  3646. t.k[s + 1] &&
  3647. t.k[s + 1].s &&
  3648. ((o = t.k[s].s),
  3649. (n = t.k[s + 1].s),
  3650. (l = t.k[s].to),
  3651. (f = t.k[s].ti),
  3652. ((o.length === 2 &&
  3653. !(o[0] === n[0] && o[1] === n[1]) &&
  3654. bez.pointOnLine2D(
  3655. o[0],
  3656. o[1],
  3657. n[0],
  3658. n[1],
  3659. o[0] + l[0],
  3660. o[1] + l[1]
  3661. ) &&
  3662. bez.pointOnLine2D(
  3663. o[0],
  3664. o[1],
  3665. n[0],
  3666. n[1],
  3667. n[0] + f[0],
  3668. n[1] + f[1]
  3669. )) ||
  3670. (o.length === 3 &&
  3671. !(o[0] === n[0] && o[1] === n[1] && o[2] === n[2]) &&
  3672. bez.pointOnLine3D(
  3673. o[0],
  3674. o[1],
  3675. o[2],
  3676. n[0],
  3677. n[1],
  3678. n[2],
  3679. o[0] + l[0],
  3680. o[1] + l[1],
  3681. o[2] + l[2]
  3682. ) &&
  3683. bez.pointOnLine3D(
  3684. o[0],
  3685. o[1],
  3686. o[2],
  3687. n[0],
  3688. n[1],
  3689. n[2],
  3690. n[0] + f[0],
  3691. n[1] + f[1],
  3692. n[2] + f[2]
  3693. ))) &&
  3694. ((t.k[s].to = null), (t.k[s].ti = null)),
  3695. o[0] === n[0] &&
  3696. o[1] === n[1] &&
  3697. l[0] === 0 &&
  3698. l[1] === 0 &&
  3699. f[0] === 0 &&
  3700. f[1] === 0 &&
  3701. (o.length === 2 || (o[2] === n[2] && l[2] === 0 && f[2] === 0)) &&
  3702. ((t.k[s].to = null), (t.k[s].ti = null)));
  3703. (this.effectsSequence = [getValueAtCurrentTime.bind(this)]),
  3704. (this.data = t),
  3705. (this.keyframes = t.k),
  3706. (this.keyframesMetadata = []),
  3707. (this.offsetTime = e.data.st),
  3708. (this.k = !0),
  3709. (this.kf = !0),
  3710. (this._isFirstFrame = !0),
  3711. (this.mult = r || 1),
  3712. (this.elem = e),
  3713. (this.container = i),
  3714. (this.comp = e.comp),
  3715. (this.getValue = processEffectsSequence),
  3716. (this.setVValue = setVValue),
  3717. (this.interpolateValue = interpolateValue),
  3718. (this.frameId = -1);
  3719. var g = t.k[0].s.length;
  3720. for (
  3721. this.v = createTypedArray('float32', g),
  3722. this.pv = createTypedArray('float32', g),
  3723. s = 0;
  3724. s < g;
  3725. s += 1
  3726. )
  3727. (this.v[s] = initFrame), (this.pv[s] = initFrame);
  3728. (this._caching = {
  3729. lastFrame: initFrame,
  3730. lastIndex: 0,
  3731. value: createTypedArray('float32', g)
  3732. }),
  3733. (this.addEffect = addEffect);
  3734. }
  3735. var PropertyFactory = (function () {
  3736. function e(r, i, s, a, o) {
  3737. i.sid && (i = r.globalData.slotManager.getProp(i));
  3738. var n;
  3739. if (!i.k.length) n = new ValueProperty(r, i, a, o);
  3740. else if (typeof i.k[0] == 'number')
  3741. n = new MultiDimensionalProperty(r, i, a, o);
  3742. else
  3743. switch (s) {
  3744. case 0:
  3745. n = new KeyframedValueProperty(r, i, a, o);
  3746. break;
  3747. case 1:
  3748. n = new KeyframedMultidimensionalProperty(r, i, a, o);
  3749. break;
  3750. }
  3751. return n.effectsSequence.length && o.addDynamicProperty(n), n;
  3752. }
  3753. var t = { getProp: e };
  3754. return t;
  3755. })();
  3756. function DynamicPropertyContainer() {}
  3757. DynamicPropertyContainer.prototype = {
  3758. addDynamicProperty: function (t) {
  3759. this.dynamicProperties.indexOf(t) === -1 &&
  3760. (this.dynamicProperties.push(t),
  3761. this.container.addDynamicProperty(this),
  3762. (this._isAnimated = !0));
  3763. },
  3764. iterateDynamicProperties: function () {
  3765. this._mdf = !1;
  3766. var t,
  3767. r = this.dynamicProperties.length;
  3768. for (t = 0; t < r; t += 1)
  3769. this.dynamicProperties[t].getValue(),
  3770. this.dynamicProperties[t]._mdf && (this._mdf = !0);
  3771. },
  3772. initDynamicPropertyContainer: function (t) {
  3773. (this.container = t),
  3774. (this.dynamicProperties = []),
  3775. (this._mdf = !1),
  3776. (this._isAnimated = !1);
  3777. }
  3778. };
  3779. var pointPool = (function () {
  3780. function e() {
  3781. return createTypedArray('float32', 2);
  3782. }
  3783. return poolFactory(8, e);
  3784. })();
  3785. function ShapePath() {
  3786. (this.c = !1),
  3787. (this._length = 0),
  3788. (this._maxLength = 8),
  3789. (this.v = createSizedArray(this._maxLength)),
  3790. (this.o = createSizedArray(this._maxLength)),
  3791. (this.i = createSizedArray(this._maxLength));
  3792. }
  3793. (ShapePath.prototype.setPathData = function (e, t) {
  3794. (this.c = e), this.setLength(t);
  3795. for (var r = 0; r < t; )
  3796. (this.v[r] = pointPool.newElement()),
  3797. (this.o[r] = pointPool.newElement()),
  3798. (this.i[r] = pointPool.newElement()),
  3799. (r += 1);
  3800. }),
  3801. (ShapePath.prototype.setLength = function (e) {
  3802. for (; this._maxLength < e; ) this.doubleArrayLength();
  3803. this._length = e;
  3804. }),
  3805. (ShapePath.prototype.doubleArrayLength = function () {
  3806. (this.v = this.v.concat(createSizedArray(this._maxLength))),
  3807. (this.i = this.i.concat(createSizedArray(this._maxLength))),
  3808. (this.o = this.o.concat(createSizedArray(this._maxLength))),
  3809. (this._maxLength *= 2);
  3810. }),
  3811. (ShapePath.prototype.setXYAt = function (e, t, r, i, s) {
  3812. var a;
  3813. switch (
  3814. ((this._length = Math.max(this._length, i + 1)),
  3815. this._length >= this._maxLength && this.doubleArrayLength(),
  3816. r)
  3817. ) {
  3818. case 'v':
  3819. a = this.v;
  3820. break;
  3821. case 'i':
  3822. a = this.i;
  3823. break;
  3824. case 'o':
  3825. a = this.o;
  3826. break;
  3827. default:
  3828. a = [];
  3829. break;
  3830. }
  3831. (!a[i] || (a[i] && !s)) && (a[i] = pointPool.newElement()),
  3832. (a[i][0] = e),
  3833. (a[i][1] = t);
  3834. }),
  3835. (ShapePath.prototype.setTripleAt = function (e, t, r, i, s, a, o, n) {
  3836. this.setXYAt(e, t, 'v', o, n),
  3837. this.setXYAt(r, i, 'o', o, n),
  3838. this.setXYAt(s, a, 'i', o, n);
  3839. }),
  3840. (ShapePath.prototype.reverse = function () {
  3841. var e = new ShapePath();
  3842. e.setPathData(this.c, this._length);
  3843. var t = this.v,
  3844. r = this.o,
  3845. i = this.i,
  3846. s = 0;
  3847. this.c &&
  3848. (e.setTripleAt(
  3849. t[0][0],
  3850. t[0][1],
  3851. i[0][0],
  3852. i[0][1],
  3853. r[0][0],
  3854. r[0][1],
  3855. 0,
  3856. !1
  3857. ),
  3858. (s = 1));
  3859. var a = this._length - 1,
  3860. o = this._length,
  3861. n;
  3862. for (n = s; n < o; n += 1)
  3863. e.setTripleAt(
  3864. t[a][0],
  3865. t[a][1],
  3866. i[a][0],
  3867. i[a][1],
  3868. r[a][0],
  3869. r[a][1],
  3870. n,
  3871. !1
  3872. ),
  3873. (a -= 1);
  3874. return e;
  3875. }),
  3876. (ShapePath.prototype.length = function () {
  3877. return this._length;
  3878. });
  3879. var shapePool = (function () {
  3880. function e() {
  3881. return new ShapePath();
  3882. }
  3883. function t(s) {
  3884. var a = s._length,
  3885. o;
  3886. for (o = 0; o < a; o += 1)
  3887. pointPool.release(s.v[o]),
  3888. pointPool.release(s.i[o]),
  3889. pointPool.release(s.o[o]),
  3890. (s.v[o] = null),
  3891. (s.i[o] = null),
  3892. (s.o[o] = null);
  3893. (s._length = 0), (s.c = !1);
  3894. }
  3895. function r(s) {
  3896. var a = i.newElement(),
  3897. o,
  3898. n = s._length === void 0 ? s.v.length : s._length;
  3899. for (a.setLength(n), a.c = s.c, o = 0; o < n; o += 1)
  3900. a.setTripleAt(
  3901. s.v[o][0],
  3902. s.v[o][1],
  3903. s.o[o][0],
  3904. s.o[o][1],
  3905. s.i[o][0],
  3906. s.i[o][1],
  3907. o
  3908. );
  3909. return a;
  3910. }
  3911. var i = poolFactory(4, e, t);
  3912. return (i.clone = r), i;
  3913. })();
  3914. function ShapeCollection() {
  3915. (this._length = 0),
  3916. (this._maxLength = 4),
  3917. (this.shapes = createSizedArray(this._maxLength));
  3918. }
  3919. (ShapeCollection.prototype.addShape = function (e) {
  3920. this._length === this._maxLength &&
  3921. ((this.shapes = this.shapes.concat(
  3922. createSizedArray(this._maxLength)
  3923. )),
  3924. (this._maxLength *= 2)),
  3925. (this.shapes[this._length] = e),
  3926. (this._length += 1);
  3927. }),
  3928. (ShapeCollection.prototype.releaseShapes = function () {
  3929. var e;
  3930. for (e = 0; e < this._length; e += 1)
  3931. shapePool.release(this.shapes[e]);
  3932. this._length = 0;
  3933. });
  3934. var shapeCollectionPool = (function () {
  3935. var e = { newShapeCollection: s, release: a },
  3936. t = 0,
  3937. r = 4,
  3938. i = createSizedArray(r);
  3939. function s() {
  3940. var o;
  3941. return t ? ((t -= 1), (o = i[t])) : (o = new ShapeCollection()), o;
  3942. }
  3943. function a(o) {
  3944. var n,
  3945. l = o._length;
  3946. for (n = 0; n < l; n += 1) shapePool.release(o.shapes[n]);
  3947. (o._length = 0),
  3948. t === r && ((i = pooling.double(i)), (r *= 2)),
  3949. (i[t] = o),
  3950. (t += 1);
  3951. }
  3952. return e;
  3953. })(),
  3954. ShapePropertyFactory = (function () {
  3955. var e = -999999;
  3956. function t(u, y, m) {
  3957. var A = m.lastIndex,
  3958. T,
  3959. E,
  3960. _,
  3961. I,
  3962. B,
  3963. z,
  3964. G,
  3965. R,
  3966. W,
  3967. H = this.keyframes;
  3968. if (u < H[0].t - this.offsetTime)
  3969. (T = H[0].s[0]), (_ = !0), (A = 0);
  3970. else if (u >= H[H.length - 1].t - this.offsetTime)
  3971. (T = H[H.length - 1].s
  3972. ? H[H.length - 1].s[0]
  3973. : H[H.length - 2].e[0]),
  3974. (_ = !0);
  3975. else {
  3976. for (
  3977. var N = A, M = H.length - 1, k = !0, b, C, L;
  3978. k && ((b = H[N]), (C = H[N + 1]), !(C.t - this.offsetTime > u));
  3979. )
  3980. N < M - 1 ? (N += 1) : (k = !1);
  3981. if (
  3982. ((L = this.keyframesMetadata[N] || {}),
  3983. (_ = b.h === 1),
  3984. (A = N),
  3985. !_)
  3986. ) {
  3987. if (u >= C.t - this.offsetTime) R = 1;
  3988. else if (u < b.t - this.offsetTime) R = 0;
  3989. else {
  3990. var F;
  3991. L.__fnct
  3992. ? (F = L.__fnct)
  3993. : ((F = BezierFactory.getBezierEasing(
  3994. b.o.x,
  3995. b.o.y,
  3996. b.i.x,
  3997. b.i.y
  3998. ).get),
  3999. (L.__fnct = F)),
  4000. (R = F(
  4001. (u - (b.t - this.offsetTime)) /
  4002. (C.t - this.offsetTime - (b.t - this.offsetTime))
  4003. ));
  4004. }
  4005. E = C.s ? C.s[0] : b.e[0];
  4006. }
  4007. T = b.s[0];
  4008. }
  4009. for (
  4010. z = y._length, G = T.i[0].length, m.lastIndex = A, I = 0;
  4011. I < z;
  4012. I += 1
  4013. )
  4014. for (B = 0; B < G; B += 1)
  4015. (W = _ ? T.i[I][B] : T.i[I][B] + (E.i[I][B] - T.i[I][B]) * R),
  4016. (y.i[I][B] = W),
  4017. (W = _ ? T.o[I][B] : T.o[I][B] + (E.o[I][B] - T.o[I][B]) * R),
  4018. (y.o[I][B] = W),
  4019. (W = _ ? T.v[I][B] : T.v[I][B] + (E.v[I][B] - T.v[I][B]) * R),
  4020. (y.v[I][B] = W);
  4021. }
  4022. function r() {
  4023. var u = this.comp.renderedFrame - this.offsetTime,
  4024. y = this.keyframes[0].t - this.offsetTime,
  4025. m = this.keyframes[this.keyframes.length - 1].t - this.offsetTime,
  4026. A = this._caching.lastFrame;
  4027. return (
  4028. (A !== e && ((A < y && u < y) || (A > m && u > m))) ||
  4029. ((this._caching.lastIndex =
  4030. A < u ? this._caching.lastIndex : 0),
  4031. this.interpolateShape(u, this.pv, this._caching)),
  4032. (this._caching.lastFrame = u),
  4033. this.pv
  4034. );
  4035. }
  4036. function i() {
  4037. this.paths = this.localShapeCollection;
  4038. }
  4039. function s(u, y) {
  4040. if (u._length !== y._length || u.c !== y.c) return !1;
  4041. var m,
  4042. A = u._length;
  4043. for (m = 0; m < A; m += 1)
  4044. if (
  4045. u.v[m][0] !== y.v[m][0] ||
  4046. u.v[m][1] !== y.v[m][1] ||
  4047. u.o[m][0] !== y.o[m][0] ||
  4048. u.o[m][1] !== y.o[m][1] ||
  4049. u.i[m][0] !== y.i[m][0] ||
  4050. u.i[m][1] !== y.i[m][1]
  4051. )
  4052. return !1;
  4053. return !0;
  4054. }
  4055. function a(u) {
  4056. s(this.v, u) ||
  4057. ((this.v = shapePool.clone(u)),
  4058. this.localShapeCollection.releaseShapes(),
  4059. this.localShapeCollection.addShape(this.v),
  4060. (this._mdf = !0),
  4061. (this.paths = this.localShapeCollection));
  4062. }
  4063. function o() {
  4064. if (this.elem.globalData.frameId !== this.frameId) {
  4065. if (!this.effectsSequence.length) {
  4066. this._mdf = !1;
  4067. return;
  4068. }
  4069. if (this.lock) {
  4070. this.setVValue(this.pv);
  4071. return;
  4072. }
  4073. (this.lock = !0), (this._mdf = !1);
  4074. var u;
  4075. this.kf
  4076. ? (u = this.pv)
  4077. : this.data.ks
  4078. ? (u = this.data.ks.k)
  4079. : (u = this.data.pt.k);
  4080. var y,
  4081. m = this.effectsSequence.length;
  4082. for (y = 0; y < m; y += 1) u = this.effectsSequence[y](u);
  4083. this.setVValue(u),
  4084. (this.lock = !1),
  4085. (this.frameId = this.elem.globalData.frameId);
  4086. }
  4087. }
  4088. function n(u, y, m) {
  4089. (this.propType = 'shape'),
  4090. (this.comp = u.comp),
  4091. (this.container = u),
  4092. (this.elem = u),
  4093. (this.data = y),
  4094. (this.k = !1),
  4095. (this.kf = !1),
  4096. (this._mdf = !1);
  4097. var A = m === 3 ? y.pt.k : y.ks.k;
  4098. (this.v = shapePool.clone(A)),
  4099. (this.pv = shapePool.clone(this.v)),
  4100. (this.localShapeCollection =
  4101. shapeCollectionPool.newShapeCollection()),
  4102. (this.paths = this.localShapeCollection),
  4103. this.paths.addShape(this.v),
  4104. (this.reset = i),
  4105. (this.effectsSequence = []);
  4106. }
  4107. function l(u) {
  4108. this.effectsSequence.push(u),
  4109. this.container.addDynamicProperty(this);
  4110. }
  4111. (n.prototype.interpolateShape = t),
  4112. (n.prototype.getValue = o),
  4113. (n.prototype.setVValue = a),
  4114. (n.prototype.addEffect = l);
  4115. function f(u, y, m) {
  4116. (this.propType = 'shape'),
  4117. (this.comp = u.comp),
  4118. (this.elem = u),
  4119. (this.container = u),
  4120. (this.offsetTime = u.data.st),
  4121. (this.keyframes = m === 3 ? y.pt.k : y.ks.k),
  4122. (this.keyframesMetadata = []),
  4123. (this.k = !0),
  4124. (this.kf = !0);
  4125. var A = this.keyframes[0].s[0].i.length;
  4126. (this.v = shapePool.newElement()),
  4127. this.v.setPathData(this.keyframes[0].s[0].c, A),
  4128. (this.pv = shapePool.clone(this.v)),
  4129. (this.localShapeCollection =
  4130. shapeCollectionPool.newShapeCollection()),
  4131. (this.paths = this.localShapeCollection),
  4132. this.paths.addShape(this.v),
  4133. (this.lastFrame = e),
  4134. (this.reset = i),
  4135. (this._caching = { lastFrame: e, lastIndex: 0 }),
  4136. (this.effectsSequence = [r.bind(this)]);
  4137. }
  4138. (f.prototype.getValue = o),
  4139. (f.prototype.interpolateShape = t),
  4140. (f.prototype.setVValue = a),
  4141. (f.prototype.addEffect = l);
  4142. var g = (function () {
  4143. var u = roundCorner;
  4144. function y(m, A) {
  4145. (this.v = shapePool.newElement()),
  4146. this.v.setPathData(!0, 4),
  4147. (this.localShapeCollection =
  4148. shapeCollectionPool.newShapeCollection()),
  4149. (this.paths = this.localShapeCollection),
  4150. this.localShapeCollection.addShape(this.v),
  4151. (this.d = A.d),
  4152. (this.elem = m),
  4153. (this.comp = m.comp),
  4154. (this.frameId = -1),
  4155. this.initDynamicPropertyContainer(m),
  4156. (this.p = PropertyFactory.getProp(m, A.p, 1, 0, this)),
  4157. (this.s = PropertyFactory.getProp(m, A.s, 1, 0, this)),
  4158. this.dynamicProperties.length
  4159. ? (this.k = !0)
  4160. : ((this.k = !1), this.convertEllToPath());
  4161. }
  4162. return (
  4163. (y.prototype = {
  4164. reset: i,
  4165. getValue: function () {
  4166. this.elem.globalData.frameId !== this.frameId &&
  4167. ((this.frameId = this.elem.globalData.frameId),
  4168. this.iterateDynamicProperties(),
  4169. this._mdf && this.convertEllToPath());
  4170. },
  4171. convertEllToPath: function () {
  4172. var A = this.p.v[0],
  4173. T = this.p.v[1],
  4174. E = this.s.v[0] / 2,
  4175. _ = this.s.v[1] / 2,
  4176. I = this.d !== 3,
  4177. B = this.v;
  4178. (B.v[0][0] = A),
  4179. (B.v[0][1] = T - _),
  4180. (B.v[1][0] = I ? A + E : A - E),
  4181. (B.v[1][1] = T),
  4182. (B.v[2][0] = A),
  4183. (B.v[2][1] = T + _),
  4184. (B.v[3][0] = I ? A - E : A + E),
  4185. (B.v[3][1] = T),
  4186. (B.i[0][0] = I ? A - E * u : A + E * u),
  4187. (B.i[0][1] = T - _),
  4188. (B.i[1][0] = I ? A + E : A - E),
  4189. (B.i[1][1] = T - _ * u),
  4190. (B.i[2][0] = I ? A + E * u : A - E * u),
  4191. (B.i[2][1] = T + _),
  4192. (B.i[3][0] = I ? A - E : A + E),
  4193. (B.i[3][1] = T + _ * u),
  4194. (B.o[0][0] = I ? A + E * u : A - E * u),
  4195. (B.o[0][1] = T - _),
  4196. (B.o[1][0] = I ? A + E : A - E),
  4197. (B.o[1][1] = T + _ * u),
  4198. (B.o[2][0] = I ? A - E * u : A + E * u),
  4199. (B.o[2][1] = T + _),
  4200. (B.o[3][0] = I ? A - E : A + E),
  4201. (B.o[3][1] = T - _ * u);
  4202. }
  4203. }),
  4204. extendPrototype([DynamicPropertyContainer], y),
  4205. y
  4206. );
  4207. })(),
  4208. S = (function () {
  4209. function u(y, m) {
  4210. (this.v = shapePool.newElement()),
  4211. this.v.setPathData(!0, 0),
  4212. (this.elem = y),
  4213. (this.comp = y.comp),
  4214. (this.data = m),
  4215. (this.frameId = -1),
  4216. (this.d = m.d),
  4217. this.initDynamicPropertyContainer(y),
  4218. m.sy === 1
  4219. ? ((this.ir = PropertyFactory.getProp(y, m.ir, 0, 0, this)),
  4220. (this.is = PropertyFactory.getProp(
  4221. y,
  4222. m.is,
  4223. 0,
  4224. 0.01,
  4225. this
  4226. )),
  4227. (this.convertToPath = this.convertStarToPath))
  4228. : (this.convertToPath = this.convertPolygonToPath),
  4229. (this.pt = PropertyFactory.getProp(y, m.pt, 0, 0, this)),
  4230. (this.p = PropertyFactory.getProp(y, m.p, 1, 0, this)),
  4231. (this.r = PropertyFactory.getProp(
  4232. y,
  4233. m.r,
  4234. 0,
  4235. degToRads,
  4236. this
  4237. )),
  4238. (this.or = PropertyFactory.getProp(y, m.or, 0, 0, this)),
  4239. (this.os = PropertyFactory.getProp(y, m.os, 0, 0.01, this)),
  4240. (this.localShapeCollection =
  4241. shapeCollectionPool.newShapeCollection()),
  4242. this.localShapeCollection.addShape(this.v),
  4243. (this.paths = this.localShapeCollection),
  4244. this.dynamicProperties.length
  4245. ? (this.k = !0)
  4246. : ((this.k = !1), this.convertToPath());
  4247. }
  4248. return (
  4249. (u.prototype = {
  4250. reset: i,
  4251. getValue: function () {
  4252. this.elem.globalData.frameId !== this.frameId &&
  4253. ((this.frameId = this.elem.globalData.frameId),
  4254. this.iterateDynamicProperties(),
  4255. this._mdf && this.convertToPath());
  4256. },
  4257. convertStarToPath: function () {
  4258. var m = Math.floor(this.pt.v) * 2,
  4259. A = (Math.PI * 2) / m,
  4260. T = !0,
  4261. E = this.or.v,
  4262. _ = this.ir.v,
  4263. I = this.os.v,
  4264. B = this.is.v,
  4265. z = (2 * Math.PI * E) / (m * 2),
  4266. G = (2 * Math.PI * _) / (m * 2),
  4267. R,
  4268. W,
  4269. H,
  4270. N,
  4271. M = -Math.PI / 2;
  4272. M += this.r.v;
  4273. var k = this.data.d === 3 ? -1 : 1;
  4274. for (this.v._length = 0, R = 0; R < m; R += 1) {
  4275. (W = T ? E : _), (H = T ? I : B), (N = T ? z : G);
  4276. var b = W * Math.cos(M),
  4277. C = W * Math.sin(M),
  4278. L =
  4279. b === 0 && C === 0 ? 0 : C / Math.sqrt(b * b + C * C),
  4280. F =
  4281. b === 0 && C === 0
  4282. ? 0
  4283. : -b / Math.sqrt(b * b + C * C);
  4284. (b += +this.p.v[0]),
  4285. (C += +this.p.v[1]),
  4286. this.v.setTripleAt(
  4287. b,
  4288. C,
  4289. b - L * N * H * k,
  4290. C - F * N * H * k,
  4291. b + L * N * H * k,
  4292. C + F * N * H * k,
  4293. R,
  4294. !0
  4295. ),
  4296. (T = !T),
  4297. (M += A * k);
  4298. }
  4299. },
  4300. convertPolygonToPath: function () {
  4301. var m = Math.floor(this.pt.v),
  4302. A = (Math.PI * 2) / m,
  4303. T = this.or.v,
  4304. E = this.os.v,
  4305. _ = (2 * Math.PI * T) / (m * 4),
  4306. I,
  4307. B = -Math.PI * 0.5,
  4308. z = this.data.d === 3 ? -1 : 1;
  4309. for (
  4310. B += this.r.v, this.v._length = 0, I = 0;
  4311. I < m;
  4312. I += 1
  4313. ) {
  4314. var G = T * Math.cos(B),
  4315. R = T * Math.sin(B),
  4316. W =
  4317. G === 0 && R === 0 ? 0 : R / Math.sqrt(G * G + R * R),
  4318. H =
  4319. G === 0 && R === 0
  4320. ? 0
  4321. : -G / Math.sqrt(G * G + R * R);
  4322. (G += +this.p.v[0]),
  4323. (R += +this.p.v[1]),
  4324. this.v.setTripleAt(
  4325. G,
  4326. R,
  4327. G - W * _ * E * z,
  4328. R - H * _ * E * z,
  4329. G + W * _ * E * z,
  4330. R + H * _ * E * z,
  4331. I,
  4332. !0
  4333. ),
  4334. (B += A * z);
  4335. }
  4336. (this.paths.length = 0), (this.paths[0] = this.v);
  4337. }
  4338. }),
  4339. extendPrototype([DynamicPropertyContainer], u),
  4340. u
  4341. );
  4342. })(),
  4343. c = (function () {
  4344. function u(y, m) {
  4345. (this.v = shapePool.newElement()),
  4346. (this.v.c = !0),
  4347. (this.localShapeCollection =
  4348. shapeCollectionPool.newShapeCollection()),
  4349. this.localShapeCollection.addShape(this.v),
  4350. (this.paths = this.localShapeCollection),
  4351. (this.elem = y),
  4352. (this.comp = y.comp),
  4353. (this.frameId = -1),
  4354. (this.d = m.d),
  4355. this.initDynamicPropertyContainer(y),
  4356. (this.p = PropertyFactory.getProp(y, m.p, 1, 0, this)),
  4357. (this.s = PropertyFactory.getProp(y, m.s, 1, 0, this)),
  4358. (this.r = PropertyFactory.getProp(y, m.r, 0, 0, this)),
  4359. this.dynamicProperties.length
  4360. ? (this.k = !0)
  4361. : ((this.k = !1), this.convertRectToPath());
  4362. }
  4363. return (
  4364. (u.prototype = {
  4365. convertRectToPath: function () {
  4366. var m = this.p.v[0],
  4367. A = this.p.v[1],
  4368. T = this.s.v[0] / 2,
  4369. E = this.s.v[1] / 2,
  4370. _ = bmMin(T, E, this.r.v),
  4371. I = _ * (1 - roundCorner);
  4372. (this.v._length = 0),
  4373. this.d === 2 || this.d === 1
  4374. ? (this.v.setTripleAt(
  4375. m + T,
  4376. A - E + _,
  4377. m + T,
  4378. A - E + _,
  4379. m + T,
  4380. A - E + I,
  4381. 0,
  4382. !0
  4383. ),
  4384. this.v.setTripleAt(
  4385. m + T,
  4386. A + E - _,
  4387. m + T,
  4388. A + E - I,
  4389. m + T,
  4390. A + E - _,
  4391. 1,
  4392. !0
  4393. ),
  4394. _ !== 0
  4395. ? (this.v.setTripleAt(
  4396. m + T - _,
  4397. A + E,
  4398. m + T - _,
  4399. A + E,
  4400. m + T - I,
  4401. A + E,
  4402. 2,
  4403. !0
  4404. ),
  4405. this.v.setTripleAt(
  4406. m - T + _,
  4407. A + E,
  4408. m - T + I,
  4409. A + E,
  4410. m - T + _,
  4411. A + E,
  4412. 3,
  4413. !0
  4414. ),
  4415. this.v.setTripleAt(
  4416. m - T,
  4417. A + E - _,
  4418. m - T,
  4419. A + E - _,
  4420. m - T,
  4421. A + E - I,
  4422. 4,
  4423. !0
  4424. ),
  4425. this.v.setTripleAt(
  4426. m - T,
  4427. A - E + _,
  4428. m - T,
  4429. A - E + I,
  4430. m - T,
  4431. A - E + _,
  4432. 5,
  4433. !0
  4434. ),
  4435. this.v.setTripleAt(
  4436. m - T + _,
  4437. A - E,
  4438. m - T + _,
  4439. A - E,
  4440. m - T + I,
  4441. A - E,
  4442. 6,
  4443. !0
  4444. ),
  4445. this.v.setTripleAt(
  4446. m + T - _,
  4447. A - E,
  4448. m + T - I,
  4449. A - E,
  4450. m + T - _,
  4451. A - E,
  4452. 7,
  4453. !0
  4454. ))
  4455. : (this.v.setTripleAt(
  4456. m - T,
  4457. A + E,
  4458. m - T + I,
  4459. A + E,
  4460. m - T,
  4461. A + E,
  4462. 2
  4463. ),
  4464. this.v.setTripleAt(
  4465. m - T,
  4466. A - E,
  4467. m - T,
  4468. A - E + I,
  4469. m - T,
  4470. A - E,
  4471. 3
  4472. )))
  4473. : (this.v.setTripleAt(
  4474. m + T,
  4475. A - E + _,
  4476. m + T,
  4477. A - E + I,
  4478. m + T,
  4479. A - E + _,
  4480. 0,
  4481. !0
  4482. ),
  4483. _ !== 0
  4484. ? (this.v.setTripleAt(
  4485. m + T - _,
  4486. A - E,
  4487. m + T - _,
  4488. A - E,
  4489. m + T - I,
  4490. A - E,
  4491. 1,
  4492. !0
  4493. ),
  4494. this.v.setTripleAt(
  4495. m - T + _,
  4496. A - E,
  4497. m - T + I,
  4498. A - E,
  4499. m - T + _,
  4500. A - E,
  4501. 2,
  4502. !0
  4503. ),
  4504. this.v.setTripleAt(
  4505. m - T,
  4506. A - E + _,
  4507. m - T,
  4508. A - E + _,
  4509. m - T,
  4510. A - E + I,
  4511. 3,
  4512. !0
  4513. ),
  4514. this.v.setTripleAt(
  4515. m - T,
  4516. A + E - _,
  4517. m - T,
  4518. A + E - I,
  4519. m - T,
  4520. A + E - _,
  4521. 4,
  4522. !0
  4523. ),
  4524. this.v.setTripleAt(
  4525. m - T + _,
  4526. A + E,
  4527. m - T + _,
  4528. A + E,
  4529. m - T + I,
  4530. A + E,
  4531. 5,
  4532. !0
  4533. ),
  4534. this.v.setTripleAt(
  4535. m + T - _,
  4536. A + E,
  4537. m + T - I,
  4538. A + E,
  4539. m + T - _,
  4540. A + E,
  4541. 6,
  4542. !0
  4543. ),
  4544. this.v.setTripleAt(
  4545. m + T,
  4546. A + E - _,
  4547. m + T,
  4548. A + E - _,
  4549. m + T,
  4550. A + E - I,
  4551. 7,
  4552. !0
  4553. ))
  4554. : (this.v.setTripleAt(
  4555. m - T,
  4556. A - E,
  4557. m - T + I,
  4558. A - E,
  4559. m - T,
  4560. A - E,
  4561. 1,
  4562. !0
  4563. ),
  4564. this.v.setTripleAt(
  4565. m - T,
  4566. A + E,
  4567. m - T,
  4568. A + E - I,
  4569. m - T,
  4570. A + E,
  4571. 2,
  4572. !0
  4573. ),
  4574. this.v.setTripleAt(
  4575. m + T,
  4576. A + E,
  4577. m + T - I,
  4578. A + E,
  4579. m + T,
  4580. A + E,
  4581. 3,
  4582. !0
  4583. )));
  4584. },
  4585. getValue: function () {
  4586. this.elem.globalData.frameId !== this.frameId &&
  4587. ((this.frameId = this.elem.globalData.frameId),
  4588. this.iterateDynamicProperties(),
  4589. this._mdf && this.convertRectToPath());
  4590. },
  4591. reset: i
  4592. }),
  4593. extendPrototype([DynamicPropertyContainer], u),
  4594. u
  4595. );
  4596. })();
  4597. function P(u, y, m) {
  4598. var A;
  4599. if (m === 3 || m === 4) {
  4600. var T = m === 3 ? y.pt : y.ks,
  4601. E = T.k;
  4602. E.length ? (A = new f(u, y, m)) : (A = new n(u, y, m));
  4603. } else
  4604. m === 5
  4605. ? (A = new c(u, y))
  4606. : m === 6
  4607. ? (A = new g(u, y))
  4608. : m === 7 && (A = new S(u, y));
  4609. return A.k && u.addDynamicProperty(A), A;
  4610. }
  4611. function d() {
  4612. return n;
  4613. }
  4614. function p() {
  4615. return f;
  4616. }
  4617. var x = {};
  4618. return (
  4619. (x.getShapeProp = P),
  4620. (x.getConstructorFunction = d),
  4621. (x.getKeyframedConstructorFunction = p),
  4622. x
  4623. );
  4624. })();
  4625. /*!
  4626. Transformation Matrix v2.0
  4627. (c) Epistemex 2014-2015
  4628. www.epistemex.com
  4629. By Ken Fyrstenberg
  4630. Contributions by leeoniya.
  4631. License: MIT, header required.
  4632. */ var Matrix = (function () {
  4633. var e = Math.cos,
  4634. t = Math.sin,
  4635. r = Math.tan,
  4636. i = Math.round;
  4637. function s() {
  4638. return (
  4639. (this.props[0] = 1),
  4640. (this.props[1] = 0),
  4641. (this.props[2] = 0),
  4642. (this.props[3] = 0),
  4643. (this.props[4] = 0),
  4644. (this.props[5] = 1),
  4645. (this.props[6] = 0),
  4646. (this.props[7] = 0),
  4647. (this.props[8] = 0),
  4648. (this.props[9] = 0),
  4649. (this.props[10] = 1),
  4650. (this.props[11] = 0),
  4651. (this.props[12] = 0),
  4652. (this.props[13] = 0),
  4653. (this.props[14] = 0),
  4654. (this.props[15] = 1),
  4655. this
  4656. );
  4657. }
  4658. function a(b) {
  4659. if (b === 0) return this;
  4660. var C = e(b),
  4661. L = t(b);
  4662. return this._t(C, -L, 0, 0, L, C, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  4663. }
  4664. function o(b) {
  4665. if (b === 0) return this;
  4666. var C = e(b),
  4667. L = t(b);
  4668. return this._t(1, 0, 0, 0, 0, C, -L, 0, 0, L, C, 0, 0, 0, 0, 1);
  4669. }
  4670. function n(b) {
  4671. if (b === 0) return this;
  4672. var C = e(b),
  4673. L = t(b);
  4674. return this._t(C, 0, L, 0, 0, 1, 0, 0, -L, 0, C, 0, 0, 0, 0, 1);
  4675. }
  4676. function l(b) {
  4677. if (b === 0) return this;
  4678. var C = e(b),
  4679. L = t(b);
  4680. return this._t(C, -L, 0, 0, L, C, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  4681. }
  4682. function f(b, C) {
  4683. return this._t(1, C, b, 1, 0, 0);
  4684. }
  4685. function g(b, C) {
  4686. return this.shear(r(b), r(C));
  4687. }
  4688. function S(b, C) {
  4689. var L = e(C),
  4690. F = t(C);
  4691. return this._t(L, F, 0, 0, -F, L, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
  4692. ._t(1, 0, 0, 0, r(b), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
  4693. ._t(L, -F, 0, 0, F, L, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  4694. }
  4695. function c(b, C, L) {
  4696. return (
  4697. !L && L !== 0 && (L = 1),
  4698. b === 1 && C === 1 && L === 1
  4699. ? this
  4700. : this._t(b, 0, 0, 0, 0, C, 0, 0, 0, 0, L, 0, 0, 0, 0, 1)
  4701. );
  4702. }
  4703. function P(b, C, L, F, U, D, V, O, j, $, J, X, Y, K, Z, Q) {
  4704. return (
  4705. (this.props[0] = b),
  4706. (this.props[1] = C),
  4707. (this.props[2] = L),
  4708. (this.props[3] = F),
  4709. (this.props[4] = U),
  4710. (this.props[5] = D),
  4711. (this.props[6] = V),
  4712. (this.props[7] = O),
  4713. (this.props[8] = j),
  4714. (this.props[9] = $),
  4715. (this.props[10] = J),
  4716. (this.props[11] = X),
  4717. (this.props[12] = Y),
  4718. (this.props[13] = K),
  4719. (this.props[14] = Z),
  4720. (this.props[15] = Q),
  4721. this
  4722. );
  4723. }
  4724. function d(b, C, L) {
  4725. return (
  4726. (L = L || 0),
  4727. b !== 0 || C !== 0 || L !== 0
  4728. ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, b, C, L, 1)
  4729. : this
  4730. );
  4731. }
  4732. function p(b, C, L, F, U, D, V, O, j, $, J, X, Y, K, Z, Q) {
  4733. var q = this.props;
  4734. if (
  4735. b === 1 &&
  4736. C === 0 &&
  4737. L === 0 &&
  4738. F === 0 &&
  4739. U === 0 &&
  4740. D === 1 &&
  4741. V === 0 &&
  4742. O === 0 &&
  4743. j === 0 &&
  4744. $ === 0 &&
  4745. J === 1 &&
  4746. X === 0
  4747. )
  4748. return (
  4749. (q[12] = q[12] * b + q[15] * Y),
  4750. (q[13] = q[13] * D + q[15] * K),
  4751. (q[14] = q[14] * J + q[15] * Z),
  4752. (q[15] *= Q),
  4753. (this._identityCalculated = !1),
  4754. this
  4755. );
  4756. var ee = q[0],
  4757. te = q[1],
  4758. ne = q[2],
  4759. ae = q[3],
  4760. oe = q[4],
  4761. le = q[5],
  4762. re = q[6],
  4763. he = q[7],
  4764. fe = q[8],
  4765. ie = q[9],
  4766. ce = q[10],
  4767. se = q[11],
  4768. pe = q[12],
  4769. ue = q[13],
  4770. de = q[14],
  4771. me = q[15];
  4772. return (
  4773. (q[0] = ee * b + te * U + ne * j + ae * Y),
  4774. (q[1] = ee * C + te * D + ne * $ + ae * K),
  4775. (q[2] = ee * L + te * V + ne * J + ae * Z),
  4776. (q[3] = ee * F + te * O + ne * X + ae * Q),
  4777. (q[4] = oe * b + le * U + re * j + he * Y),
  4778. (q[5] = oe * C + le * D + re * $ + he * K),
  4779. (q[6] = oe * L + le * V + re * J + he * Z),
  4780. (q[7] = oe * F + le * O + re * X + he * Q),
  4781. (q[8] = fe * b + ie * U + ce * j + se * Y),
  4782. (q[9] = fe * C + ie * D + ce * $ + se * K),
  4783. (q[10] = fe * L + ie * V + ce * J + se * Z),
  4784. (q[11] = fe * F + ie * O + ce * X + se * Q),
  4785. (q[12] = pe * b + ue * U + de * j + me * Y),
  4786. (q[13] = pe * C + ue * D + de * $ + me * K),
  4787. (q[14] = pe * L + ue * V + de * J + me * Z),
  4788. (q[15] = pe * F + ue * O + de * X + me * Q),
  4789. (this._identityCalculated = !1),
  4790. this
  4791. );
  4792. }
  4793. function x(b) {
  4794. var C = b.props;
  4795. return this.transform(
  4796. C[0],
  4797. C[1],
  4798. C[2],
  4799. C[3],
  4800. C[4],
  4801. C[5],
  4802. C[6],
  4803. C[7],
  4804. C[8],
  4805. C[9],
  4806. C[10],
  4807. C[11],
  4808. C[12],
  4809. C[13],
  4810. C[14],
  4811. C[15]
  4812. );
  4813. }
  4814. function u() {
  4815. return (
  4816. this._identityCalculated ||
  4817. ((this._identity = !(
  4818. this.props[0] !== 1 ||
  4819. this.props[1] !== 0 ||
  4820. this.props[2] !== 0 ||
  4821. this.props[3] !== 0 ||
  4822. this.props[4] !== 0 ||
  4823. this.props[5] !== 1 ||
  4824. this.props[6] !== 0 ||
  4825. this.props[7] !== 0 ||
  4826. this.props[8] !== 0 ||
  4827. this.props[9] !== 0 ||
  4828. this.props[10] !== 1 ||
  4829. this.props[11] !== 0 ||
  4830. this.props[12] !== 0 ||
  4831. this.props[13] !== 0 ||
  4832. this.props[14] !== 0 ||
  4833. this.props[15] !== 1
  4834. )),
  4835. (this._identityCalculated = !0)),
  4836. this._identity
  4837. );
  4838. }
  4839. function y(b) {
  4840. for (var C = 0; C < 16; ) {
  4841. if (b.props[C] !== this.props[C]) return !1;
  4842. C += 1;
  4843. }
  4844. return !0;
  4845. }
  4846. function m(b) {
  4847. var C;
  4848. for (C = 0; C < 16; C += 1) b.props[C] = this.props[C];
  4849. return b;
  4850. }
  4851. function A(b) {
  4852. var C;
  4853. for (C = 0; C < 16; C += 1) this.props[C] = b[C];
  4854. }
  4855. function T(b, C, L) {
  4856. return {
  4857. x:
  4858. b * this.props[0] +
  4859. C * this.props[4] +
  4860. L * this.props[8] +
  4861. this.props[12],
  4862. y:
  4863. b * this.props[1] +
  4864. C * this.props[5] +
  4865. L * this.props[9] +
  4866. this.props[13],
  4867. z:
  4868. b * this.props[2] +
  4869. C * this.props[6] +
  4870. L * this.props[10] +
  4871. this.props[14]
  4872. };
  4873. }
  4874. function E(b, C, L) {
  4875. return (
  4876. b * this.props[0] +
  4877. C * this.props[4] +
  4878. L * this.props[8] +
  4879. this.props[12]
  4880. );
  4881. }
  4882. function _(b, C, L) {
  4883. return (
  4884. b * this.props[1] +
  4885. C * this.props[5] +
  4886. L * this.props[9] +
  4887. this.props[13]
  4888. );
  4889. }
  4890. function I(b, C, L) {
  4891. return (
  4892. b * this.props[2] +
  4893. C * this.props[6] +
  4894. L * this.props[10] +
  4895. this.props[14]
  4896. );
  4897. }
  4898. function B() {
  4899. var b = this.props[0] * this.props[5] - this.props[1] * this.props[4],
  4900. C = this.props[5] / b,
  4901. L = -this.props[1] / b,
  4902. F = -this.props[4] / b,
  4903. U = this.props[0] / b,
  4904. D =
  4905. (this.props[4] * this.props[13] -
  4906. this.props[5] * this.props[12]) /
  4907. b,
  4908. V =
  4909. -(
  4910. this.props[0] * this.props[13] -
  4911. this.props[1] * this.props[12]
  4912. ) / b,
  4913. O = new Matrix();
  4914. return (
  4915. (O.props[0] = C),
  4916. (O.props[1] = L),
  4917. (O.props[4] = F),
  4918. (O.props[5] = U),
  4919. (O.props[12] = D),
  4920. (O.props[13] = V),
  4921. O
  4922. );
  4923. }
  4924. function z(b) {
  4925. var C = this.getInverseMatrix();
  4926. return C.applyToPointArray(b[0], b[1], b[2] || 0);
  4927. }
  4928. function G(b) {
  4929. var C,
  4930. L = b.length,
  4931. F = [];
  4932. for (C = 0; C < L; C += 1) F[C] = z(b[C]);
  4933. return F;
  4934. }
  4935. function R(b, C, L) {
  4936. var F = createTypedArray('float32', 6);
  4937. if (this.isIdentity())
  4938. (F[0] = b[0]),
  4939. (F[1] = b[1]),
  4940. (F[2] = C[0]),
  4941. (F[3] = C[1]),
  4942. (F[4] = L[0]),
  4943. (F[5] = L[1]);
  4944. else {
  4945. var U = this.props[0],
  4946. D = this.props[1],
  4947. V = this.props[4],
  4948. O = this.props[5],
  4949. j = this.props[12],
  4950. $ = this.props[13];
  4951. (F[0] = b[0] * U + b[1] * V + j),
  4952. (F[1] = b[0] * D + b[1] * O + $),
  4953. (F[2] = C[0] * U + C[1] * V + j),
  4954. (F[3] = C[0] * D + C[1] * O + $),
  4955. (F[4] = L[0] * U + L[1] * V + j),
  4956. (F[5] = L[0] * D + L[1] * O + $);
  4957. }
  4958. return F;
  4959. }
  4960. function W(b, C, L) {
  4961. var F;
  4962. return (
  4963. this.isIdentity()
  4964. ? (F = [b, C, L])
  4965. : (F = [
  4966. b * this.props[0] +
  4967. C * this.props[4] +
  4968. L * this.props[8] +
  4969. this.props[12],
  4970. b * this.props[1] +
  4971. C * this.props[5] +
  4972. L * this.props[9] +
  4973. this.props[13],
  4974. b * this.props[2] +
  4975. C * this.props[6] +
  4976. L * this.props[10] +
  4977. this.props[14]
  4978. ]),
  4979. F
  4980. );
  4981. }
  4982. function H(b, C) {
  4983. if (this.isIdentity()) return b + ',' + C;
  4984. var L = this.props;
  4985. return (
  4986. Math.round((b * L[0] + C * L[4] + L[12]) * 100) / 100 +
  4987. ',' +
  4988. Math.round((b * L[1] + C * L[5] + L[13]) * 100) / 100
  4989. );
  4990. }
  4991. function N() {
  4992. for (var b = 0, C = this.props, L = 'matrix3d(', F = 1e4; b < 16; )
  4993. (L += i(C[b] * F) / F), (L += b === 15 ? ')' : ','), (b += 1);
  4994. return L;
  4995. }
  4996. function M(b) {
  4997. var C = 1e4;
  4998. return (b < 1e-6 && b > 0) || (b > -1e-6 && b < 0) ? i(b * C) / C : b;
  4999. }
  5000. function k() {
  5001. var b = this.props,
  5002. C = M(b[0]),
  5003. L = M(b[1]),
  5004. F = M(b[4]),
  5005. U = M(b[5]),
  5006. D = M(b[12]),
  5007. V = M(b[13]);
  5008. return (
  5009. 'matrix(' +
  5010. C +
  5011. ',' +
  5012. L +
  5013. ',' +
  5014. F +
  5015. ',' +
  5016. U +
  5017. ',' +
  5018. D +
  5019. ',' +
  5020. V +
  5021. ')'
  5022. );
  5023. }
  5024. return function () {
  5025. (this.reset = s),
  5026. (this.rotate = a),
  5027. (this.rotateX = o),
  5028. (this.rotateY = n),
  5029. (this.rotateZ = l),
  5030. (this.skew = g),
  5031. (this.skewFromAxis = S),
  5032. (this.shear = f),
  5033. (this.scale = c),
  5034. (this.setTransform = P),
  5035. (this.translate = d),
  5036. (this.transform = p),
  5037. (this.multiply = x),
  5038. (this.applyToPoint = T),
  5039. (this.applyToX = E),
  5040. (this.applyToY = _),
  5041. (this.applyToZ = I),
  5042. (this.applyToPointArray = W),
  5043. (this.applyToTriplePoints = R),
  5044. (this.applyToPointStringified = H),
  5045. (this.toCSS = N),
  5046. (this.to2dCSS = k),
  5047. (this.clone = m),
  5048. (this.cloneFromProps = A),
  5049. (this.equals = y),
  5050. (this.inversePoints = G),
  5051. (this.inversePoint = z),
  5052. (this.getInverseMatrix = B),
  5053. (this._t = this.transform),
  5054. (this.isIdentity = u),
  5055. (this._identity = !0),
  5056. (this._identityCalculated = !1),
  5057. (this.props = createTypedArray('float32', 16)),
  5058. this.reset();
  5059. };
  5060. })();
  5061. function _typeof$3(e) {
  5062. '@babel/helpers - typeof';
  5063. return (
  5064. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  5065. ? (_typeof$3 = function (r) {
  5066. return typeof r;
  5067. })
  5068. : (_typeof$3 = function (r) {
  5069. return r &&
  5070. typeof Symbol == 'function' &&
  5071. r.constructor === Symbol &&
  5072. r !== Symbol.prototype
  5073. ? 'symbol'
  5074. : typeof r;
  5075. }),
  5076. _typeof$3(e)
  5077. );
  5078. }
  5079. var lottie = {};
  5080. function setLocation(e) {
  5081. setLocationHref(e);
  5082. }
  5083. function searchAnimations() {
  5084. animationManager.searchAnimations();
  5085. }
  5086. function setSubframeRendering(e) {
  5087. setSubframeEnabled(e);
  5088. }
  5089. function setPrefix(e) {
  5090. setIdPrefix(e);
  5091. }
  5092. function loadAnimation(e) {
  5093. return animationManager.loadAnimation(e);
  5094. }
  5095. function setQuality(e) {
  5096. if (typeof e == 'string')
  5097. switch (e) {
  5098. case 'high':
  5099. setDefaultCurveSegments(200);
  5100. break;
  5101. default:
  5102. case 'medium':
  5103. setDefaultCurveSegments(50);
  5104. break;
  5105. case 'low':
  5106. setDefaultCurveSegments(10);
  5107. break;
  5108. }
  5109. else !isNaN(e) && e > 1 && setDefaultCurveSegments(e);
  5110. }
  5111. function inBrowser() {
  5112. return typeof navigator < 'u';
  5113. }
  5114. function installPlugin(e, t) {
  5115. e === 'expressions' && setExpressionsPlugin(t);
  5116. }
  5117. function getFactory(e) {
  5118. switch (e) {
  5119. case 'propertyFactory':
  5120. return PropertyFactory;
  5121. case 'shapePropertyFactory':
  5122. return ShapePropertyFactory;
  5123. case 'matrix':
  5124. return Matrix;
  5125. default:
  5126. return null;
  5127. }
  5128. }
  5129. (lottie.play = animationManager.play),
  5130. (lottie.pause = animationManager.pause),
  5131. (lottie.setLocationHref = setLocation),
  5132. (lottie.togglePause = animationManager.togglePause),
  5133. (lottie.setSpeed = animationManager.setSpeed),
  5134. (lottie.setDirection = animationManager.setDirection),
  5135. (lottie.stop = animationManager.stop),
  5136. (lottie.searchAnimations = searchAnimations),
  5137. (lottie.registerAnimation = animationManager.registerAnimation),
  5138. (lottie.loadAnimation = loadAnimation),
  5139. (lottie.setSubframeRendering = setSubframeRendering),
  5140. (lottie.resize = animationManager.resize),
  5141. (lottie.goToAndStop = animationManager.goToAndStop),
  5142. (lottie.destroy = animationManager.destroy),
  5143. (lottie.setQuality = setQuality),
  5144. (lottie.inBrowser = inBrowser),
  5145. (lottie.installPlugin = installPlugin),
  5146. (lottie.freeze = animationManager.freeze),
  5147. (lottie.unfreeze = animationManager.unfreeze),
  5148. (lottie.setVolume = animationManager.setVolume),
  5149. (lottie.mute = animationManager.mute),
  5150. (lottie.unmute = animationManager.unmute),
  5151. (lottie.getRegisteredAnimations =
  5152. animationManager.getRegisteredAnimations),
  5153. (lottie.useWebWorker = setWebWorker),
  5154. (lottie.setIDPrefix = setPrefix),
  5155. (lottie.__getFactory = getFactory),
  5156. (lottie.version = '5.12.2');
  5157. function checkReady() {
  5158. document.readyState === 'complete' &&
  5159. (clearInterval(readyStateCheckInterval), searchAnimations());
  5160. }
  5161. function getQueryVariable(e) {
  5162. for (var t = queryString.split('&'), r = 0; r < t.length; r += 1) {
  5163. var i = t[r].split('=');
  5164. if (decodeURIComponent(i[0]) == e) return decodeURIComponent(i[1]);
  5165. }
  5166. return null;
  5167. }
  5168. var queryString = '';
  5169. {
  5170. var scripts = document.getElementsByTagName('script'),
  5171. index = scripts.length - 1,
  5172. myScript = scripts[index] || { src: '' };
  5173. (queryString = myScript.src
  5174. ? myScript.src.replace(/^[^\?]+\??/, '')
  5175. : ''),
  5176. getQueryVariable('renderer');
  5177. }
  5178. var readyStateCheckInterval = setInterval(checkReady, 100);
  5179. try {
  5180. _typeof$3(exports) !== 'object' && (window.bodymovin = lottie);
  5181. } catch (e) {}
  5182. var ShapeModifiers = (function () {
  5183. var e = {},
  5184. t = {};
  5185. (e.registerModifier = r), (e.getModifier = i);
  5186. function r(s, a) {
  5187. t[s] || (t[s] = a);
  5188. }
  5189. function i(s, a, o) {
  5190. return new t[s](a, o);
  5191. }
  5192. return e;
  5193. })();
  5194. function ShapeModifier() {}
  5195. (ShapeModifier.prototype.initModifierProperties = function () {}),
  5196. (ShapeModifier.prototype.addShapeToModifier = function () {}),
  5197. (ShapeModifier.prototype.addShape = function (e) {
  5198. if (!this.closed) {
  5199. e.sh.container.addDynamicProperty(e.sh);
  5200. var t = {
  5201. shape: e.sh,
  5202. data: e,
  5203. localShapeCollection: shapeCollectionPool.newShapeCollection()
  5204. };
  5205. this.shapes.push(t),
  5206. this.addShapeToModifier(t),
  5207. this._isAnimated && e.setAsAnimated();
  5208. }
  5209. }),
  5210. (ShapeModifier.prototype.init = function (e, t) {
  5211. (this.shapes = []),
  5212. (this.elem = e),
  5213. this.initDynamicPropertyContainer(e),
  5214. this.initModifierProperties(e, t),
  5215. (this.frameId = initialDefaultFrame),
  5216. (this.closed = !1),
  5217. (this.k = !1),
  5218. this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0);
  5219. }),
  5220. (ShapeModifier.prototype.processKeys = function () {
  5221. this.elem.globalData.frameId !== this.frameId &&
  5222. ((this.frameId = this.elem.globalData.frameId),
  5223. this.iterateDynamicProperties());
  5224. }),
  5225. extendPrototype([DynamicPropertyContainer], ShapeModifier);
  5226. function TrimModifier() {}
  5227. extendPrototype([ShapeModifier], TrimModifier),
  5228. (TrimModifier.prototype.initModifierProperties = function (e, t) {
  5229. (this.s = PropertyFactory.getProp(e, t.s, 0, 0.01, this)),
  5230. (this.e = PropertyFactory.getProp(e, t.e, 0, 0.01, this)),
  5231. (this.o = PropertyFactory.getProp(e, t.o, 0, 0, this)),
  5232. (this.sValue = 0),
  5233. (this.eValue = 0),
  5234. (this.getValue = this.processKeys),
  5235. (this.m = t.m),
  5236. (this._isAnimated =
  5237. !!this.s.effectsSequence.length ||
  5238. !!this.e.effectsSequence.length ||
  5239. !!this.o.effectsSequence.length);
  5240. }),
  5241. (TrimModifier.prototype.addShapeToModifier = function (e) {
  5242. e.pathsData = [];
  5243. }),
  5244. (TrimModifier.prototype.calculateShapeEdges = function (e, t, r, i, s) {
  5245. var a = [];
  5246. t <= 1
  5247. ? a.push({ s: e, e: t })
  5248. : e >= 1
  5249. ? a.push({ s: e - 1, e: t - 1 })
  5250. : (a.push({ s: e, e: 1 }), a.push({ s: 0, e: t - 1 }));
  5251. var o = [],
  5252. n,
  5253. l = a.length,
  5254. f;
  5255. for (n = 0; n < l; n += 1)
  5256. if (((f = a[n]), !(f.e * s < i || f.s * s > i + r))) {
  5257. var g, S;
  5258. f.s * s <= i ? (g = 0) : (g = (f.s * s - i) / r),
  5259. f.e * s >= i + r ? (S = 1) : (S = (f.e * s - i) / r),
  5260. o.push([g, S]);
  5261. }
  5262. return o.length || o.push([0, 0]), o;
  5263. }),
  5264. (TrimModifier.prototype.releasePathsData = function (e) {
  5265. var t,
  5266. r = e.length;
  5267. for (t = 0; t < r; t += 1) segmentsLengthPool.release(e[t]);
  5268. return (e.length = 0), e;
  5269. }),
  5270. (TrimModifier.prototype.processShapes = function (e) {
  5271. var t, r;
  5272. if (this._mdf || e) {
  5273. var i = (this.o.v % 360) / 360;
  5274. if (
  5275. (i < 0 && (i += 1),
  5276. this.s.v > 1
  5277. ? (t = 1 + i)
  5278. : this.s.v < 0
  5279. ? (t = 0 + i)
  5280. : (t = this.s.v + i),
  5281. this.e.v > 1
  5282. ? (r = 1 + i)
  5283. : this.e.v < 0
  5284. ? (r = 0 + i)
  5285. : (r = this.e.v + i),
  5286. t > r)
  5287. ) {
  5288. var s = t;
  5289. (t = r), (r = s);
  5290. }
  5291. (t = Math.round(t * 1e4) * 1e-4),
  5292. (r = Math.round(r * 1e4) * 1e-4),
  5293. (this.sValue = t),
  5294. (this.eValue = r);
  5295. } else (t = this.sValue), (r = this.eValue);
  5296. var a,
  5297. o,
  5298. n = this.shapes.length,
  5299. l,
  5300. f,
  5301. g,
  5302. S,
  5303. c,
  5304. P = 0;
  5305. if (r === t)
  5306. for (o = 0; o < n; o += 1)
  5307. this.shapes[o].localShapeCollection.releaseShapes(),
  5308. (this.shapes[o].shape._mdf = !0),
  5309. (this.shapes[o].shape.paths =
  5310. this.shapes[o].localShapeCollection),
  5311. this._mdf && (this.shapes[o].pathsData.length = 0);
  5312. else if ((r === 1 && t === 0) || (r === 0 && t === 1)) {
  5313. if (this._mdf)
  5314. for (o = 0; o < n; o += 1)
  5315. (this.shapes[o].pathsData.length = 0),
  5316. (this.shapes[o].shape._mdf = !0);
  5317. } else {
  5318. var d = [],
  5319. p,
  5320. x;
  5321. for (o = 0; o < n; o += 1)
  5322. if (
  5323. ((p = this.shapes[o]),
  5324. !p.shape._mdf && !this._mdf && !e && this.m !== 2)
  5325. )
  5326. p.shape.paths = p.localShapeCollection;
  5327. else {
  5328. if (
  5329. ((a = p.shape.paths),
  5330. (f = a._length),
  5331. (c = 0),
  5332. !p.shape._mdf && p.pathsData.length)
  5333. )
  5334. c = p.totalShapeLength;
  5335. else {
  5336. for (
  5337. g = this.releasePathsData(p.pathsData), l = 0;
  5338. l < f;
  5339. l += 1
  5340. )
  5341. (S = bez.getSegmentsLength(a.shapes[l])),
  5342. g.push(S),
  5343. (c += S.totalLength);
  5344. (p.totalShapeLength = c), (p.pathsData = g);
  5345. }
  5346. (P += c), (p.shape._mdf = !0);
  5347. }
  5348. var u = t,
  5349. y = r,
  5350. m = 0,
  5351. A;
  5352. for (o = n - 1; o >= 0; o -= 1)
  5353. if (((p = this.shapes[o]), p.shape._mdf)) {
  5354. for (
  5355. x = p.localShapeCollection,
  5356. x.releaseShapes(),
  5357. this.m === 2 && n > 1
  5358. ? ((A = this.calculateShapeEdges(
  5359. t,
  5360. r,
  5361. p.totalShapeLength,
  5362. m,
  5363. P
  5364. )),
  5365. (m += p.totalShapeLength))
  5366. : (A = [[u, y]]),
  5367. f = A.length,
  5368. l = 0;
  5369. l < f;
  5370. l += 1
  5371. ) {
  5372. (u = A[l][0]),
  5373. (y = A[l][1]),
  5374. (d.length = 0),
  5375. y <= 1
  5376. ? d.push({
  5377. s: p.totalShapeLength * u,
  5378. e: p.totalShapeLength * y
  5379. })
  5380. : u >= 1
  5381. ? d.push({
  5382. s: p.totalShapeLength * (u - 1),
  5383. e: p.totalShapeLength * (y - 1)
  5384. })
  5385. : (d.push({
  5386. s: p.totalShapeLength * u,
  5387. e: p.totalShapeLength
  5388. }),
  5389. d.push({ s: 0, e: p.totalShapeLength * (y - 1) }));
  5390. var T = this.addShapes(p, d[0]);
  5391. if (d[0].s !== d[0].e) {
  5392. if (d.length > 1) {
  5393. var E = p.shape.paths.shapes[p.shape.paths._length - 1];
  5394. if (E.c) {
  5395. var _ = T.pop();
  5396. this.addPaths(T, x), (T = this.addShapes(p, d[1], _));
  5397. } else this.addPaths(T, x), (T = this.addShapes(p, d[1]));
  5398. }
  5399. this.addPaths(T, x);
  5400. }
  5401. }
  5402. p.shape.paths = x;
  5403. }
  5404. }
  5405. }),
  5406. (TrimModifier.prototype.addPaths = function (e, t) {
  5407. var r,
  5408. i = e.length;
  5409. for (r = 0; r < i; r += 1) t.addShape(e[r]);
  5410. }),
  5411. (TrimModifier.prototype.addSegment = function (e, t, r, i, s, a, o) {
  5412. s.setXYAt(t[0], t[1], 'o', a),
  5413. s.setXYAt(r[0], r[1], 'i', a + 1),
  5414. o && s.setXYAt(e[0], e[1], 'v', a),
  5415. s.setXYAt(i[0], i[1], 'v', a + 1);
  5416. }),
  5417. (TrimModifier.prototype.addSegmentFromArray = function (e, t, r, i) {
  5418. t.setXYAt(e[1], e[5], 'o', r),
  5419. t.setXYAt(e[2], e[6], 'i', r + 1),
  5420. i && t.setXYAt(e[0], e[4], 'v', r),
  5421. t.setXYAt(e[3], e[7], 'v', r + 1);
  5422. }),
  5423. (TrimModifier.prototype.addShapes = function (e, t, r) {
  5424. var i = e.pathsData,
  5425. s = e.shape.paths.shapes,
  5426. a,
  5427. o = e.shape.paths._length,
  5428. n,
  5429. l,
  5430. f = 0,
  5431. g,
  5432. S,
  5433. c,
  5434. P,
  5435. d = [],
  5436. p,
  5437. x = !0;
  5438. for (
  5439. r
  5440. ? ((S = r._length), (p = r._length))
  5441. : ((r = shapePool.newElement()), (S = 0), (p = 0)),
  5442. d.push(r),
  5443. a = 0;
  5444. a < o;
  5445. a += 1
  5446. ) {
  5447. for (
  5448. c = i[a].lengths,
  5449. r.c = s[a].c,
  5450. l = s[a].c ? c.length : c.length + 1,
  5451. n = 1;
  5452. n < l;
  5453. n += 1
  5454. )
  5455. if (((g = c[n - 1]), f + g.addedLength < t.s))
  5456. (f += g.addedLength), (r.c = !1);
  5457. else if (f > t.e) {
  5458. r.c = !1;
  5459. break;
  5460. } else
  5461. t.s <= f && t.e >= f + g.addedLength
  5462. ? (this.addSegment(
  5463. s[a].v[n - 1],
  5464. s[a].o[n - 1],
  5465. s[a].i[n],
  5466. s[a].v[n],
  5467. r,
  5468. S,
  5469. x
  5470. ),
  5471. (x = !1))
  5472. : ((P = bez.getNewSegment(
  5473. s[a].v[n - 1],
  5474. s[a].v[n],
  5475. s[a].o[n - 1],
  5476. s[a].i[n],
  5477. (t.s - f) / g.addedLength,
  5478. (t.e - f) / g.addedLength,
  5479. c[n - 1]
  5480. )),
  5481. this.addSegmentFromArray(P, r, S, x),
  5482. (x = !1),
  5483. (r.c = !1)),
  5484. (f += g.addedLength),
  5485. (S += 1);
  5486. if (s[a].c && c.length) {
  5487. if (((g = c[n - 1]), f <= t.e)) {
  5488. var u = c[n - 1].addedLength;
  5489. t.s <= f && t.e >= f + u
  5490. ? (this.addSegment(
  5491. s[a].v[n - 1],
  5492. s[a].o[n - 1],
  5493. s[a].i[0],
  5494. s[a].v[0],
  5495. r,
  5496. S,
  5497. x
  5498. ),
  5499. (x = !1))
  5500. : ((P = bez.getNewSegment(
  5501. s[a].v[n - 1],
  5502. s[a].v[0],
  5503. s[a].o[n - 1],
  5504. s[a].i[0],
  5505. (t.s - f) / u,
  5506. (t.e - f) / u,
  5507. c[n - 1]
  5508. )),
  5509. this.addSegmentFromArray(P, r, S, x),
  5510. (x = !1),
  5511. (r.c = !1));
  5512. } else r.c = !1;
  5513. (f += g.addedLength), (S += 1);
  5514. }
  5515. if (
  5516. (r._length &&
  5517. (r.setXYAt(r.v[p][0], r.v[p][1], 'i', p),
  5518. r.setXYAt(
  5519. r.v[r._length - 1][0],
  5520. r.v[r._length - 1][1],
  5521. 'o',
  5522. r._length - 1
  5523. )),
  5524. f > t.e)
  5525. )
  5526. break;
  5527. a < o - 1 &&
  5528. ((r = shapePool.newElement()), (x = !0), d.push(r), (S = 0));
  5529. }
  5530. return d;
  5531. });
  5532. function PuckerAndBloatModifier() {}
  5533. extendPrototype([ShapeModifier], PuckerAndBloatModifier),
  5534. (PuckerAndBloatModifier.prototype.initModifierProperties = function (
  5535. e,
  5536. t
  5537. ) {
  5538. (this.getValue = this.processKeys),
  5539. (this.amount = PropertyFactory.getProp(e, t.a, 0, null, this)),
  5540. (this._isAnimated = !!this.amount.effectsSequence.length);
  5541. }),
  5542. (PuckerAndBloatModifier.prototype.processPath = function (e, t) {
  5543. var r = t / 100,
  5544. i = [0, 0],
  5545. s = e._length,
  5546. a = 0;
  5547. for (a = 0; a < s; a += 1) (i[0] += e.v[a][0]), (i[1] += e.v[a][1]);
  5548. (i[0] /= s), (i[1] /= s);
  5549. var o = shapePool.newElement();
  5550. o.c = e.c;
  5551. var n, l, f, g, S, c;
  5552. for (a = 0; a < s; a += 1)
  5553. (n = e.v[a][0] + (i[0] - e.v[a][0]) * r),
  5554. (l = e.v[a][1] + (i[1] - e.v[a][1]) * r),
  5555. (f = e.o[a][0] + (i[0] - e.o[a][0]) * -r),
  5556. (g = e.o[a][1] + (i[1] - e.o[a][1]) * -r),
  5557. (S = e.i[a][0] + (i[0] - e.i[a][0]) * -r),
  5558. (c = e.i[a][1] + (i[1] - e.i[a][1]) * -r),
  5559. o.setTripleAt(n, l, f, g, S, c, a);
  5560. return o;
  5561. }),
  5562. (PuckerAndBloatModifier.prototype.processShapes = function (e) {
  5563. var t,
  5564. r,
  5565. i = this.shapes.length,
  5566. s,
  5567. a,
  5568. o = this.amount.v;
  5569. if (o !== 0) {
  5570. var n, l;
  5571. for (r = 0; r < i; r += 1) {
  5572. if (
  5573. ((n = this.shapes[r]),
  5574. (l = n.localShapeCollection),
  5575. !(!n.shape._mdf && !this._mdf && !e))
  5576. )
  5577. for (
  5578. l.releaseShapes(),
  5579. n.shape._mdf = !0,
  5580. t = n.shape.paths.shapes,
  5581. a = n.shape.paths._length,
  5582. s = 0;
  5583. s < a;
  5584. s += 1
  5585. )
  5586. l.addShape(this.processPath(t[s], o));
  5587. n.shape.paths = n.localShapeCollection;
  5588. }
  5589. }
  5590. this.dynamicProperties.length || (this._mdf = !1);
  5591. });
  5592. var TransformPropertyFactory = (function () {
  5593. var e = [0, 0];
  5594. function t(l) {
  5595. var f = this._mdf;
  5596. this.iterateDynamicProperties(),
  5597. (this._mdf = this._mdf || f),
  5598. this.a && l.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
  5599. this.s && l.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
  5600. this.sk && l.skewFromAxis(-this.sk.v, this.sa.v),
  5601. this.r
  5602. ? l.rotate(-this.r.v)
  5603. : l
  5604. .rotateZ(-this.rz.v)
  5605. .rotateY(this.ry.v)
  5606. .rotateX(this.rx.v)
  5607. .rotateZ(-this.or.v[2])
  5608. .rotateY(this.or.v[1])
  5609. .rotateX(this.or.v[0]),
  5610. this.data.p.s
  5611. ? this.data.p.z
  5612. ? l.translate(this.px.v, this.py.v, -this.pz.v)
  5613. : l.translate(this.px.v, this.py.v, 0)
  5614. : l.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
  5615. }
  5616. function r(l) {
  5617. if (this.elem.globalData.frameId !== this.frameId) {
  5618. if (
  5619. (this._isDirty &&
  5620. (this.precalculateMatrix(), (this._isDirty = !1)),
  5621. this.iterateDynamicProperties(),
  5622. this._mdf || l)
  5623. ) {
  5624. var f;
  5625. if (
  5626. (this.v.cloneFromProps(this.pre.props),
  5627. this.appliedTransformations < 1 &&
  5628. this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
  5629. this.appliedTransformations < 2 &&
  5630. this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
  5631. this.sk &&
  5632. this.appliedTransformations < 3 &&
  5633. this.v.skewFromAxis(-this.sk.v, this.sa.v),
  5634. this.r && this.appliedTransformations < 4
  5635. ? this.v.rotate(-this.r.v)
  5636. : !this.r &&
  5637. this.appliedTransformations < 4 &&
  5638. this.v
  5639. .rotateZ(-this.rz.v)
  5640. .rotateY(this.ry.v)
  5641. .rotateX(this.rx.v)
  5642. .rotateZ(-this.or.v[2])
  5643. .rotateY(this.or.v[1])
  5644. .rotateX(this.or.v[0]),
  5645. this.autoOriented)
  5646. ) {
  5647. var g, S;
  5648. if (
  5649. ((f = this.elem.globalData.frameRate),
  5650. this.p && this.p.keyframes && this.p.getValueAtTime)
  5651. )
  5652. this.p._caching.lastFrame + this.p.offsetTime <=
  5653. this.p.keyframes[0].t
  5654. ? ((g = this.p.getValueAtTime(
  5655. (this.p.keyframes[0].t + 0.01) / f,
  5656. 0
  5657. )),
  5658. (S = this.p.getValueAtTime(this.p.keyframes[0].t / f, 0)))
  5659. : this.p._caching.lastFrame + this.p.offsetTime >=
  5660. this.p.keyframes[this.p.keyframes.length - 1].t
  5661. ? ((g = this.p.getValueAtTime(
  5662. this.p.keyframes[this.p.keyframes.length - 1].t / f,
  5663. 0
  5664. )),
  5665. (S = this.p.getValueAtTime(
  5666. (this.p.keyframes[this.p.keyframes.length - 1].t -
  5667. 0.05) /
  5668. f,
  5669. 0
  5670. )))
  5671. : ((g = this.p.pv),
  5672. (S = this.p.getValueAtTime(
  5673. (this.p._caching.lastFrame + this.p.offsetTime - 0.01) /
  5674. f,
  5675. this.p.offsetTime
  5676. )));
  5677. else if (
  5678. this.px &&
  5679. this.px.keyframes &&
  5680. this.py.keyframes &&
  5681. this.px.getValueAtTime &&
  5682. this.py.getValueAtTime
  5683. ) {
  5684. (g = []), (S = []);
  5685. var c = this.px,
  5686. P = this.py;
  5687. c._caching.lastFrame + c.offsetTime <= c.keyframes[0].t
  5688. ? ((g[0] = c.getValueAtTime(
  5689. (c.keyframes[0].t + 0.01) / f,
  5690. 0
  5691. )),
  5692. (g[1] = P.getValueAtTime(
  5693. (P.keyframes[0].t + 0.01) / f,
  5694. 0
  5695. )),
  5696. (S[0] = c.getValueAtTime(c.keyframes[0].t / f, 0)),
  5697. (S[1] = P.getValueAtTime(P.keyframes[0].t / f, 0)))
  5698. : c._caching.lastFrame + c.offsetTime >=
  5699. c.keyframes[c.keyframes.length - 1].t
  5700. ? ((g[0] = c.getValueAtTime(
  5701. c.keyframes[c.keyframes.length - 1].t / f,
  5702. 0
  5703. )),
  5704. (g[1] = P.getValueAtTime(
  5705. P.keyframes[P.keyframes.length - 1].t / f,
  5706. 0
  5707. )),
  5708. (S[0] = c.getValueAtTime(
  5709. (c.keyframes[c.keyframes.length - 1].t - 0.01) / f,
  5710. 0
  5711. )),
  5712. (S[1] = P.getValueAtTime(
  5713. (P.keyframes[P.keyframes.length - 1].t - 0.01) / f,
  5714. 0
  5715. )))
  5716. : ((g = [c.pv, P.pv]),
  5717. (S[0] = c.getValueAtTime(
  5718. (c._caching.lastFrame + c.offsetTime - 0.01) / f,
  5719. c.offsetTime
  5720. )),
  5721. (S[1] = P.getValueAtTime(
  5722. (P._caching.lastFrame + P.offsetTime - 0.01) / f,
  5723. P.offsetTime
  5724. )));
  5725. } else (S = e), (g = S);
  5726. this.v.rotate(-Math.atan2(g[1] - S[1], g[0] - S[0]));
  5727. }
  5728. this.data.p && this.data.p.s
  5729. ? this.data.p.z
  5730. ? this.v.translate(this.px.v, this.py.v, -this.pz.v)
  5731. : this.v.translate(this.px.v, this.py.v, 0)
  5732. : this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
  5733. }
  5734. this.frameId = this.elem.globalData.frameId;
  5735. }
  5736. }
  5737. function i() {
  5738. if (
  5739. ((this.appliedTransformations = 0),
  5740. this.pre.reset(),
  5741. !this.a.effectsSequence.length)
  5742. )
  5743. this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
  5744. (this.appliedTransformations = 1);
  5745. else return;
  5746. if (!this.s.effectsSequence.length)
  5747. this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
  5748. (this.appliedTransformations = 2);
  5749. else return;
  5750. if (this.sk)
  5751. if (
  5752. !this.sk.effectsSequence.length &&
  5753. !this.sa.effectsSequence.length
  5754. )
  5755. this.pre.skewFromAxis(-this.sk.v, this.sa.v),
  5756. (this.appliedTransformations = 3);
  5757. else return;
  5758. this.r
  5759. ? this.r.effectsSequence.length ||
  5760. (this.pre.rotate(-this.r.v), (this.appliedTransformations = 4))
  5761. : !this.rz.effectsSequence.length &&
  5762. !this.ry.effectsSequence.length &&
  5763. !this.rx.effectsSequence.length &&
  5764. !this.or.effectsSequence.length &&
  5765. (this.pre
  5766. .rotateZ(-this.rz.v)
  5767. .rotateY(this.ry.v)
  5768. .rotateX(this.rx.v)
  5769. .rotateZ(-this.or.v[2])
  5770. .rotateY(this.or.v[1])
  5771. .rotateX(this.or.v[0]),
  5772. (this.appliedTransformations = 4));
  5773. }
  5774. function s() {}
  5775. function a(l) {
  5776. this._addDynamicProperty(l),
  5777. this.elem.addDynamicProperty(l),
  5778. (this._isDirty = !0);
  5779. }
  5780. function o(l, f, g) {
  5781. if (
  5782. ((this.elem = l),
  5783. (this.frameId = -1),
  5784. (this.propType = 'transform'),
  5785. (this.data = f),
  5786. (this.v = new Matrix()),
  5787. (this.pre = new Matrix()),
  5788. (this.appliedTransformations = 0),
  5789. this.initDynamicPropertyContainer(g || l),
  5790. f.p && f.p.s
  5791. ? ((this.px = PropertyFactory.getProp(l, f.p.x, 0, 0, this)),
  5792. (this.py = PropertyFactory.getProp(l, f.p.y, 0, 0, this)),
  5793. f.p.z &&
  5794. (this.pz = PropertyFactory.getProp(l, f.p.z, 0, 0, this)))
  5795. : (this.p = PropertyFactory.getProp(
  5796. l,
  5797. f.p || { k: [0, 0, 0] },
  5798. 1,
  5799. 0,
  5800. this
  5801. )),
  5802. f.rx)
  5803. ) {
  5804. if (
  5805. ((this.rx = PropertyFactory.getProp(l, f.rx, 0, degToRads, this)),
  5806. (this.ry = PropertyFactory.getProp(l, f.ry, 0, degToRads, this)),
  5807. (this.rz = PropertyFactory.getProp(l, f.rz, 0, degToRads, this)),
  5808. f.or.k[0].ti)
  5809. ) {
  5810. var S,
  5811. c = f.or.k.length;
  5812. for (S = 0; S < c; S += 1)
  5813. (f.or.k[S].to = null), (f.or.k[S].ti = null);
  5814. }
  5815. (this.or = PropertyFactory.getProp(l, f.or, 1, degToRads, this)),
  5816. (this.or.sh = !0);
  5817. } else
  5818. this.r = PropertyFactory.getProp(
  5819. l,
  5820. f.r || { k: 0 },
  5821. 0,
  5822. degToRads,
  5823. this
  5824. );
  5825. f.sk &&
  5826. ((this.sk = PropertyFactory.getProp(l, f.sk, 0, degToRads, this)),
  5827. (this.sa = PropertyFactory.getProp(l, f.sa, 0, degToRads, this))),
  5828. (this.a = PropertyFactory.getProp(
  5829. l,
  5830. f.a || { k: [0, 0, 0] },
  5831. 1,
  5832. 0,
  5833. this
  5834. )),
  5835. (this.s = PropertyFactory.getProp(
  5836. l,
  5837. f.s || { k: [100, 100, 100] },
  5838. 1,
  5839. 0.01,
  5840. this
  5841. )),
  5842. f.o
  5843. ? (this.o = PropertyFactory.getProp(l, f.o, 0, 0.01, l))
  5844. : (this.o = { _mdf: !1, v: 1 }),
  5845. (this._isDirty = !0),
  5846. this.dynamicProperties.length || this.getValue(!0);
  5847. }
  5848. (o.prototype = {
  5849. applyToMatrix: t,
  5850. getValue: r,
  5851. precalculateMatrix: i,
  5852. autoOrient: s
  5853. }),
  5854. extendPrototype([DynamicPropertyContainer], o),
  5855. (o.prototype.addDynamicProperty = a),
  5856. (o.prototype._addDynamicProperty =
  5857. DynamicPropertyContainer.prototype.addDynamicProperty);
  5858. function n(l, f, g) {
  5859. return new o(l, f, g);
  5860. }
  5861. return { getTransformProperty: n };
  5862. })();
  5863. function RepeaterModifier() {}
  5864. extendPrototype([ShapeModifier], RepeaterModifier),
  5865. (RepeaterModifier.prototype.initModifierProperties = function (e, t) {
  5866. (this.getValue = this.processKeys),
  5867. (this.c = PropertyFactory.getProp(e, t.c, 0, null, this)),
  5868. (this.o = PropertyFactory.getProp(e, t.o, 0, null, this)),
  5869. (this.tr = TransformPropertyFactory.getTransformProperty(
  5870. e,
  5871. t.tr,
  5872. this
  5873. )),
  5874. (this.so = PropertyFactory.getProp(e, t.tr.so, 0, 0.01, this)),
  5875. (this.eo = PropertyFactory.getProp(e, t.tr.eo, 0, 0.01, this)),
  5876. (this.data = t),
  5877. this.dynamicProperties.length || this.getValue(!0),
  5878. (this._isAnimated = !!this.dynamicProperties.length),
  5879. (this.pMatrix = new Matrix()),
  5880. (this.rMatrix = new Matrix()),
  5881. (this.sMatrix = new Matrix()),
  5882. (this.tMatrix = new Matrix()),
  5883. (this.matrix = new Matrix());
  5884. }),
  5885. (RepeaterModifier.prototype.applyTransforms = function (
  5886. e,
  5887. t,
  5888. r,
  5889. i,
  5890. s,
  5891. a
  5892. ) {
  5893. var o = a ? -1 : 1,
  5894. n = i.s.v[0] + (1 - i.s.v[0]) * (1 - s),
  5895. l = i.s.v[1] + (1 - i.s.v[1]) * (1 - s);
  5896. e.translate(i.p.v[0] * o * s, i.p.v[1] * o * s, i.p.v[2]),
  5897. t.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]),
  5898. t.rotate(-i.r.v * o * s),
  5899. t.translate(i.a.v[0], i.a.v[1], i.a.v[2]),
  5900. r.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]),
  5901. r.scale(a ? 1 / n : n, a ? 1 / l : l),
  5902. r.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
  5903. }),
  5904. (RepeaterModifier.prototype.init = function (e, t, r, i) {
  5905. for (
  5906. this.elem = e,
  5907. this.arr = t,
  5908. this.pos = r,
  5909. this.elemsData = i,
  5910. this._currentCopies = 0,
  5911. this._elements = [],
  5912. this._groups = [],
  5913. this.frameId = -1,
  5914. this.initDynamicPropertyContainer(e),
  5915. this.initModifierProperties(e, t[r]);
  5916. r > 0;
  5917. )
  5918. (r -= 1), this._elements.unshift(t[r]);
  5919. this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0);
  5920. }),
  5921. (RepeaterModifier.prototype.resetElements = function (e) {
  5922. var t,
  5923. r = e.length;
  5924. for (t = 0; t < r; t += 1)
  5925. (e[t]._processed = !1),
  5926. e[t].ty === 'gr' && this.resetElements(e[t].it);
  5927. }),
  5928. (RepeaterModifier.prototype.cloneElements = function (e) {
  5929. var t = JSON.parse(JSON.stringify(e));
  5930. return this.resetElements(t), t;
  5931. }),
  5932. (RepeaterModifier.prototype.changeGroupRender = function (e, t) {
  5933. var r,
  5934. i = e.length;
  5935. for (r = 0; r < i; r += 1)
  5936. (e[r]._render = t),
  5937. e[r].ty === 'gr' && this.changeGroupRender(e[r].it, t);
  5938. }),
  5939. (RepeaterModifier.prototype.processShapes = function (e) {
  5940. var t,
  5941. r,
  5942. i,
  5943. s,
  5944. a,
  5945. o = !1;
  5946. if (this._mdf || e) {
  5947. var n = Math.ceil(this.c.v);
  5948. if (this._groups.length < n) {
  5949. for (; this._groups.length < n; ) {
  5950. var l = { it: this.cloneElements(this._elements), ty: 'gr' };
  5951. l.it.push({
  5952. a: { a: 0, ix: 1, k: [0, 0] },
  5953. nm: 'Transform',
  5954. o: { a: 0, ix: 7, k: 100 },
  5955. p: { a: 0, ix: 2, k: [0, 0] },
  5956. r: {
  5957. a: 1,
  5958. ix: 6,
  5959. k: [
  5960. { s: 0, e: 0, t: 0 },
  5961. { s: 0, e: 0, t: 1 }
  5962. ]
  5963. },
  5964. s: { a: 0, ix: 3, k: [100, 100] },
  5965. sa: { a: 0, ix: 5, k: 0 },
  5966. sk: { a: 0, ix: 4, k: 0 },
  5967. ty: 'tr'
  5968. }),
  5969. this.arr.splice(0, 0, l),
  5970. this._groups.splice(0, 0, l),
  5971. (this._currentCopies += 1);
  5972. }
  5973. this.elem.reloadShapes(), (o = !0);
  5974. }
  5975. a = 0;
  5976. var f;
  5977. for (i = 0; i <= this._groups.length - 1; i += 1) {
  5978. if (
  5979. ((f = a < n),
  5980. (this._groups[i]._render = f),
  5981. this.changeGroupRender(this._groups[i].it, f),
  5982. !f)
  5983. ) {
  5984. var g = this.elemsData[i].it,
  5985. S = g[g.length - 1];
  5986. S.transform.op.v !== 0
  5987. ? ((S.transform.op._mdf = !0), (S.transform.op.v = 0))
  5988. : (S.transform.op._mdf = !1);
  5989. }
  5990. a += 1;
  5991. }
  5992. this._currentCopies = n;
  5993. var c = this.o.v,
  5994. P = c % 1,
  5995. d = c > 0 ? Math.floor(c) : Math.ceil(c),
  5996. p = this.pMatrix.props,
  5997. x = this.rMatrix.props,
  5998. u = this.sMatrix.props;
  5999. this.pMatrix.reset(),
  6000. this.rMatrix.reset(),
  6001. this.sMatrix.reset(),
  6002. this.tMatrix.reset(),
  6003. this.matrix.reset();
  6004. var y = 0;
  6005. if (c > 0) {
  6006. for (; y < d; )
  6007. this.applyTransforms(
  6008. this.pMatrix,
  6009. this.rMatrix,
  6010. this.sMatrix,
  6011. this.tr,
  6012. 1,
  6013. !1
  6014. ),
  6015. (y += 1);
  6016. P &&
  6017. (this.applyTransforms(
  6018. this.pMatrix,
  6019. this.rMatrix,
  6020. this.sMatrix,
  6021. this.tr,
  6022. P,
  6023. !1
  6024. ),
  6025. (y += P));
  6026. } else if (c < 0) {
  6027. for (; y > d; )
  6028. this.applyTransforms(
  6029. this.pMatrix,
  6030. this.rMatrix,
  6031. this.sMatrix,
  6032. this.tr,
  6033. 1,
  6034. !0
  6035. ),
  6036. (y -= 1);
  6037. P &&
  6038. (this.applyTransforms(
  6039. this.pMatrix,
  6040. this.rMatrix,
  6041. this.sMatrix,
  6042. this.tr,
  6043. -P,
  6044. !0
  6045. ),
  6046. (y -= P));
  6047. }
  6048. (i = this.data.m === 1 ? 0 : this._currentCopies - 1),
  6049. (s = this.data.m === 1 ? 1 : -1),
  6050. (a = this._currentCopies);
  6051. for (var m, A; a; ) {
  6052. if (
  6053. ((t = this.elemsData[i].it),
  6054. (r = t[t.length - 1].transform.mProps.v.props),
  6055. (A = r.length),
  6056. (t[t.length - 1].transform.mProps._mdf = !0),
  6057. (t[t.length - 1].transform.op._mdf = !0),
  6058. (t[t.length - 1].transform.op.v =
  6059. this._currentCopies === 1
  6060. ? this.so.v
  6061. : this.so.v +
  6062. (this.eo.v - this.so.v) *
  6063. (i / (this._currentCopies - 1))),
  6064. y !== 0)
  6065. ) {
  6066. for (
  6067. ((i !== 0 && s === 1) ||
  6068. (i !== this._currentCopies - 1 && s === -1)) &&
  6069. this.applyTransforms(
  6070. this.pMatrix,
  6071. this.rMatrix,
  6072. this.sMatrix,
  6073. this.tr,
  6074. 1,
  6075. !1
  6076. ),
  6077. this.matrix.transform(
  6078. x[0],
  6079. x[1],
  6080. x[2],
  6081. x[3],
  6082. x[4],
  6083. x[5],
  6084. x[6],
  6085. x[7],
  6086. x[8],
  6087. x[9],
  6088. x[10],
  6089. x[11],
  6090. x[12],
  6091. x[13],
  6092. x[14],
  6093. x[15]
  6094. ),
  6095. this.matrix.transform(
  6096. u[0],
  6097. u[1],
  6098. u[2],
  6099. u[3],
  6100. u[4],
  6101. u[5],
  6102. u[6],
  6103. u[7],
  6104. u[8],
  6105. u[9],
  6106. u[10],
  6107. u[11],
  6108. u[12],
  6109. u[13],
  6110. u[14],
  6111. u[15]
  6112. ),
  6113. this.matrix.transform(
  6114. p[0],
  6115. p[1],
  6116. p[2],
  6117. p[3],
  6118. p[4],
  6119. p[5],
  6120. p[6],
  6121. p[7],
  6122. p[8],
  6123. p[9],
  6124. p[10],
  6125. p[11],
  6126. p[12],
  6127. p[13],
  6128. p[14],
  6129. p[15]
  6130. ),
  6131. m = 0;
  6132. m < A;
  6133. m += 1
  6134. )
  6135. r[m] = this.matrix.props[m];
  6136. this.matrix.reset();
  6137. } else
  6138. for (this.matrix.reset(), m = 0; m < A; m += 1)
  6139. r[m] = this.matrix.props[m];
  6140. (y += 1), (a -= 1), (i += s);
  6141. }
  6142. } else
  6143. for (a = this._currentCopies, i = 0, s = 1; a; )
  6144. (t = this.elemsData[i].it),
  6145. (r = t[t.length - 1].transform.mProps.v.props),
  6146. (t[t.length - 1].transform.mProps._mdf = !1),
  6147. (t[t.length - 1].transform.op._mdf = !1),
  6148. (a -= 1),
  6149. (i += s);
  6150. return o;
  6151. }),
  6152. (RepeaterModifier.prototype.addShape = function () {});
  6153. function RoundCornersModifier() {}
  6154. extendPrototype([ShapeModifier], RoundCornersModifier),
  6155. (RoundCornersModifier.prototype.initModifierProperties = function (
  6156. e,
  6157. t
  6158. ) {
  6159. (this.getValue = this.processKeys),
  6160. (this.rd = PropertyFactory.getProp(e, t.r, 0, null, this)),
  6161. (this._isAnimated = !!this.rd.effectsSequence.length);
  6162. }),
  6163. (RoundCornersModifier.prototype.processPath = function (e, t) {
  6164. var r = shapePool.newElement();
  6165. r.c = e.c;
  6166. var i,
  6167. s = e._length,
  6168. a,
  6169. o,
  6170. n,
  6171. l,
  6172. f,
  6173. g,
  6174. S = 0,
  6175. c,
  6176. P,
  6177. d,
  6178. p,
  6179. x,
  6180. u;
  6181. for (i = 0; i < s; i += 1)
  6182. (a = e.v[i]),
  6183. (n = e.o[i]),
  6184. (o = e.i[i]),
  6185. a[0] === n[0] && a[1] === n[1] && a[0] === o[0] && a[1] === o[1]
  6186. ? (i === 0 || i === s - 1) && !e.c
  6187. ? (r.setTripleAt(a[0], a[1], n[0], n[1], o[0], o[1], S),
  6188. (S += 1))
  6189. : (i === 0 ? (l = e.v[s - 1]) : (l = e.v[i - 1]),
  6190. (f = Math.sqrt(
  6191. Math.pow(a[0] - l[0], 2) + Math.pow(a[1] - l[1], 2)
  6192. )),
  6193. (g = f ? Math.min(f / 2, t) / f : 0),
  6194. (x = a[0] + (l[0] - a[0]) * g),
  6195. (c = x),
  6196. (u = a[1] - (a[1] - l[1]) * g),
  6197. (P = u),
  6198. (d = c - (c - a[0]) * roundCorner),
  6199. (p = P - (P - a[1]) * roundCorner),
  6200. r.setTripleAt(c, P, d, p, x, u, S),
  6201. (S += 1),
  6202. i === s - 1 ? (l = e.v[0]) : (l = e.v[i + 1]),
  6203. (f = Math.sqrt(
  6204. Math.pow(a[0] - l[0], 2) + Math.pow(a[1] - l[1], 2)
  6205. )),
  6206. (g = f ? Math.min(f / 2, t) / f : 0),
  6207. (d = a[0] + (l[0] - a[0]) * g),
  6208. (c = d),
  6209. (p = a[1] + (l[1] - a[1]) * g),
  6210. (P = p),
  6211. (x = c - (c - a[0]) * roundCorner),
  6212. (u = P - (P - a[1]) * roundCorner),
  6213. r.setTripleAt(c, P, d, p, x, u, S),
  6214. (S += 1))
  6215. : (r.setTripleAt(
  6216. e.v[i][0],
  6217. e.v[i][1],
  6218. e.o[i][0],
  6219. e.o[i][1],
  6220. e.i[i][0],
  6221. e.i[i][1],
  6222. S
  6223. ),
  6224. (S += 1));
  6225. return r;
  6226. }),
  6227. (RoundCornersModifier.prototype.processShapes = function (e) {
  6228. var t,
  6229. r,
  6230. i = this.shapes.length,
  6231. s,
  6232. a,
  6233. o = this.rd.v;
  6234. if (o !== 0) {
  6235. var n, l;
  6236. for (r = 0; r < i; r += 1) {
  6237. if (
  6238. ((n = this.shapes[r]),
  6239. (l = n.localShapeCollection),
  6240. !(!n.shape._mdf && !this._mdf && !e))
  6241. )
  6242. for (
  6243. l.releaseShapes(),
  6244. n.shape._mdf = !0,
  6245. t = n.shape.paths.shapes,
  6246. a = n.shape.paths._length,
  6247. s = 0;
  6248. s < a;
  6249. s += 1
  6250. )
  6251. l.addShape(this.processPath(t[s], o));
  6252. n.shape.paths = n.localShapeCollection;
  6253. }
  6254. }
  6255. this.dynamicProperties.length || (this._mdf = !1);
  6256. });
  6257. function floatEqual(e, t) {
  6258. return Math.abs(e - t) * 1e5 <= Math.min(Math.abs(e), Math.abs(t));
  6259. }
  6260. function floatZero(e) {
  6261. return Math.abs(e) <= 1e-5;
  6262. }
  6263. function lerp(e, t, r) {
  6264. return e * (1 - r) + t * r;
  6265. }
  6266. function lerpPoint(e, t, r) {
  6267. return [lerp(e[0], t[0], r), lerp(e[1], t[1], r)];
  6268. }
  6269. function quadRoots(e, t, r) {
  6270. if (e === 0) return [];
  6271. var i = t * t - 4 * e * r;
  6272. if (i < 0) return [];
  6273. var s = -t / (2 * e);
  6274. if (i === 0) return [s];
  6275. var a = Math.sqrt(i) / (2 * e);
  6276. return [s - a, s + a];
  6277. }
  6278. function polynomialCoefficients(e, t, r, i) {
  6279. return [
  6280. -e + 3 * t - 3 * r + i,
  6281. 3 * e - 6 * t + 3 * r,
  6282. -3 * e + 3 * t,
  6283. e
  6284. ];
  6285. }
  6286. function singlePoint(e) {
  6287. return new PolynomialBezier(e, e, e, e, !1);
  6288. }
  6289. function PolynomialBezier(e, t, r, i, s) {
  6290. s && pointEqual(e, t) && (t = lerpPoint(e, i, 1 / 3)),
  6291. s && pointEqual(r, i) && (r = lerpPoint(e, i, 2 / 3));
  6292. var a = polynomialCoefficients(e[0], t[0], r[0], i[0]),
  6293. o = polynomialCoefficients(e[1], t[1], r[1], i[1]);
  6294. (this.a = [a[0], o[0]]),
  6295. (this.b = [a[1], o[1]]),
  6296. (this.c = [a[2], o[2]]),
  6297. (this.d = [a[3], o[3]]),
  6298. (this.points = [e, t, r, i]);
  6299. }
  6300. (PolynomialBezier.prototype.point = function (e) {
  6301. return [
  6302. ((this.a[0] * e + this.b[0]) * e + this.c[0]) * e + this.d[0],
  6303. ((this.a[1] * e + this.b[1]) * e + this.c[1]) * e + this.d[1]
  6304. ];
  6305. }),
  6306. (PolynomialBezier.prototype.derivative = function (e) {
  6307. return [
  6308. (3 * e * this.a[0] + 2 * this.b[0]) * e + this.c[0],
  6309. (3 * e * this.a[1] + 2 * this.b[1]) * e + this.c[1]
  6310. ];
  6311. }),
  6312. (PolynomialBezier.prototype.tangentAngle = function (e) {
  6313. var t = this.derivative(e);
  6314. return Math.atan2(t[1], t[0]);
  6315. }),
  6316. (PolynomialBezier.prototype.normalAngle = function (e) {
  6317. var t = this.derivative(e);
  6318. return Math.atan2(t[0], t[1]);
  6319. }),
  6320. (PolynomialBezier.prototype.inflectionPoints = function () {
  6321. var e = this.a[1] * this.b[0] - this.a[0] * this.b[1];
  6322. if (floatZero(e)) return [];
  6323. var t = (-0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1])) / e,
  6324. r =
  6325. t * t -
  6326. ((1 / 3) * (this.b[1] * this.c[0] - this.b[0] * this.c[1])) / e;
  6327. if (r < 0) return [];
  6328. var i = Math.sqrt(r);
  6329. return floatZero(i)
  6330. ? i > 0 && i < 1
  6331. ? [t]
  6332. : []
  6333. : [t - i, t + i].filter(function (s) {
  6334. return s > 0 && s < 1;
  6335. });
  6336. }),
  6337. (PolynomialBezier.prototype.split = function (e) {
  6338. if (e <= 0) return [singlePoint(this.points[0]), this];
  6339. if (e >= 1)
  6340. return [this, singlePoint(this.points[this.points.length - 1])];
  6341. var t = lerpPoint(this.points[0], this.points[1], e),
  6342. r = lerpPoint(this.points[1], this.points[2], e),
  6343. i = lerpPoint(this.points[2], this.points[3], e),
  6344. s = lerpPoint(t, r, e),
  6345. a = lerpPoint(r, i, e),
  6346. o = lerpPoint(s, a, e);
  6347. return [
  6348. new PolynomialBezier(this.points[0], t, s, o, !0),
  6349. new PolynomialBezier(o, a, i, this.points[3], !0)
  6350. ];
  6351. });
  6352. function extrema(e, t) {
  6353. var r = e.points[0][t],
  6354. i = e.points[e.points.length - 1][t];
  6355. if (r > i) {
  6356. var s = i;
  6357. (i = r), (r = s);
  6358. }
  6359. for (
  6360. var a = quadRoots(3 * e.a[t], 2 * e.b[t], e.c[t]), o = 0;
  6361. o < a.length;
  6362. o += 1
  6363. )
  6364. if (a[o] > 0 && a[o] < 1) {
  6365. var n = e.point(a[o])[t];
  6366. n < r ? (r = n) : n > i && (i = n);
  6367. }
  6368. return { min: r, max: i };
  6369. }
  6370. (PolynomialBezier.prototype.bounds = function () {
  6371. return { x: extrema(this, 0), y: extrema(this, 1) };
  6372. }),
  6373. (PolynomialBezier.prototype.boundingBox = function () {
  6374. var e = this.bounds();
  6375. return {
  6376. left: e.x.min,
  6377. right: e.x.max,
  6378. top: e.y.min,
  6379. bottom: e.y.max,
  6380. width: e.x.max - e.x.min,
  6381. height: e.y.max - e.y.min,
  6382. cx: (e.x.max + e.x.min) / 2,
  6383. cy: (e.y.max + e.y.min) / 2
  6384. };
  6385. });
  6386. function intersectData(e, t, r) {
  6387. var i = e.boundingBox();
  6388. return {
  6389. cx: i.cx,
  6390. cy: i.cy,
  6391. width: i.width,
  6392. height: i.height,
  6393. bez: e,
  6394. t: (t + r) / 2,
  6395. t1: t,
  6396. t2: r
  6397. };
  6398. }
  6399. function splitData(e) {
  6400. var t = e.bez.split(0.5);
  6401. return [intersectData(t[0], e.t1, e.t), intersectData(t[1], e.t, e.t2)];
  6402. }
  6403. function boxIntersect(e, t) {
  6404. return (
  6405. Math.abs(e.cx - t.cx) * 2 < e.width + t.width &&
  6406. Math.abs(e.cy - t.cy) * 2 < e.height + t.height
  6407. );
  6408. }
  6409. function intersectsImpl(e, t, r, i, s, a) {
  6410. if (boxIntersect(e, t)) {
  6411. if (
  6412. r >= a ||
  6413. (e.width <= i && e.height <= i && t.width <= i && t.height <= i)
  6414. ) {
  6415. s.push([e.t, t.t]);
  6416. return;
  6417. }
  6418. var o = splitData(e),
  6419. n = splitData(t);
  6420. intersectsImpl(o[0], n[0], r + 1, i, s, a),
  6421. intersectsImpl(o[0], n[1], r + 1, i, s, a),
  6422. intersectsImpl(o[1], n[0], r + 1, i, s, a),
  6423. intersectsImpl(o[1], n[1], r + 1, i, s, a);
  6424. }
  6425. }
  6426. (PolynomialBezier.prototype.intersections = function (e, t, r) {
  6427. t === void 0 && (t = 2), r === void 0 && (r = 7);
  6428. var i = [];
  6429. return (
  6430. intersectsImpl(
  6431. intersectData(this, 0, 1),
  6432. intersectData(e, 0, 1),
  6433. 0,
  6434. t,
  6435. i,
  6436. r
  6437. ),
  6438. i
  6439. );
  6440. }),
  6441. (PolynomialBezier.shapeSegment = function (e, t) {
  6442. var r = (t + 1) % e.length();
  6443. return new PolynomialBezier(e.v[t], e.o[t], e.i[r], e.v[r], !0);
  6444. }),
  6445. (PolynomialBezier.shapeSegmentInverted = function (e, t) {
  6446. var r = (t + 1) % e.length();
  6447. return new PolynomialBezier(e.v[r], e.i[r], e.o[t], e.v[t], !0);
  6448. });
  6449. function crossProduct(e, t) {
  6450. return [
  6451. e[1] * t[2] - e[2] * t[1],
  6452. e[2] * t[0] - e[0] * t[2],
  6453. e[0] * t[1] - e[1] * t[0]
  6454. ];
  6455. }
  6456. function lineIntersection(e, t, r, i) {
  6457. var s = [e[0], e[1], 1],
  6458. a = [t[0], t[1], 1],
  6459. o = [r[0], r[1], 1],
  6460. n = [i[0], i[1], 1],
  6461. l = crossProduct(crossProduct(s, a), crossProduct(o, n));
  6462. return floatZero(l[2]) ? null : [l[0] / l[2], l[1] / l[2]];
  6463. }
  6464. function polarOffset(e, t, r) {
  6465. return [e[0] + Math.cos(t) * r, e[1] - Math.sin(t) * r];
  6466. }
  6467. function pointDistance(e, t) {
  6468. return Math.hypot(e[0] - t[0], e[1] - t[1]);
  6469. }
  6470. function pointEqual(e, t) {
  6471. return floatEqual(e[0], t[0]) && floatEqual(e[1], t[1]);
  6472. }
  6473. function ZigZagModifier() {}
  6474. extendPrototype([ShapeModifier], ZigZagModifier),
  6475. (ZigZagModifier.prototype.initModifierProperties = function (e, t) {
  6476. (this.getValue = this.processKeys),
  6477. (this.amplitude = PropertyFactory.getProp(e, t.s, 0, null, this)),
  6478. (this.frequency = PropertyFactory.getProp(e, t.r, 0, null, this)),
  6479. (this.pointsType = PropertyFactory.getProp(e, t.pt, 0, null, this)),
  6480. (this._isAnimated =
  6481. this.amplitude.effectsSequence.length !== 0 ||
  6482. this.frequency.effectsSequence.length !== 0 ||
  6483. this.pointsType.effectsSequence.length !== 0);
  6484. });
  6485. function setPoint(e, t, r, i, s, a, o) {
  6486. var n = r - Math.PI / 2,
  6487. l = r + Math.PI / 2,
  6488. f = t[0] + Math.cos(r) * i * s,
  6489. g = t[1] - Math.sin(r) * i * s;
  6490. e.setTripleAt(
  6491. f,
  6492. g,
  6493. f + Math.cos(n) * a,
  6494. g - Math.sin(n) * a,
  6495. f + Math.cos(l) * o,
  6496. g - Math.sin(l) * o,
  6497. e.length()
  6498. );
  6499. }
  6500. function getPerpendicularVector(e, t) {
  6501. var r = [t[0] - e[0], t[1] - e[1]],
  6502. i = -Math.PI * 0.5,
  6503. s = [
  6504. Math.cos(i) * r[0] - Math.sin(i) * r[1],
  6505. Math.sin(i) * r[0] + Math.cos(i) * r[1]
  6506. ];
  6507. return s;
  6508. }
  6509. function getProjectingAngle(e, t) {
  6510. var r = t === 0 ? e.length() - 1 : t - 1,
  6511. i = (t + 1) % e.length(),
  6512. s = e.v[r],
  6513. a = e.v[i],
  6514. o = getPerpendicularVector(s, a);
  6515. return Math.atan2(0, 1) - Math.atan2(o[1], o[0]);
  6516. }
  6517. function zigZagCorner(e, t, r, i, s, a, o) {
  6518. var n = getProjectingAngle(t, r),
  6519. l = t.v[r % t._length],
  6520. f = t.v[r === 0 ? t._length - 1 : r - 1],
  6521. g = t.v[(r + 1) % t._length],
  6522. S =
  6523. a === 2
  6524. ? Math.sqrt(Math.pow(l[0] - f[0], 2) + Math.pow(l[1] - f[1], 2))
  6525. : 0,
  6526. c =
  6527. a === 2
  6528. ? Math.sqrt(Math.pow(l[0] - g[0], 2) + Math.pow(l[1] - g[1], 2))
  6529. : 0;
  6530. setPoint(
  6531. e,
  6532. t.v[r % t._length],
  6533. n,
  6534. o,
  6535. i,
  6536. c / ((s + 1) * 2),
  6537. S / ((s + 1) * 2)
  6538. );
  6539. }
  6540. function zigZagSegment(e, t, r, i, s, a) {
  6541. for (var o = 0; o < i; o += 1) {
  6542. var n = (o + 1) / (i + 1),
  6543. l =
  6544. s === 2
  6545. ? Math.sqrt(
  6546. Math.pow(t.points[3][0] - t.points[0][0], 2) +
  6547. Math.pow(t.points[3][1] - t.points[0][1], 2)
  6548. )
  6549. : 0,
  6550. f = t.normalAngle(n),
  6551. g = t.point(n);
  6552. setPoint(e, g, f, a, r, l / ((i + 1) * 2), l / ((i + 1) * 2)),
  6553. (a = -a);
  6554. }
  6555. return a;
  6556. }
  6557. (ZigZagModifier.prototype.processPath = function (e, t, r, i) {
  6558. var s = e._length,
  6559. a = shapePool.newElement();
  6560. if (((a.c = e.c), e.c || (s -= 1), s === 0)) return a;
  6561. var o = -1,
  6562. n = PolynomialBezier.shapeSegment(e, 0);
  6563. zigZagCorner(a, e, 0, t, r, i, o);
  6564. for (var l = 0; l < s; l += 1)
  6565. (o = zigZagSegment(a, n, t, r, i, -o)),
  6566. l === s - 1 && !e.c
  6567. ? (n = null)
  6568. : (n = PolynomialBezier.shapeSegment(e, (l + 1) % s)),
  6569. zigZagCorner(a, e, l + 1, t, r, i, o);
  6570. return a;
  6571. }),
  6572. (ZigZagModifier.prototype.processShapes = function (e) {
  6573. var t,
  6574. r,
  6575. i = this.shapes.length,
  6576. s,
  6577. a,
  6578. o = this.amplitude.v,
  6579. n = Math.max(0, Math.round(this.frequency.v)),
  6580. l = this.pointsType.v;
  6581. if (o !== 0) {
  6582. var f, g;
  6583. for (r = 0; r < i; r += 1) {
  6584. if (
  6585. ((f = this.shapes[r]),
  6586. (g = f.localShapeCollection),
  6587. !(!f.shape._mdf && !this._mdf && !e))
  6588. )
  6589. for (
  6590. g.releaseShapes(),
  6591. f.shape._mdf = !0,
  6592. t = f.shape.paths.shapes,
  6593. a = f.shape.paths._length,
  6594. s = 0;
  6595. s < a;
  6596. s += 1
  6597. )
  6598. g.addShape(this.processPath(t[s], o, n, l));
  6599. f.shape.paths = f.localShapeCollection;
  6600. }
  6601. }
  6602. this.dynamicProperties.length || (this._mdf = !1);
  6603. });
  6604. function linearOffset(e, t, r) {
  6605. var i = Math.atan2(t[0] - e[0], t[1] - e[1]);
  6606. return [polarOffset(e, i, r), polarOffset(t, i, r)];
  6607. }
  6608. function offsetSegment(e, t) {
  6609. var r, i, s, a, o, n, l;
  6610. (l = linearOffset(e.points[0], e.points[1], t)),
  6611. (r = l[0]),
  6612. (i = l[1]),
  6613. (l = linearOffset(e.points[1], e.points[2], t)),
  6614. (s = l[0]),
  6615. (a = l[1]),
  6616. (l = linearOffset(e.points[2], e.points[3], t)),
  6617. (o = l[0]),
  6618. (n = l[1]);
  6619. var f = lineIntersection(r, i, s, a);
  6620. f === null && (f = i);
  6621. var g = lineIntersection(o, n, s, a);
  6622. return g === null && (g = o), new PolynomialBezier(r, f, g, n);
  6623. }
  6624. function joinLines(e, t, r, i, s) {
  6625. var a = t.points[3],
  6626. o = r.points[0];
  6627. if (i === 3 || pointEqual(a, o)) return a;
  6628. if (i === 2) {
  6629. var n = -t.tangentAngle(1),
  6630. l = -r.tangentAngle(0) + Math.PI,
  6631. f = lineIntersection(
  6632. a,
  6633. polarOffset(a, n + Math.PI / 2, 100),
  6634. o,
  6635. polarOffset(o, n + Math.PI / 2, 100)
  6636. ),
  6637. g = f ? pointDistance(f, a) : pointDistance(a, o) / 2,
  6638. S = polarOffset(a, n, 2 * g * roundCorner);
  6639. return (
  6640. e.setXYAt(S[0], S[1], 'o', e.length() - 1),
  6641. (S = polarOffset(o, l, 2 * g * roundCorner)),
  6642. e.setTripleAt(o[0], o[1], o[0], o[1], S[0], S[1], e.length()),
  6643. o
  6644. );
  6645. }
  6646. var c = pointEqual(a, t.points[2]) ? t.points[0] : t.points[2],
  6647. P = pointEqual(o, r.points[1]) ? r.points[3] : r.points[1],
  6648. d = lineIntersection(c, a, o, P);
  6649. return d && pointDistance(d, a) < s
  6650. ? (e.setTripleAt(d[0], d[1], d[0], d[1], d[0], d[1], e.length()), d)
  6651. : a;
  6652. }
  6653. function getIntersection(e, t) {
  6654. var r = e.intersections(t);
  6655. return (
  6656. r.length && floatEqual(r[0][0], 1) && r.shift(),
  6657. r.length ? r[0] : null
  6658. );
  6659. }
  6660. function pruneSegmentIntersection(e, t) {
  6661. var r = e.slice(),
  6662. i = t.slice(),
  6663. s = getIntersection(e[e.length - 1], t[0]);
  6664. return (
  6665. s &&
  6666. ((r[e.length - 1] = e[e.length - 1].split(s[0])[0]),
  6667. (i[0] = t[0].split(s[1])[1])),
  6668. e.length > 1 &&
  6669. t.length > 1 &&
  6670. ((s = getIntersection(e[0], t[t.length - 1])), s)
  6671. ? [[e[0].split(s[0])[0]], [t[t.length - 1].split(s[1])[1]]]
  6672. : [r, i]
  6673. );
  6674. }
  6675. function pruneIntersections(e) {
  6676. for (var t, r = 1; r < e.length; r += 1)
  6677. (t = pruneSegmentIntersection(e[r - 1], e[r])),
  6678. (e[r - 1] = t[0]),
  6679. (e[r] = t[1]);
  6680. return (
  6681. e.length > 1 &&
  6682. ((t = pruneSegmentIntersection(e[e.length - 1], e[0])),
  6683. (e[e.length - 1] = t[0]),
  6684. (e[0] = t[1])),
  6685. e
  6686. );
  6687. }
  6688. function offsetSegmentSplit(e, t) {
  6689. var r = e.inflectionPoints(),
  6690. i,
  6691. s,
  6692. a,
  6693. o;
  6694. if (r.length === 0) return [offsetSegment(e, t)];
  6695. if (r.length === 1 || floatEqual(r[1], 1))
  6696. return (
  6697. (a = e.split(r[0])),
  6698. (i = a[0]),
  6699. (s = a[1]),
  6700. [offsetSegment(i, t), offsetSegment(s, t)]
  6701. );
  6702. (a = e.split(r[0])), (i = a[0]);
  6703. var n = (r[1] - r[0]) / (1 - r[0]);
  6704. return (
  6705. (a = a[1].split(n)),
  6706. (o = a[0]),
  6707. (s = a[1]),
  6708. [offsetSegment(i, t), offsetSegment(o, t), offsetSegment(s, t)]
  6709. );
  6710. }
  6711. function OffsetPathModifier() {}
  6712. extendPrototype([ShapeModifier], OffsetPathModifier),
  6713. (OffsetPathModifier.prototype.initModifierProperties = function (e, t) {
  6714. (this.getValue = this.processKeys),
  6715. (this.amount = PropertyFactory.getProp(e, t.a, 0, null, this)),
  6716. (this.miterLimit = PropertyFactory.getProp(e, t.ml, 0, null, this)),
  6717. (this.lineJoin = t.lj),
  6718. (this._isAnimated = this.amount.effectsSequence.length !== 0);
  6719. }),
  6720. (OffsetPathModifier.prototype.processPath = function (e, t, r, i) {
  6721. var s = shapePool.newElement();
  6722. s.c = e.c;
  6723. var a = e.length();
  6724. e.c || (a -= 1);
  6725. var o,
  6726. n,
  6727. l,
  6728. f = [];
  6729. for (o = 0; o < a; o += 1)
  6730. (l = PolynomialBezier.shapeSegment(e, o)),
  6731. f.push(offsetSegmentSplit(l, t));
  6732. if (!e.c)
  6733. for (o = a - 1; o >= 0; o -= 1)
  6734. (l = PolynomialBezier.shapeSegmentInverted(e, o)),
  6735. f.push(offsetSegmentSplit(l, t));
  6736. f = pruneIntersections(f);
  6737. var g = null,
  6738. S = null;
  6739. for (o = 0; o < f.length; o += 1) {
  6740. var c = f[o];
  6741. for (
  6742. S && (g = joinLines(s, S, c[0], r, i)),
  6743. S = c[c.length - 1],
  6744. n = 0;
  6745. n < c.length;
  6746. n += 1
  6747. )
  6748. (l = c[n]),
  6749. g && pointEqual(l.points[0], g)
  6750. ? s.setXYAt(
  6751. l.points[1][0],
  6752. l.points[1][1],
  6753. 'o',
  6754. s.length() - 1
  6755. )
  6756. : s.setTripleAt(
  6757. l.points[0][0],
  6758. l.points[0][1],
  6759. l.points[1][0],
  6760. l.points[1][1],
  6761. l.points[0][0],
  6762. l.points[0][1],
  6763. s.length()
  6764. ),
  6765. s.setTripleAt(
  6766. l.points[3][0],
  6767. l.points[3][1],
  6768. l.points[3][0],
  6769. l.points[3][1],
  6770. l.points[2][0],
  6771. l.points[2][1],
  6772. s.length()
  6773. ),
  6774. (g = l.points[3]);
  6775. }
  6776. return f.length && joinLines(s, S, f[0][0], r, i), s;
  6777. }),
  6778. (OffsetPathModifier.prototype.processShapes = function (e) {
  6779. var t,
  6780. r,
  6781. i = this.shapes.length,
  6782. s,
  6783. a,
  6784. o = this.amount.v,
  6785. n = this.miterLimit.v,
  6786. l = this.lineJoin;
  6787. if (o !== 0) {
  6788. var f, g;
  6789. for (r = 0; r < i; r += 1) {
  6790. if (
  6791. ((f = this.shapes[r]),
  6792. (g = f.localShapeCollection),
  6793. !(!f.shape._mdf && !this._mdf && !e))
  6794. )
  6795. for (
  6796. g.releaseShapes(),
  6797. f.shape._mdf = !0,
  6798. t = f.shape.paths.shapes,
  6799. a = f.shape.paths._length,
  6800. s = 0;
  6801. s < a;
  6802. s += 1
  6803. )
  6804. g.addShape(this.processPath(t[s], o, l, n));
  6805. f.shape.paths = f.localShapeCollection;
  6806. }
  6807. }
  6808. this.dynamicProperties.length || (this._mdf = !1);
  6809. });
  6810. function getFontProperties(e) {
  6811. for (
  6812. var t = e.fStyle ? e.fStyle.split(' ') : [],
  6813. r = 'normal',
  6814. i = 'normal',
  6815. s = t.length,
  6816. a,
  6817. o = 0;
  6818. o < s;
  6819. o += 1
  6820. )
  6821. switch (((a = t[o].toLowerCase()), a)) {
  6822. case 'italic':
  6823. i = 'italic';
  6824. break;
  6825. case 'bold':
  6826. r = '700';
  6827. break;
  6828. case 'black':
  6829. r = '900';
  6830. break;
  6831. case 'medium':
  6832. r = '500';
  6833. break;
  6834. case 'regular':
  6835. case 'normal':
  6836. r = '400';
  6837. break;
  6838. case 'light':
  6839. case 'thin':
  6840. r = '200';
  6841. break;
  6842. }
  6843. return { style: i, weight: e.fWeight || r };
  6844. }
  6845. var FontManager = (function () {
  6846. var e = 5e3,
  6847. t = { w: 0, size: 0, shapes: [], data: { shapes: [] } },
  6848. r = [];
  6849. r = r.concat([
  6850. 2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368,
  6851. 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
  6852. 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403
  6853. ]);
  6854. var i = 127988,
  6855. s = 917631,
  6856. a = 917601,
  6857. o = 917626,
  6858. n = 65039,
  6859. l = 8205,
  6860. f = 127462,
  6861. g = 127487,
  6862. S = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
  6863. function c(M) {
  6864. var k = M.split(','),
  6865. b,
  6866. C = k.length,
  6867. L = [];
  6868. for (b = 0; b < C; b += 1)
  6869. k[b] !== 'sans-serif' && k[b] !== 'monospace' && L.push(k[b]);
  6870. return L.join(',');
  6871. }
  6872. function P(M, k) {
  6873. var b = createTag('span');
  6874. b.setAttribute('aria-hidden', !0), (b.style.fontFamily = k);
  6875. var C = createTag('span');
  6876. (C.innerText = 'giItT1WQy@!-/#'),
  6877. (b.style.position = 'absolute'),
  6878. (b.style.left = '-10000px'),
  6879. (b.style.top = '-10000px'),
  6880. (b.style.fontSize = '300px'),
  6881. (b.style.fontVariant = 'normal'),
  6882. (b.style.fontStyle = 'normal'),
  6883. (b.style.fontWeight = 'normal'),
  6884. (b.style.letterSpacing = '0'),
  6885. b.appendChild(C),
  6886. document.body.appendChild(b);
  6887. var L = C.offsetWidth;
  6888. return (
  6889. (C.style.fontFamily = c(M) + ', ' + k), { node: C, w: L, parent: b }
  6890. );
  6891. }
  6892. function d() {
  6893. var M,
  6894. k = this.fonts.length,
  6895. b,
  6896. C,
  6897. L = k;
  6898. for (M = 0; M < k; M += 1)
  6899. this.fonts[M].loaded
  6900. ? (L -= 1)
  6901. : this.fonts[M].fOrigin === 'n' || this.fonts[M].origin === 0
  6902. ? (this.fonts[M].loaded = !0)
  6903. : ((b = this.fonts[M].monoCase.node),
  6904. (C = this.fonts[M].monoCase.w),
  6905. b.offsetWidth !== C
  6906. ? ((L -= 1), (this.fonts[M].loaded = !0))
  6907. : ((b = this.fonts[M].sansCase.node),
  6908. (C = this.fonts[M].sansCase.w),
  6909. b.offsetWidth !== C &&
  6910. ((L -= 1), (this.fonts[M].loaded = !0))),
  6911. this.fonts[M].loaded &&
  6912. (this.fonts[M].sansCase.parent.parentNode.removeChild(
  6913. this.fonts[M].sansCase.parent
  6914. ),
  6915. this.fonts[M].monoCase.parent.parentNode.removeChild(
  6916. this.fonts[M].monoCase.parent
  6917. )));
  6918. L !== 0 && Date.now() - this.initTime < e
  6919. ? setTimeout(this.checkLoadedFontsBinded, 20)
  6920. : setTimeout(this.setIsLoadedBinded, 10);
  6921. }
  6922. function p(M, k) {
  6923. var b = document.body && k ? 'svg' : 'canvas',
  6924. C,
  6925. L = getFontProperties(M);
  6926. if (b === 'svg') {
  6927. var F = createNS('text');
  6928. (F.style.fontSize = '100px'),
  6929. F.setAttribute('font-family', M.fFamily),
  6930. F.setAttribute('font-style', L.style),
  6931. F.setAttribute('font-weight', L.weight),
  6932. (F.textContent = '1'),
  6933. M.fClass
  6934. ? ((F.style.fontFamily = 'inherit'),
  6935. F.setAttribute('class', M.fClass))
  6936. : (F.style.fontFamily = M.fFamily),
  6937. k.appendChild(F),
  6938. (C = F);
  6939. } else {
  6940. var U = new OffscreenCanvas(500, 500).getContext('2d');
  6941. (U.font = L.style + ' ' + L.weight + ' 100px ' + M.fFamily),
  6942. (C = U);
  6943. }
  6944. function D(V) {
  6945. return b === 'svg'
  6946. ? ((C.textContent = V), C.getComputedTextLength())
  6947. : C.measureText(V).width;
  6948. }
  6949. return { measureText: D };
  6950. }
  6951. function x(M, k) {
  6952. if (!M) {
  6953. this.isLoaded = !0;
  6954. return;
  6955. }
  6956. if (this.chars) {
  6957. (this.isLoaded = !0), (this.fonts = M.list);
  6958. return;
  6959. }
  6960. if (!document.body) {
  6961. (this.isLoaded = !0),
  6962. M.list.forEach(function (J) {
  6963. (J.helper = p(J)), (J.cache = {});
  6964. }),
  6965. (this.fonts = M.list);
  6966. return;
  6967. }
  6968. var b = M.list,
  6969. C,
  6970. L = b.length,
  6971. F = L;
  6972. for (C = 0; C < L; C += 1) {
  6973. var U = !0,
  6974. D,
  6975. V;
  6976. if (
  6977. ((b[C].loaded = !1),
  6978. (b[C].monoCase = P(b[C].fFamily, 'monospace')),
  6979. (b[C].sansCase = P(b[C].fFamily, 'sans-serif')),
  6980. !b[C].fPath)
  6981. )
  6982. (b[C].loaded = !0), (F -= 1);
  6983. else if (b[C].fOrigin === 'p' || b[C].origin === 3) {
  6984. if (
  6985. ((D = document.querySelectorAll(
  6986. 'style[f-forigin="p"][f-family="' +
  6987. b[C].fFamily +
  6988. '"], style[f-origin="3"][f-family="' +
  6989. b[C].fFamily +
  6990. '"]'
  6991. )),
  6992. D.length > 0 && (U = !1),
  6993. U)
  6994. ) {
  6995. var O = createTag('style');
  6996. O.setAttribute('f-forigin', b[C].fOrigin),
  6997. O.setAttribute('f-origin', b[C].origin),
  6998. O.setAttribute('f-family', b[C].fFamily),
  6999. (O.type = 'text/css'),
  7000. (O.innerText =
  7001. '@font-face {font-family: ' +
  7002. b[C].fFamily +
  7003. "; font-style: normal; src: url('" +
  7004. b[C].fPath +
  7005. "');}"),
  7006. k.appendChild(O);
  7007. }
  7008. } else if (b[C].fOrigin === 'g' || b[C].origin === 1) {
  7009. for (
  7010. D = document.querySelectorAll(
  7011. 'link[f-forigin="g"], link[f-origin="1"]'
  7012. ),
  7013. V = 0;
  7014. V < D.length;
  7015. V += 1
  7016. )
  7017. D[V].href.indexOf(b[C].fPath) !== -1 && (U = !1);
  7018. if (U) {
  7019. var j = createTag('link');
  7020. j.setAttribute('f-forigin', b[C].fOrigin),
  7021. j.setAttribute('f-origin', b[C].origin),
  7022. (j.type = 'text/css'),
  7023. (j.rel = 'stylesheet'),
  7024. (j.href = b[C].fPath),
  7025. document.body.appendChild(j);
  7026. }
  7027. } else if (b[C].fOrigin === 't' || b[C].origin === 2) {
  7028. for (
  7029. D = document.querySelectorAll(
  7030. 'script[f-forigin="t"], script[f-origin="2"]'
  7031. ),
  7032. V = 0;
  7033. V < D.length;
  7034. V += 1
  7035. )
  7036. b[C].fPath === D[V].src && (U = !1);
  7037. if (U) {
  7038. var $ = createTag('link');
  7039. $.setAttribute('f-forigin', b[C].fOrigin),
  7040. $.setAttribute('f-origin', b[C].origin),
  7041. $.setAttribute('rel', 'stylesheet'),
  7042. $.setAttribute('href', b[C].fPath),
  7043. k.appendChild($);
  7044. }
  7045. }
  7046. (b[C].helper = p(b[C], k)),
  7047. (b[C].cache = {}),
  7048. this.fonts.push(b[C]);
  7049. }
  7050. F === 0
  7051. ? (this.isLoaded = !0)
  7052. : setTimeout(this.checkLoadedFonts.bind(this), 100);
  7053. }
  7054. function u(M) {
  7055. if (M) {
  7056. this.chars || (this.chars = []);
  7057. var k,
  7058. b = M.length,
  7059. C,
  7060. L = this.chars.length,
  7061. F;
  7062. for (k = 0; k < b; k += 1) {
  7063. for (C = 0, F = !1; C < L; )
  7064. this.chars[C].style === M[k].style &&
  7065. this.chars[C].fFamily === M[k].fFamily &&
  7066. this.chars[C].ch === M[k].ch &&
  7067. (F = !0),
  7068. (C += 1);
  7069. F || (this.chars.push(M[k]), (L += 1));
  7070. }
  7071. }
  7072. }
  7073. function y(M, k, b) {
  7074. for (var C = 0, L = this.chars.length; C < L; ) {
  7075. if (
  7076. this.chars[C].ch === M &&
  7077. this.chars[C].style === k &&
  7078. this.chars[C].fFamily === b
  7079. )
  7080. return this.chars[C];
  7081. C += 1;
  7082. }
  7083. return (
  7084. ((typeof M == 'string' && M.charCodeAt(0) !== 13) || !M) &&
  7085. console &&
  7086. console.warn &&
  7087. !this._warned &&
  7088. ((this._warned = !0),
  7089. console.warn(
  7090. 'Missing character from exported characters list: ',
  7091. M,
  7092. k,
  7093. b
  7094. )),
  7095. t
  7096. );
  7097. }
  7098. function m(M, k, b) {
  7099. var C = this.getFontByName(k),
  7100. L = M;
  7101. if (!C.cache[L]) {
  7102. var F = C.helper;
  7103. if (M === ' ') {
  7104. var U = F.measureText('|' + M + '|'),
  7105. D = F.measureText('||');
  7106. C.cache[L] = (U - D) / 100;
  7107. } else C.cache[L] = F.measureText(M) / 100;
  7108. }
  7109. return C.cache[L] * b;
  7110. }
  7111. function A(M) {
  7112. for (var k = 0, b = this.fonts.length; k < b; ) {
  7113. if (this.fonts[k].fName === M) return this.fonts[k];
  7114. k += 1;
  7115. }
  7116. return this.fonts[0];
  7117. }
  7118. function T(M) {
  7119. var k = 0,
  7120. b = M.charCodeAt(0);
  7121. if (b >= 55296 && b <= 56319) {
  7122. var C = M.charCodeAt(1);
  7123. C >= 56320 &&
  7124. C <= 57343 &&
  7125. (k = (b - 55296) * 1024 + C - 56320 + 65536);
  7126. }
  7127. return k;
  7128. }
  7129. function E(M, k) {
  7130. var b = M.toString(16) + k.toString(16);
  7131. return S.indexOf(b) !== -1;
  7132. }
  7133. function _(M) {
  7134. return M === l;
  7135. }
  7136. function I(M) {
  7137. return M === n;
  7138. }
  7139. function B(M) {
  7140. var k = T(M);
  7141. return k >= f && k <= g;
  7142. }
  7143. function z(M) {
  7144. return B(M.substr(0, 2)) && B(M.substr(2, 2));
  7145. }
  7146. function G(M) {
  7147. return r.indexOf(M) !== -1;
  7148. }
  7149. function R(M, k) {
  7150. var b = T(M.substr(k, 2));
  7151. if (b !== i) return !1;
  7152. var C = 0;
  7153. for (k += 2; C < 5; ) {
  7154. if (((b = T(M.substr(k, 2))), b < a || b > o)) return !1;
  7155. (C += 1), (k += 2);
  7156. }
  7157. return T(M.substr(k, 2)) === s;
  7158. }
  7159. function W() {
  7160. this.isLoaded = !0;
  7161. }
  7162. var H = function () {
  7163. (this.fonts = []),
  7164. (this.chars = null),
  7165. (this.typekitLoaded = 0),
  7166. (this.isLoaded = !1),
  7167. (this._warned = !1),
  7168. (this.initTime = Date.now()),
  7169. (this.setIsLoadedBinded = this.setIsLoaded.bind(this)),
  7170. (this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this));
  7171. };
  7172. (H.isModifier = E),
  7173. (H.isZeroWidthJoiner = _),
  7174. (H.isFlagEmoji = z),
  7175. (H.isRegionalCode = B),
  7176. (H.isCombinedCharacter = G),
  7177. (H.isRegionalFlag = R),
  7178. (H.isVariationSelector = I),
  7179. (H.BLACK_FLAG_CODE_POINT = i);
  7180. var N = {
  7181. addChars: u,
  7182. addFonts: x,
  7183. getCharData: y,
  7184. getFontByName: A,
  7185. measureText: m,
  7186. checkLoadedFonts: d,
  7187. setIsLoaded: W
  7188. };
  7189. return (H.prototype = N), H;
  7190. })();
  7191. function SlotManager(e) {
  7192. this.animationData = e;
  7193. }
  7194. SlotManager.prototype.getProp = function (e) {
  7195. return this.animationData.slots && this.animationData.slots[e.sid]
  7196. ? Object.assign(e, this.animationData.slots[e.sid].p)
  7197. : e;
  7198. };
  7199. function slotFactory(e) {
  7200. return new SlotManager(e);
  7201. }
  7202. function RenderableElement() {}
  7203. RenderableElement.prototype = {
  7204. initRenderable: function () {
  7205. (this.isInRange = !1),
  7206. (this.hidden = !1),
  7207. (this.isTransparent = !1),
  7208. (this.renderableComponents = []);
  7209. },
  7210. addRenderableComponent: function (t) {
  7211. this.renderableComponents.indexOf(t) === -1 &&
  7212. this.renderableComponents.push(t);
  7213. },
  7214. removeRenderableComponent: function (t) {
  7215. this.renderableComponents.indexOf(t) !== -1 &&
  7216. this.renderableComponents.splice(
  7217. this.renderableComponents.indexOf(t),
  7218. 1
  7219. );
  7220. },
  7221. prepareRenderableFrame: function (t) {
  7222. this.checkLayerLimits(t);
  7223. },
  7224. checkTransparency: function () {
  7225. this.finalTransform.mProp.o.v <= 0
  7226. ? !this.isTransparent &&
  7227. this.globalData.renderConfig.hideOnTransparent &&
  7228. ((this.isTransparent = !0), this.hide())
  7229. : this.isTransparent && ((this.isTransparent = !1), this.show());
  7230. },
  7231. checkLayerLimits: function (t) {
  7232. this.data.ip - this.data.st <= t && this.data.op - this.data.st > t
  7233. ? this.isInRange !== !0 &&
  7234. ((this.globalData._mdf = !0),
  7235. (this._mdf = !0),
  7236. (this.isInRange = !0),
  7237. this.show())
  7238. : this.isInRange !== !1 &&
  7239. ((this.globalData._mdf = !0), (this.isInRange = !1), this.hide());
  7240. },
  7241. renderRenderable: function () {
  7242. var t,
  7243. r = this.renderableComponents.length;
  7244. for (t = 0; t < r; t += 1)
  7245. this.renderableComponents[t].renderFrame(this._isFirstFrame);
  7246. },
  7247. sourceRectAtTime: function () {
  7248. return { top: 0, left: 0, width: 100, height: 100 };
  7249. },
  7250. getLayerSize: function () {
  7251. return this.data.ty === 5
  7252. ? { w: this.data.textData.width, h: this.data.textData.height }
  7253. : { w: this.data.width, h: this.data.height };
  7254. }
  7255. };
  7256. var getBlendMode = (function () {
  7257. var e = {
  7258. 0: 'source-over',
  7259. 1: 'multiply',
  7260. 2: 'screen',
  7261. 3: 'overlay',
  7262. 4: 'darken',
  7263. 5: 'lighten',
  7264. 6: 'color-dodge',
  7265. 7: 'color-burn',
  7266. 8: 'hard-light',
  7267. 9: 'soft-light',
  7268. 10: 'difference',
  7269. 11: 'exclusion',
  7270. 12: 'hue',
  7271. 13: 'saturation',
  7272. 14: 'color',
  7273. 15: 'luminosity'
  7274. };
  7275. return function (t) {
  7276. return e[t] || '';
  7277. };
  7278. })();
  7279. function SliderEffect(e, t, r) {
  7280. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  7281. }
  7282. function AngleEffect(e, t, r) {
  7283. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  7284. }
  7285. function ColorEffect(e, t, r) {
  7286. this.p = PropertyFactory.getProp(t, e.v, 1, 0, r);
  7287. }
  7288. function PointEffect(e, t, r) {
  7289. this.p = PropertyFactory.getProp(t, e.v, 1, 0, r);
  7290. }
  7291. function LayerIndexEffect(e, t, r) {
  7292. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  7293. }
  7294. function MaskIndexEffect(e, t, r) {
  7295. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  7296. }
  7297. function CheckboxEffect(e, t, r) {
  7298. this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
  7299. }
  7300. function NoValueEffect() {
  7301. this.p = {};
  7302. }
  7303. function EffectsManager(e, t) {
  7304. var r = e.ef || [];
  7305. this.effectElements = [];
  7306. var i,
  7307. s = r.length,
  7308. a;
  7309. for (i = 0; i < s; i += 1)
  7310. (a = new GroupEffect(r[i], t)), this.effectElements.push(a);
  7311. }
  7312. function GroupEffect(e, t) {
  7313. this.init(e, t);
  7314. }
  7315. extendPrototype([DynamicPropertyContainer], GroupEffect),
  7316. (GroupEffect.prototype.getValue =
  7317. GroupEffect.prototype.iterateDynamicProperties),
  7318. (GroupEffect.prototype.init = function (e, t) {
  7319. (this.data = e),
  7320. (this.effectElements = []),
  7321. this.initDynamicPropertyContainer(t);
  7322. var r,
  7323. i = this.data.ef.length,
  7324. s,
  7325. a = this.data.ef;
  7326. for (r = 0; r < i; r += 1) {
  7327. switch (((s = null), a[r].ty)) {
  7328. case 0:
  7329. s = new SliderEffect(a[r], t, this);
  7330. break;
  7331. case 1:
  7332. s = new AngleEffect(a[r], t, this);
  7333. break;
  7334. case 2:
  7335. s = new ColorEffect(a[r], t, this);
  7336. break;
  7337. case 3:
  7338. s = new PointEffect(a[r], t, this);
  7339. break;
  7340. case 4:
  7341. case 7:
  7342. s = new CheckboxEffect(a[r], t, this);
  7343. break;
  7344. case 10:
  7345. s = new LayerIndexEffect(a[r], t, this);
  7346. break;
  7347. case 11:
  7348. s = new MaskIndexEffect(a[r], t, this);
  7349. break;
  7350. case 5:
  7351. s = new EffectsManager(a[r], t);
  7352. break;
  7353. default:
  7354. s = new NoValueEffect(a[r]);
  7355. break;
  7356. }
  7357. s && this.effectElements.push(s);
  7358. }
  7359. });
  7360. function BaseElement() {}
  7361. BaseElement.prototype = {
  7362. checkMasks: function () {
  7363. if (!this.data.hasMask) return !1;
  7364. for (var t = 0, r = this.data.masksProperties.length; t < r; ) {
  7365. if (
  7366. this.data.masksProperties[t].mode !== 'n' &&
  7367. this.data.masksProperties[t].cl !== !1
  7368. )
  7369. return !0;
  7370. t += 1;
  7371. }
  7372. return !1;
  7373. },
  7374. initExpressions: function () {
  7375. var t = getExpressionInterfaces();
  7376. if (t) {
  7377. var r = t('layer'),
  7378. i = t('effects'),
  7379. s = t('shape'),
  7380. a = t('text'),
  7381. o = t('comp');
  7382. (this.layerInterface = r(this)),
  7383. this.data.hasMask &&
  7384. this.maskManager &&
  7385. this.layerInterface.registerMaskInterface(this.maskManager);
  7386. var n = i.createEffectsInterface(this, this.layerInterface);
  7387. this.layerInterface.registerEffectsInterface(n),
  7388. this.data.ty === 0 || this.data.xt
  7389. ? (this.compInterface = o(this))
  7390. : this.data.ty === 4
  7391. ? ((this.layerInterface.shapeInterface = s(
  7392. this.shapesData,
  7393. this.itemsData,
  7394. this.layerInterface
  7395. )),
  7396. (this.layerInterface.content =
  7397. this.layerInterface.shapeInterface))
  7398. : this.data.ty === 5 &&
  7399. ((this.layerInterface.textInterface = a(this)),
  7400. (this.layerInterface.text =
  7401. this.layerInterface.textInterface));
  7402. }
  7403. },
  7404. setBlendMode: function () {
  7405. var t = getBlendMode(this.data.bm),
  7406. r = this.baseElement || this.layerElement;
  7407. r.style['mix-blend-mode'] = t;
  7408. },
  7409. initBaseData: function (t, r, i) {
  7410. (this.globalData = r),
  7411. (this.comp = i),
  7412. (this.data = t),
  7413. (this.layerId = createElementID()),
  7414. this.data.sr || (this.data.sr = 1),
  7415. (this.effectsManager = new EffectsManager(
  7416. this.data,
  7417. this,
  7418. this.dynamicProperties
  7419. ));
  7420. },
  7421. getType: function () {
  7422. return this.type;
  7423. },
  7424. sourceRectAtTime: function () {}
  7425. };
  7426. function FrameElement() {}
  7427. FrameElement.prototype = {
  7428. initFrame: function () {
  7429. (this._isFirstFrame = !1),
  7430. (this.dynamicProperties = []),
  7431. (this._mdf = !1);
  7432. },
  7433. prepareProperties: function (t, r) {
  7434. var i,
  7435. s = this.dynamicProperties.length;
  7436. for (i = 0; i < s; i += 1)
  7437. (r ||
  7438. (this._isParent &&
  7439. this.dynamicProperties[i].propType === 'transform')) &&
  7440. (this.dynamicProperties[i].getValue(),
  7441. this.dynamicProperties[i]._mdf &&
  7442. ((this.globalData._mdf = !0), (this._mdf = !0)));
  7443. },
  7444. addDynamicProperty: function (t) {
  7445. this.dynamicProperties.indexOf(t) === -1 &&
  7446. this.dynamicProperties.push(t);
  7447. }
  7448. };
  7449. function FootageElement(e, t, r) {
  7450. this.initFrame(),
  7451. this.initRenderable(),
  7452. (this.assetData = t.getAssetData(e.refId)),
  7453. (this.footageData = t.imageLoader.getAsset(this.assetData)),
  7454. this.initBaseData(e, t, r);
  7455. }
  7456. (FootageElement.prototype.prepareFrame = function () {}),
  7457. extendPrototype(
  7458. [RenderableElement, BaseElement, FrameElement],
  7459. FootageElement
  7460. ),
  7461. (FootageElement.prototype.getBaseElement = function () {
  7462. return null;
  7463. }),
  7464. (FootageElement.prototype.renderFrame = function () {}),
  7465. (FootageElement.prototype.destroy = function () {}),
  7466. (FootageElement.prototype.initExpressions = function () {
  7467. var e = getExpressionInterfaces();
  7468. if (e) {
  7469. var t = e('footage');
  7470. this.layerInterface = t(this);
  7471. }
  7472. }),
  7473. (FootageElement.prototype.getFootageData = function () {
  7474. return this.footageData;
  7475. });
  7476. function AudioElement(e, t, r) {
  7477. this.initFrame(),
  7478. this.initRenderable(),
  7479. (this.assetData = t.getAssetData(e.refId)),
  7480. this.initBaseData(e, t, r),
  7481. (this._isPlaying = !1),
  7482. (this._canPlay = !1);
  7483. var i = this.globalData.getAssetsPath(this.assetData);
  7484. (this.audio = this.globalData.audioController.createAudio(i)),
  7485. (this._currentTime = 0),
  7486. this.globalData.audioController.addAudio(this),
  7487. (this._volumeMultiplier = 1),
  7488. (this._volume = 1),
  7489. (this._previousVolume = null),
  7490. (this.tm = e.tm
  7491. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  7492. : { _placeholder: !0 }),
  7493. (this.lv = PropertyFactory.getProp(
  7494. this,
  7495. e.au && e.au.lv ? e.au.lv : { k: [100] },
  7496. 1,
  7497. 0.01,
  7498. this
  7499. ));
  7500. }
  7501. (AudioElement.prototype.prepareFrame = function (e) {
  7502. if (
  7503. (this.prepareRenderableFrame(e, !0),
  7504. this.prepareProperties(e, !0),
  7505. this.tm._placeholder)
  7506. )
  7507. this._currentTime = e / this.data.sr;
  7508. else {
  7509. var t = this.tm.v;
  7510. this._currentTime = t;
  7511. }
  7512. this._volume = this.lv.v[0];
  7513. var r = this._volume * this._volumeMultiplier;
  7514. this._previousVolume !== r &&
  7515. ((this._previousVolume = r), this.audio.volume(r));
  7516. }),
  7517. extendPrototype(
  7518. [RenderableElement, BaseElement, FrameElement],
  7519. AudioElement
  7520. ),
  7521. (AudioElement.prototype.renderFrame = function () {
  7522. this.isInRange &&
  7523. this._canPlay &&
  7524. (this._isPlaying
  7525. ? (!this.audio.playing() ||
  7526. Math.abs(
  7527. this._currentTime / this.globalData.frameRate -
  7528. this.audio.seek()
  7529. ) > 0.1) &&
  7530. this.audio.seek(this._currentTime / this.globalData.frameRate)
  7531. : (this.audio.play(),
  7532. this.audio.seek(this._currentTime / this.globalData.frameRate),
  7533. (this._isPlaying = !0)));
  7534. }),
  7535. (AudioElement.prototype.show = function () {}),
  7536. (AudioElement.prototype.hide = function () {
  7537. this.audio.pause(), (this._isPlaying = !1);
  7538. }),
  7539. (AudioElement.prototype.pause = function () {
  7540. this.audio.pause(), (this._isPlaying = !1), (this._canPlay = !1);
  7541. }),
  7542. (AudioElement.prototype.resume = function () {
  7543. this._canPlay = !0;
  7544. }),
  7545. (AudioElement.prototype.setRate = function (e) {
  7546. this.audio.rate(e);
  7547. }),
  7548. (AudioElement.prototype.volume = function (e) {
  7549. (this._volumeMultiplier = e),
  7550. (this._previousVolume = e * this._volume),
  7551. this.audio.volume(this._previousVolume);
  7552. }),
  7553. (AudioElement.prototype.getBaseElement = function () {
  7554. return null;
  7555. }),
  7556. (AudioElement.prototype.destroy = function () {}),
  7557. (AudioElement.prototype.sourceRectAtTime = function () {}),
  7558. (AudioElement.prototype.initExpressions = function () {});
  7559. function BaseRenderer() {}
  7560. (BaseRenderer.prototype.checkLayers = function (e) {
  7561. var t,
  7562. r = this.layers.length,
  7563. i;
  7564. for (this.completeLayers = !0, t = r - 1; t >= 0; t -= 1)
  7565. this.elements[t] ||
  7566. ((i = this.layers[t]),
  7567. i.ip - i.st <= e - this.layers[t].st &&
  7568. i.op - i.st > e - this.layers[t].st &&
  7569. this.buildItem(t)),
  7570. (this.completeLayers = this.elements[t] ? this.completeLayers : !1);
  7571. this.checkPendingElements();
  7572. }),
  7573. (BaseRenderer.prototype.createItem = function (e) {
  7574. switch (e.ty) {
  7575. case 2:
  7576. return this.createImage(e);
  7577. case 0:
  7578. return this.createComp(e);
  7579. case 1:
  7580. return this.createSolid(e);
  7581. case 3:
  7582. return this.createNull(e);
  7583. case 4:
  7584. return this.createShape(e);
  7585. case 5:
  7586. return this.createText(e);
  7587. case 6:
  7588. return this.createAudio(e);
  7589. case 13:
  7590. return this.createCamera(e);
  7591. case 15:
  7592. return this.createFootage(e);
  7593. default:
  7594. return this.createNull(e);
  7595. }
  7596. }),
  7597. (BaseRenderer.prototype.createCamera = function () {
  7598. throw new Error("You're using a 3d camera. Try the html renderer.");
  7599. }),
  7600. (BaseRenderer.prototype.createAudio = function (e) {
  7601. return new AudioElement(e, this.globalData, this);
  7602. }),
  7603. (BaseRenderer.prototype.createFootage = function (e) {
  7604. return new FootageElement(e, this.globalData, this);
  7605. }),
  7606. (BaseRenderer.prototype.buildAllItems = function () {
  7607. var e,
  7608. t = this.layers.length;
  7609. for (e = 0; e < t; e += 1) this.buildItem(e);
  7610. this.checkPendingElements();
  7611. }),
  7612. (BaseRenderer.prototype.includeLayers = function (e) {
  7613. this.completeLayers = !1;
  7614. var t,
  7615. r = e.length,
  7616. i,
  7617. s = this.layers.length;
  7618. for (t = 0; t < r; t += 1)
  7619. for (i = 0; i < s; ) {
  7620. if (this.layers[i].id === e[t].id) {
  7621. this.layers[i] = e[t];
  7622. break;
  7623. }
  7624. i += 1;
  7625. }
  7626. }),
  7627. (BaseRenderer.prototype.setProjectInterface = function (e) {
  7628. this.globalData.projectInterface = e;
  7629. }),
  7630. (BaseRenderer.prototype.initItems = function () {
  7631. this.globalData.progressiveLoad || this.buildAllItems();
  7632. }),
  7633. (BaseRenderer.prototype.buildElementParenting = function (e, t, r) {
  7634. for (
  7635. var i = this.elements, s = this.layers, a = 0, o = s.length;
  7636. a < o;
  7637. )
  7638. s[a].ind == t &&
  7639. (!i[a] || i[a] === !0
  7640. ? (this.buildItem(a), this.addPendingElement(e))
  7641. : (r.push(i[a]),
  7642. i[a].setAsParent(),
  7643. s[a].parent !== void 0
  7644. ? this.buildElementParenting(e, s[a].parent, r)
  7645. : e.setHierarchy(r))),
  7646. (a += 1);
  7647. }),
  7648. (BaseRenderer.prototype.addPendingElement = function (e) {
  7649. this.pendingElements.push(e);
  7650. }),
  7651. (BaseRenderer.prototype.searchExtraCompositions = function (e) {
  7652. var t,
  7653. r = e.length;
  7654. for (t = 0; t < r; t += 1)
  7655. if (e[t].xt) {
  7656. var i = this.createComp(e[t]);
  7657. i.initExpressions(),
  7658. this.globalData.projectInterface.registerComposition(i);
  7659. }
  7660. }),
  7661. (BaseRenderer.prototype.getElementById = function (e) {
  7662. var t,
  7663. r = this.elements.length;
  7664. for (t = 0; t < r; t += 1)
  7665. if (this.elements[t].data.ind === e) return this.elements[t];
  7666. return null;
  7667. }),
  7668. (BaseRenderer.prototype.getElementByPath = function (e) {
  7669. var t = e.shift(),
  7670. r;
  7671. if (typeof t == 'number') r = this.elements[t];
  7672. else {
  7673. var i,
  7674. s = this.elements.length;
  7675. for (i = 0; i < s; i += 1)
  7676. if (this.elements[i].data.nm === t) {
  7677. r = this.elements[i];
  7678. break;
  7679. }
  7680. }
  7681. return e.length === 0 ? r : r.getElementByPath(e);
  7682. }),
  7683. (BaseRenderer.prototype.setupGlobalData = function (e, t) {
  7684. (this.globalData.fontManager = new FontManager()),
  7685. (this.globalData.slotManager = slotFactory(e)),
  7686. this.globalData.fontManager.addChars(e.chars),
  7687. this.globalData.fontManager.addFonts(e.fonts, t),
  7688. (this.globalData.getAssetData =
  7689. this.animationItem.getAssetData.bind(this.animationItem)),
  7690. (this.globalData.getAssetsPath =
  7691. this.animationItem.getAssetsPath.bind(this.animationItem)),
  7692. (this.globalData.imageLoader = this.animationItem.imagePreloader),
  7693. (this.globalData.audioController =
  7694. this.animationItem.audioController),
  7695. (this.globalData.frameId = 0),
  7696. (this.globalData.frameRate = e.fr),
  7697. (this.globalData.nm = e.nm),
  7698. (this.globalData.compSize = { w: e.w, h: e.h });
  7699. });
  7700. var effectTypes = { TRANSFORM_EFFECT: 'transformEFfect' };
  7701. function TransformElement() {}
  7702. TransformElement.prototype = {
  7703. initTransform: function () {
  7704. var t = new Matrix();
  7705. (this.finalTransform = {
  7706. mProp: this.data.ks
  7707. ? TransformPropertyFactory.getTransformProperty(
  7708. this,
  7709. this.data.ks,
  7710. this
  7711. )
  7712. : { o: 0 },
  7713. _matMdf: !1,
  7714. _localMatMdf: !1,
  7715. _opMdf: !1,
  7716. mat: t,
  7717. localMat: t,
  7718. localOpacity: 1
  7719. }),
  7720. this.data.ao && (this.finalTransform.mProp.autoOriented = !0),
  7721. this.data.ty;
  7722. },
  7723. renderTransform: function () {
  7724. if (
  7725. ((this.finalTransform._opMdf =
  7726. this.finalTransform.mProp.o._mdf || this._isFirstFrame),
  7727. (this.finalTransform._matMdf =
  7728. this.finalTransform.mProp._mdf || this._isFirstFrame),
  7729. this.hierarchy)
  7730. ) {
  7731. var t,
  7732. r = this.finalTransform.mat,
  7733. i = 0,
  7734. s = this.hierarchy.length;
  7735. if (!this.finalTransform._matMdf)
  7736. for (; i < s; ) {
  7737. if (this.hierarchy[i].finalTransform.mProp._mdf) {
  7738. this.finalTransform._matMdf = !0;
  7739. break;
  7740. }
  7741. i += 1;
  7742. }
  7743. if (this.finalTransform._matMdf)
  7744. for (
  7745. t = this.finalTransform.mProp.v.props,
  7746. r.cloneFromProps(t),
  7747. i = 0;
  7748. i < s;
  7749. i += 1
  7750. )
  7751. r.multiply(this.hierarchy[i].finalTransform.mProp.v);
  7752. }
  7753. this.finalTransform._matMdf &&
  7754. (this.finalTransform._localMatMdf = this.finalTransform._matMdf),
  7755. this.finalTransform._opMdf &&
  7756. (this.finalTransform.localOpacity =
  7757. this.finalTransform.mProp.o.v);
  7758. },
  7759. renderLocalTransform: function () {
  7760. if (this.localTransforms) {
  7761. var t = 0,
  7762. r = this.localTransforms.length;
  7763. if (
  7764. ((this.finalTransform._localMatMdf = this.finalTransform._matMdf),
  7765. !this.finalTransform._localMatMdf || !this.finalTransform._opMdf)
  7766. )
  7767. for (; t < r; )
  7768. this.localTransforms[t]._mdf &&
  7769. (this.finalTransform._localMatMdf = !0),
  7770. this.localTransforms[t]._opMdf &&
  7771. !this.finalTransform._opMdf &&
  7772. ((this.finalTransform.localOpacity =
  7773. this.finalTransform.mProp.o.v),
  7774. (this.finalTransform._opMdf = !0)),
  7775. (t += 1);
  7776. if (this.finalTransform._localMatMdf) {
  7777. var i = this.finalTransform.localMat;
  7778. for (
  7779. this.localTransforms[0].matrix.clone(i), t = 1;
  7780. t < r;
  7781. t += 1
  7782. ) {
  7783. var s = this.localTransforms[t].matrix;
  7784. i.multiply(s);
  7785. }
  7786. i.multiply(this.finalTransform.mat);
  7787. }
  7788. if (this.finalTransform._opMdf) {
  7789. var a = this.finalTransform.localOpacity;
  7790. for (t = 0; t < r; t += 1)
  7791. a *= this.localTransforms[t].opacity * 0.01;
  7792. this.finalTransform.localOpacity = a;
  7793. }
  7794. }
  7795. },
  7796. searchEffectTransforms: function () {
  7797. if (this.renderableEffectsManager) {
  7798. var t = this.renderableEffectsManager.getEffects(
  7799. effectTypes.TRANSFORM_EFFECT
  7800. );
  7801. if (t.length) {
  7802. (this.localTransforms = []),
  7803. (this.finalTransform.localMat = new Matrix());
  7804. var r = 0,
  7805. i = t.length;
  7806. for (r = 0; r < i; r += 1) this.localTransforms.push(t[r]);
  7807. }
  7808. }
  7809. },
  7810. globalToLocal: function (t) {
  7811. var r = [];
  7812. r.push(this.finalTransform);
  7813. for (var i = !0, s = this.comp; i; )
  7814. s.finalTransform
  7815. ? (s.data.hasMask && r.splice(0, 0, s.finalTransform),
  7816. (s = s.comp))
  7817. : (i = !1);
  7818. var a,
  7819. o = r.length,
  7820. n;
  7821. for (a = 0; a < o; a += 1)
  7822. (n = r[a].mat.applyToPointArray(0, 0, 0)),
  7823. (t = [t[0] - n[0], t[1] - n[1], 0]);
  7824. return t;
  7825. },
  7826. mHelper: new Matrix()
  7827. };
  7828. function MaskElement(e, t, r) {
  7829. (this.data = e),
  7830. (this.element = t),
  7831. (this.globalData = r),
  7832. (this.storedData = []),
  7833. (this.masksProperties = this.data.masksProperties || []),
  7834. (this.maskElement = null);
  7835. var i = this.globalData.defs,
  7836. s,
  7837. a = this.masksProperties ? this.masksProperties.length : 0;
  7838. (this.viewData = createSizedArray(a)), (this.solidPath = '');
  7839. var o,
  7840. n = this.masksProperties,
  7841. l = 0,
  7842. f = [],
  7843. g,
  7844. S,
  7845. c = createElementID(),
  7846. P,
  7847. d,
  7848. p,
  7849. x,
  7850. u = 'clipPath',
  7851. y = 'clip-path';
  7852. for (s = 0; s < a; s += 1)
  7853. if (
  7854. (((n[s].mode !== 'a' && n[s].mode !== 'n') ||
  7855. n[s].inv ||
  7856. n[s].o.k !== 100 ||
  7857. n[s].o.x) &&
  7858. ((u = 'mask'), (y = 'mask')),
  7859. (n[s].mode === 's' || n[s].mode === 'i') && l === 0
  7860. ? ((P = createNS('rect')),
  7861. P.setAttribute('fill', '#ffffff'),
  7862. P.setAttribute('width', this.element.comp.data.w || 0),
  7863. P.setAttribute('height', this.element.comp.data.h || 0),
  7864. f.push(P))
  7865. : (P = null),
  7866. (o = createNS('path')),
  7867. n[s].mode === 'n')
  7868. )
  7869. (this.viewData[s] = {
  7870. op: PropertyFactory.getProp(
  7871. this.element,
  7872. n[s].o,
  7873. 0,
  7874. 0.01,
  7875. this.element
  7876. ),
  7877. prop: ShapePropertyFactory.getShapeProp(this.element, n[s], 3),
  7878. elem: o,
  7879. lastPath: ''
  7880. }),
  7881. i.appendChild(o);
  7882. else {
  7883. (l += 1),
  7884. o.setAttribute('fill', n[s].mode === 's' ? '#000000' : '#ffffff'),
  7885. o.setAttribute('clip-rule', 'nonzero');
  7886. var m;
  7887. if (
  7888. (n[s].x.k !== 0
  7889. ? ((u = 'mask'),
  7890. (y = 'mask'),
  7891. (x = PropertyFactory.getProp(
  7892. this.element,
  7893. n[s].x,
  7894. 0,
  7895. null,
  7896. this.element
  7897. )),
  7898. (m = createElementID()),
  7899. (d = createNS('filter')),
  7900. d.setAttribute('id', m),
  7901. (p = createNS('feMorphology')),
  7902. p.setAttribute('operator', 'erode'),
  7903. p.setAttribute('in', 'SourceGraphic'),
  7904. p.setAttribute('radius', '0'),
  7905. d.appendChild(p),
  7906. i.appendChild(d),
  7907. o.setAttribute(
  7908. 'stroke',
  7909. n[s].mode === 's' ? '#000000' : '#ffffff'
  7910. ))
  7911. : ((p = null), (x = null)),
  7912. (this.storedData[s] = {
  7913. elem: o,
  7914. x,
  7915. expan: p,
  7916. lastPath: '',
  7917. lastOperator: '',
  7918. filterId: m,
  7919. lastRadius: 0
  7920. }),
  7921. n[s].mode === 'i')
  7922. ) {
  7923. S = f.length;
  7924. var A = createNS('g');
  7925. for (g = 0; g < S; g += 1) A.appendChild(f[g]);
  7926. var T = createNS('mask');
  7927. T.setAttribute('mask-type', 'alpha'),
  7928. T.setAttribute('id', c + '_' + l),
  7929. T.appendChild(o),
  7930. i.appendChild(T),
  7931. A.setAttribute(
  7932. 'mask',
  7933. 'url(' + getLocationHref() + '#' + c + '_' + l + ')'
  7934. ),
  7935. (f.length = 0),
  7936. f.push(A);
  7937. } else f.push(o);
  7938. n[s].inv &&
  7939. !this.solidPath &&
  7940. (this.solidPath = this.createLayerSolidPath()),
  7941. (this.viewData[s] = {
  7942. elem: o,
  7943. lastPath: '',
  7944. op: PropertyFactory.getProp(
  7945. this.element,
  7946. n[s].o,
  7947. 0,
  7948. 0.01,
  7949. this.element
  7950. ),
  7951. prop: ShapePropertyFactory.getShapeProp(this.element, n[s], 3),
  7952. invRect: P
  7953. }),
  7954. this.viewData[s].prop.k ||
  7955. this.drawPath(n[s], this.viewData[s].prop.v, this.viewData[s]);
  7956. }
  7957. for (this.maskElement = createNS(u), a = f.length, s = 0; s < a; s += 1)
  7958. this.maskElement.appendChild(f[s]);
  7959. l > 0 &&
  7960. (this.maskElement.setAttribute('id', c),
  7961. this.element.maskedElement.setAttribute(
  7962. y,
  7963. 'url(' + getLocationHref() + '#' + c + ')'
  7964. ),
  7965. i.appendChild(this.maskElement)),
  7966. this.viewData.length && this.element.addRenderableComponent(this);
  7967. }
  7968. (MaskElement.prototype.getMaskProperty = function (e) {
  7969. return this.viewData[e].prop;
  7970. }),
  7971. (MaskElement.prototype.renderFrame = function (e) {
  7972. var t = this.element.finalTransform.mat,
  7973. r,
  7974. i = this.masksProperties.length;
  7975. for (r = 0; r < i; r += 1)
  7976. if (
  7977. ((this.viewData[r].prop._mdf || e) &&
  7978. this.drawPath(
  7979. this.masksProperties[r],
  7980. this.viewData[r].prop.v,
  7981. this.viewData[r]
  7982. ),
  7983. (this.viewData[r].op._mdf || e) &&
  7984. this.viewData[r].elem.setAttribute(
  7985. 'fill-opacity',
  7986. this.viewData[r].op.v
  7987. ),
  7988. this.masksProperties[r].mode !== 'n' &&
  7989. (this.viewData[r].invRect &&
  7990. (this.element.finalTransform.mProp._mdf || e) &&
  7991. this.viewData[r].invRect.setAttribute(
  7992. 'transform',
  7993. t.getInverseMatrix().to2dCSS()
  7994. ),
  7995. this.storedData[r].x && (this.storedData[r].x._mdf || e)))
  7996. ) {
  7997. var s = this.storedData[r].expan;
  7998. this.storedData[r].x.v < 0
  7999. ? (this.storedData[r].lastOperator !== 'erode' &&
  8000. ((this.storedData[r].lastOperator = 'erode'),
  8001. this.storedData[r].elem.setAttribute(
  8002. 'filter',
  8003. 'url(' +
  8004. getLocationHref() +
  8005. '#' +
  8006. this.storedData[r].filterId +
  8007. ')'
  8008. )),
  8009. s.setAttribute('radius', -this.storedData[r].x.v))
  8010. : (this.storedData[r].lastOperator !== 'dilate' &&
  8011. ((this.storedData[r].lastOperator = 'dilate'),
  8012. this.storedData[r].elem.setAttribute('filter', null)),
  8013. this.storedData[r].elem.setAttribute(
  8014. 'stroke-width',
  8015. this.storedData[r].x.v * 2
  8016. ));
  8017. }
  8018. }),
  8019. (MaskElement.prototype.getMaskelement = function () {
  8020. return this.maskElement;
  8021. }),
  8022. (MaskElement.prototype.createLayerSolidPath = function () {
  8023. var e = 'M0,0 ';
  8024. return (
  8025. (e += ' h' + this.globalData.compSize.w),
  8026. (e += ' v' + this.globalData.compSize.h),
  8027. (e += ' h-' + this.globalData.compSize.w),
  8028. (e += ' v-' + this.globalData.compSize.h + ' '),
  8029. e
  8030. );
  8031. }),
  8032. (MaskElement.prototype.drawPath = function (e, t, r) {
  8033. var i = ' M' + t.v[0][0] + ',' + t.v[0][1],
  8034. s,
  8035. a;
  8036. for (a = t._length, s = 1; s < a; s += 1)
  8037. i +=
  8038. ' C' +
  8039. t.o[s - 1][0] +
  8040. ',' +
  8041. t.o[s - 1][1] +
  8042. ' ' +
  8043. t.i[s][0] +
  8044. ',' +
  8045. t.i[s][1] +
  8046. ' ' +
  8047. t.v[s][0] +
  8048. ',' +
  8049. t.v[s][1];
  8050. if (
  8051. (t.c &&
  8052. a > 1 &&
  8053. (i +=
  8054. ' C' +
  8055. t.o[s - 1][0] +
  8056. ',' +
  8057. t.o[s - 1][1] +
  8058. ' ' +
  8059. t.i[0][0] +
  8060. ',' +
  8061. t.i[0][1] +
  8062. ' ' +
  8063. t.v[0][0] +
  8064. ',' +
  8065. t.v[0][1]),
  8066. r.lastPath !== i)
  8067. ) {
  8068. var o = '';
  8069. r.elem &&
  8070. (t.c && (o = e.inv ? this.solidPath + i : i),
  8071. r.elem.setAttribute('d', o)),
  8072. (r.lastPath = i);
  8073. }
  8074. }),
  8075. (MaskElement.prototype.destroy = function () {
  8076. (this.element = null),
  8077. (this.globalData = null),
  8078. (this.maskElement = null),
  8079. (this.data = null),
  8080. (this.masksProperties = null);
  8081. });
  8082. var filtersFactory = (function () {
  8083. var e = {};
  8084. (e.createFilter = t), (e.createAlphaToLuminanceFilter = r);
  8085. function t(i, s) {
  8086. var a = createNS('filter');
  8087. return (
  8088. a.setAttribute('id', i),
  8089. s !== !0 &&
  8090. (a.setAttribute('filterUnits', 'objectBoundingBox'),
  8091. a.setAttribute('x', '0%'),
  8092. a.setAttribute('y', '0%'),
  8093. a.setAttribute('width', '100%'),
  8094. a.setAttribute('height', '100%')),
  8095. a
  8096. );
  8097. }
  8098. function r() {
  8099. var i = createNS('feColorMatrix');
  8100. return (
  8101. i.setAttribute('type', 'matrix'),
  8102. i.setAttribute('color-interpolation-filters', 'sRGB'),
  8103. i.setAttribute(
  8104. 'values',
  8105. '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1'
  8106. ),
  8107. i
  8108. );
  8109. }
  8110. return e;
  8111. })(),
  8112. featureSupport = (function () {
  8113. var e = {
  8114. maskType: !0,
  8115. svgLumaHidden: !0,
  8116. offscreenCanvas: typeof OffscreenCanvas < 'u'
  8117. };
  8118. return (
  8119. (/MSIE 10/i.test(navigator.userAgent) ||
  8120. /MSIE 9/i.test(navigator.userAgent) ||
  8121. /rv:11.0/i.test(navigator.userAgent) ||
  8122. /Edge\/\d./i.test(navigator.userAgent)) &&
  8123. (e.maskType = !1),
  8124. /firefox/i.test(navigator.userAgent) && (e.svgLumaHidden = !1),
  8125. e
  8126. );
  8127. })(),
  8128. registeredEffects$1 = {},
  8129. idPrefix = 'filter_result_';
  8130. function SVGEffects(e) {
  8131. var t,
  8132. r = 'SourceGraphic',
  8133. i = e.data.ef ? e.data.ef.length : 0,
  8134. s = createElementID(),
  8135. a = filtersFactory.createFilter(s, !0),
  8136. o = 0;
  8137. this.filters = [];
  8138. var n;
  8139. for (t = 0; t < i; t += 1) {
  8140. n = null;
  8141. var l = e.data.ef[t].ty;
  8142. if (registeredEffects$1[l]) {
  8143. var f = registeredEffects$1[l].effect;
  8144. (n = new f(
  8145. a,
  8146. e.effectsManager.effectElements[t],
  8147. e,
  8148. idPrefix + o,
  8149. r
  8150. )),
  8151. (r = idPrefix + o),
  8152. registeredEffects$1[l].countsAsEffect && (o += 1);
  8153. }
  8154. n && this.filters.push(n);
  8155. }
  8156. o &&
  8157. (e.globalData.defs.appendChild(a),
  8158. e.layerElement.setAttribute(
  8159. 'filter',
  8160. 'url(' + getLocationHref() + '#' + s + ')'
  8161. )),
  8162. this.filters.length && e.addRenderableComponent(this);
  8163. }
  8164. (SVGEffects.prototype.renderFrame = function (e) {
  8165. var t,
  8166. r = this.filters.length;
  8167. for (t = 0; t < r; t += 1) this.filters[t].renderFrame(e);
  8168. }),
  8169. (SVGEffects.prototype.getEffects = function (e) {
  8170. var t,
  8171. r = this.filters.length,
  8172. i = [];
  8173. for (t = 0; t < r; t += 1)
  8174. this.filters[t].type === e && i.push(this.filters[t]);
  8175. return i;
  8176. });
  8177. function registerEffect$1(e, t, r) {
  8178. registeredEffects$1[e] = { effect: t, countsAsEffect: r };
  8179. }
  8180. function SVGBaseElement() {}
  8181. SVGBaseElement.prototype = {
  8182. initRendererElement: function () {
  8183. this.layerElement = createNS('g');
  8184. },
  8185. createContainerElements: function () {
  8186. (this.matteElement = createNS('g')),
  8187. (this.transformedElement = this.layerElement),
  8188. (this.maskedElement = this.layerElement),
  8189. (this._sizeChanged = !1);
  8190. var t = null;
  8191. if (this.data.td) {
  8192. this.matteMasks = {};
  8193. var r = createNS('g');
  8194. r.setAttribute('id', this.layerId),
  8195. r.appendChild(this.layerElement),
  8196. (t = r),
  8197. this.globalData.defs.appendChild(r);
  8198. } else
  8199. this.data.tt
  8200. ? (this.matteElement.appendChild(this.layerElement),
  8201. (t = this.matteElement),
  8202. (this.baseElement = this.matteElement))
  8203. : (this.baseElement = this.layerElement);
  8204. if (
  8205. (this.data.ln && this.layerElement.setAttribute('id', this.data.ln),
  8206. this.data.cl &&
  8207. this.layerElement.setAttribute('class', this.data.cl),
  8208. this.data.ty === 0 && !this.data.hd)
  8209. ) {
  8210. var i = createNS('clipPath'),
  8211. s = createNS('path');
  8212. s.setAttribute(
  8213. 'd',
  8214. 'M0,0 L' +
  8215. this.data.w +
  8216. ',0 L' +
  8217. this.data.w +
  8218. ',' +
  8219. this.data.h +
  8220. ' L0,' +
  8221. this.data.h +
  8222. 'z'
  8223. );
  8224. var a = createElementID();
  8225. if (
  8226. (i.setAttribute('id', a),
  8227. i.appendChild(s),
  8228. this.globalData.defs.appendChild(i),
  8229. this.checkMasks())
  8230. ) {
  8231. var o = createNS('g');
  8232. o.setAttribute(
  8233. 'clip-path',
  8234. 'url(' + getLocationHref() + '#' + a + ')'
  8235. ),
  8236. o.appendChild(this.layerElement),
  8237. (this.transformedElement = o),
  8238. t
  8239. ? t.appendChild(this.transformedElement)
  8240. : (this.baseElement = this.transformedElement);
  8241. } else
  8242. this.layerElement.setAttribute(
  8243. 'clip-path',
  8244. 'url(' + getLocationHref() + '#' + a + ')'
  8245. );
  8246. }
  8247. this.data.bm !== 0 && this.setBlendMode();
  8248. },
  8249. renderElement: function () {
  8250. this.finalTransform._localMatMdf &&
  8251. this.transformedElement.setAttribute(
  8252. 'transform',
  8253. this.finalTransform.localMat.to2dCSS()
  8254. ),
  8255. this.finalTransform._opMdf &&
  8256. this.transformedElement.setAttribute(
  8257. 'opacity',
  8258. this.finalTransform.localOpacity
  8259. );
  8260. },
  8261. destroyBaseElement: function () {
  8262. (this.layerElement = null),
  8263. (this.matteElement = null),
  8264. this.maskManager.destroy();
  8265. },
  8266. getBaseElement: function () {
  8267. return this.data.hd ? null : this.baseElement;
  8268. },
  8269. createRenderableComponents: function () {
  8270. (this.maskManager = new MaskElement(
  8271. this.data,
  8272. this,
  8273. this.globalData
  8274. )),
  8275. (this.renderableEffectsManager = new SVGEffects(this)),
  8276. this.searchEffectTransforms();
  8277. },
  8278. getMatte: function (t) {
  8279. if (
  8280. (this.matteMasks || (this.matteMasks = {}), !this.matteMasks[t])
  8281. ) {
  8282. var r = this.layerId + '_' + t,
  8283. i,
  8284. s,
  8285. a,
  8286. o;
  8287. if (t === 1 || t === 3) {
  8288. var n = createNS('mask');
  8289. n.setAttribute('id', r),
  8290. n.setAttribute('mask-type', t === 3 ? 'luminance' : 'alpha'),
  8291. (a = createNS('use')),
  8292. a.setAttributeNS(
  8293. 'http://www.w3.org/1999/xlink',
  8294. 'href',
  8295. '#' + this.layerId
  8296. ),
  8297. n.appendChild(a),
  8298. this.globalData.defs.appendChild(n),
  8299. !featureSupport.maskType &&
  8300. t === 1 &&
  8301. (n.setAttribute('mask-type', 'luminance'),
  8302. (i = createElementID()),
  8303. (s = filtersFactory.createFilter(i)),
  8304. this.globalData.defs.appendChild(s),
  8305. s.appendChild(filtersFactory.createAlphaToLuminanceFilter()),
  8306. (o = createNS('g')),
  8307. o.appendChild(a),
  8308. n.appendChild(o),
  8309. o.setAttribute(
  8310. 'filter',
  8311. 'url(' + getLocationHref() + '#' + i + ')'
  8312. ));
  8313. } else if (t === 2) {
  8314. var l = createNS('mask');
  8315. l.setAttribute('id', r), l.setAttribute('mask-type', 'alpha');
  8316. var f = createNS('g');
  8317. l.appendChild(f),
  8318. (i = createElementID()),
  8319. (s = filtersFactory.createFilter(i));
  8320. var g = createNS('feComponentTransfer');
  8321. g.setAttribute('in', 'SourceGraphic'), s.appendChild(g);
  8322. var S = createNS('feFuncA');
  8323. S.setAttribute('type', 'table'),
  8324. S.setAttribute('tableValues', '1.0 0.0'),
  8325. g.appendChild(S),
  8326. this.globalData.defs.appendChild(s);
  8327. var c = createNS('rect');
  8328. c.setAttribute('width', this.comp.data.w),
  8329. c.setAttribute('height', this.comp.data.h),
  8330. c.setAttribute('x', '0'),
  8331. c.setAttribute('y', '0'),
  8332. c.setAttribute('fill', '#ffffff'),
  8333. c.setAttribute('opacity', '0'),
  8334. f.setAttribute(
  8335. 'filter',
  8336. 'url(' + getLocationHref() + '#' + i + ')'
  8337. ),
  8338. f.appendChild(c),
  8339. (a = createNS('use')),
  8340. a.setAttributeNS(
  8341. 'http://www.w3.org/1999/xlink',
  8342. 'href',
  8343. '#' + this.layerId
  8344. ),
  8345. f.appendChild(a),
  8346. featureSupport.maskType ||
  8347. (l.setAttribute('mask-type', 'luminance'),
  8348. s.appendChild(filtersFactory.createAlphaToLuminanceFilter()),
  8349. (o = createNS('g')),
  8350. f.appendChild(c),
  8351. o.appendChild(this.layerElement),
  8352. f.appendChild(o)),
  8353. this.globalData.defs.appendChild(l);
  8354. }
  8355. this.matteMasks[t] = r;
  8356. }
  8357. return this.matteMasks[t];
  8358. },
  8359. setMatte: function (t) {
  8360. this.matteElement &&
  8361. this.matteElement.setAttribute(
  8362. 'mask',
  8363. 'url(' + getLocationHref() + '#' + t + ')'
  8364. );
  8365. }
  8366. };
  8367. function HierarchyElement() {}
  8368. HierarchyElement.prototype = {
  8369. initHierarchy: function () {
  8370. (this.hierarchy = []), (this._isParent = !1), this.checkParenting();
  8371. },
  8372. setHierarchy: function (t) {
  8373. this.hierarchy = t;
  8374. },
  8375. setAsParent: function () {
  8376. this._isParent = !0;
  8377. },
  8378. checkParenting: function () {
  8379. this.data.parent !== void 0 &&
  8380. this.comp.buildElementParenting(this, this.data.parent, []);
  8381. }
  8382. };
  8383. function RenderableDOMElement() {}
  8384. (function () {
  8385. var e = {
  8386. initElement: function (r, i, s) {
  8387. this.initFrame(),
  8388. this.initBaseData(r, i, s),
  8389. this.initTransform(r, i, s),
  8390. this.initHierarchy(),
  8391. this.initRenderable(),
  8392. this.initRendererElement(),
  8393. this.createContainerElements(),
  8394. this.createRenderableComponents(),
  8395. this.createContent(),
  8396. this.hide();
  8397. },
  8398. hide: function () {
  8399. if (!this.hidden && (!this.isInRange || this.isTransparent)) {
  8400. var r = this.baseElement || this.layerElement;
  8401. (r.style.display = 'none'), (this.hidden = !0);
  8402. }
  8403. },
  8404. show: function () {
  8405. if (this.isInRange && !this.isTransparent) {
  8406. if (!this.data.hd) {
  8407. var r = this.baseElement || this.layerElement;
  8408. r.style.display = 'block';
  8409. }
  8410. (this.hidden = !1), (this._isFirstFrame = !0);
  8411. }
  8412. },
  8413. renderFrame: function () {
  8414. this.data.hd ||
  8415. this.hidden ||
  8416. (this.renderTransform(),
  8417. this.renderRenderable(),
  8418. this.renderLocalTransform(),
  8419. this.renderElement(),
  8420. this.renderInnerContent(),
  8421. this._isFirstFrame && (this._isFirstFrame = !1));
  8422. },
  8423. renderInnerContent: function () {},
  8424. prepareFrame: function (r) {
  8425. (this._mdf = !1),
  8426. this.prepareRenderableFrame(r),
  8427. this.prepareProperties(r, this.isInRange),
  8428. this.checkTransparency();
  8429. },
  8430. destroy: function () {
  8431. (this.innerElem = null), this.destroyBaseElement();
  8432. }
  8433. };
  8434. extendPrototype(
  8435. [RenderableElement, createProxyFunction(e)],
  8436. RenderableDOMElement
  8437. );
  8438. })();
  8439. function IImageElement(e, t, r) {
  8440. (this.assetData = t.getAssetData(e.refId)),
  8441. this.assetData &&
  8442. this.assetData.sid &&
  8443. (this.assetData = t.slotManager.getProp(this.assetData)),
  8444. this.initElement(e, t, r),
  8445. (this.sourceRect = {
  8446. top: 0,
  8447. left: 0,
  8448. width: this.assetData.w,
  8449. height: this.assetData.h
  8450. });
  8451. }
  8452. extendPrototype(
  8453. [
  8454. BaseElement,
  8455. TransformElement,
  8456. SVGBaseElement,
  8457. HierarchyElement,
  8458. FrameElement,
  8459. RenderableDOMElement
  8460. ],
  8461. IImageElement
  8462. ),
  8463. (IImageElement.prototype.createContent = function () {
  8464. var e = this.globalData.getAssetsPath(this.assetData);
  8465. (this.innerElem = createNS('image')),
  8466. this.innerElem.setAttribute('width', this.assetData.w + 'px'),
  8467. this.innerElem.setAttribute('height', this.assetData.h + 'px'),
  8468. this.innerElem.setAttribute(
  8469. 'preserveAspectRatio',
  8470. this.assetData.pr ||
  8471. this.globalData.renderConfig.imagePreserveAspectRatio
  8472. ),
  8473. this.innerElem.setAttributeNS(
  8474. 'http://www.w3.org/1999/xlink',
  8475. 'href',
  8476. e
  8477. ),
  8478. this.layerElement.appendChild(this.innerElem);
  8479. }),
  8480. (IImageElement.prototype.sourceRectAtTime = function () {
  8481. return this.sourceRect;
  8482. });
  8483. function ProcessedElement(e, t) {
  8484. (this.elem = e), (this.pos = t);
  8485. }
  8486. function IShapeElement() {}
  8487. IShapeElement.prototype = {
  8488. addShapeToModifiers: function (t) {
  8489. var r,
  8490. i = this.shapeModifiers.length;
  8491. for (r = 0; r < i; r += 1) this.shapeModifiers[r].addShape(t);
  8492. },
  8493. isShapeInAnimatedModifiers: function (t) {
  8494. for (var r = 0, i = this.shapeModifiers.length; r < i; )
  8495. if (this.shapeModifiers[r].isAnimatedWithShape(t)) return !0;
  8496. return !1;
  8497. },
  8498. renderModifiers: function () {
  8499. if (this.shapeModifiers.length) {
  8500. var t,
  8501. r = this.shapes.length;
  8502. for (t = 0; t < r; t += 1) this.shapes[t].sh.reset();
  8503. r = this.shapeModifiers.length;
  8504. var i;
  8505. for (
  8506. t = r - 1;
  8507. t >= 0 &&
  8508. ((i = this.shapeModifiers[t].processShapes(this._isFirstFrame)),
  8509. !i);
  8510. t -= 1
  8511. );
  8512. }
  8513. },
  8514. searchProcessedElement: function (t) {
  8515. for (var r = this.processedElements, i = 0, s = r.length; i < s; ) {
  8516. if (r[i].elem === t) return r[i].pos;
  8517. i += 1;
  8518. }
  8519. return 0;
  8520. },
  8521. addProcessedElement: function (t, r) {
  8522. for (var i = this.processedElements, s = i.length; s; )
  8523. if (((s -= 1), i[s].elem === t)) {
  8524. i[s].pos = r;
  8525. return;
  8526. }
  8527. i.push(new ProcessedElement(t, r));
  8528. },
  8529. prepareFrame: function (t) {
  8530. this.prepareRenderableFrame(t),
  8531. this.prepareProperties(t, this.isInRange);
  8532. }
  8533. };
  8534. var lineCapEnum = { 1: 'butt', 2: 'round', 3: 'square' },
  8535. lineJoinEnum = { 1: 'miter', 2: 'round', 3: 'bevel' };
  8536. function SVGShapeData(e, t, r) {
  8537. (this.caches = []),
  8538. (this.styles = []),
  8539. (this.transformers = e),
  8540. (this.lStr = ''),
  8541. (this.sh = r),
  8542. (this.lvl = t),
  8543. (this._isAnimated = !!r.k);
  8544. for (var i = 0, s = e.length; i < s; ) {
  8545. if (e[i].mProps.dynamicProperties.length) {
  8546. this._isAnimated = !0;
  8547. break;
  8548. }
  8549. i += 1;
  8550. }
  8551. }
  8552. SVGShapeData.prototype.setAsAnimated = function () {
  8553. this._isAnimated = !0;
  8554. };
  8555. function SVGStyleData(e, t) {
  8556. (this.data = e),
  8557. (this.type = e.ty),
  8558. (this.d = ''),
  8559. (this.lvl = t),
  8560. (this._mdf = !1),
  8561. (this.closed = e.hd === !0),
  8562. (this.pElem = createNS('path')),
  8563. (this.msElem = null);
  8564. }
  8565. SVGStyleData.prototype.reset = function () {
  8566. (this.d = ''), (this._mdf = !1);
  8567. };
  8568. function DashProperty(e, t, r, i) {
  8569. (this.elem = e),
  8570. (this.frameId = -1),
  8571. (this.dataProps = createSizedArray(t.length)),
  8572. (this.renderer = r),
  8573. (this.k = !1),
  8574. (this.dashStr = ''),
  8575. (this.dashArray = createTypedArray(
  8576. 'float32',
  8577. t.length ? t.length - 1 : 0
  8578. )),
  8579. (this.dashoffset = createTypedArray('float32', 1)),
  8580. this.initDynamicPropertyContainer(i);
  8581. var s,
  8582. a = t.length || 0,
  8583. o;
  8584. for (s = 0; s < a; s += 1)
  8585. (o = PropertyFactory.getProp(e, t[s].v, 0, 0, this)),
  8586. (this.k = o.k || this.k),
  8587. (this.dataProps[s] = { n: t[s].n, p: o });
  8588. this.k || this.getValue(!0), (this._isAnimated = this.k);
  8589. }
  8590. (DashProperty.prototype.getValue = function (e) {
  8591. if (
  8592. !(this.elem.globalData.frameId === this.frameId && !e) &&
  8593. ((this.frameId = this.elem.globalData.frameId),
  8594. this.iterateDynamicProperties(),
  8595. (this._mdf = this._mdf || e),
  8596. this._mdf)
  8597. ) {
  8598. var t = 0,
  8599. r = this.dataProps.length;
  8600. for (
  8601. this.renderer === 'svg' && (this.dashStr = ''), t = 0;
  8602. t < r;
  8603. t += 1
  8604. )
  8605. this.dataProps[t].n !== 'o'
  8606. ? this.renderer === 'svg'
  8607. ? (this.dashStr += ' ' + this.dataProps[t].p.v)
  8608. : (this.dashArray[t] = this.dataProps[t].p.v)
  8609. : (this.dashoffset[0] = this.dataProps[t].p.v);
  8610. }
  8611. }),
  8612. extendPrototype([DynamicPropertyContainer], DashProperty);
  8613. function SVGStrokeStyleData(e, t, r) {
  8614. this.initDynamicPropertyContainer(e),
  8615. (this.getValue = this.iterateDynamicProperties),
  8616. (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
  8617. (this.w = PropertyFactory.getProp(e, t.w, 0, null, this)),
  8618. (this.d = new DashProperty(e, t.d || {}, 'svg', this)),
  8619. (this.c = PropertyFactory.getProp(e, t.c, 1, 255, this)),
  8620. (this.style = r),
  8621. (this._isAnimated = !!this._isAnimated);
  8622. }
  8623. extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
  8624. function SVGFillStyleData(e, t, r) {
  8625. this.initDynamicPropertyContainer(e),
  8626. (this.getValue = this.iterateDynamicProperties),
  8627. (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
  8628. (this.c = PropertyFactory.getProp(e, t.c, 1, 255, this)),
  8629. (this.style = r);
  8630. }
  8631. extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
  8632. function SVGNoStyleData(e, t, r) {
  8633. this.initDynamicPropertyContainer(e),
  8634. (this.getValue = this.iterateDynamicProperties),
  8635. (this.style = r);
  8636. }
  8637. extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
  8638. function GradientProperty(e, t, r) {
  8639. (this.data = t), (this.c = createTypedArray('uint8c', t.p * 4));
  8640. var i = t.k.k[0].s
  8641. ? t.k.k[0].s.length - t.p * 4
  8642. : t.k.k.length - t.p * 4;
  8643. (this.o = createTypedArray('float32', i)),
  8644. (this._cmdf = !1),
  8645. (this._omdf = !1),
  8646. (this._collapsable = this.checkCollapsable()),
  8647. (this._hasOpacity = i),
  8648. this.initDynamicPropertyContainer(r),
  8649. (this.prop = PropertyFactory.getProp(e, t.k, 1, null, this)),
  8650. (this.k = this.prop.k),
  8651. this.getValue(!0);
  8652. }
  8653. (GradientProperty.prototype.comparePoints = function (e, t) {
  8654. for (var r = 0, i = this.o.length / 2, s; r < i; ) {
  8655. if (((s = Math.abs(e[r * 4] - e[t * 4 + r * 2])), s > 0.01))
  8656. return !1;
  8657. r += 1;
  8658. }
  8659. return !0;
  8660. }),
  8661. (GradientProperty.prototype.checkCollapsable = function () {
  8662. if (this.o.length / 2 !== this.c.length / 4) return !1;
  8663. if (this.data.k.k[0].s)
  8664. for (var e = 0, t = this.data.k.k.length; e < t; ) {
  8665. if (!this.comparePoints(this.data.k.k[e].s, this.data.p))
  8666. return !1;
  8667. e += 1;
  8668. }
  8669. else if (!this.comparePoints(this.data.k.k, this.data.p)) return !1;
  8670. return !0;
  8671. }),
  8672. (GradientProperty.prototype.getValue = function (e) {
  8673. if (
  8674. (this.prop.getValue(),
  8675. (this._mdf = !1),
  8676. (this._cmdf = !1),
  8677. (this._omdf = !1),
  8678. this.prop._mdf || e)
  8679. ) {
  8680. var t,
  8681. r = this.data.p * 4,
  8682. i,
  8683. s;
  8684. for (t = 0; t < r; t += 1)
  8685. (i = t % 4 === 0 ? 100 : 255),
  8686. (s = Math.round(this.prop.v[t] * i)),
  8687. this.c[t] !== s && ((this.c[t] = s), (this._cmdf = !e));
  8688. if (this.o.length)
  8689. for (r = this.prop.v.length, t = this.data.p * 4; t < r; t += 1)
  8690. (i = t % 2 === 0 ? 100 : 1),
  8691. (s =
  8692. t % 2 === 0
  8693. ? Math.round(this.prop.v[t] * 100)
  8694. : this.prop.v[t]),
  8695. this.o[t - this.data.p * 4] !== s &&
  8696. ((this.o[t - this.data.p * 4] = s), (this._omdf = !e));
  8697. this._mdf = !e;
  8698. }
  8699. }),
  8700. extendPrototype([DynamicPropertyContainer], GradientProperty);
  8701. function SVGGradientFillStyleData(e, t, r) {
  8702. this.initDynamicPropertyContainer(e),
  8703. (this.getValue = this.iterateDynamicProperties),
  8704. this.initGradientData(e, t, r);
  8705. }
  8706. (SVGGradientFillStyleData.prototype.initGradientData = function (
  8707. e,
  8708. t,
  8709. r
  8710. ) {
  8711. (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
  8712. (this.s = PropertyFactory.getProp(e, t.s, 1, null, this)),
  8713. (this.e = PropertyFactory.getProp(e, t.e, 1, null, this)),
  8714. (this.h = PropertyFactory.getProp(e, t.h || { k: 0 }, 0, 0.01, this)),
  8715. (this.a = PropertyFactory.getProp(
  8716. e,
  8717. t.a || { k: 0 },
  8718. 0,
  8719. degToRads,
  8720. this
  8721. )),
  8722. (this.g = new GradientProperty(e, t.g, this)),
  8723. (this.style = r),
  8724. (this.stops = []),
  8725. this.setGradientData(r.pElem, t),
  8726. this.setGradientOpacity(t, r),
  8727. (this._isAnimated = !!this._isAnimated);
  8728. }),
  8729. (SVGGradientFillStyleData.prototype.setGradientData = function (e, t) {
  8730. var r = createElementID(),
  8731. i = createNS(t.t === 1 ? 'linearGradient' : 'radialGradient');
  8732. i.setAttribute('id', r),
  8733. i.setAttribute('spreadMethod', 'pad'),
  8734. i.setAttribute('gradientUnits', 'userSpaceOnUse');
  8735. var s = [],
  8736. a,
  8737. o,
  8738. n;
  8739. for (n = t.g.p * 4, o = 0; o < n; o += 4)
  8740. (a = createNS('stop')), i.appendChild(a), s.push(a);
  8741. e.setAttribute(
  8742. t.ty === 'gf' ? 'fill' : 'stroke',
  8743. 'url(' + getLocationHref() + '#' + r + ')'
  8744. ),
  8745. (this.gf = i),
  8746. (this.cst = s);
  8747. }),
  8748. (SVGGradientFillStyleData.prototype.setGradientOpacity = function (
  8749. e,
  8750. t
  8751. ) {
  8752. if (this.g._hasOpacity && !this.g._collapsable) {
  8753. var r,
  8754. i,
  8755. s,
  8756. a = createNS('mask'),
  8757. o = createNS('path');
  8758. a.appendChild(o);
  8759. var n = createElementID(),
  8760. l = createElementID();
  8761. a.setAttribute('id', l);
  8762. var f = createNS(e.t === 1 ? 'linearGradient' : 'radialGradient');
  8763. f.setAttribute('id', n),
  8764. f.setAttribute('spreadMethod', 'pad'),
  8765. f.setAttribute('gradientUnits', 'userSpaceOnUse'),
  8766. (s = e.g.k.k[0].s ? e.g.k.k[0].s.length : e.g.k.k.length);
  8767. var g = this.stops;
  8768. for (i = e.g.p * 4; i < s; i += 2)
  8769. (r = createNS('stop')),
  8770. r.setAttribute('stop-color', 'rgb(255,255,255)'),
  8771. f.appendChild(r),
  8772. g.push(r);
  8773. o.setAttribute(
  8774. e.ty === 'gf' ? 'fill' : 'stroke',
  8775. 'url(' + getLocationHref() + '#' + n + ')'
  8776. ),
  8777. e.ty === 'gs' &&
  8778. (o.setAttribute('stroke-linecap', lineCapEnum[e.lc || 2]),
  8779. o.setAttribute('stroke-linejoin', lineJoinEnum[e.lj || 2]),
  8780. e.lj === 1 && o.setAttribute('stroke-miterlimit', e.ml)),
  8781. (this.of = f),
  8782. (this.ms = a),
  8783. (this.ost = g),
  8784. (this.maskId = l),
  8785. (t.msElem = o);
  8786. }
  8787. }),
  8788. extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
  8789. function SVGGradientStrokeStyleData(e, t, r) {
  8790. this.initDynamicPropertyContainer(e),
  8791. (this.getValue = this.iterateDynamicProperties),
  8792. (this.w = PropertyFactory.getProp(e, t.w, 0, null, this)),
  8793. (this.d = new DashProperty(e, t.d || {}, 'svg', this)),
  8794. this.initGradientData(e, t, r),
  8795. (this._isAnimated = !!this._isAnimated);
  8796. }
  8797. extendPrototype(
  8798. [SVGGradientFillStyleData, DynamicPropertyContainer],
  8799. SVGGradientStrokeStyleData
  8800. );
  8801. function ShapeGroupData() {
  8802. (this.it = []), (this.prevViewData = []), (this.gr = createNS('g'));
  8803. }
  8804. function SVGTransformData(e, t, r) {
  8805. (this.transform = { mProps: e, op: t, container: r }),
  8806. (this.elements = []),
  8807. (this._isAnimated =
  8808. this.transform.mProps.dynamicProperties.length ||
  8809. this.transform.op.effectsSequence.length);
  8810. }
  8811. var buildShapeString = function (t, r, i, s) {
  8812. if (r === 0) return '';
  8813. var a = t.o,
  8814. o = t.i,
  8815. n = t.v,
  8816. l,
  8817. f = ' M' + s.applyToPointStringified(n[0][0], n[0][1]);
  8818. for (l = 1; l < r; l += 1)
  8819. f +=
  8820. ' C' +
  8821. s.applyToPointStringified(a[l - 1][0], a[l - 1][1]) +
  8822. ' ' +
  8823. s.applyToPointStringified(o[l][0], o[l][1]) +
  8824. ' ' +
  8825. s.applyToPointStringified(n[l][0], n[l][1]);
  8826. return (
  8827. i &&
  8828. r &&
  8829. ((f +=
  8830. ' C' +
  8831. s.applyToPointStringified(a[l - 1][0], a[l - 1][1]) +
  8832. ' ' +
  8833. s.applyToPointStringified(o[0][0], o[0][1]) +
  8834. ' ' +
  8835. s.applyToPointStringified(n[0][0], n[0][1])),
  8836. (f += 'z')),
  8837. f
  8838. );
  8839. },
  8840. SVGElementsRenderer = (function () {
  8841. var e = new Matrix(),
  8842. t = new Matrix(),
  8843. r = { createRenderFunction: i };
  8844. function i(S) {
  8845. switch (S.ty) {
  8846. case 'fl':
  8847. return n;
  8848. case 'gf':
  8849. return f;
  8850. case 'gs':
  8851. return l;
  8852. case 'st':
  8853. return g;
  8854. case 'sh':
  8855. case 'el':
  8856. case 'rc':
  8857. case 'sr':
  8858. return o;
  8859. case 'tr':
  8860. return s;
  8861. case 'no':
  8862. return a;
  8863. default:
  8864. return null;
  8865. }
  8866. }
  8867. function s(S, c, P) {
  8868. (P || c.transform.op._mdf) &&
  8869. c.transform.container.setAttribute('opacity', c.transform.op.v),
  8870. (P || c.transform.mProps._mdf) &&
  8871. c.transform.container.setAttribute(
  8872. 'transform',
  8873. c.transform.mProps.v.to2dCSS()
  8874. );
  8875. }
  8876. function a() {}
  8877. function o(S, c, P) {
  8878. var d,
  8879. p,
  8880. x,
  8881. u,
  8882. y,
  8883. m,
  8884. A = c.styles.length,
  8885. T = c.lvl,
  8886. E,
  8887. _,
  8888. I,
  8889. B;
  8890. for (m = 0; m < A; m += 1) {
  8891. if (((u = c.sh._mdf || P), c.styles[m].lvl < T)) {
  8892. for (
  8893. _ = t.reset(),
  8894. I = T - c.styles[m].lvl,
  8895. B = c.transformers.length - 1;
  8896. !u && I > 0;
  8897. )
  8898. (u = c.transformers[B].mProps._mdf || u), (I -= 1), (B -= 1);
  8899. if (u)
  8900. for (
  8901. I = T - c.styles[m].lvl, B = c.transformers.length - 1;
  8902. I > 0;
  8903. )
  8904. _.multiply(c.transformers[B].mProps.v), (I -= 1), (B -= 1);
  8905. } else _ = e;
  8906. if (((E = c.sh.paths), (p = E._length), u)) {
  8907. for (x = '', d = 0; d < p; d += 1)
  8908. (y = E.shapes[d]),
  8909. y &&
  8910. y._length &&
  8911. (x += buildShapeString(y, y._length, y.c, _));
  8912. c.caches[m] = x;
  8913. } else x = c.caches[m];
  8914. (c.styles[m].d += S.hd === !0 ? '' : x),
  8915. (c.styles[m]._mdf = u || c.styles[m]._mdf);
  8916. }
  8917. }
  8918. function n(S, c, P) {
  8919. var d = c.style;
  8920. (c.c._mdf || P) &&
  8921. d.pElem.setAttribute(
  8922. 'fill',
  8923. 'rgb(' +
  8924. bmFloor(c.c.v[0]) +
  8925. ',' +
  8926. bmFloor(c.c.v[1]) +
  8927. ',' +
  8928. bmFloor(c.c.v[2]) +
  8929. ')'
  8930. ),
  8931. (c.o._mdf || P) && d.pElem.setAttribute('fill-opacity', c.o.v);
  8932. }
  8933. function l(S, c, P) {
  8934. f(S, c, P), g(S, c, P);
  8935. }
  8936. function f(S, c, P) {
  8937. var d = c.gf,
  8938. p = c.g._hasOpacity,
  8939. x = c.s.v,
  8940. u = c.e.v;
  8941. if (c.o._mdf || P) {
  8942. var y = S.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
  8943. c.style.pElem.setAttribute(y, c.o.v);
  8944. }
  8945. if (c.s._mdf || P) {
  8946. var m = S.t === 1 ? 'x1' : 'cx',
  8947. A = m === 'x1' ? 'y1' : 'cy';
  8948. d.setAttribute(m, x[0]),
  8949. d.setAttribute(A, x[1]),
  8950. p &&
  8951. !c.g._collapsable &&
  8952. (c.of.setAttribute(m, x[0]), c.of.setAttribute(A, x[1]));
  8953. }
  8954. var T, E, _, I;
  8955. if (c.g._cmdf || P) {
  8956. T = c.cst;
  8957. var B = c.g.c;
  8958. for (_ = T.length, E = 0; E < _; E += 1)
  8959. (I = T[E]),
  8960. I.setAttribute('offset', B[E * 4] + '%'),
  8961. I.setAttribute(
  8962. 'stop-color',
  8963. 'rgb(' +
  8964. B[E * 4 + 1] +
  8965. ',' +
  8966. B[E * 4 + 2] +
  8967. ',' +
  8968. B[E * 4 + 3] +
  8969. ')'
  8970. );
  8971. }
  8972. if (p && (c.g._omdf || P)) {
  8973. var z = c.g.o;
  8974. for (
  8975. c.g._collapsable ? (T = c.cst) : (T = c.ost),
  8976. _ = T.length,
  8977. E = 0;
  8978. E < _;
  8979. E += 1
  8980. )
  8981. (I = T[E]),
  8982. c.g._collapsable || I.setAttribute('offset', z[E * 2] + '%'),
  8983. I.setAttribute('stop-opacity', z[E * 2 + 1]);
  8984. }
  8985. if (S.t === 1)
  8986. (c.e._mdf || P) &&
  8987. (d.setAttribute('x2', u[0]),
  8988. d.setAttribute('y2', u[1]),
  8989. p &&
  8990. !c.g._collapsable &&
  8991. (c.of.setAttribute('x2', u[0]),
  8992. c.of.setAttribute('y2', u[1])));
  8993. else {
  8994. var G;
  8995. if (
  8996. ((c.s._mdf || c.e._mdf || P) &&
  8997. ((G = Math.sqrt(
  8998. Math.pow(x[0] - u[0], 2) + Math.pow(x[1] - u[1], 2)
  8999. )),
  9000. d.setAttribute('r', G),
  9001. p && !c.g._collapsable && c.of.setAttribute('r', G)),
  9002. c.e._mdf || c.h._mdf || c.a._mdf || P)
  9003. ) {
  9004. G ||
  9005. (G = Math.sqrt(
  9006. Math.pow(x[0] - u[0], 2) + Math.pow(x[1] - u[1], 2)
  9007. ));
  9008. var R = Math.atan2(u[1] - x[1], u[0] - x[0]),
  9009. W = c.h.v;
  9010. W >= 1 ? (W = 0.99) : W <= -1 && (W = -0.99);
  9011. var H = G * W,
  9012. N = Math.cos(R + c.a.v) * H + x[0],
  9013. M = Math.sin(R + c.a.v) * H + x[1];
  9014. d.setAttribute('fx', N),
  9015. d.setAttribute('fy', M),
  9016. p &&
  9017. !c.g._collapsable &&
  9018. (c.of.setAttribute('fx', N), c.of.setAttribute('fy', M));
  9019. }
  9020. }
  9021. }
  9022. function g(S, c, P) {
  9023. var d = c.style,
  9024. p = c.d;
  9025. p &&
  9026. (p._mdf || P) &&
  9027. p.dashStr &&
  9028. (d.pElem.setAttribute('stroke-dasharray', p.dashStr),
  9029. d.pElem.setAttribute('stroke-dashoffset', p.dashoffset[0])),
  9030. c.c &&
  9031. (c.c._mdf || P) &&
  9032. d.pElem.setAttribute(
  9033. 'stroke',
  9034. 'rgb(' +
  9035. bmFloor(c.c.v[0]) +
  9036. ',' +
  9037. bmFloor(c.c.v[1]) +
  9038. ',' +
  9039. bmFloor(c.c.v[2]) +
  9040. ')'
  9041. ),
  9042. (c.o._mdf || P) && d.pElem.setAttribute('stroke-opacity', c.o.v),
  9043. (c.w._mdf || P) &&
  9044. (d.pElem.setAttribute('stroke-width', c.w.v),
  9045. d.msElem && d.msElem.setAttribute('stroke-width', c.w.v));
  9046. }
  9047. return r;
  9048. })();
  9049. function SVGShapeElement(e, t, r) {
  9050. (this.shapes = []),
  9051. (this.shapesData = e.shapes),
  9052. (this.stylesList = []),
  9053. (this.shapeModifiers = []),
  9054. (this.itemsData = []),
  9055. (this.processedElements = []),
  9056. (this.animatedContents = []),
  9057. this.initElement(e, t, r),
  9058. (this.prevViewData = []);
  9059. }
  9060. extendPrototype(
  9061. [
  9062. BaseElement,
  9063. TransformElement,
  9064. SVGBaseElement,
  9065. IShapeElement,
  9066. HierarchyElement,
  9067. FrameElement,
  9068. RenderableDOMElement
  9069. ],
  9070. SVGShapeElement
  9071. ),
  9072. (SVGShapeElement.prototype.initSecondaryElement = function () {}),
  9073. (SVGShapeElement.prototype.identityMatrix = new Matrix()),
  9074. (SVGShapeElement.prototype.buildExpressionInterface = function () {}),
  9075. (SVGShapeElement.prototype.createContent = function () {
  9076. this.searchShapes(
  9077. this.shapesData,
  9078. this.itemsData,
  9079. this.prevViewData,
  9080. this.layerElement,
  9081. 0,
  9082. [],
  9083. !0
  9084. ),
  9085. this.filterUniqueShapes();
  9086. }),
  9087. (SVGShapeElement.prototype.filterUniqueShapes = function () {
  9088. var e,
  9089. t = this.shapes.length,
  9090. r,
  9091. i,
  9092. s = this.stylesList.length,
  9093. a,
  9094. o = [],
  9095. n = !1;
  9096. for (i = 0; i < s; i += 1) {
  9097. for (
  9098. a = this.stylesList[i], n = !1, o.length = 0, e = 0;
  9099. e < t;
  9100. e += 1
  9101. )
  9102. (r = this.shapes[e]),
  9103. r.styles.indexOf(a) !== -1 &&
  9104. (o.push(r), (n = r._isAnimated || n));
  9105. o.length > 1 && n && this.setShapesAsAnimated(o);
  9106. }
  9107. }),
  9108. (SVGShapeElement.prototype.setShapesAsAnimated = function (e) {
  9109. var t,
  9110. r = e.length;
  9111. for (t = 0; t < r; t += 1) e[t].setAsAnimated();
  9112. }),
  9113. (SVGShapeElement.prototype.createStyleElement = function (e, t) {
  9114. var r,
  9115. i = new SVGStyleData(e, t),
  9116. s = i.pElem;
  9117. if (e.ty === 'st') r = new SVGStrokeStyleData(this, e, i);
  9118. else if (e.ty === 'fl') r = new SVGFillStyleData(this, e, i);
  9119. else if (e.ty === 'gf' || e.ty === 'gs') {
  9120. var a =
  9121. e.ty === 'gf'
  9122. ? SVGGradientFillStyleData
  9123. : SVGGradientStrokeStyleData;
  9124. (r = new a(this, e, i)),
  9125. this.globalData.defs.appendChild(r.gf),
  9126. r.maskId &&
  9127. (this.globalData.defs.appendChild(r.ms),
  9128. this.globalData.defs.appendChild(r.of),
  9129. s.setAttribute(
  9130. 'mask',
  9131. 'url(' + getLocationHref() + '#' + r.maskId + ')'
  9132. ));
  9133. } else e.ty === 'no' && (r = new SVGNoStyleData(this, e, i));
  9134. return (
  9135. (e.ty === 'st' || e.ty === 'gs') &&
  9136. (s.setAttribute('stroke-linecap', lineCapEnum[e.lc || 2]),
  9137. s.setAttribute('stroke-linejoin', lineJoinEnum[e.lj || 2]),
  9138. s.setAttribute('fill-opacity', '0'),
  9139. e.lj === 1 && s.setAttribute('stroke-miterlimit', e.ml)),
  9140. e.r === 2 && s.setAttribute('fill-rule', 'evenodd'),
  9141. e.ln && s.setAttribute('id', e.ln),
  9142. e.cl && s.setAttribute('class', e.cl),
  9143. e.bm && (s.style['mix-blend-mode'] = getBlendMode(e.bm)),
  9144. this.stylesList.push(i),
  9145. this.addToAnimatedContents(e, r),
  9146. r
  9147. );
  9148. }),
  9149. (SVGShapeElement.prototype.createGroupElement = function (e) {
  9150. var t = new ShapeGroupData();
  9151. return (
  9152. e.ln && t.gr.setAttribute('id', e.ln),
  9153. e.cl && t.gr.setAttribute('class', e.cl),
  9154. e.bm && (t.gr.style['mix-blend-mode'] = getBlendMode(e.bm)),
  9155. t
  9156. );
  9157. }),
  9158. (SVGShapeElement.prototype.createTransformElement = function (e, t) {
  9159. var r = TransformPropertyFactory.getTransformProperty(this, e, this),
  9160. i = new SVGTransformData(r, r.o, t);
  9161. return this.addToAnimatedContents(e, i), i;
  9162. }),
  9163. (SVGShapeElement.prototype.createShapeElement = function (e, t, r) {
  9164. var i = 4;
  9165. e.ty === 'rc'
  9166. ? (i = 5)
  9167. : e.ty === 'el'
  9168. ? (i = 6)
  9169. : e.ty === 'sr' && (i = 7);
  9170. var s = ShapePropertyFactory.getShapeProp(this, e, i, this),
  9171. a = new SVGShapeData(t, r, s);
  9172. return (
  9173. this.shapes.push(a),
  9174. this.addShapeToModifiers(a),
  9175. this.addToAnimatedContents(e, a),
  9176. a
  9177. );
  9178. }),
  9179. (SVGShapeElement.prototype.addToAnimatedContents = function (e, t) {
  9180. for (var r = 0, i = this.animatedContents.length; r < i; ) {
  9181. if (this.animatedContents[r].element === t) return;
  9182. r += 1;
  9183. }
  9184. this.animatedContents.push({
  9185. fn: SVGElementsRenderer.createRenderFunction(e),
  9186. element: t,
  9187. data: e
  9188. });
  9189. }),
  9190. (SVGShapeElement.prototype.setElementStyles = function (e) {
  9191. var t = e.styles,
  9192. r,
  9193. i = this.stylesList.length;
  9194. for (r = 0; r < i; r += 1)
  9195. this.stylesList[r].closed || t.push(this.stylesList[r]);
  9196. }),
  9197. (SVGShapeElement.prototype.reloadShapes = function () {
  9198. this._isFirstFrame = !0;
  9199. var e,
  9200. t = this.itemsData.length;
  9201. for (e = 0; e < t; e += 1) this.prevViewData[e] = this.itemsData[e];
  9202. for (
  9203. this.searchShapes(
  9204. this.shapesData,
  9205. this.itemsData,
  9206. this.prevViewData,
  9207. this.layerElement,
  9208. 0,
  9209. [],
  9210. !0
  9211. ),
  9212. this.filterUniqueShapes(),
  9213. t = this.dynamicProperties.length,
  9214. e = 0;
  9215. e < t;
  9216. e += 1
  9217. )
  9218. this.dynamicProperties[e].getValue();
  9219. this.renderModifiers();
  9220. }),
  9221. (SVGShapeElement.prototype.searchShapes = function (
  9222. e,
  9223. t,
  9224. r,
  9225. i,
  9226. s,
  9227. a,
  9228. o
  9229. ) {
  9230. var n = [].concat(a),
  9231. l,
  9232. f = e.length - 1,
  9233. g,
  9234. S,
  9235. c = [],
  9236. P = [],
  9237. d,
  9238. p,
  9239. x;
  9240. for (l = f; l >= 0; l -= 1) {
  9241. if (
  9242. ((x = this.searchProcessedElement(e[l])),
  9243. x ? (t[l] = r[x - 1]) : (e[l]._render = o),
  9244. e[l].ty === 'fl' ||
  9245. e[l].ty === 'st' ||
  9246. e[l].ty === 'gf' ||
  9247. e[l].ty === 'gs' ||
  9248. e[l].ty === 'no')
  9249. )
  9250. x
  9251. ? (t[l].style.closed = !1)
  9252. : (t[l] = this.createStyleElement(e[l], s)),
  9253. e[l]._render &&
  9254. t[l].style.pElem.parentNode !== i &&
  9255. i.appendChild(t[l].style.pElem),
  9256. c.push(t[l].style);
  9257. else if (e[l].ty === 'gr') {
  9258. if (!x) t[l] = this.createGroupElement(e[l]);
  9259. else
  9260. for (S = t[l].it.length, g = 0; g < S; g += 1)
  9261. t[l].prevViewData[g] = t[l].it[g];
  9262. this.searchShapes(
  9263. e[l].it,
  9264. t[l].it,
  9265. t[l].prevViewData,
  9266. t[l].gr,
  9267. s + 1,
  9268. n,
  9269. o
  9270. ),
  9271. e[l]._render &&
  9272. t[l].gr.parentNode !== i &&
  9273. i.appendChild(t[l].gr);
  9274. } else
  9275. e[l].ty === 'tr'
  9276. ? (x || (t[l] = this.createTransformElement(e[l], i)),
  9277. (d = t[l].transform),
  9278. n.push(d))
  9279. : e[l].ty === 'sh' ||
  9280. e[l].ty === 'rc' ||
  9281. e[l].ty === 'el' ||
  9282. e[l].ty === 'sr'
  9283. ? (x || (t[l] = this.createShapeElement(e[l], n, s)),
  9284. this.setElementStyles(t[l]))
  9285. : e[l].ty === 'tm' ||
  9286. e[l].ty === 'rd' ||
  9287. e[l].ty === 'ms' ||
  9288. e[l].ty === 'pb' ||
  9289. e[l].ty === 'zz' ||
  9290. e[l].ty === 'op'
  9291. ? (x
  9292. ? ((p = t[l]), (p.closed = !1))
  9293. : ((p = ShapeModifiers.getModifier(e[l].ty)),
  9294. p.init(this, e[l]),
  9295. (t[l] = p),
  9296. this.shapeModifiers.push(p)),
  9297. P.push(p))
  9298. : e[l].ty === 'rp' &&
  9299. (x
  9300. ? ((p = t[l]), (p.closed = !0))
  9301. : ((p = ShapeModifiers.getModifier(e[l].ty)),
  9302. (t[l] = p),
  9303. p.init(this, e, l, t),
  9304. this.shapeModifiers.push(p),
  9305. (o = !1)),
  9306. P.push(p));
  9307. this.addProcessedElement(e[l], l + 1);
  9308. }
  9309. for (f = c.length, l = 0; l < f; l += 1) c[l].closed = !0;
  9310. for (f = P.length, l = 0; l < f; l += 1) P[l].closed = !0;
  9311. }),
  9312. (SVGShapeElement.prototype.renderInnerContent = function () {
  9313. this.renderModifiers();
  9314. var e,
  9315. t = this.stylesList.length;
  9316. for (e = 0; e < t; e += 1) this.stylesList[e].reset();
  9317. for (this.renderShape(), e = 0; e < t; e += 1)
  9318. (this.stylesList[e]._mdf || this._isFirstFrame) &&
  9319. (this.stylesList[e].msElem &&
  9320. (this.stylesList[e].msElem.setAttribute(
  9321. 'd',
  9322. this.stylesList[e].d
  9323. ),
  9324. (this.stylesList[e].d = 'M0 0' + this.stylesList[e].d)),
  9325. this.stylesList[e].pElem.setAttribute(
  9326. 'd',
  9327. this.stylesList[e].d || 'M0 0'
  9328. ));
  9329. }),
  9330. (SVGShapeElement.prototype.renderShape = function () {
  9331. var e,
  9332. t = this.animatedContents.length,
  9333. r;
  9334. for (e = 0; e < t; e += 1)
  9335. (r = this.animatedContents[e]),
  9336. (this._isFirstFrame || r.element._isAnimated) &&
  9337. r.data !== !0 &&
  9338. r.fn(r.data, r.element, this._isFirstFrame);
  9339. }),
  9340. (SVGShapeElement.prototype.destroy = function () {
  9341. this.destroyBaseElement(),
  9342. (this.shapesData = null),
  9343. (this.itemsData = null);
  9344. });
  9345. function LetterProps(e, t, r, i, s, a) {
  9346. (this.o = e),
  9347. (this.sw = t),
  9348. (this.sc = r),
  9349. (this.fc = i),
  9350. (this.m = s),
  9351. (this.p = a),
  9352. (this._mdf = { o: !0, sw: !!t, sc: !!r, fc: !!i, m: !0, p: !0 });
  9353. }
  9354. LetterProps.prototype.update = function (e, t, r, i, s, a) {
  9355. (this._mdf.o = !1),
  9356. (this._mdf.sw = !1),
  9357. (this._mdf.sc = !1),
  9358. (this._mdf.fc = !1),
  9359. (this._mdf.m = !1),
  9360. (this._mdf.p = !1);
  9361. var o = !1;
  9362. return (
  9363. this.o !== e && ((this.o = e), (this._mdf.o = !0), (o = !0)),
  9364. this.sw !== t && ((this.sw = t), (this._mdf.sw = !0), (o = !0)),
  9365. this.sc !== r && ((this.sc = r), (this._mdf.sc = !0), (o = !0)),
  9366. this.fc !== i && ((this.fc = i), (this._mdf.fc = !0), (o = !0)),
  9367. this.m !== s && ((this.m = s), (this._mdf.m = !0), (o = !0)),
  9368. a.length &&
  9369. (this.p[0] !== a[0] ||
  9370. this.p[1] !== a[1] ||
  9371. this.p[4] !== a[4] ||
  9372. this.p[5] !== a[5] ||
  9373. this.p[12] !== a[12] ||
  9374. this.p[13] !== a[13]) &&
  9375. ((this.p = a), (this._mdf.p = !0), (o = !0)),
  9376. o
  9377. );
  9378. };
  9379. function TextProperty(e, t) {
  9380. (this._frameId = initialDefaultFrame),
  9381. (this.pv = ''),
  9382. (this.v = ''),
  9383. (this.kf = !1),
  9384. (this._isFirstFrame = !0),
  9385. (this._mdf = !1),
  9386. t.d && t.d.sid && (t.d = e.globalData.slotManager.getProp(t.d)),
  9387. (this.data = t),
  9388. (this.elem = e),
  9389. (this.comp = this.elem.comp),
  9390. (this.keysIndex = 0),
  9391. (this.canResize = !1),
  9392. (this.minimumFontSize = 1),
  9393. (this.effectsSequence = []),
  9394. (this.currentData = {
  9395. ascent: 0,
  9396. boxWidth: this.defaultBoxWidth,
  9397. f: '',
  9398. fStyle: '',
  9399. fWeight: '',
  9400. fc: '',
  9401. j: '',
  9402. justifyOffset: '',
  9403. l: [],
  9404. lh: 0,
  9405. lineWidths: [],
  9406. ls: '',
  9407. of: '',
  9408. s: '',
  9409. sc: '',
  9410. sw: 0,
  9411. t: 0,
  9412. tr: 0,
  9413. sz: 0,
  9414. ps: null,
  9415. fillColorAnim: !1,
  9416. strokeColorAnim: !1,
  9417. strokeWidthAnim: !1,
  9418. yOffset: 0,
  9419. finalSize: 0,
  9420. finalText: [],
  9421. finalLineHeight: 0,
  9422. __complete: !1
  9423. }),
  9424. this.copyData(this.currentData, this.data.d.k[0].s),
  9425. this.searchProperty() || this.completeTextData(this.currentData);
  9426. }
  9427. (TextProperty.prototype.defaultBoxWidth = [0, 0]),
  9428. (TextProperty.prototype.copyData = function (e, t) {
  9429. for (var r in t)
  9430. Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
  9431. return e;
  9432. }),
  9433. (TextProperty.prototype.setCurrentData = function (e) {
  9434. e.__complete || this.completeTextData(e),
  9435. (this.currentData = e),
  9436. (this.currentData.boxWidth =
  9437. this.currentData.boxWidth || this.defaultBoxWidth),
  9438. (this._mdf = !0);
  9439. }),
  9440. (TextProperty.prototype.searchProperty = function () {
  9441. return this.searchKeyframes();
  9442. }),
  9443. (TextProperty.prototype.searchKeyframes = function () {
  9444. return (
  9445. (this.kf = this.data.d.k.length > 1),
  9446. this.kf && this.addEffect(this.getKeyframeValue.bind(this)),
  9447. this.kf
  9448. );
  9449. }),
  9450. (TextProperty.prototype.addEffect = function (e) {
  9451. this.effectsSequence.push(e), this.elem.addDynamicProperty(this);
  9452. }),
  9453. (TextProperty.prototype.getValue = function (e) {
  9454. if (
  9455. !(
  9456. (this.elem.globalData.frameId === this.frameId ||
  9457. !this.effectsSequence.length) &&
  9458. !e
  9459. )
  9460. ) {
  9461. this.currentData.t = this.data.d.k[this.keysIndex].s.t;
  9462. var t = this.currentData,
  9463. r = this.keysIndex;
  9464. if (this.lock) {
  9465. this.setCurrentData(this.currentData);
  9466. return;
  9467. }
  9468. (this.lock = !0), (this._mdf = !1);
  9469. var i,
  9470. s = this.effectsSequence.length,
  9471. a = e || this.data.d.k[this.keysIndex].s;
  9472. for (i = 0; i < s; i += 1)
  9473. r !== this.keysIndex
  9474. ? (a = this.effectsSequence[i](a, a.t))
  9475. : (a = this.effectsSequence[i](this.currentData, a.t));
  9476. t !== a && this.setCurrentData(a),
  9477. (this.v = this.currentData),
  9478. (this.pv = this.v),
  9479. (this.lock = !1),
  9480. (this.frameId = this.elem.globalData.frameId);
  9481. }
  9482. }),
  9483. (TextProperty.prototype.getKeyframeValue = function () {
  9484. for (
  9485. var e = this.data.d.k,
  9486. t = this.elem.comp.renderedFrame,
  9487. r = 0,
  9488. i = e.length;
  9489. r <= i - 1 && !(r === i - 1 || e[r + 1].t > t);
  9490. )
  9491. r += 1;
  9492. return (
  9493. this.keysIndex !== r && (this.keysIndex = r),
  9494. this.data.d.k[this.keysIndex].s
  9495. );
  9496. }),
  9497. (TextProperty.prototype.buildFinalText = function (e) {
  9498. for (
  9499. var t = [], r = 0, i = e.length, s, a, o = !1, n = !1, l = '';
  9500. r < i;
  9501. )
  9502. (o = n),
  9503. (n = !1),
  9504. (s = e.charCodeAt(r)),
  9505. (l = e.charAt(r)),
  9506. FontManager.isCombinedCharacter(s)
  9507. ? (o = !0)
  9508. : s >= 55296 && s <= 56319
  9509. ? FontManager.isRegionalFlag(e, r)
  9510. ? (l = e.substr(r, 14))
  9511. : ((a = e.charCodeAt(r + 1)),
  9512. a >= 56320 &&
  9513. a <= 57343 &&
  9514. (FontManager.isModifier(s, a)
  9515. ? ((l = e.substr(r, 2)), (o = !0))
  9516. : FontManager.isFlagEmoji(e.substr(r, 4))
  9517. ? (l = e.substr(r, 4))
  9518. : (l = e.substr(r, 2))))
  9519. : s > 56319
  9520. ? ((a = e.charCodeAt(r + 1)),
  9521. FontManager.isVariationSelector(s) && (o = !0))
  9522. : FontManager.isZeroWidthJoiner(s) && ((o = !0), (n = !0)),
  9523. o ? ((t[t.length - 1] += l), (o = !1)) : t.push(l),
  9524. (r += l.length);
  9525. return t;
  9526. }),
  9527. (TextProperty.prototype.completeTextData = function (e) {
  9528. e.__complete = !0;
  9529. var t = this.elem.globalData.fontManager,
  9530. r = this.data,
  9531. i = [],
  9532. s,
  9533. a,
  9534. o,
  9535. n = 0,
  9536. l,
  9537. f = r.m.g,
  9538. g = 0,
  9539. S = 0,
  9540. c = 0,
  9541. P = [],
  9542. d = 0,
  9543. p = 0,
  9544. x,
  9545. u,
  9546. y = t.getFontByName(e.f),
  9547. m,
  9548. A = 0,
  9549. T = getFontProperties(y);
  9550. (e.fWeight = T.weight),
  9551. (e.fStyle = T.style),
  9552. (e.finalSize = e.s),
  9553. (e.finalText = this.buildFinalText(e.t)),
  9554. (a = e.finalText.length),
  9555. (e.finalLineHeight = e.lh);
  9556. var E = (e.tr / 1e3) * e.finalSize,
  9557. _;
  9558. if (e.sz)
  9559. for (var I = !0, B = e.sz[0], z = e.sz[1], G, R; I; ) {
  9560. (R = this.buildFinalText(e.t)),
  9561. (G = 0),
  9562. (d = 0),
  9563. (a = R.length),
  9564. (E = (e.tr / 1e3) * e.finalSize);
  9565. var W = -1;
  9566. for (s = 0; s < a; s += 1)
  9567. (_ = R[s].charCodeAt(0)),
  9568. (o = !1),
  9569. R[s] === ' '
  9570. ? (W = s)
  9571. : (_ === 13 || _ === 3) &&
  9572. ((d = 0),
  9573. (o = !0),
  9574. (G += e.finalLineHeight || e.finalSize * 1.2)),
  9575. t.chars
  9576. ? ((m = t.getCharData(R[s], y.fStyle, y.fFamily)),
  9577. (A = o ? 0 : (m.w * e.finalSize) / 100))
  9578. : (A = t.measureText(R[s], e.f, e.finalSize)),
  9579. d + A > B && R[s] !== ' '
  9580. ? (W === -1 ? (a += 1) : (s = W),
  9581. (G += e.finalLineHeight || e.finalSize * 1.2),
  9582. R.splice(s, W === s ? 1 : 0, '\r'),
  9583. (W = -1),
  9584. (d = 0))
  9585. : ((d += A), (d += E));
  9586. (G += (y.ascent * e.finalSize) / 100),
  9587. this.canResize && e.finalSize > this.minimumFontSize && z < G
  9588. ? ((e.finalSize -= 1),
  9589. (e.finalLineHeight = (e.finalSize * e.lh) / e.s))
  9590. : ((e.finalText = R), (a = e.finalText.length), (I = !1));
  9591. }
  9592. (d = -E), (A = 0);
  9593. var H = 0,
  9594. N;
  9595. for (s = 0; s < a; s += 1)
  9596. if (
  9597. ((o = !1),
  9598. (N = e.finalText[s]),
  9599. (_ = N.charCodeAt(0)),
  9600. _ === 13 || _ === 3
  9601. ? ((H = 0),
  9602. P.push(d),
  9603. (p = d > p ? d : p),
  9604. (d = -2 * E),
  9605. (l = ''),
  9606. (o = !0),
  9607. (c += 1))
  9608. : (l = N),
  9609. t.chars
  9610. ? ((m = t.getCharData(
  9611. N,
  9612. y.fStyle,
  9613. t.getFontByName(e.f).fFamily
  9614. )),
  9615. (A = o ? 0 : (m.w * e.finalSize) / 100))
  9616. : (A = t.measureText(l, e.f, e.finalSize)),
  9617. N === ' ' ? (H += A + E) : ((d += A + E + H), (H = 0)),
  9618. i.push({
  9619. l: A,
  9620. an: A,
  9621. add: g,
  9622. n: o,
  9623. anIndexes: [],
  9624. val: l,
  9625. line: c,
  9626. animatorJustifyOffset: 0
  9627. }),
  9628. f == 2)
  9629. ) {
  9630. if (((g += A), l === '' || l === ' ' || s === a - 1)) {
  9631. for ((l === '' || l === ' ') && (g -= A); S <= s; )
  9632. (i[S].an = g), (i[S].ind = n), (i[S].extra = A), (S += 1);
  9633. (n += 1), (g = 0);
  9634. }
  9635. } else if (f == 3) {
  9636. if (((g += A), l === '' || s === a - 1)) {
  9637. for (l === '' && (g -= A); S <= s; )
  9638. (i[S].an = g), (i[S].ind = n), (i[S].extra = A), (S += 1);
  9639. (g = 0), (n += 1);
  9640. }
  9641. } else (i[n].ind = n), (i[n].extra = 0), (n += 1);
  9642. if (((e.l = i), (p = d > p ? d : p), P.push(d), e.sz))
  9643. (e.boxWidth = e.sz[0]), (e.justifyOffset = 0);
  9644. else
  9645. switch (((e.boxWidth = p), e.j)) {
  9646. case 1:
  9647. e.justifyOffset = -e.boxWidth;
  9648. break;
  9649. case 2:
  9650. e.justifyOffset = -e.boxWidth / 2;
  9651. break;
  9652. default:
  9653. e.justifyOffset = 0;
  9654. }
  9655. e.lineWidths = P;
  9656. var M = r.a,
  9657. k,
  9658. b;
  9659. u = M.length;
  9660. var C,
  9661. L,
  9662. F = [];
  9663. for (x = 0; x < u; x += 1) {
  9664. for (
  9665. k = M[x],
  9666. k.a.sc && (e.strokeColorAnim = !0),
  9667. k.a.sw && (e.strokeWidthAnim = !0),
  9668. (k.a.fc || k.a.fh || k.a.fs || k.a.fb) &&
  9669. (e.fillColorAnim = !0),
  9670. L = 0,
  9671. C = k.s.b,
  9672. s = 0;
  9673. s < a;
  9674. s += 1
  9675. )
  9676. (b = i[s]),
  9677. (b.anIndexes[x] = L),
  9678. ((C == 1 && b.val !== '') ||
  9679. (C == 2 && b.val !== '' && b.val !== ' ') ||
  9680. (C == 3 && (b.n || b.val == ' ' || s == a - 1)) ||
  9681. (C == 4 && (b.n || s == a - 1))) &&
  9682. (k.s.rn === 1 && F.push(L), (L += 1));
  9683. r.a[x].s.totalChars = L;
  9684. var U = -1,
  9685. D;
  9686. if (k.s.rn === 1)
  9687. for (s = 0; s < a; s += 1)
  9688. (b = i[s]),
  9689. U != b.anIndexes[x] &&
  9690. ((U = b.anIndexes[x]),
  9691. (D = F.splice(Math.floor(Math.random() * F.length), 1)[0])),
  9692. (b.anIndexes[x] = D);
  9693. }
  9694. (e.yOffset = e.finalLineHeight || e.finalSize * 1.2),
  9695. (e.ls = e.ls || 0),
  9696. (e.ascent = (y.ascent * e.finalSize) / 100);
  9697. }),
  9698. (TextProperty.prototype.updateDocumentData = function (e, t) {
  9699. t = t === void 0 ? this.keysIndex : t;
  9700. var r = this.copyData({}, this.data.d.k[t].s);
  9701. (r = this.copyData(r, e)),
  9702. (this.data.d.k[t].s = r),
  9703. this.recalculate(t),
  9704. this.setCurrentData(r),
  9705. this.elem.addDynamicProperty(this);
  9706. }),
  9707. (TextProperty.prototype.recalculate = function (e) {
  9708. var t = this.data.d.k[e].s;
  9709. (t.__complete = !1),
  9710. (this.keysIndex = 0),
  9711. (this._isFirstFrame = !0),
  9712. this.getValue(t);
  9713. }),
  9714. (TextProperty.prototype.canResizeFont = function (e) {
  9715. (this.canResize = e),
  9716. this.recalculate(this.keysIndex),
  9717. this.elem.addDynamicProperty(this);
  9718. }),
  9719. (TextProperty.prototype.setMinimumFontSize = function (e) {
  9720. (this.minimumFontSize = Math.floor(e) || 1),
  9721. this.recalculate(this.keysIndex),
  9722. this.elem.addDynamicProperty(this);
  9723. });
  9724. var TextSelectorProp = (function () {
  9725. var e = Math.max,
  9726. t = Math.min,
  9727. r = Math.floor;
  9728. function i(a, o) {
  9729. (this._currentTextLength = -1),
  9730. (this.k = !1),
  9731. (this.data = o),
  9732. (this.elem = a),
  9733. (this.comp = a.comp),
  9734. (this.finalS = 0),
  9735. (this.finalE = 0),
  9736. this.initDynamicPropertyContainer(a),
  9737. (this.s = PropertyFactory.getProp(a, o.s || { k: 0 }, 0, 0, this)),
  9738. 'e' in o
  9739. ? (this.e = PropertyFactory.getProp(a, o.e, 0, 0, this))
  9740. : (this.e = { v: 100 }),
  9741. (this.o = PropertyFactory.getProp(a, o.o || { k: 0 }, 0, 0, this)),
  9742. (this.xe = PropertyFactory.getProp(
  9743. a,
  9744. o.xe || { k: 0 },
  9745. 0,
  9746. 0,
  9747. this
  9748. )),
  9749. (this.ne = PropertyFactory.getProp(
  9750. a,
  9751. o.ne || { k: 0 },
  9752. 0,
  9753. 0,
  9754. this
  9755. )),
  9756. (this.sm = PropertyFactory.getProp(
  9757. a,
  9758. o.sm || { k: 100 },
  9759. 0,
  9760. 0,
  9761. this
  9762. )),
  9763. (this.a = PropertyFactory.getProp(a, o.a, 0, 0.01, this)),
  9764. this.dynamicProperties.length || this.getValue();
  9765. }
  9766. (i.prototype = {
  9767. getMult: function (o) {
  9768. this._currentTextLength !==
  9769. this.elem.textProperty.currentData.l.length && this.getValue();
  9770. var n = 0,
  9771. l = 0,
  9772. f = 1,
  9773. g = 1;
  9774. this.ne.v > 0 ? (n = this.ne.v / 100) : (l = -this.ne.v / 100),
  9775. this.xe.v > 0
  9776. ? (f = 1 - this.xe.v / 100)
  9777. : (g = 1 + this.xe.v / 100);
  9778. var S = BezierFactory.getBezierEasing(n, l, f, g).get,
  9779. c = 0,
  9780. P = this.finalS,
  9781. d = this.finalE,
  9782. p = this.data.sh;
  9783. if (p === 2)
  9784. d === P
  9785. ? (c = o >= d ? 1 : 0)
  9786. : (c = e(0, t(0.5 / (d - P) + (o - P) / (d - P), 1))),
  9787. (c = S(c));
  9788. else if (p === 3)
  9789. d === P
  9790. ? (c = o >= d ? 0 : 1)
  9791. : (c = 1 - e(0, t(0.5 / (d - P) + (o - P) / (d - P), 1))),
  9792. (c = S(c));
  9793. else if (p === 4)
  9794. d === P
  9795. ? (c = 0)
  9796. : ((c = e(0, t(0.5 / (d - P) + (o - P) / (d - P), 1))),
  9797. c < 0.5 ? (c *= 2) : (c = 1 - 2 * (c - 0.5))),
  9798. (c = S(c));
  9799. else if (p === 5) {
  9800. if (d === P) c = 0;
  9801. else {
  9802. var x = d - P;
  9803. o = t(e(0, o + 0.5 - P), d - P);
  9804. var u = -x / 2 + o,
  9805. y = x / 2;
  9806. c = Math.sqrt(1 - (u * u) / (y * y));
  9807. }
  9808. c = S(c);
  9809. } else
  9810. p === 6
  9811. ? (d === P
  9812. ? (c = 0)
  9813. : ((o = t(e(0, o + 0.5 - P), d - P)),
  9814. (c =
  9815. (1 + Math.cos(Math.PI + (Math.PI * 2 * o) / (d - P))) /
  9816. 2)),
  9817. (c = S(c)))
  9818. : (o >= r(P) &&
  9819. (o - P < 0
  9820. ? (c = e(0, t(t(d, 1) - (P - o), 1)))
  9821. : (c = e(0, t(d - o, 1)))),
  9822. (c = S(c)));
  9823. if (this.sm.v !== 100) {
  9824. var m = this.sm.v * 0.01;
  9825. m === 0 && (m = 1e-8);
  9826. var A = 0.5 - m * 0.5;
  9827. c < A ? (c = 0) : ((c = (c - A) / m), c > 1 && (c = 1));
  9828. }
  9829. return c * this.a.v;
  9830. },
  9831. getValue: function (o) {
  9832. this.iterateDynamicProperties(),
  9833. (this._mdf = o || this._mdf),
  9834. (this._currentTextLength =
  9835. this.elem.textProperty.currentData.l.length || 0),
  9836. o && this.data.r === 2 && (this.e.v = this._currentTextLength);
  9837. var n = this.data.r === 2 ? 1 : 100 / this.data.totalChars,
  9838. l = this.o.v / n,
  9839. f = this.s.v / n + l,
  9840. g = this.e.v / n + l;
  9841. if (f > g) {
  9842. var S = f;
  9843. (f = g), (g = S);
  9844. }
  9845. (this.finalS = f), (this.finalE = g);
  9846. }
  9847. }),
  9848. extendPrototype([DynamicPropertyContainer], i);
  9849. function s(a, o, n) {
  9850. return new i(a, o);
  9851. }
  9852. return { getTextSelectorProp: s };
  9853. })();
  9854. function TextAnimatorDataProperty(e, t, r) {
  9855. var i = { propType: !1 },
  9856. s = PropertyFactory.getProp,
  9857. a = t.a;
  9858. (this.a = {
  9859. r: a.r ? s(e, a.r, 0, degToRads, r) : i,
  9860. rx: a.rx ? s(e, a.rx, 0, degToRads, r) : i,
  9861. ry: a.ry ? s(e, a.ry, 0, degToRads, r) : i,
  9862. sk: a.sk ? s(e, a.sk, 0, degToRads, r) : i,
  9863. sa: a.sa ? s(e, a.sa, 0, degToRads, r) : i,
  9864. s: a.s ? s(e, a.s, 1, 0.01, r) : i,
  9865. a: a.a ? s(e, a.a, 1, 0, r) : i,
  9866. o: a.o ? s(e, a.o, 0, 0.01, r) : i,
  9867. p: a.p ? s(e, a.p, 1, 0, r) : i,
  9868. sw: a.sw ? s(e, a.sw, 0, 0, r) : i,
  9869. sc: a.sc ? s(e, a.sc, 1, 0, r) : i,
  9870. fc: a.fc ? s(e, a.fc, 1, 0, r) : i,
  9871. fh: a.fh ? s(e, a.fh, 0, 0, r) : i,
  9872. fs: a.fs ? s(e, a.fs, 0, 0.01, r) : i,
  9873. fb: a.fb ? s(e, a.fb, 0, 0.01, r) : i,
  9874. t: a.t ? s(e, a.t, 0, 0, r) : i
  9875. }),
  9876. (this.s = TextSelectorProp.getTextSelectorProp(e, t.s, r)),
  9877. (this.s.t = t.s.t);
  9878. }
  9879. function TextAnimatorProperty(e, t, r) {
  9880. (this._isFirstFrame = !0),
  9881. (this._hasMaskedPath = !1),
  9882. (this._frameId = -1),
  9883. (this._textData = e),
  9884. (this._renderType = t),
  9885. (this._elem = r),
  9886. (this._animatorsData = createSizedArray(this._textData.a.length)),
  9887. (this._pathData = {}),
  9888. (this._moreOptions = { alignment: {} }),
  9889. (this.renderedLetters = []),
  9890. (this.lettersChangedFlag = !1),
  9891. this.initDynamicPropertyContainer(r);
  9892. }
  9893. (TextAnimatorProperty.prototype.searchProperties = function () {
  9894. var e,
  9895. t = this._textData.a.length,
  9896. r,
  9897. i = PropertyFactory.getProp;
  9898. for (e = 0; e < t; e += 1)
  9899. (r = this._textData.a[e]),
  9900. (this._animatorsData[e] = new TextAnimatorDataProperty(
  9901. this._elem,
  9902. r,
  9903. this
  9904. ));
  9905. this._textData.p && 'm' in this._textData.p
  9906. ? ((this._pathData = {
  9907. a: i(this._elem, this._textData.p.a, 0, 0, this),
  9908. f: i(this._elem, this._textData.p.f, 0, 0, this),
  9909. l: i(this._elem, this._textData.p.l, 0, 0, this),
  9910. r: i(this._elem, this._textData.p.r, 0, 0, this),
  9911. p: i(this._elem, this._textData.p.p, 0, 0, this),
  9912. m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
  9913. }),
  9914. (this._hasMaskedPath = !0))
  9915. : (this._hasMaskedPath = !1),
  9916. (this._moreOptions.alignment = i(
  9917. this._elem,
  9918. this._textData.m.a,
  9919. 1,
  9920. 0,
  9921. this
  9922. ));
  9923. }),
  9924. (TextAnimatorProperty.prototype.getMeasures = function (e, t) {
  9925. if (
  9926. ((this.lettersChangedFlag = t),
  9927. !(
  9928. !this._mdf &&
  9929. !this._isFirstFrame &&
  9930. !t &&
  9931. (!this._hasMaskedPath || !this._pathData.m._mdf)
  9932. ))
  9933. ) {
  9934. this._isFirstFrame = !1;
  9935. var r = this._moreOptions.alignment.v,
  9936. i = this._animatorsData,
  9937. s = this._textData,
  9938. a = this.mHelper,
  9939. o = this._renderType,
  9940. n = this.renderedLetters.length,
  9941. l,
  9942. f,
  9943. g,
  9944. S,
  9945. c = e.l,
  9946. P,
  9947. d,
  9948. p,
  9949. x,
  9950. u,
  9951. y,
  9952. m,
  9953. A,
  9954. T,
  9955. E,
  9956. _,
  9957. I,
  9958. B,
  9959. z,
  9960. G;
  9961. if (this._hasMaskedPath) {
  9962. if (
  9963. ((G = this._pathData.m),
  9964. !this._pathData.n || this._pathData._mdf)
  9965. ) {
  9966. var R = G.v;
  9967. this._pathData.r.v && (R = R.reverse()),
  9968. (P = { tLength: 0, segments: [] }),
  9969. (S = R._length - 1);
  9970. var W;
  9971. for (I = 0, g = 0; g < S; g += 1)
  9972. (W = bez.buildBezierData(
  9973. R.v[g],
  9974. R.v[g + 1],
  9975. [R.o[g][0] - R.v[g][0], R.o[g][1] - R.v[g][1]],
  9976. [
  9977. R.i[g + 1][0] - R.v[g + 1][0],
  9978. R.i[g + 1][1] - R.v[g + 1][1]
  9979. ]
  9980. )),
  9981. (P.tLength += W.segmentLength),
  9982. P.segments.push(W),
  9983. (I += W.segmentLength);
  9984. (g = S),
  9985. G.v.c &&
  9986. ((W = bez.buildBezierData(
  9987. R.v[g],
  9988. R.v[0],
  9989. [R.o[g][0] - R.v[g][0], R.o[g][1] - R.v[g][1]],
  9990. [R.i[0][0] - R.v[0][0], R.i[0][1] - R.v[0][1]]
  9991. )),
  9992. (P.tLength += W.segmentLength),
  9993. P.segments.push(W),
  9994. (I += W.segmentLength)),
  9995. (this._pathData.pi = P);
  9996. }
  9997. if (
  9998. ((P = this._pathData.pi),
  9999. (d = this._pathData.f.v),
  10000. (m = 0),
  10001. (y = 1),
  10002. (x = 0),
  10003. (u = !0),
  10004. (E = P.segments),
  10005. d < 0 && G.v.c)
  10006. )
  10007. for (
  10008. P.tLength < Math.abs(d) && (d = -Math.abs(d) % P.tLength),
  10009. m = E.length - 1,
  10010. T = E[m].points,
  10011. y = T.length - 1;
  10012. d < 0;
  10013. )
  10014. (d += T[y].partialLength),
  10015. (y -= 1),
  10016. y < 0 && ((m -= 1), (T = E[m].points), (y = T.length - 1));
  10017. (T = E[m].points),
  10018. (A = T[y - 1]),
  10019. (p = T[y]),
  10020. (_ = p.partialLength);
  10021. }
  10022. (S = c.length), (l = 0), (f = 0);
  10023. var H = e.finalSize * 1.2 * 0.714,
  10024. N = !0,
  10025. M,
  10026. k,
  10027. b,
  10028. C,
  10029. L;
  10030. C = i.length;
  10031. var F,
  10032. U = -1,
  10033. D,
  10034. V,
  10035. O,
  10036. j = d,
  10037. $ = m,
  10038. J = y,
  10039. X = -1,
  10040. Y,
  10041. K,
  10042. Z,
  10043. Q,
  10044. q,
  10045. ee,
  10046. te,
  10047. ne,
  10048. ae = '',
  10049. oe = this.defaultPropsArray,
  10050. le;
  10051. if (e.j === 2 || e.j === 1) {
  10052. var re = 0,
  10053. he = 0,
  10054. fe = e.j === 2 ? -0.5 : -1,
  10055. ie = 0,
  10056. ce = !0;
  10057. for (g = 0; g < S; g += 1)
  10058. if (c[g].n) {
  10059. for (re && (re += he); ie < g; )
  10060. (c[ie].animatorJustifyOffset = re), (ie += 1);
  10061. (re = 0), (ce = !0);
  10062. } else {
  10063. for (b = 0; b < C; b += 1)
  10064. (M = i[b].a),
  10065. M.t.propType &&
  10066. (ce && e.j === 2 && (he += M.t.v * fe),
  10067. (k = i[b].s),
  10068. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10069. F.length
  10070. ? (re += M.t.v * F[0] * fe)
  10071. : (re += M.t.v * F * fe));
  10072. ce = !1;
  10073. }
  10074. for (re && (re += he); ie < g; )
  10075. (c[ie].animatorJustifyOffset = re), (ie += 1);
  10076. }
  10077. for (g = 0; g < S; g += 1) {
  10078. if ((a.reset(), (Y = 1), c[g].n))
  10079. (l = 0),
  10080. (f += e.yOffset),
  10081. (f += N ? 1 : 0),
  10082. (d = j),
  10083. (N = !1),
  10084. this._hasMaskedPath &&
  10085. ((m = $),
  10086. (y = J),
  10087. (T = E[m].points),
  10088. (A = T[y - 1]),
  10089. (p = T[y]),
  10090. (_ = p.partialLength),
  10091. (x = 0)),
  10092. (ae = ''),
  10093. (ne = ''),
  10094. (ee = ''),
  10095. (le = ''),
  10096. (oe = this.defaultPropsArray);
  10097. else {
  10098. if (this._hasMaskedPath) {
  10099. if (X !== c[g].line) {
  10100. switch (e.j) {
  10101. case 1:
  10102. d += I - e.lineWidths[c[g].line];
  10103. break;
  10104. case 2:
  10105. d += (I - e.lineWidths[c[g].line]) / 2;
  10106. break;
  10107. }
  10108. X = c[g].line;
  10109. }
  10110. U !== c[g].ind &&
  10111. (c[U] && (d += c[U].extra),
  10112. (d += c[g].an / 2),
  10113. (U = c[g].ind)),
  10114. (d += r[0] * c[g].an * 0.005);
  10115. var se = 0;
  10116. for (b = 0; b < C; b += 1)
  10117. (M = i[b].a),
  10118. M.p.propType &&
  10119. ((k = i[b].s),
  10120. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10121. F.length
  10122. ? (se += M.p.v[0] * F[0])
  10123. : (se += M.p.v[0] * F)),
  10124. M.a.propType &&
  10125. ((k = i[b].s),
  10126. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10127. F.length
  10128. ? (se += M.a.v[0] * F[0])
  10129. : (se += M.a.v[0] * F));
  10130. for (
  10131. u = !0,
  10132. this._pathData.a.v &&
  10133. ((d =
  10134. c[0].an * 0.5 +
  10135. ((I -
  10136. this._pathData.f.v -
  10137. c[0].an * 0.5 -
  10138. c[c.length - 1].an * 0.5) *
  10139. U) /
  10140. (S - 1)),
  10141. (d += this._pathData.f.v));
  10142. u;
  10143. )
  10144. x + _ >= d + se || !T
  10145. ? ((B = (d + se - x) / p.partialLength),
  10146. (V = A.point[0] + (p.point[0] - A.point[0]) * B),
  10147. (O = A.point[1] + (p.point[1] - A.point[1]) * B),
  10148. a.translate(
  10149. -r[0] * c[g].an * 0.005,
  10150. -(r[1] * H) * 0.01
  10151. ),
  10152. (u = !1))
  10153. : T &&
  10154. ((x += p.partialLength),
  10155. (y += 1),
  10156. y >= T.length &&
  10157. ((y = 0),
  10158. (m += 1),
  10159. E[m]
  10160. ? (T = E[m].points)
  10161. : G.v.c
  10162. ? ((y = 0), (m = 0), (T = E[m].points))
  10163. : ((x -= p.partialLength), (T = null))),
  10164. T && ((A = p), (p = T[y]), (_ = p.partialLength)));
  10165. (D = c[g].an / 2 - c[g].add), a.translate(-D, 0, 0);
  10166. } else
  10167. (D = c[g].an / 2 - c[g].add),
  10168. a.translate(-D, 0, 0),
  10169. a.translate(-r[0] * c[g].an * 0.005, -r[1] * H * 0.01, 0);
  10170. for (b = 0; b < C; b += 1)
  10171. (M = i[b].a),
  10172. M.t.propType &&
  10173. ((k = i[b].s),
  10174. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10175. (l !== 0 || e.j !== 0) &&
  10176. (this._hasMaskedPath
  10177. ? F.length
  10178. ? (d += M.t.v * F[0])
  10179. : (d += M.t.v * F)
  10180. : F.length
  10181. ? (l += M.t.v * F[0])
  10182. : (l += M.t.v * F)));
  10183. for (
  10184. e.strokeWidthAnim && (Z = e.sw || 0),
  10185. e.strokeColorAnim &&
  10186. (e.sc
  10187. ? (K = [e.sc[0], e.sc[1], e.sc[2]])
  10188. : (K = [0, 0, 0])),
  10189. e.fillColorAnim &&
  10190. e.fc &&
  10191. (Q = [e.fc[0], e.fc[1], e.fc[2]]),
  10192. b = 0;
  10193. b < C;
  10194. b += 1
  10195. )
  10196. (M = i[b].a),
  10197. M.a.propType &&
  10198. ((k = i[b].s),
  10199. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10200. F.length
  10201. ? a.translate(
  10202. -M.a.v[0] * F[0],
  10203. -M.a.v[1] * F[1],
  10204. M.a.v[2] * F[2]
  10205. )
  10206. : a.translate(
  10207. -M.a.v[0] * F,
  10208. -M.a.v[1] * F,
  10209. M.a.v[2] * F
  10210. ));
  10211. for (b = 0; b < C; b += 1)
  10212. (M = i[b].a),
  10213. M.s.propType &&
  10214. ((k = i[b].s),
  10215. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10216. F.length
  10217. ? a.scale(
  10218. 1 + (M.s.v[0] - 1) * F[0],
  10219. 1 + (M.s.v[1] - 1) * F[1],
  10220. 1
  10221. )
  10222. : a.scale(
  10223. 1 + (M.s.v[0] - 1) * F,
  10224. 1 + (M.s.v[1] - 1) * F,
  10225. 1
  10226. ));
  10227. for (b = 0; b < C; b += 1) {
  10228. if (
  10229. ((M = i[b].a),
  10230. (k = i[b].s),
  10231. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10232. M.sk.propType &&
  10233. (F.length
  10234. ? a.skewFromAxis(-M.sk.v * F[0], M.sa.v * F[1])
  10235. : a.skewFromAxis(-M.sk.v * F, M.sa.v * F)),
  10236. M.r.propType &&
  10237. (F.length
  10238. ? a.rotateZ(-M.r.v * F[2])
  10239. : a.rotateZ(-M.r.v * F)),
  10240. M.ry.propType &&
  10241. (F.length
  10242. ? a.rotateY(M.ry.v * F[1])
  10243. : a.rotateY(M.ry.v * F)),
  10244. M.rx.propType &&
  10245. (F.length
  10246. ? a.rotateX(M.rx.v * F[0])
  10247. : a.rotateX(M.rx.v * F)),
  10248. M.o.propType &&
  10249. (F.length
  10250. ? (Y += (M.o.v * F[0] - Y) * F[0])
  10251. : (Y += (M.o.v * F - Y) * F)),
  10252. e.strokeWidthAnim &&
  10253. M.sw.propType &&
  10254. (F.length ? (Z += M.sw.v * F[0]) : (Z += M.sw.v * F)),
  10255. e.strokeColorAnim && M.sc.propType)
  10256. )
  10257. for (q = 0; q < 3; q += 1)
  10258. F.length
  10259. ? (K[q] += (M.sc.v[q] - K[q]) * F[0])
  10260. : (K[q] += (M.sc.v[q] - K[q]) * F);
  10261. if (e.fillColorAnim && e.fc) {
  10262. if (M.fc.propType)
  10263. for (q = 0; q < 3; q += 1)
  10264. F.length
  10265. ? (Q[q] += (M.fc.v[q] - Q[q]) * F[0])
  10266. : (Q[q] += (M.fc.v[q] - Q[q]) * F);
  10267. M.fh.propType &&
  10268. (F.length
  10269. ? (Q = addHueToRGB(Q, M.fh.v * F[0]))
  10270. : (Q = addHueToRGB(Q, M.fh.v * F))),
  10271. M.fs.propType &&
  10272. (F.length
  10273. ? (Q = addSaturationToRGB(Q, M.fs.v * F[0]))
  10274. : (Q = addSaturationToRGB(Q, M.fs.v * F))),
  10275. M.fb.propType &&
  10276. (F.length
  10277. ? (Q = addBrightnessToRGB(Q, M.fb.v * F[0]))
  10278. : (Q = addBrightnessToRGB(Q, M.fb.v * F)));
  10279. }
  10280. }
  10281. for (b = 0; b < C; b += 1)
  10282. (M = i[b].a),
  10283. M.p.propType &&
  10284. ((k = i[b].s),
  10285. (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
  10286. this._hasMaskedPath
  10287. ? F.length
  10288. ? a.translate(0, M.p.v[1] * F[0], -M.p.v[2] * F[1])
  10289. : a.translate(0, M.p.v[1] * F, -M.p.v[2] * F)
  10290. : F.length
  10291. ? a.translate(
  10292. M.p.v[0] * F[0],
  10293. M.p.v[1] * F[1],
  10294. -M.p.v[2] * F[2]
  10295. )
  10296. : a.translate(
  10297. M.p.v[0] * F,
  10298. M.p.v[1] * F,
  10299. -M.p.v[2] * F
  10300. ));
  10301. if (
  10302. (e.strokeWidthAnim && (ee = Z < 0 ? 0 : Z),
  10303. e.strokeColorAnim &&
  10304. (te =
  10305. 'rgb(' +
  10306. Math.round(K[0] * 255) +
  10307. ',' +
  10308. Math.round(K[1] * 255) +
  10309. ',' +
  10310. Math.round(K[2] * 255) +
  10311. ')'),
  10312. e.fillColorAnim &&
  10313. e.fc &&
  10314. (ne =
  10315. 'rgb(' +
  10316. Math.round(Q[0] * 255) +
  10317. ',' +
  10318. Math.round(Q[1] * 255) +
  10319. ',' +
  10320. Math.round(Q[2] * 255) +
  10321. ')'),
  10322. this._hasMaskedPath)
  10323. ) {
  10324. if (
  10325. (a.translate(0, -e.ls),
  10326. a.translate(0, r[1] * H * 0.01 + f, 0),
  10327. this._pathData.p.v)
  10328. ) {
  10329. z = (p.point[1] - A.point[1]) / (p.point[0] - A.point[0]);
  10330. var pe = (Math.atan(z) * 180) / Math.PI;
  10331. p.point[0] < A.point[0] && (pe += 180),
  10332. a.rotate((-pe * Math.PI) / 180);
  10333. }
  10334. a.translate(V, O, 0),
  10335. (d -= r[0] * c[g].an * 0.005),
  10336. c[g + 1] &&
  10337. U !== c[g + 1].ind &&
  10338. ((d += c[g].an / 2), (d += e.tr * 0.001 * e.finalSize));
  10339. } else {
  10340. switch (
  10341. (a.translate(l, f, 0),
  10342. e.ps && a.translate(e.ps[0], e.ps[1] + e.ascent, 0),
  10343. e.j)
  10344. ) {
  10345. case 1:
  10346. a.translate(
  10347. c[g].animatorJustifyOffset +
  10348. e.justifyOffset +
  10349. (e.boxWidth - e.lineWidths[c[g].line]),
  10350. 0,
  10351. 0
  10352. );
  10353. break;
  10354. case 2:
  10355. a.translate(
  10356. c[g].animatorJustifyOffset +
  10357. e.justifyOffset +
  10358. (e.boxWidth - e.lineWidths[c[g].line]) / 2,
  10359. 0,
  10360. 0
  10361. );
  10362. break;
  10363. }
  10364. a.translate(0, -e.ls),
  10365. a.translate(D, 0, 0),
  10366. a.translate(r[0] * c[g].an * 0.005, r[1] * H * 0.01, 0),
  10367. (l += c[g].l + e.tr * 0.001 * e.finalSize);
  10368. }
  10369. o === 'html'
  10370. ? (ae = a.toCSS())
  10371. : o === 'svg'
  10372. ? (ae = a.to2dCSS())
  10373. : (oe = [
  10374. a.props[0],
  10375. a.props[1],
  10376. a.props[2],
  10377. a.props[3],
  10378. a.props[4],
  10379. a.props[5],
  10380. a.props[6],
  10381. a.props[7],
  10382. a.props[8],
  10383. a.props[9],
  10384. a.props[10],
  10385. a.props[11],
  10386. a.props[12],
  10387. a.props[13],
  10388. a.props[14],
  10389. a.props[15]
  10390. ]),
  10391. (le = Y);
  10392. }
  10393. n <= g
  10394. ? ((L = new LetterProps(le, ee, te, ne, ae, oe)),
  10395. this.renderedLetters.push(L),
  10396. (n += 1),
  10397. (this.lettersChangedFlag = !0))
  10398. : ((L = this.renderedLetters[g]),
  10399. (this.lettersChangedFlag =
  10400. L.update(le, ee, te, ne, ae, oe) ||
  10401. this.lettersChangedFlag));
  10402. }
  10403. }
  10404. }),
  10405. (TextAnimatorProperty.prototype.getValue = function () {
  10406. this._elem.globalData.frameId !== this._frameId &&
  10407. ((this._frameId = this._elem.globalData.frameId),
  10408. this.iterateDynamicProperties());
  10409. }),
  10410. (TextAnimatorProperty.prototype.mHelper = new Matrix()),
  10411. (TextAnimatorProperty.prototype.defaultPropsArray = []),
  10412. extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
  10413. function ITextElement() {}
  10414. (ITextElement.prototype.initElement = function (e, t, r) {
  10415. (this.lettersChangedFlag = !0),
  10416. this.initFrame(),
  10417. this.initBaseData(e, t, r),
  10418. (this.textProperty = new TextProperty(
  10419. this,
  10420. e.t,
  10421. this.dynamicProperties
  10422. )),
  10423. (this.textAnimator = new TextAnimatorProperty(
  10424. e.t,
  10425. this.renderType,
  10426. this
  10427. )),
  10428. this.initTransform(e, t, r),
  10429. this.initHierarchy(),
  10430. this.initRenderable(),
  10431. this.initRendererElement(),
  10432. this.createContainerElements(),
  10433. this.createRenderableComponents(),
  10434. this.createContent(),
  10435. this.hide(),
  10436. this.textAnimator.searchProperties(this.dynamicProperties);
  10437. }),
  10438. (ITextElement.prototype.prepareFrame = function (e) {
  10439. (this._mdf = !1),
  10440. this.prepareRenderableFrame(e),
  10441. this.prepareProperties(e, this.isInRange);
  10442. }),
  10443. (ITextElement.prototype.createPathShape = function (e, t) {
  10444. var r,
  10445. i = t.length,
  10446. s,
  10447. a = '';
  10448. for (r = 0; r < i; r += 1)
  10449. t[r].ty === 'sh' &&
  10450. ((s = t[r].ks.k), (a += buildShapeString(s, s.i.length, !0, e)));
  10451. return a;
  10452. }),
  10453. (ITextElement.prototype.updateDocumentData = function (e, t) {
  10454. this.textProperty.updateDocumentData(e, t);
  10455. }),
  10456. (ITextElement.prototype.canResizeFont = function (e) {
  10457. this.textProperty.canResizeFont(e);
  10458. }),
  10459. (ITextElement.prototype.setMinimumFontSize = function (e) {
  10460. this.textProperty.setMinimumFontSize(e);
  10461. }),
  10462. (ITextElement.prototype.applyTextPropertiesToMatrix = function (
  10463. e,
  10464. t,
  10465. r,
  10466. i,
  10467. s
  10468. ) {
  10469. switch (
  10470. (e.ps && t.translate(e.ps[0], e.ps[1] + e.ascent, 0),
  10471. t.translate(0, -e.ls, 0),
  10472. e.j)
  10473. ) {
  10474. case 1:
  10475. t.translate(
  10476. e.justifyOffset + (e.boxWidth - e.lineWidths[r]),
  10477. 0,
  10478. 0
  10479. );
  10480. break;
  10481. case 2:
  10482. t.translate(
  10483. e.justifyOffset + (e.boxWidth - e.lineWidths[r]) / 2,
  10484. 0,
  10485. 0
  10486. );
  10487. break;
  10488. }
  10489. t.translate(i, s, 0);
  10490. }),
  10491. (ITextElement.prototype.buildColor = function (e) {
  10492. return (
  10493. 'rgb(' +
  10494. Math.round(e[0] * 255) +
  10495. ',' +
  10496. Math.round(e[1] * 255) +
  10497. ',' +
  10498. Math.round(e[2] * 255) +
  10499. ')'
  10500. );
  10501. }),
  10502. (ITextElement.prototype.emptyProp = new LetterProps()),
  10503. (ITextElement.prototype.destroy = function () {}),
  10504. (ITextElement.prototype.validateText = function () {
  10505. (this.textProperty._mdf || this.textProperty._isFirstFrame) &&
  10506. (this.buildNewText(),
  10507. (this.textProperty._isFirstFrame = !1),
  10508. (this.textProperty._mdf = !1));
  10509. });
  10510. var emptyShapeData = { shapes: [] };
  10511. function SVGTextLottieElement(e, t, r) {
  10512. (this.textSpans = []),
  10513. (this.renderType = 'svg'),
  10514. this.initElement(e, t, r);
  10515. }
  10516. extendPrototype(
  10517. [
  10518. BaseElement,
  10519. TransformElement,
  10520. SVGBaseElement,
  10521. HierarchyElement,
  10522. FrameElement,
  10523. RenderableDOMElement,
  10524. ITextElement
  10525. ],
  10526. SVGTextLottieElement
  10527. ),
  10528. (SVGTextLottieElement.prototype.createContent = function () {
  10529. this.data.singleShape &&
  10530. !this.globalData.fontManager.chars &&
  10531. (this.textContainer = createNS('text'));
  10532. }),
  10533. (SVGTextLottieElement.prototype.buildTextContents = function (e) {
  10534. for (var t = 0, r = e.length, i = [], s = ''; t < r; )
  10535. e[t] === String.fromCharCode(13) || e[t] === String.fromCharCode(3)
  10536. ? (i.push(s), (s = ''))
  10537. : (s += e[t]),
  10538. (t += 1);
  10539. return i.push(s), i;
  10540. }),
  10541. (SVGTextLottieElement.prototype.buildShapeData = function (e, t) {
  10542. if (e.shapes && e.shapes.length) {
  10543. var r = e.shapes[0];
  10544. if (r.it) {
  10545. var i = r.it[r.it.length - 1];
  10546. i.s && ((i.s.k[0] = t), (i.s.k[1] = t));
  10547. }
  10548. }
  10549. return e;
  10550. }),
  10551. (SVGTextLottieElement.prototype.buildNewText = function () {
  10552. this.addDynamicProperty(this);
  10553. var e,
  10554. t,
  10555. r = this.textProperty.currentData;
  10556. (this.renderedLetters = createSizedArray(r ? r.l.length : 0)),
  10557. r.fc
  10558. ? this.layerElement.setAttribute('fill', this.buildColor(r.fc))
  10559. : this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)'),
  10560. r.sc &&
  10561. (this.layerElement.setAttribute('stroke', this.buildColor(r.sc)),
  10562. this.layerElement.setAttribute('stroke-width', r.sw)),
  10563. this.layerElement.setAttribute('font-size', r.finalSize);
  10564. var i = this.globalData.fontManager.getFontByName(r.f);
  10565. if (i.fClass) this.layerElement.setAttribute('class', i.fClass);
  10566. else {
  10567. this.layerElement.setAttribute('font-family', i.fFamily);
  10568. var s = r.fWeight,
  10569. a = r.fStyle;
  10570. this.layerElement.setAttribute('font-style', a),
  10571. this.layerElement.setAttribute('font-weight', s);
  10572. }
  10573. this.layerElement.setAttribute('aria-label', r.t);
  10574. var o = r.l || [],
  10575. n = !!this.globalData.fontManager.chars;
  10576. t = o.length;
  10577. var l,
  10578. f = this.mHelper,
  10579. g = '',
  10580. S = this.data.singleShape,
  10581. c = 0,
  10582. P = 0,
  10583. d = !0,
  10584. p = r.tr * 0.001 * r.finalSize;
  10585. if (S && !n && !r.sz) {
  10586. var x = this.textContainer,
  10587. u = 'start';
  10588. switch (r.j) {
  10589. case 1:
  10590. u = 'end';
  10591. break;
  10592. case 2:
  10593. u = 'middle';
  10594. break;
  10595. default:
  10596. u = 'start';
  10597. break;
  10598. }
  10599. x.setAttribute('text-anchor', u),
  10600. x.setAttribute('letter-spacing', p);
  10601. var y = this.buildTextContents(r.finalText);
  10602. for (
  10603. t = y.length, P = r.ps ? r.ps[1] + r.ascent : 0, e = 0;
  10604. e < t;
  10605. e += 1
  10606. )
  10607. (l = this.textSpans[e].span || createNS('tspan')),
  10608. (l.textContent = y[e]),
  10609. l.setAttribute('x', 0),
  10610. l.setAttribute('y', P),
  10611. (l.style.display = 'inherit'),
  10612. x.appendChild(l),
  10613. this.textSpans[e] ||
  10614. (this.textSpans[e] = { span: null, glyph: null }),
  10615. (this.textSpans[e].span = l),
  10616. (P += r.finalLineHeight);
  10617. this.layerElement.appendChild(x);
  10618. } else {
  10619. var m = this.textSpans.length,
  10620. A;
  10621. for (e = 0; e < t; e += 1) {
  10622. if (
  10623. (this.textSpans[e] ||
  10624. (this.textSpans[e] = {
  10625. span: null,
  10626. childSpan: null,
  10627. glyph: null
  10628. }),
  10629. !n || !S || e === 0)
  10630. ) {
  10631. if (
  10632. ((l =
  10633. m > e
  10634. ? this.textSpans[e].span
  10635. : createNS(n ? 'g' : 'text')),
  10636. m <= e)
  10637. ) {
  10638. if (
  10639. (l.setAttribute('stroke-linecap', 'butt'),
  10640. l.setAttribute('stroke-linejoin', 'round'),
  10641. l.setAttribute('stroke-miterlimit', '4'),
  10642. (this.textSpans[e].span = l),
  10643. n)
  10644. ) {
  10645. var T = createNS('g');
  10646. l.appendChild(T), (this.textSpans[e].childSpan = T);
  10647. }
  10648. (this.textSpans[e].span = l),
  10649. this.layerElement.appendChild(l);
  10650. }
  10651. l.style.display = 'inherit';
  10652. }
  10653. if (
  10654. (f.reset(),
  10655. S &&
  10656. (o[e].n &&
  10657. ((c = -p), (P += r.yOffset), (P += d ? 1 : 0), (d = !1)),
  10658. this.applyTextPropertiesToMatrix(r, f, o[e].line, c, P),
  10659. (c += o[e].l || 0),
  10660. (c += p)),
  10661. n)
  10662. ) {
  10663. A = this.globalData.fontManager.getCharData(
  10664. r.finalText[e],
  10665. i.fStyle,
  10666. this.globalData.fontManager.getFontByName(r.f).fFamily
  10667. );
  10668. var E;
  10669. if (A.t === 1)
  10670. E = new SVGCompElement(A.data, this.globalData, this);
  10671. else {
  10672. var _ = emptyShapeData;
  10673. A.data &&
  10674. A.data.shapes &&
  10675. (_ = this.buildShapeData(A.data, r.finalSize)),
  10676. (E = new SVGShapeElement(_, this.globalData, this));
  10677. }
  10678. if (this.textSpans[e].glyph) {
  10679. var I = this.textSpans[e].glyph;
  10680. this.textSpans[e].childSpan.removeChild(I.layerElement),
  10681. I.destroy();
  10682. }
  10683. (this.textSpans[e].glyph = E),
  10684. (E._debug = !0),
  10685. E.prepareFrame(0),
  10686. E.renderFrame(),
  10687. this.textSpans[e].childSpan.appendChild(E.layerElement),
  10688. A.t === 1 &&
  10689. this.textSpans[e].childSpan.setAttribute(
  10690. 'transform',
  10691. 'scale(' +
  10692. r.finalSize / 100 +
  10693. ',' +
  10694. r.finalSize / 100 +
  10695. ')'
  10696. );
  10697. } else
  10698. S &&
  10699. l.setAttribute(
  10700. 'transform',
  10701. 'translate(' + f.props[12] + ',' + f.props[13] + ')'
  10702. ),
  10703. (l.textContent = o[e].val),
  10704. l.setAttributeNS(
  10705. 'http://www.w3.org/XML/1998/namespace',
  10706. 'xml:space',
  10707. 'preserve'
  10708. );
  10709. }
  10710. S && l && l.setAttribute('d', g);
  10711. }
  10712. for (; e < this.textSpans.length; )
  10713. (this.textSpans[e].span.style.display = 'none'), (e += 1);
  10714. this._sizeChanged = !0;
  10715. }),
  10716. (SVGTextLottieElement.prototype.sourceRectAtTime = function () {
  10717. if (
  10718. (this.prepareFrame(this.comp.renderedFrame - this.data.st),
  10719. this.renderInnerContent(),
  10720. this._sizeChanged)
  10721. ) {
  10722. this._sizeChanged = !1;
  10723. var e = this.layerElement.getBBox();
  10724. this.bbox = {
  10725. top: e.y,
  10726. left: e.x,
  10727. width: e.width,
  10728. height: e.height
  10729. };
  10730. }
  10731. return this.bbox;
  10732. }),
  10733. (SVGTextLottieElement.prototype.getValue = function () {
  10734. var e,
  10735. t = this.textSpans.length,
  10736. r;
  10737. for (
  10738. this.renderedFrame = this.comp.renderedFrame, e = 0;
  10739. e < t;
  10740. e += 1
  10741. )
  10742. (r = this.textSpans[e].glyph),
  10743. r &&
  10744. (r.prepareFrame(this.comp.renderedFrame - this.data.st),
  10745. r._mdf && (this._mdf = !0));
  10746. }),
  10747. (SVGTextLottieElement.prototype.renderInnerContent = function () {
  10748. if (
  10749. (this.validateText(),
  10750. (!this.data.singleShape || this._mdf) &&
  10751. (this.textAnimator.getMeasures(
  10752. this.textProperty.currentData,
  10753. this.lettersChangedFlag
  10754. ),
  10755. this.lettersChangedFlag || this.textAnimator.lettersChangedFlag))
  10756. ) {
  10757. this._sizeChanged = !0;
  10758. var e,
  10759. t,
  10760. r = this.textAnimator.renderedLetters,
  10761. i = this.textProperty.currentData.l;
  10762. t = i.length;
  10763. var s, a, o;
  10764. for (e = 0; e < t; e += 1)
  10765. i[e].n ||
  10766. ((s = r[e]),
  10767. (a = this.textSpans[e].span),
  10768. (o = this.textSpans[e].glyph),
  10769. o && o.renderFrame(),
  10770. s._mdf.m && a.setAttribute('transform', s.m),
  10771. s._mdf.o && a.setAttribute('opacity', s.o),
  10772. s._mdf.sw && a.setAttribute('stroke-width', s.sw),
  10773. s._mdf.sc && a.setAttribute('stroke', s.sc),
  10774. s._mdf.fc && a.setAttribute('fill', s.fc));
  10775. }
  10776. });
  10777. function ISolidElement(e, t, r) {
  10778. this.initElement(e, t, r);
  10779. }
  10780. extendPrototype([IImageElement], ISolidElement),
  10781. (ISolidElement.prototype.createContent = function () {
  10782. var e = createNS('rect');
  10783. e.setAttribute('width', this.data.sw),
  10784. e.setAttribute('height', this.data.sh),
  10785. e.setAttribute('fill', this.data.sc),
  10786. this.layerElement.appendChild(e);
  10787. });
  10788. function NullElement(e, t, r) {
  10789. this.initFrame(),
  10790. this.initBaseData(e, t, r),
  10791. this.initFrame(),
  10792. this.initTransform(e, t, r),
  10793. this.initHierarchy();
  10794. }
  10795. (NullElement.prototype.prepareFrame = function (e) {
  10796. this.prepareProperties(e, !0);
  10797. }),
  10798. (NullElement.prototype.renderFrame = function () {}),
  10799. (NullElement.prototype.getBaseElement = function () {
  10800. return null;
  10801. }),
  10802. (NullElement.prototype.destroy = function () {}),
  10803. (NullElement.prototype.sourceRectAtTime = function () {}),
  10804. (NullElement.prototype.hide = function () {}),
  10805. extendPrototype(
  10806. [BaseElement, TransformElement, HierarchyElement, FrameElement],
  10807. NullElement
  10808. );
  10809. function SVGRendererBase() {}
  10810. extendPrototype([BaseRenderer], SVGRendererBase),
  10811. (SVGRendererBase.prototype.createNull = function (e) {
  10812. return new NullElement(e, this.globalData, this);
  10813. }),
  10814. (SVGRendererBase.prototype.createShape = function (e) {
  10815. return new SVGShapeElement(e, this.globalData, this);
  10816. }),
  10817. (SVGRendererBase.prototype.createText = function (e) {
  10818. return new SVGTextLottieElement(e, this.globalData, this);
  10819. }),
  10820. (SVGRendererBase.prototype.createImage = function (e) {
  10821. return new IImageElement(e, this.globalData, this);
  10822. }),
  10823. (SVGRendererBase.prototype.createSolid = function (e) {
  10824. return new ISolidElement(e, this.globalData, this);
  10825. }),
  10826. (SVGRendererBase.prototype.configAnimation = function (e) {
  10827. this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg'),
  10828. this.svgElement.setAttribute(
  10829. 'xmlns:xlink',
  10830. 'http://www.w3.org/1999/xlink'
  10831. ),
  10832. this.renderConfig.viewBoxSize
  10833. ? this.svgElement.setAttribute(
  10834. 'viewBox',
  10835. this.renderConfig.viewBoxSize
  10836. )
  10837. : this.svgElement.setAttribute(
  10838. 'viewBox',
  10839. '0 0 ' + e.w + ' ' + e.h
  10840. ),
  10841. this.renderConfig.viewBoxOnly ||
  10842. (this.svgElement.setAttribute('width', e.w),
  10843. this.svgElement.setAttribute('height', e.h),
  10844. (this.svgElement.style.width = '100%'),
  10845. (this.svgElement.style.height = '100%'),
  10846. (this.svgElement.style.transform = 'translate3d(0,0,0)'),
  10847. (this.svgElement.style.contentVisibility =
  10848. this.renderConfig.contentVisibility)),
  10849. this.renderConfig.width &&
  10850. this.svgElement.setAttribute('width', this.renderConfig.width),
  10851. this.renderConfig.height &&
  10852. this.svgElement.setAttribute('height', this.renderConfig.height),
  10853. this.renderConfig.className &&
  10854. this.svgElement.setAttribute(
  10855. 'class',
  10856. this.renderConfig.className
  10857. ),
  10858. this.renderConfig.id &&
  10859. this.svgElement.setAttribute('id', this.renderConfig.id),
  10860. this.renderConfig.focusable !== void 0 &&
  10861. this.svgElement.setAttribute(
  10862. 'focusable',
  10863. this.renderConfig.focusable
  10864. ),
  10865. this.svgElement.setAttribute(
  10866. 'preserveAspectRatio',
  10867. this.renderConfig.preserveAspectRatio
  10868. ),
  10869. this.animationItem.wrapper.appendChild(this.svgElement);
  10870. var t = this.globalData.defs;
  10871. this.setupGlobalData(e, t),
  10872. (this.globalData.progressiveLoad =
  10873. this.renderConfig.progressiveLoad),
  10874. (this.data = e);
  10875. var r = createNS('clipPath'),
  10876. i = createNS('rect');
  10877. i.setAttribute('width', e.w),
  10878. i.setAttribute('height', e.h),
  10879. i.setAttribute('x', 0),
  10880. i.setAttribute('y', 0);
  10881. var s = createElementID();
  10882. r.setAttribute('id', s),
  10883. r.appendChild(i),
  10884. this.layerElement.setAttribute(
  10885. 'clip-path',
  10886. 'url(' + getLocationHref() + '#' + s + ')'
  10887. ),
  10888. t.appendChild(r),
  10889. (this.layers = e.layers),
  10890. (this.elements = createSizedArray(e.layers.length));
  10891. }),
  10892. (SVGRendererBase.prototype.destroy = function () {
  10893. this.animationItem.wrapper &&
  10894. (this.animationItem.wrapper.innerText = ''),
  10895. (this.layerElement = null),
  10896. (this.globalData.defs = null);
  10897. var e,
  10898. t = this.layers ? this.layers.length : 0;
  10899. for (e = 0; e < t; e += 1)
  10900. this.elements[e] &&
  10901. this.elements[e].destroy &&
  10902. this.elements[e].destroy();
  10903. (this.elements.length = 0),
  10904. (this.destroyed = !0),
  10905. (this.animationItem = null);
  10906. }),
  10907. (SVGRendererBase.prototype.updateContainerSize = function () {}),
  10908. (SVGRendererBase.prototype.findIndexByInd = function (e) {
  10909. var t = 0,
  10910. r = this.layers.length;
  10911. for (t = 0; t < r; t += 1) if (this.layers[t].ind === e) return t;
  10912. return -1;
  10913. }),
  10914. (SVGRendererBase.prototype.buildItem = function (e) {
  10915. var t = this.elements;
  10916. if (!(t[e] || this.layers[e].ty === 99)) {
  10917. t[e] = !0;
  10918. var r = this.createItem(this.layers[e]);
  10919. if (
  10920. ((t[e] = r),
  10921. getExpressionsPlugin() &&
  10922. (this.layers[e].ty === 0 &&
  10923. this.globalData.projectInterface.registerComposition(r),
  10924. r.initExpressions()),
  10925. this.appendElementInPos(r, e),
  10926. this.layers[e].tt)
  10927. ) {
  10928. var i =
  10929. 'tp' in this.layers[e]
  10930. ? this.findIndexByInd(this.layers[e].tp)
  10931. : e - 1;
  10932. if (i === -1) return;
  10933. if (!this.elements[i] || this.elements[i] === !0)
  10934. this.buildItem(i), this.addPendingElement(r);
  10935. else {
  10936. var s = t[i],
  10937. a = s.getMatte(this.layers[e].tt);
  10938. r.setMatte(a);
  10939. }
  10940. }
  10941. }
  10942. }),
  10943. (SVGRendererBase.prototype.checkPendingElements = function () {
  10944. for (; this.pendingElements.length; ) {
  10945. var e = this.pendingElements.pop();
  10946. if ((e.checkParenting(), e.data.tt))
  10947. for (var t = 0, r = this.elements.length; t < r; ) {
  10948. if (this.elements[t] === e) {
  10949. var i =
  10950. 'tp' in e.data ? this.findIndexByInd(e.data.tp) : t - 1,
  10951. s = this.elements[i],
  10952. a = s.getMatte(this.layers[t].tt);
  10953. e.setMatte(a);
  10954. break;
  10955. }
  10956. t += 1;
  10957. }
  10958. }
  10959. }),
  10960. (SVGRendererBase.prototype.renderFrame = function (e) {
  10961. if (!(this.renderedFrame === e || this.destroyed)) {
  10962. e === null ? (e = this.renderedFrame) : (this.renderedFrame = e),
  10963. (this.globalData.frameNum = e),
  10964. (this.globalData.frameId += 1),
  10965. (this.globalData.projectInterface.currentFrame = e),
  10966. (this.globalData._mdf = !1);
  10967. var t,
  10968. r = this.layers.length;
  10969. for (
  10970. this.completeLayers || this.checkLayers(e), t = r - 1;
  10971. t >= 0;
  10972. t -= 1
  10973. )
  10974. (this.completeLayers || this.elements[t]) &&
  10975. this.elements[t].prepareFrame(e - this.layers[t].st);
  10976. if (this.globalData._mdf)
  10977. for (t = 0; t < r; t += 1)
  10978. (this.completeLayers || this.elements[t]) &&
  10979. this.elements[t].renderFrame();
  10980. }
  10981. }),
  10982. (SVGRendererBase.prototype.appendElementInPos = function (e, t) {
  10983. var r = e.getBaseElement();
  10984. if (r) {
  10985. for (var i = 0, s; i < t; )
  10986. this.elements[i] &&
  10987. this.elements[i] !== !0 &&
  10988. this.elements[i].getBaseElement() &&
  10989. (s = this.elements[i].getBaseElement()),
  10990. (i += 1);
  10991. s
  10992. ? this.layerElement.insertBefore(r, s)
  10993. : this.layerElement.appendChild(r);
  10994. }
  10995. }),
  10996. (SVGRendererBase.prototype.hide = function () {
  10997. this.layerElement.style.display = 'none';
  10998. }),
  10999. (SVGRendererBase.prototype.show = function () {
  11000. this.layerElement.style.display = 'block';
  11001. });
  11002. function ICompElement() {}
  11003. extendPrototype(
  11004. [
  11005. BaseElement,
  11006. TransformElement,
  11007. HierarchyElement,
  11008. FrameElement,
  11009. RenderableDOMElement
  11010. ],
  11011. ICompElement
  11012. ),
  11013. (ICompElement.prototype.initElement = function (e, t, r) {
  11014. this.initFrame(),
  11015. this.initBaseData(e, t, r),
  11016. this.initTransform(e, t, r),
  11017. this.initRenderable(),
  11018. this.initHierarchy(),
  11019. this.initRendererElement(),
  11020. this.createContainerElements(),
  11021. this.createRenderableComponents(),
  11022. (this.data.xt || !t.progressiveLoad) && this.buildAllItems(),
  11023. this.hide();
  11024. }),
  11025. (ICompElement.prototype.prepareFrame = function (e) {
  11026. if (
  11027. ((this._mdf = !1),
  11028. this.prepareRenderableFrame(e),
  11029. this.prepareProperties(e, this.isInRange),
  11030. !(!this.isInRange && !this.data.xt))
  11031. ) {
  11032. if (this.tm._placeholder) this.renderedFrame = e / this.data.sr;
  11033. else {
  11034. var t = this.tm.v;
  11035. t === this.data.op && (t = this.data.op - 1),
  11036. (this.renderedFrame = t);
  11037. }
  11038. var r,
  11039. i = this.elements.length;
  11040. for (
  11041. this.completeLayers || this.checkLayers(this.renderedFrame),
  11042. r = i - 1;
  11043. r >= 0;
  11044. r -= 1
  11045. )
  11046. (this.completeLayers || this.elements[r]) &&
  11047. (this.elements[r].prepareFrame(
  11048. this.renderedFrame - this.layers[r].st
  11049. ),
  11050. this.elements[r]._mdf && (this._mdf = !0));
  11051. }
  11052. }),
  11053. (ICompElement.prototype.renderInnerContent = function () {
  11054. var e,
  11055. t = this.layers.length;
  11056. for (e = 0; e < t; e += 1)
  11057. (this.completeLayers || this.elements[e]) &&
  11058. this.elements[e].renderFrame();
  11059. }),
  11060. (ICompElement.prototype.setElements = function (e) {
  11061. this.elements = e;
  11062. }),
  11063. (ICompElement.prototype.getElements = function () {
  11064. return this.elements;
  11065. }),
  11066. (ICompElement.prototype.destroyElements = function () {
  11067. var e,
  11068. t = this.layers.length;
  11069. for (e = 0; e < t; e += 1)
  11070. this.elements[e] && this.elements[e].destroy();
  11071. }),
  11072. (ICompElement.prototype.destroy = function () {
  11073. this.destroyElements(), this.destroyBaseElement();
  11074. });
  11075. function SVGCompElement(e, t, r) {
  11076. (this.layers = e.layers),
  11077. (this.supports3d = !0),
  11078. (this.completeLayers = !1),
  11079. (this.pendingElements = []),
  11080. (this.elements = this.layers
  11081. ? createSizedArray(this.layers.length)
  11082. : []),
  11083. this.initElement(e, t, r),
  11084. (this.tm = e.tm
  11085. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  11086. : { _placeholder: !0 });
  11087. }
  11088. extendPrototype(
  11089. [SVGRendererBase, ICompElement, SVGBaseElement],
  11090. SVGCompElement
  11091. ),
  11092. (SVGCompElement.prototype.createComp = function (e) {
  11093. return new SVGCompElement(e, this.globalData, this);
  11094. });
  11095. function SVGRenderer(e, t) {
  11096. (this.animationItem = e),
  11097. (this.layers = null),
  11098. (this.renderedFrame = -1),
  11099. (this.svgElement = createNS('svg'));
  11100. var r = '';
  11101. if (t && t.title) {
  11102. var i = createNS('title'),
  11103. s = createElementID();
  11104. i.setAttribute('id', s),
  11105. (i.textContent = t.title),
  11106. this.svgElement.appendChild(i),
  11107. (r += s);
  11108. }
  11109. if (t && t.description) {
  11110. var a = createNS('desc'),
  11111. o = createElementID();
  11112. a.setAttribute('id', o),
  11113. (a.textContent = t.description),
  11114. this.svgElement.appendChild(a),
  11115. (r += ' ' + o);
  11116. }
  11117. r && this.svgElement.setAttribute('aria-labelledby', r);
  11118. var n = createNS('defs');
  11119. this.svgElement.appendChild(n);
  11120. var l = createNS('g');
  11121. this.svgElement.appendChild(l),
  11122. (this.layerElement = l),
  11123. (this.renderConfig = {
  11124. preserveAspectRatio:
  11125. (t && t.preserveAspectRatio) || 'xMidYMid meet',
  11126. imagePreserveAspectRatio:
  11127. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  11128. contentVisibility: (t && t.contentVisibility) || 'visible',
  11129. progressiveLoad: (t && t.progressiveLoad) || !1,
  11130. hideOnTransparent: !(t && t.hideOnTransparent === !1),
  11131. viewBoxOnly: (t && t.viewBoxOnly) || !1,
  11132. viewBoxSize: (t && t.viewBoxSize) || !1,
  11133. className: (t && t.className) || '',
  11134. id: (t && t.id) || '',
  11135. focusable: t && t.focusable,
  11136. filterSize: {
  11137. width: (t && t.filterSize && t.filterSize.width) || '100%',
  11138. height: (t && t.filterSize && t.filterSize.height) || '100%',
  11139. x: (t && t.filterSize && t.filterSize.x) || '0%',
  11140. y: (t && t.filterSize && t.filterSize.y) || '0%'
  11141. },
  11142. width: t && t.width,
  11143. height: t && t.height,
  11144. runExpressions:
  11145. !t || t.runExpressions === void 0 || t.runExpressions
  11146. }),
  11147. (this.globalData = {
  11148. _mdf: !1,
  11149. frameNum: -1,
  11150. defs: n,
  11151. renderConfig: this.renderConfig
  11152. }),
  11153. (this.elements = []),
  11154. (this.pendingElements = []),
  11155. (this.destroyed = !1),
  11156. (this.rendererType = 'svg');
  11157. }
  11158. extendPrototype([SVGRendererBase], SVGRenderer),
  11159. (SVGRenderer.prototype.createComp = function (e) {
  11160. return new SVGCompElement(e, this.globalData, this);
  11161. });
  11162. function ShapeTransformManager() {
  11163. (this.sequences = {}),
  11164. (this.sequenceList = []),
  11165. (this.transform_key_count = 0);
  11166. }
  11167. ShapeTransformManager.prototype = {
  11168. addTransformSequence: function (t) {
  11169. var r,
  11170. i = t.length,
  11171. s = '_';
  11172. for (r = 0; r < i; r += 1) s += t[r].transform.key + '_';
  11173. var a = this.sequences[s];
  11174. return (
  11175. a ||
  11176. ((a = {
  11177. transforms: [].concat(t),
  11178. finalTransform: new Matrix(),
  11179. _mdf: !1
  11180. }),
  11181. (this.sequences[s] = a),
  11182. this.sequenceList.push(a)),
  11183. a
  11184. );
  11185. },
  11186. processSequence: function (t, r) {
  11187. for (var i = 0, s = t.transforms.length, a = r; i < s && !r; ) {
  11188. if (t.transforms[i].transform.mProps._mdf) {
  11189. a = !0;
  11190. break;
  11191. }
  11192. i += 1;
  11193. }
  11194. if (a)
  11195. for (t.finalTransform.reset(), i = s - 1; i >= 0; i -= 1)
  11196. t.finalTransform.multiply(t.transforms[i].transform.mProps.v);
  11197. t._mdf = a;
  11198. },
  11199. processSequences: function (t) {
  11200. var r,
  11201. i = this.sequenceList.length;
  11202. for (r = 0; r < i; r += 1)
  11203. this.processSequence(this.sequenceList[r], t);
  11204. },
  11205. getNewKey: function () {
  11206. return (
  11207. (this.transform_key_count += 1), '_' + this.transform_key_count
  11208. );
  11209. }
  11210. };
  11211. var lumaLoader = function () {
  11212. var t = '__lottie_element_luma_buffer',
  11213. r = null,
  11214. i = null,
  11215. s = null;
  11216. function a() {
  11217. var l = createNS('svg'),
  11218. f = createNS('filter'),
  11219. g = createNS('feColorMatrix');
  11220. return (
  11221. f.setAttribute('id', t),
  11222. g.setAttribute('type', 'matrix'),
  11223. g.setAttribute('color-interpolation-filters', 'sRGB'),
  11224. g.setAttribute(
  11225. 'values',
  11226. '0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0'
  11227. ),
  11228. f.appendChild(g),
  11229. l.appendChild(f),
  11230. l.setAttribute('id', t + '_svg'),
  11231. featureSupport.svgLumaHidden && (l.style.display = 'none'),
  11232. l
  11233. );
  11234. }
  11235. function o() {
  11236. r ||
  11237. ((s = a()),
  11238. document.body.appendChild(s),
  11239. (r = createTag('canvas')),
  11240. (i = r.getContext('2d')),
  11241. (i.filter = 'url(#' + t + ')'),
  11242. (i.fillStyle = 'rgba(0,0,0,0)'),
  11243. i.fillRect(0, 0, 1, 1));
  11244. }
  11245. function n(l) {
  11246. return (
  11247. r || o(),
  11248. (r.width = l.width),
  11249. (r.height = l.height),
  11250. (i.filter = 'url(#' + t + ')'),
  11251. r
  11252. );
  11253. }
  11254. return { load: o, get: n };
  11255. };
  11256. function createCanvas(e, t) {
  11257. if (featureSupport.offscreenCanvas) return new OffscreenCanvas(e, t);
  11258. var r = createTag('canvas');
  11259. return (r.width = e), (r.height = t), r;
  11260. }
  11261. var assetLoader = (function () {
  11262. return {
  11263. loadLumaCanvas: lumaLoader.load,
  11264. getLumaCanvas: lumaLoader.get,
  11265. createCanvas
  11266. };
  11267. })(),
  11268. registeredEffects = {};
  11269. function CVEffects(e) {
  11270. var t,
  11271. r = e.data.ef ? e.data.ef.length : 0;
  11272. this.filters = [];
  11273. var i;
  11274. for (t = 0; t < r; t += 1) {
  11275. i = null;
  11276. var s = e.data.ef[t].ty;
  11277. if (registeredEffects[s]) {
  11278. var a = registeredEffects[s].effect;
  11279. i = new a(e.effectsManager.effectElements[t], e);
  11280. }
  11281. i && this.filters.push(i);
  11282. }
  11283. this.filters.length && e.addRenderableComponent(this);
  11284. }
  11285. (CVEffects.prototype.renderFrame = function (e) {
  11286. var t,
  11287. r = this.filters.length;
  11288. for (t = 0; t < r; t += 1) this.filters[t].renderFrame(e);
  11289. }),
  11290. (CVEffects.prototype.getEffects = function (e) {
  11291. var t,
  11292. r = this.filters.length,
  11293. i = [];
  11294. for (t = 0; t < r; t += 1)
  11295. this.filters[t].type === e && i.push(this.filters[t]);
  11296. return i;
  11297. });
  11298. function registerEffect(e, t) {
  11299. registeredEffects[e] = { effect: t };
  11300. }
  11301. function CVMaskElement(e, t) {
  11302. (this.data = e),
  11303. (this.element = t),
  11304. (this.masksProperties = this.data.masksProperties || []),
  11305. (this.viewData = createSizedArray(this.masksProperties.length));
  11306. var r,
  11307. i = this.masksProperties.length,
  11308. s = !1;
  11309. for (r = 0; r < i; r += 1)
  11310. this.masksProperties[r].mode !== 'n' && (s = !0),
  11311. (this.viewData[r] = ShapePropertyFactory.getShapeProp(
  11312. this.element,
  11313. this.masksProperties[r],
  11314. 3
  11315. ));
  11316. (this.hasMasks = s), s && this.element.addRenderableComponent(this);
  11317. }
  11318. (CVMaskElement.prototype.renderFrame = function () {
  11319. if (this.hasMasks) {
  11320. var e = this.element.finalTransform.mat,
  11321. t = this.element.canvasContext,
  11322. r,
  11323. i = this.masksProperties.length,
  11324. s,
  11325. a,
  11326. o;
  11327. for (t.beginPath(), r = 0; r < i; r += 1)
  11328. if (this.masksProperties[r].mode !== 'n') {
  11329. this.masksProperties[r].inv &&
  11330. (t.moveTo(0, 0),
  11331. t.lineTo(this.element.globalData.compSize.w, 0),
  11332. t.lineTo(
  11333. this.element.globalData.compSize.w,
  11334. this.element.globalData.compSize.h
  11335. ),
  11336. t.lineTo(0, this.element.globalData.compSize.h),
  11337. t.lineTo(0, 0)),
  11338. (o = this.viewData[r].v),
  11339. (s = e.applyToPointArray(o.v[0][0], o.v[0][1], 0)),
  11340. t.moveTo(s[0], s[1]);
  11341. var n,
  11342. l = o._length;
  11343. for (n = 1; n < l; n += 1)
  11344. (a = e.applyToTriplePoints(o.o[n - 1], o.i[n], o.v[n])),
  11345. t.bezierCurveTo(a[0], a[1], a[2], a[3], a[4], a[5]);
  11346. (a = e.applyToTriplePoints(o.o[n - 1], o.i[0], o.v[0])),
  11347. t.bezierCurveTo(a[0], a[1], a[2], a[3], a[4], a[5]);
  11348. }
  11349. this.element.globalData.renderer.save(!0), t.clip();
  11350. }
  11351. }),
  11352. (CVMaskElement.prototype.getMaskProperty =
  11353. MaskElement.prototype.getMaskProperty),
  11354. (CVMaskElement.prototype.destroy = function () {
  11355. this.element = null;
  11356. });
  11357. function CVBaseElement() {}
  11358. var operationsMap = {
  11359. 1: 'source-in',
  11360. 2: 'source-out',
  11361. 3: 'source-in',
  11362. 4: 'source-out'
  11363. };
  11364. (CVBaseElement.prototype = {
  11365. createElements: function () {},
  11366. initRendererElement: function () {},
  11367. createContainerElements: function () {
  11368. if (this.data.tt >= 1) {
  11369. this.buffers = [];
  11370. var t = this.globalData.canvasContext,
  11371. r = assetLoader.createCanvas(t.canvas.width, t.canvas.height);
  11372. this.buffers.push(r);
  11373. var i = assetLoader.createCanvas(t.canvas.width, t.canvas.height);
  11374. this.buffers.push(i),
  11375. this.data.tt >= 3 &&
  11376. !document._isProxy &&
  11377. assetLoader.loadLumaCanvas();
  11378. }
  11379. (this.canvasContext = this.globalData.canvasContext),
  11380. (this.transformCanvas = this.globalData.transformCanvas),
  11381. (this.renderableEffectsManager = new CVEffects(this)),
  11382. this.searchEffectTransforms();
  11383. },
  11384. createContent: function () {},
  11385. setBlendMode: function () {
  11386. var t = this.globalData;
  11387. if (t.blendMode !== this.data.bm) {
  11388. t.blendMode = this.data.bm;
  11389. var r = getBlendMode(this.data.bm);
  11390. t.canvasContext.globalCompositeOperation = r;
  11391. }
  11392. },
  11393. createRenderableComponents: function () {
  11394. (this.maskManager = new CVMaskElement(this.data, this)),
  11395. (this.transformEffects = this.renderableEffectsManager.getEffects(
  11396. effectTypes.TRANSFORM_EFFECT
  11397. ));
  11398. },
  11399. hideElement: function () {
  11400. !this.hidden &&
  11401. (!this.isInRange || this.isTransparent) &&
  11402. (this.hidden = !0);
  11403. },
  11404. showElement: function () {
  11405. this.isInRange &&
  11406. !this.isTransparent &&
  11407. ((this.hidden = !1),
  11408. (this._isFirstFrame = !0),
  11409. (this.maskManager._isFirstFrame = !0));
  11410. },
  11411. clearCanvas: function (t) {
  11412. t.clearRect(
  11413. this.transformCanvas.tx,
  11414. this.transformCanvas.ty,
  11415. this.transformCanvas.w * this.transformCanvas.sx,
  11416. this.transformCanvas.h * this.transformCanvas.sy
  11417. );
  11418. },
  11419. prepareLayer: function () {
  11420. if (this.data.tt >= 1) {
  11421. var t = this.buffers[0],
  11422. r = t.getContext('2d');
  11423. this.clearCanvas(r),
  11424. r.drawImage(this.canvasContext.canvas, 0, 0),
  11425. (this.currentTransform = this.canvasContext.getTransform()),
  11426. this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
  11427. this.clearCanvas(this.canvasContext),
  11428. this.canvasContext.setTransform(this.currentTransform);
  11429. }
  11430. },
  11431. exitLayer: function () {
  11432. if (this.data.tt >= 1) {
  11433. var t = this.buffers[1],
  11434. r = t.getContext('2d');
  11435. this.clearCanvas(r),
  11436. r.drawImage(this.canvasContext.canvas, 0, 0),
  11437. this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
  11438. this.clearCanvas(this.canvasContext),
  11439. this.canvasContext.setTransform(this.currentTransform);
  11440. var i = this.comp.getElementById(
  11441. 'tp' in this.data ? this.data.tp : this.data.ind - 1
  11442. );
  11443. if (
  11444. (i.renderFrame(!0),
  11445. this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
  11446. this.data.tt >= 3 && !document._isProxy)
  11447. ) {
  11448. var s = assetLoader.getLumaCanvas(this.canvasContext.canvas),
  11449. a = s.getContext('2d');
  11450. a.drawImage(this.canvasContext.canvas, 0, 0),
  11451. this.clearCanvas(this.canvasContext),
  11452. this.canvasContext.drawImage(s, 0, 0);
  11453. }
  11454. (this.canvasContext.globalCompositeOperation =
  11455. operationsMap[this.data.tt]),
  11456. this.canvasContext.drawImage(t, 0, 0),
  11457. (this.canvasContext.globalCompositeOperation =
  11458. 'destination-over'),
  11459. this.canvasContext.drawImage(this.buffers[0], 0, 0),
  11460. this.canvasContext.setTransform(this.currentTransform),
  11461. (this.canvasContext.globalCompositeOperation = 'source-over');
  11462. }
  11463. },
  11464. renderFrame: function (t) {
  11465. if (!(this.hidden || this.data.hd) && !(this.data.td === 1 && !t)) {
  11466. this.renderTransform(),
  11467. this.renderRenderable(),
  11468. this.renderLocalTransform(),
  11469. this.setBlendMode();
  11470. var r = this.data.ty === 0;
  11471. this.prepareLayer(),
  11472. this.globalData.renderer.save(r),
  11473. this.globalData.renderer.ctxTransform(
  11474. this.finalTransform.localMat.props
  11475. ),
  11476. this.globalData.renderer.ctxOpacity(
  11477. this.finalTransform.localOpacity
  11478. ),
  11479. this.renderInnerContent(),
  11480. this.globalData.renderer.restore(r),
  11481. this.exitLayer(),
  11482. this.maskManager.hasMasks && this.globalData.renderer.restore(!0),
  11483. this._isFirstFrame && (this._isFirstFrame = !1);
  11484. }
  11485. },
  11486. destroy: function () {
  11487. (this.canvasContext = null),
  11488. (this.data = null),
  11489. (this.globalData = null),
  11490. this.maskManager.destroy();
  11491. },
  11492. mHelper: new Matrix()
  11493. }),
  11494. (CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement),
  11495. (CVBaseElement.prototype.show = CVBaseElement.prototype.showElement);
  11496. function CVShapeData(e, t, r, i) {
  11497. (this.styledShapes = []), (this.tr = [0, 0, 0, 0, 0, 0]);
  11498. var s = 4;
  11499. t.ty === 'rc'
  11500. ? (s = 5)
  11501. : t.ty === 'el'
  11502. ? (s = 6)
  11503. : t.ty === 'sr' && (s = 7),
  11504. (this.sh = ShapePropertyFactory.getShapeProp(e, t, s, e));
  11505. var a,
  11506. o = r.length,
  11507. n;
  11508. for (a = 0; a < o; a += 1)
  11509. r[a].closed ||
  11510. ((n = {
  11511. transforms: i.addTransformSequence(r[a].transforms),
  11512. trNodes: []
  11513. }),
  11514. this.styledShapes.push(n),
  11515. r[a].elements.push(n));
  11516. }
  11517. CVShapeData.prototype.setAsAnimated =
  11518. SVGShapeData.prototype.setAsAnimated;
  11519. function CVShapeElement(e, t, r) {
  11520. (this.shapes = []),
  11521. (this.shapesData = e.shapes),
  11522. (this.stylesList = []),
  11523. (this.itemsData = []),
  11524. (this.prevViewData = []),
  11525. (this.shapeModifiers = []),
  11526. (this.processedElements = []),
  11527. (this.transformsManager = new ShapeTransformManager()),
  11528. this.initElement(e, t, r);
  11529. }
  11530. extendPrototype(
  11531. [
  11532. BaseElement,
  11533. TransformElement,
  11534. CVBaseElement,
  11535. IShapeElement,
  11536. HierarchyElement,
  11537. FrameElement,
  11538. RenderableElement
  11539. ],
  11540. CVShapeElement
  11541. ),
  11542. (CVShapeElement.prototype.initElement =
  11543. RenderableDOMElement.prototype.initElement),
  11544. (CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: !1 }),
  11545. (CVShapeElement.prototype.dashResetter = []),
  11546. (CVShapeElement.prototype.createContent = function () {
  11547. this.searchShapes(
  11548. this.shapesData,
  11549. this.itemsData,
  11550. this.prevViewData,
  11551. !0,
  11552. []
  11553. );
  11554. }),
  11555. (CVShapeElement.prototype.createStyleElement = function (e, t) {
  11556. var r = {
  11557. data: e,
  11558. type: e.ty,
  11559. preTransforms: this.transformsManager.addTransformSequence(t),
  11560. transforms: [],
  11561. elements: [],
  11562. closed: e.hd === !0
  11563. },
  11564. i = {};
  11565. if (
  11566. (e.ty === 'fl' || e.ty === 'st'
  11567. ? ((i.c = PropertyFactory.getProp(this, e.c, 1, 255, this)),
  11568. i.c.k ||
  11569. (r.co =
  11570. 'rgb(' +
  11571. bmFloor(i.c.v[0]) +
  11572. ',' +
  11573. bmFloor(i.c.v[1]) +
  11574. ',' +
  11575. bmFloor(i.c.v[2]) +
  11576. ')'))
  11577. : (e.ty === 'gf' || e.ty === 'gs') &&
  11578. ((i.s = PropertyFactory.getProp(this, e.s, 1, null, this)),
  11579. (i.e = PropertyFactory.getProp(this, e.e, 1, null, this)),
  11580. (i.h = PropertyFactory.getProp(
  11581. this,
  11582. e.h || { k: 0 },
  11583. 0,
  11584. 0.01,
  11585. this
  11586. )),
  11587. (i.a = PropertyFactory.getProp(
  11588. this,
  11589. e.a || { k: 0 },
  11590. 0,
  11591. degToRads,
  11592. this
  11593. )),
  11594. (i.g = new GradientProperty(this, e.g, this))),
  11595. (i.o = PropertyFactory.getProp(this, e.o, 0, 0.01, this)),
  11596. e.ty === 'st' || e.ty === 'gs')
  11597. ) {
  11598. if (
  11599. ((r.lc = lineCapEnum[e.lc || 2]),
  11600. (r.lj = lineJoinEnum[e.lj || 2]),
  11601. e.lj == 1 && (r.ml = e.ml),
  11602. (i.w = PropertyFactory.getProp(this, e.w, 0, null, this)),
  11603. i.w.k || (r.wi = i.w.v),
  11604. e.d)
  11605. ) {
  11606. var s = new DashProperty(this, e.d, 'canvas', this);
  11607. (i.d = s),
  11608. i.d.k || ((r.da = i.d.dashArray), (r.do = i.d.dashoffset[0]));
  11609. }
  11610. } else r.r = e.r === 2 ? 'evenodd' : 'nonzero';
  11611. return this.stylesList.push(r), (i.style = r), i;
  11612. }),
  11613. (CVShapeElement.prototype.createGroupElement = function () {
  11614. var e = { it: [], prevViewData: [] };
  11615. return e;
  11616. }),
  11617. (CVShapeElement.prototype.createTransformElement = function (e) {
  11618. var t = {
  11619. transform: {
  11620. opacity: 1,
  11621. _opMdf: !1,
  11622. key: this.transformsManager.getNewKey(),
  11623. op: PropertyFactory.getProp(this, e.o, 0, 0.01, this),
  11624. mProps: TransformPropertyFactory.getTransformProperty(
  11625. this,
  11626. e,
  11627. this
  11628. )
  11629. }
  11630. };
  11631. return t;
  11632. }),
  11633. (CVShapeElement.prototype.createShapeElement = function (e) {
  11634. var t = new CVShapeData(
  11635. this,
  11636. e,
  11637. this.stylesList,
  11638. this.transformsManager
  11639. );
  11640. return this.shapes.push(t), this.addShapeToModifiers(t), t;
  11641. }),
  11642. (CVShapeElement.prototype.reloadShapes = function () {
  11643. this._isFirstFrame = !0;
  11644. var e,
  11645. t = this.itemsData.length;
  11646. for (e = 0; e < t; e += 1) this.prevViewData[e] = this.itemsData[e];
  11647. for (
  11648. this.searchShapes(
  11649. this.shapesData,
  11650. this.itemsData,
  11651. this.prevViewData,
  11652. !0,
  11653. []
  11654. ),
  11655. t = this.dynamicProperties.length,
  11656. e = 0;
  11657. e < t;
  11658. e += 1
  11659. )
  11660. this.dynamicProperties[e].getValue();
  11661. this.renderModifiers(),
  11662. this.transformsManager.processSequences(this._isFirstFrame);
  11663. }),
  11664. (CVShapeElement.prototype.addTransformToStyleList = function (e) {
  11665. var t,
  11666. r = this.stylesList.length;
  11667. for (t = 0; t < r; t += 1)
  11668. this.stylesList[t].closed || this.stylesList[t].transforms.push(e);
  11669. }),
  11670. (CVShapeElement.prototype.removeTransformFromStyleList = function () {
  11671. var e,
  11672. t = this.stylesList.length;
  11673. for (e = 0; e < t; e += 1)
  11674. this.stylesList[e].closed || this.stylesList[e].transforms.pop();
  11675. }),
  11676. (CVShapeElement.prototype.closeStyles = function (e) {
  11677. var t,
  11678. r = e.length;
  11679. for (t = 0; t < r; t += 1) e[t].closed = !0;
  11680. }),
  11681. (CVShapeElement.prototype.searchShapes = function (e, t, r, i, s) {
  11682. var a,
  11683. o = e.length - 1,
  11684. n,
  11685. l,
  11686. f = [],
  11687. g = [],
  11688. S,
  11689. c,
  11690. P,
  11691. d = [].concat(s);
  11692. for (a = o; a >= 0; a -= 1) {
  11693. if (
  11694. ((S = this.searchProcessedElement(e[a])),
  11695. S ? (t[a] = r[S - 1]) : (e[a]._shouldRender = i),
  11696. e[a].ty === 'fl' ||
  11697. e[a].ty === 'st' ||
  11698. e[a].ty === 'gf' ||
  11699. e[a].ty === 'gs')
  11700. )
  11701. S
  11702. ? (t[a].style.closed = !1)
  11703. : (t[a] = this.createStyleElement(e[a], d)),
  11704. f.push(t[a].style);
  11705. else if (e[a].ty === 'gr') {
  11706. if (!S) t[a] = this.createGroupElement(e[a]);
  11707. else
  11708. for (l = t[a].it.length, n = 0; n < l; n += 1)
  11709. t[a].prevViewData[n] = t[a].it[n];
  11710. this.searchShapes(e[a].it, t[a].it, t[a].prevViewData, i, d);
  11711. } else
  11712. e[a].ty === 'tr'
  11713. ? (S || ((P = this.createTransformElement(e[a])), (t[a] = P)),
  11714. d.push(t[a]),
  11715. this.addTransformToStyleList(t[a]))
  11716. : e[a].ty === 'sh' ||
  11717. e[a].ty === 'rc' ||
  11718. e[a].ty === 'el' ||
  11719. e[a].ty === 'sr'
  11720. ? S || (t[a] = this.createShapeElement(e[a]))
  11721. : e[a].ty === 'tm' ||
  11722. e[a].ty === 'rd' ||
  11723. e[a].ty === 'pb' ||
  11724. e[a].ty === 'zz' ||
  11725. e[a].ty === 'op'
  11726. ? (S
  11727. ? ((c = t[a]), (c.closed = !1))
  11728. : ((c = ShapeModifiers.getModifier(e[a].ty)),
  11729. c.init(this, e[a]),
  11730. (t[a] = c),
  11731. this.shapeModifiers.push(c)),
  11732. g.push(c))
  11733. : e[a].ty === 'rp' &&
  11734. (S
  11735. ? ((c = t[a]), (c.closed = !0))
  11736. : ((c = ShapeModifiers.getModifier(e[a].ty)),
  11737. (t[a] = c),
  11738. c.init(this, e, a, t),
  11739. this.shapeModifiers.push(c),
  11740. (i = !1)),
  11741. g.push(c));
  11742. this.addProcessedElement(e[a], a + 1);
  11743. }
  11744. for (
  11745. this.removeTransformFromStyleList(),
  11746. this.closeStyles(f),
  11747. o = g.length,
  11748. a = 0;
  11749. a < o;
  11750. a += 1
  11751. )
  11752. g[a].closed = !0;
  11753. }),
  11754. (CVShapeElement.prototype.renderInnerContent = function () {
  11755. (this.transformHelper.opacity = 1),
  11756. (this.transformHelper._opMdf = !1),
  11757. this.renderModifiers(),
  11758. this.transformsManager.processSequences(this._isFirstFrame),
  11759. this.renderShape(
  11760. this.transformHelper,
  11761. this.shapesData,
  11762. this.itemsData,
  11763. !0
  11764. );
  11765. }),
  11766. (CVShapeElement.prototype.renderShapeTransform = function (e, t) {
  11767. (e._opMdf || t.op._mdf || this._isFirstFrame) &&
  11768. ((t.opacity = e.opacity), (t.opacity *= t.op.v), (t._opMdf = !0));
  11769. }),
  11770. (CVShapeElement.prototype.drawLayer = function () {
  11771. var e,
  11772. t = this.stylesList.length,
  11773. r,
  11774. i,
  11775. s,
  11776. a,
  11777. o,
  11778. n,
  11779. l = this.globalData.renderer,
  11780. f = this.globalData.canvasContext,
  11781. g,
  11782. S;
  11783. for (e = 0; e < t; e += 1)
  11784. if (
  11785. ((S = this.stylesList[e]),
  11786. (g = S.type),
  11787. !(
  11788. ((g === 'st' || g === 'gs') && S.wi === 0) ||
  11789. !S.data._shouldRender ||
  11790. S.coOp === 0 ||
  11791. this.globalData.currentGlobalAlpha === 0
  11792. ))
  11793. ) {
  11794. for (
  11795. l.save(),
  11796. o = S.elements,
  11797. g === 'st' || g === 'gs'
  11798. ? (l.ctxStrokeStyle(g === 'st' ? S.co : S.grd),
  11799. l.ctxLineWidth(S.wi),
  11800. l.ctxLineCap(S.lc),
  11801. l.ctxLineJoin(S.lj),
  11802. l.ctxMiterLimit(S.ml || 0))
  11803. : l.ctxFillStyle(g === 'fl' ? S.co : S.grd),
  11804. l.ctxOpacity(S.coOp),
  11805. g !== 'st' && g !== 'gs' && f.beginPath(),
  11806. l.ctxTransform(S.preTransforms.finalTransform.props),
  11807. i = o.length,
  11808. r = 0;
  11809. r < i;
  11810. r += 1
  11811. ) {
  11812. for (
  11813. (g === 'st' || g === 'gs') &&
  11814. (f.beginPath(),
  11815. S.da && (f.setLineDash(S.da), (f.lineDashOffset = S.do))),
  11816. n = o[r].trNodes,
  11817. a = n.length,
  11818. s = 0;
  11819. s < a;
  11820. s += 1
  11821. )
  11822. n[s].t === 'm'
  11823. ? f.moveTo(n[s].p[0], n[s].p[1])
  11824. : n[s].t === 'c'
  11825. ? f.bezierCurveTo(
  11826. n[s].pts[0],
  11827. n[s].pts[1],
  11828. n[s].pts[2],
  11829. n[s].pts[3],
  11830. n[s].pts[4],
  11831. n[s].pts[5]
  11832. )
  11833. : f.closePath();
  11834. (g === 'st' || g === 'gs') &&
  11835. (l.ctxStroke(), S.da && f.setLineDash(this.dashResetter));
  11836. }
  11837. g !== 'st' && g !== 'gs' && this.globalData.renderer.ctxFill(S.r),
  11838. l.restore();
  11839. }
  11840. }),
  11841. (CVShapeElement.prototype.renderShape = function (e, t, r, i) {
  11842. var s,
  11843. a = t.length - 1,
  11844. o;
  11845. for (o = e, s = a; s >= 0; s -= 1)
  11846. t[s].ty === 'tr'
  11847. ? ((o = r[s].transform), this.renderShapeTransform(e, o))
  11848. : t[s].ty === 'sh' ||
  11849. t[s].ty === 'el' ||
  11850. t[s].ty === 'rc' ||
  11851. t[s].ty === 'sr'
  11852. ? this.renderPath(t[s], r[s])
  11853. : t[s].ty === 'fl'
  11854. ? this.renderFill(t[s], r[s], o)
  11855. : t[s].ty === 'st'
  11856. ? this.renderStroke(t[s], r[s], o)
  11857. : t[s].ty === 'gf' || t[s].ty === 'gs'
  11858. ? this.renderGradientFill(t[s], r[s], o)
  11859. : t[s].ty === 'gr'
  11860. ? this.renderShape(o, t[s].it, r[s].it)
  11861. : t[s].ty;
  11862. i && this.drawLayer();
  11863. }),
  11864. (CVShapeElement.prototype.renderStyledShape = function (e, t) {
  11865. if (this._isFirstFrame || t._mdf || e.transforms._mdf) {
  11866. var r = e.trNodes,
  11867. i = t.paths,
  11868. s,
  11869. a,
  11870. o,
  11871. n = i._length;
  11872. r.length = 0;
  11873. var l = e.transforms.finalTransform;
  11874. for (o = 0; o < n; o += 1) {
  11875. var f = i.shapes[o];
  11876. if (f && f.v) {
  11877. for (a = f._length, s = 1; s < a; s += 1)
  11878. s === 1 &&
  11879. r.push({
  11880. t: 'm',
  11881. p: l.applyToPointArray(f.v[0][0], f.v[0][1], 0)
  11882. }),
  11883. r.push({
  11884. t: 'c',
  11885. pts: l.applyToTriplePoints(f.o[s - 1], f.i[s], f.v[s])
  11886. });
  11887. a === 1 &&
  11888. r.push({
  11889. t: 'm',
  11890. p: l.applyToPointArray(f.v[0][0], f.v[0][1], 0)
  11891. }),
  11892. f.c &&
  11893. a &&
  11894. (r.push({
  11895. t: 'c',
  11896. pts: l.applyToTriplePoints(f.o[s - 1], f.i[0], f.v[0])
  11897. }),
  11898. r.push({ t: 'z' }));
  11899. }
  11900. }
  11901. e.trNodes = r;
  11902. }
  11903. }),
  11904. (CVShapeElement.prototype.renderPath = function (e, t) {
  11905. if (e.hd !== !0 && e._shouldRender) {
  11906. var r,
  11907. i = t.styledShapes.length;
  11908. for (r = 0; r < i; r += 1)
  11909. this.renderStyledShape(t.styledShapes[r], t.sh);
  11910. }
  11911. }),
  11912. (CVShapeElement.prototype.renderFill = function (e, t, r) {
  11913. var i = t.style;
  11914. (t.c._mdf || this._isFirstFrame) &&
  11915. (i.co =
  11916. 'rgb(' +
  11917. bmFloor(t.c.v[0]) +
  11918. ',' +
  11919. bmFloor(t.c.v[1]) +
  11920. ',' +
  11921. bmFloor(t.c.v[2]) +
  11922. ')'),
  11923. (t.o._mdf || r._opMdf || this._isFirstFrame) &&
  11924. (i.coOp = t.o.v * r.opacity);
  11925. }),
  11926. (CVShapeElement.prototype.renderGradientFill = function (e, t, r) {
  11927. var i = t.style,
  11928. s;
  11929. if (
  11930. !i.grd ||
  11931. t.g._mdf ||
  11932. t.s._mdf ||
  11933. t.e._mdf ||
  11934. (e.t !== 1 && (t.h._mdf || t.a._mdf))
  11935. ) {
  11936. var a = this.globalData.canvasContext,
  11937. o = t.s.v,
  11938. n = t.e.v;
  11939. if (e.t === 1) s = a.createLinearGradient(o[0], o[1], n[0], n[1]);
  11940. else {
  11941. var l = Math.sqrt(
  11942. Math.pow(o[0] - n[0], 2) + Math.pow(o[1] - n[1], 2)
  11943. ),
  11944. f = Math.atan2(n[1] - o[1], n[0] - o[0]),
  11945. g = t.h.v;
  11946. g >= 1 ? (g = 0.99) : g <= -1 && (g = -0.99);
  11947. var S = l * g,
  11948. c = Math.cos(f + t.a.v) * S + o[0],
  11949. P = Math.sin(f + t.a.v) * S + o[1];
  11950. s = a.createRadialGradient(c, P, 0, o[0], o[1], l);
  11951. }
  11952. var d,
  11953. p = e.g.p,
  11954. x = t.g.c,
  11955. u = 1;
  11956. for (d = 0; d < p; d += 1)
  11957. t.g._hasOpacity && t.g._collapsable && (u = t.g.o[d * 2 + 1]),
  11958. s.addColorStop(
  11959. x[d * 4] / 100,
  11960. 'rgba(' +
  11961. x[d * 4 + 1] +
  11962. ',' +
  11963. x[d * 4 + 2] +
  11964. ',' +
  11965. x[d * 4 + 3] +
  11966. ',' +
  11967. u +
  11968. ')'
  11969. );
  11970. i.grd = s;
  11971. }
  11972. i.coOp = t.o.v * r.opacity;
  11973. }),
  11974. (CVShapeElement.prototype.renderStroke = function (e, t, r) {
  11975. var i = t.style,
  11976. s = t.d;
  11977. s &&
  11978. (s._mdf || this._isFirstFrame) &&
  11979. ((i.da = s.dashArray), (i.do = s.dashoffset[0])),
  11980. (t.c._mdf || this._isFirstFrame) &&
  11981. (i.co =
  11982. 'rgb(' +
  11983. bmFloor(t.c.v[0]) +
  11984. ',' +
  11985. bmFloor(t.c.v[1]) +
  11986. ',' +
  11987. bmFloor(t.c.v[2]) +
  11988. ')'),
  11989. (t.o._mdf || r._opMdf || this._isFirstFrame) &&
  11990. (i.coOp = t.o.v * r.opacity),
  11991. (t.w._mdf || this._isFirstFrame) && (i.wi = t.w.v);
  11992. }),
  11993. (CVShapeElement.prototype.destroy = function () {
  11994. (this.shapesData = null),
  11995. (this.globalData = null),
  11996. (this.canvasContext = null),
  11997. (this.stylesList.length = 0),
  11998. (this.itemsData.length = 0);
  11999. });
  12000. function CVTextElement(e, t, r) {
  12001. (this.textSpans = []),
  12002. (this.yOffset = 0),
  12003. (this.fillColorAnim = !1),
  12004. (this.strokeColorAnim = !1),
  12005. (this.strokeWidthAnim = !1),
  12006. (this.stroke = !1),
  12007. (this.fill = !1),
  12008. (this.justifyOffset = 0),
  12009. (this.currentRender = null),
  12010. (this.renderType = 'canvas'),
  12011. (this.values = {
  12012. fill: 'rgba(0,0,0,0)',
  12013. stroke: 'rgba(0,0,0,0)',
  12014. sWidth: 0,
  12015. fValue: ''
  12016. }),
  12017. this.initElement(e, t, r);
  12018. }
  12019. extendPrototype(
  12020. [
  12021. BaseElement,
  12022. TransformElement,
  12023. CVBaseElement,
  12024. HierarchyElement,
  12025. FrameElement,
  12026. RenderableElement,
  12027. ITextElement
  12028. ],
  12029. CVTextElement
  12030. ),
  12031. (CVTextElement.prototype.tHelper =
  12032. createTag('canvas').getContext('2d')),
  12033. (CVTextElement.prototype.buildNewText = function () {
  12034. var e = this.textProperty.currentData;
  12035. this.renderedLetters = createSizedArray(e.l ? e.l.length : 0);
  12036. var t = !1;
  12037. e.fc
  12038. ? ((t = !0), (this.values.fill = this.buildColor(e.fc)))
  12039. : (this.values.fill = 'rgba(0,0,0,0)'),
  12040. (this.fill = t);
  12041. var r = !1;
  12042. e.sc &&
  12043. ((r = !0),
  12044. (this.values.stroke = this.buildColor(e.sc)),
  12045. (this.values.sWidth = e.sw));
  12046. var i = this.globalData.fontManager.getFontByName(e.f),
  12047. s,
  12048. a,
  12049. o = e.l,
  12050. n = this.mHelper;
  12051. (this.stroke = r),
  12052. (this.values.fValue =
  12053. e.finalSize +
  12054. 'px ' +
  12055. this.globalData.fontManager.getFontByName(e.f).fFamily),
  12056. (a = e.finalText.length);
  12057. var l,
  12058. f,
  12059. g,
  12060. S,
  12061. c,
  12062. P,
  12063. d,
  12064. p,
  12065. x,
  12066. u,
  12067. y = this.data.singleShape,
  12068. m = e.tr * 0.001 * e.finalSize,
  12069. A = 0,
  12070. T = 0,
  12071. E = !0,
  12072. _ = 0;
  12073. for (s = 0; s < a; s += 1) {
  12074. (l = this.globalData.fontManager.getCharData(
  12075. e.finalText[s],
  12076. i.fStyle,
  12077. this.globalData.fontManager.getFontByName(e.f).fFamily
  12078. )),
  12079. (f = (l && l.data) || {}),
  12080. n.reset(),
  12081. y &&
  12082. o[s].n &&
  12083. ((A = -m), (T += e.yOffset), (T += E ? 1 : 0), (E = !1)),
  12084. (c = f.shapes ? f.shapes[0].it : []),
  12085. (d = c.length),
  12086. n.scale(e.finalSize / 100, e.finalSize / 100),
  12087. y && this.applyTextPropertiesToMatrix(e, n, o[s].line, A, T),
  12088. (x = createSizedArray(d - 1));
  12089. var I = 0;
  12090. for (P = 0; P < d; P += 1)
  12091. if (c[P].ty === 'sh') {
  12092. for (
  12093. S = c[P].ks.k.i.length, p = c[P].ks.k, u = [], g = 1;
  12094. g < S;
  12095. g += 1
  12096. )
  12097. g === 1 &&
  12098. u.push(
  12099. n.applyToX(p.v[0][0], p.v[0][1], 0),
  12100. n.applyToY(p.v[0][0], p.v[0][1], 0)
  12101. ),
  12102. u.push(
  12103. n.applyToX(p.o[g - 1][0], p.o[g - 1][1], 0),
  12104. n.applyToY(p.o[g - 1][0], p.o[g - 1][1], 0),
  12105. n.applyToX(p.i[g][0], p.i[g][1], 0),
  12106. n.applyToY(p.i[g][0], p.i[g][1], 0),
  12107. n.applyToX(p.v[g][0], p.v[g][1], 0),
  12108. n.applyToY(p.v[g][0], p.v[g][1], 0)
  12109. );
  12110. u.push(
  12111. n.applyToX(p.o[g - 1][0], p.o[g - 1][1], 0),
  12112. n.applyToY(p.o[g - 1][0], p.o[g - 1][1], 0),
  12113. n.applyToX(p.i[0][0], p.i[0][1], 0),
  12114. n.applyToY(p.i[0][0], p.i[0][1], 0),
  12115. n.applyToX(p.v[0][0], p.v[0][1], 0),
  12116. n.applyToY(p.v[0][0], p.v[0][1], 0)
  12117. ),
  12118. (x[I] = u),
  12119. (I += 1);
  12120. }
  12121. y && ((A += o[s].l), (A += m)),
  12122. this.textSpans[_]
  12123. ? (this.textSpans[_].elem = x)
  12124. : (this.textSpans[_] = { elem: x }),
  12125. (_ += 1);
  12126. }
  12127. }),
  12128. (CVTextElement.prototype.renderInnerContent = function () {
  12129. this.validateText();
  12130. var e = this.canvasContext;
  12131. (e.font = this.values.fValue),
  12132. this.globalData.renderer.ctxLineCap('butt'),
  12133. this.globalData.renderer.ctxLineJoin('miter'),
  12134. this.globalData.renderer.ctxMiterLimit(4),
  12135. this.data.singleShape ||
  12136. this.textAnimator.getMeasures(
  12137. this.textProperty.currentData,
  12138. this.lettersChangedFlag
  12139. );
  12140. var t,
  12141. r,
  12142. i,
  12143. s,
  12144. a,
  12145. o,
  12146. n = this.textAnimator.renderedLetters,
  12147. l = this.textProperty.currentData.l;
  12148. r = l.length;
  12149. var f,
  12150. g = null,
  12151. S = null,
  12152. c = null,
  12153. P,
  12154. d,
  12155. p = this.globalData.renderer;
  12156. for (t = 0; t < r; t += 1)
  12157. if (!l[t].n) {
  12158. if (
  12159. ((f = n[t]),
  12160. f && (p.save(), p.ctxTransform(f.p), p.ctxOpacity(f.o)),
  12161. this.fill)
  12162. ) {
  12163. for (
  12164. f && f.fc
  12165. ? g !== f.fc && (p.ctxFillStyle(f.fc), (g = f.fc))
  12166. : g !== this.values.fill &&
  12167. ((g = this.values.fill),
  12168. p.ctxFillStyle(this.values.fill)),
  12169. P = this.textSpans[t].elem,
  12170. s = P.length,
  12171. this.globalData.canvasContext.beginPath(),
  12172. i = 0;
  12173. i < s;
  12174. i += 1
  12175. )
  12176. for (
  12177. d = P[i],
  12178. o = d.length,
  12179. this.globalData.canvasContext.moveTo(d[0], d[1]),
  12180. a = 2;
  12181. a < o;
  12182. a += 6
  12183. )
  12184. this.globalData.canvasContext.bezierCurveTo(
  12185. d[a],
  12186. d[a + 1],
  12187. d[a + 2],
  12188. d[a + 3],
  12189. d[a + 4],
  12190. d[a + 5]
  12191. );
  12192. this.globalData.canvasContext.closePath(), p.ctxFill();
  12193. }
  12194. if (this.stroke) {
  12195. for (
  12196. f && f.sw
  12197. ? c !== f.sw && ((c = f.sw), p.ctxLineWidth(f.sw))
  12198. : c !== this.values.sWidth &&
  12199. ((c = this.values.sWidth),
  12200. p.ctxLineWidth(this.values.sWidth)),
  12201. f && f.sc
  12202. ? S !== f.sc && ((S = f.sc), p.ctxStrokeStyle(f.sc))
  12203. : S !== this.values.stroke &&
  12204. ((S = this.values.stroke),
  12205. p.ctxStrokeStyle(this.values.stroke)),
  12206. P = this.textSpans[t].elem,
  12207. s = P.length,
  12208. this.globalData.canvasContext.beginPath(),
  12209. i = 0;
  12210. i < s;
  12211. i += 1
  12212. )
  12213. for (
  12214. d = P[i],
  12215. o = d.length,
  12216. this.globalData.canvasContext.moveTo(d[0], d[1]),
  12217. a = 2;
  12218. a < o;
  12219. a += 6
  12220. )
  12221. this.globalData.canvasContext.bezierCurveTo(
  12222. d[a],
  12223. d[a + 1],
  12224. d[a + 2],
  12225. d[a + 3],
  12226. d[a + 4],
  12227. d[a + 5]
  12228. );
  12229. this.globalData.canvasContext.closePath(), p.ctxStroke();
  12230. }
  12231. f && this.globalData.renderer.restore();
  12232. }
  12233. });
  12234. function CVImageElement(e, t, r) {
  12235. (this.assetData = t.getAssetData(e.refId)),
  12236. (this.img = t.imageLoader.getAsset(this.assetData)),
  12237. this.initElement(e, t, r);
  12238. }
  12239. extendPrototype(
  12240. [
  12241. BaseElement,
  12242. TransformElement,
  12243. CVBaseElement,
  12244. HierarchyElement,
  12245. FrameElement,
  12246. RenderableElement
  12247. ],
  12248. CVImageElement
  12249. ),
  12250. (CVImageElement.prototype.initElement =
  12251. SVGShapeElement.prototype.initElement),
  12252. (CVImageElement.prototype.prepareFrame =
  12253. IImageElement.prototype.prepareFrame),
  12254. (CVImageElement.prototype.createContent = function () {
  12255. if (
  12256. this.img.width &&
  12257. (this.assetData.w !== this.img.width ||
  12258. this.assetData.h !== this.img.height)
  12259. ) {
  12260. var e = createTag('canvas');
  12261. (e.width = this.assetData.w), (e.height = this.assetData.h);
  12262. var t = e.getContext('2d'),
  12263. r = this.img.width,
  12264. i = this.img.height,
  12265. s = r / i,
  12266. a = this.assetData.w / this.assetData.h,
  12267. o,
  12268. n,
  12269. l =
  12270. this.assetData.pr ||
  12271. this.globalData.renderConfig.imagePreserveAspectRatio;
  12272. (s > a && l === 'xMidYMid slice') ||
  12273. (s < a && l !== 'xMidYMid slice')
  12274. ? ((n = i), (o = n * a))
  12275. : ((o = r), (n = o / a)),
  12276. t.drawImage(
  12277. this.img,
  12278. (r - o) / 2,
  12279. (i - n) / 2,
  12280. o,
  12281. n,
  12282. 0,
  12283. 0,
  12284. this.assetData.w,
  12285. this.assetData.h
  12286. ),
  12287. (this.img = e);
  12288. }
  12289. }),
  12290. (CVImageElement.prototype.renderInnerContent = function () {
  12291. this.canvasContext.drawImage(this.img, 0, 0);
  12292. }),
  12293. (CVImageElement.prototype.destroy = function () {
  12294. this.img = null;
  12295. });
  12296. function CVSolidElement(e, t, r) {
  12297. this.initElement(e, t, r);
  12298. }
  12299. extendPrototype(
  12300. [
  12301. BaseElement,
  12302. TransformElement,
  12303. CVBaseElement,
  12304. HierarchyElement,
  12305. FrameElement,
  12306. RenderableElement
  12307. ],
  12308. CVSolidElement
  12309. ),
  12310. (CVSolidElement.prototype.initElement =
  12311. SVGShapeElement.prototype.initElement),
  12312. (CVSolidElement.prototype.prepareFrame =
  12313. IImageElement.prototype.prepareFrame),
  12314. (CVSolidElement.prototype.renderInnerContent = function () {
  12315. this.globalData.renderer.ctxFillStyle(this.data.sc),
  12316. this.globalData.renderer.ctxFillRect(
  12317. 0,
  12318. 0,
  12319. this.data.sw,
  12320. this.data.sh
  12321. );
  12322. });
  12323. function CanvasRendererBase() {}
  12324. extendPrototype([BaseRenderer], CanvasRendererBase),
  12325. (CanvasRendererBase.prototype.createShape = function (e) {
  12326. return new CVShapeElement(e, this.globalData, this);
  12327. }),
  12328. (CanvasRendererBase.prototype.createText = function (e) {
  12329. return new CVTextElement(e, this.globalData, this);
  12330. }),
  12331. (CanvasRendererBase.prototype.createImage = function (e) {
  12332. return new CVImageElement(e, this.globalData, this);
  12333. }),
  12334. (CanvasRendererBase.prototype.createSolid = function (e) {
  12335. return new CVSolidElement(e, this.globalData, this);
  12336. }),
  12337. (CanvasRendererBase.prototype.createNull =
  12338. SVGRenderer.prototype.createNull),
  12339. (CanvasRendererBase.prototype.ctxTransform = function (e) {
  12340. (e[0] === 1 &&
  12341. e[1] === 0 &&
  12342. e[4] === 0 &&
  12343. e[5] === 1 &&
  12344. e[12] === 0 &&
  12345. e[13] === 0) ||
  12346. this.canvasContext.transform(e[0], e[1], e[4], e[5], e[12], e[13]);
  12347. }),
  12348. (CanvasRendererBase.prototype.ctxOpacity = function (e) {
  12349. this.canvasContext.globalAlpha *= e < 0 ? 0 : e;
  12350. }),
  12351. (CanvasRendererBase.prototype.ctxFillStyle = function (e) {
  12352. this.canvasContext.fillStyle = e;
  12353. }),
  12354. (CanvasRendererBase.prototype.ctxStrokeStyle = function (e) {
  12355. this.canvasContext.strokeStyle = e;
  12356. }),
  12357. (CanvasRendererBase.prototype.ctxLineWidth = function (e) {
  12358. this.canvasContext.lineWidth = e;
  12359. }),
  12360. (CanvasRendererBase.prototype.ctxLineCap = function (e) {
  12361. this.canvasContext.lineCap = e;
  12362. }),
  12363. (CanvasRendererBase.prototype.ctxLineJoin = function (e) {
  12364. this.canvasContext.lineJoin = e;
  12365. }),
  12366. (CanvasRendererBase.prototype.ctxMiterLimit = function (e) {
  12367. this.canvasContext.miterLimit = e;
  12368. }),
  12369. (CanvasRendererBase.prototype.ctxFill = function (e) {
  12370. this.canvasContext.fill(e);
  12371. }),
  12372. (CanvasRendererBase.prototype.ctxFillRect = function (e, t, r, i) {
  12373. this.canvasContext.fillRect(e, t, r, i);
  12374. }),
  12375. (CanvasRendererBase.prototype.ctxStroke = function () {
  12376. this.canvasContext.stroke();
  12377. }),
  12378. (CanvasRendererBase.prototype.reset = function () {
  12379. if (!this.renderConfig.clearCanvas) {
  12380. this.canvasContext.restore();
  12381. return;
  12382. }
  12383. this.contextData.reset();
  12384. }),
  12385. (CanvasRendererBase.prototype.save = function () {
  12386. this.canvasContext.save();
  12387. }),
  12388. (CanvasRendererBase.prototype.restore = function (e) {
  12389. if (!this.renderConfig.clearCanvas) {
  12390. this.canvasContext.restore();
  12391. return;
  12392. }
  12393. e && (this.globalData.blendMode = 'source-over'),
  12394. this.contextData.restore(e);
  12395. }),
  12396. (CanvasRendererBase.prototype.configAnimation = function (e) {
  12397. if (this.animationItem.wrapper) {
  12398. this.animationItem.container = createTag('canvas');
  12399. var t = this.animationItem.container.style;
  12400. (t.width = '100%'), (t.height = '100%');
  12401. var r = '0px 0px 0px';
  12402. (t.transformOrigin = r),
  12403. (t.mozTransformOrigin = r),
  12404. (t.webkitTransformOrigin = r),
  12405. (t['-webkit-transform'] = r),
  12406. (t.contentVisibility = this.renderConfig.contentVisibility),
  12407. this.animationItem.wrapper.appendChild(
  12408. this.animationItem.container
  12409. ),
  12410. (this.canvasContext =
  12411. this.animationItem.container.getContext('2d')),
  12412. this.renderConfig.className &&
  12413. this.animationItem.container.setAttribute(
  12414. 'class',
  12415. this.renderConfig.className
  12416. ),
  12417. this.renderConfig.id &&
  12418. this.animationItem.container.setAttribute(
  12419. 'id',
  12420. this.renderConfig.id
  12421. );
  12422. } else this.canvasContext = this.renderConfig.context;
  12423. this.contextData.setContext(this.canvasContext),
  12424. (this.data = e),
  12425. (this.layers = e.layers),
  12426. (this.transformCanvas = {
  12427. w: e.w,
  12428. h: e.h,
  12429. sx: 0,
  12430. sy: 0,
  12431. tx: 0,
  12432. ty: 0
  12433. }),
  12434. this.setupGlobalData(e, document.body),
  12435. (this.globalData.canvasContext = this.canvasContext),
  12436. (this.globalData.renderer = this),
  12437. (this.globalData.isDashed = !1),
  12438. (this.globalData.progressiveLoad =
  12439. this.renderConfig.progressiveLoad),
  12440. (this.globalData.transformCanvas = this.transformCanvas),
  12441. (this.elements = createSizedArray(e.layers.length)),
  12442. this.updateContainerSize();
  12443. }),
  12444. (CanvasRendererBase.prototype.updateContainerSize = function (e, t) {
  12445. this.reset();
  12446. var r, i;
  12447. e
  12448. ? ((r = e),
  12449. (i = t),
  12450. (this.canvasContext.canvas.width = r),
  12451. (this.canvasContext.canvas.height = i))
  12452. : (this.animationItem.wrapper && this.animationItem.container
  12453. ? ((r = this.animationItem.wrapper.offsetWidth),
  12454. (i = this.animationItem.wrapper.offsetHeight))
  12455. : ((r = this.canvasContext.canvas.width),
  12456. (i = this.canvasContext.canvas.height)),
  12457. (this.canvasContext.canvas.width = r * this.renderConfig.dpr),
  12458. (this.canvasContext.canvas.height = i * this.renderConfig.dpr));
  12459. var s, a;
  12460. if (
  12461. this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 ||
  12462. this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1
  12463. ) {
  12464. var o = this.renderConfig.preserveAspectRatio.split(' '),
  12465. n = o[1] || 'meet',
  12466. l = o[0] || 'xMidYMid',
  12467. f = l.substr(0, 4),
  12468. g = l.substr(4);
  12469. (s = r / i),
  12470. (a = this.transformCanvas.w / this.transformCanvas.h),
  12471. (a > s && n === 'meet') || (a < s && n === 'slice')
  12472. ? ((this.transformCanvas.sx =
  12473. r / (this.transformCanvas.w / this.renderConfig.dpr)),
  12474. (this.transformCanvas.sy =
  12475. r / (this.transformCanvas.w / this.renderConfig.dpr)))
  12476. : ((this.transformCanvas.sx =
  12477. i / (this.transformCanvas.h / this.renderConfig.dpr)),
  12478. (this.transformCanvas.sy =
  12479. i / (this.transformCanvas.h / this.renderConfig.dpr))),
  12480. f === 'xMid' &&
  12481. ((a < s && n === 'meet') || (a > s && n === 'slice'))
  12482. ? (this.transformCanvas.tx =
  12483. ((r -
  12484. this.transformCanvas.w * (i / this.transformCanvas.h)) /
  12485. 2) *
  12486. this.renderConfig.dpr)
  12487. : f === 'xMax' &&
  12488. ((a < s && n === 'meet') || (a > s && n === 'slice'))
  12489. ? (this.transformCanvas.tx =
  12490. (r -
  12491. this.transformCanvas.w * (i / this.transformCanvas.h)) *
  12492. this.renderConfig.dpr)
  12493. : (this.transformCanvas.tx = 0),
  12494. g === 'YMid' &&
  12495. ((a > s && n === 'meet') || (a < s && n === 'slice'))
  12496. ? (this.transformCanvas.ty =
  12497. ((i -
  12498. this.transformCanvas.h * (r / this.transformCanvas.w)) /
  12499. 2) *
  12500. this.renderConfig.dpr)
  12501. : g === 'YMax' &&
  12502. ((a > s && n === 'meet') || (a < s && n === 'slice'))
  12503. ? (this.transformCanvas.ty =
  12504. (i -
  12505. this.transformCanvas.h * (r / this.transformCanvas.w)) *
  12506. this.renderConfig.dpr)
  12507. : (this.transformCanvas.ty = 0);
  12508. } else
  12509. this.renderConfig.preserveAspectRatio === 'none'
  12510. ? ((this.transformCanvas.sx =
  12511. r / (this.transformCanvas.w / this.renderConfig.dpr)),
  12512. (this.transformCanvas.sy =
  12513. i / (this.transformCanvas.h / this.renderConfig.dpr)),
  12514. (this.transformCanvas.tx = 0),
  12515. (this.transformCanvas.ty = 0))
  12516. : ((this.transformCanvas.sx = this.renderConfig.dpr),
  12517. (this.transformCanvas.sy = this.renderConfig.dpr),
  12518. (this.transformCanvas.tx = 0),
  12519. (this.transformCanvas.ty = 0));
  12520. (this.transformCanvas.props = [
  12521. this.transformCanvas.sx,
  12522. 0,
  12523. 0,
  12524. 0,
  12525. 0,
  12526. this.transformCanvas.sy,
  12527. 0,
  12528. 0,
  12529. 0,
  12530. 0,
  12531. 1,
  12532. 0,
  12533. this.transformCanvas.tx,
  12534. this.transformCanvas.ty,
  12535. 0,
  12536. 1
  12537. ]),
  12538. this.ctxTransform(this.transformCanvas.props),
  12539. this.canvasContext.beginPath(),
  12540. this.canvasContext.rect(
  12541. 0,
  12542. 0,
  12543. this.transformCanvas.w,
  12544. this.transformCanvas.h
  12545. ),
  12546. this.canvasContext.closePath(),
  12547. this.canvasContext.clip(),
  12548. this.renderFrame(this.renderedFrame, !0);
  12549. }),
  12550. (CanvasRendererBase.prototype.destroy = function () {
  12551. this.renderConfig.clearCanvas &&
  12552. this.animationItem.wrapper &&
  12553. (this.animationItem.wrapper.innerText = '');
  12554. var e,
  12555. t = this.layers ? this.layers.length : 0;
  12556. for (e = t - 1; e >= 0; e -= 1)
  12557. this.elements[e] &&
  12558. this.elements[e].destroy &&
  12559. this.elements[e].destroy();
  12560. (this.elements.length = 0),
  12561. (this.globalData.canvasContext = null),
  12562. (this.animationItem.container = null),
  12563. (this.destroyed = !0);
  12564. }),
  12565. (CanvasRendererBase.prototype.renderFrame = function (e, t) {
  12566. if (
  12567. !(
  12568. (this.renderedFrame === e &&
  12569. this.renderConfig.clearCanvas === !0 &&
  12570. !t) ||
  12571. this.destroyed ||
  12572. e === -1
  12573. )
  12574. ) {
  12575. (this.renderedFrame = e),
  12576. (this.globalData.frameNum = e - this.animationItem._isFirstFrame),
  12577. (this.globalData.frameId += 1),
  12578. (this.globalData._mdf = !this.renderConfig.clearCanvas || t),
  12579. (this.globalData.projectInterface.currentFrame = e);
  12580. var r,
  12581. i = this.layers.length;
  12582. for (
  12583. this.completeLayers || this.checkLayers(e), r = i - 1;
  12584. r >= 0;
  12585. r -= 1
  12586. )
  12587. (this.completeLayers || this.elements[r]) &&
  12588. this.elements[r].prepareFrame(e - this.layers[r].st);
  12589. if (this.globalData._mdf) {
  12590. for (
  12591. this.renderConfig.clearCanvas === !0
  12592. ? this.canvasContext.clearRect(
  12593. 0,
  12594. 0,
  12595. this.transformCanvas.w,
  12596. this.transformCanvas.h
  12597. )
  12598. : this.save(),
  12599. r = i - 1;
  12600. r >= 0;
  12601. r -= 1
  12602. )
  12603. (this.completeLayers || this.elements[r]) &&
  12604. this.elements[r].renderFrame();
  12605. this.renderConfig.clearCanvas !== !0 && this.restore();
  12606. }
  12607. }
  12608. }),
  12609. (CanvasRendererBase.prototype.buildItem = function (e) {
  12610. var t = this.elements;
  12611. if (!(t[e] || this.layers[e].ty === 99)) {
  12612. var r = this.createItem(this.layers[e], this, this.globalData);
  12613. (t[e] = r), r.initExpressions();
  12614. }
  12615. }),
  12616. (CanvasRendererBase.prototype.checkPendingElements = function () {
  12617. for (; this.pendingElements.length; ) {
  12618. var e = this.pendingElements.pop();
  12619. e.checkParenting();
  12620. }
  12621. }),
  12622. (CanvasRendererBase.prototype.hide = function () {
  12623. this.animationItem.container.style.display = 'none';
  12624. }),
  12625. (CanvasRendererBase.prototype.show = function () {
  12626. this.animationItem.container.style.display = 'block';
  12627. });
  12628. function CanvasContext() {
  12629. (this.opacity = -1),
  12630. (this.transform = createTypedArray('float32', 16)),
  12631. (this.fillStyle = ''),
  12632. (this.strokeStyle = ''),
  12633. (this.lineWidth = ''),
  12634. (this.lineCap = ''),
  12635. (this.lineJoin = ''),
  12636. (this.miterLimit = ''),
  12637. (this.id = Math.random());
  12638. }
  12639. function CVContextData() {
  12640. (this.stack = []), (this.cArrPos = 0), (this.cTr = new Matrix());
  12641. var e,
  12642. t = 15;
  12643. for (e = 0; e < t; e += 1) {
  12644. var r = new CanvasContext();
  12645. this.stack[e] = r;
  12646. }
  12647. (this._length = t),
  12648. (this.nativeContext = null),
  12649. (this.transformMat = new Matrix()),
  12650. (this.currentOpacity = 1),
  12651. (this.currentFillStyle = ''),
  12652. (this.appliedFillStyle = ''),
  12653. (this.currentStrokeStyle = ''),
  12654. (this.appliedStrokeStyle = ''),
  12655. (this.currentLineWidth = ''),
  12656. (this.appliedLineWidth = ''),
  12657. (this.currentLineCap = ''),
  12658. (this.appliedLineCap = ''),
  12659. (this.currentLineJoin = ''),
  12660. (this.appliedLineJoin = ''),
  12661. (this.appliedMiterLimit = ''),
  12662. (this.currentMiterLimit = '');
  12663. }
  12664. (CVContextData.prototype.duplicate = function () {
  12665. var e = this._length * 2,
  12666. t = 0;
  12667. for (t = this._length; t < e; t += 1)
  12668. this.stack[t] = new CanvasContext();
  12669. this._length = e;
  12670. }),
  12671. (CVContextData.prototype.reset = function () {
  12672. (this.cArrPos = 0),
  12673. this.cTr.reset(),
  12674. (this.stack[this.cArrPos].opacity = 1);
  12675. }),
  12676. (CVContextData.prototype.restore = function (e) {
  12677. this.cArrPos -= 1;
  12678. var t = this.stack[this.cArrPos],
  12679. r = t.transform,
  12680. i,
  12681. s = this.cTr.props;
  12682. for (i = 0; i < 16; i += 1) s[i] = r[i];
  12683. if (e) {
  12684. this.nativeContext.restore();
  12685. var a = this.stack[this.cArrPos + 1];
  12686. (this.appliedFillStyle = a.fillStyle),
  12687. (this.appliedStrokeStyle = a.strokeStyle),
  12688. (this.appliedLineWidth = a.lineWidth),
  12689. (this.appliedLineCap = a.lineCap),
  12690. (this.appliedLineJoin = a.lineJoin),
  12691. (this.appliedMiterLimit = a.miterLimit);
  12692. }
  12693. this.nativeContext.setTransform(r[0], r[1], r[4], r[5], r[12], r[13]),
  12694. (e || (t.opacity !== -1 && this.currentOpacity !== t.opacity)) &&
  12695. ((this.nativeContext.globalAlpha = t.opacity),
  12696. (this.currentOpacity = t.opacity)),
  12697. (this.currentFillStyle = t.fillStyle),
  12698. (this.currentStrokeStyle = t.strokeStyle),
  12699. (this.currentLineWidth = t.lineWidth),
  12700. (this.currentLineCap = t.lineCap),
  12701. (this.currentLineJoin = t.lineJoin),
  12702. (this.currentMiterLimit = t.miterLimit);
  12703. }),
  12704. (CVContextData.prototype.save = function (e) {
  12705. e && this.nativeContext.save();
  12706. var t = this.cTr.props;
  12707. this._length <= this.cArrPos && this.duplicate();
  12708. var r = this.stack[this.cArrPos],
  12709. i;
  12710. for (i = 0; i < 16; i += 1) r.transform[i] = t[i];
  12711. this.cArrPos += 1;
  12712. var s = this.stack[this.cArrPos];
  12713. (s.opacity = r.opacity),
  12714. (s.fillStyle = r.fillStyle),
  12715. (s.strokeStyle = r.strokeStyle),
  12716. (s.lineWidth = r.lineWidth),
  12717. (s.lineCap = r.lineCap),
  12718. (s.lineJoin = r.lineJoin),
  12719. (s.miterLimit = r.miterLimit);
  12720. }),
  12721. (CVContextData.prototype.setOpacity = function (e) {
  12722. this.stack[this.cArrPos].opacity = e;
  12723. }),
  12724. (CVContextData.prototype.setContext = function (e) {
  12725. this.nativeContext = e;
  12726. }),
  12727. (CVContextData.prototype.fillStyle = function (e) {
  12728. this.stack[this.cArrPos].fillStyle !== e &&
  12729. ((this.currentFillStyle = e),
  12730. (this.stack[this.cArrPos].fillStyle = e));
  12731. }),
  12732. (CVContextData.prototype.strokeStyle = function (e) {
  12733. this.stack[this.cArrPos].strokeStyle !== e &&
  12734. ((this.currentStrokeStyle = e),
  12735. (this.stack[this.cArrPos].strokeStyle = e));
  12736. }),
  12737. (CVContextData.prototype.lineWidth = function (e) {
  12738. this.stack[this.cArrPos].lineWidth !== e &&
  12739. ((this.currentLineWidth = e),
  12740. (this.stack[this.cArrPos].lineWidth = e));
  12741. }),
  12742. (CVContextData.prototype.lineCap = function (e) {
  12743. this.stack[this.cArrPos].lineCap !== e &&
  12744. ((this.currentLineCap = e), (this.stack[this.cArrPos].lineCap = e));
  12745. }),
  12746. (CVContextData.prototype.lineJoin = function (e) {
  12747. this.stack[this.cArrPos].lineJoin !== e &&
  12748. ((this.currentLineJoin = e),
  12749. (this.stack[this.cArrPos].lineJoin = e));
  12750. }),
  12751. (CVContextData.prototype.miterLimit = function (e) {
  12752. this.stack[this.cArrPos].miterLimit !== e &&
  12753. ((this.currentMiterLimit = e),
  12754. (this.stack[this.cArrPos].miterLimit = e));
  12755. }),
  12756. (CVContextData.prototype.transform = function (e) {
  12757. this.transformMat.cloneFromProps(e);
  12758. var t = this.cTr;
  12759. this.transformMat.multiply(t),
  12760. t.cloneFromProps(this.transformMat.props);
  12761. var r = t.props;
  12762. this.nativeContext.setTransform(r[0], r[1], r[4], r[5], r[12], r[13]);
  12763. }),
  12764. (CVContextData.prototype.opacity = function (e) {
  12765. var t = this.stack[this.cArrPos].opacity;
  12766. (t *= e < 0 ? 0 : e),
  12767. this.stack[this.cArrPos].opacity !== t &&
  12768. (this.currentOpacity !== e &&
  12769. ((this.nativeContext.globalAlpha = e),
  12770. (this.currentOpacity = e)),
  12771. (this.stack[this.cArrPos].opacity = t));
  12772. }),
  12773. (CVContextData.prototype.fill = function (e) {
  12774. this.appliedFillStyle !== this.currentFillStyle &&
  12775. ((this.appliedFillStyle = this.currentFillStyle),
  12776. (this.nativeContext.fillStyle = this.appliedFillStyle)),
  12777. this.nativeContext.fill(e);
  12778. }),
  12779. (CVContextData.prototype.fillRect = function (e, t, r, i) {
  12780. this.appliedFillStyle !== this.currentFillStyle &&
  12781. ((this.appliedFillStyle = this.currentFillStyle),
  12782. (this.nativeContext.fillStyle = this.appliedFillStyle)),
  12783. this.nativeContext.fillRect(e, t, r, i);
  12784. }),
  12785. (CVContextData.prototype.stroke = function () {
  12786. this.appliedStrokeStyle !== this.currentStrokeStyle &&
  12787. ((this.appliedStrokeStyle = this.currentStrokeStyle),
  12788. (this.nativeContext.strokeStyle = this.appliedStrokeStyle)),
  12789. this.appliedLineWidth !== this.currentLineWidth &&
  12790. ((this.appliedLineWidth = this.currentLineWidth),
  12791. (this.nativeContext.lineWidth = this.appliedLineWidth)),
  12792. this.appliedLineCap !== this.currentLineCap &&
  12793. ((this.appliedLineCap = this.currentLineCap),
  12794. (this.nativeContext.lineCap = this.appliedLineCap)),
  12795. this.appliedLineJoin !== this.currentLineJoin &&
  12796. ((this.appliedLineJoin = this.currentLineJoin),
  12797. (this.nativeContext.lineJoin = this.appliedLineJoin)),
  12798. this.appliedMiterLimit !== this.currentMiterLimit &&
  12799. ((this.appliedMiterLimit = this.currentMiterLimit),
  12800. (this.nativeContext.miterLimit = this.appliedMiterLimit)),
  12801. this.nativeContext.stroke();
  12802. });
  12803. function CVCompElement(e, t, r) {
  12804. (this.completeLayers = !1),
  12805. (this.layers = e.layers),
  12806. (this.pendingElements = []),
  12807. (this.elements = createSizedArray(this.layers.length)),
  12808. this.initElement(e, t, r),
  12809. (this.tm = e.tm
  12810. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  12811. : { _placeholder: !0 });
  12812. }
  12813. extendPrototype(
  12814. [CanvasRendererBase, ICompElement, CVBaseElement],
  12815. CVCompElement
  12816. ),
  12817. (CVCompElement.prototype.renderInnerContent = function () {
  12818. var e = this.canvasContext;
  12819. e.beginPath(),
  12820. e.moveTo(0, 0),
  12821. e.lineTo(this.data.w, 0),
  12822. e.lineTo(this.data.w, this.data.h),
  12823. e.lineTo(0, this.data.h),
  12824. e.lineTo(0, 0),
  12825. e.clip();
  12826. var t,
  12827. r = this.layers.length;
  12828. for (t = r - 1; t >= 0; t -= 1)
  12829. (this.completeLayers || this.elements[t]) &&
  12830. this.elements[t].renderFrame();
  12831. }),
  12832. (CVCompElement.prototype.destroy = function () {
  12833. var e,
  12834. t = this.layers.length;
  12835. for (e = t - 1; e >= 0; e -= 1)
  12836. this.elements[e] && this.elements[e].destroy();
  12837. (this.layers = null), (this.elements = null);
  12838. }),
  12839. (CVCompElement.prototype.createComp = function (e) {
  12840. return new CVCompElement(e, this.globalData, this);
  12841. });
  12842. function CanvasRenderer(e, t) {
  12843. (this.animationItem = e),
  12844. (this.renderConfig = {
  12845. clearCanvas: t && t.clearCanvas !== void 0 ? t.clearCanvas : !0,
  12846. context: (t && t.context) || null,
  12847. progressiveLoad: (t && t.progressiveLoad) || !1,
  12848. preserveAspectRatio:
  12849. (t && t.preserveAspectRatio) || 'xMidYMid meet',
  12850. imagePreserveAspectRatio:
  12851. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  12852. contentVisibility: (t && t.contentVisibility) || 'visible',
  12853. className: (t && t.className) || '',
  12854. id: (t && t.id) || '',
  12855. runExpressions:
  12856. !t || t.runExpressions === void 0 || t.runExpressions
  12857. }),
  12858. (this.renderConfig.dpr = (t && t.dpr) || 1),
  12859. this.animationItem.wrapper &&
  12860. (this.renderConfig.dpr =
  12861. (t && t.dpr) || window.devicePixelRatio || 1),
  12862. (this.renderedFrame = -1),
  12863. (this.globalData = {
  12864. frameNum: -1,
  12865. _mdf: !1,
  12866. renderConfig: this.renderConfig,
  12867. currentGlobalAlpha: -1
  12868. }),
  12869. (this.contextData = new CVContextData()),
  12870. (this.elements = []),
  12871. (this.pendingElements = []),
  12872. (this.transformMat = new Matrix()),
  12873. (this.completeLayers = !1),
  12874. (this.rendererType = 'canvas'),
  12875. this.renderConfig.clearCanvas &&
  12876. ((this.ctxTransform = this.contextData.transform.bind(
  12877. this.contextData
  12878. )),
  12879. (this.ctxOpacity = this.contextData.opacity.bind(this.contextData)),
  12880. (this.ctxFillStyle = this.contextData.fillStyle.bind(
  12881. this.contextData
  12882. )),
  12883. (this.ctxStrokeStyle = this.contextData.strokeStyle.bind(
  12884. this.contextData
  12885. )),
  12886. (this.ctxLineWidth = this.contextData.lineWidth.bind(
  12887. this.contextData
  12888. )),
  12889. (this.ctxLineCap = this.contextData.lineCap.bind(this.contextData)),
  12890. (this.ctxLineJoin = this.contextData.lineJoin.bind(
  12891. this.contextData
  12892. )),
  12893. (this.ctxMiterLimit = this.contextData.miterLimit.bind(
  12894. this.contextData
  12895. )),
  12896. (this.ctxFill = this.contextData.fill.bind(this.contextData)),
  12897. (this.ctxFillRect = this.contextData.fillRect.bind(
  12898. this.contextData
  12899. )),
  12900. (this.ctxStroke = this.contextData.stroke.bind(this.contextData)),
  12901. (this.save = this.contextData.save.bind(this.contextData)));
  12902. }
  12903. extendPrototype([CanvasRendererBase], CanvasRenderer),
  12904. (CanvasRenderer.prototype.createComp = function (e) {
  12905. return new CVCompElement(e, this.globalData, this);
  12906. });
  12907. function HBaseElement() {}
  12908. (HBaseElement.prototype = {
  12909. checkBlendMode: function () {},
  12910. initRendererElement: function () {
  12911. (this.baseElement = createTag(this.data.tg || 'div')),
  12912. this.data.hasMask
  12913. ? ((this.svgElement = createNS('svg')),
  12914. (this.layerElement = createNS('g')),
  12915. (this.maskedElement = this.layerElement),
  12916. this.svgElement.appendChild(this.layerElement),
  12917. this.baseElement.appendChild(this.svgElement))
  12918. : (this.layerElement = this.baseElement),
  12919. styleDiv(this.baseElement);
  12920. },
  12921. createContainerElements: function () {
  12922. (this.renderableEffectsManager = new CVEffects(this)),
  12923. (this.transformedElement = this.baseElement),
  12924. (this.maskedElement = this.layerElement),
  12925. this.data.ln && this.layerElement.setAttribute('id', this.data.ln),
  12926. this.data.cl &&
  12927. this.layerElement.setAttribute('class', this.data.cl),
  12928. this.data.bm !== 0 && this.setBlendMode();
  12929. },
  12930. renderElement: function () {
  12931. var t = this.transformedElement ? this.transformedElement.style : {};
  12932. if (this.finalTransform._matMdf) {
  12933. var r = this.finalTransform.mat.toCSS();
  12934. (t.transform = r), (t.webkitTransform = r);
  12935. }
  12936. this.finalTransform._opMdf &&
  12937. (t.opacity = this.finalTransform.mProp.o.v);
  12938. },
  12939. renderFrame: function () {
  12940. this.data.hd ||
  12941. this.hidden ||
  12942. (this.renderTransform(),
  12943. this.renderRenderable(),
  12944. this.renderElement(),
  12945. this.renderInnerContent(),
  12946. this._isFirstFrame && (this._isFirstFrame = !1));
  12947. },
  12948. destroy: function () {
  12949. (this.layerElement = null),
  12950. (this.transformedElement = null),
  12951. this.matteElement && (this.matteElement = null),
  12952. this.maskManager &&
  12953. (this.maskManager.destroy(), (this.maskManager = null));
  12954. },
  12955. createRenderableComponents: function () {
  12956. this.maskManager = new MaskElement(this.data, this, this.globalData);
  12957. },
  12958. addEffects: function () {},
  12959. setMatte: function () {}
  12960. }),
  12961. (HBaseElement.prototype.getBaseElement =
  12962. SVGBaseElement.prototype.getBaseElement),
  12963. (HBaseElement.prototype.destroyBaseElement =
  12964. HBaseElement.prototype.destroy),
  12965. (HBaseElement.prototype.buildElementParenting =
  12966. BaseRenderer.prototype.buildElementParenting);
  12967. function HSolidElement(e, t, r) {
  12968. this.initElement(e, t, r);
  12969. }
  12970. extendPrototype(
  12971. [
  12972. BaseElement,
  12973. TransformElement,
  12974. HBaseElement,
  12975. HierarchyElement,
  12976. FrameElement,
  12977. RenderableDOMElement
  12978. ],
  12979. HSolidElement
  12980. ),
  12981. (HSolidElement.prototype.createContent = function () {
  12982. var e;
  12983. this.data.hasMask
  12984. ? ((e = createNS('rect')),
  12985. e.setAttribute('width', this.data.sw),
  12986. e.setAttribute('height', this.data.sh),
  12987. e.setAttribute('fill', this.data.sc),
  12988. this.svgElement.setAttribute('width', this.data.sw),
  12989. this.svgElement.setAttribute('height', this.data.sh))
  12990. : ((e = createTag('div')),
  12991. (e.style.width = this.data.sw + 'px'),
  12992. (e.style.height = this.data.sh + 'px'),
  12993. (e.style.backgroundColor = this.data.sc)),
  12994. this.layerElement.appendChild(e);
  12995. });
  12996. function HShapeElement(e, t, r) {
  12997. (this.shapes = []),
  12998. (this.shapesData = e.shapes),
  12999. (this.stylesList = []),
  13000. (this.shapeModifiers = []),
  13001. (this.itemsData = []),
  13002. (this.processedElements = []),
  13003. (this.animatedContents = []),
  13004. (this.shapesContainer = createNS('g')),
  13005. this.initElement(e, t, r),
  13006. (this.prevViewData = []),
  13007. (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 });
  13008. }
  13009. extendPrototype(
  13010. [
  13011. BaseElement,
  13012. TransformElement,
  13013. HSolidElement,
  13014. SVGShapeElement,
  13015. HBaseElement,
  13016. HierarchyElement,
  13017. FrameElement,
  13018. RenderableElement
  13019. ],
  13020. HShapeElement
  13021. ),
  13022. (HShapeElement.prototype._renderShapeFrame =
  13023. HShapeElement.prototype.renderInnerContent),
  13024. (HShapeElement.prototype.createContent = function () {
  13025. var e;
  13026. if (((this.baseElement.style.fontSize = 0), this.data.hasMask))
  13027. this.layerElement.appendChild(this.shapesContainer),
  13028. (e = this.svgElement);
  13029. else {
  13030. e = createNS('svg');
  13031. var t = this.comp.data ? this.comp.data : this.globalData.compSize;
  13032. e.setAttribute('width', t.w),
  13033. e.setAttribute('height', t.h),
  13034. e.appendChild(this.shapesContainer),
  13035. this.layerElement.appendChild(e);
  13036. }
  13037. this.searchShapes(
  13038. this.shapesData,
  13039. this.itemsData,
  13040. this.prevViewData,
  13041. this.shapesContainer,
  13042. 0,
  13043. [],
  13044. !0
  13045. ),
  13046. this.filterUniqueShapes(),
  13047. (this.shapeCont = e);
  13048. }),
  13049. (HShapeElement.prototype.getTransformedPoint = function (e, t) {
  13050. var r,
  13051. i = e.length;
  13052. for (r = 0; r < i; r += 1)
  13053. t = e[r].mProps.v.applyToPointArray(t[0], t[1], 0);
  13054. return t;
  13055. }),
  13056. (HShapeElement.prototype.calculateShapeBoundingBox = function (e, t) {
  13057. var r = e.sh.v,
  13058. i = e.transformers,
  13059. s,
  13060. a = r._length,
  13061. o,
  13062. n,
  13063. l,
  13064. f;
  13065. if (!(a <= 1)) {
  13066. for (s = 0; s < a - 1; s += 1)
  13067. (o = this.getTransformedPoint(i, r.v[s])),
  13068. (n = this.getTransformedPoint(i, r.o[s])),
  13069. (l = this.getTransformedPoint(i, r.i[s + 1])),
  13070. (f = this.getTransformedPoint(i, r.v[s + 1])),
  13071. this.checkBounds(o, n, l, f, t);
  13072. r.c &&
  13073. ((o = this.getTransformedPoint(i, r.v[s])),
  13074. (n = this.getTransformedPoint(i, r.o[s])),
  13075. (l = this.getTransformedPoint(i, r.i[0])),
  13076. (f = this.getTransformedPoint(i, r.v[0])),
  13077. this.checkBounds(o, n, l, f, t));
  13078. }
  13079. }),
  13080. (HShapeElement.prototype.checkBounds = function (e, t, r, i, s) {
  13081. this.getBoundsOfCurve(e, t, r, i);
  13082. var a = this.shapeBoundingBox;
  13083. (s.x = bmMin(a.left, s.x)),
  13084. (s.xMax = bmMax(a.right, s.xMax)),
  13085. (s.y = bmMin(a.top, s.y)),
  13086. (s.yMax = bmMax(a.bottom, s.yMax));
  13087. }),
  13088. (HShapeElement.prototype.shapeBoundingBox = {
  13089. left: 0,
  13090. right: 0,
  13091. top: 0,
  13092. bottom: 0
  13093. }),
  13094. (HShapeElement.prototype.tempBoundingBox = {
  13095. x: 0,
  13096. xMax: 0,
  13097. y: 0,
  13098. yMax: 0,
  13099. width: 0,
  13100. height: 0
  13101. }),
  13102. (HShapeElement.prototype.getBoundsOfCurve = function (e, t, r, i) {
  13103. for (
  13104. var s = [
  13105. [e[0], i[0]],
  13106. [e[1], i[1]]
  13107. ],
  13108. a,
  13109. o,
  13110. n,
  13111. l,
  13112. f,
  13113. g,
  13114. S,
  13115. c = 0;
  13116. c < 2;
  13117. ++c
  13118. )
  13119. (o = 6 * e[c] - 12 * t[c] + 6 * r[c]),
  13120. (a = -3 * e[c] + 9 * t[c] - 9 * r[c] + 3 * i[c]),
  13121. (n = 3 * t[c] - 3 * e[c]),
  13122. (o |= 0),
  13123. (a |= 0),
  13124. (n |= 0),
  13125. (a === 0 && o === 0) ||
  13126. (a === 0
  13127. ? ((l = -n / o),
  13128. l > 0 &&
  13129. l < 1 &&
  13130. s[c].push(this.calculateF(l, e, t, r, i, c)))
  13131. : ((f = o * o - 4 * n * a),
  13132. f >= 0 &&
  13133. ((g = (-o + bmSqrt(f)) / (2 * a)),
  13134. g > 0 &&
  13135. g < 1 &&
  13136. s[c].push(this.calculateF(g, e, t, r, i, c)),
  13137. (S = (-o - bmSqrt(f)) / (2 * a)),
  13138. S > 0 &&
  13139. S < 1 &&
  13140. s[c].push(this.calculateF(S, e, t, r, i, c)))));
  13141. (this.shapeBoundingBox.left = bmMin.apply(null, s[0])),
  13142. (this.shapeBoundingBox.top = bmMin.apply(null, s[1])),
  13143. (this.shapeBoundingBox.right = bmMax.apply(null, s[0])),
  13144. (this.shapeBoundingBox.bottom = bmMax.apply(null, s[1]));
  13145. }),
  13146. (HShapeElement.prototype.calculateF = function (e, t, r, i, s, a) {
  13147. return (
  13148. bmPow(1 - e, 3) * t[a] +
  13149. 3 * bmPow(1 - e, 2) * e * r[a] +
  13150. 3 * (1 - e) * bmPow(e, 2) * i[a] +
  13151. bmPow(e, 3) * s[a]
  13152. );
  13153. }),
  13154. (HShapeElement.prototype.calculateBoundingBox = function (e, t) {
  13155. var r,
  13156. i = e.length;
  13157. for (r = 0; r < i; r += 1)
  13158. e[r] && e[r].sh
  13159. ? this.calculateShapeBoundingBox(e[r], t)
  13160. : e[r] && e[r].it
  13161. ? this.calculateBoundingBox(e[r].it, t)
  13162. : e[r] &&
  13163. e[r].style &&
  13164. e[r].w &&
  13165. this.expandStrokeBoundingBox(e[r].w, t);
  13166. }),
  13167. (HShapeElement.prototype.expandStrokeBoundingBox = function (e, t) {
  13168. var r = 0;
  13169. if (e.keyframes) {
  13170. for (var i = 0; i < e.keyframes.length; i += 1) {
  13171. var s = e.keyframes[i].s;
  13172. s > r && (r = s);
  13173. }
  13174. r *= e.mult;
  13175. } else r = e.v * e.mult;
  13176. (t.x -= r), (t.xMax += r), (t.y -= r), (t.yMax += r);
  13177. }),
  13178. (HShapeElement.prototype.currentBoxContains = function (e) {
  13179. return (
  13180. this.currentBBox.x <= e.x &&
  13181. this.currentBBox.y <= e.y &&
  13182. this.currentBBox.width + this.currentBBox.x >= e.x + e.width &&
  13183. this.currentBBox.height + this.currentBBox.y >= e.y + e.height
  13184. );
  13185. }),
  13186. (HShapeElement.prototype.renderInnerContent = function () {
  13187. if (
  13188. (this._renderShapeFrame(),
  13189. !this.hidden && (this._isFirstFrame || this._mdf))
  13190. ) {
  13191. var e = this.tempBoundingBox,
  13192. t = 999999;
  13193. if (
  13194. ((e.x = t),
  13195. (e.xMax = -t),
  13196. (e.y = t),
  13197. (e.yMax = -t),
  13198. this.calculateBoundingBox(this.itemsData, e),
  13199. (e.width = e.xMax < e.x ? 0 : e.xMax - e.x),
  13200. (e.height = e.yMax < e.y ? 0 : e.yMax - e.y),
  13201. this.currentBoxContains(e))
  13202. )
  13203. return;
  13204. var r = !1;
  13205. if (
  13206. (this.currentBBox.w !== e.width &&
  13207. ((this.currentBBox.w = e.width),
  13208. this.shapeCont.setAttribute('width', e.width),
  13209. (r = !0)),
  13210. this.currentBBox.h !== e.height &&
  13211. ((this.currentBBox.h = e.height),
  13212. this.shapeCont.setAttribute('height', e.height),
  13213. (r = !0)),
  13214. r || this.currentBBox.x !== e.x || this.currentBBox.y !== e.y)
  13215. ) {
  13216. (this.currentBBox.w = e.width),
  13217. (this.currentBBox.h = e.height),
  13218. (this.currentBBox.x = e.x),
  13219. (this.currentBBox.y = e.y),
  13220. this.shapeCont.setAttribute(
  13221. 'viewBox',
  13222. this.currentBBox.x +
  13223. ' ' +
  13224. this.currentBBox.y +
  13225. ' ' +
  13226. this.currentBBox.w +
  13227. ' ' +
  13228. this.currentBBox.h
  13229. );
  13230. var i = this.shapeCont.style,
  13231. s =
  13232. 'translate(' +
  13233. this.currentBBox.x +
  13234. 'px,' +
  13235. this.currentBBox.y +
  13236. 'px)';
  13237. (i.transform = s), (i.webkitTransform = s);
  13238. }
  13239. }
  13240. });
  13241. function HTextElement(e, t, r) {
  13242. (this.textSpans = []),
  13243. (this.textPaths = []),
  13244. (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }),
  13245. (this.renderType = 'svg'),
  13246. (this.isMasked = !1),
  13247. this.initElement(e, t, r);
  13248. }
  13249. extendPrototype(
  13250. [
  13251. BaseElement,
  13252. TransformElement,
  13253. HBaseElement,
  13254. HierarchyElement,
  13255. FrameElement,
  13256. RenderableDOMElement,
  13257. ITextElement
  13258. ],
  13259. HTextElement
  13260. ),
  13261. (HTextElement.prototype.createContent = function () {
  13262. if (((this.isMasked = this.checkMasks()), this.isMasked)) {
  13263. (this.renderType = 'svg'),
  13264. (this.compW = this.comp.data.w),
  13265. (this.compH = this.comp.data.h),
  13266. this.svgElement.setAttribute('width', this.compW),
  13267. this.svgElement.setAttribute('height', this.compH);
  13268. var e = createNS('g');
  13269. this.maskedElement.appendChild(e), (this.innerElem = e);
  13270. } else
  13271. (this.renderType = 'html'), (this.innerElem = this.layerElement);
  13272. this.checkParenting();
  13273. }),
  13274. (HTextElement.prototype.buildNewText = function () {
  13275. var e = this.textProperty.currentData;
  13276. this.renderedLetters = createSizedArray(e.l ? e.l.length : 0);
  13277. var t = this.innerElem.style,
  13278. r = e.fc ? this.buildColor(e.fc) : 'rgba(0,0,0,0)';
  13279. (t.fill = r),
  13280. (t.color = r),
  13281. e.sc &&
  13282. ((t.stroke = this.buildColor(e.sc)),
  13283. (t.strokeWidth = e.sw + 'px'));
  13284. var i = this.globalData.fontManager.getFontByName(e.f);
  13285. if (!this.globalData.fontManager.chars)
  13286. if (
  13287. ((t.fontSize = e.finalSize + 'px'),
  13288. (t.lineHeight = e.finalSize + 'px'),
  13289. i.fClass)
  13290. )
  13291. this.innerElem.className = i.fClass;
  13292. else {
  13293. t.fontFamily = i.fFamily;
  13294. var s = e.fWeight,
  13295. a = e.fStyle;
  13296. (t.fontStyle = a), (t.fontWeight = s);
  13297. }
  13298. var o,
  13299. n,
  13300. l = e.l;
  13301. n = l.length;
  13302. var f,
  13303. g,
  13304. S,
  13305. c = this.mHelper,
  13306. P,
  13307. d = '',
  13308. p = 0;
  13309. for (o = 0; o < n; o += 1) {
  13310. if (
  13311. (this.globalData.fontManager.chars
  13312. ? (this.textPaths[p]
  13313. ? (f = this.textPaths[p])
  13314. : ((f = createNS('path')),
  13315. f.setAttribute('stroke-linecap', lineCapEnum[1]),
  13316. f.setAttribute('stroke-linejoin', lineJoinEnum[2]),
  13317. f.setAttribute('stroke-miterlimit', '4')),
  13318. this.isMasked ||
  13319. (this.textSpans[p]
  13320. ? ((g = this.textSpans[p]), (S = g.children[0]))
  13321. : ((g = createTag('div')),
  13322. (g.style.lineHeight = 0),
  13323. (S = createNS('svg')),
  13324. S.appendChild(f),
  13325. styleDiv(g))))
  13326. : this.isMasked
  13327. ? (f = this.textPaths[p] ? this.textPaths[p] : createNS('text'))
  13328. : this.textSpans[p]
  13329. ? ((g = this.textSpans[p]), (f = this.textPaths[p]))
  13330. : ((g = createTag('span')),
  13331. styleDiv(g),
  13332. (f = createTag('span')),
  13333. styleDiv(f),
  13334. g.appendChild(f)),
  13335. this.globalData.fontManager.chars)
  13336. ) {
  13337. var x = this.globalData.fontManager.getCharData(
  13338. e.finalText[o],
  13339. i.fStyle,
  13340. this.globalData.fontManager.getFontByName(e.f).fFamily
  13341. ),
  13342. u;
  13343. if (
  13344. (x ? (u = x.data) : (u = null),
  13345. c.reset(),
  13346. u &&
  13347. u.shapes &&
  13348. u.shapes.length &&
  13349. ((P = u.shapes[0].it),
  13350. c.scale(e.finalSize / 100, e.finalSize / 100),
  13351. (d = this.createPathShape(c, P)),
  13352. f.setAttribute('d', d)),
  13353. this.isMasked)
  13354. )
  13355. this.innerElem.appendChild(f);
  13356. else {
  13357. if ((this.innerElem.appendChild(g), u && u.shapes)) {
  13358. document.body.appendChild(S);
  13359. var y = S.getBBox();
  13360. S.setAttribute('width', y.width + 2),
  13361. S.setAttribute('height', y.height + 2),
  13362. S.setAttribute(
  13363. 'viewBox',
  13364. y.x -
  13365. 1 +
  13366. ' ' +
  13367. (y.y - 1) +
  13368. ' ' +
  13369. (y.width + 2) +
  13370. ' ' +
  13371. (y.height + 2)
  13372. );
  13373. var m = S.style,
  13374. A = 'translate(' + (y.x - 1) + 'px,' + (y.y - 1) + 'px)';
  13375. (m.transform = A),
  13376. (m.webkitTransform = A),
  13377. (l[o].yOffset = y.y - 1);
  13378. } else S.setAttribute('width', 1), S.setAttribute('height', 1);
  13379. g.appendChild(S);
  13380. }
  13381. } else if (
  13382. ((f.textContent = l[o].val),
  13383. f.setAttributeNS(
  13384. 'http://www.w3.org/XML/1998/namespace',
  13385. 'xml:space',
  13386. 'preserve'
  13387. ),
  13388. this.isMasked)
  13389. )
  13390. this.innerElem.appendChild(f);
  13391. else {
  13392. this.innerElem.appendChild(g);
  13393. var T = f.style,
  13394. E = 'translate3d(0,' + -e.finalSize / 1.2 + 'px,0)';
  13395. (T.transform = E), (T.webkitTransform = E);
  13396. }
  13397. this.isMasked ? (this.textSpans[p] = f) : (this.textSpans[p] = g),
  13398. (this.textSpans[p].style.display = 'block'),
  13399. (this.textPaths[p] = f),
  13400. (p += 1);
  13401. }
  13402. for (; p < this.textSpans.length; )
  13403. (this.textSpans[p].style.display = 'none'), (p += 1);
  13404. }),
  13405. (HTextElement.prototype.renderInnerContent = function () {
  13406. this.validateText();
  13407. var e;
  13408. if (this.data.singleShape) {
  13409. if (!this._isFirstFrame && !this.lettersChangedFlag) return;
  13410. if (this.isMasked && this.finalTransform._matMdf) {
  13411. this.svgElement.setAttribute(
  13412. 'viewBox',
  13413. -this.finalTransform.mProp.p.v[0] +
  13414. ' ' +
  13415. -this.finalTransform.mProp.p.v[1] +
  13416. ' ' +
  13417. this.compW +
  13418. ' ' +
  13419. this.compH
  13420. ),
  13421. (e = this.svgElement.style);
  13422. var t =
  13423. 'translate(' +
  13424. -this.finalTransform.mProp.p.v[0] +
  13425. 'px,' +
  13426. -this.finalTransform.mProp.p.v[1] +
  13427. 'px)';
  13428. (e.transform = t), (e.webkitTransform = t);
  13429. }
  13430. }
  13431. if (
  13432. (this.textAnimator.getMeasures(
  13433. this.textProperty.currentData,
  13434. this.lettersChangedFlag
  13435. ),
  13436. !(
  13437. !this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag
  13438. ))
  13439. ) {
  13440. var r,
  13441. i,
  13442. s = 0,
  13443. a = this.textAnimator.renderedLetters,
  13444. o = this.textProperty.currentData.l;
  13445. i = o.length;
  13446. var n, l, f;
  13447. for (r = 0; r < i; r += 1)
  13448. o[r].n
  13449. ? (s += 1)
  13450. : ((l = this.textSpans[r]),
  13451. (f = this.textPaths[r]),
  13452. (n = a[s]),
  13453. (s += 1),
  13454. n._mdf.m &&
  13455. (this.isMasked
  13456. ? l.setAttribute('transform', n.m)
  13457. : ((l.style.webkitTransform = n.m),
  13458. (l.style.transform = n.m))),
  13459. (l.style.opacity = n.o),
  13460. n.sw && n._mdf.sw && f.setAttribute('stroke-width', n.sw),
  13461. n.sc && n._mdf.sc && f.setAttribute('stroke', n.sc),
  13462. n.fc &&
  13463. n._mdf.fc &&
  13464. (f.setAttribute('fill', n.fc), (f.style.color = n.fc)));
  13465. if (
  13466. this.innerElem.getBBox &&
  13467. !this.hidden &&
  13468. (this._isFirstFrame || this._mdf)
  13469. ) {
  13470. var g = this.innerElem.getBBox();
  13471. this.currentBBox.w !== g.width &&
  13472. ((this.currentBBox.w = g.width),
  13473. this.svgElement.setAttribute('width', g.width)),
  13474. this.currentBBox.h !== g.height &&
  13475. ((this.currentBBox.h = g.height),
  13476. this.svgElement.setAttribute('height', g.height));
  13477. var S = 1;
  13478. if (
  13479. this.currentBBox.w !== g.width + S * 2 ||
  13480. this.currentBBox.h !== g.height + S * 2 ||
  13481. this.currentBBox.x !== g.x - S ||
  13482. this.currentBBox.y !== g.y - S
  13483. ) {
  13484. (this.currentBBox.w = g.width + S * 2),
  13485. (this.currentBBox.h = g.height + S * 2),
  13486. (this.currentBBox.x = g.x - S),
  13487. (this.currentBBox.y = g.y - S),
  13488. this.svgElement.setAttribute(
  13489. 'viewBox',
  13490. this.currentBBox.x +
  13491. ' ' +
  13492. this.currentBBox.y +
  13493. ' ' +
  13494. this.currentBBox.w +
  13495. ' ' +
  13496. this.currentBBox.h
  13497. ),
  13498. (e = this.svgElement.style);
  13499. var c =
  13500. 'translate(' +
  13501. this.currentBBox.x +
  13502. 'px,' +
  13503. this.currentBBox.y +
  13504. 'px)';
  13505. (e.transform = c), (e.webkitTransform = c);
  13506. }
  13507. }
  13508. }
  13509. });
  13510. function HCameraElement(e, t, r) {
  13511. this.initFrame(), this.initBaseData(e, t, r), this.initHierarchy();
  13512. var i = PropertyFactory.getProp;
  13513. if (
  13514. ((this.pe = i(this, e.pe, 0, 0, this)),
  13515. e.ks.p.s
  13516. ? ((this.px = i(this, e.ks.p.x, 1, 0, this)),
  13517. (this.py = i(this, e.ks.p.y, 1, 0, this)),
  13518. (this.pz = i(this, e.ks.p.z, 1, 0, this)))
  13519. : (this.p = i(this, e.ks.p, 1, 0, this)),
  13520. e.ks.a && (this.a = i(this, e.ks.a, 1, 0, this)),
  13521. e.ks.or.k.length && e.ks.or.k[0].to)
  13522. ) {
  13523. var s,
  13524. a = e.ks.or.k.length;
  13525. for (s = 0; s < a; s += 1)
  13526. (e.ks.or.k[s].to = null), (e.ks.or.k[s].ti = null);
  13527. }
  13528. (this.or = i(this, e.ks.or, 1, degToRads, this)),
  13529. (this.or.sh = !0),
  13530. (this.rx = i(this, e.ks.rx, 0, degToRads, this)),
  13531. (this.ry = i(this, e.ks.ry, 0, degToRads, this)),
  13532. (this.rz = i(this, e.ks.rz, 0, degToRads, this)),
  13533. (this.mat = new Matrix()),
  13534. (this._prevMat = new Matrix()),
  13535. (this._isFirstFrame = !0),
  13536. (this.finalTransform = { mProp: this });
  13537. }
  13538. extendPrototype(
  13539. [BaseElement, FrameElement, HierarchyElement],
  13540. HCameraElement
  13541. ),
  13542. (HCameraElement.prototype.setup = function () {
  13543. var e,
  13544. t = this.comp.threeDElements.length,
  13545. r,
  13546. i,
  13547. s;
  13548. for (e = 0; e < t; e += 1)
  13549. if (((r = this.comp.threeDElements[e]), r.type === '3d')) {
  13550. (i = r.perspectiveElem.style), (s = r.container.style);
  13551. var a = this.pe.v + 'px',
  13552. o = '0px 0px 0px',
  13553. n = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
  13554. (i.perspective = a),
  13555. (i.webkitPerspective = a),
  13556. (s.transformOrigin = o),
  13557. (s.mozTransformOrigin = o),
  13558. (s.webkitTransformOrigin = o),
  13559. (i.transform = n),
  13560. (i.webkitTransform = n);
  13561. }
  13562. }),
  13563. (HCameraElement.prototype.createElements = function () {}),
  13564. (HCameraElement.prototype.hide = function () {}),
  13565. (HCameraElement.prototype.renderFrame = function () {
  13566. var e = this._isFirstFrame,
  13567. t,
  13568. r;
  13569. if (this.hierarchy)
  13570. for (r = this.hierarchy.length, t = 0; t < r; t += 1)
  13571. e = this.hierarchy[t].finalTransform.mProp._mdf || e;
  13572. if (
  13573. e ||
  13574. this.pe._mdf ||
  13575. (this.p && this.p._mdf) ||
  13576. (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) ||
  13577. this.rx._mdf ||
  13578. this.ry._mdf ||
  13579. this.rz._mdf ||
  13580. this.or._mdf ||
  13581. (this.a && this.a._mdf)
  13582. ) {
  13583. if ((this.mat.reset(), this.hierarchy))
  13584. for (r = this.hierarchy.length - 1, t = r; t >= 0; t -= 1) {
  13585. var i = this.hierarchy[t].finalTransform.mProp;
  13586. this.mat.translate(-i.p.v[0], -i.p.v[1], i.p.v[2]),
  13587. this.mat
  13588. .rotateX(-i.or.v[0])
  13589. .rotateY(-i.or.v[1])
  13590. .rotateZ(i.or.v[2]),
  13591. this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),
  13592. this.mat.scale(1 / i.s.v[0], 1 / i.s.v[1], 1 / i.s.v[2]),
  13593. this.mat.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
  13594. }
  13595. if (
  13596. (this.p
  13597. ? this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2])
  13598. : this.mat.translate(-this.px.v, -this.py.v, this.pz.v),
  13599. this.a)
  13600. ) {
  13601. var s;
  13602. this.p
  13603. ? (s = [
  13604. this.p.v[0] - this.a.v[0],
  13605. this.p.v[1] - this.a.v[1],
  13606. this.p.v[2] - this.a.v[2]
  13607. ])
  13608. : (s = [
  13609. this.px.v - this.a.v[0],
  13610. this.py.v - this.a.v[1],
  13611. this.pz.v - this.a.v[2]
  13612. ]);
  13613. var a = Math.sqrt(
  13614. Math.pow(s[0], 2) + Math.pow(s[1], 2) + Math.pow(s[2], 2)
  13615. ),
  13616. o = [s[0] / a, s[1] / a, s[2] / a],
  13617. n = Math.sqrt(o[2] * o[2] + o[0] * o[0]),
  13618. l = Math.atan2(o[1], n),
  13619. f = Math.atan2(o[0], -o[2]);
  13620. this.mat.rotateY(f).rotateX(-l);
  13621. }
  13622. this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),
  13623. this.mat
  13624. .rotateX(-this.or.v[0])
  13625. .rotateY(-this.or.v[1])
  13626. .rotateZ(this.or.v[2]),
  13627. this.mat.translate(
  13628. this.globalData.compSize.w / 2,
  13629. this.globalData.compSize.h / 2,
  13630. 0
  13631. ),
  13632. this.mat.translate(0, 0, this.pe.v);
  13633. var g = !this._prevMat.equals(this.mat);
  13634. if ((g || this.pe._mdf) && this.comp.threeDElements) {
  13635. r = this.comp.threeDElements.length;
  13636. var S, c, P;
  13637. for (t = 0; t < r; t += 1)
  13638. if (((S = this.comp.threeDElements[t]), S.type === '3d')) {
  13639. if (g) {
  13640. var d = this.mat.toCSS();
  13641. (P = S.container.style),
  13642. (P.transform = d),
  13643. (P.webkitTransform = d);
  13644. }
  13645. this.pe._mdf &&
  13646. ((c = S.perspectiveElem.style),
  13647. (c.perspective = this.pe.v + 'px'),
  13648. (c.webkitPerspective = this.pe.v + 'px'));
  13649. }
  13650. this.mat.clone(this._prevMat);
  13651. }
  13652. }
  13653. this._isFirstFrame = !1;
  13654. }),
  13655. (HCameraElement.prototype.prepareFrame = function (e) {
  13656. this.prepareProperties(e, !0);
  13657. }),
  13658. (HCameraElement.prototype.destroy = function () {}),
  13659. (HCameraElement.prototype.getBaseElement = function () {
  13660. return null;
  13661. });
  13662. function HImageElement(e, t, r) {
  13663. (this.assetData = t.getAssetData(e.refId)), this.initElement(e, t, r);
  13664. }
  13665. extendPrototype(
  13666. [
  13667. BaseElement,
  13668. TransformElement,
  13669. HBaseElement,
  13670. HSolidElement,
  13671. HierarchyElement,
  13672. FrameElement,
  13673. RenderableElement
  13674. ],
  13675. HImageElement
  13676. ),
  13677. (HImageElement.prototype.createContent = function () {
  13678. var e = this.globalData.getAssetsPath(this.assetData),
  13679. t = new Image();
  13680. this.data.hasMask
  13681. ? ((this.imageElem = createNS('image')),
  13682. this.imageElem.setAttribute('width', this.assetData.w + 'px'),
  13683. this.imageElem.setAttribute('height', this.assetData.h + 'px'),
  13684. this.imageElem.setAttributeNS(
  13685. 'http://www.w3.org/1999/xlink',
  13686. 'href',
  13687. e
  13688. ),
  13689. this.layerElement.appendChild(this.imageElem),
  13690. this.baseElement.setAttribute('width', this.assetData.w),
  13691. this.baseElement.setAttribute('height', this.assetData.h))
  13692. : this.layerElement.appendChild(t),
  13693. (t.crossOrigin = 'anonymous'),
  13694. (t.src = e),
  13695. this.data.ln && this.baseElement.setAttribute('id', this.data.ln);
  13696. });
  13697. function HybridRendererBase(e, t) {
  13698. (this.animationItem = e),
  13699. (this.layers = null),
  13700. (this.renderedFrame = -1),
  13701. (this.renderConfig = {
  13702. className: (t && t.className) || '',
  13703. imagePreserveAspectRatio:
  13704. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  13705. hideOnTransparent: !(t && t.hideOnTransparent === !1),
  13706. filterSize: {
  13707. width: (t && t.filterSize && t.filterSize.width) || '400%',
  13708. height: (t && t.filterSize && t.filterSize.height) || '400%',
  13709. x: (t && t.filterSize && t.filterSize.x) || '-100%',
  13710. y: (t && t.filterSize && t.filterSize.y) || '-100%'
  13711. }
  13712. }),
  13713. (this.globalData = {
  13714. _mdf: !1,
  13715. frameNum: -1,
  13716. renderConfig: this.renderConfig
  13717. }),
  13718. (this.pendingElements = []),
  13719. (this.elements = []),
  13720. (this.threeDElements = []),
  13721. (this.destroyed = !1),
  13722. (this.camera = null),
  13723. (this.supports3d = !0),
  13724. (this.rendererType = 'html');
  13725. }
  13726. extendPrototype([BaseRenderer], HybridRendererBase),
  13727. (HybridRendererBase.prototype.buildItem =
  13728. SVGRenderer.prototype.buildItem),
  13729. (HybridRendererBase.prototype.checkPendingElements = function () {
  13730. for (; this.pendingElements.length; ) {
  13731. var e = this.pendingElements.pop();
  13732. e.checkParenting();
  13733. }
  13734. }),
  13735. (HybridRendererBase.prototype.appendElementInPos = function (e, t) {
  13736. var r = e.getBaseElement();
  13737. if (r) {
  13738. var i = this.layers[t];
  13739. if (!i.ddd || !this.supports3d)
  13740. if (this.threeDElements) this.addTo3dContainer(r, t);
  13741. else {
  13742. for (var s = 0, a, o, n; s < t; )
  13743. this.elements[s] &&
  13744. this.elements[s] !== !0 &&
  13745. this.elements[s].getBaseElement &&
  13746. ((o = this.elements[s]),
  13747. (n = this.layers[s].ddd
  13748. ? this.getThreeDContainerByPos(s)
  13749. : o.getBaseElement()),
  13750. (a = n || a)),
  13751. (s += 1);
  13752. a
  13753. ? (!i.ddd || !this.supports3d) &&
  13754. this.layerElement.insertBefore(r, a)
  13755. : (!i.ddd || !this.supports3d) &&
  13756. this.layerElement.appendChild(r);
  13757. }
  13758. else this.addTo3dContainer(r, t);
  13759. }
  13760. }),
  13761. (HybridRendererBase.prototype.createShape = function (e) {
  13762. return this.supports3d
  13763. ? new HShapeElement(e, this.globalData, this)
  13764. : new SVGShapeElement(e, this.globalData, this);
  13765. }),
  13766. (HybridRendererBase.prototype.createText = function (e) {
  13767. return this.supports3d
  13768. ? new HTextElement(e, this.globalData, this)
  13769. : new SVGTextLottieElement(e, this.globalData, this);
  13770. }),
  13771. (HybridRendererBase.prototype.createCamera = function (e) {
  13772. return (
  13773. (this.camera = new HCameraElement(e, this.globalData, this)),
  13774. this.camera
  13775. );
  13776. }),
  13777. (HybridRendererBase.prototype.createImage = function (e) {
  13778. return this.supports3d
  13779. ? new HImageElement(e, this.globalData, this)
  13780. : new IImageElement(e, this.globalData, this);
  13781. }),
  13782. (HybridRendererBase.prototype.createSolid = function (e) {
  13783. return this.supports3d
  13784. ? new HSolidElement(e, this.globalData, this)
  13785. : new ISolidElement(e, this.globalData, this);
  13786. }),
  13787. (HybridRendererBase.prototype.createNull =
  13788. SVGRenderer.prototype.createNull),
  13789. (HybridRendererBase.prototype.getThreeDContainerByPos = function (e) {
  13790. for (var t = 0, r = this.threeDElements.length; t < r; ) {
  13791. if (
  13792. this.threeDElements[t].startPos <= e &&
  13793. this.threeDElements[t].endPos >= e
  13794. )
  13795. return this.threeDElements[t].perspectiveElem;
  13796. t += 1;
  13797. }
  13798. return null;
  13799. }),
  13800. (HybridRendererBase.prototype.createThreeDContainer = function (e, t) {
  13801. var r = createTag('div'),
  13802. i,
  13803. s;
  13804. styleDiv(r);
  13805. var a = createTag('div');
  13806. if ((styleDiv(a), t === '3d')) {
  13807. (i = r.style),
  13808. (i.width = this.globalData.compSize.w + 'px'),
  13809. (i.height = this.globalData.compSize.h + 'px');
  13810. var o = '50% 50%';
  13811. (i.webkitTransformOrigin = o),
  13812. (i.mozTransformOrigin = o),
  13813. (i.transformOrigin = o),
  13814. (s = a.style);
  13815. var n = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
  13816. (s.transform = n), (s.webkitTransform = n);
  13817. }
  13818. r.appendChild(a);
  13819. var l = {
  13820. container: a,
  13821. perspectiveElem: r,
  13822. startPos: e,
  13823. endPos: e,
  13824. type: t
  13825. };
  13826. return this.threeDElements.push(l), l;
  13827. }),
  13828. (HybridRendererBase.prototype.build3dContainers = function () {
  13829. var e,
  13830. t = this.layers.length,
  13831. r,
  13832. i = '';
  13833. for (e = 0; e < t; e += 1)
  13834. this.layers[e].ddd && this.layers[e].ty !== 3
  13835. ? (i !== '3d' &&
  13836. ((i = '3d'), (r = this.createThreeDContainer(e, '3d'))),
  13837. (r.endPos = Math.max(r.endPos, e)))
  13838. : (i !== '2d' &&
  13839. ((i = '2d'), (r = this.createThreeDContainer(e, '2d'))),
  13840. (r.endPos = Math.max(r.endPos, e)));
  13841. for (t = this.threeDElements.length, e = t - 1; e >= 0; e -= 1)
  13842. this.resizerElem.appendChild(
  13843. this.threeDElements[e].perspectiveElem
  13844. );
  13845. }),
  13846. (HybridRendererBase.prototype.addTo3dContainer = function (e, t) {
  13847. for (var r = 0, i = this.threeDElements.length; r < i; ) {
  13848. if (t <= this.threeDElements[r].endPos) {
  13849. for (var s = this.threeDElements[r].startPos, a; s < t; )
  13850. this.elements[s] &&
  13851. this.elements[s].getBaseElement &&
  13852. (a = this.elements[s].getBaseElement()),
  13853. (s += 1);
  13854. a
  13855. ? this.threeDElements[r].container.insertBefore(e, a)
  13856. : this.threeDElements[r].container.appendChild(e);
  13857. break;
  13858. }
  13859. r += 1;
  13860. }
  13861. }),
  13862. (HybridRendererBase.prototype.configAnimation = function (e) {
  13863. var t = createTag('div'),
  13864. r = this.animationItem.wrapper,
  13865. i = t.style;
  13866. (i.width = e.w + 'px'),
  13867. (i.height = e.h + 'px'),
  13868. (this.resizerElem = t),
  13869. styleDiv(t),
  13870. (i.transformStyle = 'flat'),
  13871. (i.mozTransformStyle = 'flat'),
  13872. (i.webkitTransformStyle = 'flat'),
  13873. this.renderConfig.className &&
  13874. t.setAttribute('class', this.renderConfig.className),
  13875. r.appendChild(t),
  13876. (i.overflow = 'hidden');
  13877. var s = createNS('svg');
  13878. s.setAttribute('width', '1'),
  13879. s.setAttribute('height', '1'),
  13880. styleDiv(s),
  13881. this.resizerElem.appendChild(s);
  13882. var a = createNS('defs');
  13883. s.appendChild(a),
  13884. (this.data = e),
  13885. this.setupGlobalData(e, s),
  13886. (this.globalData.defs = a),
  13887. (this.layers = e.layers),
  13888. (this.layerElement = this.resizerElem),
  13889. this.build3dContainers(),
  13890. this.updateContainerSize();
  13891. }),
  13892. (HybridRendererBase.prototype.destroy = function () {
  13893. this.animationItem.wrapper &&
  13894. (this.animationItem.wrapper.innerText = ''),
  13895. (this.animationItem.container = null),
  13896. (this.globalData.defs = null);
  13897. var e,
  13898. t = this.layers ? this.layers.length : 0;
  13899. for (e = 0; e < t; e += 1)
  13900. this.elements[e] &&
  13901. this.elements[e].destroy &&
  13902. this.elements[e].destroy();
  13903. (this.elements.length = 0),
  13904. (this.destroyed = !0),
  13905. (this.animationItem = null);
  13906. }),
  13907. (HybridRendererBase.prototype.updateContainerSize = function () {
  13908. var e = this.animationItem.wrapper.offsetWidth,
  13909. t = this.animationItem.wrapper.offsetHeight,
  13910. r = e / t,
  13911. i = this.globalData.compSize.w / this.globalData.compSize.h,
  13912. s,
  13913. a,
  13914. o,
  13915. n;
  13916. i > r
  13917. ? ((s = e / this.globalData.compSize.w),
  13918. (a = e / this.globalData.compSize.w),
  13919. (o = 0),
  13920. (n =
  13921. (t -
  13922. this.globalData.compSize.h *
  13923. (e / this.globalData.compSize.w)) /
  13924. 2))
  13925. : ((s = t / this.globalData.compSize.h),
  13926. (a = t / this.globalData.compSize.h),
  13927. (o =
  13928. (e -
  13929. this.globalData.compSize.w *
  13930. (t / this.globalData.compSize.h)) /
  13931. 2),
  13932. (n = 0));
  13933. var l = this.resizerElem.style;
  13934. (l.webkitTransform =
  13935. 'matrix3d(' +
  13936. s +
  13937. ',0,0,0,0,' +
  13938. a +
  13939. ',0,0,0,0,1,0,' +
  13940. o +
  13941. ',' +
  13942. n +
  13943. ',0,1)'),
  13944. (l.transform = l.webkitTransform);
  13945. }),
  13946. (HybridRendererBase.prototype.renderFrame =
  13947. SVGRenderer.prototype.renderFrame),
  13948. (HybridRendererBase.prototype.hide = function () {
  13949. this.resizerElem.style.display = 'none';
  13950. }),
  13951. (HybridRendererBase.prototype.show = function () {
  13952. this.resizerElem.style.display = 'block';
  13953. }),
  13954. (HybridRendererBase.prototype.initItems = function () {
  13955. if ((this.buildAllItems(), this.camera)) this.camera.setup();
  13956. else {
  13957. var e = this.globalData.compSize.w,
  13958. t = this.globalData.compSize.h,
  13959. r,
  13960. i = this.threeDElements.length;
  13961. for (r = 0; r < i; r += 1) {
  13962. var s = this.threeDElements[r].perspectiveElem.style;
  13963. (s.webkitPerspective =
  13964. Math.sqrt(Math.pow(e, 2) + Math.pow(t, 2)) + 'px'),
  13965. (s.perspective = s.webkitPerspective);
  13966. }
  13967. }
  13968. }),
  13969. (HybridRendererBase.prototype.searchExtraCompositions = function (e) {
  13970. var t,
  13971. r = e.length,
  13972. i = createTag('div');
  13973. for (t = 0; t < r; t += 1)
  13974. if (e[t].xt) {
  13975. var s = this.createComp(e[t], i, this.globalData.comp, null);
  13976. s.initExpressions(),
  13977. this.globalData.projectInterface.registerComposition(s);
  13978. }
  13979. });
  13980. function HCompElement(e, t, r) {
  13981. (this.layers = e.layers),
  13982. (this.supports3d = !e.hasMask),
  13983. (this.completeLayers = !1),
  13984. (this.pendingElements = []),
  13985. (this.elements = this.layers
  13986. ? createSizedArray(this.layers.length)
  13987. : []),
  13988. this.initElement(e, t, r),
  13989. (this.tm = e.tm
  13990. ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
  13991. : { _placeholder: !0 });
  13992. }
  13993. extendPrototype(
  13994. [HybridRendererBase, ICompElement, HBaseElement],
  13995. HCompElement
  13996. ),
  13997. (HCompElement.prototype._createBaseContainerElements =
  13998. HCompElement.prototype.createContainerElements),
  13999. (HCompElement.prototype.createContainerElements = function () {
  14000. this._createBaseContainerElements(),
  14001. this.data.hasMask
  14002. ? (this.svgElement.setAttribute('width', this.data.w),
  14003. this.svgElement.setAttribute('height', this.data.h),
  14004. (this.transformedElement = this.baseElement))
  14005. : (this.transformedElement = this.layerElement);
  14006. }),
  14007. (HCompElement.prototype.addTo3dContainer = function (e, t) {
  14008. for (var r = 0, i; r < t; )
  14009. this.elements[r] &&
  14010. this.elements[r].getBaseElement &&
  14011. (i = this.elements[r].getBaseElement()),
  14012. (r += 1);
  14013. i
  14014. ? this.layerElement.insertBefore(e, i)
  14015. : this.layerElement.appendChild(e);
  14016. }),
  14017. (HCompElement.prototype.createComp = function (e) {
  14018. return this.supports3d
  14019. ? new HCompElement(e, this.globalData, this)
  14020. : new SVGCompElement(e, this.globalData, this);
  14021. });
  14022. function HybridRenderer(e, t) {
  14023. (this.animationItem = e),
  14024. (this.layers = null),
  14025. (this.renderedFrame = -1),
  14026. (this.renderConfig = {
  14027. className: (t && t.className) || '',
  14028. imagePreserveAspectRatio:
  14029. (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
  14030. hideOnTransparent: !(t && t.hideOnTransparent === !1),
  14031. filterSize: {
  14032. width: (t && t.filterSize && t.filterSize.width) || '400%',
  14033. height: (t && t.filterSize && t.filterSize.height) || '400%',
  14034. x: (t && t.filterSize && t.filterSize.x) || '-100%',
  14035. y: (t && t.filterSize && t.filterSize.y) || '-100%'
  14036. },
  14037. runExpressions:
  14038. !t || t.runExpressions === void 0 || t.runExpressions
  14039. }),
  14040. (this.globalData = {
  14041. _mdf: !1,
  14042. frameNum: -1,
  14043. renderConfig: this.renderConfig
  14044. }),
  14045. (this.pendingElements = []),
  14046. (this.elements = []),
  14047. (this.threeDElements = []),
  14048. (this.destroyed = !1),
  14049. (this.camera = null),
  14050. (this.supports3d = !0),
  14051. (this.rendererType = 'html');
  14052. }
  14053. extendPrototype([HybridRendererBase], HybridRenderer),
  14054. (HybridRenderer.prototype.createComp = function (e) {
  14055. return this.supports3d
  14056. ? new HCompElement(e, this.globalData, this)
  14057. : new SVGCompElement(e, this.globalData, this);
  14058. });
  14059. var CompExpressionInterface = (function () {
  14060. return function (e) {
  14061. function t(r) {
  14062. for (var i = 0, s = e.layers.length; i < s; ) {
  14063. if (e.layers[i].nm === r || e.layers[i].ind === r)
  14064. return e.elements[i].layerInterface;
  14065. i += 1;
  14066. }
  14067. return null;
  14068. }
  14069. return (
  14070. Object.defineProperty(t, '_name', { value: e.data.nm }),
  14071. (t.layer = t),
  14072. (t.pixelAspect = 1),
  14073. (t.height = e.data.h || e.globalData.compSize.h),
  14074. (t.width = e.data.w || e.globalData.compSize.w),
  14075. (t.pixelAspect = 1),
  14076. (t.frameDuration = 1 / e.globalData.frameRate),
  14077. (t.displayStartTime = 0),
  14078. (t.numLayers = e.layers.length),
  14079. t
  14080. );
  14081. };
  14082. })();
  14083. function _typeof$2(e) {
  14084. '@babel/helpers - typeof';
  14085. return (
  14086. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  14087. ? (_typeof$2 = function (r) {
  14088. return typeof r;
  14089. })
  14090. : (_typeof$2 = function (r) {
  14091. return r &&
  14092. typeof Symbol == 'function' &&
  14093. r.constructor === Symbol &&
  14094. r !== Symbol.prototype
  14095. ? 'symbol'
  14096. : typeof r;
  14097. }),
  14098. _typeof$2(e)
  14099. );
  14100. }
  14101. function seedRandom(e, t) {
  14102. var r = this,
  14103. i = 256,
  14104. s = 6,
  14105. a = 52,
  14106. o = 'random',
  14107. n = t.pow(i, s),
  14108. l = t.pow(2, a),
  14109. f = l * 2,
  14110. g = i - 1,
  14111. S;
  14112. function c(m, A, T) {
  14113. var E = [];
  14114. A = A === !0 ? { entropy: !0 } : A || {};
  14115. var _ = x(p(A.entropy ? [m, y(e)] : m === null ? u() : m, 3), E),
  14116. I = new P(E),
  14117. B = function () {
  14118. for (var G = I.g(s), R = n, W = 0; G < l; )
  14119. (G = (G + W) * i), (R *= i), (W = I.g(1));
  14120. for (; G >= f; ) (G /= 2), (R /= 2), (W >>>= 1);
  14121. return (G + W) / R;
  14122. };
  14123. return (
  14124. (B.int32 = function () {
  14125. return I.g(4) | 0;
  14126. }),
  14127. (B.quick = function () {
  14128. return I.g(4) / 4294967296;
  14129. }),
  14130. (B.double = B),
  14131. x(y(I.S), e),
  14132. (
  14133. A.pass ||
  14134. T ||
  14135. function (z, G, R, W) {
  14136. return (
  14137. W &&
  14138. (W.S && d(W, I),
  14139. (z.state = function () {
  14140. return d(I, {});
  14141. })),
  14142. R ? ((t[o] = z), G) : z
  14143. );
  14144. }
  14145. )(B, _, 'global' in A ? A.global : this == t, A.state)
  14146. );
  14147. }
  14148. t['seed' + o] = c;
  14149. function P(m) {
  14150. var A,
  14151. T = m.length,
  14152. E = this,
  14153. _ = 0,
  14154. I = (E.i = E.j = 0),
  14155. B = (E.S = []);
  14156. for (T || (m = [T++]); _ < i; ) B[_] = _++;
  14157. for (_ = 0; _ < i; _++)
  14158. (B[_] = B[(I = g & (I + m[_ % T] + (A = B[_])))]), (B[I] = A);
  14159. E.g = function (z) {
  14160. for (var G, R = 0, W = E.i, H = E.j, N = E.S; z--; )
  14161. (G = N[(W = g & (W + 1))]),
  14162. (R =
  14163. R * i + N[g & ((N[W] = N[(H = g & (H + G))]) + (N[H] = G))]);
  14164. return (E.i = W), (E.j = H), R;
  14165. };
  14166. }
  14167. function d(m, A) {
  14168. return (A.i = m.i), (A.j = m.j), (A.S = m.S.slice()), A;
  14169. }
  14170. function p(m, A) {
  14171. var T = [],
  14172. E = _typeof$2(m),
  14173. _;
  14174. if (A && E == 'object')
  14175. for (_ in m)
  14176. try {
  14177. T.push(p(m[_], A - 1));
  14178. } catch (I) {}
  14179. return T.length ? T : E == 'string' ? m : m + '\0';
  14180. }
  14181. function x(m, A) {
  14182. for (var T = m + '', E, _ = 0; _ < T.length; )
  14183. A[g & _] = g & ((E ^= A[g & _] * 19) + T.charCodeAt(_++));
  14184. return y(A);
  14185. }
  14186. function u() {
  14187. try {
  14188. var m = new Uint8Array(i);
  14189. return (r.crypto || r.msCrypto).getRandomValues(m), y(m);
  14190. } catch (E) {
  14191. var A = r.navigator,
  14192. T = A && A.plugins;
  14193. return [+new Date(), r, T, r.screen, y(e)];
  14194. }
  14195. }
  14196. function y(m) {
  14197. return String.fromCharCode.apply(0, m);
  14198. }
  14199. x(t.random(), e);
  14200. }
  14201. function initialize$2(e) {
  14202. seedRandom([], e);
  14203. }
  14204. var propTypes = { SHAPE: 'shape' };
  14205. function _typeof$1(e) {
  14206. '@babel/helpers - typeof';
  14207. return (
  14208. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  14209. ? (_typeof$1 = function (r) {
  14210. return typeof r;
  14211. })
  14212. : (_typeof$1 = function (r) {
  14213. return r &&
  14214. typeof Symbol == 'function' &&
  14215. r.constructor === Symbol &&
  14216. r !== Symbol.prototype
  14217. ? 'symbol'
  14218. : typeof r;
  14219. }),
  14220. _typeof$1(e)
  14221. );
  14222. }
  14223. var ExpressionManager = (function () {
  14224. var ob = {},
  14225. Math = BMMath,
  14226. window = null,
  14227. document = null,
  14228. XMLHttpRequest = null,
  14229. fetch = null,
  14230. frames = null,
  14231. _lottieGlobal = {};
  14232. initialize$2(BMMath);
  14233. function resetFrame() {
  14234. _lottieGlobal = {};
  14235. }
  14236. function $bm_isInstanceOfArray(e) {
  14237. return e.constructor === Array || e.constructor === Float32Array;
  14238. }
  14239. function isNumerable(e, t) {
  14240. return (
  14241. e === 'number' ||
  14242. t instanceof Number ||
  14243. e === 'boolean' ||
  14244. e === 'string'
  14245. );
  14246. }
  14247. function $bm_neg(e) {
  14248. var t = _typeof$1(e);
  14249. if (t === 'number' || e instanceof Number || t === 'boolean')
  14250. return -e;
  14251. if ($bm_isInstanceOfArray(e)) {
  14252. var r,
  14253. i = e.length,
  14254. s = [];
  14255. for (r = 0; r < i; r += 1) s[r] = -e[r];
  14256. return s;
  14257. }
  14258. return e.propType ? e.v : -e;
  14259. }
  14260. var easeInBez = BezierFactory.getBezierEasing(
  14261. 0.333,
  14262. 0,
  14263. 0.833,
  14264. 0.833,
  14265. 'easeIn'
  14266. ).get,
  14267. easeOutBez = BezierFactory.getBezierEasing(
  14268. 0.167,
  14269. 0.167,
  14270. 0.667,
  14271. 1,
  14272. 'easeOut'
  14273. ).get,
  14274. easeInOutBez = BezierFactory.getBezierEasing(
  14275. 0.33,
  14276. 0,
  14277. 0.667,
  14278. 1,
  14279. 'easeInOut'
  14280. ).get;
  14281. function sum(e, t) {
  14282. var r = _typeof$1(e),
  14283. i = _typeof$1(t);
  14284. if (
  14285. (isNumerable(r, e) && isNumerable(i, t)) ||
  14286. r === 'string' ||
  14287. i === 'string'
  14288. )
  14289. return e + t;
  14290. if ($bm_isInstanceOfArray(e) && isNumerable(i, t))
  14291. return (e = e.slice(0)), (e[0] += t), e;
  14292. if (isNumerable(r, e) && $bm_isInstanceOfArray(t))
  14293. return (t = t.slice(0)), (t[0] = e + t[0]), t;
  14294. if ($bm_isInstanceOfArray(e) && $bm_isInstanceOfArray(t)) {
  14295. for (
  14296. var s = 0, a = e.length, o = t.length, n = [];
  14297. s < a || s < o;
  14298. )
  14299. (typeof e[s] == 'number' || e[s] instanceof Number) &&
  14300. (typeof t[s] == 'number' || t[s] instanceof Number)
  14301. ? (n[s] = e[s] + t[s])
  14302. : (n[s] = t[s] === void 0 ? e[s] : e[s] || t[s]),
  14303. (s += 1);
  14304. return n;
  14305. }
  14306. return 0;
  14307. }
  14308. var add = sum;
  14309. function sub(e, t) {
  14310. var r = _typeof$1(e),
  14311. i = _typeof$1(t);
  14312. if (isNumerable(r, e) && isNumerable(i, t))
  14313. return (
  14314. r === 'string' && (e = parseInt(e, 10)),
  14315. i === 'string' && (t = parseInt(t, 10)),
  14316. e - t
  14317. );
  14318. if ($bm_isInstanceOfArray(e) && isNumerable(i, t))
  14319. return (e = e.slice(0)), (e[0] -= t), e;
  14320. if (isNumerable(r, e) && $bm_isInstanceOfArray(t))
  14321. return (t = t.slice(0)), (t[0] = e - t[0]), t;
  14322. if ($bm_isInstanceOfArray(e) && $bm_isInstanceOfArray(t)) {
  14323. for (
  14324. var s = 0, a = e.length, o = t.length, n = [];
  14325. s < a || s < o;
  14326. )
  14327. (typeof e[s] == 'number' || e[s] instanceof Number) &&
  14328. (typeof t[s] == 'number' || t[s] instanceof Number)
  14329. ? (n[s] = e[s] - t[s])
  14330. : (n[s] = t[s] === void 0 ? e[s] : e[s] || t[s]),
  14331. (s += 1);
  14332. return n;
  14333. }
  14334. return 0;
  14335. }
  14336. function mul(e, t) {
  14337. var r = _typeof$1(e),
  14338. i = _typeof$1(t),
  14339. s;
  14340. if (isNumerable(r, e) && isNumerable(i, t)) return e * t;
  14341. var a, o;
  14342. if ($bm_isInstanceOfArray(e) && isNumerable(i, t)) {
  14343. for (
  14344. o = e.length, s = createTypedArray('float32', o), a = 0;
  14345. a < o;
  14346. a += 1
  14347. )
  14348. s[a] = e[a] * t;
  14349. return s;
  14350. }
  14351. if (isNumerable(r, e) && $bm_isInstanceOfArray(t)) {
  14352. for (
  14353. o = t.length, s = createTypedArray('float32', o), a = 0;
  14354. a < o;
  14355. a += 1
  14356. )
  14357. s[a] = e * t[a];
  14358. return s;
  14359. }
  14360. return 0;
  14361. }
  14362. function div(e, t) {
  14363. var r = _typeof$1(e),
  14364. i = _typeof$1(t),
  14365. s;
  14366. if (isNumerable(r, e) && isNumerable(i, t)) return e / t;
  14367. var a, o;
  14368. if ($bm_isInstanceOfArray(e) && isNumerable(i, t)) {
  14369. for (
  14370. o = e.length, s = createTypedArray('float32', o), a = 0;
  14371. a < o;
  14372. a += 1
  14373. )
  14374. s[a] = e[a] / t;
  14375. return s;
  14376. }
  14377. if (isNumerable(r, e) && $bm_isInstanceOfArray(t)) {
  14378. for (
  14379. o = t.length, s = createTypedArray('float32', o), a = 0;
  14380. a < o;
  14381. a += 1
  14382. )
  14383. s[a] = e / t[a];
  14384. return s;
  14385. }
  14386. return 0;
  14387. }
  14388. function mod(e, t) {
  14389. return (
  14390. typeof e == 'string' && (e = parseInt(e, 10)),
  14391. typeof t == 'string' && (t = parseInt(t, 10)),
  14392. e % t
  14393. );
  14394. }
  14395. var $bm_sum = sum,
  14396. $bm_sub = sub,
  14397. $bm_mul = mul,
  14398. $bm_div = div,
  14399. $bm_mod = mod;
  14400. function clamp(e, t, r) {
  14401. if (t > r) {
  14402. var i = r;
  14403. (r = t), (t = i);
  14404. }
  14405. return Math.min(Math.max(e, t), r);
  14406. }
  14407. function radiansToDegrees(e) {
  14408. return e / degToRads;
  14409. }
  14410. var radians_to_degrees = radiansToDegrees;
  14411. function degreesToRadians(e) {
  14412. return e * degToRads;
  14413. }
  14414. var degrees_to_radians = radiansToDegrees,
  14415. helperLengthArray = [0, 0, 0, 0, 0, 0];
  14416. function length(e, t) {
  14417. if (typeof e == 'number' || e instanceof Number)
  14418. return (t = t || 0), Math.abs(e - t);
  14419. t || (t = helperLengthArray);
  14420. var r,
  14421. i = Math.min(e.length, t.length),
  14422. s = 0;
  14423. for (r = 0; r < i; r += 1) s += Math.pow(t[r] - e[r], 2);
  14424. return Math.sqrt(s);
  14425. }
  14426. function normalize(e) {
  14427. return div(e, length(e));
  14428. }
  14429. function rgbToHsl(e) {
  14430. var t = e[0],
  14431. r = e[1],
  14432. i = e[2],
  14433. s = Math.max(t, r, i),
  14434. a = Math.min(t, r, i),
  14435. o,
  14436. n,
  14437. l = (s + a) / 2;
  14438. if (s === a) (o = 0), (n = 0);
  14439. else {
  14440. var f = s - a;
  14441. switch (((n = l > 0.5 ? f / (2 - s - a) : f / (s + a)), s)) {
  14442. case t:
  14443. o = (r - i) / f + (r < i ? 6 : 0);
  14444. break;
  14445. case r:
  14446. o = (i - t) / f + 2;
  14447. break;
  14448. case i:
  14449. o = (t - r) / f + 4;
  14450. break;
  14451. }
  14452. o /= 6;
  14453. }
  14454. return [o, n, l, e[3]];
  14455. }
  14456. function hue2rgb(e, t, r) {
  14457. return (
  14458. r < 0 && (r += 1),
  14459. r > 1 && (r -= 1),
  14460. r < 1 / 6
  14461. ? e + (t - e) * 6 * r
  14462. : r < 1 / 2
  14463. ? t
  14464. : r < 2 / 3
  14465. ? e + (t - e) * (2 / 3 - r) * 6
  14466. : e
  14467. );
  14468. }
  14469. function hslToRgb(e) {
  14470. var t = e[0],
  14471. r = e[1],
  14472. i = e[2],
  14473. s,
  14474. a,
  14475. o;
  14476. if (r === 0) (s = i), (o = i), (a = i);
  14477. else {
  14478. var n = i < 0.5 ? i * (1 + r) : i + r - i * r,
  14479. l = 2 * i - n;
  14480. (s = hue2rgb(l, n, t + 1 / 3)),
  14481. (a = hue2rgb(l, n, t)),
  14482. (o = hue2rgb(l, n, t - 1 / 3));
  14483. }
  14484. return [s, a, o, e[3]];
  14485. }
  14486. function linear(e, t, r, i, s) {
  14487. if (
  14488. ((i === void 0 || s === void 0) &&
  14489. ((i = t), (s = r), (t = 0), (r = 1)),
  14490. r < t)
  14491. ) {
  14492. var a = r;
  14493. (r = t), (t = a);
  14494. }
  14495. if (e <= t) return i;
  14496. if (e >= r) return s;
  14497. var o = r === t ? 0 : (e - t) / (r - t);
  14498. if (!i.length) return i + (s - i) * o;
  14499. var n,
  14500. l = i.length,
  14501. f = createTypedArray('float32', l);
  14502. for (n = 0; n < l; n += 1) f[n] = i[n] + (s[n] - i[n]) * o;
  14503. return f;
  14504. }
  14505. function random(e, t) {
  14506. if (
  14507. (t === void 0 &&
  14508. (e === void 0 ? ((e = 0), (t = 1)) : ((t = e), (e = void 0))),
  14509. t.length)
  14510. ) {
  14511. var r,
  14512. i = t.length;
  14513. e || (e = createTypedArray('float32', i));
  14514. var s = createTypedArray('float32', i),
  14515. a = BMMath.random();
  14516. for (r = 0; r < i; r += 1) s[r] = e[r] + a * (t[r] - e[r]);
  14517. return s;
  14518. }
  14519. e === void 0 && (e = 0);
  14520. var o = BMMath.random();
  14521. return e + o * (t - e);
  14522. }
  14523. function createPath(e, t, r, i) {
  14524. var s,
  14525. a = e.length,
  14526. o = shapePool.newElement();
  14527. o.setPathData(!!i, a);
  14528. var n = [0, 0],
  14529. l,
  14530. f;
  14531. for (s = 0; s < a; s += 1)
  14532. (l = t && t[s] ? t[s] : n),
  14533. (f = r && r[s] ? r[s] : n),
  14534. o.setTripleAt(
  14535. e[s][0],
  14536. e[s][1],
  14537. f[0] + e[s][0],
  14538. f[1] + e[s][1],
  14539. l[0] + e[s][0],
  14540. l[1] + e[s][1],
  14541. s,
  14542. !0
  14543. );
  14544. return o;
  14545. }
  14546. function initiateExpression(elem, data, property) {
  14547. function noOp(e) {
  14548. return e;
  14549. }
  14550. if (!elem.globalData.renderConfig.runExpressions) return noOp;
  14551. var val = data.x,
  14552. needsVelocity = /velocity(?![\w\d])/.test(val),
  14553. _needsRandom = val.indexOf('random') !== -1,
  14554. elemType = elem.data.ty,
  14555. transform,
  14556. $bm_transform,
  14557. content,
  14558. effect,
  14559. thisProperty = property;
  14560. (thisProperty.valueAtTime = thisProperty.getValueAtTime),
  14561. Object.defineProperty(thisProperty, 'value', {
  14562. get: function () {
  14563. return thisProperty.v;
  14564. }
  14565. }),
  14566. (elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate),
  14567. (elem.comp.displayStartTime = 0);
  14568. var inPoint = elem.data.ip / elem.comp.globalData.frameRate,
  14569. outPoint = elem.data.op / elem.comp.globalData.frameRate,
  14570. width = elem.data.sw ? elem.data.sw : 0,
  14571. height = elem.data.sh ? elem.data.sh : 0,
  14572. name = elem.data.nm,
  14573. loopIn,
  14574. loop_in,
  14575. loopOut,
  14576. loop_out,
  14577. smooth,
  14578. toWorld,
  14579. fromWorld,
  14580. fromComp,
  14581. toComp,
  14582. fromCompToSurface,
  14583. position,
  14584. rotation,
  14585. anchorPoint,
  14586. scale,
  14587. thisLayer,
  14588. thisComp,
  14589. mask,
  14590. valueAtTime,
  14591. velocityAtTime,
  14592. scoped_bm_rt,
  14593. expression_function = eval(
  14594. '[function _expression_function(){' +
  14595. val +
  14596. ';scoped_bm_rt=$bm_rt}]'
  14597. )[0],
  14598. numKeys = property.kf ? data.k.length : 0,
  14599. active = !this.data || this.data.hd !== !0,
  14600. wiggle = function e(t, r) {
  14601. var i,
  14602. s,
  14603. a = this.pv.length ? this.pv.length : 1,
  14604. o = createTypedArray('float32', a);
  14605. t = 5;
  14606. var n = Math.floor(time * t);
  14607. for (i = 0, s = 0; i < n; ) {
  14608. for (s = 0; s < a; s += 1)
  14609. o[s] += -r + r * 2 * BMMath.random();
  14610. i += 1;
  14611. }
  14612. var l = time * t,
  14613. f = l - Math.floor(l),
  14614. g = createTypedArray('float32', a);
  14615. if (a > 1) {
  14616. for (s = 0; s < a; s += 1)
  14617. g[s] =
  14618. this.pv[s] + o[s] + (-r + r * 2 * BMMath.random()) * f;
  14619. return g;
  14620. }
  14621. return this.pv + o[0] + (-r + r * 2 * BMMath.random()) * f;
  14622. }.bind(this);
  14623. thisProperty.loopIn &&
  14624. ((loopIn = thisProperty.loopIn.bind(thisProperty)),
  14625. (loop_in = loopIn)),
  14626. thisProperty.loopOut &&
  14627. ((loopOut = thisProperty.loopOut.bind(thisProperty)),
  14628. (loop_out = loopOut)),
  14629. thisProperty.smooth &&
  14630. (smooth = thisProperty.smooth.bind(thisProperty));
  14631. function loopInDuration(e, t) {
  14632. return loopIn(e, t, !0);
  14633. }
  14634. function loopOutDuration(e, t) {
  14635. return loopOut(e, t, !0);
  14636. }
  14637. this.getValueAtTime &&
  14638. (valueAtTime = this.getValueAtTime.bind(this)),
  14639. this.getVelocityAtTime &&
  14640. (velocityAtTime = this.getVelocityAtTime.bind(this));
  14641. var comp = elem.comp.globalData.projectInterface.bind(
  14642. elem.comp.globalData.projectInterface
  14643. );
  14644. function lookAt(e, t) {
  14645. var r = [t[0] - e[0], t[1] - e[1], t[2] - e[2]],
  14646. i =
  14647. Math.atan2(r[0], Math.sqrt(r[1] * r[1] + r[2] * r[2])) /
  14648. degToRads,
  14649. s = -Math.atan2(r[1], r[2]) / degToRads;
  14650. return [s, i, 0];
  14651. }
  14652. function easeOut(e, t, r, i, s) {
  14653. return applyEase(easeOutBez, e, t, r, i, s);
  14654. }
  14655. function easeIn(e, t, r, i, s) {
  14656. return applyEase(easeInBez, e, t, r, i, s);
  14657. }
  14658. function ease(e, t, r, i, s) {
  14659. return applyEase(easeInOutBez, e, t, r, i, s);
  14660. }
  14661. function applyEase(e, t, r, i, s, a) {
  14662. s === void 0 ? ((s = r), (a = i)) : (t = (t - r) / (i - r)),
  14663. t > 1 ? (t = 1) : t < 0 && (t = 0);
  14664. var o = e(t);
  14665. if ($bm_isInstanceOfArray(s)) {
  14666. var n,
  14667. l = s.length,
  14668. f = createTypedArray('float32', l);
  14669. for (n = 0; n < l; n += 1) f[n] = (a[n] - s[n]) * o + s[n];
  14670. return f;
  14671. }
  14672. return (a - s) * o + s;
  14673. }
  14674. function nearestKey(e) {
  14675. var t,
  14676. r = data.k.length,
  14677. i,
  14678. s;
  14679. if (!data.k.length || typeof data.k[0] == 'number')
  14680. (i = 0), (s = 0);
  14681. else if (
  14682. ((i = -1),
  14683. (e *= elem.comp.globalData.frameRate),
  14684. e < data.k[0].t)
  14685. )
  14686. (i = 1), (s = data.k[0].t);
  14687. else {
  14688. for (t = 0; t < r - 1; t += 1)
  14689. if (e === data.k[t].t) {
  14690. (i = t + 1), (s = data.k[t].t);
  14691. break;
  14692. } else if (e > data.k[t].t && e < data.k[t + 1].t) {
  14693. e - data.k[t].t > data.k[t + 1].t - e
  14694. ? ((i = t + 2), (s = data.k[t + 1].t))
  14695. : ((i = t + 1), (s = data.k[t].t));
  14696. break;
  14697. }
  14698. i === -1 && ((i = t + 1), (s = data.k[t].t));
  14699. }
  14700. var a = {};
  14701. return (
  14702. (a.index = i), (a.time = s / elem.comp.globalData.frameRate), a
  14703. );
  14704. }
  14705. function key(e) {
  14706. var t, r, i;
  14707. if (!data.k.length || typeof data.k[0] == 'number')
  14708. throw new Error('The property has no keyframe at index ' + e);
  14709. (e -= 1),
  14710. (t = {
  14711. time: data.k[e].t / elem.comp.globalData.frameRate,
  14712. value: []
  14713. });
  14714. var s = Object.prototype.hasOwnProperty.call(data.k[e], 's')
  14715. ? data.k[e].s
  14716. : data.k[e - 1].e;
  14717. for (i = s.length, r = 0; r < i; r += 1)
  14718. (t[r] = s[r]), (t.value[r] = s[r]);
  14719. return t;
  14720. }
  14721. function framesToTime(e, t) {
  14722. return t || (t = elem.comp.globalData.frameRate), e / t;
  14723. }
  14724. function timeToFrames(e, t) {
  14725. return (
  14726. !e && e !== 0 && (e = time),
  14727. t || (t = elem.comp.globalData.frameRate),
  14728. e * t
  14729. );
  14730. }
  14731. function seedRandom(e) {
  14732. BMMath.seedrandom(randSeed + e);
  14733. }
  14734. function sourceRectAtTime() {
  14735. return elem.sourceRectAtTime();
  14736. }
  14737. function substring(e, t) {
  14738. return typeof value == 'string'
  14739. ? t === void 0
  14740. ? value.substring(e)
  14741. : value.substring(e, t)
  14742. : '';
  14743. }
  14744. function substr(e, t) {
  14745. return typeof value == 'string'
  14746. ? t === void 0
  14747. ? value.substr(e)
  14748. : value.substr(e, t)
  14749. : '';
  14750. }
  14751. function posterizeTime(e) {
  14752. (time = e === 0 ? 0 : Math.floor(time * e) / e),
  14753. (value = valueAtTime(time));
  14754. }
  14755. var time,
  14756. velocity,
  14757. value,
  14758. text,
  14759. textIndex,
  14760. textTotal,
  14761. selectorValue,
  14762. index = elem.data.ind,
  14763. hasParent = !!(elem.hierarchy && elem.hierarchy.length),
  14764. parent,
  14765. randSeed = Math.floor(Math.random() * 1e6),
  14766. globalData = elem.globalData;
  14767. function executeExpression(e) {
  14768. return (
  14769. (value = e),
  14770. this.frameExpressionId === elem.globalData.frameId &&
  14771. this.propType !== 'textSelector'
  14772. ? value
  14773. : (this.propType === 'textSelector' &&
  14774. ((textIndex = this.textIndex),
  14775. (textTotal = this.textTotal),
  14776. (selectorValue = this.selectorValue)),
  14777. thisLayer ||
  14778. ((text = elem.layerInterface.text),
  14779. (thisLayer = elem.layerInterface),
  14780. (thisComp = elem.comp.compInterface),
  14781. (toWorld = thisLayer.toWorld.bind(thisLayer)),
  14782. (fromWorld = thisLayer.fromWorld.bind(thisLayer)),
  14783. (fromComp = thisLayer.fromComp.bind(thisLayer)),
  14784. (toComp = thisLayer.toComp.bind(thisLayer)),
  14785. (mask = thisLayer.mask
  14786. ? thisLayer.mask.bind(thisLayer)
  14787. : null),
  14788. (fromCompToSurface = fromComp)),
  14789. transform ||
  14790. ((transform = elem.layerInterface(
  14791. 'ADBE Transform Group'
  14792. )),
  14793. ($bm_transform = transform),
  14794. transform && (anchorPoint = transform.anchorPoint)),
  14795. elemType === 4 &&
  14796. !content &&
  14797. (content = thisLayer('ADBE Root Vectors Group')),
  14798. effect || (effect = thisLayer(4)),
  14799. (hasParent = !!(elem.hierarchy && elem.hierarchy.length)),
  14800. hasParent &&
  14801. !parent &&
  14802. (parent = elem.hierarchy[0].layerInterface),
  14803. (time =
  14804. this.comp.renderedFrame / this.comp.globalData.frameRate),
  14805. _needsRandom && seedRandom(randSeed + time),
  14806. needsVelocity && (velocity = velocityAtTime(time)),
  14807. expression_function(),
  14808. (this.frameExpressionId = elem.globalData.frameId),
  14809. (scoped_bm_rt =
  14810. scoped_bm_rt.propType === propTypes.SHAPE
  14811. ? scoped_bm_rt.v
  14812. : scoped_bm_rt),
  14813. scoped_bm_rt)
  14814. );
  14815. }
  14816. return (
  14817. (executeExpression.__preventDeadCodeRemoval = [
  14818. $bm_transform,
  14819. anchorPoint,
  14820. time,
  14821. velocity,
  14822. inPoint,
  14823. outPoint,
  14824. width,
  14825. height,
  14826. name,
  14827. loop_in,
  14828. loop_out,
  14829. smooth,
  14830. toComp,
  14831. fromCompToSurface,
  14832. toWorld,
  14833. fromWorld,
  14834. mask,
  14835. position,
  14836. rotation,
  14837. scale,
  14838. thisComp,
  14839. numKeys,
  14840. active,
  14841. wiggle,
  14842. loopInDuration,
  14843. loopOutDuration,
  14844. comp,
  14845. lookAt,
  14846. easeOut,
  14847. easeIn,
  14848. ease,
  14849. nearestKey,
  14850. key,
  14851. text,
  14852. textIndex,
  14853. textTotal,
  14854. selectorValue,
  14855. framesToTime,
  14856. timeToFrames,
  14857. sourceRectAtTime,
  14858. substring,
  14859. substr,
  14860. posterizeTime,
  14861. index,
  14862. globalData
  14863. ]),
  14864. executeExpression
  14865. );
  14866. }
  14867. return (
  14868. (ob.initiateExpression = initiateExpression),
  14869. (ob.__preventDeadCodeRemoval = [
  14870. window,
  14871. document,
  14872. XMLHttpRequest,
  14873. fetch,
  14874. frames,
  14875. $bm_neg,
  14876. add,
  14877. $bm_sum,
  14878. $bm_sub,
  14879. $bm_mul,
  14880. $bm_div,
  14881. $bm_mod,
  14882. clamp,
  14883. radians_to_degrees,
  14884. degreesToRadians,
  14885. degrees_to_radians,
  14886. normalize,
  14887. rgbToHsl,
  14888. hslToRgb,
  14889. linear,
  14890. random,
  14891. createPath,
  14892. _lottieGlobal
  14893. ]),
  14894. (ob.resetFrame = resetFrame),
  14895. ob
  14896. );
  14897. })(),
  14898. Expressions = (function () {
  14899. var e = {};
  14900. (e.initExpressions = t),
  14901. (e.resetFrame = ExpressionManager.resetFrame);
  14902. function t(r) {
  14903. var i = 0,
  14904. s = [];
  14905. function a() {
  14906. i += 1;
  14907. }
  14908. function o() {
  14909. (i -= 1), i === 0 && l();
  14910. }
  14911. function n(f) {
  14912. s.indexOf(f) === -1 && s.push(f);
  14913. }
  14914. function l() {
  14915. var f,
  14916. g = s.length;
  14917. for (f = 0; f < g; f += 1) s[f].release();
  14918. s.length = 0;
  14919. }
  14920. (r.renderer.compInterface = CompExpressionInterface(r.renderer)),
  14921. r.renderer.globalData.projectInterface.registerComposition(
  14922. r.renderer
  14923. ),
  14924. (r.renderer.globalData.pushExpression = a),
  14925. (r.renderer.globalData.popExpression = o),
  14926. (r.renderer.globalData.registerExpressionProperty = n);
  14927. }
  14928. return e;
  14929. })(),
  14930. MaskManagerInterface = (function () {
  14931. function e(r, i) {
  14932. (this._mask = r), (this._data = i);
  14933. }
  14934. Object.defineProperty(e.prototype, 'maskPath', {
  14935. get: function () {
  14936. return (
  14937. this._mask.prop.k && this._mask.prop.getValue(), this._mask.prop
  14938. );
  14939. }
  14940. }),
  14941. Object.defineProperty(e.prototype, 'maskOpacity', {
  14942. get: function () {
  14943. return (
  14944. this._mask.op.k && this._mask.op.getValue(),
  14945. this._mask.op.v * 100
  14946. );
  14947. }
  14948. });
  14949. var t = function (i) {
  14950. var s = createSizedArray(i.viewData.length),
  14951. a,
  14952. o = i.viewData.length;
  14953. for (a = 0; a < o; a += 1)
  14954. s[a] = new e(i.viewData[a], i.masksProperties[a]);
  14955. var n = function (f) {
  14956. for (a = 0; a < o; ) {
  14957. if (i.masksProperties[a].nm === f) return s[a];
  14958. a += 1;
  14959. }
  14960. return null;
  14961. };
  14962. return n;
  14963. };
  14964. return t;
  14965. })(),
  14966. ExpressionPropertyInterface = (function () {
  14967. var e = { pv: 0, v: 0, mult: 1 },
  14968. t = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
  14969. function r(o, n, l) {
  14970. Object.defineProperty(o, 'velocity', {
  14971. get: function () {
  14972. return n.getVelocityAtTime(n.comp.currentFrame);
  14973. }
  14974. }),
  14975. (o.numKeys = n.keyframes ? n.keyframes.length : 0),
  14976. (o.key = function (f) {
  14977. if (!o.numKeys) return 0;
  14978. var g = '';
  14979. 's' in n.keyframes[f - 1]
  14980. ? (g = n.keyframes[f - 1].s)
  14981. : 'e' in n.keyframes[f - 2]
  14982. ? (g = n.keyframes[f - 2].e)
  14983. : (g = n.keyframes[f - 2].s);
  14984. var S =
  14985. l === 'unidimensional' ? new Number(g) : Object.assign({}, g);
  14986. return (
  14987. (S.time =
  14988. n.keyframes[f - 1].t / n.elem.comp.globalData.frameRate),
  14989. (S.value = l === 'unidimensional' ? g[0] : g),
  14990. S
  14991. );
  14992. }),
  14993. (o.valueAtTime = n.getValueAtTime),
  14994. (o.speedAtTime = n.getSpeedAtTime),
  14995. (o.velocityAtTime = n.getVelocityAtTime),
  14996. (o.propertyGroup = n.propertyGroup);
  14997. }
  14998. function i(o) {
  14999. (!o || !('pv' in o)) && (o = e);
  15000. var n = 1 / o.mult,
  15001. l = o.pv * n,
  15002. f = new Number(l);
  15003. return (
  15004. (f.value = l),
  15005. r(f, o, 'unidimensional'),
  15006. function () {
  15007. return (
  15008. o.k && o.getValue(),
  15009. (l = o.v * n),
  15010. f.value !== l &&
  15011. ((f = new Number(l)),
  15012. (f.value = l),
  15013. r(f, o, 'unidimensional')),
  15014. f
  15015. );
  15016. }
  15017. );
  15018. }
  15019. function s(o) {
  15020. (!o || !('pv' in o)) && (o = t);
  15021. var n = 1 / o.mult,
  15022. l = (o.data && o.data.l) || o.pv.length,
  15023. f = createTypedArray('float32', l),
  15024. g = createTypedArray('float32', l);
  15025. return (
  15026. (f.value = g),
  15027. r(f, o, 'multidimensional'),
  15028. function () {
  15029. o.k && o.getValue();
  15030. for (var S = 0; S < l; S += 1)
  15031. (g[S] = o.v[S] * n), (f[S] = g[S]);
  15032. return f;
  15033. }
  15034. );
  15035. }
  15036. function a() {
  15037. return e;
  15038. }
  15039. return function (o) {
  15040. return o ? (o.propType === 'unidimensional' ? i(o) : s(o)) : a;
  15041. };
  15042. })(),
  15043. TransformExpressionInterface = (function () {
  15044. return function (e) {
  15045. function t(o) {
  15046. switch (o) {
  15047. case 'scale':
  15048. case 'Scale':
  15049. case 'ADBE Scale':
  15050. case 6:
  15051. return t.scale;
  15052. case 'rotation':
  15053. case 'Rotation':
  15054. case 'ADBE Rotation':
  15055. case 'ADBE Rotate Z':
  15056. case 10:
  15057. return t.rotation;
  15058. case 'ADBE Rotate X':
  15059. return t.xRotation;
  15060. case 'ADBE Rotate Y':
  15061. return t.yRotation;
  15062. case 'position':
  15063. case 'Position':
  15064. case 'ADBE Position':
  15065. case 2:
  15066. return t.position;
  15067. case 'ADBE Position_0':
  15068. return t.xPosition;
  15069. case 'ADBE Position_1':
  15070. return t.yPosition;
  15071. case 'ADBE Position_2':
  15072. return t.zPosition;
  15073. case 'anchorPoint':
  15074. case 'AnchorPoint':
  15075. case 'Anchor Point':
  15076. case 'ADBE AnchorPoint':
  15077. case 1:
  15078. return t.anchorPoint;
  15079. case 'opacity':
  15080. case 'Opacity':
  15081. case 11:
  15082. return t.opacity;
  15083. default:
  15084. return null;
  15085. }
  15086. }
  15087. Object.defineProperty(t, 'rotation', {
  15088. get: ExpressionPropertyInterface(e.r || e.rz)
  15089. }),
  15090. Object.defineProperty(t, 'zRotation', {
  15091. get: ExpressionPropertyInterface(e.rz || e.r)
  15092. }),
  15093. Object.defineProperty(t, 'xRotation', {
  15094. get: ExpressionPropertyInterface(e.rx)
  15095. }),
  15096. Object.defineProperty(t, 'yRotation', {
  15097. get: ExpressionPropertyInterface(e.ry)
  15098. }),
  15099. Object.defineProperty(t, 'scale', {
  15100. get: ExpressionPropertyInterface(e.s)
  15101. });
  15102. var r, i, s, a;
  15103. return (
  15104. e.p
  15105. ? (a = ExpressionPropertyInterface(e.p))
  15106. : ((r = ExpressionPropertyInterface(e.px)),
  15107. (i = ExpressionPropertyInterface(e.py)),
  15108. e.pz && (s = ExpressionPropertyInterface(e.pz))),
  15109. Object.defineProperty(t, 'position', {
  15110. get: function () {
  15111. return e.p ? a() : [r(), i(), s ? s() : 0];
  15112. }
  15113. }),
  15114. Object.defineProperty(t, 'xPosition', {
  15115. get: ExpressionPropertyInterface(e.px)
  15116. }),
  15117. Object.defineProperty(t, 'yPosition', {
  15118. get: ExpressionPropertyInterface(e.py)
  15119. }),
  15120. Object.defineProperty(t, 'zPosition', {
  15121. get: ExpressionPropertyInterface(e.pz)
  15122. }),
  15123. Object.defineProperty(t, 'anchorPoint', {
  15124. get: ExpressionPropertyInterface(e.a)
  15125. }),
  15126. Object.defineProperty(t, 'opacity', {
  15127. get: ExpressionPropertyInterface(e.o)
  15128. }),
  15129. Object.defineProperty(t, 'skew', {
  15130. get: ExpressionPropertyInterface(e.sk)
  15131. }),
  15132. Object.defineProperty(t, 'skewAxis', {
  15133. get: ExpressionPropertyInterface(e.sa)
  15134. }),
  15135. Object.defineProperty(t, 'orientation', {
  15136. get: ExpressionPropertyInterface(e.or)
  15137. }),
  15138. t
  15139. );
  15140. };
  15141. })(),
  15142. LayerExpressionInterface = (function () {
  15143. function e(f) {
  15144. var g = new Matrix();
  15145. if (f !== void 0) {
  15146. var S = this._elem.finalTransform.mProp.getValueAtTime(f);
  15147. S.clone(g);
  15148. } else {
  15149. var c = this._elem.finalTransform.mProp;
  15150. c.applyToMatrix(g);
  15151. }
  15152. return g;
  15153. }
  15154. function t(f, g) {
  15155. var S = this.getMatrix(g);
  15156. return (
  15157. (S.props[12] = 0),
  15158. (S.props[13] = 0),
  15159. (S.props[14] = 0),
  15160. this.applyPoint(S, f)
  15161. );
  15162. }
  15163. function r(f, g) {
  15164. var S = this.getMatrix(g);
  15165. return this.applyPoint(S, f);
  15166. }
  15167. function i(f, g) {
  15168. var S = this.getMatrix(g);
  15169. return (
  15170. (S.props[12] = 0),
  15171. (S.props[13] = 0),
  15172. (S.props[14] = 0),
  15173. this.invertPoint(S, f)
  15174. );
  15175. }
  15176. function s(f, g) {
  15177. var S = this.getMatrix(g);
  15178. return this.invertPoint(S, f);
  15179. }
  15180. function a(f, g) {
  15181. if (this._elem.hierarchy && this._elem.hierarchy.length) {
  15182. var S,
  15183. c = this._elem.hierarchy.length;
  15184. for (S = 0; S < c; S += 1)
  15185. this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(f);
  15186. }
  15187. return f.applyToPointArray(g[0], g[1], g[2] || 0);
  15188. }
  15189. function o(f, g) {
  15190. if (this._elem.hierarchy && this._elem.hierarchy.length) {
  15191. var S,
  15192. c = this._elem.hierarchy.length;
  15193. for (S = 0; S < c; S += 1)
  15194. this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(f);
  15195. }
  15196. return f.inversePoint(g);
  15197. }
  15198. function n(f) {
  15199. var g = new Matrix();
  15200. if (
  15201. (g.reset(),
  15202. this._elem.finalTransform.mProp.applyToMatrix(g),
  15203. this._elem.hierarchy && this._elem.hierarchy.length)
  15204. ) {
  15205. var S,
  15206. c = this._elem.hierarchy.length;
  15207. for (S = 0; S < c; S += 1)
  15208. this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(g);
  15209. return g.inversePoint(f);
  15210. }
  15211. return g.inversePoint(f);
  15212. }
  15213. function l() {
  15214. return [1, 1, 1, 1];
  15215. }
  15216. return function (f) {
  15217. var g;
  15218. function S(p) {
  15219. P.mask = new MaskManagerInterface(p, f);
  15220. }
  15221. function c(p) {
  15222. P.effect = p;
  15223. }
  15224. function P(p) {
  15225. switch (p) {
  15226. case 'ADBE Root Vectors Group':
  15227. case 'Contents':
  15228. case 2:
  15229. return P.shapeInterface;
  15230. case 1:
  15231. case 6:
  15232. case 'Transform':
  15233. case 'transform':
  15234. case 'ADBE Transform Group':
  15235. return g;
  15236. case 4:
  15237. case 'ADBE Effect Parade':
  15238. case 'effects':
  15239. case 'Effects':
  15240. return P.effect;
  15241. case 'ADBE Text Properties':
  15242. return P.textInterface;
  15243. default:
  15244. return null;
  15245. }
  15246. }
  15247. (P.getMatrix = e),
  15248. (P.invertPoint = o),
  15249. (P.applyPoint = a),
  15250. (P.toWorld = r),
  15251. (P.toWorldVec = t),
  15252. (P.fromWorld = s),
  15253. (P.fromWorldVec = i),
  15254. (P.toComp = r),
  15255. (P.fromComp = n),
  15256. (P.sampleImage = l),
  15257. (P.sourceRectAtTime = f.sourceRectAtTime.bind(f)),
  15258. (P._elem = f),
  15259. (g = TransformExpressionInterface(f.finalTransform.mProp));
  15260. var d = getDescriptor(g, 'anchorPoint');
  15261. return (
  15262. Object.defineProperties(P, {
  15263. hasParent: {
  15264. get: function () {
  15265. return f.hierarchy.length;
  15266. }
  15267. },
  15268. parent: {
  15269. get: function () {
  15270. return f.hierarchy[0].layerInterface;
  15271. }
  15272. },
  15273. rotation: getDescriptor(g, 'rotation'),
  15274. scale: getDescriptor(g, 'scale'),
  15275. position: getDescriptor(g, 'position'),
  15276. opacity: getDescriptor(g, 'opacity'),
  15277. anchorPoint: d,
  15278. anchor_point: d,
  15279. transform: {
  15280. get: function () {
  15281. return g;
  15282. }
  15283. },
  15284. active: {
  15285. get: function () {
  15286. return f.isInRange;
  15287. }
  15288. }
  15289. }),
  15290. (P.startTime = f.data.st),
  15291. (P.index = f.data.ind),
  15292. (P.source = f.data.refId),
  15293. (P.height = f.data.ty === 0 ? f.data.h : 100),
  15294. (P.width = f.data.ty === 0 ? f.data.w : 100),
  15295. (P.inPoint = f.data.ip / f.comp.globalData.frameRate),
  15296. (P.outPoint = f.data.op / f.comp.globalData.frameRate),
  15297. (P._name = f.data.nm),
  15298. (P.registerMaskInterface = S),
  15299. (P.registerEffectsInterface = c),
  15300. P
  15301. );
  15302. };
  15303. })(),
  15304. propertyGroupFactory = (function () {
  15305. return function (e, t) {
  15306. return function (r) {
  15307. return (r = r === void 0 ? 1 : r), r <= 0 ? e : t(r - 1);
  15308. };
  15309. };
  15310. })(),
  15311. PropertyInterface = (function () {
  15312. return function (e, t) {
  15313. var r = { _name: e };
  15314. function i(s) {
  15315. return (s = s === void 0 ? 1 : s), s <= 0 ? r : t(s - 1);
  15316. }
  15317. return i;
  15318. };
  15319. })(),
  15320. EffectsExpressionInterface = (function () {
  15321. var e = { createEffectsInterface: t };
  15322. function t(s, a) {
  15323. if (s.effectsManager) {
  15324. var o = [],
  15325. n = s.data.ef,
  15326. l,
  15327. f = s.effectsManager.effectElements.length;
  15328. for (l = 0; l < f; l += 1)
  15329. o.push(r(n[l], s.effectsManager.effectElements[l], a, s));
  15330. var g = s.data.ef || [],
  15331. S = function (P) {
  15332. for (l = 0, f = g.length; l < f; ) {
  15333. if (P === g[l].nm || P === g[l].mn || P === g[l].ix)
  15334. return o[l];
  15335. l += 1;
  15336. }
  15337. return null;
  15338. };
  15339. return (
  15340. Object.defineProperty(S, 'numProperties', {
  15341. get: function () {
  15342. return g.length;
  15343. }
  15344. }),
  15345. S
  15346. );
  15347. }
  15348. return null;
  15349. }
  15350. function r(s, a, o, n) {
  15351. function l(P) {
  15352. for (var d = s.ef, p = 0, x = d.length; p < x; ) {
  15353. if (P === d[p].nm || P === d[p].mn || P === d[p].ix)
  15354. return d[p].ty === 5 ? g[p] : g[p]();
  15355. p += 1;
  15356. }
  15357. throw new Error();
  15358. }
  15359. var f = propertyGroupFactory(l, o),
  15360. g = [],
  15361. S,
  15362. c = s.ef.length;
  15363. for (S = 0; S < c; S += 1)
  15364. s.ef[S].ty === 5
  15365. ? g.push(
  15366. r(
  15367. s.ef[S],
  15368. a.effectElements[S],
  15369. a.effectElements[S].propertyGroup,
  15370. n
  15371. )
  15372. )
  15373. : g.push(i(a.effectElements[S], s.ef[S].ty, n, f));
  15374. return (
  15375. s.mn === 'ADBE Color Control' &&
  15376. Object.defineProperty(l, 'color', {
  15377. get: function () {
  15378. return g[0]();
  15379. }
  15380. }),
  15381. Object.defineProperties(l, {
  15382. numProperties: {
  15383. get: function () {
  15384. return s.np;
  15385. }
  15386. },
  15387. _name: { value: s.nm },
  15388. propertyGroup: { value: f }
  15389. }),
  15390. (l.enabled = s.en !== 0),
  15391. (l.active = l.enabled),
  15392. l
  15393. );
  15394. }
  15395. function i(s, a, o, n) {
  15396. var l = ExpressionPropertyInterface(s.p);
  15397. function f() {
  15398. return a === 10 ? o.comp.compInterface(s.p.v) : l();
  15399. }
  15400. return (
  15401. s.p.setGroupProperty &&
  15402. s.p.setGroupProperty(PropertyInterface('', n)),
  15403. f
  15404. );
  15405. }
  15406. return e;
  15407. })(),
  15408. ShapePathInterface = (function () {
  15409. return function (t, r, i) {
  15410. var s = r.sh;
  15411. function a(n) {
  15412. return n === 'Shape' ||
  15413. n === 'shape' ||
  15414. n === 'Path' ||
  15415. n === 'path' ||
  15416. n === 'ADBE Vector Shape' ||
  15417. n === 2
  15418. ? a.path
  15419. : null;
  15420. }
  15421. var o = propertyGroupFactory(a, i);
  15422. return (
  15423. s.setGroupProperty(PropertyInterface('Path', o)),
  15424. Object.defineProperties(a, {
  15425. path: {
  15426. get: function () {
  15427. return s.k && s.getValue(), s;
  15428. }
  15429. },
  15430. shape: {
  15431. get: function () {
  15432. return s.k && s.getValue(), s;
  15433. }
  15434. },
  15435. _name: { value: t.nm },
  15436. ix: { value: t.ix },
  15437. propertyIndex: { value: t.ix },
  15438. mn: { value: t.mn },
  15439. propertyGroup: { value: i }
  15440. }),
  15441. a
  15442. );
  15443. };
  15444. })(),
  15445. ShapeExpressionInterface = (function () {
  15446. function e(d, p, x) {
  15447. var u = [],
  15448. y,
  15449. m = d ? d.length : 0;
  15450. for (y = 0; y < m; y += 1)
  15451. d[y].ty === 'gr'
  15452. ? u.push(r(d[y], p[y], x))
  15453. : d[y].ty === 'fl'
  15454. ? u.push(i(d[y], p[y], x))
  15455. : d[y].ty === 'st'
  15456. ? u.push(o(d[y], p[y], x))
  15457. : d[y].ty === 'tm'
  15458. ? u.push(n(d[y], p[y], x))
  15459. : d[y].ty === 'tr' ||
  15460. (d[y].ty === 'el'
  15461. ? u.push(f(d[y], p[y], x))
  15462. : d[y].ty === 'sr'
  15463. ? u.push(g(d[y], p[y], x))
  15464. : d[y].ty === 'sh'
  15465. ? u.push(ShapePathInterface(d[y], p[y], x))
  15466. : d[y].ty === 'rc'
  15467. ? u.push(S(d[y], p[y], x))
  15468. : d[y].ty === 'rd'
  15469. ? u.push(c(d[y], p[y], x))
  15470. : d[y].ty === 'rp'
  15471. ? u.push(P(d[y], p[y], x))
  15472. : d[y].ty === 'gf'
  15473. ? u.push(s(d[y], p[y], x))
  15474. : u.push(a(d[y], p[y])));
  15475. return u;
  15476. }
  15477. function t(d, p, x) {
  15478. var u,
  15479. y = function (T) {
  15480. for (var E = 0, _ = u.length; E < _; ) {
  15481. if (
  15482. u[E]._name === T ||
  15483. u[E].mn === T ||
  15484. u[E].propertyIndex === T ||
  15485. u[E].ix === T ||
  15486. u[E].ind === T
  15487. )
  15488. return u[E];
  15489. E += 1;
  15490. }
  15491. return typeof T == 'number' ? u[T - 1] : null;
  15492. };
  15493. (y.propertyGroup = propertyGroupFactory(y, x)),
  15494. (u = e(d.it, p.it, y.propertyGroup)),
  15495. (y.numProperties = u.length);
  15496. var m = l(
  15497. d.it[d.it.length - 1],
  15498. p.it[p.it.length - 1],
  15499. y.propertyGroup
  15500. );
  15501. return (
  15502. (y.transform = m), (y.propertyIndex = d.cix), (y._name = d.nm), y
  15503. );
  15504. }
  15505. function r(d, p, x) {
  15506. var u = function (T) {
  15507. switch (T) {
  15508. case 'ADBE Vectors Group':
  15509. case 'Contents':
  15510. case 2:
  15511. return u.content;
  15512. default:
  15513. return u.transform;
  15514. }
  15515. };
  15516. u.propertyGroup = propertyGroupFactory(u, x);
  15517. var y = t(d, p, u.propertyGroup),
  15518. m = l(
  15519. d.it[d.it.length - 1],
  15520. p.it[p.it.length - 1],
  15521. u.propertyGroup
  15522. );
  15523. return (
  15524. (u.content = y),
  15525. (u.transform = m),
  15526. Object.defineProperty(u, '_name', {
  15527. get: function () {
  15528. return d.nm;
  15529. }
  15530. }),
  15531. (u.numProperties = d.np),
  15532. (u.propertyIndex = d.ix),
  15533. (u.nm = d.nm),
  15534. (u.mn = d.mn),
  15535. u
  15536. );
  15537. }
  15538. function i(d, p, x) {
  15539. function u(y) {
  15540. return y === 'Color' || y === 'color'
  15541. ? u.color
  15542. : y === 'Opacity' || y === 'opacity'
  15543. ? u.opacity
  15544. : null;
  15545. }
  15546. return (
  15547. Object.defineProperties(u, {
  15548. color: { get: ExpressionPropertyInterface(p.c) },
  15549. opacity: { get: ExpressionPropertyInterface(p.o) },
  15550. _name: { value: d.nm },
  15551. mn: { value: d.mn }
  15552. }),
  15553. p.c.setGroupProperty(PropertyInterface('Color', x)),
  15554. p.o.setGroupProperty(PropertyInterface('Opacity', x)),
  15555. u
  15556. );
  15557. }
  15558. function s(d, p, x) {
  15559. function u(y) {
  15560. return y === 'Start Point' || y === 'start point'
  15561. ? u.startPoint
  15562. : y === 'End Point' || y === 'end point'
  15563. ? u.endPoint
  15564. : y === 'Opacity' || y === 'opacity'
  15565. ? u.opacity
  15566. : null;
  15567. }
  15568. return (
  15569. Object.defineProperties(u, {
  15570. startPoint: { get: ExpressionPropertyInterface(p.s) },
  15571. endPoint: { get: ExpressionPropertyInterface(p.e) },
  15572. opacity: { get: ExpressionPropertyInterface(p.o) },
  15573. type: {
  15574. get: function () {
  15575. return 'a';
  15576. }
  15577. },
  15578. _name: { value: d.nm },
  15579. mn: { value: d.mn }
  15580. }),
  15581. p.s.setGroupProperty(PropertyInterface('Start Point', x)),
  15582. p.e.setGroupProperty(PropertyInterface('End Point', x)),
  15583. p.o.setGroupProperty(PropertyInterface('Opacity', x)),
  15584. u
  15585. );
  15586. }
  15587. function a() {
  15588. function d() {
  15589. return null;
  15590. }
  15591. return d;
  15592. }
  15593. function o(d, p, x) {
  15594. var u = propertyGroupFactory(_, x),
  15595. y = propertyGroupFactory(E, u);
  15596. function m(I) {
  15597. Object.defineProperty(E, d.d[I].nm, {
  15598. get: ExpressionPropertyInterface(p.d.dataProps[I].p)
  15599. });
  15600. }
  15601. var A,
  15602. T = d.d ? d.d.length : 0,
  15603. E = {};
  15604. for (A = 0; A < T; A += 1)
  15605. m(A), p.d.dataProps[A].p.setGroupProperty(y);
  15606. function _(I) {
  15607. return I === 'Color' || I === 'color'
  15608. ? _.color
  15609. : I === 'Opacity' || I === 'opacity'
  15610. ? _.opacity
  15611. : I === 'Stroke Width' || I === 'stroke width'
  15612. ? _.strokeWidth
  15613. : null;
  15614. }
  15615. return (
  15616. Object.defineProperties(_, {
  15617. color: { get: ExpressionPropertyInterface(p.c) },
  15618. opacity: { get: ExpressionPropertyInterface(p.o) },
  15619. strokeWidth: { get: ExpressionPropertyInterface(p.w) },
  15620. dash: {
  15621. get: function () {
  15622. return E;
  15623. }
  15624. },
  15625. _name: { value: d.nm },
  15626. mn: { value: d.mn }
  15627. }),
  15628. p.c.setGroupProperty(PropertyInterface('Color', u)),
  15629. p.o.setGroupProperty(PropertyInterface('Opacity', u)),
  15630. p.w.setGroupProperty(PropertyInterface('Stroke Width', u)),
  15631. _
  15632. );
  15633. }
  15634. function n(d, p, x) {
  15635. function u(m) {
  15636. return m === d.e.ix || m === 'End' || m === 'end'
  15637. ? u.end
  15638. : m === d.s.ix
  15639. ? u.start
  15640. : m === d.o.ix
  15641. ? u.offset
  15642. : null;
  15643. }
  15644. var y = propertyGroupFactory(u, x);
  15645. return (
  15646. (u.propertyIndex = d.ix),
  15647. p.s.setGroupProperty(PropertyInterface('Start', y)),
  15648. p.e.setGroupProperty(PropertyInterface('End', y)),
  15649. p.o.setGroupProperty(PropertyInterface('Offset', y)),
  15650. (u.propertyIndex = d.ix),
  15651. (u.propertyGroup = x),
  15652. Object.defineProperties(u, {
  15653. start: { get: ExpressionPropertyInterface(p.s) },
  15654. end: { get: ExpressionPropertyInterface(p.e) },
  15655. offset: { get: ExpressionPropertyInterface(p.o) },
  15656. _name: { value: d.nm }
  15657. }),
  15658. (u.mn = d.mn),
  15659. u
  15660. );
  15661. }
  15662. function l(d, p, x) {
  15663. function u(m) {
  15664. return d.a.ix === m || m === 'Anchor Point'
  15665. ? u.anchorPoint
  15666. : d.o.ix === m || m === 'Opacity'
  15667. ? u.opacity
  15668. : d.p.ix === m || m === 'Position'
  15669. ? u.position
  15670. : d.r.ix === m ||
  15671. m === 'Rotation' ||
  15672. m === 'ADBE Vector Rotation'
  15673. ? u.rotation
  15674. : d.s.ix === m || m === 'Scale'
  15675. ? u.scale
  15676. : (d.sk && d.sk.ix === m) || m === 'Skew'
  15677. ? u.skew
  15678. : (d.sa && d.sa.ix === m) || m === 'Skew Axis'
  15679. ? u.skewAxis
  15680. : null;
  15681. }
  15682. var y = propertyGroupFactory(u, x);
  15683. return (
  15684. p.transform.mProps.o.setGroupProperty(
  15685. PropertyInterface('Opacity', y)
  15686. ),
  15687. p.transform.mProps.p.setGroupProperty(
  15688. PropertyInterface('Position', y)
  15689. ),
  15690. p.transform.mProps.a.setGroupProperty(
  15691. PropertyInterface('Anchor Point', y)
  15692. ),
  15693. p.transform.mProps.s.setGroupProperty(
  15694. PropertyInterface('Scale', y)
  15695. ),
  15696. p.transform.mProps.r.setGroupProperty(
  15697. PropertyInterface('Rotation', y)
  15698. ),
  15699. p.transform.mProps.sk &&
  15700. (p.transform.mProps.sk.setGroupProperty(
  15701. PropertyInterface('Skew', y)
  15702. ),
  15703. p.transform.mProps.sa.setGroupProperty(
  15704. PropertyInterface('Skew Angle', y)
  15705. )),
  15706. p.transform.op.setGroupProperty(PropertyInterface('Opacity', y)),
  15707. Object.defineProperties(u, {
  15708. opacity: {
  15709. get: ExpressionPropertyInterface(p.transform.mProps.o)
  15710. },
  15711. position: {
  15712. get: ExpressionPropertyInterface(p.transform.mProps.p)
  15713. },
  15714. anchorPoint: {
  15715. get: ExpressionPropertyInterface(p.transform.mProps.a)
  15716. },
  15717. scale: {
  15718. get: ExpressionPropertyInterface(p.transform.mProps.s)
  15719. },
  15720. rotation: {
  15721. get: ExpressionPropertyInterface(p.transform.mProps.r)
  15722. },
  15723. skew: {
  15724. get: ExpressionPropertyInterface(p.transform.mProps.sk)
  15725. },
  15726. skewAxis: {
  15727. get: ExpressionPropertyInterface(p.transform.mProps.sa)
  15728. },
  15729. _name: { value: d.nm }
  15730. }),
  15731. (u.ty = 'tr'),
  15732. (u.mn = d.mn),
  15733. (u.propertyGroup = x),
  15734. u
  15735. );
  15736. }
  15737. function f(d, p, x) {
  15738. function u(A) {
  15739. return d.p.ix === A ? u.position : d.s.ix === A ? u.size : null;
  15740. }
  15741. var y = propertyGroupFactory(u, x);
  15742. u.propertyIndex = d.ix;
  15743. var m = p.sh.ty === 'tm' ? p.sh.prop : p.sh;
  15744. return (
  15745. m.s.setGroupProperty(PropertyInterface('Size', y)),
  15746. m.p.setGroupProperty(PropertyInterface('Position', y)),
  15747. Object.defineProperties(u, {
  15748. size: { get: ExpressionPropertyInterface(m.s) },
  15749. position: { get: ExpressionPropertyInterface(m.p) },
  15750. _name: { value: d.nm }
  15751. }),
  15752. (u.mn = d.mn),
  15753. u
  15754. );
  15755. }
  15756. function g(d, p, x) {
  15757. function u(A) {
  15758. return d.p.ix === A
  15759. ? u.position
  15760. : d.r.ix === A
  15761. ? u.rotation
  15762. : d.pt.ix === A
  15763. ? u.points
  15764. : d.or.ix === A || A === 'ADBE Vector Star Outer Radius'
  15765. ? u.outerRadius
  15766. : d.os.ix === A
  15767. ? u.outerRoundness
  15768. : d.ir &&
  15769. (d.ir.ix === A || A === 'ADBE Vector Star Inner Radius')
  15770. ? u.innerRadius
  15771. : d.is && d.is.ix === A
  15772. ? u.innerRoundness
  15773. : null;
  15774. }
  15775. var y = propertyGroupFactory(u, x),
  15776. m = p.sh.ty === 'tm' ? p.sh.prop : p.sh;
  15777. return (
  15778. (u.propertyIndex = d.ix),
  15779. m.or.setGroupProperty(PropertyInterface('Outer Radius', y)),
  15780. m.os.setGroupProperty(PropertyInterface('Outer Roundness', y)),
  15781. m.pt.setGroupProperty(PropertyInterface('Points', y)),
  15782. m.p.setGroupProperty(PropertyInterface('Position', y)),
  15783. m.r.setGroupProperty(PropertyInterface('Rotation', y)),
  15784. d.ir &&
  15785. (m.ir.setGroupProperty(PropertyInterface('Inner Radius', y)),
  15786. m.is.setGroupProperty(PropertyInterface('Inner Roundness', y))),
  15787. Object.defineProperties(u, {
  15788. position: { get: ExpressionPropertyInterface(m.p) },
  15789. rotation: { get: ExpressionPropertyInterface(m.r) },
  15790. points: { get: ExpressionPropertyInterface(m.pt) },
  15791. outerRadius: { get: ExpressionPropertyInterface(m.or) },
  15792. outerRoundness: { get: ExpressionPropertyInterface(m.os) },
  15793. innerRadius: { get: ExpressionPropertyInterface(m.ir) },
  15794. innerRoundness: { get: ExpressionPropertyInterface(m.is) },
  15795. _name: { value: d.nm }
  15796. }),
  15797. (u.mn = d.mn),
  15798. u
  15799. );
  15800. }
  15801. function S(d, p, x) {
  15802. function u(A) {
  15803. return d.p.ix === A
  15804. ? u.position
  15805. : d.r.ix === A
  15806. ? u.roundness
  15807. : d.s.ix === A || A === 'Size' || A === 'ADBE Vector Rect Size'
  15808. ? u.size
  15809. : null;
  15810. }
  15811. var y = propertyGroupFactory(u, x),
  15812. m = p.sh.ty === 'tm' ? p.sh.prop : p.sh;
  15813. return (
  15814. (u.propertyIndex = d.ix),
  15815. m.p.setGroupProperty(PropertyInterface('Position', y)),
  15816. m.s.setGroupProperty(PropertyInterface('Size', y)),
  15817. m.r.setGroupProperty(PropertyInterface('Rotation', y)),
  15818. Object.defineProperties(u, {
  15819. position: { get: ExpressionPropertyInterface(m.p) },
  15820. roundness: { get: ExpressionPropertyInterface(m.r) },
  15821. size: { get: ExpressionPropertyInterface(m.s) },
  15822. _name: { value: d.nm }
  15823. }),
  15824. (u.mn = d.mn),
  15825. u
  15826. );
  15827. }
  15828. function c(d, p, x) {
  15829. function u(A) {
  15830. return d.r.ix === A || A === 'Round Corners 1' ? u.radius : null;
  15831. }
  15832. var y = propertyGroupFactory(u, x),
  15833. m = p;
  15834. return (
  15835. (u.propertyIndex = d.ix),
  15836. m.rd.setGroupProperty(PropertyInterface('Radius', y)),
  15837. Object.defineProperties(u, {
  15838. radius: { get: ExpressionPropertyInterface(m.rd) },
  15839. _name: { value: d.nm }
  15840. }),
  15841. (u.mn = d.mn),
  15842. u
  15843. );
  15844. }
  15845. function P(d, p, x) {
  15846. function u(A) {
  15847. return d.c.ix === A || A === 'Copies'
  15848. ? u.copies
  15849. : d.o.ix === A || A === 'Offset'
  15850. ? u.offset
  15851. : null;
  15852. }
  15853. var y = propertyGroupFactory(u, x),
  15854. m = p;
  15855. return (
  15856. (u.propertyIndex = d.ix),
  15857. m.c.setGroupProperty(PropertyInterface('Copies', y)),
  15858. m.o.setGroupProperty(PropertyInterface('Offset', y)),
  15859. Object.defineProperties(u, {
  15860. copies: { get: ExpressionPropertyInterface(m.c) },
  15861. offset: { get: ExpressionPropertyInterface(m.o) },
  15862. _name: { value: d.nm }
  15863. }),
  15864. (u.mn = d.mn),
  15865. u
  15866. );
  15867. }
  15868. return function (d, p, x) {
  15869. var u;
  15870. function y(A) {
  15871. if (typeof A == 'number')
  15872. return (A = A === void 0 ? 1 : A), A === 0 ? x : u[A - 1];
  15873. for (var T = 0, E = u.length; T < E; ) {
  15874. if (u[T]._name === A) return u[T];
  15875. T += 1;
  15876. }
  15877. return null;
  15878. }
  15879. function m() {
  15880. return x;
  15881. }
  15882. return (
  15883. (y.propertyGroup = propertyGroupFactory(y, m)),
  15884. (u = e(d, p, y.propertyGroup)),
  15885. (y.numProperties = u.length),
  15886. (y._name = 'Contents'),
  15887. y
  15888. );
  15889. };
  15890. })(),
  15891. TextExpressionInterface = (function () {
  15892. return function (e) {
  15893. var t;
  15894. function r(i) {
  15895. switch (i) {
  15896. case 'ADBE Text Document':
  15897. return r.sourceText;
  15898. default:
  15899. return null;
  15900. }
  15901. }
  15902. return (
  15903. Object.defineProperty(r, 'sourceText', {
  15904. get: function () {
  15905. e.textProperty.getValue();
  15906. var s = e.textProperty.currentData.t;
  15907. return (
  15908. (!t || s !== t.value) &&
  15909. ((t = new String(s)),
  15910. (t.value = s || new String(s)),
  15911. Object.defineProperty(t, 'style', {
  15912. get: function () {
  15913. return { fillColor: e.textProperty.currentData.fc };
  15914. }
  15915. })),
  15916. t
  15917. );
  15918. }
  15919. }),
  15920. r
  15921. );
  15922. };
  15923. })();
  15924. function _typeof(e) {
  15925. '@babel/helpers - typeof';
  15926. return (
  15927. typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
  15928. ? (_typeof = function (r) {
  15929. return typeof r;
  15930. })
  15931. : (_typeof = function (r) {
  15932. return r &&
  15933. typeof Symbol == 'function' &&
  15934. r.constructor === Symbol &&
  15935. r !== Symbol.prototype
  15936. ? 'symbol'
  15937. : typeof r;
  15938. }),
  15939. _typeof(e)
  15940. );
  15941. }
  15942. var FootageInterface = (function () {
  15943. var e = function (i) {
  15944. var s = '',
  15945. a = i.getFootageData();
  15946. function o() {
  15947. return (s = ''), (a = i.getFootageData()), n;
  15948. }
  15949. function n(l) {
  15950. if (a[l])
  15951. return (s = l), (a = a[l]), _typeof(a) === 'object' ? n : a;
  15952. var f = l.indexOf(s);
  15953. if (f !== -1) {
  15954. var g = parseInt(l.substr(f + s.length), 10);
  15955. return (a = a[g]), _typeof(a) === 'object' ? n : a;
  15956. }
  15957. return '';
  15958. }
  15959. return o;
  15960. },
  15961. t = function (i) {
  15962. function s(a) {
  15963. return a === 'Outline' ? s.outlineInterface() : null;
  15964. }
  15965. return (s._name = 'Outline'), (s.outlineInterface = e(i)), s;
  15966. };
  15967. return function (r) {
  15968. function i(s) {
  15969. return s === 'Data' ? i.dataInterface : null;
  15970. }
  15971. return (i._name = 'Data'), (i.dataInterface = t(r)), i;
  15972. };
  15973. })(),
  15974. interfaces = {
  15975. layer: LayerExpressionInterface,
  15976. effects: EffectsExpressionInterface,
  15977. comp: CompExpressionInterface,
  15978. shape: ShapeExpressionInterface,
  15979. text: TextExpressionInterface,
  15980. footage: FootageInterface
  15981. };
  15982. function getInterface(e) {
  15983. return interfaces[e] || null;
  15984. }
  15985. var expressionHelpers = (function () {
  15986. function e(o, n, l) {
  15987. n.x &&
  15988. ((l.k = !0),
  15989. (l.x = !0),
  15990. (l.initiateExpression = ExpressionManager.initiateExpression),
  15991. l.effectsSequence.push(l.initiateExpression(o, n, l).bind(l)));
  15992. }
  15993. function t(o) {
  15994. return (
  15995. (o *= this.elem.globalData.frameRate),
  15996. (o -= this.offsetTime),
  15997. o !== this._cachingAtTime.lastFrame &&
  15998. ((this._cachingAtTime.lastIndex =
  15999. this._cachingAtTime.lastFrame < o
  16000. ? this._cachingAtTime.lastIndex
  16001. : 0),
  16002. (this._cachingAtTime.value = this.interpolateValue(
  16003. o,
  16004. this._cachingAtTime
  16005. )),
  16006. (this._cachingAtTime.lastFrame = o)),
  16007. this._cachingAtTime.value
  16008. );
  16009. }
  16010. function r(o) {
  16011. var n = -0.01,
  16012. l = this.getValueAtTime(o),
  16013. f = this.getValueAtTime(o + n),
  16014. g = 0;
  16015. if (l.length) {
  16016. var S;
  16017. for (S = 0; S < l.length; S += 1) g += Math.pow(f[S] - l[S], 2);
  16018. g = Math.sqrt(g) * 100;
  16019. } else g = 0;
  16020. return g;
  16021. }
  16022. function i(o) {
  16023. if (this.vel !== void 0) return this.vel;
  16024. var n = -0.001,
  16025. l = this.getValueAtTime(o),
  16026. f = this.getValueAtTime(o + n),
  16027. g;
  16028. if (l.length) {
  16029. g = createTypedArray('float32', l.length);
  16030. var S;
  16031. for (S = 0; S < l.length; S += 1) g[S] = (f[S] - l[S]) / n;
  16032. } else g = (f - l) / n;
  16033. return g;
  16034. }
  16035. function s() {
  16036. return this.pv;
  16037. }
  16038. function a(o) {
  16039. this.propertyGroup = o;
  16040. }
  16041. return {
  16042. searchExpressions: e,
  16043. getSpeedAtTime: r,
  16044. getVelocityAtTime: i,
  16045. getValueAtTime: t,
  16046. getStaticValueAtTime: s,
  16047. setGroupProperty: a
  16048. };
  16049. })();
  16050. function addPropertyDecorator() {
  16051. function e(c, P, d) {
  16052. if (!this.k || !this.keyframes) return this.pv;
  16053. c = c ? c.toLowerCase() : '';
  16054. var p = this.comp.renderedFrame,
  16055. x = this.keyframes,
  16056. u = x[x.length - 1].t;
  16057. if (p <= u) return this.pv;
  16058. var y, m;
  16059. d
  16060. ? (P
  16061. ? (y = Math.abs(u - this.elem.comp.globalData.frameRate * P))
  16062. : (y = Math.max(0, u - this.elem.data.ip)),
  16063. (m = u - y))
  16064. : ((!P || P > x.length - 1) && (P = x.length - 1),
  16065. (m = x[x.length - 1 - P].t),
  16066. (y = u - m));
  16067. var A, T, E;
  16068. if (c === 'pingpong') {
  16069. var _ = Math.floor((p - m) / y);
  16070. if (_ % 2 !== 0)
  16071. return this.getValueAtTime(
  16072. (y - ((p - m) % y) + m) / this.comp.globalData.frameRate,
  16073. 0
  16074. );
  16075. } else if (c === 'offset') {
  16076. var I = this.getValueAtTime(m / this.comp.globalData.frameRate, 0),
  16077. B = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  16078. z = this.getValueAtTime(
  16079. (((p - m) % y) + m) / this.comp.globalData.frameRate,
  16080. 0
  16081. ),
  16082. G = Math.floor((p - m) / y);
  16083. if (this.pv.length) {
  16084. for (E = new Array(I.length), T = E.length, A = 0; A < T; A += 1)
  16085. E[A] = (B[A] - I[A]) * G + z[A];
  16086. return E;
  16087. }
  16088. return (B - I) * G + z;
  16089. } else if (c === 'continue') {
  16090. var R = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  16091. W = this.getValueAtTime(
  16092. (u - 0.001) / this.comp.globalData.frameRate,
  16093. 0
  16094. );
  16095. if (this.pv.length) {
  16096. for (E = new Array(R.length), T = E.length, A = 0; A < T; A += 1)
  16097. E[A] =
  16098. R[A] +
  16099. ((R[A] - W[A]) * ((p - u) / this.comp.globalData.frameRate)) /
  16100. 5e-4;
  16101. return E;
  16102. }
  16103. return R + (R - W) * ((p - u) / 0.001);
  16104. }
  16105. return this.getValueAtTime(
  16106. (((p - m) % y) + m) / this.comp.globalData.frameRate,
  16107. 0
  16108. );
  16109. }
  16110. function t(c, P, d) {
  16111. if (!this.k) return this.pv;
  16112. c = c ? c.toLowerCase() : '';
  16113. var p = this.comp.renderedFrame,
  16114. x = this.keyframes,
  16115. u = x[0].t;
  16116. if (p >= u) return this.pv;
  16117. var y, m;
  16118. d
  16119. ? (P
  16120. ? (y = Math.abs(this.elem.comp.globalData.frameRate * P))
  16121. : (y = Math.max(0, this.elem.data.op - u)),
  16122. (m = u + y))
  16123. : ((!P || P > x.length - 1) && (P = x.length - 1),
  16124. (m = x[P].t),
  16125. (y = m - u));
  16126. var A, T, E;
  16127. if (c === 'pingpong') {
  16128. var _ = Math.floor((u - p) / y);
  16129. if (_ % 2 === 0)
  16130. return this.getValueAtTime(
  16131. (((u - p) % y) + u) / this.comp.globalData.frameRate,
  16132. 0
  16133. );
  16134. } else if (c === 'offset') {
  16135. var I = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  16136. B = this.getValueAtTime(m / this.comp.globalData.frameRate, 0),
  16137. z = this.getValueAtTime(
  16138. (y - ((u - p) % y) + u) / this.comp.globalData.frameRate,
  16139. 0
  16140. ),
  16141. G = Math.floor((u - p) / y) + 1;
  16142. if (this.pv.length) {
  16143. for (E = new Array(I.length), T = E.length, A = 0; A < T; A += 1)
  16144. E[A] = z[A] - (B[A] - I[A]) * G;
  16145. return E;
  16146. }
  16147. return z - (B - I) * G;
  16148. } else if (c === 'continue') {
  16149. var R = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
  16150. W = this.getValueAtTime(
  16151. (u + 0.001) / this.comp.globalData.frameRate,
  16152. 0
  16153. );
  16154. if (this.pv.length) {
  16155. for (E = new Array(R.length), T = E.length, A = 0; A < T; A += 1)
  16156. E[A] = R[A] + ((R[A] - W[A]) * (u - p)) / 0.001;
  16157. return E;
  16158. }
  16159. return R + ((R - W) * (u - p)) / 0.001;
  16160. }
  16161. return this.getValueAtTime(
  16162. (y - (((u - p) % y) + u)) / this.comp.globalData.frameRate,
  16163. 0
  16164. );
  16165. }
  16166. function r(c, P) {
  16167. if (!this.k) return this.pv;
  16168. if (((c = (c || 0.4) * 0.5), (P = Math.floor(P || 5)), P <= 1))
  16169. return this.pv;
  16170. var d = this.comp.renderedFrame / this.comp.globalData.frameRate,
  16171. p = d - c,
  16172. x = d + c,
  16173. u = P > 1 ? (x - p) / (P - 1) : 1,
  16174. y = 0,
  16175. m = 0,
  16176. A;
  16177. this.pv.length
  16178. ? (A = createTypedArray('float32', this.pv.length))
  16179. : (A = 0);
  16180. for (var T; y < P; ) {
  16181. if (((T = this.getValueAtTime(p + y * u)), this.pv.length))
  16182. for (m = 0; m < this.pv.length; m += 1) A[m] += T[m];
  16183. else A += T;
  16184. y += 1;
  16185. }
  16186. if (this.pv.length) for (m = 0; m < this.pv.length; m += 1) A[m] /= P;
  16187. else A /= P;
  16188. return A;
  16189. }
  16190. function i(c) {
  16191. this._transformCachingAtTime ||
  16192. (this._transformCachingAtTime = { v: new Matrix() });
  16193. var P = this._transformCachingAtTime.v;
  16194. if (
  16195. (P.cloneFromProps(this.pre.props), this.appliedTransformations < 1)
  16196. ) {
  16197. var d = this.a.getValueAtTime(c);
  16198. P.translate(
  16199. -d[0] * this.a.mult,
  16200. -d[1] * this.a.mult,
  16201. d[2] * this.a.mult
  16202. );
  16203. }
  16204. if (this.appliedTransformations < 2) {
  16205. var p = this.s.getValueAtTime(c);
  16206. P.scale(p[0] * this.s.mult, p[1] * this.s.mult, p[2] * this.s.mult);
  16207. }
  16208. if (this.sk && this.appliedTransformations < 3) {
  16209. var x = this.sk.getValueAtTime(c),
  16210. u = this.sa.getValueAtTime(c);
  16211. P.skewFromAxis(-x * this.sk.mult, u * this.sa.mult);
  16212. }
  16213. if (this.r && this.appliedTransformations < 4) {
  16214. var y = this.r.getValueAtTime(c);
  16215. P.rotate(-y * this.r.mult);
  16216. } else if (!this.r && this.appliedTransformations < 4) {
  16217. var m = this.rz.getValueAtTime(c),
  16218. A = this.ry.getValueAtTime(c),
  16219. T = this.rx.getValueAtTime(c),
  16220. E = this.or.getValueAtTime(c);
  16221. P.rotateZ(-m * this.rz.mult)
  16222. .rotateY(A * this.ry.mult)
  16223. .rotateX(T * this.rx.mult)
  16224. .rotateZ(-E[2] * this.or.mult)
  16225. .rotateY(E[1] * this.or.mult)
  16226. .rotateX(E[0] * this.or.mult);
  16227. }
  16228. if (this.data.p && this.data.p.s) {
  16229. var _ = this.px.getValueAtTime(c),
  16230. I = this.py.getValueAtTime(c);
  16231. if (this.data.p.z) {
  16232. var B = this.pz.getValueAtTime(c);
  16233. P.translate(
  16234. _ * this.px.mult,
  16235. I * this.py.mult,
  16236. -B * this.pz.mult
  16237. );
  16238. } else P.translate(_ * this.px.mult, I * this.py.mult, 0);
  16239. } else {
  16240. var z = this.p.getValueAtTime(c);
  16241. P.translate(
  16242. z[0] * this.p.mult,
  16243. z[1] * this.p.mult,
  16244. -z[2] * this.p.mult
  16245. );
  16246. }
  16247. return P;
  16248. }
  16249. function s() {
  16250. return this.v.clone(new Matrix());
  16251. }
  16252. var a = TransformPropertyFactory.getTransformProperty;
  16253. TransformPropertyFactory.getTransformProperty = function (c, P, d) {
  16254. var p = a(c, P, d);
  16255. return (
  16256. p.dynamicProperties.length
  16257. ? (p.getValueAtTime = i.bind(p))
  16258. : (p.getValueAtTime = s.bind(p)),
  16259. (p.setGroupProperty = expressionHelpers.setGroupProperty),
  16260. p
  16261. );
  16262. };
  16263. var o = PropertyFactory.getProp;
  16264. PropertyFactory.getProp = function (c, P, d, p, x) {
  16265. var u = o(c, P, d, p, x);
  16266. u.kf
  16267. ? (u.getValueAtTime = expressionHelpers.getValueAtTime.bind(u))
  16268. : (u.getValueAtTime =
  16269. expressionHelpers.getStaticValueAtTime.bind(u)),
  16270. (u.setGroupProperty = expressionHelpers.setGroupProperty),
  16271. (u.loopOut = e),
  16272. (u.loopIn = t),
  16273. (u.smooth = r),
  16274. (u.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(u)),
  16275. (u.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(u)),
  16276. (u.numKeys = P.a === 1 ? P.k.length : 0),
  16277. (u.propertyIndex = P.ix);
  16278. var y = 0;
  16279. return (
  16280. d !== 0 &&
  16281. (y = createTypedArray(
  16282. 'float32',
  16283. P.a === 1 ? P.k[0].s.length : P.k.length
  16284. )),
  16285. (u._cachingAtTime = {
  16286. lastFrame: initialDefaultFrame,
  16287. lastIndex: 0,
  16288. value: y
  16289. }),
  16290. expressionHelpers.searchExpressions(c, P, u),
  16291. u.k && x.addDynamicProperty(u),
  16292. u
  16293. );
  16294. };
  16295. function n(c) {
  16296. return (
  16297. this._cachingAtTime ||
  16298. (this._cachingAtTime = {
  16299. shapeValue: shapePool.clone(this.pv),
  16300. lastIndex: 0,
  16301. lastTime: initialDefaultFrame
  16302. }),
  16303. (c *= this.elem.globalData.frameRate),
  16304. (c -= this.offsetTime),
  16305. c !== this._cachingAtTime.lastTime &&
  16306. ((this._cachingAtTime.lastIndex =
  16307. this._cachingAtTime.lastTime < c ? this._caching.lastIndex : 0),
  16308. (this._cachingAtTime.lastTime = c),
  16309. this.interpolateShape(
  16310. c,
  16311. this._cachingAtTime.shapeValue,
  16312. this._cachingAtTime
  16313. )),
  16314. this._cachingAtTime.shapeValue
  16315. );
  16316. }
  16317. var l = ShapePropertyFactory.getConstructorFunction(),
  16318. f = ShapePropertyFactory.getKeyframedConstructorFunction();
  16319. function g() {}
  16320. (g.prototype = {
  16321. vertices: function (P, d) {
  16322. this.k && this.getValue();
  16323. var p = this.v;
  16324. d !== void 0 && (p = this.getValueAtTime(d, 0));
  16325. var x,
  16326. u = p._length,
  16327. y = p[P],
  16328. m = p.v,
  16329. A = createSizedArray(u);
  16330. for (x = 0; x < u; x += 1)
  16331. P === 'i' || P === 'o'
  16332. ? (A[x] = [y[x][0] - m[x][0], y[x][1] - m[x][1]])
  16333. : (A[x] = [y[x][0], y[x][1]]);
  16334. return A;
  16335. },
  16336. points: function (P) {
  16337. return this.vertices('v', P);
  16338. },
  16339. inTangents: function (P) {
  16340. return this.vertices('i', P);
  16341. },
  16342. outTangents: function (P) {
  16343. return this.vertices('o', P);
  16344. },
  16345. isClosed: function () {
  16346. return this.v.c;
  16347. },
  16348. pointOnPath: function (P, d) {
  16349. var p = this.v;
  16350. d !== void 0 && (p = this.getValueAtTime(d, 0)),
  16351. this._segmentsLength ||
  16352. (this._segmentsLength = bez.getSegmentsLength(p));
  16353. for (
  16354. var x = this._segmentsLength,
  16355. u = x.lengths,
  16356. y = x.totalLength * P,
  16357. m = 0,
  16358. A = u.length,
  16359. T = 0,
  16360. E;
  16361. m < A;
  16362. ) {
  16363. if (T + u[m].addedLength > y) {
  16364. var _ = m,
  16365. I = p.c && m === A - 1 ? 0 : m + 1,
  16366. B = (y - T) / u[m].addedLength;
  16367. E = bez.getPointInSegment(
  16368. p.v[_],
  16369. p.v[I],
  16370. p.o[_],
  16371. p.i[I],
  16372. B,
  16373. u[m]
  16374. );
  16375. break;
  16376. } else T += u[m].addedLength;
  16377. m += 1;
  16378. }
  16379. return (
  16380. E ||
  16381. (E = p.c
  16382. ? [p.v[0][0], p.v[0][1]]
  16383. : [p.v[p._length - 1][0], p.v[p._length - 1][1]]),
  16384. E
  16385. );
  16386. },
  16387. vectorOnPath: function (P, d, p) {
  16388. P == 1 ? (P = this.v.c) : P == 0 && (P = 0.999);
  16389. var x = this.pointOnPath(P, d),
  16390. u = this.pointOnPath(P + 0.001, d),
  16391. y = u[0] - x[0],
  16392. m = u[1] - x[1],
  16393. A = Math.sqrt(Math.pow(y, 2) + Math.pow(m, 2));
  16394. if (A === 0) return [0, 0];
  16395. var T = p === 'tangent' ? [y / A, m / A] : [-m / A, y / A];
  16396. return T;
  16397. },
  16398. tangentOnPath: function (P, d) {
  16399. return this.vectorOnPath(P, d, 'tangent');
  16400. },
  16401. normalOnPath: function (P, d) {
  16402. return this.vectorOnPath(P, d, 'normal');
  16403. },
  16404. setGroupProperty: expressionHelpers.setGroupProperty,
  16405. getValueAtTime: expressionHelpers.getStaticValueAtTime
  16406. }),
  16407. extendPrototype([g], l),
  16408. extendPrototype([g], f),
  16409. (f.prototype.getValueAtTime = n),
  16410. (f.prototype.initiateExpression =
  16411. ExpressionManager.initiateExpression);
  16412. var S = ShapePropertyFactory.getShapeProp;
  16413. ShapePropertyFactory.getShapeProp = function (c, P, d, p, x) {
  16414. var u = S(c, P, d, p, x);
  16415. return (
  16416. (u.propertyIndex = P.ix),
  16417. (u.lock = !1),
  16418. d === 3
  16419. ? expressionHelpers.searchExpressions(c, P.pt, u)
  16420. : d === 4 && expressionHelpers.searchExpressions(c, P.ks, u),
  16421. u.k && c.addDynamicProperty(u),
  16422. u
  16423. );
  16424. };
  16425. }
  16426. function initialize$1() {
  16427. addPropertyDecorator();
  16428. }
  16429. function addDecorator() {
  16430. function e() {
  16431. return this.data.d.x
  16432. ? ((this.calculateExpression =
  16433. ExpressionManager.initiateExpression.bind(this)(
  16434. this.elem,
  16435. this.data.d,
  16436. this
  16437. )),
  16438. this.addEffect(this.getExpressionValue.bind(this)),
  16439. !0)
  16440. : null;
  16441. }
  16442. (TextProperty.prototype.getExpressionValue = function (t, r) {
  16443. var i = this.calculateExpression(r);
  16444. if (t.t !== i) {
  16445. var s = {};
  16446. return (
  16447. this.copyData(s, t), (s.t = i.toString()), (s.__complete = !1), s
  16448. );
  16449. }
  16450. return t;
  16451. }),
  16452. (TextProperty.prototype.searchProperty = function () {
  16453. var t = this.searchKeyframes(),
  16454. r = this.searchExpressions();
  16455. return (this.kf = t || r), this.kf;
  16456. }),
  16457. (TextProperty.prototype.searchExpressions = e);
  16458. }
  16459. function initialize() {
  16460. addDecorator();
  16461. }
  16462. function SVGComposableEffect() {}
  16463. SVGComposableEffect.prototype = {
  16464. createMergeNode: function e(t, r) {
  16465. var i = createNS('feMerge');
  16466. i.setAttribute('result', t);
  16467. var s, a;
  16468. for (a = 0; a < r.length; a += 1)
  16469. (s = createNS('feMergeNode')),
  16470. s.setAttribute('in', r[a]),
  16471. i.appendChild(s),
  16472. i.appendChild(s);
  16473. return i;
  16474. }
  16475. };
  16476. var linearFilterValue =
  16477. '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0';
  16478. function SVGTintFilter(e, t, r, i, s) {
  16479. this.filterManager = t;
  16480. var a = createNS('feColorMatrix');
  16481. a.setAttribute('type', 'matrix'),
  16482. a.setAttribute('color-interpolation-filters', 'linearRGB'),
  16483. a.setAttribute('values', linearFilterValue + ' 1 0'),
  16484. (this.linearFilter = a),
  16485. a.setAttribute('result', i + '_tint_1'),
  16486. e.appendChild(a),
  16487. (a = createNS('feColorMatrix')),
  16488. a.setAttribute('type', 'matrix'),
  16489. a.setAttribute('color-interpolation-filters', 'sRGB'),
  16490. a.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'),
  16491. a.setAttribute('result', i + '_tint_2'),
  16492. e.appendChild(a),
  16493. (this.matrixFilter = a);
  16494. var o = this.createMergeNode(i, [s, i + '_tint_1', i + '_tint_2']);
  16495. e.appendChild(o);
  16496. }
  16497. extendPrototype([SVGComposableEffect], SVGTintFilter),
  16498. (SVGTintFilter.prototype.renderFrame = function (e) {
  16499. if (e || this.filterManager._mdf) {
  16500. var t = this.filterManager.effectElements[0].p.v,
  16501. r = this.filterManager.effectElements[1].p.v,
  16502. i = this.filterManager.effectElements[2].p.v / 100;
  16503. this.linearFilter.setAttribute(
  16504. 'values',
  16505. linearFilterValue + ' ' + i + ' 0'
  16506. ),
  16507. this.matrixFilter.setAttribute(
  16508. 'values',
  16509. r[0] -
  16510. t[0] +
  16511. ' 0 0 0 ' +
  16512. t[0] +
  16513. ' ' +
  16514. (r[1] - t[1]) +
  16515. ' 0 0 0 ' +
  16516. t[1] +
  16517. ' ' +
  16518. (r[2] - t[2]) +
  16519. ' 0 0 0 ' +
  16520. t[2] +
  16521. ' 0 0 0 1 0'
  16522. );
  16523. }
  16524. });
  16525. function SVGFillFilter(e, t, r, i) {
  16526. this.filterManager = t;
  16527. var s = createNS('feColorMatrix');
  16528. s.setAttribute('type', 'matrix'),
  16529. s.setAttribute('color-interpolation-filters', 'sRGB'),
  16530. s.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'),
  16531. s.setAttribute('result', i),
  16532. e.appendChild(s),
  16533. (this.matrixFilter = s);
  16534. }
  16535. SVGFillFilter.prototype.renderFrame = function (e) {
  16536. if (e || this.filterManager._mdf) {
  16537. var t = this.filterManager.effectElements[2].p.v,
  16538. r = this.filterManager.effectElements[6].p.v;
  16539. this.matrixFilter.setAttribute(
  16540. 'values',
  16541. '0 0 0 0 ' +
  16542. t[0] +
  16543. ' 0 0 0 0 ' +
  16544. t[1] +
  16545. ' 0 0 0 0 ' +
  16546. t[2] +
  16547. ' 0 0 0 ' +
  16548. r +
  16549. ' 0'
  16550. );
  16551. }
  16552. };
  16553. function SVGStrokeEffect(e, t, r) {
  16554. (this.initialized = !1),
  16555. (this.filterManager = t),
  16556. (this.elem = r),
  16557. (this.paths = []);
  16558. }
  16559. (SVGStrokeEffect.prototype.initialize = function () {
  16560. var e =
  16561. this.elem.layerElement.children ||
  16562. this.elem.layerElement.childNodes,
  16563. t,
  16564. r,
  16565. i,
  16566. s;
  16567. for (
  16568. this.filterManager.effectElements[1].p.v === 1
  16569. ? ((s = this.elem.maskManager.masksProperties.length), (i = 0))
  16570. : ((i = this.filterManager.effectElements[0].p.v - 1), (s = i + 1)),
  16571. r = createNS('g'),
  16572. r.setAttribute('fill', 'none'),
  16573. r.setAttribute('stroke-linecap', 'round'),
  16574. r.setAttribute('stroke-dashoffset', 1),
  16575. i;
  16576. i < s;
  16577. i += 1
  16578. )
  16579. (t = createNS('path')),
  16580. r.appendChild(t),
  16581. this.paths.push({ p: t, m: i });
  16582. if (this.filterManager.effectElements[10].p.v === 3) {
  16583. var a = createNS('mask'),
  16584. o = createElementID();
  16585. a.setAttribute('id', o),
  16586. a.setAttribute('mask-type', 'alpha'),
  16587. a.appendChild(r),
  16588. this.elem.globalData.defs.appendChild(a);
  16589. var n = createNS('g');
  16590. for (
  16591. n.setAttribute('mask', 'url(' + getLocationHref() + '#' + o + ')');
  16592. e[0];
  16593. )
  16594. n.appendChild(e[0]);
  16595. this.elem.layerElement.appendChild(n),
  16596. (this.masker = a),
  16597. r.setAttribute('stroke', '#fff');
  16598. } else if (
  16599. this.filterManager.effectElements[10].p.v === 1 ||
  16600. this.filterManager.effectElements[10].p.v === 2
  16601. ) {
  16602. if (this.filterManager.effectElements[10].p.v === 2)
  16603. for (
  16604. e =
  16605. this.elem.layerElement.children ||
  16606. this.elem.layerElement.childNodes;
  16607. e.length;
  16608. )
  16609. this.elem.layerElement.removeChild(e[0]);
  16610. this.elem.layerElement.appendChild(r),
  16611. this.elem.layerElement.removeAttribute('mask'),
  16612. r.setAttribute('stroke', '#fff');
  16613. }
  16614. (this.initialized = !0), (this.pathMasker = r);
  16615. }),
  16616. (SVGStrokeEffect.prototype.renderFrame = function (e) {
  16617. this.initialized || this.initialize();
  16618. var t,
  16619. r = this.paths.length,
  16620. i,
  16621. s;
  16622. for (t = 0; t < r; t += 1)
  16623. if (
  16624. this.paths[t].m !== -1 &&
  16625. ((i = this.elem.maskManager.viewData[this.paths[t].m]),
  16626. (s = this.paths[t].p),
  16627. (e || this.filterManager._mdf || i.prop._mdf) &&
  16628. s.setAttribute('d', i.lastPath),
  16629. e ||
  16630. this.filterManager.effectElements[9].p._mdf ||
  16631. this.filterManager.effectElements[4].p._mdf ||
  16632. this.filterManager.effectElements[7].p._mdf ||
  16633. this.filterManager.effectElements[8].p._mdf ||
  16634. i.prop._mdf)
  16635. ) {
  16636. var a;
  16637. if (
  16638. this.filterManager.effectElements[7].p.v !== 0 ||
  16639. this.filterManager.effectElements[8].p.v !== 100
  16640. ) {
  16641. var o =
  16642. Math.min(
  16643. this.filterManager.effectElements[7].p.v,
  16644. this.filterManager.effectElements[8].p.v
  16645. ) * 0.01,
  16646. n =
  16647. Math.max(
  16648. this.filterManager.effectElements[7].p.v,
  16649. this.filterManager.effectElements[8].p.v
  16650. ) * 0.01,
  16651. l = s.getTotalLength();
  16652. a = '0 0 0 ' + l * o + ' ';
  16653. var f = l * (n - o),
  16654. g =
  16655. 1 +
  16656. this.filterManager.effectElements[4].p.v *
  16657. 2 *
  16658. this.filterManager.effectElements[9].p.v *
  16659. 0.01,
  16660. S = Math.floor(f / g),
  16661. c;
  16662. for (c = 0; c < S; c += 1)
  16663. a +=
  16664. '1 ' +
  16665. this.filterManager.effectElements[4].p.v *
  16666. 2 *
  16667. this.filterManager.effectElements[9].p.v *
  16668. 0.01 +
  16669. ' ';
  16670. a += '0 ' + l * 10 + ' 0 0';
  16671. } else
  16672. a =
  16673. '1 ' +
  16674. this.filterManager.effectElements[4].p.v *
  16675. 2 *
  16676. this.filterManager.effectElements[9].p.v *
  16677. 0.01;
  16678. s.setAttribute('stroke-dasharray', a);
  16679. }
  16680. if (
  16681. ((e || this.filterManager.effectElements[4].p._mdf) &&
  16682. this.pathMasker.setAttribute(
  16683. 'stroke-width',
  16684. this.filterManager.effectElements[4].p.v * 2
  16685. ),
  16686. (e || this.filterManager.effectElements[6].p._mdf) &&
  16687. this.pathMasker.setAttribute(
  16688. 'opacity',
  16689. this.filterManager.effectElements[6].p.v
  16690. ),
  16691. (this.filterManager.effectElements[10].p.v === 1 ||
  16692. this.filterManager.effectElements[10].p.v === 2) &&
  16693. (e || this.filterManager.effectElements[3].p._mdf))
  16694. ) {
  16695. var P = this.filterManager.effectElements[3].p.v;
  16696. this.pathMasker.setAttribute(
  16697. 'stroke',
  16698. 'rgb(' +
  16699. bmFloor(P[0] * 255) +
  16700. ',' +
  16701. bmFloor(P[1] * 255) +
  16702. ',' +
  16703. bmFloor(P[2] * 255) +
  16704. ')'
  16705. );
  16706. }
  16707. });
  16708. function SVGTritoneFilter(e, t, r, i) {
  16709. this.filterManager = t;
  16710. var s = createNS('feColorMatrix');
  16711. s.setAttribute('type', 'matrix'),
  16712. s.setAttribute('color-interpolation-filters', 'linearRGB'),
  16713. s.setAttribute(
  16714. 'values',
  16715. '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'
  16716. ),
  16717. e.appendChild(s);
  16718. var a = createNS('feComponentTransfer');
  16719. a.setAttribute('color-interpolation-filters', 'sRGB'),
  16720. a.setAttribute('result', i),
  16721. (this.matrixFilter = a);
  16722. var o = createNS('feFuncR');
  16723. o.setAttribute('type', 'table'), a.appendChild(o), (this.feFuncR = o);
  16724. var n = createNS('feFuncG');
  16725. n.setAttribute('type', 'table'), a.appendChild(n), (this.feFuncG = n);
  16726. var l = createNS('feFuncB');
  16727. l.setAttribute('type', 'table'),
  16728. a.appendChild(l),
  16729. (this.feFuncB = l),
  16730. e.appendChild(a);
  16731. }
  16732. SVGTritoneFilter.prototype.renderFrame = function (e) {
  16733. if (e || this.filterManager._mdf) {
  16734. var t = this.filterManager.effectElements[0].p.v,
  16735. r = this.filterManager.effectElements[1].p.v,
  16736. i = this.filterManager.effectElements[2].p.v,
  16737. s = i[0] + ' ' + r[0] + ' ' + t[0],
  16738. a = i[1] + ' ' + r[1] + ' ' + t[1],
  16739. o = i[2] + ' ' + r[2] + ' ' + t[2];
  16740. this.feFuncR.setAttribute('tableValues', s),
  16741. this.feFuncG.setAttribute('tableValues', a),
  16742. this.feFuncB.setAttribute('tableValues', o);
  16743. }
  16744. };
  16745. function SVGProLevelsFilter(e, t, r, i) {
  16746. this.filterManager = t;
  16747. var s = this.filterManager.effectElements,
  16748. a = createNS('feComponentTransfer');
  16749. (s[10].p.k ||
  16750. s[10].p.v !== 0 ||
  16751. s[11].p.k ||
  16752. s[11].p.v !== 1 ||
  16753. s[12].p.k ||
  16754. s[12].p.v !== 1 ||
  16755. s[13].p.k ||
  16756. s[13].p.v !== 0 ||
  16757. s[14].p.k ||
  16758. s[14].p.v !== 1) &&
  16759. (this.feFuncR = this.createFeFunc('feFuncR', a)),
  16760. (s[17].p.k ||
  16761. s[17].p.v !== 0 ||
  16762. s[18].p.k ||
  16763. s[18].p.v !== 1 ||
  16764. s[19].p.k ||
  16765. s[19].p.v !== 1 ||
  16766. s[20].p.k ||
  16767. s[20].p.v !== 0 ||
  16768. s[21].p.k ||
  16769. s[21].p.v !== 1) &&
  16770. (this.feFuncG = this.createFeFunc('feFuncG', a)),
  16771. (s[24].p.k ||
  16772. s[24].p.v !== 0 ||
  16773. s[25].p.k ||
  16774. s[25].p.v !== 1 ||
  16775. s[26].p.k ||
  16776. s[26].p.v !== 1 ||
  16777. s[27].p.k ||
  16778. s[27].p.v !== 0 ||
  16779. s[28].p.k ||
  16780. s[28].p.v !== 1) &&
  16781. (this.feFuncB = this.createFeFunc('feFuncB', a)),
  16782. (s[31].p.k ||
  16783. s[31].p.v !== 0 ||
  16784. s[32].p.k ||
  16785. s[32].p.v !== 1 ||
  16786. s[33].p.k ||
  16787. s[33].p.v !== 1 ||
  16788. s[34].p.k ||
  16789. s[34].p.v !== 0 ||
  16790. s[35].p.k ||
  16791. s[35].p.v !== 1) &&
  16792. (this.feFuncA = this.createFeFunc('feFuncA', a)),
  16793. (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) &&
  16794. (a.setAttribute('color-interpolation-filters', 'sRGB'),
  16795. e.appendChild(a)),
  16796. (s[3].p.k ||
  16797. s[3].p.v !== 0 ||
  16798. s[4].p.k ||
  16799. s[4].p.v !== 1 ||
  16800. s[5].p.k ||
  16801. s[5].p.v !== 1 ||
  16802. s[6].p.k ||
  16803. s[6].p.v !== 0 ||
  16804. s[7].p.k ||
  16805. s[7].p.v !== 1) &&
  16806. ((a = createNS('feComponentTransfer')),
  16807. a.setAttribute('color-interpolation-filters', 'sRGB'),
  16808. a.setAttribute('result', i),
  16809. e.appendChild(a),
  16810. (this.feFuncRComposed = this.createFeFunc('feFuncR', a)),
  16811. (this.feFuncGComposed = this.createFeFunc('feFuncG', a)),
  16812. (this.feFuncBComposed = this.createFeFunc('feFuncB', a)));
  16813. }
  16814. (SVGProLevelsFilter.prototype.createFeFunc = function (e, t) {
  16815. var r = createNS(e);
  16816. return r.setAttribute('type', 'table'), t.appendChild(r), r;
  16817. }),
  16818. (SVGProLevelsFilter.prototype.getTableValue = function (e, t, r, i, s) {
  16819. for (
  16820. var a = 0,
  16821. o = 256,
  16822. n,
  16823. l = Math.min(e, t),
  16824. f = Math.max(e, t),
  16825. g = Array.call(null, { length: o }),
  16826. S,
  16827. c = 0,
  16828. P = s - i,
  16829. d = t - e;
  16830. a <= 256;
  16831. )
  16832. (n = a / 256),
  16833. n <= l
  16834. ? (S = d < 0 ? s : i)
  16835. : n >= f
  16836. ? (S = d < 0 ? i : s)
  16837. : (S = i + P * Math.pow((n - e) / d, 1 / r)),
  16838. (g[c] = S),
  16839. (c += 1),
  16840. (a += 256 / (o - 1));
  16841. return g.join(' ');
  16842. }),
  16843. (SVGProLevelsFilter.prototype.renderFrame = function (e) {
  16844. if (e || this.filterManager._mdf) {
  16845. var t,
  16846. r = this.filterManager.effectElements;
  16847. this.feFuncRComposed &&
  16848. (e ||
  16849. r[3].p._mdf ||
  16850. r[4].p._mdf ||
  16851. r[5].p._mdf ||
  16852. r[6].p._mdf ||
  16853. r[7].p._mdf) &&
  16854. ((t = this.getTableValue(
  16855. r[3].p.v,
  16856. r[4].p.v,
  16857. r[5].p.v,
  16858. r[6].p.v,
  16859. r[7].p.v
  16860. )),
  16861. this.feFuncRComposed.setAttribute('tableValues', t),
  16862. this.feFuncGComposed.setAttribute('tableValues', t),
  16863. this.feFuncBComposed.setAttribute('tableValues', t)),
  16864. this.feFuncR &&
  16865. (e ||
  16866. r[10].p._mdf ||
  16867. r[11].p._mdf ||
  16868. r[12].p._mdf ||
  16869. r[13].p._mdf ||
  16870. r[14].p._mdf) &&
  16871. ((t = this.getTableValue(
  16872. r[10].p.v,
  16873. r[11].p.v,
  16874. r[12].p.v,
  16875. r[13].p.v,
  16876. r[14].p.v
  16877. )),
  16878. this.feFuncR.setAttribute('tableValues', t)),
  16879. this.feFuncG &&
  16880. (e ||
  16881. r[17].p._mdf ||
  16882. r[18].p._mdf ||
  16883. r[19].p._mdf ||
  16884. r[20].p._mdf ||
  16885. r[21].p._mdf) &&
  16886. ((t = this.getTableValue(
  16887. r[17].p.v,
  16888. r[18].p.v,
  16889. r[19].p.v,
  16890. r[20].p.v,
  16891. r[21].p.v
  16892. )),
  16893. this.feFuncG.setAttribute('tableValues', t)),
  16894. this.feFuncB &&
  16895. (e ||
  16896. r[24].p._mdf ||
  16897. r[25].p._mdf ||
  16898. r[26].p._mdf ||
  16899. r[27].p._mdf ||
  16900. r[28].p._mdf) &&
  16901. ((t = this.getTableValue(
  16902. r[24].p.v,
  16903. r[25].p.v,
  16904. r[26].p.v,
  16905. r[27].p.v,
  16906. r[28].p.v
  16907. )),
  16908. this.feFuncB.setAttribute('tableValues', t)),
  16909. this.feFuncA &&
  16910. (e ||
  16911. r[31].p._mdf ||
  16912. r[32].p._mdf ||
  16913. r[33].p._mdf ||
  16914. r[34].p._mdf ||
  16915. r[35].p._mdf) &&
  16916. ((t = this.getTableValue(
  16917. r[31].p.v,
  16918. r[32].p.v,
  16919. r[33].p.v,
  16920. r[34].p.v,
  16921. r[35].p.v
  16922. )),
  16923. this.feFuncA.setAttribute('tableValues', t));
  16924. }
  16925. });
  16926. function SVGDropShadowEffect(e, t, r, i, s) {
  16927. var a = t.container.globalData.renderConfig.filterSize,
  16928. o = t.data.fs || a;
  16929. e.setAttribute('x', o.x || a.x),
  16930. e.setAttribute('y', o.y || a.y),
  16931. e.setAttribute('width', o.width || a.width),
  16932. e.setAttribute('height', o.height || a.height),
  16933. (this.filterManager = t);
  16934. var n = createNS('feGaussianBlur');
  16935. n.setAttribute('in', 'SourceAlpha'),
  16936. n.setAttribute('result', i + '_drop_shadow_1'),
  16937. n.setAttribute('stdDeviation', '0'),
  16938. (this.feGaussianBlur = n),
  16939. e.appendChild(n);
  16940. var l = createNS('feOffset');
  16941. l.setAttribute('dx', '25'),
  16942. l.setAttribute('dy', '0'),
  16943. l.setAttribute('in', i + '_drop_shadow_1'),
  16944. l.setAttribute('result', i + '_drop_shadow_2'),
  16945. (this.feOffset = l),
  16946. e.appendChild(l);
  16947. var f = createNS('feFlood');
  16948. f.setAttribute('flood-color', '#00ff00'),
  16949. f.setAttribute('flood-opacity', '1'),
  16950. f.setAttribute('result', i + '_drop_shadow_3'),
  16951. (this.feFlood = f),
  16952. e.appendChild(f);
  16953. var g = createNS('feComposite');
  16954. g.setAttribute('in', i + '_drop_shadow_3'),
  16955. g.setAttribute('in2', i + '_drop_shadow_2'),
  16956. g.setAttribute('operator', 'in'),
  16957. g.setAttribute('result', i + '_drop_shadow_4'),
  16958. e.appendChild(g);
  16959. var S = this.createMergeNode(i, [i + '_drop_shadow_4', s]);
  16960. e.appendChild(S);
  16961. }
  16962. extendPrototype([SVGComposableEffect], SVGDropShadowEffect),
  16963. (SVGDropShadowEffect.prototype.renderFrame = function (e) {
  16964. if (e || this.filterManager._mdf) {
  16965. if (
  16966. ((e || this.filterManager.effectElements[4].p._mdf) &&
  16967. this.feGaussianBlur.setAttribute(
  16968. 'stdDeviation',
  16969. this.filterManager.effectElements[4].p.v / 4
  16970. ),
  16971. e || this.filterManager.effectElements[0].p._mdf)
  16972. ) {
  16973. var t = this.filterManager.effectElements[0].p.v;
  16974. this.feFlood.setAttribute(
  16975. 'flood-color',
  16976. rgbToHex(
  16977. Math.round(t[0] * 255),
  16978. Math.round(t[1] * 255),
  16979. Math.round(t[2] * 255)
  16980. )
  16981. );
  16982. }
  16983. if (
  16984. ((e || this.filterManager.effectElements[1].p._mdf) &&
  16985. this.feFlood.setAttribute(
  16986. 'flood-opacity',
  16987. this.filterManager.effectElements[1].p.v / 255
  16988. ),
  16989. e ||
  16990. this.filterManager.effectElements[2].p._mdf ||
  16991. this.filterManager.effectElements[3].p._mdf)
  16992. ) {
  16993. var r = this.filterManager.effectElements[3].p.v,
  16994. i = (this.filterManager.effectElements[2].p.v - 90) * degToRads,
  16995. s = r * Math.cos(i),
  16996. a = r * Math.sin(i);
  16997. this.feOffset.setAttribute('dx', s),
  16998. this.feOffset.setAttribute('dy', a);
  16999. }
  17000. }
  17001. });
  17002. var _svgMatteSymbols = [];
  17003. function SVGMatte3Effect(e, t, r) {
  17004. (this.initialized = !1),
  17005. (this.filterManager = t),
  17006. (this.filterElem = e),
  17007. (this.elem = r),
  17008. (r.matteElement = createNS('g')),
  17009. r.matteElement.appendChild(r.layerElement),
  17010. r.matteElement.appendChild(r.transformedElement),
  17011. (r.baseElement = r.matteElement);
  17012. }
  17013. (SVGMatte3Effect.prototype.findSymbol = function (e) {
  17014. for (var t = 0, r = _svgMatteSymbols.length; t < r; ) {
  17015. if (_svgMatteSymbols[t] === e) return _svgMatteSymbols[t];
  17016. t += 1;
  17017. }
  17018. return null;
  17019. }),
  17020. (SVGMatte3Effect.prototype.replaceInParent = function (e, t) {
  17021. var r = e.layerElement.parentNode;
  17022. if (r) {
  17023. for (
  17024. var i = r.children, s = 0, a = i.length;
  17025. s < a && i[s] !== e.layerElement;
  17026. )
  17027. s += 1;
  17028. var o;
  17029. s <= a - 2 && (o = i[s + 1]);
  17030. var n = createNS('use');
  17031. n.setAttribute('href', '#' + t),
  17032. o ? r.insertBefore(n, o) : r.appendChild(n);
  17033. }
  17034. }),
  17035. (SVGMatte3Effect.prototype.setElementAsMask = function (e, t) {
  17036. if (!this.findSymbol(t)) {
  17037. var r = createElementID(),
  17038. i = createNS('mask');
  17039. i.setAttribute('id', t.layerId),
  17040. i.setAttribute('mask-type', 'alpha'),
  17041. _svgMatteSymbols.push(t);
  17042. var s = e.globalData.defs;
  17043. s.appendChild(i);
  17044. var a = createNS('symbol');
  17045. a.setAttribute('id', r),
  17046. this.replaceInParent(t, r),
  17047. a.appendChild(t.layerElement),
  17048. s.appendChild(a);
  17049. var o = createNS('use');
  17050. o.setAttribute('href', '#' + r),
  17051. i.appendChild(o),
  17052. (t.data.hd = !1),
  17053. t.show();
  17054. }
  17055. e.setMatte(t.layerId);
  17056. }),
  17057. (SVGMatte3Effect.prototype.initialize = function () {
  17058. for (
  17059. var e = this.filterManager.effectElements[0].p.v,
  17060. t = this.elem.comp.elements,
  17061. r = 0,
  17062. i = t.length;
  17063. r < i;
  17064. )
  17065. t[r] &&
  17066. t[r].data.ind === e &&
  17067. this.setElementAsMask(this.elem, t[r]),
  17068. (r += 1);
  17069. this.initialized = !0;
  17070. }),
  17071. (SVGMatte3Effect.prototype.renderFrame = function () {
  17072. this.initialized || this.initialize();
  17073. });
  17074. function SVGGaussianBlurEffect(e, t, r, i) {
  17075. e.setAttribute('x', '-100%'),
  17076. e.setAttribute('y', '-100%'),
  17077. e.setAttribute('width', '300%'),
  17078. e.setAttribute('height', '300%'),
  17079. (this.filterManager = t);
  17080. var s = createNS('feGaussianBlur');
  17081. s.setAttribute('result', i),
  17082. e.appendChild(s),
  17083. (this.feGaussianBlur = s);
  17084. }
  17085. SVGGaussianBlurEffect.prototype.renderFrame = function (e) {
  17086. if (e || this.filterManager._mdf) {
  17087. var t = 0.3,
  17088. r = this.filterManager.effectElements[0].p.v * t,
  17089. i = this.filterManager.effectElements[1].p.v,
  17090. s = i == 3 ? 0 : r,
  17091. a = i == 2 ? 0 : r;
  17092. this.feGaussianBlur.setAttribute('stdDeviation', s + ' ' + a);
  17093. var o =
  17094. this.filterManager.effectElements[2].p.v == 1
  17095. ? 'wrap'
  17096. : 'duplicate';
  17097. this.feGaussianBlur.setAttribute('edgeMode', o);
  17098. }
  17099. };
  17100. function TransformEffect() {}
  17101. (TransformEffect.prototype.init = function (e) {
  17102. (this.effectsManager = e),
  17103. (this.type = effectTypes.TRANSFORM_EFFECT),
  17104. (this.matrix = new Matrix()),
  17105. (this.opacity = -1),
  17106. (this._mdf = !1),
  17107. (this._opMdf = !1);
  17108. }),
  17109. (TransformEffect.prototype.renderFrame = function (e) {
  17110. if (
  17111. ((this._opMdf = !1),
  17112. (this._mdf = !1),
  17113. e || this.effectsManager._mdf)
  17114. ) {
  17115. var t = this.effectsManager.effectElements,
  17116. r = t[0].p.v,
  17117. i = t[1].p.v,
  17118. s = t[2].p.v === 1,
  17119. a = t[3].p.v,
  17120. o = s ? a : t[4].p.v,
  17121. n = t[5].p.v,
  17122. l = t[6].p.v,
  17123. f = t[7].p.v;
  17124. this.matrix.reset(),
  17125. this.matrix.translate(-r[0], -r[1], r[2]),
  17126. this.matrix.scale(o * 0.01, a * 0.01, 1),
  17127. this.matrix.rotate(-f * degToRads),
  17128. this.matrix.skewFromAxis(-n * degToRads, (l + 90) * degToRads),
  17129. this.matrix.translate(i[0], i[1], 0),
  17130. (this._mdf = !0),
  17131. this.opacity !== t[8].p.v &&
  17132. ((this.opacity = t[8].p.v), (this._opMdf = !0));
  17133. }
  17134. });
  17135. function SVGTransformEffect(e, t) {
  17136. this.init(t);
  17137. }
  17138. extendPrototype([TransformEffect], SVGTransformEffect);
  17139. function CVTransformEffect(e) {
  17140. this.init(e);
  17141. }
  17142. return (
  17143. extendPrototype([TransformEffect], CVTransformEffect),
  17144. registerRenderer('canvas', CanvasRenderer),
  17145. registerRenderer('html', HybridRenderer),
  17146. registerRenderer('svg', SVGRenderer),
  17147. ShapeModifiers.registerModifier('tm', TrimModifier),
  17148. ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier),
  17149. ShapeModifiers.registerModifier('rp', RepeaterModifier),
  17150. ShapeModifiers.registerModifier('rd', RoundCornersModifier),
  17151. ShapeModifiers.registerModifier('zz', ZigZagModifier),
  17152. ShapeModifiers.registerModifier('op', OffsetPathModifier),
  17153. setExpressionsPlugin(Expressions),
  17154. setExpressionInterfaces(getInterface),
  17155. initialize$1(),
  17156. initialize(),
  17157. registerEffect$1(20, SVGTintFilter, !0),
  17158. registerEffect$1(21, SVGFillFilter, !0),
  17159. registerEffect$1(22, SVGStrokeEffect, !1),
  17160. registerEffect$1(23, SVGTritoneFilter, !0),
  17161. registerEffect$1(24, SVGProLevelsFilter, !0),
  17162. registerEffect$1(25, SVGDropShadowEffect, !0),
  17163. registerEffect$1(28, SVGMatte3Effect, !1),
  17164. registerEffect$1(29, SVGGaussianBlurEffect, !0),
  17165. registerEffect$1(35, SVGTransformEffect, !1),
  17166. registerEffect(35, CVTransformEffect),
  17167. lottie
  17168. );
  17169. });
  17170. })(lottie, lottie.exports);
  17171. var lottieExports = lottie.exports;
  17172. const Lottie = getDefaultExportFromCjs(lottieExports);
  17173. var freeGlobal =
  17174. typeof global == 'object' && global && global.Object === Object && global,
  17175. freeGlobal$1 = freeGlobal,
  17176. freeSelf = typeof self == 'object' && self && self.Object === Object && self,
  17177. root = freeGlobal$1 || freeSelf || Function('return this')(),
  17178. root$1 = root,
  17179. Symbol$1 = root$1.Symbol,
  17180. Symbol$2 = Symbol$1,
  17181. objectProto$e = Object.prototype,
  17182. hasOwnProperty$b = objectProto$e.hasOwnProperty,
  17183. nativeObjectToString$1 = objectProto$e.toString,
  17184. symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
  17185. function getRawTag(e) {
  17186. var t = hasOwnProperty$b.call(e, symToStringTag$1),
  17187. r = e[symToStringTag$1];
  17188. try {
  17189. e[symToStringTag$1] = void 0;
  17190. var i = !0;
  17191. } catch (a) {}
  17192. var s = nativeObjectToString$1.call(e);
  17193. return i && (t ? (e[symToStringTag$1] = r) : delete e[symToStringTag$1]), s;
  17194. }
  17195. var objectProto$d = Object.prototype,
  17196. nativeObjectToString = objectProto$d.toString;
  17197. function objectToString(e) {
  17198. return nativeObjectToString.call(e);
  17199. }
  17200. var nullTag = '[object Null]',
  17201. undefinedTag = '[object Undefined]',
  17202. symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
  17203. function baseGetTag(e) {
  17204. return e == null
  17205. ? e === void 0
  17206. ? undefinedTag
  17207. : nullTag
  17208. : symToStringTag && symToStringTag in Object(e)
  17209. ? getRawTag(e)
  17210. : objectToString(e);
  17211. }
  17212. function isObjectLike(e) {
  17213. return e != null && typeof e == 'object';
  17214. }
  17215. var isArray = Array.isArray,
  17216. isArray$1 = isArray;
  17217. function isObject(e) {
  17218. var t = typeof e;
  17219. return e != null && (t == 'object' || t == 'function');
  17220. }
  17221. var asyncTag = '[object AsyncFunction]',
  17222. funcTag$2 = '[object Function]',
  17223. genTag$1 = '[object GeneratorFunction]',
  17224. proxyTag = '[object Proxy]';
  17225. function isFunction(e) {
  17226. if (!isObject(e)) return !1;
  17227. var t = baseGetTag(e);
  17228. return t == funcTag$2 || t == genTag$1 || t == asyncTag || t == proxyTag;
  17229. }
  17230. var coreJsData = root$1['__core-js_shared__'],
  17231. coreJsData$1 = coreJsData,
  17232. maskSrcKey = (function () {
  17233. var e = /[^.]+$/.exec(
  17234. (coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO) || ''
  17235. );
  17236. return e ? 'Symbol(src)_1.' + e : '';
  17237. })();
  17238. function isMasked(e) {
  17239. return !!maskSrcKey && maskSrcKey in e;
  17240. }
  17241. var funcProto$1 = Function.prototype,
  17242. funcToString$1 = funcProto$1.toString;
  17243. function toSource(e) {
  17244. if (e != null) {
  17245. try {
  17246. return funcToString$1.call(e);
  17247. } catch (t) {}
  17248. try {
  17249. return e + '';
  17250. } catch (t) {}
  17251. }
  17252. return '';
  17253. }
  17254. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  17255. reIsHostCtor = /^\[object .+?Constructor\]$/,
  17256. funcProto = Function.prototype,
  17257. objectProto$c = Object.prototype,
  17258. funcToString = funcProto.toString,
  17259. hasOwnProperty$a = objectProto$c.hasOwnProperty,
  17260. reIsNative = RegExp(
  17261. '^' +
  17262. funcToString
  17263. .call(hasOwnProperty$a)
  17264. .replace(reRegExpChar, '\\$&')
  17265. .replace(
  17266. /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
  17267. '$1.*?'
  17268. ) +
  17269. '$'
  17270. );
  17271. function baseIsNative(e) {
  17272. if (!isObject(e) || isMasked(e)) return !1;
  17273. var t = isFunction(e) ? reIsNative : reIsHostCtor;
  17274. return t.test(toSource(e));
  17275. }
  17276. function getValue(e, t) {
  17277. return e == null ? void 0 : e[t];
  17278. }
  17279. function getNative(e, t) {
  17280. var r = getValue(e, t);
  17281. return baseIsNative(r) ? r : void 0;
  17282. }
  17283. var WeakMap = getNative(root$1, 'WeakMap'),
  17284. WeakMap$1 = WeakMap,
  17285. objectCreate = Object.create,
  17286. baseCreate = (function () {
  17287. function e() {}
  17288. return function (t) {
  17289. if (!isObject(t)) return {};
  17290. if (objectCreate) return objectCreate(t);
  17291. e.prototype = t;
  17292. var r = new e();
  17293. return (e.prototype = void 0), r;
  17294. };
  17295. })(),
  17296. baseCreate$1 = baseCreate;
  17297. function copyArray(e, t) {
  17298. var r = -1,
  17299. i = e.length;
  17300. for (t || (t = Array(i)); ++r < i; ) t[r] = e[r];
  17301. return t;
  17302. }
  17303. var defineProperty = (function () {
  17304. try {
  17305. var e = getNative(Object, 'defineProperty');
  17306. return e({}, '', {}), e;
  17307. } catch (t) {}
  17308. })(),
  17309. defineProperty$1 = defineProperty;
  17310. function arrayEach(e, t) {
  17311. for (
  17312. var r = -1, i = e == null ? 0 : e.length;
  17313. ++r < i && t(e[r], r, e) !== !1;
  17314. );
  17315. return e;
  17316. }
  17317. var MAX_SAFE_INTEGER$1 = 9007199254740991,
  17318. reIsUint = /^(?:0|[1-9]\d*)$/;
  17319. function isIndex(e, t) {
  17320. var r = typeof e;
  17321. return (
  17322. (t = t == null ? MAX_SAFE_INTEGER$1 : t),
  17323. !!t &&
  17324. (r == 'number' || (r != 'symbol' && reIsUint.test(e))) &&
  17325. e > -1 &&
  17326. e % 1 == 0 &&
  17327. e < t
  17328. );
  17329. }
  17330. function baseAssignValue(e, t, r) {
  17331. t == '__proto__' && defineProperty$1
  17332. ? defineProperty$1(e, t, {
  17333. configurable: !0,
  17334. enumerable: !0,
  17335. value: r,
  17336. writable: !0
  17337. })
  17338. : (e[t] = r);
  17339. }
  17340. function eq(e, t) {
  17341. return e === t || (e !== e && t !== t);
  17342. }
  17343. var objectProto$b = Object.prototype,
  17344. hasOwnProperty$9 = objectProto$b.hasOwnProperty;
  17345. function assignValue(e, t, r) {
  17346. var i = e[t];
  17347. (!(hasOwnProperty$9.call(e, t) && eq(i, r)) || (r === void 0 && !(t in e))) &&
  17348. baseAssignValue(e, t, r);
  17349. }
  17350. function copyObject(e, t, r, i) {
  17351. var s = !r;
  17352. r || (r = {});
  17353. for (var a = -1, o = t.length; ++a < o; ) {
  17354. var n = t[a],
  17355. l = i ? i(r[n], e[n], n, r, e) : void 0;
  17356. l === void 0 && (l = e[n]),
  17357. s ? baseAssignValue(r, n, l) : assignValue(r, n, l);
  17358. }
  17359. return r;
  17360. }
  17361. var MAX_SAFE_INTEGER = 9007199254740991;
  17362. function isLength(e) {
  17363. return typeof e == 'number' && e > -1 && e % 1 == 0 && e <= MAX_SAFE_INTEGER;
  17364. }
  17365. function isArrayLike(e) {
  17366. return e != null && isLength(e.length) && !isFunction(e);
  17367. }
  17368. var objectProto$a = Object.prototype;
  17369. function isPrototype(e) {
  17370. var t = e && e.constructor,
  17371. r = (typeof t == 'function' && t.prototype) || objectProto$a;
  17372. return e === r;
  17373. }
  17374. function baseTimes(e, t) {
  17375. for (var r = -1, i = Array(e); ++r < e; ) i[r] = t(r);
  17376. return i;
  17377. }
  17378. var argsTag$3 = '[object Arguments]';
  17379. function baseIsArguments(e) {
  17380. return isObjectLike(e) && baseGetTag(e) == argsTag$3;
  17381. }
  17382. var objectProto$9 = Object.prototype,
  17383. hasOwnProperty$8 = objectProto$9.hasOwnProperty,
  17384. propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable,
  17385. isArguments = baseIsArguments(
  17386. (function () {
  17387. return arguments;
  17388. })()
  17389. )
  17390. ? baseIsArguments
  17391. : function (e) {
  17392. return (
  17393. isObjectLike(e) &&
  17394. hasOwnProperty$8.call(e, 'callee') &&
  17395. !propertyIsEnumerable$1.call(e, 'callee')
  17396. );
  17397. },
  17398. isArguments$1 = isArguments;
  17399. function stubFalse() {
  17400. return !1;
  17401. }
  17402. var freeExports$2 =
  17403. typeof exports == 'object' && exports && !exports.nodeType && exports,
  17404. freeModule$2 =
  17405. freeExports$2 &&
  17406. typeof module == 'object' &&
  17407. module &&
  17408. !module.nodeType &&
  17409. module,
  17410. moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2,
  17411. Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0,
  17412. nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0,
  17413. isBuffer = nativeIsBuffer || stubFalse,
  17414. isBuffer$1 = isBuffer,
  17415. argsTag$2 = '[object Arguments]',
  17416. arrayTag$2 = '[object Array]',
  17417. boolTag$3 = '[object Boolean]',
  17418. dateTag$3 = '[object Date]',
  17419. errorTag$2 = '[object Error]',
  17420. funcTag$1 = '[object Function]',
  17421. mapTag$5 = '[object Map]',
  17422. numberTag$3 = '[object Number]',
  17423. objectTag$3 = '[object Object]',
  17424. regexpTag$3 = '[object RegExp]',
  17425. setTag$5 = '[object Set]',
  17426. stringTag$3 = '[object String]',
  17427. weakMapTag$2 = '[object WeakMap]',
  17428. arrayBufferTag$3 = '[object ArrayBuffer]',
  17429. dataViewTag$4 = '[object DataView]',
  17430. float32Tag$2 = '[object Float32Array]',
  17431. float64Tag$2 = '[object Float64Array]',
  17432. int8Tag$2 = '[object Int8Array]',
  17433. int16Tag$2 = '[object Int16Array]',
  17434. int32Tag$2 = '[object Int32Array]',
  17435. uint8Tag$2 = '[object Uint8Array]',
  17436. uint8ClampedTag$2 = '[object Uint8ClampedArray]',
  17437. uint16Tag$2 = '[object Uint16Array]',
  17438. uint32Tag$2 = '[object Uint32Array]',
  17439. typedArrayTags = {};
  17440. typedArrayTags[float32Tag$2] =
  17441. typedArrayTags[float64Tag$2] =
  17442. typedArrayTags[int8Tag$2] =
  17443. typedArrayTags[int16Tag$2] =
  17444. typedArrayTags[int32Tag$2] =
  17445. typedArrayTags[uint8Tag$2] =
  17446. typedArrayTags[uint8ClampedTag$2] =
  17447. typedArrayTags[uint16Tag$2] =
  17448. typedArrayTags[uint32Tag$2] =
  17449. !0;
  17450. typedArrayTags[argsTag$2] =
  17451. typedArrayTags[arrayTag$2] =
  17452. typedArrayTags[arrayBufferTag$3] =
  17453. typedArrayTags[boolTag$3] =
  17454. typedArrayTags[dataViewTag$4] =
  17455. typedArrayTags[dateTag$3] =
  17456. typedArrayTags[errorTag$2] =
  17457. typedArrayTags[funcTag$1] =
  17458. typedArrayTags[mapTag$5] =
  17459. typedArrayTags[numberTag$3] =
  17460. typedArrayTags[objectTag$3] =
  17461. typedArrayTags[regexpTag$3] =
  17462. typedArrayTags[setTag$5] =
  17463. typedArrayTags[stringTag$3] =
  17464. typedArrayTags[weakMapTag$2] =
  17465. !1;
  17466. function baseIsTypedArray(e) {
  17467. return (
  17468. isObjectLike(e) && isLength(e.length) && !!typedArrayTags[baseGetTag(e)]
  17469. );
  17470. }
  17471. function baseUnary(e) {
  17472. return function (t) {
  17473. return e(t);
  17474. };
  17475. }
  17476. var freeExports$1 =
  17477. typeof exports == 'object' && exports && !exports.nodeType && exports,
  17478. freeModule$1 =
  17479. freeExports$1 &&
  17480. typeof module == 'object' &&
  17481. module &&
  17482. !module.nodeType &&
  17483. module,
  17484. moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1,
  17485. freeProcess = moduleExports$1 && freeGlobal$1.process,
  17486. nodeUtil = (function () {
  17487. try {
  17488. var e =
  17489. freeModule$1 &&
  17490. freeModule$1.require &&
  17491. freeModule$1.require('util').types;
  17492. return (
  17493. e || (freeProcess && freeProcess.binding && freeProcess.binding('util'))
  17494. );
  17495. } catch (t) {}
  17496. })(),
  17497. nodeUtil$1 = nodeUtil,
  17498. nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray,
  17499. isTypedArray = nodeIsTypedArray
  17500. ? baseUnary(nodeIsTypedArray)
  17501. : baseIsTypedArray,
  17502. isTypedArray$1 = isTypedArray,
  17503. objectProto$8 = Object.prototype,
  17504. hasOwnProperty$7 = objectProto$8.hasOwnProperty;
  17505. function arrayLikeKeys(e, t) {
  17506. var r = isArray$1(e),
  17507. i = !r && isArguments$1(e),
  17508. s = !r && !i && isBuffer$1(e),
  17509. a = !r && !i && !s && isTypedArray$1(e),
  17510. o = r || i || s || a,
  17511. n = o ? baseTimes(e.length, String) : [],
  17512. l = n.length;
  17513. for (var f in e)
  17514. (t || hasOwnProperty$7.call(e, f)) &&
  17515. !(
  17516. o &&
  17517. (f == 'length' ||
  17518. (s && (f == 'offset' || f == 'parent')) ||
  17519. (a && (f == 'buffer' || f == 'byteLength' || f == 'byteOffset')) ||
  17520. isIndex(f, l))
  17521. ) &&
  17522. n.push(f);
  17523. return n;
  17524. }
  17525. function overArg(e, t) {
  17526. return function (r) {
  17527. return e(t(r));
  17528. };
  17529. }
  17530. var nativeKeys = overArg(Object.keys, Object),
  17531. nativeKeys$1 = nativeKeys,
  17532. objectProto$7 = Object.prototype,
  17533. hasOwnProperty$6 = objectProto$7.hasOwnProperty;
  17534. function baseKeys(e) {
  17535. if (!isPrototype(e)) return nativeKeys$1(e);
  17536. var t = [];
  17537. for (var r in Object(e))
  17538. hasOwnProperty$6.call(e, r) && r != 'constructor' && t.push(r);
  17539. return t;
  17540. }
  17541. function keys(e) {
  17542. return isArrayLike(e) ? arrayLikeKeys(e) : baseKeys(e);
  17543. }
  17544. function nativeKeysIn(e) {
  17545. var t = [];
  17546. if (e != null) for (var r in Object(e)) t.push(r);
  17547. return t;
  17548. }
  17549. var objectProto$6 = Object.prototype,
  17550. hasOwnProperty$5 = objectProto$6.hasOwnProperty;
  17551. function baseKeysIn(e) {
  17552. if (!isObject(e)) return nativeKeysIn(e);
  17553. var t = isPrototype(e),
  17554. r = [];
  17555. for (var i in e)
  17556. (i == 'constructor' && (t || !hasOwnProperty$5.call(e, i))) || r.push(i);
  17557. return r;
  17558. }
  17559. function keysIn(e) {
  17560. return isArrayLike(e) ? arrayLikeKeys(e, !0) : baseKeysIn(e);
  17561. }
  17562. var nativeCreate = getNative(Object, 'create'),
  17563. nativeCreate$1 = nativeCreate;
  17564. function hashClear() {
  17565. (this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {}), (this.size = 0);
  17566. }
  17567. function hashDelete(e) {
  17568. var t = this.has(e) && delete this.__data__[e];
  17569. return (this.size -= t ? 1 : 0), t;
  17570. }
  17571. var HASH_UNDEFINED$2 = '__lodash_hash_undefined__',
  17572. objectProto$5 = Object.prototype,
  17573. hasOwnProperty$4 = objectProto$5.hasOwnProperty;
  17574. function hashGet(e) {
  17575. var t = this.__data__;
  17576. if (nativeCreate$1) {
  17577. var r = t[e];
  17578. return r === HASH_UNDEFINED$2 ? void 0 : r;
  17579. }
  17580. return hasOwnProperty$4.call(t, e) ? t[e] : void 0;
  17581. }
  17582. var objectProto$4 = Object.prototype,
  17583. hasOwnProperty$3 = objectProto$4.hasOwnProperty;
  17584. function hashHas(e) {
  17585. var t = this.__data__;
  17586. return nativeCreate$1 ? t[e] !== void 0 : hasOwnProperty$3.call(t, e);
  17587. }
  17588. var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
  17589. function hashSet(e, t) {
  17590. var r = this.__data__;
  17591. return (
  17592. (this.size += this.has(e) ? 0 : 1),
  17593. (r[e] = nativeCreate$1 && t === void 0 ? HASH_UNDEFINED$1 : t),
  17594. this
  17595. );
  17596. }
  17597. function Hash(e) {
  17598. var t = -1,
  17599. r = e == null ? 0 : e.length;
  17600. for (this.clear(); ++t < r; ) {
  17601. var i = e[t];
  17602. this.set(i[0], i[1]);
  17603. }
  17604. }
  17605. Hash.prototype.clear = hashClear;
  17606. Hash.prototype.delete = hashDelete;
  17607. Hash.prototype.get = hashGet;
  17608. Hash.prototype.has = hashHas;
  17609. Hash.prototype.set = hashSet;
  17610. function listCacheClear() {
  17611. (this.__data__ = []), (this.size = 0);
  17612. }
  17613. function assocIndexOf(e, t) {
  17614. for (var r = e.length; r--; ) if (eq(e[r][0], t)) return r;
  17615. return -1;
  17616. }
  17617. var arrayProto = Array.prototype,
  17618. splice = arrayProto.splice;
  17619. function listCacheDelete(e) {
  17620. var t = this.__data__,
  17621. r = assocIndexOf(t, e);
  17622. if (r < 0) return !1;
  17623. var i = t.length - 1;
  17624. return r == i ? t.pop() : splice.call(t, r, 1), --this.size, !0;
  17625. }
  17626. function listCacheGet(e) {
  17627. var t = this.__data__,
  17628. r = assocIndexOf(t, e);
  17629. return r < 0 ? void 0 : t[r][1];
  17630. }
  17631. function listCacheHas(e) {
  17632. return assocIndexOf(this.__data__, e) > -1;
  17633. }
  17634. function listCacheSet(e, t) {
  17635. var r = this.__data__,
  17636. i = assocIndexOf(r, e);
  17637. return i < 0 ? (++this.size, r.push([e, t])) : (r[i][1] = t), this;
  17638. }
  17639. function ListCache(e) {
  17640. var t = -1,
  17641. r = e == null ? 0 : e.length;
  17642. for (this.clear(); ++t < r; ) {
  17643. var i = e[t];
  17644. this.set(i[0], i[1]);
  17645. }
  17646. }
  17647. ListCache.prototype.clear = listCacheClear;
  17648. ListCache.prototype.delete = listCacheDelete;
  17649. ListCache.prototype.get = listCacheGet;
  17650. ListCache.prototype.has = listCacheHas;
  17651. ListCache.prototype.set = listCacheSet;
  17652. var Map = getNative(root$1, 'Map'),
  17653. Map$1 = Map;
  17654. function mapCacheClear() {
  17655. (this.size = 0),
  17656. (this.__data__ = {
  17657. hash: new Hash(),
  17658. map: new (Map$1 || ListCache)(),
  17659. string: new Hash()
  17660. });
  17661. }
  17662. function isKeyable(e) {
  17663. var t = typeof e;
  17664. return t == 'string' || t == 'number' || t == 'symbol' || t == 'boolean'
  17665. ? e !== '__proto__'
  17666. : e === null;
  17667. }
  17668. function getMapData(e, t) {
  17669. var r = e.__data__;
  17670. return isKeyable(t) ? r[typeof t == 'string' ? 'string' : 'hash'] : r.map;
  17671. }
  17672. function mapCacheDelete(e) {
  17673. var t = getMapData(this, e).delete(e);
  17674. return (this.size -= t ? 1 : 0), t;
  17675. }
  17676. function mapCacheGet(e) {
  17677. return getMapData(this, e).get(e);
  17678. }
  17679. function mapCacheHas(e) {
  17680. return getMapData(this, e).has(e);
  17681. }
  17682. function mapCacheSet(e, t) {
  17683. var r = getMapData(this, e),
  17684. i = r.size;
  17685. return r.set(e, t), (this.size += r.size == i ? 0 : 1), this;
  17686. }
  17687. function MapCache(e) {
  17688. var t = -1,
  17689. r = e == null ? 0 : e.length;
  17690. for (this.clear(); ++t < r; ) {
  17691. var i = e[t];
  17692. this.set(i[0], i[1]);
  17693. }
  17694. }
  17695. MapCache.prototype.clear = mapCacheClear;
  17696. MapCache.prototype.delete = mapCacheDelete;
  17697. MapCache.prototype.get = mapCacheGet;
  17698. MapCache.prototype.has = mapCacheHas;
  17699. MapCache.prototype.set = mapCacheSet;
  17700. function arrayPush(e, t) {
  17701. for (var r = -1, i = t.length, s = e.length; ++r < i; ) e[s + r] = t[r];
  17702. return e;
  17703. }
  17704. var getPrototype = overArg(Object.getPrototypeOf, Object),
  17705. getPrototype$1 = getPrototype;
  17706. function stackClear() {
  17707. (this.__data__ = new ListCache()), (this.size = 0);
  17708. }
  17709. function stackDelete(e) {
  17710. var t = this.__data__,
  17711. r = t.delete(e);
  17712. return (this.size = t.size), r;
  17713. }
  17714. function stackGet(e) {
  17715. return this.__data__.get(e);
  17716. }
  17717. function stackHas(e) {
  17718. return this.__data__.has(e);
  17719. }
  17720. var LARGE_ARRAY_SIZE = 200;
  17721. function stackSet(e, t) {
  17722. var r = this.__data__;
  17723. if (r instanceof ListCache) {
  17724. var i = r.__data__;
  17725. if (!Map$1 || i.length < LARGE_ARRAY_SIZE - 1)
  17726. return i.push([e, t]), (this.size = ++r.size), this;
  17727. r = this.__data__ = new MapCache(i);
  17728. }
  17729. return r.set(e, t), (this.size = r.size), this;
  17730. }
  17731. function Stack(e) {
  17732. var t = (this.__data__ = new ListCache(e));
  17733. this.size = t.size;
  17734. }
  17735. Stack.prototype.clear = stackClear;
  17736. Stack.prototype.delete = stackDelete;
  17737. Stack.prototype.get = stackGet;
  17738. Stack.prototype.has = stackHas;
  17739. Stack.prototype.set = stackSet;
  17740. function baseAssign(e, t) {
  17741. return e && copyObject(t, keys(t), e);
  17742. }
  17743. function baseAssignIn(e, t) {
  17744. return e && copyObject(t, keysIn(t), e);
  17745. }
  17746. var freeExports =
  17747. typeof exports == 'object' && exports && !exports.nodeType && exports,
  17748. freeModule =
  17749. freeExports &&
  17750. typeof module == 'object' &&
  17751. module &&
  17752. !module.nodeType &&
  17753. module,
  17754. moduleExports = freeModule && freeModule.exports === freeExports,
  17755. Buffer = moduleExports ? root$1.Buffer : void 0,
  17756. allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
  17757. function cloneBuffer(e, t) {
  17758. if (t) return e.slice();
  17759. var r = e.length,
  17760. i = allocUnsafe ? allocUnsafe(r) : new e.constructor(r);
  17761. return e.copy(i), i;
  17762. }
  17763. function arrayFilter(e, t) {
  17764. for (var r = -1, i = e == null ? 0 : e.length, s = 0, a = []; ++r < i; ) {
  17765. var o = e[r];
  17766. t(o, r, e) && (a[s++] = o);
  17767. }
  17768. return a;
  17769. }
  17770. function stubArray() {
  17771. return [];
  17772. }
  17773. var objectProto$3 = Object.prototype,
  17774. propertyIsEnumerable = objectProto$3.propertyIsEnumerable,
  17775. nativeGetSymbols$1 = Object.getOwnPropertySymbols,
  17776. getSymbols = nativeGetSymbols$1
  17777. ? function (e) {
  17778. return e == null
  17779. ? []
  17780. : ((e = Object(e)),
  17781. arrayFilter(nativeGetSymbols$1(e), function (t) {
  17782. return propertyIsEnumerable.call(e, t);
  17783. }));
  17784. }
  17785. : stubArray,
  17786. getSymbols$1 = getSymbols;
  17787. function copySymbols(e, t) {
  17788. return copyObject(e, getSymbols$1(e), t);
  17789. }
  17790. var nativeGetSymbols = Object.getOwnPropertySymbols,
  17791. getSymbolsIn = nativeGetSymbols
  17792. ? function (e) {
  17793. for (var t = []; e; )
  17794. arrayPush(t, getSymbols$1(e)), (e = getPrototype$1(e));
  17795. return t;
  17796. }
  17797. : stubArray,
  17798. getSymbolsIn$1 = getSymbolsIn;
  17799. function copySymbolsIn(e, t) {
  17800. return copyObject(e, getSymbolsIn$1(e), t);
  17801. }
  17802. function baseGetAllKeys(e, t, r) {
  17803. var i = t(e);
  17804. return isArray$1(e) ? i : arrayPush(i, r(e));
  17805. }
  17806. function getAllKeys(e) {
  17807. return baseGetAllKeys(e, keys, getSymbols$1);
  17808. }
  17809. function getAllKeysIn(e) {
  17810. return baseGetAllKeys(e, keysIn, getSymbolsIn$1);
  17811. }
  17812. var DataView = getNative(root$1, 'DataView'),
  17813. DataView$1 = DataView,
  17814. Promise$1 = getNative(root$1, 'Promise'),
  17815. Promise$2 = Promise$1,
  17816. Set = getNative(root$1, 'Set'),
  17817. Set$1 = Set,
  17818. mapTag$4 = '[object Map]',
  17819. objectTag$2 = '[object Object]',
  17820. promiseTag = '[object Promise]',
  17821. setTag$4 = '[object Set]',
  17822. weakMapTag$1 = '[object WeakMap]',
  17823. dataViewTag$3 = '[object DataView]',
  17824. dataViewCtorString = toSource(DataView$1),
  17825. mapCtorString = toSource(Map$1),
  17826. promiseCtorString = toSource(Promise$2),
  17827. setCtorString = toSource(Set$1),
  17828. weakMapCtorString = toSource(WeakMap$1),
  17829. getTag = baseGetTag;
  17830. ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3) ||
  17831. (Map$1 && getTag(new Map$1()) != mapTag$4) ||
  17832. (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
  17833. (Set$1 && getTag(new Set$1()) != setTag$4) ||
  17834. (WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1)) &&
  17835. (getTag = function (e) {
  17836. var t = baseGetTag(e),
  17837. r = t == objectTag$2 ? e.constructor : void 0,
  17838. i = r ? toSource(r) : '';
  17839. if (i)
  17840. switch (i) {
  17841. case dataViewCtorString:
  17842. return dataViewTag$3;
  17843. case mapCtorString:
  17844. return mapTag$4;
  17845. case promiseCtorString:
  17846. return promiseTag;
  17847. case setCtorString:
  17848. return setTag$4;
  17849. case weakMapCtorString:
  17850. return weakMapTag$1;
  17851. }
  17852. return t;
  17853. });
  17854. var getTag$1 = getTag,
  17855. objectProto$2 = Object.prototype,
  17856. hasOwnProperty$2 = objectProto$2.hasOwnProperty;
  17857. function initCloneArray(e) {
  17858. var t = e.length,
  17859. r = new e.constructor(t);
  17860. return (
  17861. t &&
  17862. typeof e[0] == 'string' &&
  17863. hasOwnProperty$2.call(e, 'index') &&
  17864. ((r.index = e.index), (r.input = e.input)),
  17865. r
  17866. );
  17867. }
  17868. var Uint8Array$1 = root$1.Uint8Array,
  17869. Uint8Array$1$1 = Uint8Array$1;
  17870. function cloneArrayBuffer(e) {
  17871. var t = new e.constructor(e.byteLength);
  17872. return new Uint8Array$1$1(t).set(new Uint8Array$1$1(e)), t;
  17873. }
  17874. function cloneDataView(e, t) {
  17875. var r = t ? cloneArrayBuffer(e.buffer) : e.buffer;
  17876. return new e.constructor(r, e.byteOffset, e.byteLength);
  17877. }
  17878. var reFlags = /\w*$/;
  17879. function cloneRegExp(e) {
  17880. var t = new e.constructor(e.source, reFlags.exec(e));
  17881. return (t.lastIndex = e.lastIndex), t;
  17882. }
  17883. var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0,
  17884. symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
  17885. function cloneSymbol(e) {
  17886. return symbolValueOf$1 ? Object(symbolValueOf$1.call(e)) : {};
  17887. }
  17888. function cloneTypedArray(e, t) {
  17889. var r = t ? cloneArrayBuffer(e.buffer) : e.buffer;
  17890. return new e.constructor(r, e.byteOffset, e.length);
  17891. }
  17892. var boolTag$2 = '[object Boolean]',
  17893. dateTag$2 = '[object Date]',
  17894. mapTag$3 = '[object Map]',
  17895. numberTag$2 = '[object Number]',
  17896. regexpTag$2 = '[object RegExp]',
  17897. setTag$3 = '[object Set]',
  17898. stringTag$2 = '[object String]',
  17899. symbolTag$2 = '[object Symbol]',
  17900. arrayBufferTag$2 = '[object ArrayBuffer]',
  17901. dataViewTag$2 = '[object DataView]',
  17902. float32Tag$1 = '[object Float32Array]',
  17903. float64Tag$1 = '[object Float64Array]',
  17904. int8Tag$1 = '[object Int8Array]',
  17905. int16Tag$1 = '[object Int16Array]',
  17906. int32Tag$1 = '[object Int32Array]',
  17907. uint8Tag$1 = '[object Uint8Array]',
  17908. uint8ClampedTag$1 = '[object Uint8ClampedArray]',
  17909. uint16Tag$1 = '[object Uint16Array]',
  17910. uint32Tag$1 = '[object Uint32Array]';
  17911. function initCloneByTag(e, t, r) {
  17912. var i = e.constructor;
  17913. switch (t) {
  17914. case arrayBufferTag$2:
  17915. return cloneArrayBuffer(e);
  17916. case boolTag$2:
  17917. case dateTag$2:
  17918. return new i(+e);
  17919. case dataViewTag$2:
  17920. return cloneDataView(e, r);
  17921. case float32Tag$1:
  17922. case float64Tag$1:
  17923. case int8Tag$1:
  17924. case int16Tag$1:
  17925. case int32Tag$1:
  17926. case uint8Tag$1:
  17927. case uint8ClampedTag$1:
  17928. case uint16Tag$1:
  17929. case uint32Tag$1:
  17930. return cloneTypedArray(e, r);
  17931. case mapTag$3:
  17932. return new i();
  17933. case numberTag$2:
  17934. case stringTag$2:
  17935. return new i(e);
  17936. case regexpTag$2:
  17937. return cloneRegExp(e);
  17938. case setTag$3:
  17939. return new i();
  17940. case symbolTag$2:
  17941. return cloneSymbol(e);
  17942. }
  17943. }
  17944. function initCloneObject(e) {
  17945. return typeof e.constructor == 'function' && !isPrototype(e)
  17946. ? baseCreate$1(getPrototype$1(e))
  17947. : {};
  17948. }
  17949. var mapTag$2 = '[object Map]';
  17950. function baseIsMap(e) {
  17951. return isObjectLike(e) && getTag$1(e) == mapTag$2;
  17952. }
  17953. var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap,
  17954. isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap,
  17955. isMap$1 = isMap,
  17956. setTag$2 = '[object Set]';
  17957. function baseIsSet(e) {
  17958. return isObjectLike(e) && getTag$1(e) == setTag$2;
  17959. }
  17960. var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet,
  17961. isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet,
  17962. isSet$1 = isSet,
  17963. CLONE_DEEP_FLAG$1 = 1,
  17964. CLONE_FLAT_FLAG = 2,
  17965. CLONE_SYMBOLS_FLAG$1 = 4,
  17966. argsTag$1 = '[object Arguments]',
  17967. arrayTag$1 = '[object Array]',
  17968. boolTag$1 = '[object Boolean]',
  17969. dateTag$1 = '[object Date]',
  17970. errorTag$1 = '[object Error]',
  17971. funcTag = '[object Function]',
  17972. genTag = '[object GeneratorFunction]',
  17973. mapTag$1 = '[object Map]',
  17974. numberTag$1 = '[object Number]',
  17975. objectTag$1 = '[object Object]',
  17976. regexpTag$1 = '[object RegExp]',
  17977. setTag$1 = '[object Set]',
  17978. stringTag$1 = '[object String]',
  17979. symbolTag$1 = '[object Symbol]',
  17980. weakMapTag = '[object WeakMap]',
  17981. arrayBufferTag$1 = '[object ArrayBuffer]',
  17982. dataViewTag$1 = '[object DataView]',
  17983. float32Tag = '[object Float32Array]',
  17984. float64Tag = '[object Float64Array]',
  17985. int8Tag = '[object Int8Array]',
  17986. int16Tag = '[object Int16Array]',
  17987. int32Tag = '[object Int32Array]',
  17988. uint8Tag = '[object Uint8Array]',
  17989. uint8ClampedTag = '[object Uint8ClampedArray]',
  17990. uint16Tag = '[object Uint16Array]',
  17991. uint32Tag = '[object Uint32Array]',
  17992. cloneableTags = {};
  17993. cloneableTags[argsTag$1] =
  17994. cloneableTags[arrayTag$1] =
  17995. cloneableTags[arrayBufferTag$1] =
  17996. cloneableTags[dataViewTag$1] =
  17997. cloneableTags[boolTag$1] =
  17998. cloneableTags[dateTag$1] =
  17999. cloneableTags[float32Tag] =
  18000. cloneableTags[float64Tag] =
  18001. cloneableTags[int8Tag] =
  18002. cloneableTags[int16Tag] =
  18003. cloneableTags[int32Tag] =
  18004. cloneableTags[mapTag$1] =
  18005. cloneableTags[numberTag$1] =
  18006. cloneableTags[objectTag$1] =
  18007. cloneableTags[regexpTag$1] =
  18008. cloneableTags[setTag$1] =
  18009. cloneableTags[stringTag$1] =
  18010. cloneableTags[symbolTag$1] =
  18011. cloneableTags[uint8Tag] =
  18012. cloneableTags[uint8ClampedTag] =
  18013. cloneableTags[uint16Tag] =
  18014. cloneableTags[uint32Tag] =
  18015. !0;
  18016. cloneableTags[errorTag$1] =
  18017. cloneableTags[funcTag] =
  18018. cloneableTags[weakMapTag] =
  18019. !1;
  18020. function baseClone(e, t, r, i, s, a) {
  18021. var o,
  18022. n = t & CLONE_DEEP_FLAG$1,
  18023. l = t & CLONE_FLAT_FLAG,
  18024. f = t & CLONE_SYMBOLS_FLAG$1;
  18025. if ((r && (o = s ? r(e, i, s, a) : r(e)), o !== void 0)) return o;
  18026. if (!isObject(e)) return e;
  18027. var g = isArray$1(e);
  18028. if (g) {
  18029. if (((o = initCloneArray(e)), !n)) return copyArray(e, o);
  18030. } else {
  18031. var S = getTag$1(e),
  18032. c = S == funcTag || S == genTag;
  18033. if (isBuffer$1(e)) return cloneBuffer(e, n);
  18034. if (S == objectTag$1 || S == argsTag$1 || (c && !s)) {
  18035. if (((o = l || c ? {} : initCloneObject(e)), !n))
  18036. return l
  18037. ? copySymbolsIn(e, baseAssignIn(o, e))
  18038. : copySymbols(e, baseAssign(o, e));
  18039. } else {
  18040. if (!cloneableTags[S]) return s ? e : {};
  18041. o = initCloneByTag(e, S, n);
  18042. }
  18043. }
  18044. a || (a = new Stack());
  18045. var P = a.get(e);
  18046. if (P) return P;
  18047. a.set(e, o),
  18048. isSet$1(e)
  18049. ? e.forEach(function (x) {
  18050. o.add(baseClone(x, t, r, x, e, a));
  18051. })
  18052. : isMap$1(e) &&
  18053. e.forEach(function (x, u) {
  18054. o.set(u, baseClone(x, t, r, u, e, a));
  18055. });
  18056. var d = f ? (l ? getAllKeysIn : getAllKeys) : l ? keysIn : keys,
  18057. p = g ? void 0 : d(e);
  18058. return (
  18059. arrayEach(p || e, function (x, u) {
  18060. p && ((u = x), (x = e[u])),
  18061. assignValue(o, u, baseClone(x, t, r, u, e, a));
  18062. }),
  18063. o
  18064. );
  18065. }
  18066. var CLONE_DEEP_FLAG = 1,
  18067. CLONE_SYMBOLS_FLAG = 4;
  18068. function cloneDeep(e) {
  18069. return baseClone(e, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  18070. }
  18071. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  18072. function setCacheAdd(e) {
  18073. return this.__data__.set(e, HASH_UNDEFINED), this;
  18074. }
  18075. function setCacheHas(e) {
  18076. return this.__data__.has(e);
  18077. }
  18078. function SetCache(e) {
  18079. var t = -1,
  18080. r = e == null ? 0 : e.length;
  18081. for (this.__data__ = new MapCache(); ++t < r; ) this.add(e[t]);
  18082. }
  18083. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  18084. SetCache.prototype.has = setCacheHas;
  18085. function arraySome(e, t) {
  18086. for (var r = -1, i = e == null ? 0 : e.length; ++r < i; )
  18087. if (t(e[r], r, e)) return !0;
  18088. return !1;
  18089. }
  18090. function cacheHas(e, t) {
  18091. return e.has(t);
  18092. }
  18093. var COMPARE_PARTIAL_FLAG$3 = 1,
  18094. COMPARE_UNORDERED_FLAG$1 = 2;
  18095. function equalArrays(e, t, r, i, s, a) {
  18096. var o = r & COMPARE_PARTIAL_FLAG$3,
  18097. n = e.length,
  18098. l = t.length;
  18099. if (n != l && !(o && l > n)) return !1;
  18100. var f = a.get(e),
  18101. g = a.get(t);
  18102. if (f && g) return f == t && g == e;
  18103. var S = -1,
  18104. c = !0,
  18105. P = r & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
  18106. for (a.set(e, t), a.set(t, e); ++S < n; ) {
  18107. var d = e[S],
  18108. p = t[S];
  18109. if (i) var x = o ? i(p, d, S, t, e, a) : i(d, p, S, e, t, a);
  18110. if (x !== void 0) {
  18111. if (x) continue;
  18112. c = !1;
  18113. break;
  18114. }
  18115. if (P) {
  18116. if (
  18117. !arraySome(t, function (u, y) {
  18118. if (!cacheHas(P, y) && (d === u || s(d, u, r, i, a)))
  18119. return P.push(y);
  18120. })
  18121. ) {
  18122. c = !1;
  18123. break;
  18124. }
  18125. } else if (!(d === p || s(d, p, r, i, a))) {
  18126. c = !1;
  18127. break;
  18128. }
  18129. }
  18130. return a.delete(e), a.delete(t), c;
  18131. }
  18132. function mapToArray(e) {
  18133. var t = -1,
  18134. r = Array(e.size);
  18135. return (
  18136. e.forEach(function (i, s) {
  18137. r[++t] = [s, i];
  18138. }),
  18139. r
  18140. );
  18141. }
  18142. function setToArray(e) {
  18143. var t = -1,
  18144. r = Array(e.size);
  18145. return (
  18146. e.forEach(function (i) {
  18147. r[++t] = i;
  18148. }),
  18149. r
  18150. );
  18151. }
  18152. var COMPARE_PARTIAL_FLAG$2 = 1,
  18153. COMPARE_UNORDERED_FLAG = 2,
  18154. boolTag = '[object Boolean]',
  18155. dateTag = '[object Date]',
  18156. errorTag = '[object Error]',
  18157. mapTag = '[object Map]',
  18158. numberTag = '[object Number]',
  18159. regexpTag = '[object RegExp]',
  18160. setTag = '[object Set]',
  18161. stringTag = '[object String]',
  18162. symbolTag = '[object Symbol]',
  18163. arrayBufferTag = '[object ArrayBuffer]',
  18164. dataViewTag = '[object DataView]',
  18165. symbolProto = Symbol$2 ? Symbol$2.prototype : void 0,
  18166. symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  18167. function equalByTag(e, t, r, i, s, a, o) {
  18168. switch (r) {
  18169. case dataViewTag:
  18170. if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
  18171. return !1;
  18172. (e = e.buffer), (t = t.buffer);
  18173. case arrayBufferTag:
  18174. return !(
  18175. e.byteLength != t.byteLength ||
  18176. !a(new Uint8Array$1$1(e), new Uint8Array$1$1(t))
  18177. );
  18178. case boolTag:
  18179. case dateTag:
  18180. case numberTag:
  18181. return eq(+e, +t);
  18182. case errorTag:
  18183. return e.name == t.name && e.message == t.message;
  18184. case regexpTag:
  18185. case stringTag:
  18186. return e == t + '';
  18187. case mapTag:
  18188. var n = mapToArray;
  18189. case setTag:
  18190. var l = i & COMPARE_PARTIAL_FLAG$2;
  18191. if ((n || (n = setToArray), e.size != t.size && !l)) return !1;
  18192. var f = o.get(e);
  18193. if (f) return f == t;
  18194. (i |= COMPARE_UNORDERED_FLAG), o.set(e, t);
  18195. var g = equalArrays(n(e), n(t), i, s, a, o);
  18196. return o.delete(e), g;
  18197. case symbolTag:
  18198. if (symbolValueOf) return symbolValueOf.call(e) == symbolValueOf.call(t);
  18199. }
  18200. return !1;
  18201. }
  18202. var COMPARE_PARTIAL_FLAG$1 = 1,
  18203. objectProto$1 = Object.prototype,
  18204. hasOwnProperty$1 = objectProto$1.hasOwnProperty;
  18205. function equalObjects(e, t, r, i, s, a) {
  18206. var o = r & COMPARE_PARTIAL_FLAG$1,
  18207. n = getAllKeys(e),
  18208. l = n.length,
  18209. f = getAllKeys(t),
  18210. g = f.length;
  18211. if (l != g && !o) return !1;
  18212. for (var S = l; S--; ) {
  18213. var c = n[S];
  18214. if (!(o ? c in t : hasOwnProperty$1.call(t, c))) return !1;
  18215. }
  18216. var P = a.get(e),
  18217. d = a.get(t);
  18218. if (P && d) return P == t && d == e;
  18219. var p = !0;
  18220. a.set(e, t), a.set(t, e);
  18221. for (var x = o; ++S < l; ) {
  18222. c = n[S];
  18223. var u = e[c],
  18224. y = t[c];
  18225. if (i) var m = o ? i(y, u, c, t, e, a) : i(u, y, c, e, t, a);
  18226. if (!(m === void 0 ? u === y || s(u, y, r, i, a) : m)) {
  18227. p = !1;
  18228. break;
  18229. }
  18230. x || (x = c == 'constructor');
  18231. }
  18232. if (p && !x) {
  18233. var A = e.constructor,
  18234. T = t.constructor;
  18235. A != T &&
  18236. 'constructor' in e &&
  18237. 'constructor' in t &&
  18238. !(
  18239. typeof A == 'function' &&
  18240. A instanceof A &&
  18241. typeof T == 'function' &&
  18242. T instanceof T
  18243. ) &&
  18244. (p = !1);
  18245. }
  18246. return a.delete(e), a.delete(t), p;
  18247. }
  18248. var COMPARE_PARTIAL_FLAG = 1,
  18249. argsTag = '[object Arguments]',
  18250. arrayTag = '[object Array]',
  18251. objectTag = '[object Object]',
  18252. objectProto = Object.prototype,
  18253. hasOwnProperty = objectProto.hasOwnProperty;
  18254. function baseIsEqualDeep(e, t, r, i, s, a) {
  18255. var o = isArray$1(e),
  18256. n = isArray$1(t),
  18257. l = o ? arrayTag : getTag$1(e),
  18258. f = n ? arrayTag : getTag$1(t);
  18259. (l = l == argsTag ? objectTag : l), (f = f == argsTag ? objectTag : f);
  18260. var g = l == objectTag,
  18261. S = f == objectTag,
  18262. c = l == f;
  18263. if (c && isBuffer$1(e)) {
  18264. if (!isBuffer$1(t)) return !1;
  18265. (o = !0), (g = !1);
  18266. }
  18267. if (c && !g)
  18268. return (
  18269. a || (a = new Stack()),
  18270. o || isTypedArray$1(e)
  18271. ? equalArrays(e, t, r, i, s, a)
  18272. : equalByTag(e, t, l, r, i, s, a)
  18273. );
  18274. if (!(r & COMPARE_PARTIAL_FLAG)) {
  18275. var P = g && hasOwnProperty.call(e, '__wrapped__'),
  18276. d = S && hasOwnProperty.call(t, '__wrapped__');
  18277. if (P || d) {
  18278. var p = P ? e.value() : e,
  18279. x = d ? t.value() : t;
  18280. return a || (a = new Stack()), s(p, x, r, i, a);
  18281. }
  18282. }
  18283. return c ? (a || (a = new Stack()), equalObjects(e, t, r, i, s, a)) : !1;
  18284. }
  18285. function baseIsEqual(e, t, r, i, s) {
  18286. return e === t
  18287. ? !0
  18288. : e == null || t == null || (!isObjectLike(e) && !isObjectLike(t))
  18289. ? e !== e && t !== t
  18290. : baseIsEqualDeep(e, t, r, i, baseIsEqual, s);
  18291. }
  18292. function isEqual(e, t) {
  18293. return baseIsEqual(e, t);
  18294. }
  18295. var _export_sfc = (e, t) => {
  18296. const r = e.__vccOpts || e;
  18297. for (const [i, s] of t) r[i] = s;
  18298. return r;
  18299. };
  18300. const _sfc_main = defineComponent({
  18301. props: {
  18302. animationData: { type: Object, default: () => ({}) },
  18303. animationLink: { type: String, default: '' },
  18304. loop: { type: [Boolean, Number], default: !0 },
  18305. autoPlay: { type: Boolean, default: !0 },
  18306. width: { type: [Number, String], default: '100%' },
  18307. height: { type: [Number, String], default: '100%' },
  18308. speed: { type: Number, default: 1 },
  18309. delay: { type: Number, default: 0 },
  18310. direction: { type: String, default: 'forward' },
  18311. pauseOnHover: { type: Boolean, default: !1 },
  18312. playOnHover: { type: Boolean, default: !1 },
  18313. backgroundColor: { type: String, default: 'transparent' },
  18314. pauseAnimation: { type: Boolean, default: !1 },
  18315. renderer: { type: String, default: 'svg' },
  18316. rendererSettings: { type: Object, default: () => ({}) },
  18317. assetsPath: { type: String, default: '' }
  18318. },
  18319. emits: {
  18320. onComplete: null,
  18321. onLoopComplete: null,
  18322. onEnterFrame: null,
  18323. onSegmentStart: null,
  18324. onAnimationLoaded: null
  18325. },
  18326. setup(e, { emit: t }) {
  18327. let r = ref(null);
  18328. const i = ref('');
  18329. let s = 1;
  18330. const a = I =>
  18331. document.querySelector('[data-id="'.concat(I, '"]')) !== null,
  18332. o = async I => {
  18333. let B = e.autoPlay;
  18334. e.playOnHover && (B = !1);
  18335. let z = {};
  18336. if (
  18337. (isEqual(e.animationData, {}) === !1 &&
  18338. (z = cloneDeep(e.animationData)),
  18339. e.animationLink != '')
  18340. )
  18341. try {
  18342. z = await (await fetch(e.animationLink)).json();
  18343. } catch (W) {
  18344. console.error(W);
  18345. return;
  18346. }
  18347. let G = e.loop;
  18348. typeof G == 'number' && G > 0 && (G = G - 1), e.delay > 0 && (B = !1);
  18349. const R = {
  18350. container: I,
  18351. renderer: e.renderer,
  18352. loop: G,
  18353. autoplay: B,
  18354. animationData: z,
  18355. assetsPath: e.assetsPath
  18356. };
  18357. isEqual(e.rendererSettings, {}) === !1 &&
  18358. (R.rendererSettings = e.rendererSettings),
  18359. (r = Lottie.loadAnimation(R)),
  18360. setTimeout(() => {
  18361. (B = e.autoPlay),
  18362. e.playOnHover ? r.pause() : B ? r.play() : r.pause(),
  18363. t('onAnimationLoaded');
  18364. }, e.delay),
  18365. r.setSpeed(e.speed),
  18366. e.direction === 'reverse' && r.setDirection(-1),
  18367. e.direction === 'normal' && r.setDirection(1),
  18368. (e.pauseAnimation || e.playOnHover) && r.pause(),
  18369. r.addEventListener('loopComplete', () => {
  18370. e.direction === 'alternate' &&
  18371. (r.stop(), (s = s * -1), r.setDirection(s), r.play()),
  18372. t('onLoopComplete');
  18373. }),
  18374. r.addEventListener('complete', () => {
  18375. t('onComplete');
  18376. }),
  18377. r.addEventListener('enterFrame', () => {
  18378. t('onEnterFrame');
  18379. }),
  18380. r.addEventListener('segmentStart', () => {
  18381. t('onSegmentStart');
  18382. });
  18383. },
  18384. n = computed(() => {
  18385. let I = e.width,
  18386. B = e.height;
  18387. return (
  18388. typeof e.width == 'number' && (I = ''.concat(e.width, 'px')),
  18389. typeof e.height == 'number' && (B = ''.concat(e.height, 'px')),
  18390. {
  18391. '--lottie-animation-container-width': I,
  18392. '--lottie-animation-container-height': B,
  18393. '--lottie-animation-container-background-color': e.backgroundColor
  18394. }
  18395. );
  18396. }),
  18397. l = () => {
  18398. r && e.pauseOnHover && r.pause(), r && e.playOnHover && r.play();
  18399. },
  18400. f = () => {
  18401. r && e.pauseOnHover && r.play(), r && e.playOnHover && r.pause();
  18402. };
  18403. watch(
  18404. () => e.pauseAnimation,
  18405. () => {
  18406. if ((e.pauseOnHover || e.playOnHover) && e.pauseAnimation) {
  18407. console.error(
  18408. 'If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover'
  18409. );
  18410. return;
  18411. }
  18412. r && (e.pauseAnimation ? r.pause() : r.play());
  18413. }
  18414. );
  18415. const g = () => {
  18416. r && r.play();
  18417. },
  18418. S = () => {
  18419. r && r.pause();
  18420. },
  18421. c = () => {
  18422. r && r.stop();
  18423. },
  18424. P = () => {
  18425. r && r.destroy();
  18426. },
  18427. d = (I = 1) => {
  18428. if (I <= 0) throw new Error('Speed must be greater than 0');
  18429. r && r.setSpeed(I);
  18430. },
  18431. p = I => {
  18432. r &&
  18433. (I === 'forward'
  18434. ? r.setDirection(1)
  18435. : I === 'reverse' && r.setDirection(-1));
  18436. },
  18437. x = (I, B = !0) => {
  18438. r && r.goToAndStop(I, B);
  18439. },
  18440. u = (I, B = !0) => {
  18441. r && r.goToAndPlay(I, B);
  18442. },
  18443. y = (I, B = !1) => {
  18444. r && r.playSegments(I, B);
  18445. },
  18446. m = (I = !0) => {
  18447. r && r.setSubframe(I);
  18448. },
  18449. A = (I = !0) => {
  18450. if (r) return r.getDuration(I);
  18451. },
  18452. T = (I, B = 0) => {
  18453. r && r.renderer.elements[B].updateDocumentData(I);
  18454. },
  18455. E = I => {
  18456. for (
  18457. var B = '',
  18458. z =
  18459. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
  18460. G = z.length,
  18461. R = 0;
  18462. R < I;
  18463. R++
  18464. )
  18465. B += z.charAt(Math.floor(Math.random() * G));
  18466. return B;
  18467. },
  18468. _ = I => {
  18469. if (e.pauseOnHover && e.playOnHover)
  18470. throw new Error(
  18471. 'You cannot set pauseOnHover and playOnHover for Vue3-Lottie at the same time.'
  18472. );
  18473. if (e.animationLink === '' && isEqual(e.animationData, {}))
  18474. throw new Error(
  18475. 'You must provide either animationLink or animationData'
  18476. );
  18477. const B = setInterval(() => {
  18478. if (a(I)) {
  18479. clearInterval(B);
  18480. const z = document.querySelector('[data-id="'.concat(I, '" ]'));
  18481. z && o(z);
  18482. }
  18483. }, 0);
  18484. };
  18485. return (
  18486. onMounted(async () => {
  18487. (i.value = E(20)), _(i.value);
  18488. }),
  18489. {
  18490. elementid: i,
  18491. hoverEnded: f,
  18492. hoverStarted: l,
  18493. getCurrentStyle: n,
  18494. play: g,
  18495. pause: S,
  18496. stop: c,
  18497. destroy: P,
  18498. setSpeed: d,
  18499. setDirection: p,
  18500. goToAndStop: x,
  18501. goToAndPlay: u,
  18502. playSegments: y,
  18503. setSubFrame: m,
  18504. getDuration: A,
  18505. updateDocumentData: T
  18506. }
  18507. );
  18508. }
  18509. }),
  18510. _hoisted_1 = ['data-id'];
  18511. function _sfc_render(e, t, r, i, s, a) {
  18512. return (
  18513. openBlock(),
  18514. createElementBlock(
  18515. 'div',
  18516. {
  18517. 'data-id': e.elementid,
  18518. class: 'lottie-animation-container',
  18519. style: normalizeStyle(e.getCurrentStyle),
  18520. onMouseenter:
  18521. t[0] || (t[0] = (...o) => e.hoverStarted && e.hoverStarted(...o)),
  18522. onMouseleave:
  18523. t[1] || (t[1] = (...o) => e.hoverEnded && e.hoverEnded(...o))
  18524. },
  18525. null,
  18526. 44,
  18527. _hoisted_1
  18528. )
  18529. );
  18530. }
  18531. var Vue3Lottie = _export_sfc(_sfc_main, [['render', _sfc_render]]);
  18532. const v = '5.7.1',
  18533. fr = 60,
  18534. ip = 0,
  18535. op = 120,
  18536. w = 2436,
  18537. h = 1125,
  18538. nm = '合成 1',
  18539. ddd = 0,
  18540. assets = [
  18541. {
  18542. id: 'image_0',
  18543. w: 195,
  18544. h: 264,
  18545. u: '',
  18546. p: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMMAAAEICAYAAADiJ0BpAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAgAElEQVR4nO19ebxlRXXut85tGhBoZGjAhEkRISjJQ5QYYwjghBFiVMQ5xhiHRJOoz0jEiahIElEjUcOLmJ8xosGg4hRFoy2IedHggMg8NUQF6WZqmga6++4vf1StqlW19xnu1Hc3d31w+5yzd1WtqtprrqpzBFsh7r9p1aOmNzdHgTyK4AFosFKEKwksBxj+JwEBQMZa8TV+ZvwcitC0Hu+T4R6YmpFUj6bdXDYWCKVqurlwqgMBpCiby5CESEm37Kul30Ay8dwJ4C6Qt1HkFwJ+F4PBBZze8Vu7PubEu0bP8NKELHYHJgV5zbb3rb7p+U3D14H8VeWUNpMAaDE6K2Yu7xkilQABqJlV38dylmlrgUvXbT9HCeEQASI5om/luFQZJBqxXSPU9wrwiW22HZyx06/90U/qeV7K2CqE4d4bv/lETvOjIPcLPGe0YnzIlmktoymzgsgMXDGk3lbhyEyE+FlKZq6tQmwg1RcphbBi4lxO6Yf22/03n5H72U2/qq8W0sxPukNCRAjyzF1WLDtJDn7Z3TN+KA9A9FoYSA7uvXHV36Hha0jGZ0qjlZEYCqg1JFQtF0xh3Z7KrTB1Ev18v9DMlqnQwcTI9WKbNPdzHRbFIFkA2/S72syC1KZPU6+ir1cIyEBukin+7i6PftUlrQewxNBbYSA5dd/qVR9vmuYFACptnUppWWAEQ6s/39K2hnFSOXO9m9HbblVyY6p+FfSL/pdCVGvwFk3pErQ8ztpaJcEFYjxhi7cVh5B3NAMcu/tj//h7WMIYLHYHhuG+67/5wabhC0SykU9KGQTZGOZkDCBhGMG4IsosypjJpVDtGVyb2HJ8bwQkauGsXwNjMpMJdZJqkSQPIllzQ10aAGxKbW8Z1o5ZwgCUTCpENmDR/9xWsmDqglk6af7ynBDcZUA5f8MlH9l74gf0AEQvheG+6y94CgWvslpSH3jW2qVRSwyfHGuJz9q4R1Yb1zBuB1AKh7YZGCtbjczxtdXKFsPGBDmWSA1UXcj+fym0+Vq2GtX4C7cv98mOu7AuguKVbB684b6NH0vu6BJE74SB5KDB9JmdPJutf+vhZsVoNL7RuLF665MVDm1P/9quDyGmXijfJA2c6CczZoJXy9haTobQb/U19yG5fKjGb01L6gOGj19drMbQJ5545/f+4RmdpJcAeicM969e9WSCDy0UZx3UqpUoilRPHkhlWgKjnyrhqu7aBjKd2B9RsYjuEdnkivGvyBKJmKxSdmUK+qaDkv6xoiHJAtbJgi6Lp6ndYvwqLJLL2PoN+MethpYIeicMDfkiMDM9gOyGWLfEal4biCavIufgRdckigxOTrGqK5EagaEfGmhpasuU1j3SekE5s6JvGzArA7TjYNEOTJn258pdM+9UCEVymTLTlgXABvkgnnzXZWftiiWI3gkDIY/KcaiqNiRNHPzueBslk9qHqgo6+832ThV3GAHSEkVEa1yyIgtj1hMQ4wmtK8aNyf2yMQ3ytfgh6//abc+JAFPdLPYNGX/sH+P8xQk0bdZxB0FSNq/ffBCWIHonDALsnzS2ai7VakU8AHMtfJIoAS2NV/nrNigtV5CrBTvTj9Lft+1Y+mLoR+GwgXgqafR3R2BMNrGd1M12vKF1qgC7mLfW+I3VsePXPkUrMuDmh2MJonfCQDYPjm9aWn50Nig1ED+2Y4iy3bbjY7VuQT/6+9kqFKq9oFtbmYwcYHfkkQx9w9ySa4rmuYp2peyDukz1POkEVu3W0bW231C2a3VxCWDZYnegBdKY8rb2VyeiuB59eyFvIHDOsoF8FVNYvd203HE/sHIzmodLw+Ma4rkAVsLEEEXa0bTVzdRd7hGyBbBtitHySU6sIFRpV5Rt5uko4xzlf40ZYPqf6YveKuYpp45jWePKjVQ0SwT9E4aIFHzqBQFAzc6g1GoDWSeQkx904O7/KPKYTVVT6wBcB+B83rrqTetvX/9GkG9CNXaaf/WdqOtVeUidmaeakVKALIBkF8gyYR5X6UYBmcELK6IxQGWZugxgu0WjRlTf5CClIwRfeuinMDBrypRC1X+SylMG4/XLttnmuG33f/IV45qVPY5eD+Btd1/5pVVsNp8LYNfWYlSin42UdV0i0coqGQtQaNh0IX1K7lDy6xvkVeLch2SxxNyjbbMpLZi1AMx0bQq6a5tJaRW05PS4qXxAoncxQ7bipQtjbiEH0rhtsHzqSZMIgsVOBx+3ClNTzxBgY2LMFJgY+lDPJFyss0/xInT/j8YVRUxi3L6WpgdgV7XtXVqFkEnp3fJFrYiJbdSlKhb17D2NU4oyXT1cOuifMESXIQWPkrVe6coIZEpesv3+T71hNmRWHHT8RSJ4sy6IRf8n+92BROF324xM6Ir1+7U6UbB2lCgNvMtUqxFEmyVj9u1tfFAo72IvFVK7VJdLDH2TQco7rCTTT3PfjlmWEnonDDaoY8WYthSE39zhgGO/PBdaOxx84BkYyOrEmDCuielD4d9bB9v0qbAG2h4zE2btnkvWFi/RE2Xa/LkgRJtUsO22BbVFP1K3cUs9/vkCL3nPDrdd8N59eM0Z285bowuI3sUMlmlSvr4jozRo8ME505JHblx3xXkfIZtT1ZdXTZrWHqwboerfaPvk5kg7y5THk4NWm9fPYYf68pGokoDSByyTJ/qmzVDU7JCNbRVBu1pdlIF4XkQsuj4r3Hbh6Yc0wpcBPGHNXc2+kAZrfr4Jv7jgb34iIp9aubN8QH7tL+6ZG5WFQe8sA1BpZMsoESK4f/udB1+bD1qybPB5JMbMbkqbfr4fLuTsTKyUBYG5nmW07KpkN8WO2dZJlsMwei4cr1TWsgj0bTCtgmpK1ptm6+0eMwH56am1337fM9dc+J5vTKO5jGxeT3Lf1C4AAR9FTp966x2bL7v1gtMOmxWhBUbvhCGv2jI/NGaXARCwwQ2y11PnRbvs+PDjr4RgWqJZCNpWEk/nsw3Gv1cXxLCX2eVQuU9S8Fi2FA3UrUljluwmpnjEzIWNL2iFD9WuWeMyJSGMf7oto1yRL923SXH3D85Yufai009ee9FNNxDTn6XgmDTKZKDseQ5ABPsRPP+2C967zwxIbRH0Thjyfv7qoSWXoAHQ3Dx/9GRaiDVAdmFAI4TqK6E8j9B5niAJi3a5Y2GPiUtaYy4zRyqEWduX5znKcSRX0vh3KsDapTx/1uXMFqiS46FY+5/vO2Ltd07/+L33bPofEqcS3IdpEmK7JqjP5zlUMLFyMza+ZQJSWxS9ixkK/7jQU8YPH8j280oT3D47PcbVKAsVfahXbQUAparHkmmLFo0bkzJXlcbu6GhJHxX91K6xWHaUHY3ZY6HaXr2BDwB4zRnb3rZm03NJvIYNHxvkPlun5IaxQ9DiR5YDOHb4QBcHvRMGRWAuqR5uAIlfni86vOX8He6+bf3ORdYIVTCcVKYAbIyWLYWjVqt1mSRsLMtofZu1snJV3GMQuuLUnKVftC3ZRZL6tgmw1SXtsAu3X/yBfZv7mlet/cWmlwPYvRQ+pnnJFi+3L+pKUsckYNNoDNM7N6mHwmACvwQpNBjIfe67+ksP2+4Rx10/V2obbr/3t4sVY6qJz31Rk68xdGsfj2HE5FSpxlS2IVEeqGxng+wUFEwkdvwd+5iMK9llsVrbOGKdlFkqLDHRkLL2Pz/wRDTTr27ub36Xwikr61morVumY7IbHrPVs+svAMCmmcQj26LooTDUGkx9ZDETTWyGPBvAe+ZKa5rTJySatcuRyGe6dntD6zwBCN0iJ+ZaWTZLjU1lFvSz258ItM9RV4wsAJtyp2s3/TSonMrV9uNpPSHfSzQ7hqJN0b8ybrGC1Hb5kLpfbhOfUZS+BdG7ABrIJt/un2lpYvL/8tZVO86Fzn3XfO4AsHmRugm6X8HS1cRIrVXTfRvgAkgugxjvijZ1a7JCxo+umap4hXE3oO0Y7RwvWZdLX21mqm7fBu05UQCQQRA0pG7Pv2knWaj6PEcWntb4eioNvRQGAABLLad/ZqL33HDHPe+effMcbNrYfIjANimDBBQMZ7dEDD1PEF9qS1aUExhV3T7PYN0v6/okLatNSMWUdjyt8Nj4NeXAh2SMquupOuOep47x2+SAEcr8uYjCxtBffPRPGKqHrb4mkTW1ZjuapvnTe67+0itmQ+buKz5zesPmqTaDUq8eJ1+Xdp0jM4m6EFa7FulR7XP8SxbBWIWW+9E1/vSn7WbGCj0ZQ9+0FW7kOCanfc1Kf8Xkdg5y9dzXEDpISV9QjakW5P5Zh/4JQ0SYv7ynP2hGQINEIFxsmub/3X3FF/6K5ERj4Q2rtlt32Wc+jgavSxcr3zfQZ6av2tlsjst1TWCZI/yS+dN9dUMqoUNLBqAqQOmmHactpioDW9NAu1zlRrXptT+rRSiNWwd9IwQ6oDrD1Dl/PUJPhcEEqoKklbszKATAt62/6vPfv+eqLzxtmFDwmn/f9q7LP/PidRtuvxLgi5OvXrhHpYuSy2AMfXtf+912BlS721Xp7FcbrayammU9m2HK0mPopyuVi2Qsk7UixfiL+KMqo//R9NHOg8ZVVayTy6CiX6aF+4LeuW/rr/4KkwmHPnsaHqiY0Zh7AIDIGpBfB5rVgsEdIFcSPJDAk0DuZF0L1G2iahMo6FoBsarcugZQpuxo09ZLLl9BPzVYujBi5ESdxlSldI3S2GqXpBKi7PK1LVhJP9PtnqtKoPRfNkqwmq9Mf69j3tYr/utharXL743Xgfx0DOOVC2RcCeAFoYaePzYPtxIC80gTw6j2DuWyRcjGgylXWfr72pRxD1QromCN7GNbl8HGAMm1yG23VrjTXKm6aAtqHhqLFe50BiJ/SPXJbNiSAKa5KvvLoowhWAYeRpjC/a5V7sVG79ykFMwC2TQXSQm1yalGulw2hPQQAOtXZx2mDyS5uYVFsK6ZljIBQqffXrkRJm4o/HojRK0uG6bJ9FsNoGBKMa6e5eQu+iluMdmi2K6tXtK3tCWTtvurzAjSaEx9jTxGxS2Ljd4JQxGM6QU7cYbZyiyOlZn8ITFfvKzMZh9UHSymera95J603TPVsDnLk1tIQb+yuhGCwuWL1zPTFhOQykCFgyjHb6yJtUx512+mmcJY6zKpwY1zK3YiUj/N/LOaf6BT2+cumfHnSeoVeicMQNTKhmkBlBNoTH1ZK5ZhZtqcji1KtB4cqzpZwRr6xfOrdvIUWrR0ObS09aKG7jpN9Ief51DOrYZfCpfxzbX/efxV5seUU4Zt08909UKtsErhNuNCjj90drr2QS02eicMaaLU45D8GK3LZPPuydSnBjLjpW+XiH/ZKtTnCbR6zu6oP67ucJGvUReM+rClkBjSMIGxKolOYxnGuG+kGbPZSg51+bJVMMMvhcuMudiyUVsl7RbsdeNKoXSrsryE+esal1qOJASQjudUuV89Qe+EIfmxhiE1qi3OE9SaHShMeHafqn1FRQxg3lkXClkTpjSlaSfft/Qtt2QhLLJSiT6N4JQMovuFOs9zwJ6nqOgXvJWF0KYyi5SmiZCtK1O4qZW1KzcA1pbVzn+2REVWDGY8/TMM/csmtV0Nye9ZlrOTm0rZeAPlnJe6qO1GFA9Li7S4DlE2K/rSRd9aLJb0VYPSCmC9Cm4Yx85LFLRwuTF1bXuqsROrt+kDrc19Valy3EX1WjgAVuOpLVYX/T6hd5YBQPTxE3tm6wAkl8HGAOFy249O2rEVdxi3Ad1MkHxqq50TrSx82oAVCr2Wv0KGJpgtOle4R5a6pMa66FsrFYi1LYakXaWMOf8UAyR3syOYt+OP85XcU2MtSyuLDvpqCTvusS7ZD/TOMqgFsG6P3b4NdGnwzNx2sShp5vjgas2U7U5bS2V3Jm9QSy4cyv6hYIqyTWVqxkNBxrQkt2xU4BvaGDZ+wgwWiVFN/4JwSjl+0blCi6mt5dO+WDdn6PxLUT3HTEbYmVzDfqKXliFpcGW0lt9flYsf9OGqFswOlvXRDZ3sQbRcLiNFSYNTX2Ml/eIARWIYKd2uwrKZAVi/u14QNK1CNXhmdGVSbSsL0CjNXJq0HBcpzczANfmafjV/9fih44+WKQ/QjK5/QtFLYVCdrUyUGJq5BOprqgWNy9AKP1JRpuvqAnSZfBomy5qSqeHav1cXqcjfJ4Yz7Zs6rb6aem36xfBh08FgqYWHWs9i/DkjlxSGVPMnSR5abVFviNLv7n9yzTqsXp/QS2EAkCdXspZpmfRQEIGpcj11F+oYItxuPwgpXi1zxevR32+5VKbxQvAMneH0rRsUPtffjZT7ZX4fojSLxj0pKrTpF7nT8prKa4opjDXS+9bSdYHVu5aVTeSbzvp9QP9iBvuwVMtXDJSYMlkOG9DlvTqFb43Sjal95qJN4/60sztS0Ert6jWtbpmX0NaR2a9K+3bSKq1YiqFSu9mq2cP/2v3ijIKho0xfpF2LMUlJv4qNir1YHfOnma32/CNnt3poHXprGYpV6KSZsxtgkTVrro3atUB+EF3arW1vzKIXsnWyrk1BX2XYuMSFFhezL6fDurToGx40TZT9N32zlsyOoOynGX8RXFR9QrUKrdZ5yPxVRioJbqYTVYDktvuI/lkGID1YZtVtwoVSS9XZo/RvKqNaPnngsIffuzSY+t+WaYhMs5u+akq7Mm76bHpg3Y1O/95aOrVilr7pOJktYRnLaBmr5au2h8xfsm7GSNk4JxAePn/sasD0a5S7tZjon2Uw2k/Mwza3CjVq3RyBVGUiI0guK3UDMEyXC1T0c/14M7ZRlrHWq3B3kgbv3pHTaamSkOQ2Wxvh4r3i9yFsH61CsMOz5MTSF3Mtu6PWOpZjy4ytliPPP8vX4j5RP4M+oH+WIWrBlCLVQ/Cs89Rtv9u20dlmVp6Fj201fSjesSrLwu5AOabO66Mo01HOasciRrG+tXFPkrtlrIM6/mmu7MmxNMD4ml3GMn3b9e3mZvx2lmlGnoYvZbs04y8sqOknDP1asHuA3lmGNGkEyKblHxeLA4qk8aqHa+KGsnrpD+uNei9Ne41Am46Ma55nqTWTeUnuWCajurH28XP369+HKP17MYpVisvFnJCAmb8s3KPol8qlldJNJO082/Eb5WLnXy2CeU5Dt30sInonDDqppeJgYgDr61p/WzVk3VhSTvpv0nrmQUcu1BQmbFtWa2dujW8tfdtn60aYH2VEqXUL+rG+QPtiJqQrVgCTexTmwrpoKORX76vvnxiysgrDz3NoGbMuUisOmNSwEdTiRF+yJNJHL6mHblJiHBtEIzFFoWErJqF5b59LfCyFuRcIKDTV2/t0rIuQhCJqvXKfUQf9PJqkFS0j2eo6ZjF1WvRTz5GNUtGJmr5xuapxtV2rbiEtp1jK+VcfztC042m1Wyzm1cquH+idZVAXGsgPzfBAKtTeT2/cJ2U8o7lVsxXpPY1FkOsnzQWr7a3LJclC5f4YSxI6XclJZtiWVbBjliyoagyttcseW+3ClLtjkacs5fx1qrJV6Ph9iDjqliuZYhYjeDRzqPOXXDXzFZgap+jzGJHeXmz0ThhKBVy6MpaxOn/5xronkrdxFAtrrRgku2YpTRlfrVuW2ixikFIDJjNU+N25XnmeoByz0tJ6otbGMryxLqPPc1j3qN7XZcXUvEuuTimEzI1VAXBBPjN8LNV9nqOfXxGj6J2bVGQuhsG6HJVJt+YelTku2tT6DY1A6MPOaxJ1eet+hH5ogBzcLhuTZE1o2yw7kzVoKXytAJNlf1rjVyp2/Ch9/7LFdv2iXR3zEHemc/4T/W6LZZw0M5/9Qe8sg0LSP3Xmga0HDrQfKlAKiGkuuTJaRrVom4mMSZf0sXLftEyZNQJM8Fhbk0rbF1vUI53iUI7V5smt056Y8UvH+FtzYyyoGVadXUp9qayjdj8nGLRbxmLoGDDsPIf6hf1Cb4Uh+6PmC2/rwNYEtKleelUXBbAxgFHJLe2m1/O17JJYL0yq+8k9MjSsi2JjAEMoyUSR1dE4xo5X/W5U46/6bOWsoN9yuZCESntdQ9dWVDAzfbaeh9Xy6i7mDBOM1bME3DJMhNKbLc2w/ZaJIpmCDu0umSlydJrdluIXRNFtXXLgl7VnuXCUTE2ndaEKSGTI2Kjpf5vBC60bVGvl99fzhKSdrcItzxPYXun8dI9/IFhnLkb6+ccfhy2cFdbNtFkIezEP/UIvhSH741lLM/nMWcWQyBNrGLEVLFsthrrd7MnWJj/1A22tmu4X9LNblZkm+Sp19aQ9A/1kXkDz7d551Na0mDqWvuR22+M3LXWNv2TQNw4GchSAc0WwuWRoHUBpvYDsIhX0C99Ue+/CMCHaD9e4ofVDK/z4NPHWh7UNwD4gFO0nYTIMNxH9WKB+wJl+pNeRUpT0ymK8afwxCFBXq8wG2RZKVgv/shVDDKdvX8P9lUeefMGeR735OYPl2F8GeKeI/KI1ftN4Frx6/N30Tfa5N+hlNsmmTUvfPD9gtQoyELJprhkAl5DcAAQJp+Sf7pP4ABpR6RegARp1bwAMRNCgKSNHxBfGik3s20CAJh5SEUEDYiCD0F7DSB+7gzic5F7F2LL5ylZB3Q/182smq90rlJYiuW9Un15/TKucv8KNYWmBk0uXDRQAYPfHv+VnAN7Gyz79rltvvfo5Ar4akN9otSvmmQja5zkMnUjg550MsIjonTCodqpThuEhVl/WK/J9kcFLVvzqiZctRl8nwR3fO/NZDfkPAPawv+1stXHgoVKTFqvQquGZ909Zhq3bCg20nRFdtbfVbdQTPlfSoNcfeeJGAGcDOHvNhac+enrz5tcAeD6I7bJBZv4RRxpraS1xvD4gzhsxbYuCHrpJAUUQiZJhwrTLj1cM8PidHnlCbwUBAHY54lWf3QZTvwXw3mIRjKVWjR+S2bMui83ORDOSNH62LlX8US+wpDbQpp+JTDSmlUe++Qd7HfP2P3zQDsv3JnESBrI6WRXY52TGFccekwCXL1ux/OTJZnDLobfCYJlGH1bOrRPbYPCyqK16jxW//oqrReQdaceChV2Vlayv1V20wpIzNe0t1imu0HbrDI5Y+aD5Q0l/Bvn/Fb9+8m0PedIpf7vn0ThABoNnDAbytYGgDr5SmyHukR8OZPnxuz3ulHUTE9pC6J2bBFgBqLQYwjMeiKzZ4dATLl6s/s0Kg8GXsXnzaXY7Q86QxVcbA5hFwZS7l2w8UuRg/P2EDs2cnB99b6xL9q80tprZoX2RUxoAXwDwhTXffOdB4KaXNoJnCvFwggMBbqHwsoFMfWyPJ77jbBGZzARtYfROGHIwVgbNsMqTzZWL1b/ZYped97n69ttuSNo+Zb8sD9s4oQqaS7+7nVGzP0SSMgxUwULaYJrXXtBqQwPgqTmMc+Uxb70KwF8C+Evy01Nrv3PDg1Y+4aS7c4l3zqH1hUXvhCEHY5LSg1ZrRWF5xOL1cHa4484bDwQqYU/8rtZCzPuK55N1rDcsmveq7VXSxG4OrNYetE0jXNkNmx+InDgN4O6xBXuCXsYMumpbup7GOSD2vOeycw9bnN7NDpxujq1TqcV9k0FTza1uDQDjd+vH4b8P0ZVOtSv3qZ0ixs4BeNPfrzZaUPROGAjdPm1z7jFzYnKCmzZv+ih58TaL2NWJced/f/hhEJySkzwE2ahfksacgmEto7FDlTmymRnNAtmNfe3vUGqXSxYkLQNk+oPeccWWQe+GrcFg6xAITTAZ/ODD1l16zYXrrvjXXrtMt3/3w0+fnua3Se4AMeMxatmurXSe5zDp1tEruznOsOeobZiRDvVkf9TQD0KxVC1D72KGYq9QYdhZfIzlHoeNvPzOH599+YD4UUPcG+52PU0WL1omPPgGAwzCCrQt3yCrixaHNGV7kePYxHPJkN0AHt6Q+9eZxjgAWOFQt6Uc/xDYclWMYTNxxepa3aLWbxojEMYyL0H0ThhEhARj0qRMHwKAphjzQXNMgTi0IQ/NUWdO06TtDFJnaZC0LRC2YrQCUyHQ0DBIvTJu2mpyJiexs7o3sUshEcaU94cZV7IKQG5ftJlyN6xqcEs/9yuPPf8+gw2200Qbt0nnuIcbhrYgeucmAbxZGcBmWbr385v0a3xNK7PMQjRsP325YxRITrQykAqRlIyXBKHKBqW3sf8pFlCrwZJ5ad4n8vZanTFKWaGyf7aiHVMxfhtzVP0p0riBxj1YguihMMjqasUtatC4a6ZwLewCBIoAW5GyJAXTZCFT5m9ZDTFFjb9eaO+aEVUSbJamzulLLmK7mgNdtAsDKQYY9/sQdXUmpo9lbSrVHAgpxr8Ml2IJon/CIPwOKo2VGDo961L76aXWEU5jMVraG5ZRkBnGFLCp0EJ7VylQvdE6wpmaLIUwa2+grZ2RNH6x76jrPqvxY8j4K7PY1S4RKw/k3j12PfgKLEH0TxiWDf4JQPanJT/kcj9/1mjhk2Fm5IcrRamS6aR4rc5VMweSyuStOMHk+nO3jJtVUB5HP/ejGL8Zu6ASCqTlB2P90A7MzRs7f+3zHAIh/mVr2fM13+idMKw46IQrIfJV/aza12qx/M1tWdOmbQ6tYDPHFtmHNlYlMU739mhtM+f1kbdEmBNp9oipHspJbRsBSdobVisPsQB6LcVASDFMbaFK+qa+WtQUw0RXy1i7MGYByGbZsmUfmMnzeiChd8IAAMsFr6TI3WkV2mhmoO0bD9Ps2fbHckY71lq5y9Kw0p4jfx/CWLLklmg5bUPXTkxf602idoy5n5KE2FodmL5VoUoxJi1l2x6yE/a03Y48+fJWM0sEvRSG7R954k1TkJeLJvOtZi60eaVVrU+efPXMmDTasStWyP537XMbTd7hz2tsmtusBqSamerMmfMIhqbNapXnOZjbN/FO8Yocv7SzU5mWtSK2rIAXrRwcecqQR7Ik0EthAICdDj3xnCnI74OYznwhLfVnGaxBs5gAABImSURBVLvI0FiOTNuh27ozcHKTi1nrIZUVyWajuJYXvsRoWrQK55igkpbC/cuCWQTDRf9LobULb10HhVDXLw0GQKwaLN/+d+Toozd3TNCSQRd39ArrL/3Xp2xm81E03BsVcwLMz9wyGYHiiXdYhNbhehNYqgtt65bxCRDNU263I9uV3ieL0EE/DyDVS2OMzFyvT9R9yzxfJheK8VcWIbZPkGftIfv+mRz90vuwxNF7YQAAXvfpndet3/TXEHkpyW0Ds9jgUUqmSQFuZMJKQ5Y+vxWCwNB2D5Th4sS0liGzcNbBL+P/VSxTl6vaBczh+uQWiul/GSTb9nOyQMvbHFtWFFFxXD4lg1evPPqt3xo190sJW4UwKNZf+sk9N7H5kwHlhU3THICklQMk+c2lhrTasLXa2j44kF6tP5/udmhYjRvK9lEwJKp6Zbtd11LN1E6m331GQWwd05Zx4+4F+XVM4UN7HPmWr/f1xNliYasSBosNl3xi703EURAe0FBWCqdXArIcaMAGkBgNsbFatEl8Z4UoMH7TzdC652iAGM7nDXtNukzA/r5xsafP8lu12S/RaVL1FkMPrRPoDgA0rU2EQfwEuIvk2oHg5kbwX3vs/oiLl+oagsPhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOB4okHEFSK4EsFZEuAX64+g5SA4A7Bg/bhSR+xapH8v0vYhsXmhizyP5XZINyScuKLE5gOSxJK+Nf89b7P4oSP4ZyVXx71GL3Z9hILmc5Mb4d94E5Q9hxt9V7Zy4sL0t+nFX7MNd89XmshH31gE4Ir7/YwDfGNGxnQAcNce+XCIiN82i3g4ADojvV3QVILkzgCNn27EK/yEi905Q7kDkOdl5nmgvFLaJr1MTlJ0276cAgORhAM4G8CskHyoifzPP/dsiGCUMXwHwEwCPAvAMkg8RkZuHlN0fwBfm2JdXAPjIHNsYhodj7v1TPBTA6nlqa2tESxgA3AJgp/j+NJJXi8jntmy35o6hwiAiJPkeAP8cy70cwDu2VMdqRB9RzfhFIvLXi9WXrQ0kXwdgmKs7MO+PIPmlIeUuE5GT0CEMInIzyeMBfBshnvgEyceLyCVz7PoWxSjLAACfAvAuAPsAeDnJU0VkekydCwD8y4T0nwJgUj9TADw9vh/mphxM8pjq2m0AbgDwghFtvwyZWd4D4Icjyq4Z088+4v8gz90o7DGinLp6XZYBIvIjki9AUFgPAvCvJA8XkQ2z6O+iIAkDyUcCeHRHmUsQhGEdgD8iqYPbKCLndJS/QkQ+Ognx6MvPZ9D1uvhn8WUROQ5BsIf1wwbe54jI9+exTzMCySkEZpoJNorI/SPur0FQCF0QBDcXCErmliHlfh5fbfZo26IhkS9Gb+IkAAcD+ACCR7FVwFqG4wCMcj0OAXCm+XwngC5h2Bqxn3n/00XrRcARAP5zhnX+GsCbht0UkTcAeEPXPZLLAaggfUNEjh9Dy1rlLqF9K4AnIyhWkhyISDOmzV5gnJs0Z5A8DsH1AICTFziw+hcAF1bXJslQ7RtfNwG4dV579MCDdXtawiAim0i+EMBBIvL5cY2RvBnAXnPozwqSs1kDWyciRZbPCsPnAFw7poEdAZwV6/3XhERXIJhMYOFTjBeJyFnDbpJ8GoDdqsvbANglvl8P4IVD5vbnIvLNjja/DOBXOspbOv9GctTi1NNF5IqO6z8EcNmQOrsBeNqINhcEIjJNciOA5RjizonIlQCu3KIdmwfYVbyrAVw9qjDJk0yd94wq21O8E8DhI+7vguHB/9cAtIQBwC8jpFtH4SFj7i8fcv2cYTl7kodjjDBEDf1rY2jbtYVDSP7tmPIWB05Y/mIR+fSYMhvRtuqjcDRC36cBrJpBvd8EsH3XjYndpLiw9hfx4w+7tOQSxU+RtydYrEReBPwZysCzvr9QW12OB/DcGZR/GPIzngQPmbD8xwCME4bbReTJkxKOK88rANwzw3rXIYyzhZnEDG9ANv1bzCrEAG9n5FVSANg27pkCStdrJ3Pd4vYqJbwWwHMmIC/otga5QMhUtUDynwC8NH58ep1zJ/lhhJX9hQSxMIJm97RN0v4DJ4COJlmzFZcC+LcF61EbxyCshlscj+5A9/T4V+NQhNV0xf0i8q1xhEmO3cg4AruY97d33LfuyYJYBhF5PoDnd92LG+5WisgvZtouya8DeBKCi7J8a8kWjcNgXAGSDwLwCQTNPA3gDxd8l+AWBskjSL4q/u0xT83uat53CYOd+8VgpicCuIXkzST/ZIZ1dc1hCuU4AcxZiSwaJrEMpyNng04XkYtnSMM+9NlowJ8D+OQs6lncOeb+7wJ4c3z/A8xPelUtw0YRuafj/oJbhjH4/fi6F0avuHfB7lHbE8HtBACQfDiAz5N8L4CzxywG9gojhYHkq5H92isBnDILGtaHXzfTyiLyYwAvnAXdxYYKQ5dVAEphWDDLQHJvhB0EFssAPDO+vzWW+40xTU2LyPfi+5+b63ugTP8+DWGB9qMInsQ/z6Lbi4KhwkDyWQDOMJc+O8uDHDateMcs6o9E3EP/9vjxlSJy0XzTmCXGCcOWcpNeitEbLPfAZCveGxC2ywOlMOxZlfud+DoNYNimv16iUxhIPgFhf7p9YCeT3BXAn4vIxhnQWFBhQGC6Q+L7IsVJcmqCjYXzjpgBU8a5bUgxaxm2thjMLs6mNCXJ7ZHPcFwoIsPG3ku0hIHkbwL4IoDtOsq/CsCjSZ4gIv8zIQ0rDMO05EQgeSiA0xDOPXx5VCBPci8A15H8EYBTReTf50J7hphkzHbuF1Jgz0a5W+DpAP48vj8TwGcnbMf28Yr4eQrAI8z1o5D5Zus+z0DyWACfQV5m32De/whhK/ARAH5A8vki8h8T0Pil+Ho/SvM6GzwT4WE+HSEbMmoN4NkIfX88ZhGrzBF2lXvYtgS7brJgwiAi1wO4HgBIbgPgQ/HWzwC8YUhwP67N+0leC+AglMJgdyBvvcJA8rkIWxH0IZ2FsFfntfHzqwG8BOFE2u4Azif5VhF59xgaqiWvmgeX5ffi61qEcxOjoA/mFxjvE1vG3DSLftU4wrz/7pAyVhHNB81J8AqE46gA8JcqCDGdrJb+cyIyyVnynyAIw8Gxjd0AaL3/FpGZ7v5dSfKaGZRXl3jHGdarkwkJy4CQZ0dIX2qM8H4ReX1MjymmReSVJO8E8MZY9gmjqJLcE8CD48eujWgTg+S+AA6LH88bJVgkH2L6dt4Ei0J7m/eTun+j8FjzfpgwzLcAjgTJ/QCcGj/+F4L7pBDk/VG2X6PwPQTruwvJAxEUlbpIk7peFlMIx3NnisEs67Wg2ula5Fz3X4nIKcMqiMhJUSBOQtA0o/BM8/7S2XYy4sXm/WfGlH02smBPYq51o916EVk7suQYxAWnx8SPPxWRYa6hZbqZJCRm06cphIXTnRGe85/Pw1f/2C+IeDxyCn4DglcxU0xjZopoPwQhJoAbZ1BvbwxJHC0DABG5neT/RzCR7xvXmoicRvJTxhTegLA8DwRfVPFs837bGMwCwFtE5EsAzkU4SQeMsBxxv9Eb48c7MPqbOrZDcOkA4C6M2VsUocKweoKy43AQ8ga8YVYBKIVhoRemHobSin+12qZuV4yPJ9kV9H9cRF5rPv8QITmwK8JWHZ3Df5ylQlkjIuN2/yaYjXp3z7DeRBv1niciP+sq1AURWW3er0fFoDENe1T8uBbAdcjbiXeJ9W7CZIdvTkFmsPeLyCi34lTkFfNPjimrwqO58mFHI2eCx5n3o4RBtxE34/o4V4jINSTXICyACsp9UzW2GXJ/B/tBRBqS3wLwLAQFAASh3hq39gMozzNMLAgT4hmm/fMxy4wJyd2Rz9H+FN0b8RRHIQf8tyBvsRiFY5A143wIg10tH3UASv3rLfWNdK9BGRtZ7IS8u+BShC3XNbrc3G8gCIPiYyPcwmF4OcJcbMl52AEdazsLeezTMsVHMCKKHwURWRsPqXwcwJs7vsDrPxB2Zu4E4O+RY4U/FZFJFvnsNupxGaqRiIGkfsvGjQC+M6K4Wob1c6E5KUYdromJjlPix2smcZUjbJZuM4DiIBLJhwE4JLrEw/q1RVepRaTeAZ2wIMIQmVeZ4ocicgHJF42psw2Ah4nIVfU9Efk3klcD+HHHvetI/g9CWli/reE8ETm3g8xzELTQ5khzP+TtAzcC+Hy8/iwA3xeRG0nq6vYk+fhXIluZM8dksdTt2CLCMFfUq/kxKD/NFLlWRGrL+miEI68XAThhNtvFtyTmXRgig/29uTTpVw3uDeBKklei44sDhn0hVUyjnouQ0QBC0Ny5JbnjYb0e2ZJ8MJ7vfRmAf0TY3vy0uFFwLEhuC+AP4sf7MT6jon75uB21WwI2HtiP5OsRviRhH/N6FYDfNuXeC+BY8/lgko8TEesaaqD6BCxwxmw+MK/CENcCvon8oD875LuVuqDnCA7GhHljko9DSLPqKvcGAC8a8TWYtu7bAfxZ/HgPgLNiWvRYBAH5JQAXkvy9SQ4CIVgdPQn46VEZFZIrkK3Ygu7fIflQBDdy1/i3W8d7m9k6HN3nxNPCFslXIG/pAIK/vx1CvGYX7B4ZX6+d0GXtL0i+lxm/PqbsISRvMOV/Flcl9f6LzL0Xd9R/lrk/css2yQHDQZz7TZ2bST52VL1YV0i+jyXeYe5Pkfxnc+++6DaNanMnktfNYK6eZsr+U3XvN8y9huT0iD/FaSNoHcHZ4R6Sl5P8CskzSb4ktvdUhm/sVrye5NtMf3/b0L4sXj97WP9mCy7At3CPIzhWGBiY609J3mvK3sLsa2s5Kwz1t96B5PvN/cfU92OZFSRfy5LxSPJSBqs0bjyHkvx8VbeVCoxj+rAps5Hha2aGtfsxU/bbE/TjfFP+ZdU9KwyTYpQw7GbKbWJQGj8m+Q2SnyJ5Bsm/MWW+xpDBq9uZIvl2kptN2XfFezsyPHOSvIrk9iT3ZRAOMgrSfIJ9EwaSjyf5rerB3Eyy9T1CDBpFcTXJPyB5XPw7lUETkUHbP6iqewDJD5Bc18EIX2VwO0aN4zEkzzMPR/HOGYx/A8nf6ijzHFPmLoYMit7bPzLFrgzW4zCS55jy0wyHb2x7VhiuIPnFIX8XmnJDhSG2eVDsQ+dxTJJ7mrZaq/skf5nt5/yhqszx5t6VzAJ/77jnMxuwL8LAoG2+wja+wrB1uqutvVhaj2FobbVm0GI1LmZgxJHnuFlqPcVdJF87ql6sKyQ/WdU7zNzfm+Tt5v4Lq/pnjRnrX3XQtMJw0oi+HW7KjRSGCcY5VBhI/hLJteb+NMl3d807ydM6xrggJ93YI2EQlprpDpKvmaC9l3O0QFzKyr2K9Q5i8N1J8uskn9TV/hCahzL7uLczmPoHj6+Z6m9L8jux/mqS+5t7R5JcH+99vKPuiUPGuYHDGapXwhDvnxvv3cBw8GtUW+9kdqVuYYfLNR/gAgjDyG8xIPk2hAM9AHCciPzA3DsEYZHqQwhbJCbqVGTEX0H+cQsgrE7fCOD6Ybl5hi3m187mG7JJvhEhc/ZBEZnx2QaGvVHnIHwzyOrq3mMQvm36WBG5u7q3M8LB+50RthzfgbAt5SIR6fy2a4ZtLPorQ5eJSOf25DiPR8WPV4vI5TMdV0VTLfIqEXlTdX8lwhcKv7ke45D2DkZYY/h3EVmQ1DHz3qTWd6bOFnP6Sg+Sy2d4BNThmBcwxKVTCEcL5nQ8wOFwOBwOh8PhcDgcDofD4XA4HLPG/wL++QhYbLqZPgAAAABJRU5ErkJggg==',
  18547. e: 1
  18548. },
  18549. {
  18550. id: 'image_1',
  18551. w: 1080,
  18552. h: 3,
  18553. u: '',
  18554. p: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAAECAYAAABr549KAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAQPklEQVR4nO2bW44cx5WGvz8yq9gtkbQ1tmDIkAFiYMwDX7UBbcLrEbgebYIb0CsfBoJBwMIIguwZXXjprs44vx/ikpFZ1RQHMPykAJuVGXHucT0n44hfy7+12FZ/efZMfAE8gy+fPtVfAOp/z58/1+fAc+BzgEePxGfw4sVf9bSif318qD/X55fztXj5kidPnvDNt9/r0z/Bt99dF15/hPT9UQBp/lGaHnQZfj8dBPB/P74SH33ER8APP70SgKaD+A3o1Rs95jE/pzcFLxUcpbfl/c1c36faPgteI63vb4APlfT25iSA6wp7k05qcFdccaPSLk3idCeugNtU6Sehu9qedAROWsSptJ+U9IATpKTTXdLxAHdKOgBaFqGkOy2CIwctEgXvThJL1uFw4G7JkhbBAZRFhWFZxOGAliwkwQJKWiouwEFJzMAicSi/C0sxtKoOWWJemBeJQ1JrXlRokFPvG5HXsSIV2jlq3QytPQOEYEZacRYNtHIWU5UjF6ZT001SLkQKrUkrXsQqA6U+k5k0D7KFyBmYakXDmQjFKuM0jP1oPHLRbYe35QvQcBNZ1jQ2KdTEH+VkggivfACYReQzOHKls6GSBLn9Y6p2yVE1TcCG/gQRWgnWMklEVAQIvNONitfgmzxWkzGAFBWU0tZl6DLtbcZg51irCJImFdxo/1Z7jODyyn/TFNq8d/064k6W2DxO07Y9iI6dBrk71frQnyev/OPcnnH2UMvk0hcp3YPQGGZt9OmCJPZEpQv9+c4yzpX6HgHMWtvG310ZO6NVRWyrJG37fOy/Up/OaralaRqBOsC5+gOH9ywRVZhhBL0P+jjgEqSE3w34S/TSSs/2vn4cj+W3zd8YbLcRqeI3Wr8gx2iDcUxWW9ipyxQ7cc8oJ/kyv60GWPfY7HxKkOQiS9raZ6dCdP4rnR1XcrYvdeBa8k7+xGasJbvPmZxhqtCevdJs/M91DNutV7d9Je8tmil2nxLkyExMZMvjbElddnu1zSB/an23zuPETtZLfTHqCUCByVWeor49AUxTlSC8GZONd186qnxpqs/r+tNtlTNUvRvdsz7vsNHlal3ktI7VKdkZIKdhTo02Ks/TiLfh38Qe8G33+rzayGmVcaLwnRpgssvenVZchwHM1PHmFG62siczr3CVsqGcuDyF89JsM8MM3tgpDDPz1OgvcBde5vJuT4YFnDx3AWzugHmVyZ1/5VPEKHV3VUZgJlzFMY12k9dh5tk4fFd1Pxxm+1Rp2z558rHy9xzGs0+cOB5nc4LbQ/joMLfA8eCjZ5+4xT642/IYvnL4BiAOhfYt+Jh95aNvBn2uIpuro4nsjZ7xwPAaX1+ZN0AspT2uDK/hg8X8/BB/mE3cGeDRww/MT8DDxT/+CH5U6vkB/PihAT6qsH/P5df5seF7YvmNAeLjk/kf+OQPbw2f8s3fvmH55GMDPFneGuBr4M+nVwZ4ATx9+p/mK+Dnn/2c4p89Bz7//PvC/0vgxQvzRXXu+KL3q3T/+vtr+dcXbRzu9ynNKecLePYMvgC+fKp3OubAi+tzx/zlXBzwJwDzA3373T/0yR8/Ab6FdNR330Gaj9L0k2B1xouD/RE//PQ36T9+r98AP6XX0qtZpLeChyi91cOH8Or1JL2dxMNJenvbHPf0Nt3qmmvQSVLSjZK4PenqCm5vk0iTkHSlOxXnNOl0V54fqDjap1MSWsTxgFIk7iSUJak4xpJYFqGsRVM6QD14Zi06Fsf4kMUyI0UiSwtZM3N3rtWcP0UihzLSBGRJSJpz1jKHlGdR9+AJCYUySCFBVKc8isMkJ5iIcJpEqYtQdcQUFb/UF7xpmhThCudETGIKRRSchBQVHyRJStR2ORW+CCzZqTqHKSQlrAgEk1DlkSRZCSxkhZVSCkVYiUkoJCRcaRsVx1FClkIJWSSKDnIiJMsSStgiWW48HCJNRTaKnFiVJpJJCGEnqejiQIiKj0SFwbTASLgGHGpYBoNAzXEs9i3nyCRqnbGKh+jqKAqwcnE0Gq0yg1fnowcKAIdAuDrTogbXJGTjDlzajSksXbwGq/IPcBGZ5k80OdsbBg+Onlu9CHuArw1e8aNpg6Uib33tQrcgTDsXrbR6AKcdGJv9ql3UzmhlkHslusrZeseuJt3Yo/x6o+8eflV/ALBdTe069HfBTRqXLe1qaMImla4aAdTYVrm6bbfiuFkMrzoOtryg+14ul5Wnnd2q+dexdO5bNvac02tcPfLd8KvmbgRKN6jbcdV95a0N/oao+1joLdUYG3NUoLO+azpshnzlawmZrfoNSBdtuQ7ZLc0R5lyDOv629t/y25Bwnf8b2XQOWzgNdj3rlta3q601ot7Tv71xJ9Zm0Jzp1/n1cc34X1ejtY1khoW1tI0KDW3b50GfJpjHFa4Pm27zcbk9L7r4uFZcGvDrktbKao21B8UawelzW7buo3suY+8+1SV1lKrb1aA0LkV7+2mltVZXGQe6g/1dN7jNMrNyhbqc6EyVXuFB0DK1Rr0Y4UvdufrawfZ6b0EqPhsedTpXew/bzzjLBQSUg1eR0WO8ZJ2AG+HWBawu5tZ+W60TtEEONh8E3Om2Bg86n23/d75thRx4DjZJW7p9saj9MoowMBydtygzmjQ4/5Y2u1lqpyFc5U5NkK0OUgukbGypYROycNdl7MZy1Km7R5vPVQ411LbjVEQNNnSB3Q6/QQ65bUdmDblXvYbFUrJXeQ01vteDXB7w3bYaY4OTazSP1Ow/9r1to0Bysh3C2FHnUBQr2KQpJEdkSHJgmSRbDhY7TSmiHD6dqJE7K0hF9hK3VAlsJBkrqrBGKnFOO0pg1A4li4hwMtgp4TCRUnJyRJAM2SWQK5NwsYejjJvkEqSycxlPTlKAC2wZAU6O6LAk55xNarjJCZd3R2TsKSXnjFOFn5KCbJPsnGFKKRbK+0RypgSPphbMnMGOKAG4yfjOCzAzFZPZxor5avKyLODJnm3uCixzePZkKt0727Pr56spooRja8BqzuEWxLXNYQo7Sh+c4OiDbw9LlObwlY92ZN84fPUg/NZHXzmMj+bqle0HNYAU9vUD8yrb19kPP8x+9Qoc1z349Ojh4h/jQzsW88MP/PbxQ/PbO/O/8Pff3pl//A7XwFEsp/LbA0a/M8utX9Yh+mR56zFQRAsSwSZQxOefG74sQSKAv7xwiRF9wT5Y9D7lPT91/Fr+lWXRfiuuTvC8NIgRGoav8gAcpBYoAUm5BiEAhq+426/gLbhRv4xG6OLXwQtlmiYufmL7BfQS3NjIMLQWOdpXlXJAsAhKcEP1C63rF8ROZQZFCdyMDqMqsVTf2m9ADF+he0mWAkHlkyZB5V/4KlLZpVTCGGo7Yz2zq3ogdSeT1i/uSeGscFanULZ/9W21C9T3yvGktnNMAjZfibWeuO4JbmxWgdDKwZdcgaZDYd6OinYJ3Aw21iBn1d3IBWmQTUG9qTDoJaMWLAjQGty46Imcl0ZLTfbCpb6cnyAvELiv5QzSlKDVemwWa99X83f77OQf9E4l+Gb1MVnItpNTUUttcg5E+mmNzcPofN4v/vbV53VtLFwgYu/H34Z/HeOsf97pr2F+NHusWg14rn/a2Q+VwJylfhrtvoA4Wz9pzVt5KqV7dBn/9gZoqu7gLtrlMs02LqxhjKhMlTpHmo4Xcdv4O5PVbZyk9c/teQPX1bmgWnNsL8ei9vYYNOyRtPfD2TmmA6kSZPF+4p5JvI70zr4tvbyjN96ll3Yw2veBi01NUjnFFtu6fxBqI+vd/df6f9fe+tSuNHyx/R69Gr0N3Xv07/v9Fu7SyBjGnM9CBT2WcWGeXphLdVtounijV9dusJ13MqoQ8a6trBcbDQYdtjK/e1xfXD/Oagb3e0d4Azv2l0BK6z7hqGeG8dZeQiTVerZrYueyrhsedRz3m7b/nE2hy+v6RtOu2KUNIHT5SpVgF6Tf2Wa1Q3PXJUVdr2VJXs+DYRQezw11nd/OgX7OS/Q1sY0Q9aiGh/HZbTIouhnTQ4yw/mzm3AjbDqEtKjfA9n7RVndIIs7tWmejUhUs2tlUVgn3WDg6ZF08tufKQNFh+8cfqaxZVYaoUhWYcNszo35IXD8sdQUShK31xme9QTXsteVmlol2G3n0HquvEf3cszqXqWnP4HAOH1zVfIR6XfDecuat1ruk0/tsSCPPpnSn0z/uThOUU3vWFFLOIXJoUvG1yo1tyk1soEBLMJdLNXP9k7Qsud/Q1tJ8uJlfy7+vvN/A+LX8S0r/gltvwTx7VgJTX365pqc8f/7x5gbMV4/+W5/xGXwGvPhrwX8KX399np4yP/hQn/6p1H373bX4Y3ke01PgY9qNGLg/RUW1XlNJT+HxT/z8qqYltBSV12/FI85SVN6kWR98AHp7ozc39fnmVlxf8/bmpDE9BUCadAXcKIkb0PWd4Iqr0125WQMo3QkegO6k9uX+tIgH0NM/Tqm83y2CpLsl6XAALYtODUZJl9JTOMBhSVq0aObAUusgq6ScHJBygV2SOMwlrWTJXZ6ZrBKA+YXUlFaUtNTGXldTVC6mp0BNUanpKT3A1OqgpagsGupaegr0jailp2SVwFiu2J1lSGsES1tZOtt9SsSF1BRgs/lfTE3Z4hb+F1JUpjSkbtClRtrZYuqktukLVacYYSlXctsGTZT0m1wJTlKO4XpwwLRPMRl1amXcdINdWkr9HhUD/8ovZKVdqsc+PWWq+jduU8nbuLyWlxtY27qpBzmHS+NV3iGVprAvn2nq5XyV7IIyYlpay/hW6NNvQU8b/tv8hijRx67vHqoFPc/rU8VdbRpwzmbyZZtskBq8z+WMy1f+pQs2hWEc3MdoKBrn1yV5GG707xOEUhkQ7TCYUn++lL5wAbs+t1SVcUqsAK0+lvXQusk9+OW8lXeXLv97onf+PdnAlz/RvEdqyMiv5VTs0EebEambuaeKtK7oqSvv4O72hTou8xvfZ3mdZxBkEhOWPeof0VIldsZLieY7v5f+Z6kSiZRGbarsiXMDeJ8aU2TqYMneZt+kjV2d7a08aWfANQSXWnpJSoZM5Pa86alKYrhN0Pj7PB2lfvVlX59J7hkRdTFLljtUKvYnjakrlBsLbZ/qPNJZX6Se/lOFy2OocUix2CBpczskB0zthsQ0DWkNsEnv2KSoDO9AsrzNhGv09jQq/55xs5XNQ0rOxET5Ul745RG223vl1VNVSl4L/GKqSktVWnw5VSXt7JDXNJVmo3nGy4rT0lRKCgn0NJWZ+r1x8gwsU5RxsZS7B8xzE6vSCjPNkKlpKiVFpcEtlPSiZZrM8v9MVZnnloFS6oZUFTjZntY0lXkyS0lTubPNPBmHD7bhgKn1wGFuNw9mw4mTZx8BjuWWABH2MYxr+olnw225PdDSVKLcGOAGbo4Fzi43AUqayg320VcPcrlNAGzSVGqKymtnf8CHXExR4SGuOC1NxbEYHuO8+H1SVIDLaSpAS1X55m+wfPLaT3jCy5cvefLpH0r7n1+ZF9s0la/4is9+/q/LNxDuuX3wa5rKv6/8EycY65bo+YM2AAAAAElFTkSuQmCC',
  18555. e: 1
  18556. }
  18557. ],
  18558. layers = [
  18559. {
  18560. ddd: 0,
  18561. ind: 1,
  18562. ty: 2,
  18563. nm: '加载视频@3x.png',
  18564. cl: 'png',
  18565. refId: 'image_0',
  18566. sr: 1,
  18567. ks: {
  18568. o: { a: 0, k: 100, ix: 11 },
  18569. r: { a: 0, k: 0, ix: 10 },
  18570. p: { a: 0, k: [1218, 562, 0], ix: 2 },
  18571. a: { a: 0, k: [97.5, 132, 0], ix: 1 },
  18572. s: { a: 0, k: [100, 100, 100], ix: 6 }
  18573. },
  18574. ao: 0,
  18575. ip: 0,
  18576. op: 300,
  18577. st: 0,
  18578. bm: 0
  18579. },
  18580. {
  18581. ddd: 0,
  18582. ind: 2,
  18583. ty: 2,
  18584. nm: '进度条@3x.png',
  18585. cl: 'png',
  18586. refId: 'image_1',
  18587. sr: 1,
  18588. ks: {
  18589. o: {
  18590. a: 1,
  18591. k: [
  18592. {
  18593. i: { x: [0.667], y: [1] },
  18594. o: { x: [0.333], y: [0] },
  18595. t: 60,
  18596. s: [100],
  18597. e: [0]
  18598. },
  18599. {
  18600. i: { x: [0.667], y: [1] },
  18601. o: { x: [0.333], y: [0] },
  18602. t: 61,
  18603. s: [0],
  18604. e: [0]
  18605. },
  18606. { t: 120 }
  18607. ],
  18608. ix: 11
  18609. },
  18610. r: { a: 0, k: 0, ix: 10 },
  18611. p: { a: 0, k: [678, 587.5, 0], ix: 2 },
  18612. a: { a: 0, k: [0, 1.5, 0], ix: 1 },
  18613. s: {
  18614. a: 1,
  18615. k: [
  18616. {
  18617. i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
  18618. o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
  18619. t: 0,
  18620. s: [0, 100, 100],
  18621. e: [100, 100, 100]
  18622. },
  18623. { t: 60 }
  18624. ],
  18625. ix: 6
  18626. }
  18627. },
  18628. ao: 0,
  18629. ip: 0,
  18630. op: 300,
  18631. st: 0,
  18632. bm: 0
  18633. },
  18634. {
  18635. ddd: 0,
  18636. ind: 3,
  18637. ty: 2,
  18638. nm: '进度条@3x.png',
  18639. cl: 'png',
  18640. refId: 'image_1',
  18641. sr: 1,
  18642. ks: {
  18643. o: {
  18644. a: 1,
  18645. k: [
  18646. {
  18647. i: { x: [0.667], y: [1] },
  18648. o: { x: [0.333], y: [0] },
  18649. t: 0,
  18650. s: [0],
  18651. e: [0]
  18652. },
  18653. {
  18654. i: { x: [0.667], y: [1] },
  18655. o: { x: [0.333], y: [0] },
  18656. t: 60,
  18657. s: [0],
  18658. e: [100]
  18659. },
  18660. { t: 61 }
  18661. ],
  18662. ix: 11
  18663. },
  18664. r: { a: 0, k: 0, ix: 10 },
  18665. p: { a: 0, k: [1758, 589, 0], ix: 2 },
  18666. a: { a: 0, k: [1080, 3, 0], ix: 1 },
  18667. s: {
  18668. a: 1,
  18669. k: [
  18670. {
  18671. i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
  18672. o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
  18673. t: 60,
  18674. s: [100, 100, 100],
  18675. e: [100, 100, 100]
  18676. },
  18677. {
  18678. i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
  18679. o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
  18680. t: 61,
  18681. s: [100, 100, 100],
  18682. e: [0, 100, 100]
  18683. },
  18684. { t: 120 }
  18685. ],
  18686. ix: 6
  18687. }
  18688. },
  18689. ao: 0,
  18690. ip: 0,
  18691. op: 300,
  18692. st: 0,
  18693. bm: 0
  18694. }
  18695. ],
  18696. markers = [],
  18697. playLoadData = { v, fr, ip, op, w, h, nm, ddd, assets, layers, markers },
  18698. videoWrap = '_videoWrap_19uw7_1',
  18699. sectionAnimate$1 = '_sectionAnimate_19uw7_5',
  18700. controls$1 = '_controls_19uw7_11',
  18701. time$1 = '_time_19uw7_24',
  18702. line$1 = '_line_19uw7_36',
  18703. actions$1 = '_actions_19uw7_43',
  18704. actionWrap$1 = '_actionWrap_19uw7_51',
  18705. actionBtn$1 = '_actionBtn_19uw7_54',
  18706. iconReplay$1 = '_iconReplay_19uw7_65',
  18707. slider$1 = '_slider_19uw7_74',
  18708. styles$3 = {
  18709. videoWrap,
  18710. sectionAnimate: sectionAnimate$1,
  18711. controls: controls$1,
  18712. time: time$1,
  18713. line: line$1,
  18714. actions: actions$1,
  18715. actionWrap: actionWrap$1,
  18716. actionBtn: actionBtn$1,
  18717. iconReplay: iconReplay$1,
  18718. slider: slider$1
  18719. },
  18720. VideoPlay = defineComponent({
  18721. name: 'video-play',
  18722. props: {
  18723. item: { type: Object, default: () => ({}) },
  18724. isEmtry: { type: Boolean, default: !1 }
  18725. },
  18726. emits: ['loadedmetadata', 'togglePlay', 'ended', 'reset', 'error'],
  18727. setup(e, { emit: t, expose: r }) {
  18728. const { item: i, isEmtry: s } = toRefs(e),
  18729. a = reactive({
  18730. paused: !0,
  18731. currentTimeNum: 0,
  18732. currentTime: '00:00',
  18733. durationNum: 0,
  18734. duration: '00:00',
  18735. showBar: !0
  18736. }),
  18737. o = ref(),
  18738. n = ref(),
  18739. l = ref('video' + Date.now() + Math.floor(Math.random() * 100)),
  18740. f = p => {
  18741. if (p > 0) {
  18742. const x = Math.floor(p / 60),
  18743. u = p % 60;
  18744. return (x < 10 ? '0' + x : x) + ':' + (u < 10 ? '0' + u : u);
  18745. } else return '00:00';
  18746. },
  18747. g = () => {
  18748. n.value && (n.value.src(i.value.content), t('reset'));
  18749. },
  18750. S = p => {
  18751. a.showBar = p;
  18752. },
  18753. c = () => {
  18754. n.value && n.value.currentTime(0);
  18755. },
  18756. P = p => {
  18757. p == null || p.stopPropagation(),
  18758. a.paused
  18759. ? (n.value.play(), (a.paused = !1))
  18760. : (n.value.pause(), (a.paused = !0)),
  18761. t('togglePlay', a.paused);
  18762. };
  18763. onMounted(() => {
  18764. (n.value = TCPlayer(l.value, { appID: '', controls: !1 })),
  18765. n.value &&
  18766. (n.value.src(s.value ? '' : i.value.content),
  18767. n.value.one('loadedmetadata', () => {
  18768. console.log(' Loading metadata'),
  18769. (a.duration = f(Math.round(n.value.duration()))),
  18770. (a.durationNum = n.value.duration()),
  18771. t('loadedmetadata', n.value);
  18772. }),
  18773. n.value.on('timeupdate', () => {
  18774. var p;
  18775. (a.currentTime = f(
  18776. Math.round(
  18777. ((p = n.value) == null ? void 0 : p.currentTime()) || 0
  18778. )
  18779. )),
  18780. (a.currentTimeNum = n.value.currentTime());
  18781. }),
  18782. n.value.on('ended', () => {
  18783. (a.paused = !0), t('ended');
  18784. }),
  18785. n.value.on('pause', () => {
  18786. a.paused = !0;
  18787. }),
  18788. n.value.on('playing', () => {
  18789. a.paused = !1;
  18790. }),
  18791. n.value.on('error', p => {
  18792. t('error'), console.log(p, 'error');
  18793. }));
  18794. });
  18795. const d = () => {
  18796. n.value.currentTime(0), n.value.pause();
  18797. };
  18798. return (
  18799. onUnmounted(() => {
  18800. n.value && (n.value.pause(), n.value.src(''), n.value.dispose());
  18801. }),
  18802. r({ onPlay: g, stop: d, toggleHideControl: S }),
  18803. () =>
  18804. createVNode('div', { class: styles$3.videoWrap }, [
  18805. createVNode(
  18806. 'video',
  18807. {
  18808. style: { width: '100%', height: '100%' },
  18809. src: s.value ? '' : i.value.content,
  18810. ref: o,
  18811. id: l.value,
  18812. preload: 'auto',
  18813. playsinline: !0,
  18814. 'webkit-playsinline': !0
  18815. },
  18816. null
  18817. ),
  18818. createVNode(
  18819. 'div',
  18820. {
  18821. class: [
  18822. styles$3.controls,
  18823. a.showBar ? '' : styles$3.sectionAnimate
  18824. ],
  18825. onClick: p => {
  18826. p.stopPropagation(), t('reset');
  18827. }
  18828. },
  18829. [
  18830. createVNode('div', { class: styles$3.actions }, [
  18831. createVNode('div', { class: styles$3.actionWrap }, [
  18832. createVNode(
  18833. 'button',
  18834. { class: styles$3.actionBtn, onClick: P },
  18835. [
  18836. a.paused
  18837. ? createVNode(
  18838. 'img',
  18839. { class: styles$3.playIcon, src: iconplay },
  18840. null
  18841. )
  18842. : createVNode(
  18843. 'img',
  18844. { class: styles$3.playIcon, src: iconpause },
  18845. null
  18846. )
  18847. ]
  18848. )
  18849. ]),
  18850. createVNode('div', { class: styles$3.time }, [
  18851. createVNode(
  18852. 'div',
  18853. {
  18854. class: 'plyr__time plyr__time--current',
  18855. 'aria-label': 'Current time'
  18856. },
  18857. [a.currentTime]
  18858. ),
  18859. createVNode('span', { class: styles$3.line }, [
  18860. createTextVNode('/')
  18861. ]),
  18862. createVNode(
  18863. 'div',
  18864. {
  18865. class: 'plyr__time plyr__time--duration',
  18866. 'aria-label': 'Duration'
  18867. },
  18868. [a.duration]
  18869. )
  18870. ])
  18871. ]),
  18872. createVNode('div', { class: styles$3.slider }, [
  18873. createVNode(
  18874. NSlider,
  18875. {
  18876. value: a.currentTimeNum,
  18877. step: 0.01,
  18878. max: a.durationNum,
  18879. tooltip: !1,
  18880. 'onUpdate:value': p => {
  18881. n.value.currentTime(p),
  18882. (a.currentTimeNum = p),
  18883. (a.currentTime = f(Math.round(p || 0)));
  18884. }
  18885. },
  18886. null
  18887. )
  18888. ]),
  18889. createVNode('div', { class: styles$3.actions }, [
  18890. createVNode('div', { class: styles$3.actionWrap }, [
  18891. createVNode(
  18892. 'button',
  18893. { class: styles$3.iconReplay, onClick: c },
  18894. [createVNode('img', { src: iconReplay$2 }, null)]
  18895. )
  18896. ])
  18897. ])
  18898. ]
  18899. )
  18900. ])
  18901. );
  18902. }
  18903. }),
  18904. pen = '_pen_apyjn_1',
  18905. open = '_open_apyjn_9',
  18906. whiteboard = '_whiteboard_apyjn_12',
  18907. hide = '_hide_apyjn_15',
  18908. iframe = '_iframe_apyjn_18',
  18909. dely = '_dely_apyjn_24',
  18910. rightItem = '_rightItem_apyjn_27',
  18911. img = '_img_apyjn_42',
  18912. removeVisiable = '_removeVisiable_apyjn_50',
  18913. studentRemove = '_studentRemove_apyjn_56',
  18914. btnGroupModal = '_btnGroupModal_apyjn_68',
  18915. styles$2 = {
  18916. pen,
  18917. open,
  18918. whiteboard,
  18919. hide,
  18920. iframe,
  18921. dely,
  18922. rightItem,
  18923. img,
  18924. removeVisiable,
  18925. studentRemove,
  18926. btnGroupModal
  18927. },
  18928. Pen = defineComponent({
  18929. name: 'pen-page',
  18930. props: {
  18931. show: { type: Boolean, default: !1 },
  18932. type: { type: String, default: 'pen' },
  18933. close: { type: Function, default: () => ({}) }
  18934. },
  18935. setup(e) {
  18936. const { show: t, type: r } = toRefs(e),
  18937. i = reactive({
  18938. status: !1,
  18939. title: r.value === 'pen' ? '退出批注' : '退出白板',
  18940. content:
  18941. r.value === 'pen' ? '确认是否退出批注?' : '确认是否退出白板?'
  18942. }),
  18943. s = ref(!0),
  18944. a = /(localhost|192)/.test(location.host)
  18945. ? 'https://test.lexiaoya.cn/'
  18946. : location.origin,
  18947. o = ''.concat(a, '/classroom-whiteboard?t=').concat(+new Date());
  18948. return () =>
  18949. createVNode(
  18950. 'div',
  18951. {
  18952. class: [
  18953. styles$2.pen,
  18954. r.value === 'whiteboard' ? styles$2.whiteboard : '',
  18955. s.value ? styles$2.dely : '',
  18956. t.value ? styles$2.open : styles$2.hide
  18957. ]
  18958. },
  18959. [
  18960. createVNode(
  18961. 'iframe',
  18962. {
  18963. class: styles$2.iframe,
  18964. frameborder: '0',
  18965. width: '100vw',
  18966. height: '100vh',
  18967. src: o,
  18968. onLoad: () => {
  18969. s.value = !1;
  18970. }
  18971. },
  18972. null
  18973. ),
  18974. createVNode(
  18975. 'div',
  18976. { class: styles$2.rightItem, onClick: () => (i.status = !0) },
  18977. [
  18978. createVNode(
  18979. 'svg',
  18980. {
  18981. width: '28px',
  18982. height: '28px',
  18983. viewBox: '0 0 34 34',
  18984. version: '1.1',
  18985. xmlns: 'http://www.w3.org/2000/svg'
  18986. },
  18987. [
  18988. createVNode(
  18989. 'g',
  18990. {
  18991. stroke: 'none',
  18992. 'stroke-width': '1',
  18993. fill: 'none',
  18994. 'fill-rule': 'evenodd'
  18995. },
  18996. [
  18997. createVNode(
  18998. 'g',
  18999. {
  19000. transform: 'translate(-1842.000000, -1016.000000)',
  19001. stroke: '#FFFFFF'
  19002. },
  19003. [
  19004. createVNode(
  19005. 'g',
  19006. {
  19007. transform: 'translate(980.000000, 1006.000000)'
  19008. },
  19009. [
  19010. createVNode(
  19011. 'g',
  19012. {
  19013. transform:
  19014. 'translate(862.000000, 10.000000)'
  19015. },
  19016. [
  19017. createVNode(
  19018. 'g',
  19019. {
  19020. transform:
  19021. 'translate(4.000000, 5.000000)'
  19022. },
  19023. [
  19024. createVNode(
  19025. 'g',
  19026. {
  19027. transform:
  19028. 'translate(8.058241, 5.009812)',
  19029. fill: '#FFFFFF',
  19030. 'fill-rule': 'nonzero',
  19031. 'stroke-width': '0.3'
  19032. },
  19033. [
  19034. createVNode(
  19035. 'path',
  19036. {
  19037. d: 'M11.6084252,-0.15 C11.9880433,-0.15 12.3676614,-0.00518057514 12.6573002,0.284458275 L12.6573002,0.284458275 L18.3141545,5.94131252 C18.6037933,6.23095137 18.7486128,6.61056948 18.7486128,6.99018758 C18.7486128,7.36980569 18.6037933,7.74942379 18.3141545,8.03906264 L18.3141545,8.03906264 L12.6573002,13.6959169 C12.3676614,13.9855557 11.9880433,14.1303752 11.6084252,14.1303752 C11.2288071,14.1303752 10.849189,13.9855557 10.5595501,13.6959169 C10.2699113,13.406278 10.1250918,13.0266599 10.1250918,12.6470418 C10.1250918,12.2674237 10.2699113,11.8878056 10.5595368,11.5981801 L10.5595368,11.5981801 L13.6839174,8.47301484 L1.33333333,8.47352092 C0.923722144,8.47352092 0.552888811,8.30749318 0.284458275,8.03906264 C0.0160277386,7.77063211 -0.15,7.39979877 -0.15,6.99018758 C-0.15,6.61194961 -0.00841906355,6.26678575 0.224608408,6.00476938 C0.462154637,5.73767211 0.794779811,5.55707713 1.16932931,5.51583101 L1.16932931,5.51583101 L13.6841044,5.50627626 L10.5595501,2.38220839 C10.2699113,2.09256954 10.1250918,1.71295144 10.1250918,1.33333333 C10.1250918,0.953715229 10.2699113,0.574097124 10.5595501,0.284458275 C10.849189,-0.00518057514 11.2288071,-0.15 11.6084252,-0.15 Z'
  19038. },
  19039. null
  19040. )
  19041. ]
  19042. ),
  19043. createVNode(
  19044. 'path',
  19045. {
  19046. d: 'M15,24 L3,24 C1.34314575,24 -1.1293615e-15,22.6568542 0,21 L0,3 C-2.02906125e-16,1.34314575 1.34314575,3.04359188e-16 3,0 L15,0 L15,0',
  19047. 'stroke-width': '3.5',
  19048. 'stroke-linecap': 'round',
  19049. 'stroke-linejoin': 'round'
  19050. },
  19051. null
  19052. )
  19053. ]
  19054. )
  19055. ]
  19056. )
  19057. ]
  19058. )
  19059. ]
  19060. )
  19061. ]
  19062. )
  19063. ]
  19064. )
  19065. ]
  19066. ),
  19067. createVNode(
  19068. NModal,
  19069. {
  19070. transformOrigin: 'center',
  19071. show: i.status,
  19072. 'onUpdate:show': n => (i.status = n),
  19073. preset: 'card',
  19074. title: i.title,
  19075. class: ['modalTitle', styles$2.removeVisiable]
  19076. },
  19077. {
  19078. default: () => [
  19079. createVNode('div', { class: styles$2.studentRemove }, [
  19080. createVNode('p', null, [i.content]),
  19081. createVNode(
  19082. NSpace,
  19083. { class: styles$2.btnGroupModal },
  19084. {
  19085. default: () => [
  19086. createVNode(
  19087. NButton,
  19088. {
  19089. type: 'default',
  19090. round: !0,
  19091. onClick: () => {
  19092. i.status = !1;
  19093. }
  19094. },
  19095. { default: () => [createTextVNode('取消')] }
  19096. ),
  19097. createVNode(
  19098. NButton,
  19099. {
  19100. type: 'primary',
  19101. round: !0,
  19102. onClick: () => {
  19103. (i.status = !1), e.close();
  19104. }
  19105. },
  19106. { default: () => [createTextVNode('确认')] }
  19107. )
  19108. ]
  19109. }
  19110. )
  19111. ])
  19112. ]
  19113. }
  19114. )
  19115. ]
  19116. );
  19117. }
  19118. }),
  19119. audioWrap = '_audioWrap_8oxfj_1',
  19120. audioContainer = '_audioContainer_8oxfj_6',
  19121. audio = '_audio_8oxfj_1',
  19122. tempVudio = '_tempVudio_8oxfj_22',
  19123. sectionAnimate = '_sectionAnimate_8oxfj_34',
  19124. controls = '_controls_8oxfj_40',
  19125. time = '_time_8oxfj_53',
  19126. line = '_line_8oxfj_65',
  19127. actions = '_actions_8oxfj_72',
  19128. actionWrap = '_actionWrap_8oxfj_80',
  19129. actionBtn = '_actionBtn_8oxfj_83',
  19130. iconReplay = '_iconReplay_8oxfj_95',
  19131. slider = '_slider_8oxfj_104',
  19132. styles$1 = {
  19133. audioWrap,
  19134. audioContainer,
  19135. audio,
  19136. tempVudio,
  19137. sectionAnimate,
  19138. controls,
  19139. time,
  19140. line,
  19141. actions,
  19142. actionWrap,
  19143. actionBtn,
  19144. iconReplay,
  19145. slider
  19146. },
  19147. AudioPay = defineComponent({
  19148. name: 'audio-play',
  19149. props: {
  19150. item: { type: Object, default: () => ({}) },
  19151. isEmtry: { type: Boolean, default: !1 }
  19152. },
  19153. emits: ['loadedmetadata', 'togglePlay', 'ended', 'reset'],
  19154. setup(e, { emit: t, expose: r }) {
  19155. const i = reactive({
  19156. paused: !0,
  19157. currentTimeNum: 0,
  19158. currentTime: '00:00',
  19159. durationNum: 0,
  19160. duration: '00:00',
  19161. showBar: !0,
  19162. afterMa3: !0
  19163. }),
  19164. s = ref(),
  19165. a = ref();
  19166. let o = null;
  19167. const n = p => {
  19168. var x, u, y;
  19169. console.log(p, 'e', p),
  19170. p == null || p.stopPropagation(),
  19171. a.value.paused
  19172. ? (l(a.value, s.value), a.value.play(), (i.afterMa3 = !1))
  19173. : (x = a.value) == null || x.pause(),
  19174. (i.paused = (u = a.value) == null ? void 0 : u.paused),
  19175. (y = p.target) == null || y.focus(),
  19176. t('togglePlay', i.paused);
  19177. },
  19178. l = (p, x) => {
  19179. o ||
  19180. ((o = new Vudio(p, x, {
  19181. effect: 'waveform',
  19182. accuracy: 256,
  19183. width: 1024,
  19184. height: 600,
  19185. waveform: {
  19186. maxHeight: 200,
  19187. color: [
  19188. [0, '#44D1FF'],
  19189. [0.5, '#44D1FF'],
  19190. [0.5, '#198CFE'],
  19191. [1, '#198CFE']
  19192. ],
  19193. prettify: !1
  19194. }
  19195. })),
  19196. o.dance());
  19197. },
  19198. f = p => {
  19199. if (p > 0) {
  19200. const x = Math.floor(p / 60),
  19201. u = p % 60;
  19202. return (x < 10 ? '0' + x : x) + ':' + (u < 10 ? '0' + u : u);
  19203. } else return '00:00';
  19204. },
  19205. g = p => {
  19206. i.showBar = p;
  19207. },
  19208. S = () => {
  19209. a.value && (a.value.currentTime = 0);
  19210. };
  19211. let c = null;
  19212. const P = ref(),
  19213. d = ref();
  19214. return (
  19215. nextTick(() => {
  19216. (c = new Vudio(d.value, P.value, {
  19217. effect: 'waveform',
  19218. accuracy: 256,
  19219. width: 1024,
  19220. height: 600,
  19221. waveform: {
  19222. maxHeight: 200,
  19223. color: [
  19224. [0, '#44D1FF'],
  19225. [0.5, '#44D1FF'],
  19226. [0.5, '#198CFE'],
  19227. [1, '#198CFE']
  19228. ],
  19229. prettify: !1
  19230. }
  19231. })),
  19232. c.dance();
  19233. }),
  19234. r({ toggleHideControl: g }),
  19235. () =>
  19236. createVNode('div', { class: styles$1.audioWrap }, [
  19237. createVNode('div', { class: styles$1.audioContainer }, [
  19238. createVNode(
  19239. 'audio',
  19240. {
  19241. ref: a,
  19242. crossorigin: 'anonymous',
  19243. src: e.item.content + '?time=1',
  19244. onEnded: () => {
  19245. (i.paused = !0), t('ended');
  19246. },
  19247. onTimeupdate: () => {
  19248. var p, x;
  19249. (i.currentTime = f(
  19250. Math.round(
  19251. ((p = a.value) == null ? void 0 : p.currentTime) || 0
  19252. )
  19253. )),
  19254. (i.currentTimeNum =
  19255. ((x = a.value) == null ? void 0 : x.currentTime) || 0);
  19256. },
  19257. onLoadedmetadata: () => {
  19258. var p, x;
  19259. (i.duration = f(
  19260. Math.round((p = a.value) == null ? void 0 : p.duration)
  19261. )),
  19262. (i.durationNum =
  19263. (x = a.value) == null ? void 0 : x.duration),
  19264. e.item.autoPlay && a.value && a.value.play(),
  19265. a.value &&
  19266. ((a.value.stop = () => {
  19267. var u;
  19268. (u = a.value) == null || u.pause(),
  19269. (i.paused = !0),
  19270. t('togglePlay', i.paused);
  19271. }),
  19272. (a.value.onPlay = () => {
  19273. var u;
  19274. (u = a.value) == null || u.play(),
  19275. (i.paused = !1),
  19276. l(a.value, s.value),
  19277. t('togglePlay', i.paused);
  19278. })),
  19279. t('loadedmetadata', a.value);
  19280. }
  19281. },
  19282. null
  19283. ),
  19284. createVNode('canvas', { ref: s }, null),
  19285. i.afterMa3 &&
  19286. createVNode('div', { class: styles$1.tempVudio }, [
  19287. createVNode('audio', { ref: d, src: tickMp3 }, null),
  19288. createVNode('canvas', { ref: P }, null)
  19289. ])
  19290. ]),
  19291. createVNode(
  19292. 'div',
  19293. {
  19294. class: [
  19295. styles$1.controls,
  19296. i.showBar ? '' : styles$1.sectionAnimate
  19297. ],
  19298. onClick: p => {
  19299. p.stopPropagation(), t('reset');
  19300. }
  19301. },
  19302. [
  19303. createVNode('div', { class: styles$1.actions }, [
  19304. createVNode('div', { class: styles$1.actionWrap }, [
  19305. createVNode(
  19306. 'div',
  19307. { class: styles$1.actionBtn, onClick: n },
  19308. [
  19309. i.paused
  19310. ? createVNode(
  19311. 'img',
  19312. { class: styles$1.playIcon, src: iconplay },
  19313. null
  19314. )
  19315. : createVNode(
  19316. 'img',
  19317. { class: styles$1.playIcon, src: iconpause },
  19318. null
  19319. )
  19320. ]
  19321. )
  19322. ]),
  19323. createVNode('div', { class: styles$1.time }, [
  19324. createVNode(
  19325. 'div',
  19326. {
  19327. class: 'plyr__time plyr__time--current',
  19328. 'aria-label': 'Current time'
  19329. },
  19330. [i.currentTime]
  19331. ),
  19332. createVNode('span', { class: styles$1.line }, [
  19333. createTextVNode('/')
  19334. ]),
  19335. createVNode(
  19336. 'div',
  19337. {
  19338. class: 'plyr__time plyr__time--duration',
  19339. 'aria-label': 'Duration'
  19340. },
  19341. [i.duration]
  19342. )
  19343. ])
  19344. ]),
  19345. createVNode('div', { class: styles$1.slider }, [
  19346. createVNode(
  19347. NSlider,
  19348. {
  19349. value: i.currentTimeNum,
  19350. step: 0.01,
  19351. max: i.durationNum,
  19352. tooltip: !1,
  19353. 'onUpdate:value': p => {
  19354. (a.value.currentTime = p),
  19355. (i.currentTimeNum = p),
  19356. (i.currentTime = f(Math.round(p || 0)));
  19357. }
  19358. },
  19359. null
  19360. )
  19361. ]),
  19362. createVNode('div', { class: styles$1.actions }, [
  19363. createVNode('div', { class: styles$1.actionWrap }, [
  19364. createVNode(
  19365. 'button',
  19366. { class: styles$1.iconReplay, onClick: S },
  19367. [createVNode('img', { src: iconReplay$2 }, null)]
  19368. )
  19369. ])
  19370. ])
  19371. ]
  19372. )
  19373. ])
  19374. );
  19375. }
  19376. }),
  19377. scrollBar = '_scrollBar_ds6lg_1',
  19378. treeParent = '_treeParent_ds6lg_5',
  19379. treeChild = '_treeChild_ds6lg_8',
  19380. treeItem = '_treeItem_ds6lg_11',
  19381. title = '_title_ds6lg_23',
  19382. dir = '_dir_ds6lg_33',
  19383. titleSelect = '_titleSelect_ds6lg_42',
  19384. arrow = '_arrow_ds6lg_50',
  19385. arrowSelect = '_arrowSelect_ds6lg_57',
  19386. childArrow = '_childArrow_ds6lg_61',
  19387. childItem = '_childItem_ds6lg_64',
  19388. childSelect = '_childSelect_ds6lg_71',
  19389. styles = {
  19390. scrollBar,
  19391. treeParent,
  19392. treeChild,
  19393. treeItem,
  19394. title,
  19395. dir,
  19396. titleSelect,
  19397. arrow,
  19398. arrowSelect,
  19399. childArrow,
  19400. childItem,
  19401. childSelect
  19402. },
  19403. Chapter = defineComponent({
  19404. name: 'chapter-modal',
  19405. props: {
  19406. treeList: { type: Array, default: () => [] },
  19407. itemActive: { type: String, default: '' }
  19408. },
  19409. emits: ['handleSelect'],
  19410. setup(e, { emit: t }) {
  19411. const r = useMessage(),
  19412. { treeList: i, itemActive: s } = toRefs(e),
  19413. a = (o, n, l = []) => {
  19414. for (const f of n) {
  19415. if (f.knowledgeList && f.knowledgeList.length > 0) {
  19416. const g = a(o, f.knowledgeList, [...l, f.id]);
  19417. if (g.includes(o)) return g;
  19418. }
  19419. if (f.id === o) return [...l, o];
  19420. }
  19421. return l;
  19422. };
  19423. return (
  19424. watch(
  19425. () => e.itemActive,
  19426. () => {
  19427. const o = a(s.value, i.value);
  19428. o.length > 0 &&
  19429. i.value.forEach(n => {
  19430. n.id == o[0] ? (n.selected = !0) : (n.selected = !1);
  19431. });
  19432. }
  19433. ),
  19434. onMounted(() => {
  19435. const o = a(s.value, i.value);
  19436. o.length > 0 &&
  19437. i.value.forEach(n => {
  19438. n.id == o[0] && (n.selected = !0);
  19439. });
  19440. }),
  19441. () =>
  19442. createVNode(
  19443. NScrollbar,
  19444. { class: styles.scrollBar },
  19445. {
  19446. default: () => [
  19447. createVNode('div', { class: [styles.listSection] }, [
  19448. i.value.map((o, n) =>
  19449. createVNode(
  19450. 'div',
  19451. { class: styles.treeParent, key: 'parent' + n },
  19452. [
  19453. createVNode(
  19454. 'div',
  19455. {
  19456. class: [styles.treeItem, styles.parentItem],
  19457. onClick: () => {
  19458. i.value.forEach(l => {
  19459. o.id !== l.id && (l.selected = !1);
  19460. }),
  19461. (o.selected = !o.selected);
  19462. }
  19463. },
  19464. [
  19465. o.knowledgeList &&
  19466. o.knowledgeList.length > 0 &&
  19467. createVNode(
  19468. 'span',
  19469. {
  19470. class: [
  19471. styles.arrow,
  19472. o.selected ? styles.arrowSelect : ''
  19473. ]
  19474. },
  19475. null
  19476. ),
  19477. createVNode(
  19478. 'p',
  19479. {
  19480. class: [
  19481. styles.title,
  19482. o.selected ? styles.titleSelect : ''
  19483. ]
  19484. },
  19485. [
  19486. createVNode(
  19487. 'span',
  19488. {
  19489. class: [
  19490. styles.dir,
  19491. o.selected ? styles.dirSelect : ''
  19492. ]
  19493. },
  19494. null
  19495. ),
  19496. o.name
  19497. ]
  19498. )
  19499. ]
  19500. ),
  19501. o.selected &&
  19502. o.knowledgeList &&
  19503. o.knowledgeList.map((l, f) =>
  19504. createVNode(
  19505. 'div',
  19506. {
  19507. key: 'child' + f,
  19508. class: [
  19509. styles.treeItem,
  19510. styles.childItem,
  19511. styles.animation,
  19512. s.value === l.id ? styles.childSelect : ''
  19513. ],
  19514. onClick: () => {
  19515. if (s.value != l.id) {
  19516. if (!l.containMaterial) {
  19517. r.error('该章节暂无课件');
  19518. return;
  19519. }
  19520. t('handleSelect', {
  19521. itemActive: l.id,
  19522. itemName: l.name
  19523. });
  19524. }
  19525. }
  19526. },
  19527. [
  19528. createVNode(
  19529. 'span',
  19530. { class: styles.childArrow },
  19531. null
  19532. ),
  19533. createVNode('p', { class: styles.title }, [
  19534. l.name
  19535. ])
  19536. ]
  19537. )
  19538. )
  19539. ]
  19540. )
  19541. )
  19542. ])
  19543. ]
  19544. }
  19545. )
  19546. );
  19547. }
  19548. }),
  19549. iconBeatIcon =
  19550. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAw1BMVEUAAADk9P/k8//l9f/n9f/l9P/l9P/l8//l9P/l9P/l8//l9P/m9P/o9v/o+P/q///k9P/l8//k9P/m9P/m8//l8//l9f/n9v/o8//p9P/////l9P/k8/8wmP/f8f94vf9HpP9gsP/M5/83nP/W6/+94P+Ryf9Cof9Tqv9Np/9xuf/Z7f99v/9ptf80mv/R6v88n//E4/+dz/+Ixf+i0v9XrP+t2P+Zzf9dr/+m1P+Nx/9ksv/i8v+33f+z2/+Bwf+43P+CkBr8AAAAHHRSTlMA+cdMSc777eG2mIpwKyAM0ca/jIOBalRCFwWp75BYaQAABSBJREFUaN7Vm+lyokAQgL3vK9FsstkeFAUv8L6iJjHv/1S7AsFSmO4Gcct8v6yKoZmZvqeNBaOSKhXyD7VcNh7P5moP+UIpVYndiGqqno6DD/F0PVWNWlq5kcgAQibRKEcn7XcpDQzSpd+RiHvJZ4BJJv9ytbhkAgKRSF4l7rkGgUk/h9eURwjFYzmcGRTjEJJ4MYSZpHJwBblUQHGvRbiS4msgD5aAq0lUAthCFiIgy7aQXxARv3jyniAynjjyChAhBVreH4iUP6z1/cc1PkHkPPH18/a6moSbkJT6lyzchGxF4j8Z/mxtNi8w1wwv5+9XGf76IHw4MDy5bzwCEkP4YgBJyifeMuJf219gmxEfq8iGIvT95PUBQmxqmZVPtPedS3GdfZuVdVzmOcHypb67MjaPF/kgIEQiEM6zRyT/jEpg7QqfpgyOAgcKIOAejp8zKV8LtSUcWuriiy81cZL3Akw+h14tHX6e3sYczUDOqdLJ8xY3bwlfWnNnmft/8j9ASt6t/1j12LYnpPS2cGR4XLHcmWe+68cSx+RVgaK2vyWOlyCj5AhMA8nHVLiMV8PdZrnc7IarsXCZfgBoA+vjp7SSc7wakGzcJ3dGSw1ctOWo477HxljZnxYgw/ZvDSB4N92zmiteVXLP9vhhtRFTuXNt8Ixw9L1rO8VXe3en/R5osNYJU6xSOroQNiMNJGjuK00AJVNluLWlsFlwXmrJcG91QNE7trJsCSt1vqYDSp00Cq1nq+AHaThjW3HsfccMAw/1TWExB5K5sGjigT8Wq+AbKizMS0PRfaKEYzz4plaI7PDNesbbO5xxtPDBxGOu9pdVIl8sMRY489PJIVwyYyyxFCuQJu999N6ycfAwtO0VLxfzmIqOLQ31bJ5qRUHwMLG/rwEWEx8wn33SGFrgSW82IOchViNVRucL1G0dQ3M3pKRQxpYpA18g9Kw9VZAiI5ZFUibbkhGBEj+BuKUs5mi6dvxGBEresYu5mjjl1owgAg17UzCBWUJneiAT2HYxwKVHaE0WUxorJVpJBJ6xd01vZfsEKTnMLFoy1zgQlwzx3T5Rwwx/KnNUPW/yfeYMp4jhI67Nfu6eVXm/nbnZHubaCsgZyhRgdilvqruKRpxhAQtPK+l5TMzRontiPjk/9xUSnpAA7EQbBQKg2CqEBeAKlfvNIAAzKqOsYEnU1vrvHQRgZ/3LFnE0WJqoEX0fqf5qaJpYJ9RUTIDNRBBKWsdT/QMSwJEU4YA3+aoZQgVaCltHW4SaZapEudaXhDc0gPapzkmDSt+nBrAwplRZ0LBLbnKPDsDiQJ5AmWwqbITFGhisybon7bZNqFPszBhOpkOabYnRGNKdeKcBgdYiK4vMb07rq+v0mSeEyfcFqdF5XnNv6PREdEDQe26qIeeF175UVk5LaIk0Hpz20ErhtS9jSaLMt5H1JmcjIRgFfpLdgm67WVpz4nN6Tbcr1Mb7Cfwmu6Ge2rFb4+wv21PLVsUd0rPnGgHvtrmM1e66rSmK1l531bFwMd8B4zHgRcm8I1A6c0CJl4NeBU1GmLwRFaWLIS67vlSZOPULCHLVUNd5enPqlTZt6kCSCnlhCcraPKtkBuZaAZoiciVLY+jL3cI0F7ulzozMidf7uHS+3bX6/QwO3GY04r6GP6Ifb7m/AZ5oR5TucwgrujGz+x2ki2ZU8L6HIa8e9/wJA61hR3Zrzz9pKDn42PVPHCznj85HTDUp/3FAkm8G//3nD38BdFFOVnOjvZkAAAAASUVORK5CYII=',
  19551. iconChange =
  19552. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAtFBMVEUAAADl8//k9P/l9f/n9f/l9P/l9P/l9P/m8//m9P/o+P/q///k9P/k8//l8//k9P/l9P/k9P/k8//m8//m9P/l9P/l9P/l9f/n9v/o8//o8//n+f/p9P/////l9P/k8/8wmP+02//Z7f+QyP82m/9+wP88nv9Vq//S6v/H5f/C4//h8v+t1/9fsP9Mpv+h0f+azv+Vy//d7//N6P+23P+n1f+e0P+Ixf9qtv9Fo/+73v+OyP+arTjPAAAAH3RSTlMAx/lMSc774YJwIAzR7uy/uLSYl4yLiWpUQiwqFwWpOo+15wAAA4hJREFUaN7Vm2tX4jAQhpPSK1SE5SIgOsilLTcBQS76///X7hoPXWCiaWhn6/P1PTmvkcwwmQwsGUXTq1W475QNo+z4vFLzzCLLiJJZtwxAMKy6WUrbreNyG77A5m4nPbeuZ4ECltdNxa5dtUERu9q+2q7AIRG8cJVdy4fEWC1tu/tb0OL2Xi8MmgZoYjQ1wsR04AocM6HdQwOupPGQKINxuBpeTBALN5ACN8oRcgcpcafm50JquCp+vyBFfn3v9wip8qi0P8I9upA6rvL5JDirBcgEaTwWbyATboqS/MkhIzieVxuQGQ3Mz4QMMZHvWwcyxLn8Rm5CpjQv6hcDUCaL1eCU5WwNn6xnyzNxtZgAinFe56D10nR56GGE2+kfcRui4mE5RSurs3oQEKKwJ+N5PH6WimEECKfVo4/5HXpyguAL8YA5+t/mtHlPm/l3GY4j+mvvCl6xfBP7tTU2qLHF+KZTRdS+WDlcRv1Txqvg+EGuxmditBwKqQ+XVI/3PxsLQLFwh0jjodCGY0TcCQ2T7C4TeICwEQufMG0ktBGmPQltg2keE1jowthQdp5ek66zhF8Hki3U10D0AVw6Q1cEIYlhHIolm87QLom0RmEYp7c6pWFdBAWFYRwYBqWhwVgRKA2hyExaQ5N5tIYeq9Ea1liF1rDCOK0hZz6toc8cWkOHlWkNy8ygNTTIDcn/peSHhjwsyANfK7W9Ce1NJ7VpJe++0PpaydvTMITBX2kAWl9Ppo4hbEajDegYmholRoxWicEMSkNDlIl0hpZOIRyjVwgXKA1NcZkhM7RL8XVNcscfQEIGYt0EFXl8IZVlk2A2hQRMZ0GchWQX0g6gHBttw1OCfQSfRPvgTDy220B65ZYGxkLe2XuBD17k/b2FJCgEnnyLOFv4YIur8g16cWMIYx3It/j1BoM1YNjduPWFIm+JziOAaC5vpgJKVdLci+nvZJschuFQtr1dH3Da7AiXH/PB6ISLvyA41QfyMOJaj06zc8MZqFJAWtAKLJDzr4SFNNmVWP3rtwJlWsgzghqT+fGwTkCZW+ShRN3yfR+G+/cJqGPcUz8F/f/Hroyf8/LwYJnpk2w+Hp2ze1bPz+BANqMR+Rr+SH+8JX8DPOmOKOVzCCu9MbP8DtKlMyqY72HIq8c9f8JAq+7Irt/6SUPJyceuf+JgOfHofEypIP9xQEE9DMh//vAbvXewtdzt9jkAAAAASUVORK5CYII=',
  19553. iconDown =
  19554. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAt1BMVEUAAADl8//l9f/l9P/l9P/k9P/l9P/m9P/q///k9P/n9f/k9P/k8//l8//l9P/l9P/k9P/l9P/k9P/k8//m8//m9P/m8//l8//l9f/n9v/n9f/o8//o8//n+f/p+P/m9//p9P/////l9P/k8/8wmP85nf/h8v9HpP/b7v/R6v/I5v+63v9+wP9AoP+g0f+Yzf9zuv9ks/9OqP/C4v+y2v+s1/+m1P+Zzf+Ryf+Jxv9cr/9st/9XrP/lnD+mAAAAI3RSTlMAx0zO+/qKcAzRSvju7OLfv7i0mJeMg4FqVElCLCoiHhcFqVhMnCYAAAKcSURBVGjetNeJUupAEIXhnuwJO7LIjp5AABW57l59/+eytFKZogq0p5P5XuCvJNNdEzIzH4e9jopbDd9vtGLV6YXjOVkSJX23hhNqbj+JqGLTgfLwC08NplSZZeiCwQ2XVIVJ1wOT151QWY6CEeVQGaMYxtwRSc3aEGnPSCIKfAj5gWBMkiZKaCZk5ipAScEVGVgolKYWxObUUYE6e0IuUZFLYhmiMkNiuECFLuhP16jUteD5rD7jEJUb8s+n/bPqwIqz87iow4r64sz+VLBEnd6rAawJ6IQEFiWU06ImLGpGjBdq96XOfFjlz+hYG5a16cgI1h3fHmOwrHcbSMWCnfa6StODOOmQpsCxT789bCGjdG8Cliz9kUmL+k+nC451mst2EOlSbumBJUtzd7Kit8yDIXju06L4CIkwD7pgOhTF1Q0EXPoxBdttyeKUvg2gGRSfYG6gh5DrPS08QzMZxciDiTddfIEpLxJc1V51cQ8+vd76MLTXxXsY6uuhMPCii2/g0oNRg7FnXXyHkRrRHAJPq6J4CyNzGkPiRlocn12k/OJhDb6QepB5vCuKHwbFHnUgtNPFf/xihxSkdpkubsCkKIbYVhf/c4sxtSC3fdDFNVha1ICYLvK3XIN8lLH5LD4jWPyv6u3lBkAYhsGwBBdgA/ZflCMnJB7Jh9sFKlVN69h/+Ib8SPml4WXBC58/bfzx5t8T/4C5xNAiistELoS11N94M6PbNd6Q8pZbmwrcNuHGkLa+uLmn7Utu0GILeuYmu44ReFCio6D/w67mOC8hsGyNZDNC575YPQcc6EEjsuCPerwlD+CpRZQyIaw6zCwXpKtBBbNhyM+45whA61tkd91HgpKfY9cjguUYnT/XMl0PB0z3y4CPPxwYqUFcDbWqqAAAAABJRU5ErkJggg==',
  19555. iconMenu =
  19556. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAqFBMVEUAAADl8//k9P/l9P/m9P/l9f/n9f/l9P/l9P/l8//m9P/o9v/q///k8//l8//k9P/k9P/l9P/k9P/m8//l8//l9f/n9v/o8//p+P/m9//p9P/////l9P/k8/8wmP+g0f/U6//W6//Y7f+czv81m//h8v8/oP/M5/+x2v9yuv9Yrf9Rqf+s1//B4f+PyP/c7/9mtP/F5P+Wy/+23P+k0/+Bwf99v/9cr//VxVGGAAAAHXRSTlMAx/nPi0xK++GYcCsM7uzSv7i0g4FqVEIiHhcFqXWR2NYAAAMBSURBVGjevNZrb9sgGAXgF+z4nnuaW3tYtuXaemmzbuv//2eTjDrJEngQA883Pli2EeflkJ11UuRTNs5GnI+yMZvmRbImT6okjjgUeBQnFTlWzlmKDimbl+TMtohgICq25MJqlsJQOltRXwMGK2xAfSwjWIuWdK9ygrtMyvtiEHPciccVWUsy9JAlZOcxRk/xI1nYMPTGNhZZGMKBoXFCHuDIAxlZwJkFGcjhUE7/9QSnnoz+L+A/LuDcwvh8BjirA3ihzeNmCC+GG838ZPCEqedqDG9iUkjgUaK4bzN4lFWBNlS/qSWHV7yktgk8m1DLEt6122ME76IAM00/4RgCYPTPCmq7+vyKT4cfX74bqXdQW9GnGZSueyGOZ0inZ2Fqf4XSjEjaplCpm6ePOzSehYUaKumWpAJKb6Lxs1nchI03KBXdmXgRjd/N4ixsvHQmo4TaRTR+yfMjbFygJufbHGqnffOxBzT+CHP7E9Tm3SG8feyPl6+QDtej6es+bp1RrFJoHVqr129GDtBKK39jTT/eYgQU+7so9MHgCIgTrRHUmhIElVCBoArKEVROUwQ1JYagGI2ht6vfWxXDTL2D3pgy6MiK8Q6pd8WQMhpBzXnFkEbaQeO8Ykhc+0LnFUPi2i11XjGkkfbQOK8YUtYVi7/Vm0EKgzAURJFiheKqLgqFtLFYCEIQpND738xFVlnkJ8b88WdW7QGiLzNPO09TDmLMljoWjSLi08JnTMpXEWngjzb4wxv+eoK/gOGIgYYoOCbCQRiN+ld3mYGl6+nORBuHGC72906K0ZHmZFCBrLmIsapABvLKbTzE+L92xISu3ESpwIEYF6o24UCMG1UMMSBG96SqLwbEuEfKPYcY2v0ugRiPeH25eP9GnZSFOITYghZdQcNLdvSMAB9K0FPQ+WMX85wnYbBknWRljM58s7occYBHjZAlf5TXW+QJPGUVJZkSVjnNTK5IV0YVlC1DHtY9axBa85XdmqTk/dp1jWI5UJ3307fhjwPa9GMA//xhA1C4YmYrR8CJAAAAAElFTkSuQmCC',
  19557. iconNote =
  19558. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAwFBMVEUAAADk9P/k8//l9f/n9f/l9P/l9P/l8//l9P/l8//m8//m9P/o9v/q///k9P/k9P/l9P/k9P/m9P/l9P/l9P/l9f/n9v/o8//p+P/m9//p9P/////l8//l8//l9P/k8/8wmP9Wq/9Rqf80mv9Bof83nP/S6v94vf/d8P/X7f/F5P9yuf9mtP88nv/K5v+73v9IpP+Ixf/A4f9/wP9st/+j0/+w2f+bzv+Uy/9Zrf/O6P+OyP9fsP/h8v+13P+p1v+YamAyAAAAH3RSTlMA+cdMSs777eGYgnArDNG/uLSMi4lqVEIiHhcFxsWpm2xOQwAABJ5JREFUaN7Vm2lT6lAMhlso+yIgV3G7OdhS9lVAWcT//6/uaKNHKU2TUu7g88UZmOlrw8mb9JzUkNGwCrnKQzmbMc1MtvxQyRWshnEiSlYtZcIBzFTNKsWtVswn0kCQTuSL8andFlLAIFW4jUXuupoGJunq9dFyyQSISCSPkrsqg5jUVfSVcgGRuChGS4O6CREx6xHSxMrCEWQtodzdJRzJ5Z1E7yYBR5O4EeRCBmIgw86QPxATf3h6eYiNPEcvBzGSC9f7C7HyV3Z/p7/HPMROnr8+T79Wk3ASkoH+koGTkLkJ8E+5n3XHy8XbrAshJA77qtSv3WlTeTxuRiFOfrAegYh121bf6LtAYR2ot7L69zZUP2k9k/XRX5HrIOFJ+XkCgrqvfzGlen76VNex3+eI+qUXhQwH0+fp/Cu6L1RntdcPgoCx8nCW4DGbeB/YYwjmZ/dYliSfgxH0x3gFwZQje9pAfdCG70y9D3dMh5N4zPPhm1mpdwaU32i9a+DTa3mCg+5eoL1s7EAw+kmnCmw6jwpxdv5bpGNaNZDbNLBpK8301R/qDfU0d4uCBYGjqe+s1r6YknZTQMEU37G9HLedz8RfgAbXLkEKXQ24vK48nbfu4MvOOoB0UJCiKGycMNnmAPDcQsXJDDx2+BtS5GVJuMPl6aXH53K10UHn6h2MMZWKpbTM0uw1hrCtkO1H8fVumS796RLamsTSdKFdDrWLY7ibEN7A1WQ1aQsad/tVfEe6QFHU+Ekxs71EwGRHNjYqen8d9DsyMUyepWHJmwGyVwp1uElMw2gAiz66mf8/wW/0L0jSYHaHC2xAD373mZKtEYRi8Yx01MLiQ3yrc5C20xzH0jDJl6QB9YFBzqiwukLKJ2focR1gUDHuIZQlXjHg9rGC9IDDPaNfc9HSXDjIlpXyunfLgoa84oI0oAHwyBoZCGFDXnGktMVwyIQazRgtDQ7j6H6UhRkm2EXrClgSc21ATEEdUvKKG7KnWr0Cl4yRFbfZmi6Gew1ssnRauEOyn8ZwvwGfsvHAqBFjiQHRPJDW5tpUczvGCtIBARXSvF+ojOhgBemBhBxZnraUxTR1kRdQIAvw8OMWSAOagwyLajE6RJHoYQXpgowG1UStdV/oA2vSGGSYZJs4CnbtAWlAdJtYiyC4UMTNhzXCSbkg5qfjghSLfJjpBa3DCdFThT/MGAmpYJuxmUftnOSFgku0NKIm0Q+kRZlgz9ZttpQivakwO9TfzmzdU8mTwqPAF1yv9N6onELIxtB479LuE7ZMVE2iN4aQKiXYRrW2o75w1hCBqt7cowVRTTPpQRSuye1LLbinpjcSxUmoSRKCtvpJcwnRSIZuQbvKh+1MHlnMZ76cYGyyP6rI+I3hinGMsIss52//L1gHJS92XIJmkXcUNB7EFNI6+7Cr129God8LPuxCLDghFnlgGT+X5JFs/CTuzuPQ+XTH6uczOHCa0YjzGv6If7zl/AZ44h1ROs8hrPjGzM53kC6eUcHzHoY8etzzNwy0Rh3ZLV/9pqFk+dj1bxws//+j80gpGfxyQFKSBvLXH+4/X3+4j/D6wz82EbmlhUaaogAAAABJRU5ErkJggg==',
  19559. iconOverClass =
  19560. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAulBMVEUAAAD/6uj/6ej/6+j/6ur/6ef/6uj/6uf/6uf/6+j/8Oz/9er/6uf/6ef/6ej/6uj/6uj/6uj/6uf/6uj/6ej/6ef/6+n/6uj/6ef/6en/6ur/7Oj/7uj/7e3/9On/////6uj/6ef/U3b/na7/4+P/WHr/5+b/x83/kKT/2Nr/Z4X/qLb/3d7/rbr/lqj/gZn/d5H/1Nf/zdL/usT/tsH/s77/v8f/iZ//e5T/XH3/bor/4OD/orH/b4qWx+cJAAAAIXRSTlMA+8dMSfnhzoxwIAzu7NLQxr+4tJiXiYOBalRCLCoXBamt+0gtAAAEWElEQVRo3rTTaZKDIBiE4QYREcxiFmMWY7oq9z/j/J6MM8Mn8Nygq96GjDft+bDf2k1db+x2fzi3xqOQYFxTc0HdOBOQ2eOiFf+g9OWBbJ5twwhN+0QO96NiJHW8I1WlKaIrpLjtKLa7Ya2p5yr9hDXCoLiSGgLEjGUCayAzOyZyMwS8ZjLtBV/omEFXIdKVmVwRZWQ2IyKcmNEJ/3oxq5dsX/mNI7MbBX0Wb7ViERV+4TsW0XksmjUL0TOWOBbjsMCwIIMfgmVBNuDTwKIGfJgURd5viqgJ3/WU+KK1XncSBoIwDC9GPMZzjIkak2/YruXQSimFAvd/X8putwkpzkxjfH5veEvamWxRE9UF+ngwB17Rh53Qj4lFH4e3xzv0sSRviT7u/rDTRuSNwOA33AmifwyemNYbRHJQ9maiJyjYKhsfD46zykLhKfY+BpCVGyKqjgUrItqUkA0+THAJkct9Ipl1g7OE9nIH0aUJziGxNQVlN1hSUFtIzo33Lvfm1PjsBj+pMZeL7z74AoFre1vXDbptW3QQvOiGMG17M3SDmLXFVDWK1wPwMmrUu+NjsaupkYE3uFastXESn9/9NvgupSAZK9bbBXhfFEy5TTOl4Au8C3koVhTk/GrLKVjJgzEEax6/QD7o4jmwhsZcgROnLCmk5V0kcVJZV+ZU9QZHkIIYqd7iqbBIbRL+4E4O7pqjVlinz5rLRA45iFxz8Xg2j+CsyVtoggvy1uA8mntwJrQ3ARPsHubcm1swLHmpLpiSZ8G4NWeKoch0wUwxGGfmBowy/oQmGB+vBOOGXzQVeYUuWJBXgTHkg1Pyvqu3ut4EYSg6YpZtGl1mYkyWzKQFLIWKgqLD6P//W3u6vlR6Dwqunkc1vYbez3MPBjNoKMs7DY4Bg9q6rKtXqwGDY8tpeDegEhlrwMVsp5kAiWZrfR5LGe8sFwNSzcQd+GXTQ9JVpZsuoHQH/hQI/IOAcAACf/oyA1JbvRQAljWQ2mZMeUqocQCwR3rFD6YA76xD2D+3YwrwECrAWrDQUAEeck3UAXEb/JevbJuopOXrzgiSim0T36Eu6hgxA9YR6qHe+Va/oJ566QwJ6s8LnuQbBdjslAsHcmx+CkbAuGZqa5ghWMNMbRDmZM4GNI1rDceZXymxBDHHRu6MzkuvHrhP6fuMHblBUiGRhI2y4mYj4QH4DaJNyAfJZKbFBTojc+THEG2yCDCahnBOwtV2uwqTsyRARE2waEF9VbF0Iq4w6gsn91QqHUgVSu7h9GV0qmUD6lOE0JetCVqTx1efZm4EgsENFLQOU+thhlpA+LyRZC+zdXoxts5KgeL7jjVCVJRKlUUrVv/LXpT0iuDn0aug/1929bzO82Fh2etK1o+lc39rdX+EA/1II/wSf3Qvb/FPwNOtRMlPEVZ3MjN/hXTdSAX9FkPeLfd8BkHr7ZLdZxIlt5ddP6Ow/OHSecJo0PxywAAPg4e//vAHMr7+ynUuAYkAAAAASUVORK5CYII=',
  19561. iconSetTime =
  19562. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAwFBMVEUAAADk9P/l9P/k8//m9P/l9f/n9f/l9P/l8//l9P/l8//m9P/o9v/q///l9P/l9P/k9P/l8//k9P/m8//l8//l9f/n9v/o8//p+P/m9//p9P/////l9P/k8/8wmP8xmf9ks/+Jxf88n/9arv81mv/B4v+i0v9AoP+Uy/+Awf+93//X7P+dz//g8f+02/+OyP9Tqv+p1f9ut/+v2P9Mp/9GpP/i8v/b7v90uv9ntf85nf/G5P/P6P+YzP+FxP95vv9fYimLAAAAHXRSTlMA+c/Hi0xK++22mHArDOLf0sa/g4FqVEIiHhcFqe9k29sAAATCSURBVGjetNZrU7JAGMZxUEIRz1oe6trQNJCDJ7SyMr//t3qGDecZV7B7EX+vnPHFf/Zw76DI6etmxWg1G2VVLTeaLaNi6n3lRmq6VlCRQC1oei3vWrVTLOGCUrFTza82NAsgKJjDXHI9owSiktG7OndXhJTi3VW5hwKkFR6y35Q2MmlXs42BpiIjVcswJnodV6jrkrlHDVfSHmV6gyKuVhxIzEIZOSiTJ+QeObmn9brITZfSqyBHlb97T8jVk9z6br/GLnLXpd/P29/VO9xE6jwOyriJ8iDl/SziRorJ76qGm9GSejoSBO7KGUlwVm6ABPp5r1bHmXD9yaR9rkOcqdcIG+q+sIxe3L83tapC4DyzzJ4dCNSqEGxDcGBXOUDQFr4HIViwKy0gOP16LODU/Lg3y0U4lRAulseTmONU4dKb9raJT9+DNC++a5u3Cy+c+Mb4jJsBCMLZziLazcIAwIxxvvje/O/1IFiyiAVgtWVStisAFossIegpRwZOfbPIJAB+mLQfIJiwyDdOGUpsWErc0TX/Ic8H1ol7WhrGQROC33W58MbxXSVi3NiDG69VYKbMBD5YBHBYZOaByJuxiAOwyAeSJ6MK0Y4vC+AXfA8Jez5MAF/sDqIqD3YgsuLgNro6kDKJbmoctCDqCEMoBu3oRCAlOnVbCAqjWCulBsfZguPUYKnGnzXpoDedh+F86tGC4vOmyQW/HMtmMdtyvuSCGh8KevB9v2SCpf9OD/LBUMnBYG+zBPY+IAdVRemDGpxuWIrNFzWIvqJTg/6ExbbWYeT7o4O1ZbGJTw3qikkMOsfVjKbA0XR0XLVDDJpKhRb049wcgnm8TJ8WrCgGKehO+M6NApwJRr//uaSgobRIQf6Mj10kcsf8ySYFW0qTFLSjNUyRgq/fJgWbSoMS5J/Fr0j1yr+4KMGGUiYF3/aHEBfMZ8RLU1ZUQpCEFlQvBfnJff6r3ux2EwSCKNxaoanGm/Z6jNJaBJS/REBJfP/HarJk0otlThwEs34P4BHYYXbPHEjFxTxNIAhvqanqIyk4mmJFtxQumpKX+21w+ZRo0cCyKLpu0GxvpOm6SYHKAhY+5esB5AQL/wMJtkPO+C3BV9sCCVIcavXCmJDgArYns5kONHJBlBAUXMIGzFbN740UcUWEBX20xRgM3GK8vD5S8BVuEwHt4dAOEZzBjbBI0pjTWKIXnMOtvki5NpR6QR8eZiRiLoJYK/i+gsc1iT0L7rWCb/hAyoi2WKYV/BKO3CUWTFkwxYKlcOS2CyNimwV0PdAp2eiJrKIQbBN2L+Tfy00bkv9R1P+Il5IxtOve+yRSFVFUVCTS9ZidZAzZPfHEawKDV9XJ6oWyuXflRYHBi+oqmnt2KSYBW9d62CwPkp4iZDyptsOsJhV1FkpvBQ9Z0HT+d+h/FHQX1+t7zbDJXufru8hr22THY4T6fI/e2dL7lAclTHYZKnfJSBiUgFEQ2rFhwj6DdY6HXUyVbpvNt4JNs00rwsMuxqcJ8V0YWE46knVj6DzdWN2d4MA00Qi3wh/jx1vcC/CMG1FyM4Q1XszM3SDdOFFBt8OQd8c9nyHQOjyy+0yhZH3s+hmD5RNG5zErT/44wFOUwaM/f/gDgMx5mkMYVqUAAAAASUVORK5CYII=',
  19563. iconToneIcon =
  19564. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAyVBMVEUAAADk9P/l9P/k8//m9f/l9f/n9f/l9P/l9P/l8//m9P/m8//o9v/o+P/q///k8//l8//l9P/l9P/k9P/l8//k9P/l9P/n9v/o8//p9P/////l9P/k8/8wmP9st/87nv+Jxf/U6//g8v91u/80mv/Z7f9ls/9Eov/L5/+Ryf96vv/d8P+h0f+u2P82m/+93/+33P9brv8/oP/H5P+Xzf/C4v+n1f+czv9/wP9Rqf9Kpf/P6f+Lxv9wuP9Op/9Vq/+y2v+Cwv/S6v8GsZ0zAAAAHHRSTlMA+c/HbkxJ+7aYjIIrIAzu7OLf0sa/iVRCFwWpJErPEgAABT9JREFUaN7VW2tX2kAQTQhvQalQq+0kaB4QXoK8RVDx//+oHjehSzC5EyD04P3E6UlzszuPOzs7KvuhnE0X8rXqdUVVK9fVWr6QzpaVE+EyW0ypFAI1VcxeJs1WutByBJDTLkrJsd2lUxQDqfRdInS3+RzFRC5/ezRdRqO9oGWOovuVor2R+nW4p/ykg/CzdFgY3Kh0INSbA8Ik+4OOwI/snnS/i3Qkir/3ymAaHQ2tvEcsXFECuIodIWlKCOl4fBeUGC7i8BUoQRR4vj+UKP6cfn14jdh+ydsR++fpfTVDJ0FkPJav6CS4KkfkT41OBC08r3L5+qV7bxlBrOatvkk8iqF6RAjm7FUPR7094hmzIXoL9a/X1AHmDquPXxX5Bi2vrWMs2EXe7PKVVMBn6BzqE8JQd+scVC9ZWy8OwtY3GLpcZbVTD4JHp7qH5uzrS91eQ/fwRAyC1SOoP526eOHjskOhmPjuO+Pq1bg5raUL9KK/6M3bAHOz6A8+w6EcMxSvG4MnHO+R6eb77PDFapLvFrytH8NCY/HMSmyw2P7wuJQnnTx42RJvqIAp0kLj8+dKPN6nMOT/nf/QeUx4oS0chrFz6zPf2mKF4Y/n7uLIrvj4Z8Iw27bd/vwxFwtsM1KMzmQP4g0WcTDd8dyw1o/icRdHRokA3qWPIvTedAmDolCShROOwgGmcxr6NvqgoIJBKL3OwcospRKa0A/FS9gzEO9qQr7Os76DZWTX4ZIr1Tq2F2EI/8RSeAw2QUaWMijP3BPAyGdrTUxn4BvzDRU3sFEx4/OMFdD8LlyiCAyV364XYpN7P/g/5lHCryhlQngSMs/vqCGt/ghTU5mpDuuhUuHO3qMzg0gBw8h6ESdSN3R/prbvuNJo77s2jT7ZFIgtZ7phVutFrRBboQC1kO7F2yZh+XwZsOEqrg3zSo1YMTTDCO8jvHQOvZRqSjWGGEJCPw5dFIcSVeWaF0NIKDPNiDp9g8k0dK1UeDHEhGTxuVSioqi8GGLCXbXAuVeVhEAMMSG9LIJ8FiHCCi+GHCENtunsFgFUkNOYUgwxobFFZ7iEcK1UWTFkCV2PyjJW66lDGFWlxoohS9j2K5lJY2FxhDUlz4ohR+j4xehDHVQjMrUVWDHkCO99RewisZbJO82LISbs+MnUJ+xxjbcsL4aYcLY5z01Q0EsBLvNiiAkX3sJkFEGUFUVlxBAQys96/fz5zBfNqiwTgRhCwjdvH2QWf+A6C0VGDDHhYKuhMPbLG4AiKPUdmYgBoVdqt7YyUwv6DDjMDDwxhIS++tYdL0BkiYoOM4oGxRAS+mZbbzvsAhBq6EDa9sQQEn7YwrE+Aqphch3+EnDSIUHCddDOS85NS6ip8CTiCxL6bbhRsEE0Yttt6egVNhGhb+bGjtldkEhRY8jyOkKA0Gzu+JWFbZi7Q60v3yBTQNjdrUGHOLflcXNv4qkAIHzd+aQuU7PdMu3LJqMWPT0Ydk4TC6KGGrRyTx8HUYRPwUZw50mm1VBkYAtaSrk9Cyf0Mudw41Ujv/7uwpjATfau7uF57JpfCY2tY6LTW7G99l8xrhHa4fcH3lZv/bs8xTQ/wDUCf1FiNvT9UJ/AixL+Ksic78X36nJXQfxl13QRm85uO/xlF3+dZ47fYtENrRek9HtdWL50l20DYbVu9QmheB5Xsie8dD6Xa/VTDQ6c02jEKYY/zm28JekBnnMcUUpyCOtcx8ySGqQ751HBBIYhz3/c86iB1u8ysnvYUPJ3G7veb7D8u47Oe7jMRP9xQCZ+GPz3P3/4C1OFU4IrW2mHAAAAAElFTkSuQmCC',
  19565. iconUp =
  19566. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAulBMVEUAAADk8//m9f/l9P/l9P/k9P/l8//l9P/m8//m9P/q///k9P/k9P/l9P/l9P/k9P/k8//m8//m9P/l9P/l9P/l9f/n9v/l9f/n9f/o8//o8//n+f/p+P/m9//p9P/////l8//l8//l9P/k8/8wmP/h8v+Yzf9Eov/b7v/E4/+12/+Nx/9+wP9xuf83nP8zmv/U6//P6f/K5v+g0f9ks/9arv9Ipf86nv8+oP+83/+s1/+m1P9Np/9Rqf8vxikbAAAAI3RSTlMAx0vO+/nttoJwDNH64t+/mJeMi4lqVE1JQiwqIh4XBcbFqQTxdBcAAAKqSURBVGjevNaHUttAEMbxVW8uuOBegE9yAQzYDjYt7/9amTDOwWiUZG+l8+8F/iPp9rSkZzKIWsF10vA9z28k10ErGkzIkNhuOx4KeE7bjqlio9By8Q+uFY6oMrPIAYMTzagKw8AFkxsMqSzbghbLpjJ6CbQ5PZIaNyHSHMvGoFuDUK0rGBO7jhLqNumZd1BSZ04aphZKs6bE1vdRAb9PTJeoyCWxhKhMSAwXqNAF/dcNKnUjeD6jzxiiciH/fJo/q30Y8dd5nPowwp9SobkFQ6w5FenAmA4VsGGQXfC/rcOgekx5XRjVpZxxDUbV8ntOE4Y1c/sgjOvRdwmkVrsMLEklI/G0SdPjAiw2fbEgs/1If9uDwyJlCJntIf10AMtQBQOI7JbpSQaOgE5mLiTWqrcEizs7BSNIrF/SPxbgiU5BBwKvR9XbgMmhTyMI3D6o3j3YRqLFSd5DKB3Ct0fVuwOTGsXYha53YQ9uLLrW9inzfBZfb21oWqTKHpragqG4U7nHd2hQg+Ehh917gzaPaAIt96r3cAuBCQ2QY7SHAUXgyzaqd3yFSEQt5LB6L2vItCgAV/ZD9ZbSHgK6AtPqW28HqSv2vrZ6Vr3DFmIJNcCSffU+niDXIB8sC9X7WaYHn3vRqA/4vEIZ3tmDZ3+lZz805x+LX9WbIQLAIAwDxeT8NPxi/3/Z1AQOSnqkHgukl2ufOCW8+B1/2vDHG/+e8A8Yjxh0iMJjIh6E8aiPDzP0uMYPpPzIzUMFHpvEwdAbAEMs+sLhHo0vcUALI+gLh+x0jYAXJXQVdL7sSq7zHArL1ErWo3TOq9V9xIEcNcJL/tDrLX4Cj1ZR8pSwdJqZr0inUQW9Zcht3bOC0BpVdu+nkpS8rl1XFMun1fnaywHD+kP71x9aYP3hA/M5Qidw03TPAAAAAElFTkSuQmCC',
  19567. iconWhite =
  19568. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAulBMVEUAAADk9P/k8//l9f/n9f/l9P/l9P/m8//m9P/o+P/q///k9P/k8//l8//l9P/l9P/l8//k9P/k8//m8//m9P/l9P/l9P/l9f/n9v/o8//o8//n+f/p9P/////l9P/k8/8wmP/Y7f+Fw//d8P+t1/9/v/8+n/9otf95vf8zmv+Bwv9st/+k0/9cr/9Dov/U6//D4/9zuv/N6P9Op/83nP9ptv+dz/+QyP/g8v+WzP+94P+13P+73v+33f9oZhavAAAAH3RSTlMA+cdMSc62gnAgDNHu7OLfxr+Yl4yLiWpUQiwqFwWpuFocwwAAA9RJREFUaN681otO6kAUheE9pVfKVS4CgmsKqQHTQtETMcbz/q910kOJhhntdFrme4E/Tbp2hqoJbH/kDsJ+l7FuPxy4I98O6Eba9thhkGDO2G5TwxaexfALZnkLaszSd6DA8ZfUhLnLoIi5c6qrZaESq0V1zEJU5sxI18MQWoYPejOYMmhiU42Z2D3U0LOpmtUENU1WVEFgoTYrqLCFDhrQUV7IPRpyT0o8NMYjBXdo0B2VekSjHpW+z+A3emicp/x/GvhXW7iJH/cYdHATnYCkVhZUfcbb7Xb9AkWW/K5O1Hs7nttHUDQhCRvKjvwsgSqbBO0elL0WwRiqem0hOIWyza4IplA2Fd4vDMo+eOEPlLHrd84QModkHYtSfnGMBevkAJnh1XtQmjtyLUdpckbfhRBle65pn0EUlt20Q97TLR5KLpwlH5u+I0TWV28OUbTjNewiiOZ04UKUnJeWbSrK0h+PkEuFJYPoxHMZKst47gQRW9KZD4k1z0WoLOK5NSR8OnNMBZ1zbwFTQSwo55kLepSzTAWLKbaZuSBrC2dNGtxcRP+9awaL8zYuCyb76zOSvugGx8IoxGC244JUPSgOg5UET1xioxlkRAFKggkXPUEziIDssuD7Kxe8aQdt8suC2Lw9x/HzN6cPaAd9GgHmdgiMyDUbdGlgNjig0GwwpL7ZYJ+6ZoNdYqXBz3T/9Jv0b4UgKw/+q97sdhqGYSjcsQ46dsUFaHATN9tYq0K7td2g7P3fix9PQkJ2PNMuyr4HqKsojuJzTuoWBNpaUVBe0g5EOsWSyptmDyJ7xaaR2yItQaBMNW0hN35l13/Z/VAgNtU0vvejzf/hnfgtmESx34JxNPVbcBpFI58FR3hN9FdwIl+EJfQX4bHPgjE7zKQFjupLNXiPLVJ6mOHGtS6HnuQdq5zckMJAfzbcQPpEShj9eaNHbrIxLAyAJZoCSXwVTFhhqG7yHHqR501NC0MofQkUgBwMQQZIYQSuCXGPZtEex0Jyul8C0i6Mm0dGvuQ/uXX+DiyNk6vTTaet+4sF8T+SBTUzDt6f3Wv2Ar8rzjMhRHaGAyA7g7Ba7sE4mBM2AkMmOT9rQDLDc6cwSkpeVkb2gJRGMEpOs4I+RDWogiO82vCgMLusrJW8AmIVZlcUS15aZVg6QBrDEGsMy0bW1+rWXfBeZcluVtkXtnJ2TvbNquYs2TBM5/PZ6uEEB84TjQgr/DF8vCW8AM+wEaUwQ1jDxczCDdINExUMOwzZO+55CYHW/0Z2Z/NLCiXrY9eXGCz3EJ2nuR3zjwPGijbw/fzhE7HYtyzsXc6MAAAAAElFTkSuQmCC',
  19569. iconWork =
  19570. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAt1BMVEUAAAD/6uj/6uj/6+j/6ur/6uf/6ef/6uj/6uf/6uj/6+j/8Oz/9er/6uj/6uf/6ef/6uj/6uf/6uj/6ej/6ef/6+n/6en/6ur/7Oj/7uj/7e3/9On/////6uj/6ef/U3b/39//mav/2tv/XX7/n6//hZz/WXv/iZ7/e5T/Z4T/5OT/s7//YYD/cIz/4eH/1tn/u8T/fpf/dY//prT/x87/wsr/k6b/aof/rbr/jaL/nK3/z9P/yc/wFT71AAAAHnRSTlMA/MdMSc754YyCcCAM0e7sv7i0mJeJalRCLCoXBamy1b4xAAAECklEQVRo3tWba3OaQBSGl+Wigiaaahqb9CyRSFNA8ZJoLv3/v6sd6JRE9nJYLmOfjxmHZ1Z4T5azR1INz3KnEzrqXTrOZW9EJ1PX8khLDK2+7QAHx+5bw6Zt8wE1QIJBB/PmbLeuDQhs97YR3c2VAUiMq5vaOpNCJahZS/d1BJWxv2rrvo1Bi/E3vRjMDNDEmGnExOpBDXpWRd1dH2rSv6tUwSjUhnoVsnABDXCBTsi1AY1gXON8A2iMAcb3BRrki9r3HRrlu+769NeIvH8d3cdraIFrSf4MaAFDmEevnPf3fRxBXS48Qf0s17OYMbZaQ10ov65y6nXC/rCE2vR5PgvKsIw91MYq+4Y9KLPNjU9Ql96wJJwBhzTIhIkPn1j7HOS3elbav/ATsWEZj5/+9pNxCVdvqTgbp/ucMfC5Zxlv8I9FyMQchCEan+wHQcSOZWw+REXGagECPu8eRyBikWQXClL4yzOTG0VrHH2qaSDm+fRCW7nxAAJMUkBBwp5lvBZPzds9h8OO5aTAhxa+GxBTLCkGBU/543sPAoo3nSuQ4ucXCt+VxuxzRxBwRf5ya4CcX2F+JWUZf8w+J8ziLclxQcULY8oyXqTWBwEuybFBySuujD9knxJG0c59c1ATrYoyri+EOX7jlIZ5GV/UEg74IZSWcZxQFsWhASiKMq4vNIacsqYq4881hGBytjKIMq4v7JdDoS7ju0gtlAXDkRarh5fo9HrsoC90CPFUFWYVKcs4XggesUBCkl2+VMaTSFtoSQupn/+7KZfxVFvokilaWJTxQH+FUzLBCov8hxvQFk4IrSiE9NkHfSElI7ywQF84Ij0tYfrj+PMDx+U7UtgjlzrC6MhOSHyc8JI4GkLeZjjGCR094VNZuEEK9b5S2J36jmvkV6r50Kwfto8f2N772Iem+1jQboWUTLoVTsi0W+GUuN0KXWJ1K7SIV0EYv/7g87pfo7cYxEELD9JXe+wmithYoc9kbNDbxD5WmEqFMXojbGKFsJP4ggVKaGUvM1jhYhmEAnZP+JcZQruLBc1fSLsTDjLhvDvhnGTYXQltVdskKnpeOA6KtomyMRRkRQQwFMEJxY0hZevrscg0vvGwU7a+yI28kRgijXHeIX9QNPdkUfQDlpFsl0q2CcsIF8IQFpiyJeKRL9BEtaCXVX1bYSZwTfaoonG5xjXZyRhEvCR4XbAHEWPVQUnBOl6ukkBJslrGa/xBCZlBq8wwh114dA67iAUtYvEPLFujLzqSbQl6Jzx0boUL71yO1dsaHDin0Yg2hj/Obbyl6QGecxxRanII61zHzJoapDvnUcEGhiHPf9yz64FW/ZHd0df/aSi5+tj1/zhY3vHofMHQFP84wMTHoPOfP/wGTQWP9qtjfVcAAAAASUVORK5CYII=';
  19571. function _isSlot(e) {
  19572. return (
  19573. typeof e == 'function' ||
  19574. (Object.prototype.toString.call(e) === '[object Object]' && !isVNode(e))
  19575. );
  19576. }
  19577. const AttendClass = defineComponent({
  19578. name: 'CoursewarePlay',
  19579. props: {
  19580. type: { type: String, default: '' },
  19581. subjectId: { type: [String, Number], default: '' },
  19582. lessonCourseId: { type: [String, Number], default: '' },
  19583. detailId: { type: String, default: '' },
  19584. classGroupId: { type: String, default: '' },
  19585. classId: { type: String, defaault: '' },
  19586. preStudentNum: { type: [String, Number], default: '' }
  19587. },
  19588. emits: ['close'],
  19589. setup(e, { emit: t }) {
  19590. const r = useMessage(),
  19591. i = useRoute(),
  19592. s = useRouter(),
  19593. a = useUserStore(),
  19594. o = reactive({ width: '100vw' });
  19595. onUnmounted(() => {});
  19596. const n = reactive({
  19597. type: 'class',
  19598. subjectId: '',
  19599. lessonCourseId: '',
  19600. lessonCoursewareDetailId: '',
  19601. detailId: '',
  19602. classGroupId: '',
  19603. classId: '',
  19604. preStudentNum: '',
  19605. knowledgePointList: [],
  19606. itemList: [],
  19607. videoRefs: {},
  19608. audioRefs: {},
  19609. modelAttendStatus: !1,
  19610. modalAttendMessage: '本节课未设置课后作业,是否继续?',
  19611. modelTrainStatus: !1,
  19612. homeworkStatus: !0,
  19613. removeVisiable: !1,
  19614. removeTitle: '',
  19615. removeContent: ''
  19616. }),
  19617. l = reactive({
  19618. nowTime: 0,
  19619. model: !0,
  19620. isAnimation: !0,
  19621. timer: null,
  19622. item: null
  19623. }),
  19624. f = async () => {
  19625. try {
  19626. const V =
  19627. (
  19628. await queryCourseware({
  19629. coursewareDetailKnowledgeId: n.detailId,
  19630. subjectId: n.subjectId,
  19631. pag: 1,
  19632. rows: 99
  19633. })
  19634. ).data.rows || [],
  19635. O = [];
  19636. V.forEach(j => {
  19637. j.removeFlag ||
  19638. O.push({
  19639. id: j.id,
  19640. materialId: j.materialId,
  19641. coverImg: j.coverImg,
  19642. type: j.materialType,
  19643. title: j.materialName,
  19644. isCollect: !!j.favoriteFlag,
  19645. isSelected: j.source === 'PLATFORM',
  19646. content: j.content
  19647. });
  19648. }),
  19649. (n.knowledgePointList = O),
  19650. (n.itemList = n.knowledgePointList.map(j => ({
  19651. ...j,
  19652. iframeRef: null,
  19653. videoEle: null,
  19654. audioEle: null,
  19655. autoPlay: !1,
  19656. isprepare: !1,
  19657. isRender: !1
  19658. })));
  19659. } catch (D) {}
  19660. },
  19661. g = ref(!1),
  19662. S = ref(!1),
  19663. c = ref(!1),
  19664. P = D => {
  19665. var V, O, j, $, J, X, Y, K;
  19666. if (
  19667. (console.log(
  19668. (V = D.data) == null ? void 0 : V.api,
  19669. D.data,
  19670. 'ev.data'
  19671. ),
  19672. ((O = D.data) == null ? void 0 : O.api) === 'headerTogge' &&
  19673. (l.model = D.data.show || D.data.playState != 'play'),
  19674. ((j = D.data) == null ? void 0 : j.api) === 'onAttendToggleMenu' &&
  19675. (l.model = !l.model),
  19676. (($ = D.data) == null ? void 0 : $.api) === 'api_fingerPreView' &&
  19677. (clearInterval(l.timer), (l.model = !D.data.state)),
  19678. ((J = D.data) == null ? void 0 : J.api) === 'documentBodyKeyup' &&
  19679. (((X = D.data) == null ? void 0 : X.code) === 'ArrowLeft' &&
  19680. (M(), H('up')),
  19681. ((Y = D.data) == null ? void 0 : Y.code) === 'ArrowRight' &&
  19682. (M(), H('down'))),
  19683. ((K = D.data) == null ? void 0 : K.api) === 'onLogin')
  19684. ) {
  19685. const Z = document;
  19686. Z.exitFullscreen
  19687. ? Z.exitFullscreen()
  19688. : Z.mozCancelFullScreen
  19689. ? Z.mozCancelFullScreen()
  19690. : Z.webkitExitFullscreen && Z.webkitExitFullscreen(),
  19691. a.logout(),
  19692. s.replace('/login');
  19693. }
  19694. };
  19695. onMounted(() => {
  19696. const D = i.query;
  19697. console.log(D, e.preStudentNum, '学生人数'),
  19698. (n.type = e.type || D.type),
  19699. (n.subjectId = e.subjectId || D.subjectId),
  19700. (n.detailId = e.detailId || D.detailId),
  19701. (n.lessonCourseId = e.lessonCourseId || D.lessonCourseId),
  19702. (n.classGroupId = e.classGroupId || D.classGroupId),
  19703. (n.classId = e.classId || D.classId),
  19704. (n.preStudentNum = e.preStudentNum || D.preStudentNum),
  19705. window.addEventListener('message', P),
  19706. f(),
  19707. x();
  19708. });
  19709. const d = reactive({
  19710. open: !1,
  19711. activeIndex: 0,
  19712. toolOpen: !1,
  19713. chapterOpen: !1,
  19714. chapterDetails: [],
  19715. chapterLoading: !1
  19716. }),
  19717. p = (D, V, O = []) => {
  19718. for (const j of V) {
  19719. if (j.knowledgeList && j.knowledgeList.length > 0) {
  19720. const $ = p(D, j.knowledgeList, [...O, j.id]);
  19721. if ($.includes(D)) return $;
  19722. }
  19723. if (j.id === D) return [...O, D];
  19724. }
  19725. return O;
  19726. },
  19727. x = async () => {
  19728. try {
  19729. const D = await lessonCoursewareDetail({
  19730. id: n.lessonCourseId,
  19731. subjectId: n.subjectId
  19732. });
  19733. d.chapterDetails = D.data.lessonList || [];
  19734. const V = p(n.detailId, d.chapterDetails);
  19735. n.lessonCoursewareDetailId = V[0];
  19736. } catch (D) {}
  19737. },
  19738. u = async () => {
  19739. try {
  19740. if (!n.classId) return;
  19741. await courseScheduleUpdate({
  19742. lessonCoursewareKnowledgeDetailId: n.detailId,
  19743. id: n.classId
  19744. });
  19745. } catch (D) {}
  19746. },
  19747. y = computed(() => {
  19748. let D = '';
  19749. return (
  19750. d.chapterDetails.forEach(V => {
  19751. var O;
  19752. V.id === n.lessonCoursewareDetailId &&
  19753. ((D = V.name),
  19754. (O = V.knowledgeList) == null ||
  19755. O.forEach(j => {
  19756. j.id === n.detailId && (D += ' - ' + j.name);
  19757. }));
  19758. }),
  19759. D
  19760. );
  19761. }),
  19762. m = () => {
  19763. var D, V, O, j, $;
  19764. for (let J = 0; J < n.itemList.length; J++) {
  19765. const X = n.itemList[J];
  19766. if (X.type === 'VIDEO' && X.videoEle)
  19767. try {
  19768. (D = X.videoEle) == null || D.currentTime(0),
  19769. (V = X.videoEle) == null || V.pause();
  19770. } catch (Y) {}
  19771. X.type === 'SONG' &&
  19772. X.audioEle &&
  19773. ((O = X.audioEle) == null || O.stop()),
  19774. X.type === 'MUSIC' &&
  19775. (($ = (j = X.iframeRef) == null ? void 0 : j.contentWindow) ==
  19776. null ||
  19777. $.postMessage({ api: 'setPlayState' }, '*'));
  19778. }
  19779. },
  19780. A = D => {
  19781. const V = n.itemList.findIndex(O => O.id == D);
  19782. V > -1 && R(V);
  19783. },
  19784. T = () => {
  19785. clearTimeout(l.timer),
  19786. r.destroyAll(),
  19787. (l.timer = setTimeout(() => {
  19788. (l.model = !1),
  19789. Object.values(n.videoRefs).map(D =>
  19790. D == null ? void 0 : D.toggleHideControl(!1)
  19791. ),
  19792. Object.values(n.audioRefs).map(D =>
  19793. D == null ? void 0 : D.toggleHideControl(!1)
  19794. );
  19795. }, 4e3));
  19796. },
  19797. E = () => {
  19798. clearTimeout(l.timer),
  19799. r.destroyAll(),
  19800. (l.model = !1),
  19801. Object.values(n.videoRefs).map(D =>
  19802. D == null ? void 0 : D.toggleHideControl(!1)
  19803. ),
  19804. Object.values(n.audioRefs).map(D =>
  19805. D == null ? void 0 : D.toggleHideControl(!1)
  19806. );
  19807. },
  19808. _ = (D = !0) => {
  19809. (l.model = D),
  19810. Object.values(n.videoRefs).map(V =>
  19811. V == null ? void 0 : V.toggleHideControl(D)
  19812. ),
  19813. Object.values(n.audioRefs).map(V =>
  19814. V == null ? void 0 : V.toggleHideControl(D)
  19815. );
  19816. },
  19817. I = D => {
  19818. if (D && D.type === 'VIDEO') {
  19819. const V = D.videoEle;
  19820. V &&
  19821. (V.paused
  19822. ? (r.destroyAll(), V.play())
  19823. : (r.warning('已暂停'), V.pause()));
  19824. }
  19825. },
  19826. B = ref(3),
  19827. z = [
  19828. {
  19829. prev: { transform: 'translate3d(0, 0, -800px) rotateX(180deg)' },
  19830. next: { transform: 'translate3d(0, 0, -800px) rotateX(-180deg)' }
  19831. },
  19832. {
  19833. prev: { transform: 'translate3d(-100%, 0, -800px)' },
  19834. next: { transform: 'translate3d(100%, 0, -800px)' }
  19835. },
  19836. {
  19837. prev: { transform: 'translate3d(-50%, 0, -800px) rotateY(80deg)' },
  19838. next: { transform: 'translate3d(50%, 0, -800px) rotateY(-80deg)' }
  19839. },
  19840. {
  19841. prev: {
  19842. transform: 'translate3d(-100%, 0, -800px) rotateY(-120deg)'
  19843. },
  19844. next: { transform: 'translate3d(100%, 0, -800px) rotateY(120deg)' }
  19845. },
  19846. {
  19847. prev: {
  19848. transform: 'translate3d(-50%, 50%, -800px) rotateZ(-14deg)',
  19849. opacity: 0
  19850. },
  19851. next: {
  19852. transform: 'translate3d(50%, 50%, -800px) rotateZ(14deg)',
  19853. opacity: 0
  19854. }
  19855. },
  19856. {
  19857. prev: {
  19858. transform: 'translateZ(-800px) rotate3d(0, -1, 0, 90deg)',
  19859. opacity: 0
  19860. },
  19861. next: {
  19862. transform: 'translateZ(-800px) rotate3d(0, 1, 0, 90deg)',
  19863. opacity: 0
  19864. },
  19865. current: { transitionDelay: '700ms' }
  19866. }
  19867. ],
  19868. G = ref(),
  19869. R = D => {
  19870. d.activeIndex != D &&
  19871. (m(),
  19872. clearTimeout(G.value),
  19873. W(d.activeIndex, D),
  19874. (d.activeIndex = D),
  19875. (G.value = setTimeout(
  19876. () => {
  19877. const V = n.itemList[D];
  19878. V &&
  19879. (V.type == 'MUSIC' && (l.model = !0),
  19880. V.type === 'SONG' && (clearTimeout(l.timer), r.destroyAll()),
  19881. V.type === 'VIDEO' &&
  19882. (clearTimeout(l.timer),
  19883. r.destroyAll(),
  19884. nextTick(() => {
  19885. var O;
  19886. V.error &&
  19887. ((O = V.videoEle) == null || O.src(V.content),
  19888. (V.error = !1));
  19889. })));
  19890. },
  19891. l.isAnimation ? 800 : 0
  19892. )));
  19893. },
  19894. W = (D, V) => {
  19895. const O = n.itemList[D],
  19896. j = n.itemList[V];
  19897. if (j) {
  19898. if (j.knowledgePointId != O.knowledgePointId) {
  19899. l.isAnimation = !0;
  19900. return;
  19901. }
  19902. const $ = O.videoEle,
  19903. J = j.videoEle;
  19904. ($ && $.duration < 8 && D < V) || (J && J.duration < 8 && D > V)
  19905. ? (l.isAnimation = !1)
  19906. : (l.isAnimation = !0);
  19907. } else
  19908. l.isAnimation = !(
  19909. (O == null ? void 0 : O.adviseStudyTimeSecond) < 8
  19910. );
  19911. },
  19912. H = async D => {
  19913. var V, O, j, $;
  19914. if (D === 'up') {
  19915. if (d.activeIndex > 0) {
  19916. R(d.activeIndex - 1);
  19917. return;
  19918. }
  19919. let J = d.chapterDetails.findIndex(
  19920. ee => ee.id == n.lessonCoursewareDetailId
  19921. );
  19922. const X =
  19923. ((V = d.chapterDetails[J]) == null ? void 0 : V.knowledgeList) ||
  19924. [];
  19925. let Y = X.findIndex(ee => ee.id == n.detailId),
  19926. K = !1,
  19927. Z = '',
  19928. Q = '';
  19929. for (
  19930. ;
  19931. Y >= 0 &&
  19932. (Y--,
  19933. Y >= 0 &&
  19934. X[Y].containMaterial &&
  19935. ((K = !0), (Z = X[Y].lessonCoursewareDetailId), (Q = X[Y].id)),
  19936. !K);
  19937. );
  19938. if (K) {
  19939. (d.chapterLoading = !0),
  19940. (n.detailId = Q),
  19941. (n.lessonCoursewareDetailId = Z),
  19942. n.type !== 'preview' && (await u()),
  19943. await f(),
  19944. (d.activeIndex = n.itemList.length - 1 || 0),
  19945. (d.chapterOpen = !1),
  19946. (d.chapterLoading = !1);
  19947. return;
  19948. }
  19949. let q = !1;
  19950. for (; J >= 0; ) {
  19951. J--;
  19952. const ee =
  19953. ((O = d.chapterDetails[J]) == null
  19954. ? void 0
  19955. : O.knowledgeList) || [];
  19956. let te = ee.length;
  19957. for (
  19958. ;
  19959. te > 0 &&
  19960. (ee[te - 1].containMaterial &&
  19961. ((q = !0),
  19962. (Z = ee[te - 1].lessonCoursewareDetailId),
  19963. (Q = ee[te - 1].id)),
  19964. te--,
  19965. !q);
  19966. );
  19967. if (q) break;
  19968. }
  19969. if (q) {
  19970. (d.chapterLoading = !0),
  19971. (n.detailId = Q),
  19972. (n.lessonCoursewareDetailId = Z),
  19973. await f(),
  19974. (d.activeIndex = n.itemList.length - 1 || 0),
  19975. (d.chapterLoading = !1);
  19976. return;
  19977. }
  19978. } else {
  19979. if (d.activeIndex < n.itemList.length - 1) {
  19980. R(d.activeIndex + 1);
  19981. return;
  19982. }
  19983. let J = d.chapterDetails.findIndex(
  19984. ee => ee.id == n.lessonCoursewareDetailId
  19985. );
  19986. const X =
  19987. ((j = d.chapterDetails[J]) == null ? void 0 : j.knowledgeList) ||
  19988. [];
  19989. let Y = X.findIndex(ee => ee.id == n.detailId),
  19990. K = !1,
  19991. Z = '',
  19992. Q = '';
  19993. for (
  19994. ;
  19995. Y < X.length - 1 &&
  19996. (Y++,
  19997. Y >= 0 &&
  19998. X[Y].containMaterial &&
  19999. ((K = !0), (Z = X[Y].lessonCoursewareDetailId), (Q = X[Y].id)),
  20000. !K);
  20001. );
  20002. if (K) {
  20003. (d.chapterLoading = !0),
  20004. (n.detailId = Q),
  20005. (n.lessonCoursewareDetailId = Z),
  20006. n.type !== 'preview' && (await u()),
  20007. await f(),
  20008. (d.activeIndex = 0),
  20009. (d.chapterOpen = !1),
  20010. (d.chapterLoading = !1);
  20011. return;
  20012. }
  20013. let q = !1;
  20014. for (; J <= d.chapterDetails.length - 1; ) {
  20015. J++;
  20016. const ee =
  20017. (($ = d.chapterDetails[J]) == null
  20018. ? void 0
  20019. : $.knowledgeList) || [];
  20020. let te = 0;
  20021. for (
  20022. ;
  20023. te <= ee.length - 1 &&
  20024. (ee[te].containMaterial &&
  20025. ((q = !0),
  20026. (Z = ee[te].lessonCoursewareDetailId),
  20027. (Q = ee[te].id)),
  20028. te++,
  20029. !q);
  20030. );
  20031. if (q) break;
  20032. }
  20033. if (q) {
  20034. (d.chapterLoading = !0),
  20035. (n.detailId = Q),
  20036. (n.lessonCoursewareDetailId = Z),
  20037. n.type !== 'preview' && (await u()),
  20038. await f(),
  20039. (d.activeIndex = 0),
  20040. (d.chapterOpen = !1),
  20041. (d.chapterLoading = !1);
  20042. return;
  20043. }
  20044. }
  20045. },
  20046. N = () => {
  20047. var V, O;
  20048. const D = n.itemList[d.activeIndex];
  20049. (D == null ? void 0 : D.type) == 'VIDEO' &&
  20050. !((V = D.videoEle) != null && V.paused) &&
  20051. T(),
  20052. (D == null ? void 0 : D.type) == 'SONG' &&
  20053. !((O = D.audioEle) != null && O.paused) &&
  20054. T();
  20055. };
  20056. document.body.addEventListener('keyup', D => {
  20057. D.code === 'ArrowLeft'
  20058. ? (M(), H('up'))
  20059. : D.code === 'ArrowRight' && (M(), H('down'));
  20060. });
  20061. const M = (D = !0) => {
  20062. clearTimeout(l.timer),
  20063. (l.model = D),
  20064. Object.values(n.videoRefs).map(V =>
  20065. V == null ? void 0 : V.toggleHideControl(D)
  20066. ),
  20067. Object.values(n.audioRefs).map(V =>
  20068. V == null ? void 0 : V.toggleHideControl(D)
  20069. );
  20070. },
  20071. k = reactive({ type: '', penShow: !1, whiteboardShow: !1 }),
  20072. b = D => {
  20073. var O, j, $, J;
  20074. const V = n.itemList[d.activeIndex];
  20075. switch (
  20076. (V.type === 'VIDEO' &&
  20077. V.videoEle &&
  20078. ((O = V.videoEle) == null || O.pause()),
  20079. V.type === 'SONG' &&
  20080. V.audioEle &&
  20081. ((j = V.audioEle) == null || j.stop()),
  20082. V.type === 'MUSIC' &&
  20083. ((J = ($ = V.iframeRef) == null ? void 0 : $.contentWindow) ==
  20084. null ||
  20085. J.postMessage({ api: 'setPlayState' }, '*')),
  20086. E(),
  20087. (d.toolOpen = !1),
  20088. (k.type = D.type),
  20089. D.type)
  20090. ) {
  20091. case 'pen':
  20092. k.penShow = !0;
  20093. break;
  20094. case 'whiteboard':
  20095. k.whiteboardShow = !0;
  20096. }
  20097. },
  20098. C = () => {
  20099. (k.type = 'init'), _();
  20100. },
  20101. L = D => {
  20102. D == 'setTimeIcon' && (c.value = !0),
  20103. D == 'beatIcon' && (g.value = !0),
  20104. D == 'toneIcon' && (S.value = !0);
  20105. },
  20106. F = computed(() => {
  20107. var J, X;
  20108. if (d.activeIndex > 0) return !0;
  20109. let D = d.chapterDetails.findIndex(
  20110. Y => Y.id == n.lessonCoursewareDetailId
  20111. );
  20112. const V =
  20113. ((J = d.chapterDetails[D]) == null ? void 0 : J.knowledgeList) ||
  20114. [];
  20115. let O = V.findIndex(Y => Y.id == n.detailId);
  20116. if (D <= 0 && O <= 0) return !1;
  20117. let j = !1;
  20118. for (; O >= 0; ) O--, O >= 0 && V[O].containMaterial && (j = !0);
  20119. if (j) return !0;
  20120. if (D <= 0) return !1;
  20121. let $ = !1;
  20122. for (; D >= 0; ) {
  20123. D--;
  20124. const Y =
  20125. ((X = d.chapterDetails[D]) == null ? void 0 : X.knowledgeList) ||
  20126. [];
  20127. let K = Y.length;
  20128. for (; K > 0; ) Y[K - 1].containMaterial && ($ = !0), K--;
  20129. if ($) return !0;
  20130. }
  20131. return !1;
  20132. }),
  20133. U = computed(() => {
  20134. var J, X;
  20135. if (d.activeIndex < n.itemList.length - 1) return !0;
  20136. let D = d.chapterDetails.findIndex(
  20137. Y => Y.id == n.lessonCoursewareDetailId
  20138. );
  20139. const V =
  20140. ((J = d.chapterDetails[D]) == null ? void 0 : J.knowledgeList) ||
  20141. [];
  20142. let O = V.findIndex(Y => Y.id == n.detailId);
  20143. if (D >= d.chapterDetails.length - 1 && O >= V.length - 1) return !1;
  20144. let j = !1;
  20145. for (; O < V.length - 1; )
  20146. O++, O >= 0 && V[O].containMaterial && (j = !0);
  20147. if (j) return !0;
  20148. if (D >= d.chapterDetails.length - 1) return !1;
  20149. let $ = !1;
  20150. for (; D < d.chapterDetails.length - 1; ) {
  20151. D++;
  20152. const Y =
  20153. ((X = d.chapterDetails[D]) == null ? void 0 : X.knowledgeList) ||
  20154. [];
  20155. let K = 0;
  20156. for (; K <= Y.length - 1; ) Y[K].containMaterial && ($ = !0), K++;
  20157. if ($) return !0;
  20158. }
  20159. return !1;
  20160. });
  20161. return () => {
  20162. let D;
  20163. return createVNode(
  20164. 'div',
  20165. { id: 'playContent', class: [styles$5.playContent, 'wrap'] },
  20166. [
  20167. createVNode(
  20168. 'div',
  20169. {
  20170. onClick: () => {
  20171. clearTimeout(l.timer),
  20172. (l.model = !l.model),
  20173. Object.values(n.videoRefs).map(V =>
  20174. V == null ? void 0 : V.toggleHideControl(l.model)
  20175. ),
  20176. Object.values(n.audioRefs).map(V =>
  20177. V == null ? void 0 : V.toggleHideControl(l.model)
  20178. );
  20179. }
  20180. },
  20181. [
  20182. createVNode(
  20183. 'div',
  20184. {
  20185. class: styles$5.coursewarePlay,
  20186. style: { width: o.width },
  20187. onClick: V => {
  20188. V.stopPropagation(), T();
  20189. }
  20190. },
  20191. [
  20192. d.chapterLoading
  20193. ? ''
  20194. : createVNode('div', { class: styles$5.wraps }, [
  20195. n.itemList.map((V, O) => {
  20196. const j = Math.abs(d.activeIndex - O) < 2,
  20197. $ = Math.abs(d.activeIndex - O) > 4;
  20198. return j
  20199. ? createVNode(
  20200. 'div',
  20201. {
  20202. key: 'index' + O,
  20203. class: [
  20204. styles$5.itemDiv,
  20205. d.activeIndex === O &&
  20206. styles$5.itemActive,
  20207. l.isAnimation && styles$5.acitveAnimation,
  20208. Math.abs(d.activeIndex - O) < 2
  20209. ? styles$5.show
  20210. : styles$5.hide
  20211. ],
  20212. style:
  20213. O < d.activeIndex
  20214. ? z[B.value].prev
  20215. : O > d.activeIndex
  20216. ? z[B.value].next
  20217. : {},
  20218. onClick: J => {
  20219. if (
  20220. (J.stopPropagation(),
  20221. clearTimeout(l.timer),
  20222. Date.now() - l.nowTime < 300)
  20223. ) {
  20224. I(V);
  20225. return;
  20226. }
  20227. (l.nowTime = Date.now()),
  20228. (l.timer = setTimeout(() => {
  20229. (l.model = !l.model),
  20230. Object.values(n.videoRefs).map(X =>
  20231. X == null
  20232. ? void 0
  20233. : X.toggleHideControl(l.model)
  20234. ),
  20235. Object.values(n.audioRefs).map(X =>
  20236. X == null
  20237. ? void 0
  20238. : X.toggleHideControl(l.model)
  20239. ),
  20240. l.model && T();
  20241. }, 300));
  20242. }
  20243. },
  20244. [
  20245. V.type === 'VIDEO'
  20246. ? createVNode(Fragment, null, [
  20247. createVNode(
  20248. VideoPlay,
  20249. {
  20250. ref: J => (n.videoRefs[O] = J),
  20251. item: V,
  20252. isEmtry: $,
  20253. onLoadedmetadata: J => {
  20254. (V.videoEle = J),
  20255. (V.isprepare = !0);
  20256. },
  20257. onTogglePlay: J => {
  20258. (V.autoPlay = !1),
  20259. J || d.open
  20260. ? clearTimeout(l.timer)
  20261. : T();
  20262. },
  20263. onReset: () => {
  20264. var J;
  20265. ((J = V.videoEle) != null &&
  20266. J.paused) ||
  20267. T();
  20268. },
  20269. onError: () => {
  20270. console.log('video error'),
  20271. (V.error = !0);
  20272. }
  20273. },
  20274. null
  20275. ),
  20276. createVNode(
  20277. Transition,
  20278. { name: 'van-fade' },
  20279. {
  20280. default: () => [
  20281. !V.isprepare &&
  20282. createVNode(
  20283. 'div',
  20284. {
  20285. class: styles$5.loadWrap
  20286. },
  20287. [
  20288. createVNode(
  20289. Vue3Lottie,
  20290. {
  20291. animationData:
  20292. playLoadData
  20293. },
  20294. null
  20295. )
  20296. ]
  20297. )
  20298. ]
  20299. }
  20300. )
  20301. ])
  20302. : V.type === 'IMG'
  20303. ? createVNode(
  20304. 'img',
  20305. { src: V.content },
  20306. null
  20307. )
  20308. : V.type === 'SONG'
  20309. ? createVNode(
  20310. AudioPay,
  20311. {
  20312. item: V,
  20313. ref: J => (n.audioRefs[O] = J),
  20314. onLoadedmetadata: J => {
  20315. (V.audioEle = J),
  20316. (V.isprepare = !0);
  20317. },
  20318. onTogglePlay: J => {
  20319. (V.autoPlay = !1),
  20320. J || d.open
  20321. ? clearTimeout(l.timer)
  20322. : T();
  20323. },
  20324. onEnded: () => {
  20325. const J = d.activeIndex + 1;
  20326. J < n.itemList.length && R(J);
  20327. },
  20328. onReset: () => {
  20329. var J;
  20330. ((J = V.audioEle) != null &&
  20331. J.paused) ||
  20332. T();
  20333. }
  20334. },
  20335. null
  20336. )
  20337. : createVNode(
  20338. MusicScore,
  20339. {
  20340. activeModel: l.model,
  20341. activeStatus: d.activeIndex === O,
  20342. 'data-vid': V.id,
  20343. music: V,
  20344. onSetIframe: J => {
  20345. V.iframeRef = J;
  20346. }
  20347. },
  20348. null
  20349. )
  20350. ]
  20351. )
  20352. : null;
  20353. })
  20354. ])
  20355. ]
  20356. )
  20357. ]
  20358. ),
  20359. createVNode(
  20360. 'div',
  20361. {
  20362. style: { transform: l.model ? '' : 'translateY(-100%)' },
  20363. class: styles$5.headerContainer
  20364. },
  20365. [createVNode('div', { class: styles$5.menu }, [y.value]), '14:56']
  20366. ),
  20367. createVNode(
  20368. 'div',
  20369. {
  20370. onClick: V => {
  20371. V.stopPropagation();
  20372. },
  20373. class: [
  20374. styles$5.switchDisplaySection,
  20375. l.model ? '' : styles$5.sectionAnimate
  20376. ]
  20377. },
  20378. [
  20379. createVNode(
  20380. NSpace,
  20381. { class: styles$5.switchSpace },
  20382. {
  20383. default: () => [
  20384. createVNode(
  20385. 'div',
  20386. {
  20387. class: styles$5.btnItem,
  20388. onClick: async () => {
  20389. n.type === 'preview'
  20390. ? (m(),
  20391. (n.removeVisiable = !0),
  20392. (n.removeTitle = '结束预览'),
  20393. (n.removeContent = '请确认是否结束预览?'))
  20394. : ((n.removeVisiable = !0),
  20395. (n.removeTitle = '结束课程'),
  20396. (n.removeContent = '请确认是否结束课程?'));
  20397. }
  20398. },
  20399. [
  20400. createVNode('img', { src: iconOverClass }, null),
  20401. createVNode('p', null, [
  20402. n.type !== 'preview' ? '结束课程' : '结束预览'
  20403. ])
  20404. ]
  20405. ),
  20406. n.type !== 'preview' &&
  20407. createVNode(
  20408. 'div',
  20409. {
  20410. class: [
  20411. styles$5.btnItem,
  20412. n.preStudentNum <= 0 ? styles$5.btnsDisabled : ''
  20413. ],
  20414. onClick: async () => {
  20415. if (n.preStudentNum <= 0) return;
  20416. const V = await lessonPreTrainingPage({
  20417. coursewareKnowledgeDetailId: n.detailId,
  20418. subjectId: n.subjectId,
  20419. page: 1,
  20420. rows: 99
  20421. });
  20422. V.data.rows &&
  20423. V.data.rows.length &&
  20424. (n.modalAttendMessage =
  20425. '本节课已设置课后作业,是否布置?'),
  20426. (n.modelAttendStatus = !0);
  20427. }
  20428. },
  20429. [
  20430. createVNode('img', { src: iconWork }, null),
  20431. createVNode('p', null, [
  20432. createTextVNode('布置作业')
  20433. ])
  20434. ]
  20435. ),
  20436. createVNode(
  20437. 'div',
  20438. {
  20439. class: styles$5.btnItem,
  20440. onClick: () =>
  20441. b({ type: 'pen', icon: iconNote, name: '批注' })
  20442. },
  20443. [
  20444. createVNode('img', { src: iconNote }, null),
  20445. createVNode('p', null, [createTextVNode('批注')])
  20446. ]
  20447. ),
  20448. createVNode(
  20449. 'div',
  20450. {
  20451. class: styles$5.btnItem,
  20452. onClick: () =>
  20453. b({
  20454. type: 'whiteboard',
  20455. icon: iconWhite,
  20456. name: '白板'
  20457. })
  20458. },
  20459. [
  20460. createVNode('img', { src: iconWhite }, null),
  20461. createVNode('p', null, [createTextVNode('白板')])
  20462. ]
  20463. ),
  20464. createVNode(
  20465. 'div',
  20466. {
  20467. class: styles$5.btnItem,
  20468. onClick: () => L('beatIcon')
  20469. },
  20470. [
  20471. createVNode('img', { src: iconToneIcon }, null),
  20472. createVNode('p', null, [createTextVNode('节拍器')])
  20473. ]
  20474. ),
  20475. createVNode(
  20476. 'div',
  20477. {
  20478. class: styles$5.btnItem,
  20479. onClick: () => L('toneIcon')
  20480. },
  20481. [
  20482. createVNode('img', { src: iconSetTime }, null),
  20483. createVNode('p', null, [createTextVNode('调音器')])
  20484. ]
  20485. ),
  20486. createVNode(
  20487. 'div',
  20488. {
  20489. class: styles$5.btnItem,
  20490. onClick: () => L('setTimeIcon')
  20491. },
  20492. [
  20493. createVNode('img', { src: iconBeatIcon }, null),
  20494. createVNode('p', null, [createTextVNode('计时器')])
  20495. ]
  20496. )
  20497. ]
  20498. }
  20499. ),
  20500. createVNode(
  20501. NSpace,
  20502. { class: styles$5.switchSpace },
  20503. {
  20504. default: () => [
  20505. createVNode(
  20506. 'div',
  20507. {
  20508. class: styles$5.btnItem,
  20509. onClick: () => (d.chapterOpen = !0)
  20510. },
  20511. [
  20512. createVNode('img', { src: iconChange }, null),
  20513. createVNode('p', null, [createTextVNode('切换章节')])
  20514. ]
  20515. ),
  20516. createVNode(
  20517. 'div',
  20518. {
  20519. class: styles$5.btnItem,
  20520. onClick: () => (d.open = !0)
  20521. },
  20522. [
  20523. createVNode('img', { src: iconMenu }, null),
  20524. createVNode('p', null, [createTextVNode('资源列表')])
  20525. ]
  20526. ),
  20527. createVNode(
  20528. 'div',
  20529. {
  20530. class: [
  20531. styles$5.btnItem,
  20532. F.value ? '' : styles$5.btnsDisabled
  20533. ],
  20534. onClick: () => {
  20535. F.value && H('up');
  20536. }
  20537. },
  20538. [
  20539. createVNode('img', { src: iconUp }, null),
  20540. createVNode('p', null, [createTextVNode('上一个')])
  20541. ]
  20542. ),
  20543. createVNode(
  20544. 'div',
  20545. {
  20546. class: [
  20547. styles$5.btnItem,
  20548. U.value ? '' : styles$5.btnsDisabled
  20549. ],
  20550. onClick: () => {
  20551. U.value && H('down');
  20552. }
  20553. },
  20554. [
  20555. createVNode('img', { src: iconDown }, null),
  20556. createVNode('p', null, [createTextVNode('下一个')])
  20557. ]
  20558. )
  20559. ]
  20560. }
  20561. )
  20562. ]
  20563. ),
  20564. createVNode(
  20565. NDrawer,
  20566. {
  20567. show: d.open,
  20568. 'onUpdate:show': V => (d.open = V),
  20569. class: styles$5.drawerContainer,
  20570. onAfterLeave: N,
  20571. showMask: !1
  20572. },
  20573. {
  20574. default: () => [
  20575. createVNode(
  20576. NDrawerContent,
  20577. { title: '资源列表', closable: !0 },
  20578. _isSlot(
  20579. (D = n.knowledgePointList.map((V, O) =>
  20580. createVNode('div', { class: styles$5.cardContainer }, [
  20581. createVNode(
  20582. CardType,
  20583. {
  20584. item: V,
  20585. isActive: d.activeIndex === O,
  20586. isCollect: !1,
  20587. isShowCollect: !1,
  20588. onClick: j => {
  20589. (d.open = !1), A(j.id);
  20590. }
  20591. },
  20592. null
  20593. )
  20594. ])
  20595. ))
  20596. )
  20597. ? D
  20598. : { default: () => [D] }
  20599. )
  20600. ]
  20601. }
  20602. ),
  20603. createVNode(
  20604. NDrawer,
  20605. {
  20606. show: d.chapterOpen,
  20607. 'onUpdate:show': V => (d.chapterOpen = V),
  20608. class: styles$5.drawerContainer,
  20609. onAfterLeave: N,
  20610. showMask: !1,
  20611. displayDirective: 'show'
  20612. },
  20613. {
  20614. default: () => [
  20615. createVNode(
  20616. NDrawerContent,
  20617. { title: '切换章节', closable: !0 },
  20618. {
  20619. default: () => [
  20620. createVNode(
  20621. Chapter,
  20622. {
  20623. treeList: d.chapterDetails,
  20624. itemActive: n.detailId,
  20625. onHandleSelect: async V => {
  20626. d.chapterLoading = !0;
  20627. try {
  20628. n.detailId = V.itemActive;
  20629. const O = p(V.itemActive, d.chapterDetails);
  20630. (n.lessonCoursewareDetailId = O[0]),
  20631. n.type !== 'preview' && (await u()),
  20632. await f(),
  20633. (d.activeIndex = 0),
  20634. (d.chapterOpen = !1);
  20635. } catch (O) {}
  20636. d.chapterLoading = !1;
  20637. }
  20638. },
  20639. null
  20640. )
  20641. ]
  20642. }
  20643. )
  20644. ]
  20645. }
  20646. ),
  20647. k.penShow &&
  20648. createVNode(
  20649. Pen,
  20650. { show: k.type === 'pen', type: k.type, close: () => C() },
  20651. null
  20652. ),
  20653. k.whiteboardShow &&
  20654. createVNode(
  20655. Pen,
  20656. {
  20657. show: k.type === 'whiteboard',
  20658. type: k.type,
  20659. close: () => C()
  20660. },
  20661. null
  20662. ),
  20663. createVNode(
  20664. NModal,
  20665. {
  20666. transformOrigin: 'center',
  20667. show: n.modelAttendStatus,
  20668. 'onUpdate:show': V => (n.modelAttendStatus = V),
  20669. preset: 'card',
  20670. title: '课后作业',
  20671. class: ['modalTitle', styles$5.removeVisiable]
  20672. },
  20673. {
  20674. default: () => [
  20675. createVNode('div', { class: styles$5.studentRemove }, [
  20676. createVNode('p', null, [n.modalAttendMessage]),
  20677. createVNode(
  20678. NSpace,
  20679. { class: styles$5.btnGroupModal },
  20680. {
  20681. default: () => [
  20682. createVNode(
  20683. NButton,
  20684. {
  20685. type: 'default',
  20686. round: !0,
  20687. onClick: () => {
  20688. (n.modelAttendStatus = !1),
  20689. m(),
  20690. (n.modelAttendStatus = !1);
  20691. }
  20692. },
  20693. { default: () => [createTextVNode('暂不布置')] }
  20694. ),
  20695. createVNode(
  20696. NButton,
  20697. {
  20698. type: 'primary',
  20699. round: !0,
  20700. onClick: () => {
  20701. (n.modelTrainStatus = !0),
  20702. (n.modelAttendStatus = !1);
  20703. }
  20704. },
  20705. { default: () => [createTextVNode('布置')] }
  20706. )
  20707. ]
  20708. }
  20709. )
  20710. ])
  20711. ]
  20712. }
  20713. ),
  20714. createVNode(
  20715. NModal,
  20716. {
  20717. transformOrigin: 'center',
  20718. show: n.modelTrainStatus,
  20719. 'onUpdate:show': V => (n.modelTrainStatus = V),
  20720. preset: 'card',
  20721. class: [styles$5.attendClassModal, styles$5.trainClassModal],
  20722. title: '作业设置'
  20723. },
  20724. {
  20725. default: () => [
  20726. createVNode(
  20727. TrainSettings,
  20728. {
  20729. detailId: n.detailId,
  20730. subjectId: n.subjectId,
  20731. classGroupId: n.classGroupId,
  20732. onClose: () => (n.modelTrainStatus = !1),
  20733. onConfirm: () => {
  20734. n.modelTrainStatus = !1;
  20735. }
  20736. },
  20737. null
  20738. )
  20739. ]
  20740. }
  20741. ),
  20742. createVNode(
  20743. NModal,
  20744. {
  20745. transformOrigin: 'center',
  20746. class: ['modalTitle background'],
  20747. title: '节拍器',
  20748. preset: 'card',
  20749. show: g.value,
  20750. 'onUpdate:show': V => (g.value = V),
  20751. style: { width: '687px' }
  20752. },
  20753. {
  20754. default: () => [
  20755. createVNode('div', { class: styles$5.modeWrap }, [
  20756. createVNode(
  20757. 'iframe',
  20758. {
  20759. src: ''
  20760. .concat(vaildUrl(), '/metronome/?id=')
  20761. .concat(new Date().getTime()),
  20762. scrolling: 'no',
  20763. frameborder: '0',
  20764. width: '100%',
  20765. height: '650px'
  20766. },
  20767. null
  20768. )
  20769. ])
  20770. ]
  20771. }
  20772. ),
  20773. createVNode(
  20774. NModal,
  20775. {
  20776. transformOrigin: 'center',
  20777. class: ['background'],
  20778. show: S.value,
  20779. 'onUpdate:show': V => (S.value = V)
  20780. },
  20781. {
  20782. default: () => [
  20783. createVNode('div', null, [
  20784. createVNode(
  20785. PlaceholderTone,
  20786. {
  20787. onClose: () => {
  20788. S.value = !1;
  20789. }
  20790. },
  20791. null
  20792. )
  20793. ])
  20794. ]
  20795. }
  20796. ),
  20797. createVNode(
  20798. NModal,
  20799. {
  20800. transformOrigin: 'center',
  20801. show: c.value,
  20802. 'onUpdate:show': V => (c.value = V),
  20803. class: ['modalTitle background'],
  20804. title: '计时器',
  20805. preset: 'card',
  20806. style: { width: px2vw(772) }
  20807. },
  20808. {
  20809. default: () => [
  20810. createVNode('div', null, [
  20811. createVNode(TimerMeter, null, null)
  20812. ])
  20813. ]
  20814. }
  20815. ),
  20816. createVNode(
  20817. NModal,
  20818. {
  20819. transformOrigin: 'center',
  20820. show: n.removeVisiable,
  20821. 'onUpdate:show': V => (n.removeVisiable = V),
  20822. preset: 'card',
  20823. class: ['modalTitle', styles$5.removeVisiable],
  20824. title: n.removeTitle
  20825. },
  20826. {
  20827. default: () => [
  20828. createVNode('div', { class: styles$5.studentRemove }, [
  20829. createVNode('p', null, [n.removeContent]),
  20830. createVNode(
  20831. NSpace,
  20832. { class: styles$5.btnGroupModal, justify: 'center' },
  20833. {
  20834. default: () => [
  20835. createVNode(
  20836. NButton,
  20837. {
  20838. round: !0,
  20839. onClick: () => (n.removeVisiable = !1)
  20840. },
  20841. { default: () => [createTextVNode('取消')] }
  20842. ),
  20843. createVNode(
  20844. NButton,
  20845. {
  20846. round: !0,
  20847. type: 'primary',
  20848. onClick: () => {
  20849. state.application
  20850. ? (document.exitFullscreen
  20851. ? document.exitFullscreen()
  20852. : document.mozCancelFullScreen
  20853. ? document.mozCancelFullScreen()
  20854. : document.webkitExitFullscreen &&
  20855. document.webkitExitFullscreen(),
  20856. t('close'))
  20857. : window.close();
  20858. }
  20859. },
  20860. { default: () => [createTextVNode('确定')] }
  20861. )
  20862. ]
  20863. }
  20864. )
  20865. ])
  20866. ]
  20867. }
  20868. )
  20869. ]
  20870. );
  20871. };
  20872. }
  20873. }),
  20874. index = Object.freeze(
  20875. Object.defineProperty(
  20876. { __proto__: null, default: AttendClass },
  20877. Symbol.toStringTag,
  20878. { value: 'Module' }
  20879. )
  20880. );
  20881. export {
  20882. AttendClass as A,
  20883. Pen as P,
  20884. TimerMeter as T,
  20885. PlaceholderTone as a,
  20886. index as i
  20887. };